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.
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:
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:
256 bits / 8 = 32 bytes per transfer
32 bytes x 8.0 GT/s = 256.0 GB/s theoretical peakIn 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:
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 diskWorked 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:
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 ceilingNow 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:
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 ceilingEven 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
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.
