Skip to content

[AMD][CI] Move the MI35x DeepSeek-V4-Flash nightly to the official 0731 checkpoint (blocked: triton FlashMLA accuracy regression) - #36388

Draft
michaelzhang-ai wants to merge 7 commits into
mainfrom
cursor/amd-nightly-dsv4-flash-0731-drop-v3x-ef39
Draft

michaelzhang-ai wants to merge 7 commits into
mainfrom
cursor/amd-nightly-dsv4-flash-0731-drop-v3x-ef39

Conversation

@michaelzhang-ai

@michaelzhang-ai michaelzhang-ai commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Blocked. One line — the MI35x DeepSeek-V4-Flash FP4 nightly's default checkpoint — but it fails the triton FlashMLA accuracy leg, and the fix is not in this PR. Details below; the useful output here is the regression, not the diff.

The other two changes this branch once carried have both merged: the MI35x V3.2 four-into-two job merge as #36736, and the V3-0324 / V3.1 MI30x drop as #36396.

Motivation

The MI35x Flash nightly serves the preview checkpoint on its FP4 leg. deepseek-ai/DeepSeek-V4-Flash-0731 "is the official release of DeepSeek-V4-Flash, superseding the preview version" per its model card, has ~2x the downloads, and is far stronger on agentic benchmarks (Terminal Bench 2.1 61.8 -> 82.7, DeepSWE 7.3 -> 54.4). The cookbook also ships MI355X flash-official (0731) FP4 cells marked verified: false that nightly coverage would back.

Modifications

test/registered/amd/test_deepseek_v4_flash_fp4.py: DEEPSEEK_V4_FP4_MODEL_PATH default becomes deepseek-ai/DeepSeek-V4-Flash-0731, plus three docstring lines on why target-only serving is safe for a checkpoint carrying a draft head. The env override is unchanged, so the preview can still be pinned.

Structurally the swap is inert: the two config.json files are identical for the target (43 layers, head_dim 512, index_topk 512, same quantization_config, expert_dtype: fp4), 0731 adds only four dspark_* keys, and DeepseekV4ForCausalLM.load_weights skips mtp.* outside a draft worker so the bundled DSpark head never reaches VRAM.

FP8 legs are untouched and stay on sgl-project/DeepSeek-V4-Flash-FP8 — FP8 needs a repackaged checkpoint and no 0731 repack exists.

Accuracy Tests

The Flash job runs the suite twice, once per SGLANG_HACK_FLASHMLA_BACKEND. GSM8K on the FP4 leg, from run 32906052690 (rocm720, continue_on_error=false):

FlashMLA backend preview (main) 0731 (this PR) delta
unified_kv_triton 0.9280 0.9227 -0.005
triton 0.9249 0.9007, 0.8908 on retry -0.024 to -0.034

unified_kv_triton passed cleanly — 0731 FP4 at 0.9227, untouched FP8 legs at 0.9287 and 0.9325 (TBO). triton missed the 0.91 floor on both attempts and stopped there, so the FP8 legs under triton were not reached.

Not flake, not pre-existing: the triton step passed in all four Flash job runs across the 8/24 (32757901075) and 8/26 (32997660973) nightlies, both image flavors, with the checkpoint as the only variable here.

What the failure is, and is not

Mechanically: test_a_gsm8k asserts accuracy > 0.91, CustomTestCase allows one retry in CI, both attempts were under, so the retry helper raised and the step exited 1.

Two candidate causes ruled out:

  • Not truncation or malformed output. invalid is 0.0 on both failing runs, so the model emits well-formed answers that are simply wrong. This kills the theory that 0731's max reasoning effort produces longer chains of thought that hit the eval's max_new_tokens=512.
  • Not a compress_ratios index shift. 0731 has 46 entries against the preview's 44, but the first 44 are element-wise identical, the extras are trailing zeros for the DSpark head layers, and the derived num_c4_layers is 21 either way.

One finding that complicates the picture: the triton cell is nondeterministic. Both 0731 evals ran against a single server (launched 12:28, ready 12:31; evals at 12:33 and 12:34) at temperature 0, and scored 0.9007 then 0.8908 — roughly 13 of 1319 questions flipping between identical runs. So that cell carries >=1 point of noise on its own, and the 0.91 floor only ever had 1.5 points of headroom there against the preview's 0.9249.

The 2.9-point mean gap (0.8958 vs 0.9249) still exceeds that noise, which favours a real checkpoint x backend interaction rather than luck. But preview-on-triton is a single sample, so its variance in that cell is unknown.

The two backends are separate implementations, not a tuning flag: triton uses nsa_triton_decode with the separate packed KV layout, unified_kv_triton uses dsv4/unified_kv_kernels with the unified layout. Both run --kv-cache-dtype fp8_e4m3, so FP8 KV quant/dequant and the sparse indexer (index_topk=512) are the natural places to look.

Options

Lowering the 0.91 floor or dropping the triton leg would turn this green while discarding the result. That sweep exists (#28290) to catch backend divergence on this model, and it worked. So, for the DSV4 / AMD owners:

  1. First, characterise the variance. Given the nondeterminism above, 3-5 repeats each of preview-on-triton and 0731-on-triton would separate "real regression" from "thin threshold meeting a noisy cell" before anyone goes into the kernel. Cheap relative to a kernel hunt, and it decides between the options below.
  2. Fix the triton FlashMLA path against 0731, then land this unchanged. unified_kv_triton is what the MI355X cookbook recipes use, so this would be a non-production backend regressing on the official checkpoint — worth understanding independently of this PR. The temperature-0 nondeterminism is arguably its own bug regardless of the checkpoint.
  3. Take 0731 and narrow the FP4 sweep to unified_kv_triton, with a tracking issue. Cheapest; trades away the signal.
  4. Stay on the preview until 1 is resolved, accepting that the nightly keeps validating a superseded checkpoint.

For the record, my pre-run assessment called this low-risk from config equality plus the loader's mtp.* skip. That was structurally correct and insufficient — it says nothing about numerics, and numerics are what moved.

Speed Tests and Profiling

No cost change; this is a currency fix. On the unified_kv_triton leg that passed, 0731 measured 57.6 s / 2238 tok/s, in line with the preview. test_b_perf_8k_1k asserts no threshold, so perf shifts surface in the reported table rather than as failures.

If this lands: stage-c-dsv4-flash-fp4-fp8-amd-mi35x-rocm720 gates every main-package PR on the Flash suite with a 60-minute step timeout. 0731 is 155 GiB against the preview's 149, cached per host under HF_HOME=/sgl-data/hf-cache, so the first run on each MI35x 8-GPU host pays a cold download and could exceed that timeout. Pre-warm /home/runner/sglang-data/hf-cache, or pin the preview on the PR gate via DEEPSEEK_V4_FP4_MODEL_PATH.

Checklist


CI States

Latest PR Test (Base): ❌ Run #34829118668
Latest PR Test (Extra): ❌ Run #34829118366
Latest PR Test (AMD ROCm 10): ❌ Run #34829118509

cursoragent and others added 2 commits August 25, 2026 22:19
…kpoint

deepseek-ai/DeepSeek-V4-Flash is the preview release; the model card for
deepseek-ai/DeepSeek-V4-Flash-0731 states it is the official release and
supersedes the preview, with large agentic-benchmark gains (Terminal Bench 2.1
61.8 -> 82.7, DeepSWE 7.3 -> 54.4). The MI35x FP4 leg still pointed at the
preview.

0731 has the same target architecture as the preview and matches
DeepSeek-V4-Flash-DSpark's structure, i.e. it carries a bundled DSpark draft
head in two extra shards. This test serves the target only, and
DeepseekV4ForCausalLM.load_weights skips `mtp.*` outside a draft worker, so the
served model and its footprint are unchanged.

The FP8 legs keep sgl-project/DeepSeek-V4-Flash-FP8: FP8 on this model needs a
repackaged checkpoint and no 0731 repack has been published.

Co-authored-by: quitenode <quitenode@users.noreply.github.com>
nightly-8-gpu-deepseek-v31 serves deepseek-ai/DeepSeek-V3-0324 for accuracy and
deepseek-ai/DeepSeek-V3.1 for perf; nightly-8-gpu-deepseek-v3-kv-fp8 serves
DeepSeek-V3-0324 twice more. Every MI30x path they exercise (aiter MLA attention,
EAGLE 3-1-4 MTP with an accept-length floor, multithread weight load, bs=1
send_one speed) is also exercised by the retained V3.2 basic and MTP jobs on a
current checkpoint, and DeepSeek-R1 / V4-Flash / V4-Pro carry the MI35x side.

Measured from the 2026-08-24 scheduled runs, this drops ~49 GPU-h and 6 MI30x
8-GPU job slots per night: 32.1 GPU-h across the two ROCm 7.2 flavors and
16.9 GPU-h on ROCm 7.0.

The one combination not covered elsewhere on gfx942 is MLA with
--kv-cache-dtype fp8_e4m3; the closest retained gfx942 signal is the GLM-5.1 DSA
perf job, and DeepSeek KV-FP8 stays covered on MI35x by the R1-MXFP4 KV-FP8 and
V4 TBO jobs.

Both nightlies are edited so the saving is real, matching #34643/#34761. The
test files stay registered so the suites remain available to workflow_dispatch
and manual runs.

Co-authored-by: quitenode <quitenode@users.noreply.github.com>
cursoragent and others added 3 commits August 25, 2026 22:36
The MI35x V3.2 coverage was split across four jobs -- accuracy and perf, basic
and MTP -- while the MI30x V3.2 coverage does the same work in two jobs that
each run accuracy then perf. Both steps in a pair serve the same DeepSeek-V3.2
weights, so the split bought a second container setup and a second cold weight
load per config and nothing else.

nightly-accuracy-8-gpu-mi35x-deepseek-v32 + nightly-perf-8-gpu-mi35x-deepseek-v32-basic
  -> nightly-8-gpu-mi35x-deepseek-v32
nightly-accuracy-8-gpu-mi35x-deepseek-v32-mtp + nightly-perf-8-gpu-mi35x-deepseek-v32-mtp
  -> nightly-8-gpu-mi35x-deepseek-v32-mtp

Suites, launch flags, step timeouts and per-file timeouts are carried over
verbatim; only the job packing changes. Each perf step carries
`if: ${{ !cancelled() }}` so it still runs when accuracy fails, which is what
the separate jobs gave us.

Blocking semantics are preserved per workflow rather than unified, because the
two workflows disagreed. nightly-test-amd-rocm720.yml listed both perf jobs in
check-all-jobs, so its perf steps stay blocking. nightly-test-amd.yml excluded
them with "perf failures don't block CI", so its perf steps are
continue-on-error and those two commented-out exclusions are gone.

Co-authored-by: quitenode <quitenode@users.noreply.github.com>
Restore .github/workflows/nightly-test-amd.yml to main. The ROCm 7.0 nightly
carries the same two V3-0324/V3.1 MI30x jobs and the same four-way MI35x V3.2
split, but landing both workflows at once doubles the blast radius of a CI
scheduling change; the 7.0 side can follow once this one has run green.

Net effect on this PR: the only workflow touched is
.github/workflows/nightly-test-amd-rocm720.yml.

Co-authored-by: quitenode <quitenode@users.noreply.github.com>
test_deepseek_v4_flash_fp8.py had only gained a comment explaining why the FP8
leg stays on the preview-derived repack. That is reviewer-facing rather than
next-reader-facing, so it belongs in the PR description, not the file; restore
the file to main.

Trim the same changelog voice out of the FP4 docstring: state the constraint a
reader of that file needs (target-only serving means the bundled DSpark head
never reaches VRAM, so --mem-fraction-static 0.90 still holds) without
narrating which checkpoint it used to point at.

Co-authored-by: quitenode <quitenode@users.noreply.github.com>
…s own PR

The MI30x half of this PR now lives in the MI30x-scoped PR, alongside the new
DeepSeek-V4-Flash FP8 accuracy job that reuses the freed gfx942 nightly budget.
Dropping stale MI30x jobs and repacking MI35x jobs are independent scheduling
decisions with different reviewers and different blast radii, so they should
not land together.

Restores nightly-8-gpu-deepseek-v31-rocm720 and
nightly-8-gpu-deepseek-v3-kv-fp8-rocm720 verbatim, along with their job_select
options, their check-all-jobs needs and the original section comment. What
remains here is MI35x only: the DeepSeek-V4-Flash FP4 0731 checkpoint and the
four-into-two MI35x V3.2 job merge.

Co-authored-by: quitenode <quitenode@users.noreply.github.com>
@michaelzhang-ai michaelzhang-ai changed the title [AMD][CI] Move the DeepSeek-V4-Flash nightly to the official 0731 checkpoint and stop scheduling the V3-0324/V3.1 MI30x jobs [AMD][CI] Move the MI35x DeepSeek-V4-Flash nightly to the official 0731 checkpoint and merge the four MI35x V3.2 jobs into two Aug 25, 2026
The four-into-two MI35x DeepSeek-V3.2 job merge is validated and green, while
the 0731 checkpoint swap this branch also carried fails the `triton` FlashMLA
accuracy leg. Bundling them means the green half cannot land.

Restore .github/workflows/nightly-test-amd-rocm720.yml to the merge base; the
job merge now lives in its own PR. This branch is reduced to the one-line FP4
model-path change, which is where the open question is.

Co-authored-by: quitenode <quitenode@users.noreply.github.com>
@michaelzhang-ai michaelzhang-ai changed the title [AMD][CI] Move the MI35x DeepSeek-V4-Flash nightly to the official 0731 checkpoint and merge the four MI35x V3.2 jobs into two [AMD][CI] Move the MI35x DeepSeek-V4-Flash nightly to the official 0731 checkpoint Aug 27, 2026
@michaelzhang-ai michaelzhang-ai changed the title [AMD][CI] Move the MI35x DeepSeek-V4-Flash nightly to the official 0731 checkpoint [AMD][CI] Move the MI35x DeepSeek-V4-Flash nightly to the official 0731 checkpoint (blocked: triton FlashMLA accuracy regression) Aug 27, 2026
@Jiminator Jiminator closed this Sep 14, 2026
@Jiminator
Jiminator deleted the cursor/amd-nightly-dsv4-flash-0731-drop-v3x-ef39 branch September 14, 2026 04:41
@alexnails
alexnails restored the cursor/amd-nightly-dsv4-flash-0731-drop-v3x-ef39 branch September 14, 2026 05:40
@hnyls2002 hnyls2002 reopened this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants