Skip to content

Prefill vs Decode — Token Speed Realities

prefill is compute-bound (big batched matmul); decode is bandwidth-bound (one token = stream every weight once). The gap is enormous: RTX 5090 does ~14,000 tok/s prefill vs 290-300 tok/s decode.

Two numbers matter and they bottleneck on different resources (presenc.ai):

  • Prompt processing (prefill) is compute-bound — it's a big batched matmul over the whole prompt.
  • Token generation (decode) is memory-bandwidth-bound — one token requires streaming every weight once, so tok/s ≈ memory bandwidth ÷ model size.

The gap is enormous. On Llama 2 7B the llama.cpp scoreboard shows the RTX 5090 processing prompts at ~14,000–15,000 tok/s while generating at 290–300 tok/s; the M5 Max does 3,220 prefill vs 119.9 decode. DGX Spark processes Llama 3.1 8B prompts at 7,614 tok/s under Ollama but generates Llama 3.1 70B at only 4.4 tok/s. For agent and RAG workloads with long context, prefill is the bottleneck and CUDA hardware keeps an advantage (presenc.ai).

Published generation speed, 2026 (presenc.ai) — compare within a row, not across, since backends and quants differ:

Model / test RTX 5090 (32 GB) DGX Spark (128 GB) Mac Studio M5 Max M5 Ultra
Llama 2 7B Q4_0, llama.cpp 290–300 — 119.9 —
Llama 3.1 8B Q4_K_M, Ollama 150.0 38.0 — —
gpt-oss 20B, Ollama 205 49.7 — —
Gemma 3 27B Q4, Ollama 47.3 10.8 — —
32B class, Ollama 57.2 (QwQ 32B) 9.4 (Qwen3 32B) — —
Llama 3.1 70B, Ollama does not fit (Q4 ≈ 43 GB > 32 GB) 4.4 — 40–52 (unverified)
gpt-oss 120B, llama.cpp does not fit 60.6 (40.6 @ 32K) — —

Useful thresholds: >30 tok/s feels interactive for chat, 8–30 is batch/patient-user territory, <8 is impractical for anything a person waits on (presenc.ai). Also note DGX Spark's split personality — its 273 GB/s bandwidth makes it slow on large dense models (4.4 tok/s on 70B) but fast on large sparse MoE models (60.6 tok/s on gpt-oss 120B), because MoE only reads a fraction of the weights per token. Mixture-of-experts broke the old intuition that parameter count predicts speed (codingprotocols.com).

Reasoning models deserve a separate mental model: a 32B-class model emitting 2,000 thinking tokens plus a 200-token answer takes ~38 s on an RTX 5090 (57.2 tok/s) but ~234 s on a DGX Spark (9.4 tok/s).

An independent GPU speed ladder, Qwen3 8B Q4_K @ 16K context (modelfit.io):

GPU VRAM Est. tok/s GPU VRAM Est. tok/s
RTX 5090 32 GB 145 RTX 5070 Ti 16 GB 87
RTX PRO 6000 96 GB 145 RTX 3090 24 GB 87
RTX 4090 24 GB 104 RTX 4080 SUPER 16 GB 79
RTX 5080 16 GB 94 RTX 4070 Ti SUPER 16 GB 72
RTX 5070 12 GB 59 RTX 5060 Ti 16 GB 51

Sources

Date: 2026-10-09