All posts

The Bottleneck Wasn't the Experts

Serving Gemma 4 MoE on TPU v6e with vLLM-TorchTPU

This post is my project for the TorchTPU Sprint 2026, a Google program in which Google Developer Experts (GDEs) in AI and TPU builders take on a project with TorchTPU and share the results publicly.

Gemma 4 26B-A4B is a mixture-of-experts (MoE) model: 26B parameters, but each token only passes through about 4B of them. Every layer routes each token to 8 of its 128 experts. On paper that makes it cheap to serve, and the obvious place to look for speed is the experts: how they are stored, split across chips and multiplied.

I spent a week serving it on a single Cloud TPU v6e-4 (Trillium, four chips) with vLLM-TorchTPU, trying to get as many output tokens per second out of it as I could. The experts turned out to matter less than I expected. The two biggest wins came from elsewhere: the weight format, where the usual GPU answer is the wrong one on v6e, and an attention kernel that was quietly computing almost everything as padding.

This post follows that path in the order I walked it. Along the way it needed four changes to vLLM-TorchTPU, which are now upstream pull requests.

TL;DR: serving Gemma 4 26B-A4B on one TPU v6e-4 with vLLM-TorchTPU

  • INT8, not FP8. The v6e matrix unit multiplies BF16 and INT8, so FP8 was the slowest choice.
  • TP=4 with expert parallelism. On v6e, EP only starts with USE_MOE_SPARSE_CORE=0.
  • Turn on two existing switches:
    • TPU_MOE_SKIP_PADDED_TOKENS=1 skips padded tokens in the MoE layers.
    • TPU_SAMPLER_TOPK_CANDIDATES=128 makes top-k faster. It is valid only when every request’s top-k is 64 or less, which Gemma’s default is.
  • Decode attention in 512-token blocks: TPU_RPA_DECODE_BLOCKS=8192,512, the first change in #3878.
  • MTP with 7 draft tokens on real text.
  • Result on ShareGPT: 2,025 → 5,346 output tokens/s at 64 requests (2.6x), and 108 → 559 at one request (5.2x). GSM8K is 96.2%, against 96.6% for the stock FP8 checkpoint.

