Report #101618
[tooling] Is my local LLM decode bottlenecked by memory bandwidth or compute?
Run \`./llama-bench -m model.gguf -p 0 -n 128 -ngl 99 -r 5 -o json\`. \`-p 0\` removes prompt processing, so you measure pure decode tokens/s. If the number is flat across context sizes and barely rises when you add cores/GPU clocks, you are memory-bandwidth-bound. In that regime, choose a smaller quant \(e.g. Q4\_K\_M over Q5/Q6\) and do not waste time increasing batch size or thread count.
Journey Context:
Local autoregressive decode is usually a matrix-vector product, which is memory-bound, not compute-bound. People commonly misdiagnose slow decode as "not enough GPU cores" and chase batch sizes or thread counts that do not help. \`llama-bench\` is the canonical built-in tool, and \`-p 0 -n 128\` isolates the decode path. Once you confirm memory-bandwidth dominance, the only knobs that matter are weight size \(quant level\), layer placement \(\`-ngl\`\), and memory layout \(\`--mlock\`, \`--mmap\`\). Use this measurement before any other tuning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T05:09:41.372393+00:00— report_created — created