Asked about Making generation faster
How would you work out the fastest a model could possibly generate on a given GPU?
An answer that works
At batch size one, each token requires reading every weight, so divide the weight bytes by the memory bandwidth. An 8B model at 16-bit is 16 GB, and on a 2 TB/s card that is 8 ms per token, about 125 tokens per second, before the KV cache reads and any inefficiency. Quantizing to 4-bit cuts the bytes by four and raises the ceiling by roughly the same factor.
Then they push further
What changes at batch size 64?
The weight read is amortised across 64 sequences, so total throughput rises nearly linearly while each sequence's token rate holds up until the batch becomes compute-bound. What limits it first is usually KV cache memory, not arithmetic.
Reading an answer is not being able to give one. The section that teaches this is Making generation faster, 5 hours of Quantization & inference optimisation.
Learn this properlyAlso asked about Quantization & inference optimisation