docs(cookbook): add AMD MI300X/MI325X/MI355X support for GLM-5.2 - #28471
Conversation
GLM-5.2 shares the GLM-5.1 / DeepSeek-V3.2 (glm_moe_dsa) architecture, so the validated GLM-5.1 ROCm recipe carries over with only the model path changed. Adds AMD to the GLM-5.2 cookbook: - Deploy panel (glm-5.2.jsx): mi300x/mi325x/mi355x in supportedHardware, ROCm docker images, and single-node TP8 FP8/BF16 cells using the DSA tilelang backend (--dsa-prefill-backend/--dsa-decode-backend tilelang, --chunked-prefill-size 131072, --watchdog-timeout 1200). DSA-prefill CP is disabled on AMD (verified on Hopper only). - No MTP on AMD: EAGLE spec-decode kernel does not yet build for gfx950, so AMD cells omit the --speculative-* flags (documented in Config Tips). - FP8 on MI355X validated end-to-end (serves at TP8 via DSA tilelang). Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
zijiexia
left a comment
There was a problem hiding this comment.
As AMD currently not support MTP, can we disable MTP in playground for AMD? Also the three strategies for amd seems identical.
| ], | ||
| }, | ||
| { | ||
| match: { hw: "mi300x", variant: "default", quant: "bf16", strategy: "low-latency", nodes: "single" }, |
There was a problem hiding this comment.
Does the bf16 fit in single node mi300x? might need multinodes
| { id: "cp", label: "CP (DSA prefill)", values: [null, 1, 2, 4, 8], | ||
| disable: { hw: ["b200", "gb300", "b300"] }, | ||
| disable: { hw: ["b200", "gb300", "b300", "mi355x", "mi325x", "mi300x"] }, | ||
| disableReason: "DSA prefill Context Parallel is verified on Hopper (H200); the Blackwell sm100 DSA-CP FP8 rope kernel is not yet adapted." }, |
There was a problem hiding this comment.
Can we add disable reason for AMD?
…te strategies, drop MI300X BF16 - Disable EAGLE/MTP options in the Speculative card for AMD (gfx950 spec kernel unsupported; DSA nextn draft is CUDA-only). - Add AMD to the CP knob's disable reason. - Differentiate the three AMD strategies via batch levers (cuda-graph-max-bs / max-running-requests / chunked-prefill); only the MI355X FP8 low-latency cell stays verified, the rest are inferred. - Remove MI300X BF16 single-node cells — 1.51 TB weights do not fit 1.5 TB HBM; keep MI325X/MI355X BF16 which do fit. Update MDX accordingly. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
|
Thanks for the review @zijiexia! Addressed all three points in 3530557:
Also extended the CP knob's |
…cells unverified A diffuse numerical bug in AMD aiter's gemm_a8w8_blockscale_bpreshuffle GEMM silently corrupts GLM-5.2 block-FP8 output on MI350X/MI355X (gfx950) in current SGLang ROCm images (GSM8K ~0; in-context reasoning broken), while gfx942 (MI300X/MI325X) is unaffected. Add a Warning callout, correct the MTP note (MTP works on gfx950 once the block-FP8 fix is applied), and set all AMD cells to verified:false until a fixed image ships. The deployment configs themselves are correct. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
|
Heads-up: while validating this recipe I found a base-accuracy bug affecting GLM-5.2-FP8 on gfx950 (MI350X/MI355X) in current SGLang ROCm images, and updated the PR accordingly. What's wrong: block-FP8 linear layers route to aiter's Evidence (MI350X, TP4,
Scope: gfx950 only ( Changes in this push:
I'll file a separate upstream issue for the kernel bug and link it here. |
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
|
Filed the upstream kernel bug: #28685 (linked from the cookbook Warning callout). |
|
@zijiexia all review points are addressed (MTP disabled for AMD, strategies differentiated, MI300X BF16 removed, CP/AMD disable reasons added), plus the AMD cells are now marked |
Hi @andyluo7 , Any idea why #28423 works? Isn't they are the same architecture? |
…50 warning Point the GLM-5.2 gfx950 block-FP8 accuracy warning at the validated upstream CK kernel fix (scalar FMA + accumulator anchor) instead of the interim plain-kernel workaround. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
|
Update on the gfx950 accuracy bug behind the AMD Root cause confirmed: the CK I validated #8639 against this repro on MI350X/ROCm 7.2 (rebuilt the aiter bpreshuffle module at stock -O3): per-M-tile wrong rows gone (clean M=32..128), GLM-5.2 shapes I've updated the cookbook |
Corrected the description formatting and updated the warning about known accuracy issues on MI350X / MI355X in the GLM-5.2 documentation.
|
Good question @zijiexia — I dug into #28423 (DeepSeek-V4 AMD cookbook). The short version: the bug isn't architecture-specific, it's a gfx950 block-FP8 GEMM kernel miscompile, so what matters is the quantization path and the GPU arch, not the model. #28423's verified AMD cells mostly avoid the exact path that breaks:
Why GLM-5.2 can't sidestep it the way V4 does: DeepSeek-V4 ships an FP4 checkpoint, so its recommended AMD path on gfx950 is FP4 (clean kernel). GLM-5.2 only ships FP8 and BF16 — no FP4 — so on MI350X/MI355X it's forced onto exactly the block-FP8 bpreshuffle path that miscompiles. That's why this surfaces sharply here. This is now root-caused to a ROCm-7.2 toolchain regression and has an upstream CK fix open + validated: ROCm/rocm-libraries#8639 (tracked from #28685). Once it lands in a released |
|
SGLANG_FP8_PAGED_MQA_LOGITS_TORCH=0 enable long context correctness. |
…verify MI355X FP8 Re-validated GLM-5.2-FP8 on MI350X/MI355X (gfx950) on image 0618 at TP4 and TP8: GSM8K ~0.96 (0% invalid) and 15/15 NIAH retrieval to ~118K tokens. The block-FP8 bpreshuffle GEMM miscompile (sgl-project#28685 / ROCm#8639) no longer reproduces on this image. Pin mi355x image to -20260618, flip MI355X FP8 low-latency to verified, and downgrade the gfx950 warning to a historical "fixed" note. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
|
@richardchen @zijiexia — validated both issues on MI350X / MI355X (gfx950), image TL;DR: both bugs are clear on the 0618 image; no config/env change needed. 1. Long-context / DSA indexer (sunxxuns's
|
| Config | indexer | TORCH |
GSM8K | NIAH |
|---|---|---|---|---|
| current PR (no indexer env) | deep_gemm (default) |
=0 |
0.970 | 15/15 |
TORCH=1 |
torch ref | =1 |
0.965 | 15/15 |
| full V4 aiter bundle | aiter |
=1 |
0.955 | 15/15 |
All three retrieve perfectly to 118K tokens. TORCH=0 vs =1 makes no correctness difference — the PR's current default (=0) is already correct, and the V4 aiter indexer bundle is not required for GLM-5.2. So no env change.
Note: my first NIAH run showed 0/15 everywhere — that was a harness artifact (GLM-5.2 is a reasoning model and my
max_tokens=16was eaten by thinking tokens). Re-ran withenable_thinking:false→ 15/15.
2. Block-FP8 bpreshuffle GEMM (#28685 / ROCm/rocm-libraries#8639)
Re-ran GSM8K at TP4 (the original repro config) and TP8 on 0618 with bpreshuffle on (default — _use_aiter_bpreshuffle_gfx95 still evaluates True):
- TP8: 0.970 (0% invalid) · TP4: 0.960 (0% invalid)
The catastrophic collapse (GSM8K≈0 / 72% invalid) no longer reproduces — the CK kernel fix has landed in the aiter/CK build inside the 0618 image, so the workaround (_use_aiter_bpreshuffle_gfx95=False) is no longer needed. The earlier TP4=0.000 was on an older image.
Changes in this push
- Pin
mi355ximage →...mi35x-20260618. - Flip MI355X FP8 low-latency to
verified: true(the benchmarked cell, correctness re-confirmed). - Downgrade the gfx950
<Warning>to a historical<Note>("fixed as of 0618; older images affected"). - MTP note: block-FP8 dependency removed, but MTP stays disabled (its spec-decode kernel is a separate, not-yet-validated path).
I intentionally left MI355X FP8 balanced/high-throughput, all BF16, and all MI325X/MI300X cells at verified: false — those weren't benchmarked in this pass.
Caveat: I verified via GSM8K (short-ctx) + NIAH (long-ctx retrieval), not a full RULER/LongBench reasoning eval. If you want belt-and-suspenders before signing off, that's the remaining gap. Otherwise this should be good to merge once the run-ci labels are added (the red checks are just the label gate, not test failures) and the branch conflict is resolved.
…book # Conflicts: # docs_new/src/snippets/configs/zai-org/glm-5.2.jsx
…trategies Benchmarked GLM-5.2-FP8 on MI355X (gfx950, TP8, no MTP) on image 0618 at the standard random ISL 8192 / OSL 1024 shape: low-latency (conc 1/16), balanced (conc 64/256), high-throughput (conc 1024). Add the speed numbers to glm-5.2-benchmarks.jsx and flip the balanced + high-throughput FP8 cells to verified:true (low-latency already verified). Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
…e lost in merge The 2026-06-27 merge with main (b1ec59f, "Conflicts: glm-5.2.jsx") dropped two earlier AMD deltas during conflict resolution, leaving the panel non-functional: - supportedHardware no longer listed mi355x/mi325x/mi300x, so the engine never rendered the AMD hardware tabs (buildHardwareGroups filters the catalog by supportedHardware) — all AMD cells, ROCm dockerImages, and MI355X benchmarks were dead. - The Speculative card's two EAGLE/MTP options and the CP (DSA prefill) knob no longer disabled AMD, regressing the addressed review request and contradicting the surviving MDX prose / config comments. Re-add the three mi* ids to supportedHardware and restore the AMD disable blocks (disableReason wording aligned with the current MDX, which uses the "not yet validated / num-steps>3 build issue" framing). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t/glm-5.2-amd-cookbook # Conflicts: # docs_new/src/snippets/configs/zai-org/glm-5.2-benchmarks.jsx
Update: AMD MI355X FP8 now tuned for both latency (MTP-5) and throughput (fp8 KV)Two additions on top of the base AMD recipe, both validated on MI350X (gfx950, TP8, image 1. EAGLE MTP 5-1-6 on the low-latency cell — enabled by #29373 (cuda_runtime.h guard, in v0.5.14) + 2. fp8 KV cache on all 3 FP8 cells — Accuracy (full GSM8K, 1319 questions): fp8 KV 0.946 vs bf16 0.945 — statistically identical. Throughput (random, ISL 8192 / OSL 1024, tok/s/GPU):
Notes:
The |
…-project#28471) Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com> Co-authored-by: zijiexia <37504505+zijiexia@users.noreply.github.com> Co-authored-by: Zijie Xia <zijie.xia@radixark.ai>
…-project#28471) Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com> Co-authored-by: zijiexia <37504505+zijiexia@users.noreply.github.com> Co-authored-by: Zijie Xia <zijie.xia@radixark.ai>
…-project#28471) Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com> Co-authored-by: zijiexia <37504505+zijiexia@users.noreply.github.com> Co-authored-by: Zijie Xia <zijie.xia@radixark.ai>
…-project#28471) Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com> Co-authored-by: zijiexia <37504505+zijiexia@users.noreply.github.com> Co-authored-by: Zijie Xia <zijie.xia@radixark.ai>
…-project#28471) Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com> Co-authored-by: zijiexia <37504505+zijiexia@users.noreply.github.com> Co-authored-by: Zijie Xia <zijie.xia@radixark.ai>
Summary
Adds AMD MI300X / MI325X / MI355X support to the GLM-5.2 cookbook. GLM-5.2 shares the GLM-5.1 / DeepSeek-V3.2 (
glm_moe_dsa) architecture, so the validated GLM-5.1 ROCm recipe carries over with only the model path swapped.Changes
docs_new/src/snippets/configs/zai-org/glm-5.2.jsx):mi300x,mi325x,mi355xadded tosupportedHardware+ ROCmdockerImages.--dsa-prefill-backend tilelang --dsa-decode-backend tilelang --chunked-prefill-size 131072 --mem-fraction-static 0.80 --watchdog-timeout 1200).docs_new/cookbook/autoregressive/GLM/GLM-5.2.mdx): description + an AMD bullet in Configuration Tips.Notes
--speculative-*and serve without MTP. This is documented in Config Tips. Once the gfx950 spec-decode kernel lands, MTP cells can be added.verified: falsepending a run.Test plan
sglang servecommand.zai-org/GLM-5.2-FP8on MI300X/MI325X to flip those cells toverified: true.🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ✅ Run #28475719904
Latest PR Test (Extra): ❌ Run #28475719698