NLP with Hugging Face Transformers: fine tune and ship

Tokenizers, pretrained models, fine tuning with Trainer and LoRA, evaluation, embeddings and serving text models in production

7 ratings 1,450 students Sample

Created by Fatima Idrissi

  • Updated September 2026
  • English
  • Advanced

What you will learn

  • Explain tokenization and attention well enough to choose and debug models
  • Select pretrained models from the Hub based on task, size, language and licence
  • Fine tune encoder models for classification and named entity recognition
  • Apply LoRA to adapt larger models with limited hardware
  • Evaluate text models rigorously and analyse their errors
  • Build embedding based semantic search and serve models efficiently

Course content

6 sections, 24 lessons, 4h 9m total

Foundations of modern NLP 5 lessons · 50 min
  • Video: The pretrained model revolution Preview 9 min
  • Article: Tokenizers: text to numbers Preview 13 min
  • Article: Inference with pipelines and the Auto classes 12 min
  • Article: Building a strong baseline first 11 min
  • Quiz: Check your understanding 5 min
Fine tuning encoders 4 lessons · 44 min
  • Video: Preparing data with the datasets library 11 min
  • Video: Fine tuning with Trainer 13 min
  • Video: Writing your own fine tuning loop 11 min
  • Article: Hyperparameters that matter 9 min
Entities and structured extraction 4 lessons · 43 min
  • Video: Token classification and labels 11 min
  • Video: Training an entity extractor 12 min
  • Video: From entities to clean records 10 min
  • Video: Comparing with a generative model 10 min
Efficient adaptation with LoRA 3 lessons · 33 min
  • Article: Why parameter efficient fine tuning 9 min
  • Video: Applying LoRA with the peft library 13 min
  • Video: Quantisation for training and inference 11 min
Embeddings and semantic search 4 lessons · 43 min
  • Video: Sentence embeddings explained 10 min
  • Video: Building a semantic search 12 min
  • Video: Evaluating retrieval quality 10 min
  • Video: Fine tuning an embedding model 11 min
Shipping text models 4 lessons · 36 min
  • Video: Error analysis and model cards 10 min
  • Video: Serving models efficiently 12 min
  • Article: Monitoring and retraining 9 min
  • Quiz: Final check 5 min

Requirements

  • Python and PyTorch basics, including a training loop
  • Understanding of train, validation and test splits and common metrics
  • A GPU or free cloud notebook is recommended

Description

Pretrained transformer models changed natural language processing. Instead of training from scratch, you start from a model that already understands a lot about language and adapt it to your task with a modest amount of labelled data. The Hugging Face ecosystem, with the transformers, datasets, evaluate and peft libraries and the model Hub, is the most common way to do this in Python.

This course is for practitioners who know the basics of deep learning and want to build real text applications: classifying support tickets, extracting entities from documents, finding similar texts and running small open models efficiently.

What you will learn

  • How tokenizers work and why they matter for cost and quality
  • Choosing pretrained models from the Hub: size, licence, language and model cards
  • Fine tuning encoders for classification and token classification
  • Parameter efficient fine tuning with LoRA
  • Proper evaluation, error analysis and comparing against simple baselines
  • Sentence embeddings for search, clustering and deduplication
  • Running models efficiently: batching, quantisation and serving

Projects

We work on three projects: routing customer support tickets to the right team, extracting product names and quantities from order emails, and building a semantic search over a help centre. Each one goes from data to an evaluated model you could deploy.

You should know Python and PyTorch basics, including training loops, and have a general understanding of machine learning evaluation. A GPU makes fine tuning faster; free cloud notebooks are enough for every exercise.

Who this course is for

  • ML engineers starting NLP projects
  • Data scientists who want to move beyond keyword rules and bag of words models
  • Developers who need text models they can run themselves

Instructor

Fatima Idrissi

Machine learning engineer teaching scikit-learn, PyTorch and modern NLP from the ground up

  • 4.4 instructor rating
  • 21 reviews
  • 7,660 students
  • 3 courses
  • Sample

I build and evaluate machine learning models, mostly for text and tabular data. My work covers the whole loop: preparing data, training baselines, trying deep learning when it is worth it, and measuring whether the model actually helps.

In my courses I start with the simplest model that could work and only add complexity when the numbers justify it. You will write the training loop yourself before using higher level tools, so nothing feels like magic.

I also enjoy reading papers and turning the useful parts into small, runnable notebooks.

View profile

Student reviews

4.4 7 ratings
5 star 57%
4 star 29%
3 star 14%
2 star 0%
1 star 0%
Laila T. Oct 4, 2026
Sample

Model cards lesson was a nice touch

We now write a model card for every model we ship, and it has helped reviews a lot.

Nadia R. Sep 28, 2026
Sample

Baseline first was humbling

Our TF-IDF baseline was only three points behind the transformer. That changed our whole project plan.

Erik J. Sep 9, 2026
Sample

LoRA section is excellent

Clear explanation and working code. We now serve four tasks from one base model with adapters.

Chiara B. Aug 16, 2026
Sample

Strong and practical

Great coverage of tokenization pitfalls and evaluation. The serving lesson could include more on GPUs.

Moses K. Jul 28, 2026
Sample

Honest comparison with generative models

Seeing cost and latency next to accuracy helped me argue for a smaller model at work.

Yuna H. Jul 5, 2026
Sample

Retrieval evaluation is well taught

The recall at k evaluation set approach is now how we compare embedding models.

Pieter V. Jun 3, 2026
Sample

Truly advanced, prepare first

As the title says, this is advanced. Brush up on PyTorch before starting.

$64.99 Enroll now
SampleSample catalog: the instructors, courses, reviews and stats on this site are demo content.