The Open Model EcosystemLesson 23 of 71

Module 3 · Inside the files

Why the same sentence costs different amounts

In this lesson

  • 9 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 3 of 10 in this chapter

This chapter’s goalOpen a model repository you have never seen and predict, from config.json and the tokenizer alone, its parameter count, its memory footprint at a given context length, its per-token cost in your languages and the exact conversation format it requires; then verify each prediction with a command and diagnose a runaway or garbled generation from the files rather than by guessing.

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
Tokens per word for the same Hindi sentence in DevanagariLlama 2: 32,000 vocabulary6.2Llama 3: 128,2562.7Qwen3: about 151,0002.5Gemma 3: 256,0002.1tokens per wordEnglish costs about 1.3 tokens per word on all four. At three times the fertility you pay three timesper sentence on an identical price list, the same window holds a third of the document, and a reply ofthe same length takes three times as long. Measure this on your own text before you choose.
English costs about 1.3 tokens per word on all four. At three times the fertility you pay three times per sentence on an identical price list, the same window holds a third of the document, and a reply of the same length takes three times as long. Measure this on your own text before you choose.

Figure

A little at a time

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

Step 1 of 7Free · no account needed
Lesson steps

Tokens are the unit of everything

Price is per token. Context length is in tokens. Speed is tokens per second. So the tokenizer (a lookup table and a merge algorithm, no neural network involved) quietly sets the cost of your product, and it does so differently for every language.

Almost every current model uses byte-level byte-pair encoding or a SentencePiece variant. The training procedure is simple: start from bytes, repeatedly merge the most frequent adjacent pair, stop at the target vocabulary size. Whatever was frequent in the tokenizer’s training text gets a short representation. Whatever was rare gets chopped into pieces.

Vocabulary sizes across the families: Llama 2 used 32,000; Llama 3 moved to 128,256; Qwen uses around 151,000; Gemma uses 256,000. That progression is mostly about multilingual coverage.

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 Maths You Actually Need exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘Why the same sentence costs different amounts’, in The Open Model Ecosystem. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/open-models/tokenizers-across-families (Accessed: 29 November 2026).