Skip to content
Peter Styk HPC & AI Platform Engineer

Reports · Qwen3.8-27B on one AMD Instinct MI300X · Mixed lengths, fast kernel

On the fast kernel a long prompt's bite takes one second, and the mix gets through

The mixed load with one setting changed: the attention kernel. While long prompts are read the engine makes a step a second, where the default kernel needed twenty seconds and more. All 16 long prompts are read. Decoding is still starved meanwhile.

Test
Mixed lengths, fast kernel
Run
20261125T215049Z-series-fa

Also as a one-minute video and a PDF of 6 pages.

01Overview

The same mix of short, medium and long prompts, with one setting changed: the attention kernel. On the default kernel a step that carried a bite of a long prompt took 20 to 33 seconds at 128 and 256 streams. On AMD's flash-attention kernel the engine makes 0.98 steps a second at 128 streams: a second a step. The server read every long prompt it was sent, 16 of them, and no request was left without a first token.

  • 0.98 engine steps a second at 128 streams, 0.88 at 256; the default kernel made 0.05 and 0.03
  • 8,696 prompt tokens read a second at 128 streams
  • 167 of 297 requests ended inside the plan; none was cut before its first token
  • 118.0 answer tokens a second at 256 streams, with 174 requests running at most
Answer tokens a secondthis run, each seconddefault kernelfast kernel (this run)8 streams32 streams128 streams256 streams0200400Engine steps a secondthis run, each seconddefault kernelfast kernel (this run)02550Prompt tokens read a second (counted when a prompt's reading ends)default kernelfast kernel (this run)010K0306090120150180210seconds since the plan started
Figure 1The four loaded minutes. Colour: this run, with its single seconds thin and grey behind the 7-second centred mean. Grey line: the run on the default kernel. In the first minute, with no long prompt in the mix, the fast kernel already makes almost twice the steps. In the minute at 32 streams this run's engine stood still for kernel builds.Source: plan-mixed-overlap/timeline.json of this run and of 20261125T201346Z-series

At 128 and 256 streams the server wrote 75.9 and 118.0 answer tokens a second and read 8,696 and 7,266 prompt tokens a second. On the default kernel those two minutes gave 1.6 and 1.1 answer tokens a second.

One setting differs from the grey run, but the two were not sent the same requests: a closed loop sends a faster server more. At 8 streams neither was sent a long prompt, at 128 and 256 both were sent six. At 32 streams this run was sent four and the other two: not like for like, and I write no ratio for it.

02How it was run

The machine, and the part that was changed

AMD Instinct MI300XQwen3.8-27B · vLLM 0.27.1streamsengine step0.98 a second at 128this testprefillbites of up to 8,192decodeone token per streamattentionROCM_AITER_FAthis testcachecompute unitsclientsCPU · 20 cores
Figure 2The card as every document in this series draws it. Attention is the code that lets each token look back over the context. This run sets it by hand to AMD's flash-attention kernel; everything else is the series run's.Source: FACTS.json; summary.json server.attention_kernel and plans.plan-mixed-overlap.stages[stage=mix-128]

What differs between the two runs

Attention kernel ROCM_AITER_FA here, by the --attention-backend setting; ROCM_ATTN in the run before, by vLLM's own preference order
Room in one engine step 8,192 tokens in both
Cache 1,734,958 token slots here; 1,826,476 before
The run before 20261125T201346Z-series

The fast kernel's server starts with 5.0% fewer cache slots. In this plan the cache fills only in the drain.

The plan

  1. Four stages of 60 seconds: 8, 32, 128, then 256 requests kept open. A new one starts only when one ends.
  2. Each request draws its prompt from a mix: 70% short (256 to 2,000 tokens), 25% medium (4,000 to 16,000), 5% long (32,000 to 64,000); answers of 64 to 1,024 tokens.
  3. Then 120 seconds with no new requests; what is still open after that is closed by the load generator.

Settings

Model Qwen3.8-27B: 27.8 billion parameters, BF16 weights, 262,144 tokens of context
Card one AMD Instinct MI300X: 304 compute units, 191.7 GiB of memory
Server vLLM 0.27.1+rocm723, ROCm 7.2.3, PyTorch 2.11.0+gitd0c8b1f
Machine a cloud GPU virtual machine: 20 virtual cores, Intel Xeon Platinum 8568Y+
This run 20261125T215049Z-series-fa, started 2026-11-25T21:51:02Z, server ready after 97 s
streams asked for832128256default kernel0266fast kernel0466darker = more: long prompts sent in that minute
Figure 3Long prompts sent in each minute, in both runs. Where the rows agree the two runs carried a like load in that minute; at 32 streams they do not.Source: plan-mixed-overlap/requests.jsonl of both runs (stage, asked_in)

The two runs were not sent the same requests: 297 here, 270 before. Request number N has the same lengths in both, and a faster server gets further down the list. How many requests ended inside the plan is a fact about each run, not a ratio between them.

One engine step, default kernel: room for 8,192 tokensstreams that are answeringeach takes one token of the stepa prompt being readtakes what is left: a bite of upto 8,192 tokensthe step ends20.00 s later at 128 streams: onemore token for every streamthe lineeverything else waits for thenext stepOne engine step, fast kernel: room for 8,192 tokensstreams that are answeringeach takes one token of the stepa prompt being readtakes what is left: a bite of upto 8,192 tokensthe step ends1.02 s later at 128 streams: onemore token for every streamthe lineeverything else waits for thenext step
Figure 4What one engine step holds on the two kernels: the same room, a very different time. The time is computed: one second divided by the engine steps a second at 128 streams.Source: each run's summary.json (config, plans.plan-mixed-overlap.stages[stage=mix-128].engine_steps_per_s); FACTS.json

03Stage by stage

Minute by minute, on the two kernels

a second in which at least one answer token left the servera second with none, for anyone8 streams, default kernel7 of 60 silent8 streams, fast kernel0 of 60 silent32 streams, default kernel45 of 60 silent32 streams, fast kernel33 of 60 silent128 streams, default kernel57 of 60 silent128 streams, fast kernel5 of 60 silent256 streams, default kernel58 of 60 silent256 streams, fast kernel8 of 60 silent0102030405060seconds into the minute
Figure 5Every second of the four loaded minutes in both runs. The two rows at 32 streams are not like for like: this run was sent four long prompts and the other two, and this run's silent seconds there are the kernel builds and little else. At 128 and 256 streams hardly a second is silent on the fast kernel.Source: plan-mixed-overlap/timeline.json of both runs (output_tok_s per one-second row)
Answer tokens a second, all streams togetherdefault kernelfast kernel8 streams299.9128 streams75.9256 streams118.00100200300
Figure 6Answer tokens a second in the three minutes in which both runs were sent as many long prompts.Source: both runs' summary.json stages[].server_output_tok_s
Engine steps a second (log scale)default kernelfast kernel8 streams37.64128 streams0.98256 streams0.880.0100.100110100
Figure 7Engine steps a second in the same minutes. Every running stream gets one token per step.Source: both runs' summary.json stages[].engine_steps_per_s

The exact record of both runs

answer tokens/sprompt tokens/sengine steps/sseconds with no answer tokenrunning at mostwaiting at mostcache at most, %first token, median srequests sentcard, W
8 streams
default kernel158.81,06619.917 of 60803.70.6921413
fast kernel299.91,70137.640 of 60803.90.2639695
32 streams
default kernel6.31,1040.2445 of 60321813.55.5725505
fast kernel11.13,0950.4733 of 60302219.06.7725316
128 streams
default kernel1.69430.0557 of 60329614.9≥ 211.9396366
fast kernel75.98,6960.985 of 601259761.331.3096744
256 streams
default kernel1.100.0358 of 603222415.8≥ 179.91128303
fast kernel118.07,2660.888 of 6017413191.865.19137746
drain: no new requests
default kernel14.22,2040.2493 of 1219622437.8-0359
fast kernel744.84,5274.139 of 12120774100.0-0750

From each run's summary.json; seconds with no answer token are counted from its timeline.json. Tinted rows are this run. The two rows at 32 streams are not like for like (four long prompts against two, and this run's kernel builds). A stage row spans 59 s of its 60 s. The server counts a prompt's tokens when its reading ends. Running and waiting are the server's gauges, which move only when a step ends.

04The mechanism

The same bite in a second instead of twenty, and still one token per step

Seconds per engine step: default kernel832128256drain0.01 s0.1 s1 s10 s100 s060120180240300360seconds since the plan started
Figure 8Default kernel: from the moment a long prompt is read, a step takes seconds, then tens of seconds.Source: timeline.json of 20261125T201346Z-series (steps_s)
Seconds per engine step: fast kernel832128256drain0.01 s0.1 s1 s10 s100 s060120180240300360seconds since the plan started
Figure 9Fast kernel: a step takes about a second while prompts are read, less in the drain. Computed from the step counter: one second divided by the steps in it, or the seconds since the last step.Source: plan-mixed-overlap/timeline.json (steps_s)

In the two minutes at 128 and 256 streams the engine made 59 and 53 steps. The default kernel made 3 and 2.

vLLM's estimate of the compute at 256 streams is 550 TFLOPS, 42.3% of AMD's stated peak, with the card at 746 W. On the default kernel the same minute read 26.6 TFLOPS at 303 W.

My reading: decoding is still starved above 8 streams. Each engine step carries a bite of up to 8,192 prompt tokens that takes about a second even on this kernel, and every decoding stream gets one token per step. With 125 requests running, 75.9 answer tokens a second is less than one token a second each.

The heading's "twenty" is one second divided by the default kernel's steps a second at 128 streams: 20 s. Over the two minutes at 128 and 256 streams the fast kernel made 22.3 times the steps. The two servers were sent as many long prompts in those minutes, but did not carry the same backlog into them.

Answer tokens a second, each secondkernel build, 21.7 s0200Engine steps in the second024Engine process, CPU cores in use024Card power, watts (AMD's exporter)050060708090100110120130seconds since the plan started (the 32-stream minute runs from 60 to 120)
Figure 10This run from second 56 to 132, without smoothing. Shaded: the seconds in which the engine process used no CPU. The card fell to idle power in the same seconds, and the server's log reports a kernel build of that length for each: attention kernels built on first use.Source: plan-mixed-overlap/timeline.json; server.log ("[aiter] finish build ... cost")

The 11.1 answer tokens a second of the 32-stream minute are not what this setting gives: in 27 of its seconds the engine was building kernels (21.7, 3.8 and 3.7 s by its log), a cost paid once. In the seconds it worked it wrote 22.2 a second (computed).

05The requests

What the clients saw

Every request: default kernelat 8: 21at 32: 25at 128: 96at 256: 128832128256drain060120180240300360seconds since the plan started
Figure 11Every request of the run on the default kernel as one line, in the order sent. Violet: no answer token yet. Blue: answering. Green dot: ended well. Black dot: a long prompt.Source: requests.jsonl of 20261125T201346Z-series
Every request: fast kernelat 8: 39at 32: 25at 128: 96at 256: 137832128256drain060120180240300360seconds since the plan started
Figure 12The same for this run. Every request gets its first token, and lines end in green all the way down. Two pictures of two runs, not a ratio: the runs were sent different requests.Source: plan-mixed-overlap/requests.jsonl (t_sent, t_first, t_end, end)
requests sentlong prompts among themfirst token, median slongest, sended inside the plancut while answeringcut before a first token
sent at 8 streams
default kernel2100.75.01470
fast kernel3900.31.73900
sent at 32 streams
default kernel2525.6188.30250
fast kernel2546.871.915100
sent at 128 streams
default kernel966209.8236.006333
fast kernel96631.393.659370
sent at 256 streams
default kernel1286--00128
fast kernel137665.2146.454830
all requests of the plan
default kernel27014187.2236.01495161
fast kernel2971643.6146.41671300

From each run's requests.jsonl. Tinted rows are this run. The median and the longest first-token time are over the requests that got a first token. "Ended inside the plan" is a fact about each run: the two were sent different requests.

Every one of the 297 requests got a first token. The 16 long prompts waited 46 to 146 s for theirs, and 7 of them ended inside the plan. A short prompt sent at 128 streams waited 15 to 49 s.

Requests "cut at the end of the plan" (130 here) are not refusals and not failures: the load generator closed them when the plan's time was over, all of them in the middle of an answer. All 297 requests got HTTP 200.

06Underneath, and what it means

A busy card, and in the drain a full cache

Card power, watts (AMD's exporter)default kernelfast kernel (this run)8 streams32 streams128 streams256 streamsdrain: no new requests0500Cache in use, %default kernelfast kernel (this run)050100Requests running (the server's gauge)default kernelfast kernel (this run)0100200060120180240300360seconds since the plan started
Figure 13Both runs over the whole plan. Grey: default kernel. Colour: this run. The card draws full power from the first minute on, except during the kernel builds. With prompts read this fast the cache fills, and in the drain it is full.Source: plan-mixed-overlap/timeline.json of both runs (watts, cache_percent, running)

In the drain the cache reached 100.0% with 207 requests running at most, and the server preempted 4 of them. With no new prompts to read, it wrote 744.8 answer tokens a second over those two minutes.

At 128 and 256 streams the card drew 744 and 746 W. On the default kernel it drew 366 and 303 W in those minutes, little more than idle.

What I take from it

  • On this kernel a step that carries a long prompt's bite takes about a second. Every request gets a first token, and 167 of 297 end inside the plan.
  • Decoding is still starved while prompts are read: one token per step, a step a second.
  • The default kernel's slow steps were not heavy work for the card; this kernel puts the card to work.

Not results, and limits

  • The 32-stream minute: kernel builds, and four long prompts where the other run was sent two.
  • A closed loop: no ratio of requests ended against another run; the bench's fixed-arrival plan gives that.
  • TFLOPS is vLLM's estimate, too high where long prompts are read: attention is counted in all 64 layers and the model has it in 16. The peak is AMD's stated figure.
  • Prompts are random tokens. Nothing here is about the quality of an answer.

measured: read from a run file · computed: arithmetic on measured values · estimate: vLLM's, from the model's shape · my reading: interpretation, not measurement

Words used

Attention kernel
(--attention-backend) the GPU code that lets each token look back over the context. Four exist here: ROCM_ATTN (the default pick), ROCM_AITER_FA (AITER flash attention), ROCM_AITER_UNIFIED_ATTN, TRITON_ATTN.
Preempted
a running stream thrown out of a full cache and put back in line; its work is redone later.

Every number in this document was read from these files at build time (sha256, first 12 characters):

FACTS.json 160f5ca0d495 · GLOSSARY.md 98323be796af · plans/mixed-overlap.json b86c1f4ef044 · runs/20261125T201346Z-series/plan-mixed-overlap/requests.jsonl ec7778099e60 · runs/20261125T201346Z-series/plan-mixed-overlap/t0 f79227400789 · runs/20261125T201346Z-series/plan-mixed-overlap/timeline.json 328dd803edea · runs/20261125T201346Z-series/summary.json aab3940eb12e · runs/20261125T215049Z-series-fa/plan-mixed-overlap/requests.jsonl 694b08ff0653 · runs/20261125T215049Z-series-fa/plan-mixed-overlap/t0 2ee118d3a1b0 · runs/20261125T215049Z-series-fa/plan-mixed-overlap/timeline.json 2136a1e512e7 · runs/20261125T215049Z-series-fa/server.log a2aa2d010fcc · runs/20261125T215049Z-series-fa/summary.json ec0c01913c37

94 values bound by path, 13 figures drawn from data.

Supporting material · video

The same result in a minute

The whole series

Supporting material · PDF

The report as a document

6 pages · A4 · 670 KB · every number traced to its run file

Download the PDF