AI Hardware6 min read

Memory Bandwidth Math for Local LLMs: Deriving Token Speed Ceilings Before You Buy

How memory bandwidth, active parameter counts, quantization footprints, and KV cache reads set a strict physical ceiling on local LLM token generation speed.

Single-user LLM token generation is strictly memory-bandwidth bound: the hard speed ceiling equals sustained memory bandwidth divided by active model bytes read per generated token, adjusted for DRAM controller efficiency (~84% on LPDDR5X) and growing KV cache reads.

Key takeaways

  • Always divide real sustained bandwidth by active weight bytes plus KV cache bytes before purchasing hardware.
  • Do not trust NPU or FP4 TOPS marketing numbers to predict interactive single-stream generation speed.
  • MoE models bypass the single-user bandwidth ceiling of 128 GB unified memory boxes by leaving ~95% of weights idle per step.
  • Long prompts shrink effective decode speed because the entire KV cache must be re-read on every generated token.

Quick facts

  • Tokens per second ceiling equals effective memory bandwidth divided by active model bytes per token.
  • LPDDR5X-8000 delivers roughly 212 to 215 GB/s sustained against a 256 GB/s theoretical spec (~84% efficiency).
  • Dense 70B models at Q4_K_M (~42.5 GB) hit a physical wall near 5 to 6.4 tok/s on 256 to 273 GB/s buses.
  • Sparse MoE models like gpt-oss-120b only stream ~5.1B active parameters (~3.4 GB) per token, unlocking 10x higher ceilings.
  • Prompt processing (prefill) saturates matrix compute cores (FLOPS), whereas autoregressive decode saturates DRAM pins.

Most hardware marketing for local AI pushes tera-operations per second (TOPS) or peak FP4 petaflops on the front of the box. Yet when you sit down to stream a reply from a local language model for a single user, those massive matrix compute numbers barely get warm. Autoregressive text generation reads almost every active byte of the neural network from memory just to emit one token, so the bottleneck lives on the memory traces, not inside the ALU cores.

Doing two minutes of back-of-the-envelope division before buying hardware saves thousands of dollars in mismatched expectations. I use the same plain-text formula every time I evaluate a GPU card or unified-memory workstation.

Horizontal chart comparing memory bandwidth and derived decode speed ceilings for dense 70B versus MoE 3.4 GB active weight passes across 2026 local AI platforms
Horizontal chart comparing memory bandwidth and derived decode speed ceilings for dense 70B versus MoE 3.4 GB active weight passes across 2026 local AI platforms

Original diagram by Ajay Kumar Chaturvedi using vendor bandwidth specifications (Apple, NVIDIA, AMD), Ars Technica GeForce RTX 5090 specifications, and DataHardware sustained LPDDR5X measurements.

The Two Phases of Local Inference

Transformer inference splits cleanly into two hardware-bound regimes, and mixing them up leads directly to buying the wrong machine.

Phase 1: Prompt Processing (Prefill)

When you paste a 4,000-token codebase or document into a prompt, the runtime multiplies all 4,000 token vectors against each weight matrix in parallel. Because one weight fetch from memory gets reused across thousands of token vectors in the same matrix tile, arithmetic intensity is high. Prefill is compute-bound: tensor cores, matrix units, and cooling power determine whether a prompt clears in half a second or drags on for twenty seconds.

Phase 2: Token Generation (Decode)

Once the prompt finishes processing, the model generates its reply one token at a time. Each new token passes through every transformer block sequentially, and the next token cannot begin until the current token finishes sampling. At batch size 1, you fetch a multi-gigabyte matrix from DRAM just to multiply it by a single vector. Arithmetic intensity collapses, the tensor cores spend most of their clock cycles stalled waiting on data, and memory bandwidth sets an unbreakable physical speed limit.

Deriving the Decode Speed Ceiling

In plain arithmetic, if every generated token must stream the active weights once across the memory bus, the maximum possible generation rate is:

TEXT
decode ceiling (tok/s) = sustained memory bandwidth (GB/s) / active bytes read per token (GB)

Notice the two words that trip people up: sustained bandwidth (not theoretical pin math) and active bytes (not always total disk file size).

Spec Bandwidth vs Real Sustained Bandwidth

Vendors advertise theoretical peak bus bandwidth: bus width in bits divided by 8, multiplied by MT/s transfer speed. For a 256-bit LPDDR5X-8000 interface (like AMD Ryzen AI Max+ 395), pin math yields:

TEXT
256 bits / 8 = 32 bytes per transfer
32 bytes x 8.0 GT/s = 256.0 GB/s theoretical peak

In real DRAM controllers, page misses, refresh cycles, and SoC fabric arbitration consume roughly 15% to 20% of that theoretical ceiling. Memory bandwidth testing published by DataHardware in September 2026 measured sustained practical throughput on a 256-bit LPDDR5X-8000 Strix Halo desktop at 212 to 215 GB/s, or about 84% efficiency. Applying that same 84% multiplier to NVIDIA DGX Spark's 273 GB/s LPDDR5X-8533 theoretical bus gives roughly 229 GB/s of usable memory streaming headroom before kernel launch overhead.

By contrast, dedicated GDDR6X and GDDR7 controllers on discrete GeForce cards and Apple's wide on-package buses typically sustain a higher fraction on pure sequential streaming, though small-model tests still hit kernel-launch latency well below theoretical peaks.

Weight Size by Quantization Format

Before dividing, convert parameter count into actual bytes in memory. A 16-bit BF16 model stores 2 bytes per parameter, an 8-bit Q8_0 file stores roughly 1.06 bytes per parameter after block scales, and a 4-bit Q4_K_M GGUF averages about 4.85 bits (roughly 0.61 bytes) per parameter:

TEXT
Llama 3.3 70B at Q4_K_M  -> ~42.5 GB on disk
Llama 3.1 8B at Q4_K_M   -> ~4.9 GB on disk
Llama 2 7B at Q4_0       -> ~3.82 GB on disk

Worked Arithmetic: Dense 70B vs 120B MoE

Plug a dense 70B Q4_K_M model (42.5 GB) into the formula across four common memory buses:

TEXT
Strix Halo (215 GB/s sustained):   215 / 42.5 = 5.06 tok/s ceiling
DGX Spark (273 GB/s theoretical):  273 / 42.5 = 6.42 tok/s ceiling (~5.39 tok/s at 84%)
Mac mini M5 Pro (307 GB/s spec):   307 / 42.5 = 7.22 tok/s ceiling
Mac Studio M5 Max (614 GB/s spec): 614 / 42.5 = 14.45 tok/s ceiling
Mac Studio M5 Ultra (1,200 GB/s):  1,200 / 42.5 = 28.24 tok/s ceiling

Now contrast that with a sparse Mixture-of-Experts (MoE) model such as gpt-oss-120b in MXFP4. While the file demands roughly 63 to 65 GB of memory capacity, the router activates only 5.1 billion parameters for any single token. At roughly 0.55 to 0.65 bytes per parameter with scales and shared attention layers, each token only needs to stream roughly 3.2 to 3.4 GB from RAM:

TEXT
Strix Halo (215 GB/s sustained):   215 / 3.4 = 63.2 tok/s ceiling
DGX Spark (229 GB/s @ 84%):        229 / 3.4 = 67.4 tok/s ceiling (80.3 at 273 GB/s peak)
Mac Studio M5 Max (614 GB/s):      614 / 3.4 = 180.6 tok/s ceiling

Even after subtracting router branching overhead, kernel launches, and KV cache traffic, sparse MoE turns a sub-5 tok/s unified memory machine into a fast 50+ tok/s conversational rig without changing a single memory trace on the motherboard.

Why Real Runs Miss the Theoretical Ceiling

Diagram comparing per-token memory traffic between a dense 70B model and a sparse MoE model including KV cache growth
Diagram comparing per-token memory traffic between a dense 70B model and a sparse MoE model including KV cache growth

Original diagram by Ajay Kumar Chaturvedi illustrating active weight traffic, KV cache expansion, and kernel overhead per generated token.

I always shave another 10% to 25% off clean weight-only division when predicting real interactive speeds, for three architectural reasons.

1. KV Cache Traffic Scales With Context Length

Model weights stay constant while you read or generate text, but the key-value (KV) cache grows linearly with every token in the conversation window. During attention, each newly generated token must read the cached keys and values of every prior token in the sequence. On an MoE model whose active weights are only ~3.4 GB per step, a few gigabytes of FP16 KV cache at 32K context doubles the memory traffic per token. Quantizing the KV cache (Q8_0 or FP8) cuts both memory footprint and bandwidth pressure in half, which matters far more on 215 to 273 GB/s machines than most buyers realize.

2. Small-Model Launch Latency Floor

When a model is tiny, DRAM fetches finish faster than GPU kernel launches, synchronization barriers, and CPU sampling loops. On an RTX 5090 (1,792 GB/s), raw division on a 3.82 GB Llama 2 7B Q4_0 file suggests 1,792 / 3.82 = 469 tok/s, yet published runs hit around 290 tok/s because each weight pass only takes ~2.1 ms while kernel scheduling and layer barriers take over a millisecond of their own. Above ~14B dense weights, kernel overhead shrinks relative to memory transfer time and real numbers track bus bandwidth much more tightly.

3. Batching Breaks the Single-User Rule

Everything above assumes batch size 1. If four users or agent sub-loops query the same model simultaneously inside a continuous-batching server, the engine reads the weight matrices once and multiplies them against four token vectors together. Bandwidth efficiency multiplies almost linearly with active batch size until the compute cores finally catch up and turn decode compute-bound too.

Practical Buying Rules From the Math

If I were sizing a machine strictly from this equation, I would skip any 256 to 273 GB/s box if my daily workload requires dense 70B models for interactive chat, because 5 tok/s feels sluggish for back-and-forth editing. Instead, pair a 256-bit unified memory system with sparse MoE models or smaller dense 14B to 32B models, or step up to a 614 GB/s M5 Max or 1,200 GB/s M5 Ultra when dense 70B interactivity is non-negotiable. Conversely, if every model you run fits inside 24 to 32 GB, nothing on a unified bus touches an RTX 4090 or RTX 5090 per token generated.

Sources