Skip to content

[P0] SparkQwen + SparkGLM on Atlas main (#198, #199, then missing pieces) — tracking #220

Open

Description

@AzeezIsh

P0: get SparkQwen and SparkGLM running on Atlas main. The plan is to land #198 (Qwen, 2 GPUs) and #199 (GLM), then upstream what's still missing as focused, default-off, gated PRs. This issue is the single place to resume from; every step links its branch/PR here.

Sequence and status

# Step Branch / PR Status
1 #198 + the #218 fix (mxfp8_proj row-invariant under ROWINV; cached == uncached) feat/fp4-local-tp2 @ ec3e2597d (fast-forwarded from 0164cce9c), #198 pushed; needs review/merge
2 Unblock CI on main: cargo deny (RUSTSEC-2026-0381/0382/0386), kernel shadow structure, PR benchmark gate one small PR each, off main in progress
3 #199 (GLM native prefill + FP4-Local, @Mango-kid) rebased onto main + #198: 12 conflicted files (fast_weights ×3, moe ×2, api, nvfp4_detect, weight_map, weight_loader, spark-model root, config parsers) port/199-on-198, credited PR stacked on #198 in progress
4 Build SparkQwen / SparkGLM images on main + #198 + #199 and run their qualification suites on the two-GB10 pair — after 3
5 PRs for what's missing (order): MTP drafter series + queued first chunks (gated in #216: perf/fp4l-mtp-absorb @ 392264cb2+credit fix b46d4567d, perf/prefill-queue-first-chunk @ adeb4d1b5); tool-call guard crate; Strict/Spark mode; literal tool-XML; vision admission (row budgets + 503, on top of #180); display carveout; video; #55 loop repair; RDMA/DFlash (needs reconciliation). Skip copy drafts (shipped off). Each PR includes the 500-LoC splits for files it touches per PR after #198 merges

Context

Activity

  1. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    Status (start of the 10-hour queue on reiner + spark2)

  2. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    PRs opened:

    PR benchmark gate: diagnosis only. It invalidates all bench records whenever a PR changes device code. #198 touches Cargo.lock, so 34 targets' device code counts as changed, and there's no governance/pr-198.jsonl intent record. It needs fresh gate records, not a code fix.

    Queue on the pair:

    1. J27, final receipts for the fixed qwen4_exp: serve FP4-Local at TP=EP=2 with the n-gram table resident, native MXFP8 sharding, BF16 routing #198 head (running);
    2. jobs 905 / 906, the ports on the fixed base (build + agentic C4 A/B);
    3. jobs 907 / 908, glm: native prefill and FP4-Local for dual DGX Spark (#199 by @Mango-kid, rebased onto main + #198) #223 builds + Qwen regression gate.
  3. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    PR structure: linear stack (owner's rule: one change per PR; each PR's base is the PR below it; rebased with git; each PR measured against its parent only; no re-running benchmarks that already have receipts):

    # PR base change measurement vs parent
    0 #221, #222 main CI fixes CI
    1 #198 main Qwen FP4-Local TP2 (+ #218 fix, already folded in; splitting it out would need a force-push, held for the owner) existing gates + #218
    2 #223 #198 #199 GLM rebased (@Mango-kid) Qwen unchanged vs #198 (J30, queued) + GLM qualification
    3 stack/qwen-mtp-absorb #223 MTP drafter series (default-off) #216 receipts (J06/J11/J13) carry over if git range-diff is clean
    4 stack/qwen-queue-first-chunk PR 3 queued first chunks (default-off) J09 receipts, same rule

    Being built now: PRs 3 and 4 as rebased branches, with git range-diff against the measured branches, compile + host tests, and one CUDA build of the top. The earlier integ/* branches are retired. Cancelled as unnecessary re-runs: J27 (#198 re-bench), J13b, J31.

  4. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    Stack opened: #221 / #222 (main) · #198 (main) ← #223 (draft) ← #224 (draft, MTP drafter series) ← #225 (draft, queued first chunks). git range-diff for #224 and #225 against the measured branches is = on every commit, so the #216 receipts apply unchanged. Pending on the pair: 907 / 908 (#223 builds + Qwen regression gate), 911 (CUDA build of the stack top).

  5. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    Correction: the queued-first-chunk PR is #226 (not #225). Stack: #198 ← #223 ← #224 ← #226.

  6. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    #223 (#199 rebased) passes the Qwen regression gate against #198 (details on #223): outputs, cache, prefix, tools, contamination, ssm gate and canonical NLL are all identical, and decode is unchanged. Both CUDA targets build, and host tests pass. Next in the stack: job 911 (CUDA build of the #226 top). Then GLM qualification for #223.

  7. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    Stack extended: #226 ← #227 (draft): tool-call guard crate, --tool-guard default off, ported from Enntity. Its targeted gate is reiner job 914 (CUDA build, guard tests, guard off == serial refs, guard on: tool probe). An offline false-positive scan isn't possible because the existing BFCL receipts are score-only and contain no emitted calls. Current stack: #221 / #222 → main; #198 ← #223 ← #224 ← #226 ← #227.

  8. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    Stack status: #221 / #222 → main (CI fixes) · #198 (ready) ← #223 (Qwen-side gate passes) ← #224 ← #226 ← #227 (tool-call guard; gates pass on c643812be). All gated against their parents and none re-benched. Blocked on the owner: GLM-side qualification of #223 (the pair has only nvidia/GLM-5.3-Flash-NVFP4, not the FP4-Local GLM checkpoint; reiner has 39 GB free; SparkGLM's suite isn't on the pair); review/merge from the bottom up. Next stacked PRs (#220 step 5): Strict/Spark mode, literal tool-XML handling, vision admission, display carveout, video, #55 loop repair, RDMA/DFlash.

  9. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    GLM qualification of #223 unblocked without deleting anything:

  10. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    Correction to my earlier note: I had the two nodes' disk numbers swapped. reiner has 310 GB free and spark2 is nearly full; the download filled it. I moved the GLM-5.3-Flash FP4-Local + DFlash2 downloads to reiner (same pinned revisions) and removed the partial copy on spark2, which is back to its prior free space. Rank 1 reads the checkpoint through a read-only reverse sshfs mount from reiner (187 MB/s). J33 is being resubmitted with those paths.

  11. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    Stack extended: #227 ← #229 (draft): ATLAS_QWEN4EXP_SERVING_MODE=strict|spark, a serving-contract validation ported from Enntity, default unset. Host tests 2/2 + 2/2. Its one-boot check (J34) is queued after J33. The next PR, literal tool-XML handling, is being ported. GLM checkpoint download on reiner: 38 / 177 GB.

  12. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    Stack extended: #229 ← #230 (draft): literal tool-XML handling for glm5_next + qwen4_exp, ported from Enntity; unit tests 24/24 + 38/38 + 9/9. Its pair check (J35: tool probe, greedy vs refs, BFCL ST-995, since it changes default qwen4_exp tool parsing) is queued. #223's GLM side: #199's 6 checkpoint GPU tests pass; serving checks are running.

  13. AzeezIsh commented on Oct 29, 2026

    @AzeezIsh
    ContributorAuthor

    Status:

  14. AzeezIsh commented on Oct 29, 2026

    @AzeezIsh
    ContributorAuthor

    Stack now: #221 / #222 → main · #198 (mergeable, 2906e74db) ← #223 ← #224 ← #226 ← #227 ← #229 ← #230 ← #231 (QSA index-key state charged in the carveout KV budget) ← #232 (#55 loop repair + guard_stop).

  15. AzeezIsh commented on Oct 29, 2026

    @AzeezIsh
    ContributorAuthor

    Remaining ports, scoped. Each is one PR, stacked linearly after #232, in this order:

    # change Enntity commits switch / default needed by
    1 RDMA pair delta: command words + one-shot SM stage (first check how much of ATLPAIR3 / peer bootstrap we already have) b4358d20, 4f1a92f2, 0516b109, b718ff25 ATLAS_GLM_CMD_RDMA, ATLAS_RDMA_ONESHOT_SM_STAGE (off) both, TP2
    2 video per-frame timestamps + sampling fix 46134a75, 6f3d0a71, 95d20a25, 170540e1, 0eef4031 none (correctness) both
    3 DFlash warm-context drafting 5573f4d5, 43a5b9a6, cfa56639, d3953211 ATLAS_DFLASH_WARM_CTX (off) both
    4 vision admission: row budgets + 503, on top of main's #180 400 7d33dd4c, b060f987, 060199eb, 83389c7e, 9f656251, 8f0a89b1, aa494ccb, d85c88d0 --vision-max-request-rows / --vision-max-inflight-rows both
    5 hour-long video: seekable ffmpeg demux + admission (needs 4) c63b6feb, fa810568, a3ed7d2a, 5fa936e1, d873e3c9, 2837e761, ceb76318 none both
    6 GLM FP8/MXFP8 native byte consumers (after #223's GLM serving passes) 0f783889, 7d847737, 847c2616, b8333ad0, 50696215, f2e885fa, c2b55d85 all off GLM
    7 GLM latent-pool carveout placement 0e16041a — GLM
    8 GLM reference video preprocess f3f3876b none GLM

    Not planned: copy drafts (the MTP drafter in #224 covers that lane). The rm.rs scanout-heap allocation rewrite (16315004) waits for the owner's call.

  16. 55 remaining items

  17. added a commit that references this issue on Oct 31, 2026
  18. AzeezIsh commented on Oct 31, 2026

    @AzeezIsh
    ContributorAuthor

    @data-angel All of SparkQwen 0.4.0 is now on main (8c2b67218).

    What merged since my last update:

    Measured on reiner + spark2, stack top vs your 9b25f575, 0.4.0's config:

    • union_check 16/16, lp_api_probe 13/13, api_parity 26/26.
    • SparkQwen's own probes are identical in strict and spark:
      • greedy_eq c1/c8/c1-prefix;
      • tool_probe in every category;
      • quality 40/40 + 12/12;
      • agentic 20/20.
    • Speed (sq_bench, 2 boots per arm): within about 2.6% at C1/C2/C4, decode and TTFT. The largest gap is at 28K TTFT: 7.22 vs 7.04 s.
    • BFCL ST-995: 87.54 / 86.85, the same as main before the stack.

    Still open:

    • The display carveout can't import on spark2's older driver (580.82.09); it's fatal rather than falling back.
    • lp_repeat and long_probe need a profile with more than 32K context to run on this config.
  19. AzeezIsh commented on Nov 1, 2026

    @AzeezIsh
    ContributorAuthor

    Two updates.

    #303 (data-angel) is merged after the new per-PR gate. The gate measures KL logit drift from top-20 distributions, teacher-forced text plus generated chat plus vision, against fresh builds of the base, and runs a bench with interleaved boots. Against main the KL was exactly 0 over 36,765 positions, cached vision repeats included. The bench was neutral. Receipts are on #303.

    Long context: main (3bd5d7b1e) vs the 0.4.0 engine on 0.4.0's 4x262k spark recipe, one boot each. Receipts are in reiner's ~/code/night1027/out/longctx-3bd5d7b1e/.

    • 77K needle: same answer; TTFT 20.5 s on both, warm follow-up 0.3 s.
    • 4 concurrent 100K prompts: all 4 answers the same.
    • lp_repeat, 65,916 tokens x3: the same hash, 60ef41b17fa4, on both engines, and reproducible within each.
    • KL: 0 over 34,245 positions.

    So lp_repeat and long_probe, which couldn't run on the 32K config, now match too.

  20. added a commit that references this issue on Nov 1, 2026
  21. AzeezIsh commented on Nov 1, 2026

    @AzeezIsh
    ContributorAuthor

    @data-angel I pre-gated your Enntity fix/csf-upload-decode (2d866fc58, "fast weights: read shards on eight threads, decode CSF scales at upload") against main 8c2b67218, both built fresh on reiner + spark2. Receipts are in reiner's ~/code/night1027/out/dap-csf-2d866fc58/.

    • KL logit drift: exactly 0.
      • 34,245 of 34,245 positions in each of 2 spark-config boots (teacher-forced top-20 on 6 text cases plus 4 generated chat cases).
      • 36,765 of 36,765 on rc16 with 3 images and a video.
      • Main against itself is also 0.
    • Boot to ready, armctl up on both ranks, spark config, interleaved: main 99 / 99 s, this branch 84 / 69 s. That's an observation from 2 boots each.
    • Bench: neutral, every cell inside main's run-to-run range.
      • C1 59.74 vs 59.73, C2 91.81 vs 92.03, C4 142.07 vs 142.33.
      • Decode code/json/prose 92.52 / 70.94 / 60.86 vs 92.81 / 71.37 / 60.92.
      • TTFT at 2K/8K/16K/28K is equal.
    • rc16: greedy C1 and C8 8/8 identical, tools 21/21.

    Open it as a PR against main and I'll merge it once CI is green.

  22. AzeezIsh commented on Nov 1, 2026

    @AzeezIsh
    ContributorAuthor

    KL logit drift: main (3bd5d7b1e, which includes #303) vs SparkQwen 0.4.0's engine on 0.4.0's 8x32k config, one boot per arm per mode. Receipts are in reiner's ~/code/night1027/out/klsq-3bd5d7b1e/.

    The test covers 6 teacher-forced text cases, 4 generated chat cases, and 3 images plus a video, each sent 3 times so repeats can hit the vision cache.

    • Spark mode: KL exactly 0, 36,714 of 36,714 positions identical.
    • Strict mode: KL exactly 0, 36,714 of 36,714.
    • Vision cache: both engines cache the repeats with the same counts (112 / 336 / 928 / 4592 tokens). Warm repeats have KL 0 against the cold request in each engine.

    With the long-context check posted above, main now matches 0.4.0 on every probe I have, vision included.

  23. AzeezIsh commented on Nov 1, 2026

    @AzeezIsh
    ContributorAuthor

    Long video: main 3bd5d7b1e vs the 0.4.0 engine on 0.4.0's hour-video recipe (its argv and env deltas, plus main's two contract keys). Receipts are in reiner's ~/code/night1027/out/hourvid-3bd5d7b1e/.

    Input: a synthetic 5-minute 640×360 testsrc2 clip (6.3 MB), which comes to a 230,503-token prompt. I sent it twice per engine, cold then warm.

    • Generated top-20 KL: exactly 0 on both requests, 510 of 510 positions identical.
    • Wall time (main / 0.4.0): cold 189.5 / 187.9 s, warm 25.4 / 25.2 s. Both engines cached 230,496 tokens on the warm request.

    BFCL ST-995 on main 3bd5d7b1e: 87.54 / 86.85 (run-1793536442022911648), the same as before #294 and #303.

  24. AzeezIsh commented on Nov 1, 2026

    @AzeezIsh
    ContributorAuthor

    Main sentinel. Main moved with others' merges: #159 (one-pass BF16 batch-2 LM head on every target), #142, #304, plus my #306 (TTFT trace hooks). I re-gated main b45811df7 against 3bd5d7b1e, both built fresh. Receipts are in reiner's ~/code/night1027/out/dap-main-b45811df7/.

    • KL logit drift: exactly 0. That's 34,245 of 34,245 positions in each of 2 spark boots, and 36,765 of 36,765 on rc16 with vision.
    • Bench and rc16: every bench cell is inside the base range, greedy C1 and C8 are 8/8 identical, and tools are 21/21.

    So main b45811df7 produces the same logits as 3bd5d7b1e, and the parity with 0.4.0 measured there still holds.

    #306 (merged) restores 0.4.0's TTFT-trace hooks for promoted and multi-chunk prefills, which my port of 0f58f7a had dropped.

    • The strict-mode follow-up-turn TTFT difference I saw in agentic_probe (about 0.36 vs 0.6 s) is not an engine difference. SSE timestamps show equal first-token latency for sequential follow-ups in both modes (strict 209 vs 212 ms). Under 4 concurrent conversations the medians swing ±100 ms in either direction, depending on which conversation's prefill goes first.
  25. added a commit that references this issue on Nov 1, 2026
  26. data-angel commented on Nov 1, 2026

    @data-angel
    Contributor

    @AzeezIsh SparkGLM is up as one PR against main: #309.

    The 13-part series sat on stack/glm-video, which no longer has a live base, so I merged the whole tree onto 88010baee and got it building and passing there. It carries #199 as ported in #242, what's left of the GLM stack, and our series. Enntity/atlas sg-pr/* still shows the series topic by topic.

    On a76faa010, against SparkGLM 0.2.0 in Spark and Strict: greedy 8/8, logprobs zero delta over 20,705 tokens, 109/109 identical, and vision 14/14 in Spark. The merge of main since then (#159, #307, #308 and others) has not been on hardware yet. That run is next from us, and the open speed gaps are listed in the PR.

    The PR also covers the things you may want to decide: #255's warm-context files, which came with the stack, the persistent decode twins on PDL, and whether you'd rather cut it smaller.

  27. added a commit that references this issue on Nov 1, 2026
  28. AzeezIsh commented on Nov 2, 2026

    @AzeezIsh
    ContributorAuthor

    Overnight merges, each after the KL logit-drift and bench gate on reiner + spark2:

  29. AzeezIsh commented on Nov 3, 2026

    @AzeezIsh
    ContributorAuthor

    The pair's default serve is now main 0fa3dc73d (#319 verbatim prompt off, #320 no-tools <tool_call> ban, #322), rc16 profile, FP4-Local, TP=EP=2 on reiner + spark2:

    sparkrun-recipes #26 pins both TP2 recipes, NVFP4 and FP4-Local, to ghcr.io/atlas-inf/atlas-gb10:sha-0fa3dc7. Both were re-checked through sparkrun on the pair.

    Overnight: BFCL on the recipes' spark profile, BFCL on the published NVFP4 recipe through sparkrun, and the MLPerf agentic leg on the default serve.

  30. AzeezIsh commented on Nov 3, 2026

    @AzeezIsh
    ContributorAuthor

    BFCL finding on the two-GB10 recipes (one run each, observed). All runs use main 0fa3dc73d and ST-995, whose normalized floor is 85.32.

    config overall / normalized
    FP4-Local, rc16 env (the pair's default serve) 88.14 / 88.96
    FP4-Local, the recipes' SparkQwen 0.4.0 spark env 85.63 / 84.93
    NVFP4 recipe as published (spark env), through sparkrun 84.42 / 82.69
    previous RC16-env NVFP4 recipe (10-16, older image) 85.83 / 85.48

    So moving the recipes to the spark env costs BFCL, and both spark-env runs land below the normalized floor. Two isolation runs are queued:

    1. rc16 plus only the four wave-1 numerics switches (MXFP8_DECODE, MXFP8_SHARED, PREFILL_W8A8, PREFILL_W4A4);
    2. the spark env with the serving mode unset and PREFILL_W4A4=0.

    The recipes will follow whatever those show. @data-angel, this probably applies to SparkQwen's spark mode too.

  31. data-angel commented on Nov 16, 2026

    @data-angel
    Contributor

    @AzeezIsh following up on the BFCL finding from 11-03; sorry for the delay. It applies to us more than you guessed. SparkQwen 0.7.0 (11-10) made Spark mode its default, and SparkQwen has no ST-995 receipt in either mode. We qualified Spark mode on greedy equality, and the tool, quality and agentic probes, never on BFCL. Your 85.63 / 84.93 for the recipes' spark env, against 88.14 / 88.96 for rc16, is the only ST-995 data on it that I know of.

    Did your two isolation runs finish? They were rc16 plus the four wave-1 switches, and the spark env with the mode unset and PREFILL_W4A4=0. If they did, the result decides our next step. If not, I'll run ST-995 on our pair, Strict and Spark on the same build and the same day, then one switch at a time. Whichever switch costs the score comes out of Spark mode's defaults. SparkQwen's rule is that quality-affecting optimizations stay off by default, and a result below the 85.32 floor counts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions