FDE Times dataFDE jobs open 932▼14 Change in open roles over 7 days, like-for-like: roles from companies we started tracking this week are left outNew in 7 days 62Companies hiring 202Remote-friendly 24%Median US pay $201kTop hirer Databricks 92
中文VI

The newspaper of the Forward Deployed Engineer

Books & courses

Hugging Face's free LLM course teaches FDEs to fine-tune last

The first three chapters follow a client engagement, from a pipeline() baseline to inspecting the data, and the whole course is free and open source.

ShareLinkedInFacebookX

In brief

  • Ten authors from Hugging Face and its collaborators wrote the course. It is free, carries no ads, its code is licensed under Apache-2.0, and a Vietnamese translation is complete.
  • The first three chapters can be read in the order an FDE works on a client site: pipeline() for a baseline, tokenizers to understand the data, Trainer for fine-tuning.
  • Each chapter takes about 6-8 hours a week. At that pace, the first three chapters give you the footing to run a small project on real data yourself.
Diagram of three linked cards in sequence. Week 1, pipeline(): set a baseline by running a few dozen real tickets through an off-the-shelf classification pipeline and counting the misclassified ones. Week 2, tokenizer, highlighted in orange and labelled "Slowest read": inspect the data by running the tokenizer on the tickets themselves, such as a terse "item not delivered" message, and seeing how it splits them. Week 3, Trainer API: fine-tune, where the main work is building a clearly labelled dataset, splitting train/test and passing it through the right tokenizer. An arrow loops from fine-tune back to the baseline: compare the fine-tuned model with the baseline to get results to present to the client.
Read in order 1, 2, 3, one chapter a week: you can only tell whether fine-tuning is worth the effort once you have a baseline to compare against.

A logistics company wants to route its customer-support tickets into five groups automatically. Nobody there will ask you what a transformer is. They will ask whether, in the next few weeks, you can deliver a model that works on their own data.

The first three chapters of Hugging Face’s LLM Course answer roughly that question. Hugging Face does not present the course as a project methodology, but read with an FDE’s eye, the order of the chapters matches the order of work on a client site: build a baseline, inspect the data, and only then fine-tune.

The course is free, carries no ads, its source is open under the Apache-2.0 license, and a Vietnamese edition already sits on the list of completed translations. For a developer looking to move into FDE work, the barrier to starting is close to zero.

Who wrote it, and at what pace should you study?

The ten authors are Hugging Face staff and collaborators, among them Sylvain Gugger, Lewis Tunstall, Leandro von Werra, Merve Noyan and Ben Burtenshaw. The official page is titled “Welcome to the 🤗 Course!”, and the citation reads “The Hugging Face Course, 2022”.

The README on GitHub describes the aim as teaching how to apply Transformers to a range of natural language processing tasks and beyond. The suggested pace is one chapter a week, at roughly 6-8 hours a week.

The repo is open for anyone to read, though Hugging Face is not currently accepting community contributions for new chapters. For learners, that changes nothing: you are there to study and read code, and the first three chapters are enough to get to work.

First idea: build a baseline before you choose a model

Chapter 1 teaches the pipeline() function for tasks such as text generation and classification. It sounds simple, but this is the habit that separates an FDE from someone who only builds demos.

Back to the logistics company. On day one, fine-tuning should not yet come up. Take a few dozen real tickets, run them through an off-the-shelf classification pipeline and count how many land in the wrong group. That number is your baseline, the mark every later proposal has to beat.

If the baseline is already good enough, you have just saved the client several weeks of work. If it is not, the list of misclassified tickets tells you where to look.

Second idea: the tokenizer is where real data gets distorted

Chapter 2 defines the tokenizer’s job concisely: turning text into data a model can process. It then compares three ways of splitting text: by word (word-based), by character (character-based) and by units smaller than a word (subword). The subword family includes BPE, used in GPT-2, WordPiece, used in BERT, and SentencePiece/Unigram.

This is the chapter to read most slowly, because client data is never as clean as the examples. Say the logistics tickets include abbreviated slang, customers typing without diacritics, or tracking numbers pasted into the middle of a sentence.

In principle, a word-based tokenizer will often hit words outside its vocabulary. A subword tokenizer breaks unfamiliar words into pieces it already knows, but whether those pieces keep their meaning is something you only learn by looking.

The first thing to do is run the tokenizer of the model you plan to use on those very tickets and inspect the splits yourself. Five minutes of this can explain why the baseline went wrong, before anyone gets the chance to blame the model.

Third idea: fine-tuning is mostly data preparation

Chapter 3 teaches fine-tuning with the high-level Trainer API, following modern best practices. Yet the other half of the chapter, preparing a large dataset from the Hub with the newer features of 🤗 Datasets, is the part that most resembles real work.

In the logistics example, the hard part is not calling Trainer. It is turning a few thousand messy tickets into a dataset with clear labels, a sensible train and test split, and passing it through the same tokenizer you checked in chapter 2.

Once that is done, all that remains is to compare the fine-tuned model with the chapter 1 baseline. That comparison is what you present to the client.

Who should take it, and in what order?

Go in order, 1, 2, 3, one chapter a week.

The reason is practical: you only know whether a fine-tuned model is worth the effort once you have a baseline from chapter 1, and the dataset in chapter 3 has to pass through a tokenizer you understood in chapter 2.

A translated edition helps, but use it alongside the English one. Read the translation to grasp the concepts, and read code and API names in English, because documentation, issues and, later, clients’ questions all use English terminology.

When reading job descriptions, look for terms such as Transformers, fine-tuning, tokenization or Hugging Face. On a CV, do not write “completed the course”. Describe a three-step project instead: a baseline with pipeline, a tokenizer analysis on real data, then a fine-tuned model that beats the baseline, with measured numbers and a link to the repo.

A certificate shows you studied. A project done in the order of these three chapters shows you know where to start when you arrive at a client.

Was this article useful?

Use with your AI assistantAsk Claude ↗Ask ChatGPT ↗
4 sources
Read next on the roadmap · Stage 3: Applied AIWhy FDEs who never train models should still build GPT from scratchAndrej Karpathy's free course runs from a 150-line autograd engine to a tokenizer, and jumping straight to lecture seven skips the most valuable part.