Module 7 · Running it: memory, speed and money

Quantisation: what the numbers lose

In this lesson

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

This chapter’s goalPredict the tokens-per-second a given model will produce on a given machine from memory bandwidth alone, say whether a model and context will fit in a stated amount of memory, choose a quantisation level and defend it with a measurement, estimate the cost of a token from a GPU’s hourly price, and explain the trade an alternative architecture is making.

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
Where the four-bit loss actually landsPerplexity on ordinarytext, the quoted number2General knowledgequestions3Preciseinstruction-following andformatting6Long-context recall, witha 4-bit cache9Multi-step arithmetic andcode10points lost against bf16, same eight-billion modelThe averaged number hides the damage, because most tokens of ordinary text are easy. The lossconcentrates where the margins were already thin: steps that compound, recall over long inputs,precise formats, and the low-resource languages of module six, which had the least margin to beginwith.
The averaged number hides the damage, because most tokens of ordinary text are easy. The loss concentrates where the margins were already thin: steps that compound, recall over long inputs, precise formats, and the low-resource languages of module six, which had the least margin to begin with.

Figure

A little at a time

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

Step 1 of 10Free · no account needed
Lesson steps

What a quantised number actually is

A bf16 weight has sixteen bits: about three significant decimal digits and an enormous range. An int8 has 256 possible values. A four-bit integer has sixteen. Quantisation is the act of mapping each weight onto one of those few values in a way that loses as little as possible.

The simplest scheme stores one scale per group of weights. Take four weights: 0.31, −0.12, 0.05, 0.90. For signed four-bit integers the range is −8 to 7, so the scale is the largest magnitude divided by seven: 0.90 ÷ 7 ≈ 0.129. Each weight becomes round(w ÷ scale): 2, −1, 0, 7. To use them, multiply back: 0.26, −0.13, 0.00, 0.90.

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 AI, Actually Explained exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘Quantisation: what the numbers lose’, in How a Language Model Actually Works. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/how-llms-work/quantisation-mechanics (Accessed: 29 November 2026).