Until the fixes are released, the command needs all three patches from Try it yourself: the MTP drafter’s LM head (#3864), INT8 checkpoint loading (#3871, #3872) and the decode blocks (#3878). The numbers above, like the chart below, come from the FP8 checkpoint requantized to INT8 at load. The command loads the calibrated INT8 checkpoint instead: on ShareGPT the two measured within 1%, and GSM8K was 96.1%.

M=amd/gemma-4-26B-A4B-it-w8a8-llmcompressor
hf download $M --exclude=model.safetensors
# The two REQUANTIZE variables keep the weights INT8 with patches/patch_int8_ckpt.py (both default
# to FP8). Once #3871 and #3872 are released, they are no longer needed.
USE_MOE_SPARSE_CORE=0 MOE_REQUANTIZE_WEIGHT_DTYPE=int8 REQUANTIZE_WEIGHT_DTYPE=int8 \
TPU_MOE_SKIP_PADDED_TOKENS=1 TPU_SAMPLER_TOPK_CANDIDATES=128 TPU_RPA_DECODE_BLOCKS=8192,512 \
vllm serve $M \
  --tensor-parallel-size 4 --enable-expert-parallel \
  --kv-cache-dtype fp8 --max-model-len 8192 --no-enable-prefix-caching \
  --limit-mm-per-prompt '{"image":0,"audio":0,"video":0}' \
  --gpu-memory-utilization 0.6 \
  --speculative-config '{"method":"mtp","model":"google/gemma-4-26B-A4B-it-assistant","num_speculative_tokens":7}'

The benchmark loop in Try it yourself uses random prompts, which give the drafter nothing to guess, so run it without the MTP flags. For the MTP numbers, benchmark on ShareGPT:

hf download anon8231489123/ShareGPT_Vicuna_unfiltered ShareGPT_V3_unfiltered_cleaned_split.json \
  --repo-type dataset --local-dir .
vllm bench serve --model $M --dataset-name sharegpt \
  --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 256 --max-concurrency 64

Output tokens/s at 64 concurrent requests, from the stock setup to the final oneOutput tokens/s at 64 concurrent requests, from the stock setup to the final one

The setup

A v6e-4 is one host with four chips, each with 32 GB of HBM. I served the model with vllm-torchtpu 0.33.0 and measured with vllm bench serve, mostly on random 256-token prompts with 128 output tokens, and on ShareGPT conversations, at 1, 8, 32 and 64 concurrent requests with the model’s default sampling (temperature 1.0, top-k 64, top-p 0.95). Every configuration ran its sweep twice on the same server, and I report the second pass: vLLM-TorchTPU compiles one XLA program per batch shape, and a cold first pass understated throughput by up to 41%.

The first decision was how to split the model over four chips. With plain tensor parallelism (TP=4), each chip holds a quarter of every expert. An expert’s intermediate size is 704, so each chip’s slice is 176 wide, and the v6e matrix unit (MXU) works on 256 x 256 tiles. 31% of every expert matmul was padding.

Under TP=4 each chip's 176-wide expert slice leaves 31% of a 256-wide MXU tile empty; whole experts under EP leave 8%Under TP=4 each chip's 176-wide expert slice leaves 31% of a 256-wide MXU tile empty; whole experts under EP leave 8%

Expert parallelism (EP) gives each chip whole experts instead, and TP=4 + EP was 4-9% faster than TP=4. I also tried data parallelism, several replicas inside one server, expecting it to help at high load. On the v6e-4 it lost at every load, by half at one request: with EP enabled the replicas still share experts, so every MoE layer exchanges tokens between them, and an idle replica runs dummy steps to stay in lockstep. TP=4 + EP is the layout for everything below. (On v6e, EP only starts with the SparseCore MoE kernel off: USE_MOE_SPARSE_CORE=0.)

The starting point, then: the FP8 checkpoint (RedHatAI/gemma-4-26B-A4B-it-FP8-dynamic), TP=4 + EP, 108 output tokens/s at one request and 2,336 at 64.

Surprise one: FP8 is the slow format on v6e

On recent GPUs FP8 is the default way to serve fast. It halves the bytes each decode step reads, and the tensor cores multiply FP8 directly. So I expected the FP8 checkpoint to be the fast one, and ran BF16 only as a reference. BF16 was 41% faster at one request.

That made no sense at first. At one request a decode step is bound by reading weights from HBM, and FP8 reads half as many bytes. The answer is in the hardware: the v6e MXU multiplies BF16 and INT8. It has no FP8 mode (TPU v6e architecture). The FP8 checkpoint quantizes activations to FP8 as well, so its dense layers ask for an FP8 x FP8 matmul, and XLA emulates it with conversions on every step. In the profile, those emulated dense matmuls were 4.4 ms of the 4.5 ms gap between FP8 and INT8 at one request.

My first attempt at a fix was too narrow. Converting only the experts to INT8 gained 2-5%. Running only the dense layers as W8A16 gained 1-5%. Time per output token stayed at 9 ms in both cases, because whichever half still ran FP8 dominated the step. Only with every layer on INT8 did it drop to 5 ms:

Weights (TP=4 + EP, random 256/128) c=1 c=8 c=32 c=64
FP8 108 741 1,813 2,336
BF16 152 990 2,228 2,810
INT8 (W8A8) 214 1,321 2,659 3,152

INT8 is what the MXU runs natively, at half the bytes of BF16. vLLM-TorchTPU can already requantize any checkpoint to INT8 at load (MOE_REQUANTIZE_WEIGHT_DTYPE=int8 REQUANTIZE_WEIGHT_DTYPE=int8), but a calibrated INT8 checkpoint is the better source: it is what its authors evaluated. One exists, amd/gemma-4-26B-A4B-it-w8a8-llmcompressor, and 0.33.0 refused to load it, with VllmCompressedTensorsW8A8Int8 is not implemented yet for the dense layers and Unsupported TPU FusedMoe scheme for the experts.

Looking at the checkpoint, the fix was smaller than the error suggested. It stores one scale per output channel, exactly the layout the FP8 path already reads; only the weight dtype differs. So I routed the scheme to INT8 versions of the FP8 methods, and made them keep the checkpoint’s values as they are instead of round-tripping through float32 (which would rescale any channel that does not peak at 127). That became two pull requests: a refactor with no behavior change (#3871) and the INT8 support on top of it (#3872).

On GSM8K (all 1,319 problems, greedy), the INT8 checkpoint scored 96.21%, against 96.66% for BF16 and 96.59% for FP8: 0.45 points for 12-41% more throughput.

Making the drafter draft

Gemma 4 also ships a small multi-token prediction (MTP) drafter. It reads the target model’s hidden state and proposes the next k tokens, and the target checks all of them in one forward pass. Every accepted draft is a decode step saved.

When I turned it on, it accepted zero tokens. Not few: zero, even on “count from 1 to 300”, where any model should guess right. MTP was pure overhead, 15-57% slower than not using it.

Zero acceptance usually means the drafter is predicting from garbage, so I followed its weights through the loader. To save memory, vLLM-TorchTPU hands the drafter the target’s embedding table and then skips every checkpoint tensor named embed_tokens. The Gemma 4 drafter, however, keeps its own LM head, tied to its own embedding, and its checkpoint stores that head only under model.embed_tokens.weight. The skip threw the head away, and the drafter decoded from uninitialized weights. Loading that tensor into the head fixed it (#3864): on ShareGPT the target then accepted 77-93% of the drafts.

With INT8 weights and a working drafter, MTP was a large win on real text:

ShareGPT, INT8 c=1 c=8 c=32 c=64
No MTP 212 1,112 2,090 2,818
MTP, 1 draft token 283 1,700 3,325 4,021
MTP, 4 draft tokens 472 2,164 3,100 3,461

The best draft length falls as load grows. At one request the step is bound by reading weights, so checking five tokens instead of one costs almost nothing extra. At 64 requests the batch already does real compute, and every extra checked token costs time.

That put me at 4,021 tokens/s at 64 requests on ShareGPT, 2.0x the stock setup on the same conversations (2,025). Most of it came from two things that had nothing to do with the experts themselves: the weight format and a loader bug. I wanted to know what the rest of each step was spent on.

Surprise two: half the step was masked attention

I captured XProf traces of the decode steps (vllm serve --profiler-config.profiler torch, then vllm bench serve --profile). With INT8 weights the chips were busy 97-99% of the time, so the question was only which ops filled it:

INT8, one decode step 1 request 64 requests
Step time 4.6 ms 16.9 ms
MoE grouped matmuls 35% 13%
All-reduces across chips 18% small
Sampling 9% 15%
Attention small 52%

At one request the experts were the biggest item, as expected. At 64 requests, more than half of every step was attention. That should not happen here. Each sequence holds at most 384 tokens (256 in, 128 out), the KV cache is FP8, and attention over a few hundred tokens should be cheap next to the MoE layers.

The trace says why, if you read the kernel names. The attention kernel is ragged paged attention (RPA v3), and each compiled variant is named after its block sizes. One decode step at 64 requests ran two of them:

Kernel in the trace Calls per step Time per call
RPAd-p_256-bq_1_1-bkv_8192_8192-sw_1024 25 291 µs
RPAd-p_256-bq_1_1-bkv_8192_8192 5 306 µs

RPAd is the decode case and bkv_8192_8192 the KV block sizes. The kernel walks each sequence’s KV cache in fetch blocks, which it copies from HBM, and splits each fetch block into compute blocks, which it actually multiplies. Both sizes come from a heuristic table per TPU generation. For decode on v6e, the table sets the compute block equal to the fetch block, and the fetch block grows with the context length, --max-model-len, which was 8,192. The kernel stops at each sequence’s real length, but only at a compute-block boundary. So a 300-token sequence was computed as one 8,192-token block, and 96% of it was masked out.

A 300-token sequence computed as one 8,192-token block, against 512-token blocks that stop after the firstA 300-token sequence computed as one 8,192-token block, against 512-token blocks that stop after the first

A one-line experiment confirmed it before I touched the kernel. With the stock kernel and --max-model-len 1024, throughput at 64 requests went from 3,130 to 4,898 tokens/s. Shrinking the context is not a fix, though; nobody wants to give up long prompts. The fix keeps the large fetch block, so long sequences still stream from HBM in big copies, and splits it into 512-token compute blocks, so a short sequence stops after the first one. In the next profile the same two kernels, now bkv_8192_512, took 54 and 60 µs per call. Attention went from 8.8 to 1.7 ms of each step, and the forward pass from 14.2 to 6.8 ms:

Output tokens/s with the stock and fixed decode blocks, INT8 and BF16Output tokens/s with the stock and fixed decode blocks, INT8 and BF16

+58% for INT8 and +44% for BF16 at 64 requests, with GSM8K unchanged (96.29%). It only changes how the work is blocked, not the math. Two other splits (1,024 / 512 and 2,048 / 256) were within a few percent and lower at 64 requests.

The other kernel name, the one with -sw_1024, held the next problem. Gemma 4 alternates two kinds of attention layer: 25 of its 30 layers use a sliding window and only look at the last 1,024 tokens; the other 5 see the whole context. Short prompts never reach the window, so the benchmark above could not tell the two apart. Long ones can. I measured them on a newer vLLM-TorchTPU main, A/B on one VM: with 7,680-token prompts, decode with 512-token blocks was 1-4% slower than with the stock kernel (32 requests: 32.3 against 30.7 ms per output token).

The window explains why. An 8,000-token sequence now takes 16 compute blocks instead of one, and in the sliding layers 13 of them lie entirely before the window. The kernel did skip fetch blocks that lie before the window, but the fetch block now spans the whole context, so there was nothing left to skip: it copied all 8,000 tokens from HBM, multiplied all 16 blocks, and masked 13 of them away.

So the window has to decide where the kernel starts, not only what it masks. I made two changes. The compute loop starts at the block holding the first position the window can see, so a sliding layer multiplies at most three 512-token blocks at any length. And the pages before that block are no longer copied from HBM at all, since nothing reads them.

A sliding layer at 8,000 tokens of KV: 16 blocks copied and computed with 13 masked, then 3 computed, then 3 copied and computedA sliding layer at 8,000 tokens of KV: 16 blocks copied and computed with 13 masked, then 3 computed, then 3 copied and computed

In a kernel-only benchmark of one sliding layer with 64 sequences (timed from the host, so every call includes dispatch overhead and the totals are several times the in-server times in the profile above; compare the columns, not the totals):

KV length Stock 512-token blocks + start compute at the window + start the copy at the window
256 1,120 µs 932 µs 935 µs 928 µs
4,096 1,124 µs 1,143 µs 1,061 µs 959 µs
8,000 1,264 µs 1,369 µs 1,288 µs 993 µs

Most of this gain is the copy, not the compute: once the kernel multiplies only the blocks the window can see, what is left is the bytes it copies. End to end, with all three changes, 7,680-token prompts went from 1-4% slower than the stock kernel to 3-10% faster (27.6 against 30.7 ms per output token at 32 requests), and 4,096-token outputs, where the cache grows past the window during decode, from +28% to +45% at 64 requests (5,380 against 3,710 tokens/s). Short prompts did not change (4,933 against 4,901), and GSM8K was 96.36%, against 96.21% with the stock kernel. All three changes are in #3878; the rest of this post uses only the first, since ShareGPT conversations and 256-token prompts stay inside the window.

Two smaller items from the same profile:

  • Padded tokens in the MoE layers. Each step pads its batch to a bucket of at least 16 tokens, and at one request all 16 rows went through expert routing and the grouped matmuls. vLLM-TorchTPU has a switch to skip them, TPU_MOE_SKIP_PADDED_TOKENS=1: +36% at one request.
  • The sampler. With attention down to 1.7 ms, the sampler was the largest piece left outside the model: 2.5 ms of each step at 64 requests. TPU_SAMPLER_TOPK_CANDIDATES=128 keeps only the 128 blocks of 128 logits with the highest maximum before running top-k. That sounds like an approximation, but it is exact: the top 64 tokens always sit in the top 64 blocks, and the switch is used only when every request has a top-k of 64 or less, as Gemma’s default does. +9% at 64 requests.

With the attention fix and both switches, random 256-token prompts reached 5,604 tokens/s at 64 requests, 2.4x the 2,336 I started from. That is the last bar in the chart at the top.

The fix changed the MTP answer

After the attention fix I reran MTP, expecting the two gains to stack. They did not. With the stock kernel, one draft token added 18-25% at every load. With the fixed kernel, MTP at 64 requests was still at 3,720 tokens/s, exactly where it had been, while plain decoding had moved past it to 4,937:

Change in output tokens/s from MTP k=1, stock kernel against fixed kernelChange in output tokens/s from MTP k=1, stock kernel against fixed kernel

The reason is again in the kernel’s table: a verify step sends k + 1 tokens per sequence, so the kernel treats it as a mixed prefill-decode batch, and the mixed path already used 512-token compute blocks. The fix made plain decoding much faster and left verification as it was, so one draft token now paid off only up to about 8 concurrent requests.

That was on random prompts, which the drafter guesses badly. On ShareGPT conversations it does much better: with 3 draft tokens, a verify step accepted 3.57 tokens on average, against 2.52 on random prompts. There, MTP with k=3 still won up to 32 requests (3,907 against 2,973 tokens/s without it) and lost only at 64. Longer outputs moved the line the other way: with 1,024 output tokens, 7 draft tokens almost doubled throughput at one request (553 against 292) and lost from 32 requests on. At 64 requests, MTP lost on every workload I tried.

That looked like the end of MTP under load, until I profiled a verify step. At 64 requests with k=3, a step took 31.5 ms, and attention was not where it went. 12.8 ms went to the rejection sampler, and 9.6 ms of that to the same full-vocabulary top-k/top-p search I had already cut for plain decoding, now run over four rows per request instead of one. The rejection sampler already honors TPU_SAMPLER_TOPK_CANDIDATES; I had simply never set it for the MTP runs. With it, MTP with k=3 won at every load on ShareGPT, 5,332 against 4,698 tokens/s at 64 requests, and at 1,024 output tokens as well. Only on random prompts, where fewer drafts are accepted, plain decoding stayed ahead from 32 requests on. Seven draft tokens went further on ShareGPT: ahead of k=3 up to 32 requests (559 against 396 tokens/s at one) and level with it at 64.

Two follow-ups came out of looking at verification more closely:

  • Draft lengths that fit the buckets. vLLM-TorchTPU pads each step’s token count to 16, 32, …, 2,048. With 4 draft tokens a sequence sends 5 tokens, so 64 requests send 320 tokens, padded to 512: 37.5% of the step is padding. 1, 3 or 7 draft tokens (2, 4 or 8 per sequence) fill the bucket exactly. At 1,024 output tokens and 32 requests, k=3 reached 4,869 tokens/s and k=4 only 3,855, slower even than k=7.
  • A pass built for verification. The kernel already has a pass for fixed-length verify windows, but vLLM-TorchTPU only enables it for DeepSeek-V4. I expected it to matter, since the mixed path sizes its query blocks for prefill. It did not: in a kernel-only benchmark of a verify step it was 1-7% faster, and in the profile it saved 0.64 ms of a 31.5 ms step. End to end with k=3 it was 5-11% faster at 64 requests but 4% slower at 32 on ShareGPT, on a different VM from the baseline. That was not enough to turn on a path vLLM-TorchTPU only exercises for DeepSeek-V4, so I left it off.

Tokens per verify step at 64 requests for k = 1, 3, 4 and 7, against the padded bucketTokens per verify step at 64 requests for k = 1, 3, 4 and 7, against the padded bucket

Where it ended up

On ShareGPT conversations, with the default sampling, output tokens/s at 1, 8, 32 and 64 concurrent requests (the last three rows are the mean of two warm passes on one VM; the stock row is from an earlier VM of the same type):

Configuration 1 8 32 64
Stock: FP8 checkpoint, TP=4 + EP 108 607 1,336 2,025
INT8, attention fix, padded-token skip, top-k sampler 284 1,532 3,231 4,698
Same, plus MTP k=3 396 2,240 4,599 5,332
Same, plus MTP k=7 559 2,836 4,780 5,346

Speedup over the stock setup on ShareGPT: 5.2x at one request with MTP k=7, 2.6x at 64Speedup over the stock setup on ShareGPT: 5.2x at one request with MTP k=7, 2.6x at 64

That is 2.6x at 64 requests and 5.2x at one, on the same four chips. GSM8K stayed at 96.2-96.4% with and without MTP (96.21% with k=7), against 96.59% for the FP8 checkpoint I started from.

These numbers are lower than the chart at the top because the workload differs, not the setup. The chart uses random 256-token prompts with exactly 128 output tokens, so every step does the same work and each change can be compared alone: 2,336 to 5,604 tokens/s at 64 requests. ShareGPT prompts and replies vary in length, which costs throughput (4,698 without MTP), and only real text gives the drafter something to guess, so MTP is measured there: 2,025 to 5,346.

If I had to compress the week into advice for anyone serving an MoE on TPU:

  • Check what your matrix unit multiplies. On v6e that is BF16 and INT8. The GPU habit of FP8 was the single slowest choice I made.
  • Profile before you tune. I would not have guessed the largest win, a block-size heuristic in the attention kernel, from any serving flag or from the model’s architecture. Once the profile pointed there, the architecture told me where to look next: three quarters of the attention only needs the last 1,024 tokens, if the kernel uses the window to decide where to start.
  • Re-measure the old answers after a fix, and profile again. The attention fix made MTP look like a loss under load. A second profile showed the loss was the sampler, and with that fixed, MTP won at every load on real text.

Eight chips. On a v6e-8 with the same INT8 weights and TP=8 + EP, before the kernel fixes, throughput at 64 requests was 3,836 tokens/s against 3,130 on the v6e-4: 1.23x for twice the chips. A model with 4B active parameters is small for eight chips; two v6e-4 replicas would scale better.

What’s left. At one request the step is 4.6 ms, and its two largest parts are untouched: the INT8 grouped matmuls over a handful of tokens (35%) and the all-reduces between chips (18%). A grouped matmul tiled for tiny batches, and overlapping the all-reduce with compute, are where I would look next.

Upstream. The changes from this post, as pull requests to vLLM-TorchTPU:

Change Pull request
Load the Gemma 4 MTP drafter’s LM head #3864
Load W8A8 INT8 checkpoints natively #3871, #3872
Compute v6e decode attention in 512-token blocks; start sliding-window layers at the window #3878

Try it yourself

The scripts, raw results and profiles are in the companion repo, bzantium/gemma4-moe-tpu. The short version:

# On a TPU v6e-4 VM (runtime v2-alpha-tpuv6e). The wheel needs Python 3.12.
curl -LsSf https://astral.sh/uv/install.sh | sh
~/.local/bin/uv venv --seed -p 3.12 ~/venv && source ~/venv/bin/activate
pip install --extra-index-url https://download.pytorch.org/whl/cpu vllm-torchtpu

# Until the fixes are released
git clone https://github.com/bzantium/gemma4-moe-tpu
bash gemma4-moe-tpu/patches/patch_mtp_head.sh
python gemma4-moe-tpu/patches/patch_int8_ckpt.py
python gemma4-moe-tpu/patches/rpa_decode_blocks_patch.py \
  $(python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')  # adds TPU_RPA_DECODE_BLOCKS

M=amd/gemma-4-26B-A4B-it-w8a8-llmcompressor
hf download $M --exclude=model.safetensors
# The two REQUANTIZE variables keep the weights INT8 with patches/patch_int8_ckpt.py (both default
# to FP8). Once #3871 and #3872 are released, they are no longer needed.
USE_MOE_SPARSE_CORE=0 MOE_REQUANTIZE_WEIGHT_DTYPE=int8 REQUANTIZE_WEIGHT_DTYPE=int8 \
TPU_MOE_SKIP_PADDED_TOKENS=1 TPU_SAMPLER_TOPK_CANDIDATES=128 TPU_RPA_DECODE_BLOCKS=8192,512 \
vllm serve $M \
  --tensor-parallel-size 4 --enable-expert-parallel \
  --kv-cache-dtype fp8 --max-model-len 8192 --no-enable-prefix-caching \
  --limit-mm-per-prompt '{"image":0,"audio":0,"video":0}' &

# For MTP with 7 draft tokens, the best on ShareGPT, also pass
#   --gpu-memory-utilization 0.6 \
#   --speculative-config '{"method":"mtp","model":"google/gemma-4-26B-A4B-it-assistant","num_speculative_tokens":7}'

# Once `curl -s localhost:8000/health` answers: run the sweep twice, keep the second pass
for pass in 1 2; do for c in 1 8 32 64; do
  vllm bench serve --model $M \
    --dataset-name random --random-input-len 256 --random-output-len 128 --ignore-eos \
    --num-prompts $(( c*4 > 64 ? c*4 : 64 )) --max-concurrency $c \
    --save-result --result-filename c$c.json
done; done

I ran this block as written on a fresh v6e-4: GSM8K 96.13%, and on random prompts about 5,200 tokens/s at 64 requests. That is a little below the chart at the top (5,604), which requantized the FP8 checkpoint at load instead of loading this one; on ShareGPT the two were within 1%. The patch script adds only the 512-token blocks, not the two sliding-window changes from #3878.

Further reading: