02Chapter 2: Number formats: from FP32 to 4-bitThis chapter assumes you know that a model is a large set of numbers called weights, that a byte is 8 bits, and that you can run a short Python script. By the end, you should be able to say how many bytes each weight takes in each common format. You should also be able to say why lower precision is 5 min read
03Chapter 3: What quantisation does to a modelThis chapter assumes you know what a parameter is, that weights are stored as numbers with a fixed number of bits, and that you can do arithmetic with bits, bytes and GiB. The previous chapter covered number formats from FP32 down to 4-bit. Here you will see how a model's weights are actually compre7 min read
04Chapter 4: Reading GGUF files and names like Q4_K_MThis chapter assumes you know what quantisation does to weights (the previous chapter) and can do byte and bit arithmetic. After it, you should be able to read a model file name, say what is inside the file, and predict its size.5 min read
05Chapter 5: Estimating the memory for weightsThis chapter assumes you know what a parameter is in a language model, can do arithmetic with bits, bytes and gigabytes, and can run Python and shell commands. Quantisation and GGUF naming were covered in earlier chapters. Here you use them to turn a model name into a memory number.5 min read
06Chapter 6: The KV cache and why context length costs memoryThis chapter assumes you can estimate weight memory from parameter count and bits per weight, and that you know the difference between VRAM and system RAM. It also assumes you know roughly what a transformer layer and an attention head are. By the end you will be able to compute the KV cache size fo6 min read
07Chapter 7: VRAM, system RAM and unified memoryThis chapter covers the three places a model's weights can live: GPU memory (VRAM), system RAM, and the single shared pool on unified-memory machines. It assumes you can already estimate weight size from parameter count and bits per weight, and that you know what the KV cache is. The next chapter us6 min read
08Chapter 8: Checking whether a model fitsThis chapter combines the weight and KV cache estimates from earlier chapters into one pass/fail check. It assumes you can compute weight memory from parameters and bits per weight, and that you know the KV cache grows linearly with context length. It also assumes you know the difference between VRA5 min read
09Chapter 9: Why memory bandwidth mattersThis chapter assumes you can estimate weight memory from parameter count and bits per weight, and that you know the difference between VRAM, system RAM and unified memory. It explains why the speed of the link between memory and processor often sets how fast a local model generates text.6 min read
10Chapter 10: Prompt processing and token generation are different workloadsThis chapter assumes you can estimate weight memory and KV cache size from the earlier chapters. It also assumes you know that memory bandwidth is the rate at which a processor can read data from memory. Here you will learn why a local model has two different speeds, which hardware limit applies to 6 min read
11Chapter 11: Estimating a tokens-per-second ceilingThis chapter assumes you can already compute a model's file size in memory (parameters × bits per weight ÷ 8) and that you know what the KV cache is. It also assumes you know the bandwidth figure for your memory tier, such as VRAM, system RAM or unified memory. Here you will turn those numbers into 6 min read
12Chapter 12: Splitting a model between GPU and CPUThis chapter assumes you can estimate weight memory and KV cache size from earlier chapters. It also assumes you know the difference between VRAM and system RAM, and that decode speed is bounded by memory bandwidth divided by model size. Here you will see what happens when a model does not fit in VR6 min read
13Chapter 13: How much quality you give up when you quantiseThis chapter assumes you know what a parameter is, how bits per weight set file size, and how to read GGUF names such as Q4KM. It covers how to judge what quantisation costs you in output quality, and where that cost shows up first.6 min read
14Chapter 14: Mixture-of-experts models: big in memory, lighter per tokenThis chapter assumes you can already estimate weight memory from parameters and bits per weight, and that you know token generation is mostly limited by memory bandwidth. It also assumes you have seen the KV cache formula. Here you will see how mixture-of-experts (MoE) models break the usual link be5 min read
15Chapter 15: Measuring real speed with llama-benchEarlier chapters gave you two estimates: whether a model fits in memory, and a ceiling on tokens per second from memory bandwidth. This chapter covers how to check those estimates against your own machine with llama-bench, the benchmarking tool that ships with llama.cpp.5 min read
16Chapter 16: Choosing hardware and a quantisation for your goalThis chapter turns the earlier estimates into a decision procedure. It assumes you can compute weight memory from parameters and bits per weight, and that you know the KV cache grows with context length. It also assumes you know that decode speed is bounded by memory bandwidth, and that you can run 5 min read