Fine-Tuning, and When Not ToLesson 51 of 84

Module 6 · The mechanics of a run

Adding tokens, and initialising them properly

In this lesson

  • 8 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 4 of 10 in this chapter

This chapter’s goalConfigure and launch a fine-tuning job with the correct chat template, masking and tokenizer handling, and diagnose from the logs alone whether a run is not learning, diverging, or memorising.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

When it is worth it

Adding vocabulary is not a routine step. The three cases where it earns its cost:

  1. A control token. A <|tool_call|> or <|thinking|> marker you want the model to emit unambiguously, which no existing token can be confused with.
  2. A pad token the base model lacks, as the previous lesson described.
  3. A script or domain the tokenizer handles badly. If your language tokenises at four tokens per word, extending the vocabulary with common sequences from your corpus can halve that, but this only pays off alongside continued pretraining with a substantial amount of text, because the new embeddings have to be learned from scratch.

For anything else (a product name, a set of category labels, a handful of domain terms) leave the vocabulary alone. The model represents multi-token strings perfectly well, and every added token is an untrained row in two large matrices.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Running Models Yourself exam.

Stuck on something?Ask Rafael, your AI tutor

How to cite: Addaly (2026) ‘Adding tokens, and initialising them properly’, in Fine-Tuning, and When Not To. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/fine-tuning/adding-your-own-tokens (Accessed: 29 November 2026).