96 pairs, every number computed
Can I run this LLM on this GPU? 12 models on 8 GPUs
Pick a model and a GPU to see whether it fits, in which number format, how many people can use it at once, how fast it writes at best and what a million tokens cost on a rented card. Every page is worked out from the model's own config file and NVIDIA's datasheet, with the assumptions written down, and links to the lesson that teaches the sum.
Every model on every GPU
"Yes, in BF16" means it fits on one card in its full 16-bit format. "Only" means it fits on one card after quantizing. "Needs N GPUs" is the smallest split that holds one conversation of 8,192 tokens.
How the sums work
Every page uses the maths of the free GPU memory calculator and is taught step by step in Hands-On Inference Engineering, starting with these lessons:
- The KV cache (free to read)
- Sizing GPU memory
- Why writing is limited by memory speed
- Cost per million tokens
Or learn by playing the free inference engineering game.
Questions people ask
How do I know if a model will fit on my GPU?
Add the weights (parameters times bytes per weight), the KV cache (bytes per token times tokens times people) and about 2 GiB of working space, and compare it with the share of memory your engine uses: 92% by default in vLLM. Each page in this table does that sum with the model's real config file.
Why does a model that fits still serve so few people?
Because the KV cache grows with every token of every conversation. A model whose weights just fit leaves almost nothing for the cache, so only one or two long conversations fit. Quantizing the weights or the cache, or a bigger GPU, makes room.