Skip to content

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

Share

llama.cpp x AMD Benchmarks banner from the ggml-org Hugging Face blog, showing the dashboard prompt-processing chart
ggml-org / Hugging Face, Introducing the llama.cpp benchmark dashboard for AMD Ryzen and Radeon (blo
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.

Setup behind the llama.cpp x AMD dashboard, read from the workflow files and the b12765 records on Nov 27, 2026
Settinggfx1151gfx1201
GPU in the recordsRadeon 8060S Graphics (integrated)Radeon AI Pro R9700S
Host CPU in the recordsRyzen AI Max+ 395EPYC 9655 96-core
BackendROCmROCm
BinaryPrebuilt llama-install.sh buildPrebuilt llama-install.sh build
Standard testspp512 and tg128, depth 0, Flash Attention 0 and 1, 10 repsSame
Context sweeptg128 at depth 512 to 32,768, doublingSame
Layers on GPU / KV cache typeAll (-ngl -1) / f16All (-ngl -1) / f16
Schedule in workflow fileWeekly, Wednesday 00:00 UTCWeekly, Wednesday 00:00 UTC
Source: ggml-org llama-install.sh workflow files and b12765 JSONL records, checked Nov 27, 2026. A scheduled workflow does not guarantee that every job ran.

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.

llama-bench at depth 0, Q4_K_M, Flash Attention on, Radeon 8060S (gfx1151), build b12765. Tokens per second
ModelTypeFile sizepp512tg128
Qwen3.6-27BDense15.7 GiB37612.6
Qwen3.6-35B-A3BMixture of experts20.6 GiB1,68555.2
gemma-4-26B-A4B-itMixture of experts15.8 GiB1,83249.6
gpt-oss-20bMixture of experts10.8 GiB1,86179.6
gpt-oss-120bMixture of experts58.4 GiB96354.9
Source: ggml-org llama.cpp x AMD benchmark records, build b12765, runs dated Nov 26, 2026, read from the public bucket on Nov 27, 2026. Means of 10 repetitions. Metarix did not re-run these benchmarks.

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.

Qwen3.6-27B on Radeon AI Pro R9700S (gfx1201), depth 0, Flash Attention on, build b12765. Tokens per second
QuantFile sizepp512tg128
Q4_K_M15.7 GiB1,24130.8
Q6_K21.0 GiB81024.2
Q8_026.6 GiB1,54119.9
Source: ggml-org llama.cpp x AMD benchmark records, build b12765, runs dated Nov 26, 2026, read from the public bucket on Nov 27, 2026. Means of 10 repetitions. Metarix did not re-run these benchmarks.

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.

Line charts of llama-bench generation speed versus context depth with Flash Attention on and off for gpt-oss-20b and gemma-4-26B-A4B on Radeon 8060S
Generation speed as context grows, Flash Attention on and off, Radeon 8060S, Q4_K_M, build b12765. Chart: Metarix, Nov 27, 2026, from ggml-org's published records; not a Metarix measurement.

Scroll the table horizontally on smaller screens.

tg128 by context depth, gpt-oss-20b Q4_K_M, build b12765. Tokens per second
Context depth8060S FA off8060S FA onR9700S FA offR9700S FA on
076.579.6155.9162.8
4,09660.376.4125.6156.6
16,38437.968.785.2144.7
32,76822.161.157.7132.2
Source: ggml-org llama.cpp x AMD benchmark records, build b12765, runs dated Nov 26, 2026, read from the public bucket on Nov 27, 2026. Means of 10 repetitions. Metarix did not re-run these benchmarks.

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.

Estimated seconds per answer, 500 output tokens, Radeon 8060S, Q4_K_M, build b12765. Metarix arithmetic on published records
Model8k prompt, FA off8k prompt, FA on32k prompt, FA off32k prompt, FA on
gpt-oss-20b14.711.141.625.4
Qwen3.6-35B-A3B16.114.239.229.7
gemma-4-26B-A4B-it20.116.145.530.4
Qwen3.6-27B67.962.6184.3132.6
Inputs: pp512 at depth 0 and the tg sweep, ggml-org records dated Nov 26, 2026, read Nov 27, 2026. Prefill is taken at its depth-0 rate, so real long-prompt times will be higher. Excludes model load, tokenization, sampling and server overhead. Metarix did not run these models.

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 jsonl
llama-bench -hf unsloth/gpt-oss-20b-GGUF:Q4_K_M -fa 0,1 -r 10 -p 0 -n 128 -d 512-32768*2 -o jsonl
llama-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

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.

Share

Related on Metarix