Skip to main content
Primary: Phase 7Interactive CourseAdvancedFree Learning Material
Hugging Face

smol-course — Fine-Tuning Language Models

Practical hands-on course focused on post-training small and medium open-weight language models: chat templates, Supervised Fine-Tuning (SFT), LoRA/QLoRA parameter-efficient adaptation, preference alignment (DPO/ORPO), and evaluation.

The Hugging Face `smol-course` is purpose-built for Phase 7 of this roadmap. Designed so every exercise runs on consumer or free cloud GPUs, it guides you step by step through formatting multi-turn instruction datasets with chat templates, running Supervised Fine-Tuning (SFT), applying Low-Rank Adaptation (LoRA and 4-bit QLoRA), aligning models with Direct Preference Optimization (DPO), and evaluating instruction-following quality.

Resource Tracking

Course status is tracked independently from roadmap topic checkboxes so you can mark external courses without altering your topic mastery percentage.

Suggested Learning Position

Phase 7 Primary Starting Course (Modules 7.1–7.5)

Language:English
Access & Link Verification

100% free open-source interactive course and GitHub notebooks on Hugging Face.

Status: Verified (2026-11-09)

What You Will Learn from This Resource

  • Format instruction and multi-turn conversation datasets with special control tokens and assistant-only loss masking.
  • Fine-tune language models on single-GPU hardware using LoRA and 4-bit QLoRA.
  • Align SFT models on chosen vs. rejected preference pairs using Direct Preference Optimization (DPO).

Recommended Prerequisites

Review these foundations before starting so you get the most out of this material:

  • Pretrained Transformer fundamentals and PyTorch training loops (Phases 5 & 6).

Topics & Keywords

smol-courseSFTSupervised Fine-TuningLoRAQLoRADPOAlignmentHugging Face
Curriculum Integration

How This Resource Fits Into Your AI & LLM Roadmap

Open Interactive Roadmap

Phase-Specific Study Recommendations (1)

Phase 7 · Resource 7.1Start Here · Recommended

smol-course — Fine-Tuning Language Models

In Phase 7: Post-training & Alignment

Start Phase 7 here! Work through the units on Chat Templates & SFT, Parameter-Efficient Fine-Tuning (LoRA/QLoRA), and Preference Alignment (DPO) as you build Milestone #12 (Instruction-Tuned Assistant Model).

Continue Exploring
Browse Full Library
Phase 7Documentation / Tutorials
Hugging Face
AdvancedFree Learning Material

TRL Documentation and Tutorials

Official documentation and technical guides for TRL (Transformer Reinforcement Learning), covering `SFTTrainer`, `RewardTrainer`, `PPOTrainer`, `DPOTrainer`, and `GRPOTrainer`.

TRLSFTDPORLHFPPO
Your Status:
Phase 7GitHub Repository / Handbook
Hugging Face
AdvancedFree Learning Material

Alignment Handbook

Production recipes, hyperparameter configurations, and open-source training scripts for aligning language models (such as Zephyr and SmolLM-Instruct) using SFT, LoRA/QLoRA, and DPO.

Alignment HandbookZephyrSFTDPOQLoRA
Your Status:
Phase 7Course Module
Hugging Face
IntermediateFree Learning Material

Fine-Tuning LLMs — Hugging Face Course

Foundational course module covering dataset preprocessing, dynamic padding, the Trainer API, custom PyTorch fine-tuning loops, and learning rate schedules for adapting pretrained Transformers.

Fine-TuningPyTorchHugging FaceDynamic PaddingSFT
Your Status: