Skip to content
Peter Styk HPC & AI Platform Engineer

Reports · Qwen3.8-27B on one AMD Instinct MI300X · 8-bit cache

An 8-bit cache: 1.9 times the token slots, and no more streams

Storing the cache in 8-bit numbers makes the server report almost twice the token slots. The staircase still fills at 539 streams, against 541 without it. A running stream costs the same 196 MiB of cache either way.

Test
8-bit cache
Run
20261125T224501Z-series-kvfp8

Also as a PDF of 5 pages.

01Overview

The staircase stops letting streams in when the cache is full. So I stored the cache in 8-bit numbers instead of 16-bit ones, on the fast attention kernel, and played the top of the staircase again. The server reported 3,309,759 token slots instead of 1,679,893: 1.9 times as many. The staircase then filled at 539 streams, 2 fewer than the 541 without the setting. Output at the two top stairs was 0.9% and 6.6% higher, which one run each does not settle.

  • 1.9 times the token slots the server reports: 3,309,759 against 1,679,893
  • 539 streams running at once, at most; 541 with a 16-bit cache
  • 196 MiB of cache for each running stream, with either cache: computed from each server's log
  • 4,182 answer tokens a second with 2,048 streams asked for; 3,921 with a 16-bit cache
16-bit cache = 1008-bit cache050100150200the same server with a 16-bit cache = 100100.0197.0token slotsthe server reports100.099.7cache memory,GiB100.099.6most streamsrunning at once100.0106.6answer tokens a second,2,048 asked for
Figure 1The 8-bit server against the same server with a 16-bit cache, each measure with the 16-bit server set to 100. The token slots nearly double. The cache memory and the streams that fit do not follow; the output differs by less than one run each can settle.Source: summary.json of this run and of run 20261126T013018Z-series-fa-seqs2048 (server.kv_cache_tokens, stages[stage=up-2048].running_max, server_output_tok_s); cache memory from each server.log ("Available KV cache memory")

For each GiB of cache the two servers ran the same number of streams: 5.21 and 5.22. The 8-bit server had 103.36 GiB of cache against 103.65, which is 0.2% less, and ran 0.3% fewer streams.

One thing differs between the two servers: both had 2,048 stream slots, so that the stream limit could not be the ceiling. The first version of this document compared with a server of 1,024 slots and showed 20 fewer streams. 18 of them were the slots: a server with more slots sets more memory aside for its busiest step, 19.64 GiB against 16.31, and that comes out of the cache.

02How it was run

The machine, and the one setting

AMD Instinct MI300XQwen3.8-27B · vLLM 0.27.1streamsat most 539 at oncethis testengine stepprefilldecodeattentioncache3,309,759 token slotsthis testcompute unitsclientsCPU · 20 cores
Figure 2The card as every document in this series draws it: seven parts wired left to right, the clients outside, the host CPU below. This test changes how the cache stores its numbers, and asks how many streams then fit.Source: FACTS.json; summary.json server.kv_cache_tokens, plans.plan-staircase-top.stages[stage=up-2048].running_max

The top of the staircase, twice

2565121,0242,048line emptying05001,0001,5002,000streams04080120160200seconds since the plan started
Figure 3The plan: streams asked for over time, on an empty server. Each stair lasts 40 seconds; then the generator waits 60 seconds for the line to empty and stops.Source: plan-staircase-top/timeline.json (target); plans/staircase-top.json
  1. A closed loop: the load generator keeps 256, then 512, 1,024 and 2,048 requests open, 40 seconds each. A new request starts when one ends.
  2. Every prompt is 64 random token ids, so no two share a prefix; every answer is forced to 512 tokens.
  3. Two servers played it, both on the fast attention kernel: one with the cache in 16-bit numbers (run 20261126T013018Z-series-fa-seqs2048), this one with --kv-cache-dtype fp8.
  4. Both had 2,048 stream slots. Nothing else differs between them.
  5. Beside each run a sampler read the server's counters, the card and the CPU once a second.

Speed and room only. vLLM's own log says of this setting that it "may cause accuracy drop without a proper scaling factor". The prompts here are random tokens; nothing in this test says anything about the answers.

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 20261125T224501Z-series-kvfp8, started 2026-11-25T22:45:15Z, server ready after 206 s

This server was ready after 206 s, the other after 100 s. That is vLLM's compile cache, not a cost of the setting: this configuration's graphs had to be compiled first (36.5 s of compiling against 5.7 s).

