DI Series: Serve More Long-Context Sessions on MI300X and MI325X with 4-bit GLM-5.3-Flash at FP8 Accuracy#
Long-context agentic serving is often limited by memory on the decode node rather than by compute: every concurrent long session holds its own key-value (KV) cache, and memory occupied by weights is unavailable to it. GLM-5.3-Flash is released in two checkpoints, FP8 with 306 GB of weights and MXFP4 (Microscaling FP4) with 173 GB, so the smaller checkpoint would leave more room for sessions. On AMD Instinct™ MI300X and MI325X GPUs, however, the AMD CDNA™ 3 (gfx942) architecture provides matrix instructions for FP64, FP32, TF32, FP16, BF16, INT8 and FP8, but not for FP4 or INT4 (see the CDNA 3 instruction set architecture); MXFP4 is therefore a storage format only on these GPUs, and the checkpoint’s model card lists them as unsupported by its native MXFP4 recipe, which targets the AMD Instinct MI350 Series.
This post shows that the MXFP4 checkpoint can nonetheless be served on gfx942 at FP8 accuracy and agentic throughput, freeing 15.5 GiB per GPU for up to 17% more KV cache on MI325X. On MI300X, the same saving gives up to 31% more KV cache. With more KV cache, the decode node admits more concurrent long-context sessions: in a KV-bound test on MI325X it ran at most 120 requests at once against 104 for FP8. On MI300X, the same test ran 72 against 56. The approach rests on an exact property of this checkpoint: every MXFP4 expert matrix of GLM-5.3-Flash is losslessly representable as FP8 128x128 blocks, a format that the FP8 model’s kernels already execute. The prefill leg therefore computes with FP8 matrix instructions on bit-exact MXFP4 weights, while the decode leg retains the experts in 4 bits and decodes them exactly within the kernel.
In this post you will learn how to serve GLM-5.3-Flash with prefill-decode disaggregation on AMD Instinct gfx942 GPUs, first from the FP8 checkpoint and then from the MXFP4 checkpoint. Specifically, this post covers:
The FP8 serving baseline on MI325X and MI300X.
Why every MXFP4 expert of this model is exactly representable as an FP8 block, and how two load-time conversions exploit this property.
How one checkpoint supports two execution modes: FP8 blocks for prefill and 4-bit experts for decode.
Where the additional KV cache improves serving, where it does not, and the remaining performance gap of 4-bit decode.
How to build the container image and run the recipe.
Key Results#
The following points summarize the main results of this work:
Deployment: GLM-5.3-Flash served 1P1D disaggregated (one prefill and one decode node of eight GPUs each, expert parallelism EP8 on both) in vLLM on MI325X (256 GB) and MI300X (192 GB), with multi-token prediction (MTP) on both legs, decode in HIP graphs (vLLM’s CUDA graph mode) and a 760,000-token context limit.
FP8 baseline on MI325X: at 256K tokens, single-request time to first token (TTFT) is 28.2 s, with 10 to 14 ms per output token (endnote 9).
FP8 baseline on MI300X: at 256K tokens, single-request TTFT is 33.7 s, with 11 to 13 ms per output token (endnote 10).
Exact conversion and accuracy: all 37,152 routed-expert matrices of the MXFP4 checkpoint convert exactly to FP8 128x128 blocks for prefill, while decode retains them in 4 bits. On MI325X, GSM8K accuracy is 97.32% for both checkpoints, and all 178 seeded needle-in-a-haystack (NIAH) probes from 16K to 704K tokens are answered identically (endnote 1). On MI300X, GSM8K is within 0.2 percentage points (97.35% for MXFP4 against 97.19% for FP8), and all 178 probes are again answered identically (endnote 2).
Throughput and memory on MI325X: throughput on AgentX, an AMD benchmark that replays recorded multi-turn coding-agent sessions, is within 1.2% of FP8 (endnote 7), and the 15.5 GiB per-GPU weight reduction yields up to 17% more KV cache (endnote 3). When decode KV capacity is the bottleneck, MXFP4 delivers up to 13% higher output throughput and 15% lower mean TTFT (endnote 5).
Memory on MI300X: the same weight reduction yields up to 31% more KV cache (endnote 4). When decode KV capacity is the bottleneck, MXFP4 delivers 22% lower mean TTFT at equal throughput (endnote 6).
Remaining gap: a 4-bit decode step is 3.3 to 4.1% slower than an FP8 decode step, because the 4-bit expert kernel attains about 1.6 TB/s against about 5.2 TB/s for the FP8 kernel at decode batch sizes (endnote 11).
Figure 1 below traces one request through the deployment and shows the representation of the MXFP4 weights on each leg.
Figure 1. One request through the deployment: 4-bit experts become exact FP8 blocks for prefill, three caches cross over RDMA, and decode keeps the experts 4-bit.
Scope and Limitations#
The results above hold under the following conditions:
The recipe targets gfx942 (MI300X and MI325X) and runs the checkpoint weight-only: prefill activations are quantized to FP8 as in the FP8 model, and decode activations stay in BF16. The checkpoint’s native recipe on MI350 Series GPUs also quantizes activations to MXFP4, so accuracy on gfx942 was measured independently in this post.
The additional KV cache improves throughput or latency only when decode KV capacity is the limit; at moderate agentic concurrency both checkpoints perform at parity.
The serving fixes are on public branches pinned by the recipe’s Dockerfile and are not yet merged upstream; the How to Use It section lists their status.
The MXFP4-against-FP8 comparisons were measured on pre-release builds of the same branches; a release build with the same pins reproduces their KV capacity exactly.
The Model and the Deployment#
GLM-5.3-Flash combines three attention mechanisms with a large mixture-of-experts (MoE) block. Its 45 layers follow a repeating pattern of three Kimi Delta Attention (KDA) layers and one Multi-head Latent Attention (MLA) layer, terminated by a final KDA layer. The 11 MLA layers incorporate a DeepSeek Sparse Attention (DSA) indexer that selects the top 2,048 positions for each query; the 34 KDA layers implement linear attention with a fixed-size recurrent state. Each MoE layer routes a token to 8 of 288 experts plus one shared expert, and a multi-token prediction (MTP) layer drafts one additional token per step.
This composition determines the serving design. vLLM’s hybrid KV cache manager allocates three kinds of per-request state: the MLA KV cache, the indexer’s key pool with its tail ring, and the KDA recurrent state, and prefill-decode (PD) disaggregation must transfer all three. Because prefill is compute-bound and bursty while decode is memory-bound and steady, placing them on separate nodes allows each to use its own execution mode: eager prefill, and decode captured in HIP graphs. The KV handoff uses MoRIIO, the remote direct memory access (RDMA) transfer path of AMD MoRI, in READ mode, in which the decode node pulls the completed caches from the prefill node. A Rust vllm-router in front of both legs pins each session to one data-parallel rank. Within each node, experts exchange tokens through an all-gather before each MoE layer and a reduce-scatter after it, implemented over RCCL and, inside the decode HIP graphs, with AITER’s custom collective kernels. The expert-parallel dispatch of MoRI (MoRI-EP) also supports this model but provided no speedup with one node per leg.
Figure 2 below shows the deployment and the per-leg differences between the two checkpoints.

Figure 2. 1P1D deployment: EP8 prefill and EP8 decode nodes, MoRIIO READ transfer of three cache types, and the per-leg expert format.
The following table lists the serving configuration used on both platforms:
Leg |
Parallelism |
Execution |
Key settings |
|---|---|---|---|
Prefill |
expert parallel EP8 (data parallel DP8) |
eager |
|
Decode |
EP8 (DP8) |
HIP graphs ( |
MTP 1 token, |
Expert exchange |
all-gather and reduce-scatter across the 8 GPUs of each leg |
RCCL; AITER kernels inside decode graphs |
vLLM |
Transfer |
MoRIIO RDMA READ, 7 to 8 NICs per node |
block size 4, KV dtype auto |
|
Router |
vllm-router |
consistent hash on both legs, session header for prefix-cache reuse |
Serving GLM-5.3-Flash in FP8#
The FP8 deployment serves as the baseline for the MXFP4 checkpoint. It uses the gfx942 FlyDSL kernel for the DSA indexer’s FP8 logits (ROCm/aiter#3913) and the disaggregation fixes packaged in ROCm/MAD PR #274; all measurements below include both.
FP8 Results on MI325X and MI300X#
On MI325X, the FP8 deployment serves long prompts at 10 to 14 ms per output token. On MI300X, it serves them at 11
to 13 ms per output token. The
following tables report serving performance on each platform from the September 2026 build, one run per point
(vllm bench serve, random data, two warm-up requests per point); TPOT denotes time per output token.
Input / output tokens |
Concurrency |
MI325X TTFT |
MI325X TPOT |
MI325X output tokens/s |
|---|---|---|---|---|
256K / 1K |
1 |
28.2 s |
10.30 ms |
26.5 |
256K / 1K |
8 |
44.5 s |
10.99 ms |
139.3 |
512K / 1K |
1 |
60.4 s |
14.11 ms |
13.7 |
512K / 1K |
8 |
91.3 s |
11.24 ms |
77.2 |
Input / output tokens |
Concurrency |
MI300X TTFT |
MI300X TPOT |
MI300X output tokens/s |
|---|---|---|---|---|
256K / 1K |
1 |
33.7 s |
10.6 ms |
23.0 |
256K / 1K |
8 |
53.4 s |
12.2 ms |
122.7 |
512K / 1K |
1 |
72.3 s |
11.0 ms |
12.3 |
512K / 1K |
8 |
109.0 s |
13.0 ms |
65.2 |
Needles at 243K, 486K and 713K tokens are recalled at three depths on both platforms, and 16 concurrent needle probes pass 48 of 48. The two platforms are reported separately and not compared with each other. For the 512K, concurrency 1 shape on MI325X (14.11 ms TPOT in this run), the October three-repeat mean is 10.99 ms (see the MXFP4 comparison below). Later tables come from separate runs, so FP8 values for the same shape can differ slightly between tables, for example 28.2 s here and 28.50 s as a three-repeat mean.
FP4 Without FP4: The MXFP4 Checkpoint on gfx942#
On the decode leg, the MXFP4 checkpoint reduces weight memory by 15.5 GiB per GPU. The remainder of this post examines how this saving can be retained without loss of accuracy or speed.
What MXFP4 Is#
MXFP4 is the 4-bit format of the Open Compute Project (OCP) Microscaling (MX) specification, published jointly by AMD, Arm, Intel, Meta, Microsoft, NVIDIA and Qualcomm. It stores each weight as a 4-bit floating-point value, e2m1 (one sign bit, two exponent bits, one mantissa bit), so each weight is one of 0, 0.5, 1, 1.5, 2, 3, 4 or 6, with a sign. Every group of 32 consecutive weights shares one 8-bit power-of-two scale (e8m0), and a weight’s value is its e2m1 value times that scale. Figure 3 below shows how one group is quantized and packed.
Figure 3. MXFP4 packing and decoding: one shared power-of-two scale per 32 weights, 4-bit e2m1 codes, two codes per byte, 4.25 bits per weight, and exact dequantization by an exponent shift.
In the checkpoint, each expert matrix is a uint8 tensor of packed codes, two per byte, and a uint8 tensor of
scale exponents, one per 32 weights. This GLM-5.3-Flash checkpoint was produced with AMD Quark.
MXFP4 and FP8 Compared#
The following table compares the two formats as this post uses them:
Property |
FP8 block (this FP8 checkpoint) |
MXFP4 |
|---|---|---|
Element |
e4m3, 8 bits |
e2m1, 4 bits |
Scale |
one FP32 value per 128x128 block |
one 8-bit power of two per 32 weights |
Storage per weight |
about 8 bits |
4.25 bits |
Representable values per element |
256 codes, largest 448 (240 in gfx942’s e4m3fnuz encoding) |
0, 0.5, 1, 1.5, 2, 3, 4, 6 and negatives |
GLM-5.3-Flash checkpoint |
306 GB |
173 GB |
Native matrix instructions |
gfx942 and gfx950 |
gfx950 (AMD Instinct MI350 Series); none on gfx942 |
MXFP4 halves the storage per weight, which increases the memory available for KV cache and halves the weight traffic of memory-bound decode. Its scales are fine-grained and exact: one power of two per 32 weights confines the effect of an outlier to its group, and applying the scale amounts to an exponent addition. Its limitations are the eight magnitudes available per element, which make quality a property of the checkpoint that must be measured, and the absence of native compute on gfx942. FP8 is natively supported and mature on gfx942 and offers finer per-element precision, at twice the storage and with a single coarse scale per 128x128 block. The rest of this section shows how MXFP4’s memory advantage can be retained on gfx942 while computing with FP8’s native instructions.
Execution Strategies for 4-bit Weights on gfx942#
Because no gfx942 matrix instruction consumes MXFP4, three implementation strategies are available. Requantization to INT4 with one scale per 32 weights loses about 10.5% of weight precision, because every group in this checkpoint uses the full e2m1 range. Dequantization to BF16 on every call is exact but slow. The third strategy retains 4-bit storage and decodes e2m1 exactly inside the expert kernel: we added a byte-permute lookup to AITER’s FlyDSL W4A16 MoE kernel, which attains BF16-level error (0.0026 relative) against the exact MXFP4 result. AITER has since merged an equivalent gfx942 e2m1 decode in its FlyDSL A16W4 MoE kernel (ROCm/aiter#6995), which an open vLLM pull request (vllm-project/vllm#64640) exposes as an opt-in MoE backend. This strategy suits decode, where weight traffic dominates. Prefill, however, is compute-bound, and BF16 arithmetic made MXFP4 prefill slower than FP8 at every shape we measured. The solution for prefill follows from a property of the checkpoint itself.
Exact FP8 Representation of the MXFP4 Experts#
An FP8 (e4m3) value has four exponent bits and three mantissa bits. Consider one 128x128 block of an MXFP4 expert matrix: it contains 128 x 4 groups of 32 weights, each with its own scale. Assign the FP8 block a single power-of-two scale of 2(emax − 5), where emax is the largest group exponent in the block. Every e2m1 value of every group then lies exactly on the e4m3 grid, provided that the group exponents within the block span at most 11 binades, that is, 11 powers of two: within that span, the FP8 exponent absorbs the difference between each group’s scale and the block scale, and the single mantissa bit of e2m1 fits within the three of e4m3.
Whether this condition holds depends on the checkpoint, so we verified it exhaustively. Figure 4 below shows the result of a scan of every routed-expert matrix.

Figure 4. Spread of group scale exponents inside each 128x128 block, over all 37,152 routed-expert matrices. The largest spread is 8; exact conversion holds up to 11.
Across 18.6 million blocks the largest spread is 8 binades, and almost all blocks span one or two. Every MXFP4 expert of GLM-5.3-Flash is therefore exactly representable as an FP8 block matrix, and the FP8 model’s tuned kernels can execute it on the MXFP4 checkpoint’s exact values.
One Checkpoint, Two Execution Modes#
Two vLLM switches apply this conversion at load time. VLLM_ROCM_MXFP4_MOE_FP8BLOCK=1 converts the routed experts
to FP8 blocks and passes them to the standard FP8 block MoE path, and VLLM_ROCM_MXFP4_DENSE_FP8BLOCK=1 does the
same for the shared experts on the FP8 per-block linear kernel. Both conversions verify every value with an exact
equality test and reject any block that does not convert exactly. Activations receive the same per-128 FP8
quantization as in the FP8 model.
The two legs then select different execution modes from the same checkpoint, as the following table shows:
Leg |
Routed experts run as |
Why |
|---|---|---|
Prefill |
exact FP8 blocks |
FP8 matrix instructions; prefill memory is not the constraint |
Decode |
4-bit, exact e2m1 decode in FlyDSL |
38.84 GiB of weights per GPU instead of 54.32 GiB, so more KV cache |
Decode (alternative) |
exact FP8 blocks |
decode step time matches FP8, at FP8 KV capacity |
The load logs identify the active mode: the prefill leg reports “MXFP4 MoE experts converted exactly to FP8 128x128 blocks”, and the decode leg reports “MXFP4 MoE experts on AITER FlyDSL W4A16 with exact e2m1 decode”.
Results: MXFP4 Against FP8 on MI325X#
All comparisons in this section use the same image, the same node pair for each comparison, and fresh servers for every phase. The MXFP4 configuration runs the checkpoint on both legs as described above.
Accuracy#
The following table shows accuracy over three repeats on two node pairs (mean and range):
Metric |
FP8 both legs |
MXFP4 both legs |
|---|---|---|
GSM8K full (1,319 questions), strict match |
97.32% [97.12 to 97.42] |
97.32% [97.12 to 97.50] |
Random NIAH, 160 probes, 16K to 128K |
160 of 160, every run |
160 of 160, every run |
Random NIAH, 18 probes, 241K to 704K |
18 of 18, every run |
18 of 18, every run |
Probes answered differently |
0 |
Each NIAH probe hides a random seven-digit number at a random depth in a varied haystack with distractor numbers, and both checkpoints see identical seeded prompts, so the comparison is paired.
Serving Performance and Agentic Throughput#
The following table compares serving performance at fixed shapes (three-repeat means, October 2026); these are supporting measurements, not performance claims:
Input / output tokens, concurrency |
FP8 TTFT / TPOT |
MXFP4 TTFT / TPOT |
Difference |
|---|---|---|---|
256K / 1K, 1 |
28.50 s / 10.38 ms |
28.37 s / 10.84 ms |
TTFT −0.5%, TPOT +4.4% |
256K / 1K, 8 |
45.07 s, 141.2 output tokens/s |
44.50 s, 137.9 output tokens/s |
TTFT −1.3%, throughput −2.3% |
512K / 1K, 1 |
60.80 s / 10.99 ms |
60.63 s / 10.63 ms |
TTFT −0.3%, TPOT −3% |
512K / 1K, 8 |
92.13 s, 76.8 output tokens/s |
91.37 s, 77.3 output tokens/s |
TTFT −0.8%, throughput +0.7% |
Fixed shapes constitute a narrow test; the more representative comparison uses agentic traffic. AgentX replays recorded multi-turn coding-agent sessions against the router at concurrency 16 for 900 measured seconds, with prefix caching enabled. Figure 5 below shows total throughput over all valid runs.

Figure 5. AgentX total throughput on 16 GPUs: FP8 over five runs, MXFP4 over three; bars are means, whiskers the range.
MXFP4 achieves 37,072 tokens/s on the 256K profile against 37,513 for FP8 (−1.2%), and 45,987 against 45,466 on the 512K profile (+1.1%). Both differences lie within FP8’s own run-to-run range, and inter-token latency differs by less than 1%.
KV-Cache-Bound Workloads#
At concurrency 16, decode KV utilization remains below 10%, so the additional capacity is unused. The situation differs when many long sessions share context, as in sub-agent fan-out: 120 concurrent requests, each consisting of a shared 480K-token prefix, 8K unique tokens and 4K output tokens. Prefill caches the prefix once per rank, but decode holds a full copy per request, so FP8 decode accommodates 13 requests per GPU and MXFP4 accommodates 15. Figure 6 below shows the effect.

Figure 6. KV-bound capacity test, 120 concurrent requests over a shared 480K prefix: throughput, mean TTFT, and requests running on decode.
Metric (second run) |
FP8 |
MXFP4 |
Difference |
|---|---|---|---|
Output throughput |
2,095.9 tokens/s |
2,372.6 tokens/s |
+13.2% |
Mean TTFT |
70.7 s |
60.1 s |
−15.1% |
Requests running on decode, maximum |
104 |
120 |
|
Requests waiting for decode, maximum |
16 |
4 |
|
Preemptions |
0 |
0 |
A first run on a different node pair measured +6.1% throughput and the same −15% mean TTFT, so the throughput gain is up to 13%. In both runs FP8 queues requests on decode whereas MXFP4 admits them; this admission difference is the mechanism, and the magnitude of the throughput gain depends on the depth of the FP8 queue.
Analysis of the Decode Gap#
The expert shapes of GLM-5.3-Flash had no tuned AITER configurations, so every decode lookup fell back to a heuristic. Because AITER’s tuner does not support this quantization type on gfx942, we evaluated every registered FlyDSL candidate through the runtime’s own configuration lookup with real top-8 routing. Interleaved A/B timing shows faster expert kernels at every decode batch size from 1 to 128 tokens per GPU, with no regressions.
Even after tuning, a 4-bit decode step remains 3.3 to 4.1% slower than FP8, whereas the same checkpoint with FP8-block decode experts matches FP8. Step time is defined here as TPOT multiplied by one plus the MTP acceptance rate, which removes run-to-run variation in draft acceptance. Figure 7 below shows the comparison.

Figure 7. Decode step time relative to FP8 at concurrency 8: 4-bit decode experts against FP8-block decode experts, same checkpoint.
A PyTorch profiler trace of the production decode path, including kernels inside HIP graphs, attributes the gap. The following table summarizes it per decode step:
Kernel family, µs per decode step |
FP8-block experts |
4-bit experts |
Difference |
|---|---|---|---|
Routed-expert matrix multiplies |
2,788 |
4,017 |
+1,229 (+44%) |
Expert activation quantization (FP8 path only) |
743 |
327 |
−416 |
Expert-parallel collectives (including waiting) |
3,939 |
2,839 |
−1,100 |
All other kernels |
about equal |
about equal |
at most +70 each |
At 16 tokens per GPU, the 4-bit kernel requires 95.6 µs per MoE layer against 64.8 µs for the tuned FP8 kernel. In its first stage, the 4-bit kernel streams about 109 MB of weights in 67.5 µs, about 1.6 TB/s, whereas the FP8 kernel streams about 218 MB in 42 µs, about 5.2 TB/s: the 4-bit kernel reads half the bytes at less than a third of the bandwidth. An isolated benchmark had suggested the opposite ordering, because its FP8 baseline was not the tuned kernel that vLLM selects. The gap is therefore one of kernel efficiency rather than of the format.
MXFP4 on MI300X#
On MI300X, with 192 GB per GPU, the 15.5 GiB weight saving yields up to 31% more KV cache per GPU. Figure 8 below shows the decode-leg KV cache per GPU on each platform, comparing the two checkpoints on that platform.

Figure 8. Decode-leg KV cache per GPU at gpu-memory-utilization 0.6: FP8 against MXFP4 with 4-bit routed experts, on MI325X and MI300X. Each platform compares the two checkpoints; the two platforms are not compared.
Disaggregated on MI300X#
With the same 1P1D recipe as on MI325X, the following table reports the results on MI300X; apart from the KV capacity, these are supporting measurements, not performance claims:
Metric |
FP8 both legs |
MXFP4 both legs |
|---|---|---|
Decode KV tokens per GPU |
3,708,131 |
4,852,307 (+31%) |
GSM8K full, strict match |
97.19% |
97.35% |
Random NIAH, 160 probes (16K to 128K) / 18 probes (241K to 704K) |
160 / 18 |
160 / 18, 0 probes differ |
256K, concurrency 1: TTFT / TPOT |
34.0 s / 10.61 ms |
33.9 s / 10.94 ms |
256K, concurrency 8: TTFT / output tokens/s |
59.9 s / 109.8 |
60.0 s / 106.8 |
512K, concurrency 1: TTFT / TPOT |
74.2 s / 11.01 ms |
74.4 s / 11.29 ms |
512K, concurrency 8: TTFT / output tokens/s |
146.9 s / 50.0 |
152.0 s / 48.6 |
Accuracy is equivalent: GSM8K differs by 0.16 percentage points and every needle probe is answered identically. TTFT is at parity, and single-request decode TPOT is 2.5 to 3.1% higher with 4-bit experts, reflecting the same kernel gap as on MI325X. This table was measured on a different MI300X node pair and a later build than the FP8 baseline table above; at 512K with eight concurrent requests its FP8 TTFT is 146.9 s against 109.0 s there, and we did not isolate the cause, so comparisons in this post are made only within one table. The KV-bound test is scaled to MI300X: 72 concurrent requests over the shared 480K prefix, or 9 per decode GPU, which the MXFP4 KV cache accommodates and the FP8 KV cache, at about 7 per GPU, does not.
KV-bound test, 72 concurrent requests |
FP8 |
MXFP4 |
Difference |
|---|---|---|---|
Requests completed |
144 of 144 |
144 of 144 |
|
Mean TTFT |
95.8 s |
75.0 s |
−22% |
P90 TTFT |
192.3 s |
145.0 s |
−25% |
Output throughput |
1,133.5 tokens/s |
1,128.7 tokens/s |
parity |
Requests running on decode, maximum |
56 |
72 |
|
Requests waiting for decode, maximum |
16 |
6 |
The mechanism matches MI325X: FP8 decode saturates at 56 running requests and queues the remainder, whereas MXFP4 admits all 72. On MI300X the additional requests share each decode step, so time per output token increases (39.2 against 31.3 ms) and total throughput is unchanged, while mean time to first token decreases by about one fifth.
Lower Time to First Token for Agentic Sessions#
Agentic traffic repeatedly submits a growing shared prefix: each turn of a coding session carries the entire conversation so far plus a short new tail. Two serving options on the same image, applicable to FP8 and MXFP4 alike, reduce the time to first token of such sessions.
The first is the prefill layout. Most single-request TTFT is spent in per-rank computation outside the experts (the KDA and MLA layers, dense projections and shared experts), and a request prefills on one data-parallel rank, so distributing attention across GPUs shortens it. A four-way tensor-parallel prefill layout (TP4 x DP2) required replicating the dense MLP layers under sequence parallelism and a MoRIIO extension that gathers the head-sharded KDA state from four prefill ranks into one decode rank. Figure 9 below shows that it lowers single-request TTFT but, with two prefill replicas instead of eight, gives up throughput when several long prompts arrive at once; EP8 remains the throughput-oriented layout.

Figure 9. TTFT and output throughput for EP8 and TP4 x DP2 prefill, FP8, same node pair, decode DP8 in both. Supporting measurements, not performance claims.
The second is prefix-state retention. Unlike attention KV, the recurrent state of the 34 KDA layers cannot be
reconstructed from cached blocks: a request can resume only at a position where a KDA state was saved, the
exact-match constraint that Marconi analyzes for hybrid models. By default, the second turn of a session finds no
saved state at the end of the shared prefix and prefills it again. vLLM’s --prefix-cache-retention-interval 17408
option on the prefill leg retains a KDA state every four 4352-token blocks, so the second turn resumes from the last
retained state, as a probe on one prefill rank with a 128K prompt shows:
Request |
Cached tokens, default |
TTFT, default |
Cached tokens, retention 17408 |
TTFT, retention 17408 |
|---|---|---|---|---|
Turn 1 (cold) |
0 |
14.4 s |
0 |
14.5 s |
Turn 2 (same prefix, new tail) |
0 |
13.6 s |
104,448 |
3.3 s |
Turn 3 |
108,800 |
2.8 s |
108,800 |
2.8 s |
Upstream vLLM has since refined this mode to also keep the prompt-end checkpoint under sparse retention (vllm-project/vllm#59146); the pinned build predates that change.
With both options, 256K median TTFT on MI325X is 1.8 to 3.5 s at one to eight concurrent AgentX sessions, and one prefill node serves up to 14 concurrent users at 256K context, for both the FP8 and the MXFP4 checkpoint (endnote 8). A paired needle-in-a-haystack sweep with identical seeds, 460 needles from 16K to 704K tokens, scores 460 of 460 for both checkpoints on MI325X and MI300X. The per-concurrency results, the capacity criteria and the MI300X results are on the results page of ROCm/MAD PR #288.
When to Use the MXFP4 Checkpoint#
The following table summarizes the regimes in which the MXFP4 checkpoint is advantageous on MI300X and MI325X:
Workload |
MXFP4 against FP8 |
Reason |
|---|---|---|
Many concurrent long-context sessions; sub-agent fan-out over shared context (MI325X) |
Advantage: up to 13% higher throughput and 15% lower mean TTFT |
Decode KV capacity is the limit, and MXFP4 provides up to 17% more |
Many concurrent long-context sessions; sub-agent fan-out over shared context (MI300X) |
Advantage: 22% lower mean TTFT |
Decode KV capacity is the limit, and MXFP4 provides up to 31% more |
Agentic multi-turn serving at moderate concurrency |
Parity, with KV headroom |
Throughput within 1.2%; KV usage stays low |
One artifact to ship and stage |
173 GB against 306 GB |
Smaller download and less storage per node |
Single-request latency, short prompts, prefill-heavy batches |
Parity |
Prefill runs FP8 matrix instructions either way |
Single node with colocated prefill and decode, 4-bit experts |
Not recommended |
The 4-bit kernel would also compute the large prefill batches; use FP8-block experts there, or disaggregate |
How to Use It#
The recipe is packaged in ROCm/MAD PR #288, which builds on the FP8 recipe of
ROCm/MAD PR #274. Its Dockerfile builds vLLM, AITER, MoRI and vllm-router from
pinned commits on AMD ROCm™ 7.2, with build-time checks for every fix, and its harness cards run accuracy, needle,
long-context and agentic tests for both checkpoints, GLM-5.3-Flash-{FP8,MXFP4}-gfx942 (EP8 prefill) and
GLM-5.3-Flash-{FP8,MXFP4}-gfx942-hyb (TP4 x DP2 prefill with retention).
First, build the image from the PR’s Dockerfile. The build compiles every component from source and needs no other input; it fails if any of the pinned fixes is missing:
git clone https://github.com/ROCm/MAD && cd MAD
git fetch origin pull/288/head:glm53-flash && git checkout glm53-flash
docker build --ulimit nofile=1048576:1048576 \
-f docker/vllm_disagg_inference.glmv53flash.gfx942.ubuntu.amd.Dockerfile \
-t <your-registry>/vllm-disagg:glmv53flash-gfx942 .
The prefill and decode legs run on different nodes, and each node starts the same image. Push the image to a registry that every node can reach, or build it on each node:
docker login <your-registry>
docker push <your-registry>/vllm-disagg:glmv53flash-gfx942
Then, on a Slurm cluster with one prefill node and one decode node, a card runs as follows (MI325X with Broadcom NICs also needs the NIC settings described in the PR):
cd scripts/vllm_dissag
export DOCKER_IMAGE_NAME=<your-registry>/vllm-disagg:glmv53flash-gfx942 CONNECTOR=moriio WIDE_EP=1 xP=1 yD=1
export MODEL_NAME=GLM-5.3-Flash-MXFP4-gfx942 MODEL_WEIGHTS_NAME=GLM-5.3-Flash-MXFP4
export BENCHMARK_SCRIPT=agentic # or niah, long_context, sweep
sbatch -N 2 -n 2 --nodelist=<prefill_node>,<decode_node> run_xPyD_models.slurm
The MXFP4 configuration is selected per leg. Both legs set VLLM_ROCM_MXFP4_WEIGHT_ONLY=1,
AITER_FLYDSL_W4_FP4=1 and VLLM_ROCM_MXFP4_DENSE_FP8BLOCK=1; the prefill leg also sets
VLLM_ROCM_MXFP4_MOE_FP8BLOCK=1. The load-log lines listed earlier confirm the mode on each leg, and the PR’s
README lists every other setting. A release build with the same pins as the Dockerfile reproduces the MXFP4 KV
capacity exactly, and the agentic and capacity results were measured on it.
The serving fixes are on public branches, listed under System Configuration, and are not yet merged upstream. AITER now contains an equivalent gfx942 e2m1 decode (ROCm/aiter#6995), vLLM #64640 proposes an opt-in MoE backend on it, and the prefix-cache retention option is part of upstream vLLM (vllm-project/vllm#52216). The exact FP8-block conversion of MXFP4 experts is available in our public vLLM fork, listed under System Configuration, and is not yet upstream.
Summary#
In this blog you explored how to serve GLM-5.3-Flash, a model that combines sparse latent attention, linear attention and a 288-expert MoE, with prefill-decode disaggregation on AMD Instinct MI300X and MI325X GPUs. You saw why every one of its 37,152 MXFP4 expert matrices converts exactly into FP8 128x128 blocks, and how a single 4-bit checkpoint then runs two ways: prefill executes the FP8 model’s tuned kernels on bit-exact MXFP4 weights, while decode keeps the experts in 4 bits. You also saw how to retain KDA states for agentic sessions, so that a session’s second request reuses its shared prefix instead of prefilling it again.
For your own deployments, this means that GPUs without FP4 matrix instructions can still serve the smaller MXFP4 checkpoint without giving up accuracy: it matches FP8 accuracy, delivers agentic throughput within 1.2% of FP8, and frees 15.5 GiB per GPU for up to 17% more KV cache on MI325X. On MI300X, it gives up to 31% more. When decode KV capacity is the bottleneck, as with many concurrent long-context sessions over a shared context, this yields up to 13% higher output throughput on MI325X. On MI300X, it yields 22% lower mean TTFT. Where it is not, the 4-bit decode step costs 3.3 to 4.1% against FP8, and the table in When to Use the MXFP4 Checkpoint helps you choose between the two checkpoints.
Follow the DI Series on the AMD ROCm Blogs for further posts on serving large mixture-of-experts models on AMD Instinct GPUs. To try the recipe now, build the image and run the cards of ROCm/MAD PR #288; questions and results are welcome on that pull request.
Additional Resources#
The following posts in this series cover related deployments:
AMD ROCm Blog: DI Series, Scaling GLM-5.1-FP8 to 64 MI300X GPUs: the first post in the series.
AMD ROCm Blog: DI Series, Serving Kimi-K3 MXFP4 Wide-EP Disaggregated on MI300X and MI325X: the second post, with a different route to MXFP4 on gfx942.
The following code and pull requests back the work in this post:
ROCm/MAD PR #274: the GLM-5.3-Flash-FP8 disaggregated recipe.
ROCm/MAD PR #288: the GLM-5.3-Flash-MXFP4 and TP4 x DP2 + retention cards on the same image.
ROCm/aiter PR #3913: the gfx942 FlyDSL FP8 MQA-logits indexer kernel.
ROCm/aiter PR #6995 and vllm-project/vllm PR #64640: the upstream FlyDSL A16W4 MoE kernel with gfx942 e2m1 decode, and an opt-in vLLM backend on it.
vllm-project/vllm PR #59146: prompt-end checkpoints under sparse prefix-state retention.
vllm-project/router PR #313: per-data-parallel-rank prefill routing.
ROCm/mori: the MoRIIO KV transfer connector used here, and the MoRI-EP expert dispatch.
AgentX: the agentic replay benchmark used in this post.
The following papers and specifications describe the techniques and formats this deployment relies on:
GLM-5 Team, GLM-5: from Vibe Coding to Agentic Engineering, arXiv:2602.15763: the GLM-5 model family, with the GLM-5.3-Flash model card for the hybrid attention layout.
Kimi Team, Kimi Linear: An Expressive, Efficient Attention Architecture, arXiv:2510.26692: Kimi Delta Attention, the linear-attention layer of 34 of the 45 layers.
DeepSeek-AI, DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models, arXiv:2512.02556: DeepSeek Sparse Attention and its indexer.
OCP Microscaling Formats (MX) Specification v1.0: the MXFP4 format the checkpoint ships in.
AMD Instinct MI300 CDNA 3 Instruction Set Architecture: the matrix instructions available on gfx942.
Rouhani et al., Microscaling Data Formats for Deep Learning, arXiv:2310.10537: the evaluation of the MX formats, MXFP4 included.
DeepSeek-AI, DeepSeek-V3 Technical Report, arXiv:2412.19437: Multi-head Latent Attention, multi-token prediction and wide expert parallelism.
Pan et al., Marconi: Prefix Caching for the Era of Hybrid LLMs, MLSys 2025, arXiv:2411.19379: why prefix caching in hybrid models can only resume from a saved recurrent state.
Zhong et al., DistServe, OSDI 2024, arXiv:2401.09670: the prefill-decode disaggregation principle.
Kwon et al., Efficient Memory Management for Large Language Model Serving with PagedAttention, SOSP 2023, arXiv:2309.06180: the vLLM serving engine and KV cache manager.
System Configuration#
The following sections list the hardware, serving settings, and software pins used for every measurement in this post.
Hardware#
The following table lists the hardware used on each platform:
Component |
MI325X |
MI300X |
|---|---|---|
Accelerator |
AMD Instinct MI325X (gfx942) |
AMD Instinct MI300X (gfx942) |
HBM per GPU |
256 GB HBM3E |
192 GB HBM3 |
GPUs per node |
8 |
8 |
Nodes per deployment |
2 (1 prefill, 1 decode) |
2 (1 prefill, 1 decode) |
Host CPU |
2x AMD EPYC™ 9575F (64 cores each) |
2x Intel® Xeon® Platinum 8480+ |
System memory |
3 TiB |
2 TiB |
Operating system |
Ubuntu 22.04.5 LTS, Linux 6.8.0-124 |
Ubuntu 22.04.5 LTS, Linux 5.15.0-1074 |
GPU driver |
amdgpu 6.19.14 |
amdgpu 6.14.14 |
Fabric |
Broadcom Thor2 400G RoCE v2, 7 to 8 rails used |
NVIDIA ConnectX-7 (mlx5), 8 rails |
Intra-node |
xGMI |
xGMI |
Serving Configuration#
Both platforms use the same image and recipe: gpu-memory-utilization 0.6, max-model-len 760000, KV
block size 4, MTP with one draft token on both legs, eager prefill and FULL_AND_PIECEWISE decode graphs
with capture sizes 1 to 64. The MXFP4 switches are listed under How to Use It.
Software#
The following table lists the software pins:
Component |
Pin |
|---|---|
vLLM |
|
AITER |
|
MoRI |
|
vllm-router |
|
Base image |
|
Dockerfile |
|
Models |
|
Endnotes#
Based on AMD internal testing as of October 2026, on 16 AMD Instinct™ MI325X GPUs (256 GB HBM3E per GPU) across two 8-GPU nodes, running a 1-prefill / 1-decode disaggregated setup (EP8 per node) with vLLM, AITER and AMD MoRI (MoRIIO) over Broadcom® Thor2 400G RoCE v2. Models tested: zai-org/GLM-5.3-Flash (FP8) and amd/GLM-5.3-Flash-Quark-MXFP4. Benchmarks: the full GSM8K set (1,319 questions, strict match), ran three times on two node pairs; and seeded random needle-in-a-haystack, with 160 probes at 16K-128K tokens and 18 probes at 241K-704K tokens, using identical seeds for both checkpoints. System manufacturers may vary configurations, yielding different results.
Testing as of October 2026 by AMD on 16 AMD Instinct™ MI300X GPUs (192 GB HBM3 per GPU) across two 8-GPU nodes, running a 1-prefill / 1-decode disaggregated setup (EP8 per node) with vLLM, AITER and AMD MoRI (MoRIIO) over NVIDIA® ConnectX®-7. Models tested: zai-org/GLM-5.3-Flash (FP8) and amd/GLM-5.3-Flash-Quark-MXFP4. Benchmarks: the full GSM8K set (1,319 questions, strict match), run once per checkpoint; and seeded random needle-in-a-haystack, with 160 probes at 16K-128K tokens and 18 probes at 241K-704K tokens, using identical seeds for both checkpoints. System manufacturers may vary configurations, yielding different results.
Testing as of October 2026 by AMD on 16 AMD Instinct™ MI325X GPUs (256 GB HBM3E per GPU) across two 8-GPU nodes, running a 1-prefill / 1-decode disaggregated setup (EP8 per node) with vLLM, AITER and AMD MoRI (MoRIIO) over Broadcom® Thor2 400G RoCE v2. Models tested: zai-org/GLM-5.3-Flash (FP8) and amd/GLM-5.3-Flash-Quark-MXFP4. Measurement: decode-node weight memory and KV-cache capacity reported by vLLM at gpu-memory-utilization 0.6 and max-model-len 760000, MXFP4 with 4-bit decode experts against FP8. System manufacturers may vary configurations, yielding different results.
Testing as of October 2026 by AMD on 16 AMD Instinct™ MI300X GPUs (192 GB HBM3 per GPU) across two 8-GPU nodes, running a 1-prefill / 1-decode disaggregated setup (EP8 per node) with vLLM, AITER and AMD MoRI (MoRIIO) over NVIDIA® ConnectX®-7. Models tested: zai-org/GLM-5.3-Flash (FP8) and amd/GLM-5.3-Flash-Quark-MXFP4. Measurement: decode-node weight memory and KV-cache capacity reported by vLLM at gpu-memory-utilization 0.6 and max-model-len 760000, MXFP4 with 4-bit decode experts against FP8. System manufacturers may vary configurations, yielding different results.
Testing as of October 2026 by AMD on 16 AMD Instinct™ MI325X GPUs (256 GB HBM3E per GPU) across two 8-GPU nodes, running a 1-prefill / 1-decode disaggregated setup (EP8 per node) with vLLM, AITER and AMD MoRI (MoRIIO) over Broadcom® Thor2 400G RoCE v2. Models tested: zai-org/GLM-5.3-Flash (FP8) and amd/GLM-5.3-Flash-Quark-MXFP4. Benchmark: KV-bound capacity test, with 120 concurrent requests, each made up of a shared 480K-token prefix, 8K unique tokens and 4K output tokens, run twice on two node pairs. System manufacturers may vary configurations, yielding different results.
Testing as of October 2026 by AMD on 16 AMD Instinct™ MI300X GPUs (192 GB HBM3 per GPU) across two 8-GPU nodes, running a 1-prefill / 1-decode disaggregated setup (EP8 per node) with vLLM, AITER and AMD MoRI (MoRIIO) over NVIDIA® ConnectX®-7. Models tested: zai-org/GLM-5.3-Flash (FP8) and amd/GLM-5.3-Flash-Quark-MXFP4. Benchmark: KV-bound capacity test, with 72 concurrent requests (9 per decode GPU), each made up of a shared 480K-token prefix, 8K unique tokens and 4K output tokens. System manufacturers may vary configurations, yielding different results.
Testing as of October 2026 by AMD on 16 AMD Instinct™ MI325X GPUs (256 GB HBM3E per GPU) across two 8-GPU nodes, running a 1-prefill / 1-decode disaggregated setup (EP8 per node) with vLLM, AITER and AMD MoRI (MoRIIO) over Broadcom® Thor2 400G RoCE v2. Models tested: zai-org/GLM-5.3-Flash (FP8) and amd/GLM-5.3-Flash-Quark-MXFP4. Benchmark: AgentX replay of recorded multi-turn coding-agent sessions (256K and 512K profiles) at concurrency 16 for 900 measured seconds with prefix caching; five runs for FP8 and three runs for MXFP4. System manufacturers may vary configurations, yielding different results.
Testing as of October 2026 by AMD on 16 AMD Instinct™ MI325X GPUs (256 GB HBM3E per GPU) across two 8-GPU nodes, running a 1-prefill / 1-decode disaggregated setup (EP8 per node) with vLLM, AITER and AMD MoRI (MoRIIO) over Broadcom® Thor2 400G RoCE v2. Models tested: zai-org/GLM-5.3-Flash (FP8) and amd/GLM-5.3-Flash-Quark-MXFP4. Prefill ran as TP4 x DP2 with
--prefix-cache-retention-interval 17408. Benchmarks: AgentXconformance_256kreplay at concurrency 1, 2, 4 and 8, 900 measured seconds per step, with the aiperf client outside the serving nodes; and a capacity test with an 87.5% shared prefix per user and 1,024 output tokens, with pass criteria of TTFT p50 <= 20 s (256K), output speed p50 >= 60 tok/s per user and 0 errors. System manufacturers may vary configurations, yielding different results.Testing as of September 2026 by AMD on 16 AMD Instinct™ MI325X GPUs, configured as one 8-GPU prefill node and one 8-GPU decode node (EP8 per node), serving zai-org/GLM-5.3-Flash (FP8) with vLLM, AITER and AMD MoRI (MoRIIO). Benchmark:
vllm bench servewith random data, 256K / 1K and 512K / 1K tokens at concurrency 1 and 8, with two warm-up requests per point. System manufacturers may vary configurations, yielding different results.Testing as of September 2026 by AMD on 16 AMD Instinct™ MI300X GPUs, configured as one 8-GPU prefill node and one 8-GPU decode node (EP8 per node), serving zai-org/GLM-5.3-Flash (FP8) with vLLM, AITER and AMD MoRI (MoRIIO). Benchmark:
vllm bench servewith random data, 256K / 1K and 512K / 1K tokens at concurrency 1 and 8, with two warm-up requests per point. System manufacturers may vary configurations, yielding different results.Testing as of October 2026 by AMD on 16 AMD Instinct™ MI325X GPUs (256 GB HBM3E per GPU) across two 8-GPU nodes, running a 1-prefill / 1-decode disaggregated setup (EP8 per node) with vLLM, AITER and AMD MoRI (MoRIIO) over Broadcom® Thor2 400G RoCE v2. Models tested: zai-org/GLM-5.3-Flash (FP8) and amd/GLM-5.3-Flash-Quark-MXFP4. Benchmark:
vllm bench serve, 256K / 1K and 512K / 1K at concurrency 8. Decode step time = TPOT x (1 + MTP acceptance rate); kernel time comes from a PyTorch profiler trace of the decode path, including HIP graphs. System manufacturers may vary configurations, yielding different results.
Disclaimers#
The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions, and typographical errors. The information contained herein is subject to change and may be rendered inaccurate for many reasons, including but not limited to product and roadmap changes, component and motherboard version changes, new model and/or product releases, product differences between differing manufacturers, software changes, BIOS flashes, firmware upgrades, or the like. Any computer system has risks of security vulnerabilities that cannot be completely prevented or mitigated. AMD assumes no obligation to update or otherwise correct or revise this information. However, AMD reserves the right to revise this information and to make changes from time to time to the content hereof without obligation of AMD to notify any person of such revisions or changes. THIS INFORMATION IS PROVIDED “AS IS.” AMD MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE CONTENTS HEREOF AND ASSUMES NO RESPONSIBILITY FOR ANY INACCURACIES, ERRORS, OR OMISSIONS THAT MAY APPEAR IN THIS INFORMATION. AMD SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILL AMD BE LIABLE TO ANY PERSON FOR ANY RELIANCE, DIRECT, INDIRECT, SPECIAL, OR OTHER CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF ANY INFORMATION CONTAINED HEREIN, EVEN IF AMD IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. AMD, the AMD Arrow logo, AMD CDNA, AMD EPYC, ROCm, Instinct, and combinations thereof are trademarks of Advanced Micro Devices, Inc. Broadcom is a trademark of Broadcom Inc. NVIDIA and ConnectX are trademarks of NVIDIA Corporation. Intel and Xeon are trademarks of Intel Corporation. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies. © 2026 Advanced Micro Devices, Inc. All rights reserved.
Third-party content is licensed to you directly by the third party that owns it and is not licensed to you by AMD. Benchmark results are measured on AMD Instinct™ MI300X and MI325X (gfx942); actual performance may vary based on configuration, software versions, drivers, and optimizations.