Benchmarks · Benchmark
llama.cpp Benchmarks Explained: Reading pp512 and tg128
llama-bench's pp512 and tg128 are measured with an empty context. On ggml-org's AMD dashboard, gpt-oss-20b's generation speed falls from 76.5 to 22.1 tokens/s at 32k context with Flash Attention off, against 61.1 with it on.
Pavel Holmgren · Nov 27, 2026 · 9 min read

On this page
On ggml-org's new llama.cpp x AMD dashboard, gpt-oss-20b at Q4_K_M generates 79.6 tokens per second with Flash Attention on and 76.5 with it off. That is tg128 at context depth 0, on a Ryzen AI Max+ 395 with Radeon 8060S graphics, llama.cpp build b12765, run on Nov 26, 2026. Put 32,768 tokens in the context first and the same pair reads 61.1 and 22.1.
The headline numbers are real, but they describe an empty conversation. This explainer reads the dashboard's own public records, the context sweep included, and turns pp512 and tg128 into seconds per answer at 8,000 and 32,000 prompt tokens. Then it lists the comparisons the board does not support.
Figures below come from the public results bucket behind the dashboard, checked on Nov 27, 2026. Metarix did not re-run the benchmarks; the arithmetic on top of them is ours.
What pp512 and tg128 measure
Both tests come from llama-bench, the benchmark tool that ships with llama.cpp. Each reports tokens per second, averaged over repeated runs.
- pp512 (prompt processing): the model reads a 512-token prompt and generates nothing. This is the prefill phase, the wait before the first output token.
- tg128 (text generation): the model generates 128 tokens with no prompt in front of them. This is the decode phase, the speed at which an answer streams.
- n_depth: how many tokens already sit in the KV cache before the test starts. The dashboard's Overview charts use depth 0 for both tests.
- avg_ts: the plotted value, the mean of the repetitions. The records also carry the standard deviation and every individual sample.
Two details in the llama-bench README matter for reading the results. The measurements exclude tokenization and sampling. And every test is a single sequence, so there is no batching across users and no HTTP server in the loop.
The two numbers sit far apart because the phases stress different parts of the machine. Prefill processes hundreds of tokens at once and keeps the GPU's compute units busy. Decode produces one token at a time and mostly waits on memory, since the weights must be read again for every token. So a quantization that shrinks the file tends to speed up tg, while pp depends more on how well the compute kernels for that format run on the card.
How the AMD dashboard runs its tests
The announcement and the two workflow files (gfx1151, gfx1201) fix most of the method. AMD provided the test machines and helped validate the setup, according to the post.
Scroll the table horizontally on smaller screens.
| Setting | gfx1151 | gfx1201 |
|---|---|---|
| GPU in the records | Radeon 8060S Graphics (integrated) | Radeon AI Pro R9700S |
| Host CPU in the records | Ryzen AI Max+ 395 | EPYC 9655 96-core |
| Backend | ROCm | ROCm |
| Binary | Prebuilt llama-install.sh build | Prebuilt llama-install.sh build |
| Standard tests | pp512 and tg128, depth 0, Flash Attention 0 and 1, 10 reps | Same |
| Context sweep | tg128 at depth 512 to 32,768, doubling | Same |
| Layers on GPU / KV cache type | All (-ngl -1) / f16 | All (-ngl -1) / f16 |
| Schedule in workflow file | Weekly, Wednesday 00:00 UTC | Weekly, Wednesday 00:00 UTC |
The explorer's code also notes that prompt-processing sweeps are retired, so pp is only shown at depth 0. Keep that in mind for the worked example below: prefill on a long prompt will be slower than pp512 suggests, and the dashboard cannot tell you by how much.
One run, two rankings
At Q4_K_M with Flash Attention on, the five larger models on the Radeon 8060S read like this:
Scroll the table horizontally on smaller screens.
| Model | Type | File size | pp512 | tg128 |
|---|---|---|---|---|
| Qwen3.6-27B | Dense | 15.7 GiB | 376 | 12.6 |
| Qwen3.6-35B-A3B | Mixture of experts | 20.6 GiB | 1,685 | 55.2 |
| gemma-4-26B-A4B-it | Mixture of experts | 15.8 GiB | 1,832 | 49.6 |
| gpt-oss-20b | Mixture of experts | 10.8 GiB | 1,861 | 79.6 |
| gpt-oss-120b | Mixture of experts | 58.4 GiB | 963 | 54.9 |
The dense 27B model is the slowest here on both tests, despite a smaller file than Qwen3.6-35B-A3B. A mixture-of-experts model only reads its active experts for each token, so its decode speed tracks the active parameter count, not the size on disk.
Quantization ranks differently on the two tests. On the Radeon AI Pro R9700S, Qwen3.6-27B shows this pattern with Flash Attention on:
Scroll the table horizontally on smaller screens.
| Quant | File size | pp512 | tg128 |
|---|---|---|---|
| Q4_K_M | 15.7 GiB | 1,241 | 30.8 |
| Q6_K | 21.0 GiB | 810 | 24.2 |
| Q8_0 | 26.6 GiB | 1,541 | 19.9 |
Q8_0 is the fastest of the three at reading a prompt and the slowest at writing an answer. Q6_K is slower than both at prefill. So "Q8 is slower" is only true for decode on this card and build, and a pp-only chart would point you the wrong way for a chat workload.
gpt-oss is a special case. Every one of its GGUF files on the board, from Q3_K_S to Q8_0, is between 10.7 and 11.3 GiB. That fits how the model was released: OpenAI's model card says the MoE weights were post-trained in MXFP4, so the quant label mostly changes the remaining tensors. Picking a lower gpt-oss quant buys little memory.
Context depth changes the Flash Attention answer
At depth 0, turning Flash Attention on looks like a rounding error. The context sweep tells a different story.

Scroll the table horizontally on smaller screens.
| Context depth | 8060S FA off | 8060S FA on | R9700S FA off | R9700S FA on |
|---|---|---|---|---|
| 0 | 76.5 | 79.6 | 155.9 | 162.8 |
| 4,096 | 60.3 | 76.4 | 125.6 | 156.6 |
| 16,384 | 37.9 | 68.7 | 85.2 | 144.7 |
| 32,768 | 22.1 | 61.1 | 57.7 | 132.2 |
With Flash Attention off, gpt-oss-20b loses 71% of its generation speed between depth 0 and 32,768 on the 8060S. With it on, it loses 23%. The same holds in all 206 model-and-quant sweeps for build b12765 across both cards: with Flash Attention on, generation at 32,768 tokens is faster and keeps more of its depth-0 speed. The dense Qwen3.6-27B on the 8060S goes from 12.6 to 4.9 tokens per second with it off, and from 12.6 to 10.5 with it on.
llama-bench defaults to -fa auto, and so does llama-server. If you pin Flash Attention off for a compatibility reason, the depth-0 chart will not show you what that costs an agent with a long transcript.
From tokens per second to seconds per answer
A rough single-request estimate needs two published numbers: prompt tokens divided by pp512, plus answer tokens divided by tg at a depth close to your prompt length.
seconds ≈ prompt_tokens / pp512 + answer_tokens / tg(depth ≈ prompt_tokens)
Here is that sum for a 500-token answer on the Radeon 8060S, Q4_K_M. We used tg at depth 8,192 for the 8,000-token prompt and tg at 32,768 for the 32,000-token prompt.
Scroll the table horizontally on smaller screens.
| Model | 8k prompt, FA off | 8k prompt, FA on | 32k prompt, FA off | 32k prompt, FA on |
|---|---|---|---|---|
| gpt-oss-20b | 14.7 | 11.1 | 41.6 | 25.4 |
| Qwen3.6-35B-A3B | 16.1 | 14.2 | 39.2 | 29.7 |
| gemma-4-26B-A4B-it | 20.1 | 16.1 | 45.5 | 30.4 |
| Qwen3.6-27B | 67.9 | 62.6 | 184.3 | 132.6 |
Two things stand out. At 32k, Flash Attention cuts the gpt-oss-20b estimate by about 16 seconds, almost all of it in decode. And prefill becomes the larger share for the MoE models with Flash Attention on: about 17 of gpt-oss-20b's 25 seconds go to reading the prompt, at a rate that is already optimistic.
For a primer on where these phases show up in a hosted API, see LLM latency and throughput explained.
Comparisons this board does not support
- Across the two machines. The cards sit in different hosts (an APU that shares system memory with the CPU, against a discrete card in an EPYC server), with different thread counts. The R9700S workflow does not include gpt-oss-120b at all. Read each machine on its own.
- Across builds, without checking dates. On the R9700S, gpt-oss-20b's tg128 is 74.7 for build b10909 and 148.3 for b11160. The b10909 record is dated Sep 16, 2026, the b11160 record Nov 14, 2026. The files do not say whether the jump came from llama.cpp code or from drivers and ROCm on the test machine. On the 8060S, the same model's tg128 stays between 71.8 and 80.2, with either Flash Attention setting, across all 34 recorded builds, while pp512 with Flash Attention on rose from 1,493 at b9744 to 1,861 at b12765.
- Against serving benchmarks. A single-sequence llama-bench run is not comparable with vLLM or SGLang throughput, which aggregate many concurrent requests. For that kind of test, see how to benchmark LLM inference and the vLLM page.
- Against NVIDIA or Apple hardware. The board covers two AMD GPUs. A tg128 from another site used a different build, flags and machine. Treat a cross-vendor comparison of two published charts as a guess.
- On quality. The board measures speed only. A 3-bit quant that generates fast may answer worse; check task accuracy separately, as in how to read LLM leaderboards.
Memory is the other limit the charts skip. A file that fits leaves less room for the KV cache at long context; our memory troubleshooting guide covers that budget.
Reproduce the numbers on your own machine
The workflow files run llama-bench (as llama bench from the llama.app install) with the flags below. Run the same on your hardware to get a figure you can compare with the board, then add a test at your real prompt size:
llama-bench -hf unsloth/gpt-oss-20b-GGUF:Q4_K_M -fa 0,1 -r 10 -o jsonlllama-bench -hf unsloth/gpt-oss-20b-GGUF:Q4_K_M -fa 0,1 -r 10 -p 0 -n 128 -d 512-32768*2 -o jsonlllama-bench -hf unsloth/gpt-oss-20b-GGUF:Q4_K_M -fa 1 -p 8192 -n 0 -r 5
The third line measures prefill at 8,192 tokens, the number the dashboard no longer shows. Record the build number from the output with every result; a tokens-per-second figure without a build, a flag set and a depth is not a benchmark result you can reuse.
Take
Use pp512 and tg128 to shortlist a model and quant for your card, not to predict an agent's speed. Decide with the context sweep at the depth your prompts actually reach, keep Flash Attention on unless you have a measured reason not to, and estimate seconds per answer with the sum above before you buy hardware or pick a quant. If your prompts run past 8,000 tokens, run the extra -p 8192 test yourself, because that is the part of the wait this board does not chart. These are weekly snapshots tied to build b12765; recheck before Feb 25, 2027.
Sources
- ggml-org / Hugging Face: Introducing the llama.cpp benchmark dashboard for AMD Ryzen and Radeon, Nov 26, 2026
- llama.cpp x AMD Performance Explorer, checked Nov 27, 2026
- ggml-org install.sh-benches-data bucket, build b12765 records dated Nov 26, 2026, read Nov 27, 2026
- llama-install.sh bench workflow, gfx1151 and gfx1201
- llama-bench README, llama.cpp repository
- ggml-org: llama.cpp v1.0.0, Nov 13, 2026
- OpenAI gpt-oss-20b model card
Tools covered in this article
Frequently asked questions
- Does tg128 include the time to read the prompt?
- No. In llama-bench, tg128 generates 128 tokens with no prompt, and pp512 processes a 512-token prompt with no generation. To estimate a real request, add prompt tokens divided by the prefill rate to answer tokens divided by the generation rate, or run llama-bench with -pg to time both together.
- Does Flash Attention change the model's answers?
- It is not meant to. Flash Attention reorganises how attention is computed rather than approximating it, so outputs should match apart from small floating-point differences. On the AMD dashboard its main effect is speed at long context.
- How often is the dashboard updated?
- Both AMD workflows are scheduled weekly, on Wednesdays at 00:00 UTC, and can also be started by hand. The b12765 records Metarix read were timestamped Nov 26, 2026. A schedule does not guarantee that every model and quant ran that week, so check the build and date on the data you use.
- Why is pp512 so much higher than tg128?
- Prefill processes many prompt tokens in parallel, so it keeps the GPU's compute busy. Generation produces one token at a time and has to read the model weights from memory for each one, so memory bandwidth limits it. That is why the two numbers differ by more than an order of magnitude on the same run.