Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesHugging Face LLM Course: Practical TransformersTrainer API: Fine-Tuning a Classifier
LoRA tuning: a large weight matrix plus two thin onesThe ollama run command and a VRAM gauge the model fits intoA shelf of open-weight models: DeepSeek, Qwen, Mistral, Llama
Course

Hugging Face LLM Course: Practical Transformers

Module 1 · Transformers and Tokenization
01Pipeline API: Run Models in Three Lines02Tokenization: BPE, WordPiece, SentencePiece03Hugging Face Hub: Finding and Downloading Models
Module 2 · Fine-Tuning
04Dataset Preparation: load_dataset and Tokenization05Trainer API: Fine-Tuning a Classifier06PEFT and LoRA: Fine-Tuning Without Full Training
Module 3 · Advanced Capabilities
07Hugging Face Inference Providers: Serverless Inference08Gradio + Spaces: Deploy an ML Demo in 10 Minutes09vLLM + smolagents: Inference Server and Tool-Using Agents
Hugging Face LLM Course: Practical Transformers · Lesson 5

Trainer API: Fine-Tuning a Classifier

The Trainer class handles the training loop, logging, evaluation, and checkpoint saving. Code for transformers 5 (eval_strategy, processing_class, bf16) plus LLM fine-tuning with TRL's SFTTrainer.

45 min readUpdated Dec 2, 20262 questions in quizReady prompt included
🔒

Full lesson access

Trainer API: Fine-Tuning a Classifier opens after free sign-up: 7 days of full access to every course, no card needed.

Start 7-day free trial
Then Pro: $9/mo or $79/yr

View plans →

One trial lesson is open without sign-up: what a large language model is →

In this lesson
Full Fine-Tuning ExampleKey TrainingArgumentsWhat Changed in transformers 5Fine-Tuning an LLM: SFTTrainer from TRLPracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free