How we calculate
Every number on this site comes from one of three places: a file size or price read from the provider, a measurement someone published, or a formula on this page. Where a number is a formula, the page says so and shows how far that formula lands from real measurements.
Memory
A model fits when weights, KV cache and runtime overhead together stay below the memory the GPU or Mac can use for inference.
required = weights + KV cache + overhead
Weights are the size of the published file, not parameters times bits. For 134 of 167 models the sizes come from the Ollama registry or the Hugging Face repository that ships the build. Only where no build exists is the size derived from the parameter count, and the result is labelled as an estimate.
A few models ship a large lookup table next to the network, such as the 20.5B n-gram embeddings of Qwen 4. A token reads only a handful of its rows. llama.cpp reads those rows from disk on demand, so for llama.cpp the table is measured in each published file and left out of the memory total. Every other runtime is sized with the whole file.
KV cache follows the attention layout in the model's config.json: two tensors per layer, each KV heads × head dimension wide, 2 bytes per value, for every token of context. Sliding-window layers, latent attention and hybrid layouts are counted the way llama.cpp stores them. Where a layout is not documented, the figure is marked approximate.
Overhead is 0.75 GB per GPU for the runtime plus 4.5% of the weights for activation buffers, capped at 4.5 GB.
Usable memory is lower than the number on the box. Discrete GPUs lose a little to the driver and display. Macs give the GPU roughly 70% to 80% of unified memory by default, which is the limit we size against.
Speed
Generating a token reads every active weight once, so memory bandwidth sets the ceiling. Two things pull real numbers below it: a fixed cost per token that does not shrink with the model, and, on the fastest cards, compute that cannot keep up with the memory.
tokens/s = 1 ÷ (GB read per token ÷ effective bandwidth + overhead per token)
The parameters are fitted separately for each hardware family against 218 published llama.cpp measurements on 78 GPUs and chips. Mixture-of-experts models read their active experts plus a small share of the rest.
| NVIDIA GPUs | 89 | 8.6% | ±16.4% | 1.4 ms |
| AMD GPUs | 17 | 9.8% | ±16.2% | 2.0 ms |
| Apple Silicon | 112 | 5.1% | ±11.6% | 4.8 ms |
Each speed carries one of three labels:
- Measured. This exact model, quantization and hardware was benchmarked. We show the measurement with ±8% for run-to-run and version differences.
- Calibrated. The hardware has published measurements with other models, and the estimate is scaled to them. Predicting each measurement from the others on the same device lands within ±11.0% in 80% of 177 cases, with a median error of 4.9%. The range shown is ±15%, or ±25% for mixture-of-experts models.
- Estimate. No measurement covers the setup: the hardware has none, the runtime is MLX or vLLM, or part of the model spills into system RAM. The range is ±25% to ±40%.
Splitting a model across several GPUs adds memory, not speed: the measurements show 3% to 9% less than a single card, depending on the number of cards. All figures are for one request at a time with a short prompt. A context that is nearly full reads a larger KV cache and runs 10% to 30% slower.
| llama.cpp CUDA scoreboard | CUDA | 26 | 2026-11-28 |
| llama.cpp Vulkan scoreboard | Vulkan | 14 | 2026-11-30 |
| llama.cpp ROCm scoreboard | ROCm | 9 | 2026-11-28 |
| llama.cpp Apple Silicon scoreboard | Metal | 96 | 2026-11-29 |
| llama.cpp gpt-oss guide | llama.cpp | 15 | 2026-09-29 |
| GPU Benchmarks on LLM Inference (Xiongjie Dai) | llama.cpp | 58 | 2024-05-01 |
Cost
All three paths are compared per million tokens at the daily volume you set, with 75% input and 25% output tokens. Input tokens are processed about 10 times faster than output tokens are generated.
- API. OpenRouter list prices for input and output tokens, weighted by that split. Free and batch variants are ignored.
- Rented GPU. The cheapest offer that holds the model, billed for the hours the volume needs plus 20% for start-up and idle time. RunPod and Vast.ai prices are read from their APIs; for Vast.ai we use the median of the five cheapest verified on-demand offers.
- Your own hardware. Electricity at $0.18 per kWh for 75% of the rated power while generating, plus 90 W for the rest of a PC. The purchase price, including a host system for discrete GPUs, is written off over 36 months.
The break-even volume is the daily token count above which your own hardware, including its write-off, costs less than the API. If the hardware cannot generate that many tokens in a day, there is no break-even and the page says so.
Data and freshness
Model sizes, architectures, API prices, GPU rental prices and benchmark scores are fetched by a sync job, last run on 2026-11-30. Sources: the Ollama registry and Hugging Face for sizes and architectures, OpenRouter for API prices, RunPod and Vast.ai for rental prices, and Artificial Analysis for the Intelligence Index. Hardware specifications and street prices are maintained by hand.
What the numbers do not cover
- Serving many requests at once. Batching raises total throughput well above the single-request speed shown here.
- MLX and vLLM speeds. The measurements are llama.cpp runs, so other runtimes are labelled as estimates.
- Time to first token, which depends on prompt length and whether the model is already loaded.
- Quantizations below 4 bits, which trade noticeable quality for memory.
Found a number that is off? The same calculation is available as JSON for checking against your own run: llms.txt and API.