Words used

Cache
(KV cache) the GPU memory where the server keeps what the model computed for every token of every open stream, so it need not be recomputed.
"Cache for N tokens"
what the server reports at start: how many token slots fit in the cache (about 1.82 million with default settings here).
Stream
one request being answered, from the moment it is sent until its last token.
Closed loop
the load keeps N requests in flight; a new one starts only when one ends. The server sets the pace.
Capacity
(waiting reason) the server's label for a request it cannot schedule now, because the cache or the step's token budget is used up. Reported in vllm:num_requests_waiting_by_reason.
Engine step
one pass of the model over a batch: one new token for every decoding stream, plus a bite of prefill.

03Stair by stair

Both servers stop a little above 512 streams

Streams runningasked for16-bit cache8-bit cache2565121,0242,048line emptying0250500Answer tokens a second (7-second centred mean)16-bit cache8-bit cache02,0004,000Cache in use, %16-bit cache8-bit cache050100020406080100120140160180200220seconds since the plan started
Figure 4The two runs on one clock: this one in colour, the 16-bit server in grey. Streams running follow the request (thin steps) to 512 and then stop; everything asked for above that waits. Output is a 7-second centred mean. Shaded bands are the stairs, labelled with the streams asked for; in the last band nothing new is sent.Source: plan-staircase-top/timeline.json of both runs (vLLM's gauges and counters, sampled every second)

The exact record

serverrunning at mostwaiting at mostcache at most, %answer tokens/sprompt tokens/sengine steps/stokens per stepfirst token, median sTFLOPS, est.
256 streams asked for
16-bit cache25612747.33,11542912.182912.13164
8-bit cache25612747.43,20942912.552902.13168
512 streams asked for
16-bit cache51210094.63,1898626.266472.06185
8-bit cache51213294.93,2168626.326462.06187
1,024 streams asked for
16-bit cache541483100.03,9234317.2659942.71202
8-bit cache53948599.93,9624337.3759640.71204
2,048 streams asked for
16-bit cache5411,507100.03,9214807.26606≥ 99.90203
8-bit cache5391,50999.94,182467.76545≥ 99.97197

One row per stair and server, from the two summary.json files. Running, waiting and cache are the most seen in the stair; output, prompts and steps are the server's counters over it; the first-token time is the median for requests sent in that stair. A stage row spans 39 s of a 40 s stair, first to last one-second sample. TFLOPS is vLLM's estimate.

With 1,024 and with 2,048 streams asked for, 539 ran at most and the cache gauge read 99.9%. The line grew to 1,509 requests. The 16-bit server stopped at 541 with 1,507 waiting.

1,509 of this run's 2,843 requests were "cut at the end of the plan": still open when the generator's 60 s ran out, and closed by it. They are not refusals. All 2,843 got HTTP 200.

04Why no more streams fit

A stream costs the same bytes, whatever the slot is made of

weights and the rest of the serverset aside for the busiest stepthe cachethe share of the card it may plan with04080120160default kernel112.71 GiB92%: 176.35 GiBfast kernel107.05 GiB92%: 176.35 GiBfast kernel, 2,048 stream slots103.65 GiB92%: 176.35 GiBfast kernel, 97% of the card113.23 GiB97%: 185.94 GiBfast kernel, 8-bit cache103.36 GiB92%: 176.35 GiBGiB of the card's 191.69
Figure 5Where each of the five servers that played this plan put the card's memory, by its own log: what the server itself consumed, what it set aside for its busiest step, and the cache, which gets the rest of the share it may plan with. This run is in bold.Source: server.log of each run ("Desired GPU memory utilization is ... Actual usage is ...", "Available KV cache memory")
520540560580600most streams running at once100104108112116cache memory, GiB (the server's log)the grey line: 5.22 streams for each GiB of cachedefault: 588fast: 5592,048 slots: 54197%: 5918-bit: 539
Figure 6The most streams running at once against the cache's size in GiB, five servers: the default attention kernel, the fast kernel, the fast kernel with 2,048 stream slots, the same with 97% of the card, and this one, which sits on top of its 16-bit twin. They lie on one line through zero: the streams that fit follow the bytes.Source: summary.json of each run (running_max at 2,048 asked for); cache GiB from each server.log

In all five servers the most streams running divided by the cache's GiB comes to 5.21 or 5.22: about 196 MiB of cache for each running stream of this plan, the 8-bit cache included.

Counted in token slots a running stream took 3,105 with the 16-bit cache and 6,141 with the 8-bit one. The slot got half as big. The stream did not get smaller.

My reading: with streams this short the cache is filled by a fixed amount of state for each stream, in bytes, and 8-bit numbers do not shrink it. They halve what one token's entry takes, and a stream of at most 576 tokens has few tokens. Long streams may gain; this plan cannot say.

The five servers, exactly

servershare of the card, %consumed, GiBset aside, GiBcache, GiBtoken slotsmost streams runningstreams per GiBMiB of cache per streamslots per streamanswer tokens/s: 1,024 asked2,048 asked
default kernel9253.0710.57112.711,826,4765885.22196.33,1063,8564,096
fast kernel9253.0016.31107.051,734,9585595.22196.13,1043,9493,993
fast, 2,048 stream slots9253.0619.64103.651,679,8935415.22196.23,1053,9233,921
fast, 97% of the card9753.0619.64113.231,835,0085915.22196.23,1054,1023,941
fast, 8-bit cache9253.3619.64103.363,309,7595395.21196.46,1413,9624,182

Memory is each server's own log; slots and streams are each run's summary.json; streams per GiB, MiB per stream and slots per stream are computed. The default-kernel server played the full staircase, the four others its top only. The three servers with 2,048 stream slots set 19.64 GiB aside, the fast-kernel server with 1,024 slots 16.31.

05What it means

What I take from it, and what it does not show

What I take from it

  • The 8-bit cache made the server report 1.9 times the token slots, and 539 streams ran at most where 541 had run.
  • A running stream took about 196 MiB of cache in both servers. The streams that fit follow the cache's size in bytes, not its count of token slots.
  • Output at the top is not told apart by one run each: 3,962 and 4,182 answer tokens a second at the two top stairs, against 3,923 and 3,921.
  • For many short streams the 8-bit cache buys nothing. What limits them is state that is not counted per token.

What it does not show

  • Whether long streams gain. A long stream is mostly tokens, and their entries are what the setting halves. No run here tried it.
  • What the setting does to the answers. Prompts are random tokens and answers are not readable text.
  • More than one run of each server, or another plan: this is the top of one staircase.
  • One run each. A stair's output swings with the moment at which new prompts are read: at 2,048 asked for this server read 46 prompt tokens a second, the other 480.

Underneath: the card did the same work

servercompute, TFLOPS (est.)memory read, TB/s (est.)matrix units in use, %wattsCPU busy, %engine cores
1,024 streams asked for
16-bit cache202.20.8019.075011.62.00
8-bit cache204.10.6033.775011.62.00
2,048 streams asked for
16-bit cache203.00.6136.074911.71.99
8-bit cache196.60.5327.175011.71.98

Stage rows of the two summaries. Compute and memory read are vLLM's estimates from the model's shape, not hardware counters; matrix units and watts are readings of AMD's device exporter.

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

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

FACTS.json 160f5ca0d495 · GLOSSARY.md 98323be796af · plans/staircase-top.json 7671a9348c18 · runs/20261125T201346Z-series/server.log c008d4941d1a · runs/20261125T201346Z-series/summary.json aab3940eb12e · runs/20261125T215049Z-series-fa/server.log a2aa2d010fcc · runs/20261125T215049Z-series-fa/summary.json ec0c01913c37 · runs/20261125T224501Z-series-kvfp8/plan-staircase-top/timeline.json 627cc56c2714 · runs/20261125T224501Z-series-kvfp8/server.log 12a55b33336a · runs/20261125T224501Z-series-kvfp8/summary.json 561b6d9e405a · runs/20261125T225329Z-series-mem97/server.log 18247a4dd0d4 · runs/20261125T225329Z-series-mem97/summary.json ab4cc85f7ebd · runs/20261126T013018Z-series-fa-seqs2048/plan-staircase-top/timeline.json e5d5a112cf56 · runs/20261126T013018Z-series-fa-seqs2048/server.log 5a8a691ca70f · runs/20261126T013018Z-series-fa-seqs2048/summary.json 94ecccaf84b3

62 values bound by path, 6 figures drawn from data.

Supporting material · PDF

The report as a document

5 pages · A4 · 333 KB · every number traced to its run file

Download the PDF