Skip to content

[Feat] [VR200] glm5_3: Serve the TP4 kernel units on Rubin (SM107) - #75

Merged
YAMY1234 merged 5 commits into
sgl-project:mainfrom
mattteochen:rubin-glm5_3-tp4
Nov 24, 2026
Merged

YAMY1234 merged 5 commits into
sgl-project:mainfrom
mattteochen:rubin-glm5_3-tp4

Conversation

@mattteochen

@mattteochen mattteochen commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

#24 serves GLM-5.3 / GLM-5.2 NVFP4 at TP4 on one GB300 tray, including the decode role of a PD-disaggregated deployment. On Rubin (SM107), a TP4 build serves no width and stops, because every TP4 kernel unit is gated on SM103 with 152 SMs. One Rubin node (4 GPUs) is the TP4 decode worker of mid-latency PD layouts. The units' kernels are the same sources on both GPUs (JIT CUDA compiled for the device, CuTe DSL compiled for its arch); only the gates and the plans tied to GB300's SM count stop them.

Modifications

  • Layout (AGENTS.md: architecture directories do not overlap). glm5_3/ll/ keeps GB300's code and never checks the architecture.
    • glm5_3/ll/target.py (new): Target, the GPU the ll.* units run on and the plans they run there (GEMM plan, SM count, GPCs, whether FlashInfer's explicit split-K tactics run, measured or derived caps), and GB300, the measured one.
    • glm5_3/sm107/tp4.py (new): RUBIN, Rubin's plans, derived from GB300's. Each unit logs once that its plan is derived.
    • glm5_3/targets.py (new): select(), the one place that maps an architecture to a target. Profile.from_args calls it once per build and the profile carries the result (Profile.target). Any other GPU has no target and declines every unit, as before.
  • Gates: ll.attention, ll.hops, ll.moe and ll.sparse_mla_fd decline when the profile has no target, instead of comparing the compute capability. The TP4 draft (draft_units.check_draft_config) accepts a GPU that has a target.
  • ll.sparse_mla_fd: on a derived target (Rubin) the row caps are GB300's, cut to the 16-CTA clusters the device co-schedules (queried at build). A width Rubin cannot launch in one wave declines to TRTLLM-Gen instead of stopping the server. GB300 keeps its fail-stop.
  • ll.gemm: runs the target's plan (ll.build_linear(..., target=)). Rubin's plan is GB300's ranges, with every split-K tactic re-checked for one wave of 212 SMs.
    • The router keeps SGLang's GEMM on Rubin. Its split-K logits pass the router bound there, but miss the FP64 comparison against cuBLAS at 18 and 20 rows. The router's split-K starts at 17 rows, so one or two requests at 3–6 tokens never use it.
    • The split-K source on Rubin is the vendored copy, since FlashInfer's explicit tactics serve SM100 / SM103. It reserves CuTe DSL's SM100 shared memory, 232,448 bytes, which is also Rubin's opt-in.
  • docs/models/glm5_3.md / spec docstring: TP4 on one GB300 tray or one Rubin node. The docs also say to set SGLANG_ENABLE_EMBED_REPLICATION=1 for slot draft: since [Feat] [RUBIN] glm5_3/sm107: GLM-5.2 TP16 bs=1 megakernels and EAGLE v2 step CUDA graph (spec_step) #19 the flag no longer sets it.
  • Coexists with [Feat] [RUBIN] glm5_3/sm107: GLM-5.2 TP16 bs=1 megakernels and EAGLE v2 step CUDA graph (spec_step) #19's TP16 path: glm5_3/spec.py still sends TP16 to glm5_3/sm107 by TP size; the TP4 units serve SM107 at TP4 only, and the TP16 gates are unchanged.
  • ll.hops one-shot squares in FP32 (its own commit, both GPUs). The hop's RMSNorm squared each bf16 element in bf16, as FlashInfer 0.7.1's MNNVL one-shot did. FlashInfer 0.7.3 squares in FP32 (fix(comm): square in fp32 in MNNVL one-shot fused allreduce+RMSNorm flashinfer-ai/flashinfer#6818), so on the FlashInfer that SGLang pins (0.7.3 and later) the hop was up to 1 ulp off FlashInfer's one-shot on some elements. The one-shot now squares in FP32 and is bit-identical to FlashInfer's one-shot again. The two-shot already squared in FP32.
  • test/unit/test_glm5_3_ll_rubin.py (new, CPU), checking that:
    • Rubin composes every TP4 width and draft graph as GB300 does, and other GPUs take no unit;
    • the TP4 draft admits SM107;
    • the target is selected once per profile, and no glm5_3/ll/ file names SM107 or imports glm5_3/sm107;
    • each GPU gets its own GEMM plan (Rubin's is GB300's without the router), and the split-K source on Rubin is the vendored copy;
    • sparse MLA declines on Rubin where GB300 fails-stop.

Apart from the hop's FP32 squares, no kernel source changes. GB300 takes the same code path as before: the same plan objects and the same gates.

Accuracy Tests

GSM8K, 5-shot, greedy, 512 tokens, MTP 5/1/6 (EAGLE top-1, natural acceptance), 2 requests in flight, TP4.

Rubin, one node, aggregated, full GSM8K test set (1,319 questions). Each run is one pass over the test set. A server start runs it twice, the second pass in a shuffled submission order. Greedy outputs are not reproducible from run to run here (2 requests in flight with MTP), so each setup has several runs:

Setup All-reduce + RMSNorm fusion outside the plugin Runs Accuracy (mean, range) AL
Stock cutedsl (the low-latency recipe's) 5 0.9534 (0.9500–0.9568) 4.02–4.03
Stock auto (FlashInfer MNNVL) 4 0.9460 (0.9409–0.9507) 4.01–4.02
Megakernel on auto (the plugin refuses cutedsl) 2 0.9390 (0.9356, 0.9424) 4.02–4.03
  • Against stock on the same all-reduce fusion (auto): −0.4 pp in the same job (paired Cochran–Mantel–Haenszel test stratified by question, p = 0.25).
  • Against the recipe's stock (cutedsl): −1.4 pp in the same job (p = 0.0001).
    • Stock SGLang itself loses 0.75 pp when it moves from cutedsl to auto (5 vs 4 runs, p = 0.001).
    • The megakernel serves the arithmetic of auto. Its hops are bit-identical to FlashInfer's MNNVL one-shot and two-shot, which round the all-reduced sum to BF16 and then add the residual in BF16. cutedsl adds the rank sum and the residual in FP32 and rounds once.
  • What the gap is not:
    • The hop's BF16 squares: FP32 squares moved accuracy by −0.4 pp against the earlier BF16-squares run, which is noise (p = 0.33).
    • The NextN draft step and its embedding replication: with the draft slots off, +0.15 pp (p = 0.53).
    • The hop's NVFP4 epilogue as the MoE input: with ll.moe.nvfp4 off, −0.15 pp (p = 0.52).
  • Hop residual added in FP32 (experiment, not in this PR): the one-shot hop with an FP32 residual add scored 0.9481 over 4 runs (two server starts).
    • That is +0.85 pp over the hop in this PR (p < 1e-4), −0.4 pp against stock cutedsl in the same job (p = 0.12), and −0.1 pp against stock auto.
    • Its kernel test and hop timing are unchanged.
    • It would change the hops' contract from FlashInfer MNNVL's arithmetic to cutedsl's, on GB300 too, so it is left for a separate change.
  • Eager parity of the plugin's mirrored stock step: max abs logits difference 0 on TP0–3 at 6 and 12 rows (136 + 1,324 steps).
  • Engagement: every TP rank logs NVIDIA megakernel: active with the TP4 units (ll.attention, ll.hops, ll.moe.nvfp4, ll.sparse_mla_fd) and the TP4 NextN draft. No tracebacks in any run.

GB300, GSM8K-200 (same image and settings; one run per arm, before the FP32-squares change):

Setup Megakernel on Stock (cutedsl)
One tray, aggregated 0.965 (AL 3.98) 0.970 (AL 3.86)
Two trays, PD: PP4 prefill → TP4 decode role 0.940 (AL 4.01) 0.965 (AL 3.98)

Rerun on this head with current SGLang main (stock nightly images, no SGLang patches, the plugin installed from this branch). The nightlies from 2026-11-22 on require megakernel plugin API version 3, which this repository's main does not declare yet, so these use the 2026-11-21 nightlies, which contain sgl-project/sglang#46210. Same GSM8K protocol, full test set. Both megakernel runs set SGLANG_ENABLE_EMBED_REPLICATION=1: since #19 the GLM-5.3 spec checks its environment per TP size instead of in Requirements.env, so SGLang's FLAG_SETS_ENV no longer sets it (the docs now say so).

  • GB300, one tray, aggregated (2026-11-21 SGLang nightly image, with the FP32 squares): GSM8K-1319 megakernel 0.9447 (AL 4.04) vs stock cutedsl 0.9484 (AL 4.01): −0.4 pp, 21 vs 26 discordant questions (exact McNemar p = 0.56). TP0–3 active for target and draft, with the same plans and kernels as before the refactor; 0 tracebacks.
  • Rubin, one node, aggregated (2026-11-21 SGLang nightly image, cu134), megakernel on: GSM8K-1319 0.9416 / 0.9371 (2 passes), AL 4.03, against 0.9390 above; TP0–3 active for target and draft, 0 tracebacks.

GLM-5.3 kernel tests. These are not in this repository yet; #24 notes that they follow in a separate PR. They were run from that set.

  • Rubin, one VR200 node, FlashInfer 0.7.3, with the FP32 squares:
    • ll_hops (6 tests) passes: the one-shot is bit-identical to FlashInfer's at every one-shot row count (1–36), and so are the two-shot and the NVFP4 hop at every row count.
    • ll_moe (4) passes: the layer is bit-identical to the stock layer on the hop's FP4 input and at the P10 skip rows.
    • draft_eh_proj (2) passes.
    • Before the change, ll_hops and ll_moe failed only on these bitwise comparisons; the hop stayed within 1 ulp of its reference.
    • The other files pass as before, except draft_rowselect: it calls can_use_tiny_gemm(max_m=), which this SGLang does not have.
    • ll_gemm passes: 39 passed, 29 skipped (the router's cases, which Rubin's plan leaves to SGLang). For this run, its device gate was changed from GB300-only to the per-GPU plans; that change goes with the kernel tests.
  • GB300 (before the FP32 squares): 8 of 11 files pass. ll_hops and ll_moe fail on the FlashInfer 0.7.3 squares drift, and draft_rowselect fails as on Rubin. These were not rerun with the FP32 squares.

Unit tests (CPU) on this branch: see Checklist.

Speed Tests and Profiling

Rubin, served end to end (agentic coding workload, 60-minute profile).

  • Deployment: PD over Dynamo, with one PP4 prefill node and six TP4 decode nodes (28 GPUs), 1 request per decode worker, concurrency 54. MTP 5/1/6 runs with the workload's fixed acceptance (3.61).
  • Arms: the megakernel runs on the six decode workers only. The baseline is the same recipe and image without it (separate runs).
  • HBM clock locked at 4,752 MHz.
Baseline Megakernel on Δ
Output tok/s per user, p10 482.6 519.1 +7.6%
Total tok/s per GPU 13,508 14,135 +4.6%
Served decode step, 1 request (median) 7.25 ms 6.68 ms −7.8%
TTFT p90 11.6 s 8.6 s −26%
  • Every decode rank (24) logs NVIDIA megakernel: active for the target and the NextN draft. Each worker logs the draft as armed, and no setup is refused. There were 0 KV-transfer failures.
  • Accuracy on the same PD deployment (GSM8K-50, natural acceptance): 47/50, against 46/50 for the baseline recipe. Natural accept length per decode worker is 3.69–4.04.
  • TTFT falls because the shorter step frees each decode worker's single slot sooner.

Rubin, one node, aggregated (step sandwich).

  • Setup: TP4 aggregated, MTP 5/1/6, HBM clock locked at 4,752 MHz. Stock and megakernel runs alternate (stock / on / stock), each on a fresh server. Prompts are random tokens with a 1k unique suffix, and each request generates 3,072 output tokens.
  • Decode step: requests × accept length / throughput, from SGLang's decode log lines while every request decodes (median of 12–21 lines).
Context Requests Stock (run 1 / run 2) Megakernel on Δ vs stock mean
8,192 1 6.83 / 6.53 ms 6.43 ms −0.25 ms (−3.8%)
8,192 2 7.56 / 7.65 ms 7.69 ms +0.08 ms (+1.1%)
131,072 1 6.45 / 6.49 ms 6.05 ms −0.42 ms (−6.5%)
131,072 2 8.10 / 7.85 ms 7.74 ms −0.23 ms (−2.9%)
  • The two stock runs differ by up to 0.30 ms; only the 1-request rows are clearly outside that spread.
  • FP32 squares: these steps were measured before the FP32-squares change, which costs nothing measurable. In the hop microbenchmark (CUDA-graph replay), FP32 minus BF16 squares is +0.02 µs at 6 and 12 rows on the plain hop and −0.05 µs on the finalize hop. At every row count from 1 to 48 the difference stays within run-to-run noise (±0.2 µs). A verify step runs 157 hops.
  • Server flags that differ (the plugin requires them): --enable-nvidia-megakernel, --moe-runner-backend flashinfer_trtllm (stock: auto, which resolves to the same runner), and no --flashinfer-allreduce-fusion-backend cutedsl (stock keeps it).

Units on Rubin, µs per call.

  • Sparse MLA flash decode (16 heads, per layer of a 78-layer chain in one CUDA graph, ours / TRTLLM-Gen + bmm) at 8k context, with 64k within 0.2 µs:

    Rows Ours TRTLLM-Gen + bmm
    1 17.26 21.10
    2 17.50 20.07
    6 17.96 22.41
    7 18.00 21.95

    At 12 rows the one-tile kernel needs two waves and loses on its own (10.76 vs 10.22 µs bare). That is the width the plan hands to TRTLLM-Gen.

  • GEMMs (plan kernel minus SGLang's GEMM, chain context, weights streamed from HBM) at 1–24 rows:

    • wk_weights_proj split-K: −0.7 to −1.8.
    • dense_down / eh_proj TGV: −0.3 to −2.2.
    • o_proj: ±0.03.
    • lm_head TGV: −3.2 at 1 row. At 2–16 rows SGLang's GEMM is 0.9–1.7 µs faster per call. Rubin's plan keeps GB300's lm_head range (TGV at every width), as served in all the runs above; moving 2–16 rows to SGLang's GEMM on Rubin is a possible follow-up.

Checklist

  • pre-commit run --all-files passes.
  • Tests under test/ cover the change: test/unit/test_glm5_3_ll_rubin.py. Unit tests on CPU, python3 -m pytest test/unit with SGLang at cf6133a (the commit unit-test.yml pins): 1450 passed, 59 skipped on this branch (main 76ab864: 1404 passed, 59 skipped); the 46 tests in test_glm5_3_ll_rubin.py pass. The GLM-5.3 kernel tests are not in the repository yet (see Accuracy Tests).
  • Required SGLang bindings passed normal SGLang CI and are merged: [Feat] [NVIDIA] megakernels: DSA / MLA binding view, EAGLE draft capture checks, early draft embedding sharing sglang#46210 (merged 2026-11-20). No new binding is needed.
  • The tested SGLang and Mega SHAs and integration run link are named above.
  • Accuracy and performance E2E results against the matched baseline are attached for each affected supported model/hardware configuration. The Rubin results above are matched, but they come from internal runs, not the SGLang CI E2E tests.
  • Required E2E cases ran on the appropriate hardware. Missing coverage: SGLang CI has no Rubin runner and no GLM-5.3 E2E entry (test/e2e/ci_models.yaml). GB300 TP4 was rerun with the FP32 squares on one tray (aggregated, see Accuracy Tests); the two-tray PD layout was not.
  • A new model adds one line to .github/CODEOWNERS that names its owner: not applicable (no new model).

🤖 Generated with Claude Code

@mattteochen mattteochen changed the title [Feat] [Rubin] glm5_3: Serve the TP4 kernel units on Rubin (SM107) [Feat] [VR200] glm5_3: Serve the TP4 kernel units on Rubin (SM107) Nov 20, 2026
mattteochen and others added 3 commits November 23, 2026 13:48
On SM107 every TP4 kernel unit declined (ll.attention, ll.hops, ll.moe and
ll.sparse_mla_fd gated on SM103 with 152 SMs, ll.gemm on GB300's plan only,
and the TP4 draft required an SM103 GPU), so a TP4 build served no width and
stopped. The kernels are the same sources on both GPUs: the JIT units compile
for the device and the CuTe DSL kernels for its arch.

- ll/device.py: the GPUs the units serve, GB300 (plans measured) and Rubin
  (plans derived from GB300's); each unit logs once when its plan is derived.
- ll.attention, ll.hops, ll.moe and the TP4 draft accept both GPUs.
- ll.sparse_mla_fd: on Rubin the row caps are GB300's cut to the clusters the
  device co-schedules, queried at build; a width Rubin cannot launch in one
  wave declines to TRTLLM-Gen instead of stopping the server. GB300 keeps its
  fail-stop on the same facts.
- ll.gemm: one plan per GPU. Rubin runs GB300's ranges with every split-K
  tactic re-checked for one wave of 212 SMs, and keeps SGLang's router GEMM.
  The split-K source on SM107 is the vendored copy, since FlashInfer's
  explicit tactics serve SM100 / SM103.
- The vendored split-K reserves the device's opt-in shared memory instead of
  CuTe DSL's SM100 constant (the same 232448 bytes on both GPUs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rubin composes every TP4 width and draft graph as GB300 does, other GPUs take
no unit, the TP4 draft admits SM107, the per-GPU GEMM plans (no router split-K
on Rubin, every split-K tactic within one wave of 212 SMs), the split-K source
on SM107, the sparse MLA's declines on Rubin against GB300's fail-stop, and the
split-K shared memory read from the device.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The TP4 all-reduce + residual + RMSNorm hop (ll.hops) squared each bf16
element in bf16 before summing in FP32 on its one-shot form, as FlashInfer
0.7.1's MNNVL one-shot did. FlashInfer 0.7.3 squares in FP32
(flashinfer-ai/flashinfer#6818), as its two-shot and our two-shot already
did, so on the FlashInfer that SGLang pins (0.7.3 and later) the one-shot hop
was no longer bit-identical to FlashInfer's one-shot, and its norm output was
up to 1 bf16 ulp off the stock path's on some elements.

The one-shot now converts each element to FP32 and squares it there. With
the same launch geometry it is bit-identical to FlashInfer 0.7.3's one-shot
again; every other step of the hop is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@YAMY1234

Copy link
Copy Markdown
Collaborator

Thanks for bringing the TP4 units to Rubin. Two points from AGENTS.md, and one request about E2E tests:

  1. Architecture directories. AGENTS.md keeps SM103 and SM107 code apart. SM107 kernels, launchers and tactics live in sm107/, a file does not check for the other architecture, and it asks us not to add more SM107 branches to SM103 code. This PR adds such branches across glm5_3/ll/: ll/device.py, gemm_plan.PLANS / RUBIN_PLAN, and the Rubin caps and geometry in sparse_mla.py, hops.py and kernels/cute/splitk.py. glm5_3/sm107/ exists since [Feat] [RUBIN] glm5_3/sm107: GLM-5.2 TP16 bs=1 megakernels and EAGLE v2 step CUDA graph (spec_step) #19. Could the Rubin plans and caps move there, with ll/ keeping the GB300 code and the directory picked once at build?

  2. Tested version. The results are from the Nov-07 SGLang nightly (with [Feat] [NVIDIA] megakernels: DSA / MLA binding view, EAGLE draft capture checks, early draft embedding sharing sglang#46210 ported) and the commits before the rebase. If you could rerun on this head with current SGLang main and confirm the results still hold, that would be enough.

  3. E2E tests. GLM-5.3 has no E2E tests or test/e2e/ci_models.yaml entry yet, so SGLang's GPU CI cannot run it: run-ci-sglang would only run DeepSeek-V4.1. GLM-5.3 TP4 fits the 4-GPU GB300 runner. Could you help add them, here or in a separate PR, following DeepSeek-V4.1's layout? It has a helper module (test/e2e/deepseek_v41_server.py), the test files test_deepseek_v41_server.py and test_deepseek_v41_switch.py, and an entry in ci_models.yaml. Then run-ci-sglang:glm5_3 can cover the GB300 side of this PR, including the FP32-squares change.

mattteochen and others added 2 commits November 23, 2026 18:00
…in's in sm107/

The Rubin plans, caps and device selection moved out of glm5_3/ll, so ll/
holds GB300's code only and no longer checks the architecture (AGENTS.md:
architecture directories do not overlap).

- ll/target.py (replaces ll/device.py): Target, the GPU the ll.* units run on
  and the plans they run there (GEMM plan, SM count, GPCs, whether FlashInfer's
  explicit split-K tactics run, measured or derived), and GB300's, measured.
- sm107/tp4.py: RUBIN, Rubin's target: GB300's GEMM plan without the router's
  split-K, 212 SMs, 16 GPCs, the vendored split-K, derived caps, and the notes
  each unit logs once.
- targets.py: select(), the one place that maps an architecture to a target.
  Profile.from_args calls it once and the profile carries the result
  (Profile.target); the units read it from there.
- ll.attention / ll.hops / ll.moe / ll.sparse_mla_fd decline when the profile
  has no target, instead of comparing the compute capability; ll.gemm and
  ll.build_linear take the target instead of (sm, sms); gemm_plan.PLANS,
  RUBIN_PLAN, device_plan and device_gpcs are gone.
- The vendored split-K reserves CuTe DSL's sm_100 shared memory again, as on
  main: 232,448 bytes, which is also Rubin's opt-in.

Same plans, caps and kernels on both GPUs as before. Tests: the selection
happens once per profile, no ll/ file names SM107 or imports sm107/, and
Rubin's GEMM plan is GB300's without the router.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Since sgl-project#19 the GLM-5.3 spec checks its environment per TP size
(pinned_reasons) instead of declaring it in Requirements.env, so
SGLang's FLAG_SETS_ENV no longer sets SGLANG_ENABLE_EMBED_REPLICATION
with --enable-nvidia-megakernel, and without it the server stops at
startup, naming it. The docs still said the flag turns it on. Say that
slot draft needs it set to 1, as benchmark/README.md already does, and
add it to the launch example.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mattteochen

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Pushed 194be37 (refactor) and af0936c (docs) on top of the three earlier commits (no history rewrite).

1. Architecture directories. glm5_3/ll/ now holds GB300's code only and never checks the architecture.

  • ll/target.py (replaces ll/device.py): Target, the plans the ll.* units run on one GPU (GEMM plan, SM count, GPCs, split-K source, measured or derived caps), and GB300, the measured one.
  • sm107/tp4.py: RUBIN, Rubin's plans (GB300's GEMM plan without the router split-K, 212 SMs, vendored split-K, sparse-MLA caps cut by occupancy, the derived-plan log notes).
  • targets.py: select(), the only arch-to-target mapping. Profile.from_args calls it once per build; the units read Profile.target.
  • The gates in ll.attention / ll.hops / ll.moe / ll.sparse_mla_fd decline when the profile has no target; ll.gemm takes the target instead of (sm, sms); gemm_plan.PLANS / RUBIN_PLAN are gone; splitk.py is back to main (the reserved shared memory is the same 232,448 B on both GPUs).
  • Same plans, caps and kernels on each GPU as before. New unit tests check that the target is selected once per profile, that no ll/ file names SM107 or imports sm107/, and that Rubin's GEMM plan is GB300's without the router. CI unit at the pinned SGLang: 1450 passed vs main 1404 (59 skipped each). On the 2026-11-21 SGLang nightly: 1388 passed vs main 1342, with the same 129 failures on both (SGLang drift against the pin), so no new failures.

2. Rerun on this head with current SGLang main. The nightlies from 2026-11-22 on require megakernel plugin API version 3, which this repository's main does not declare yet (with or without this PR), so the reruns used the latest nightly that accepts version 2, which contains sgl-project/sglang#46210.

  • GB300, one tray, TP4 aggregated, 2026-11-21 SGLang nightly image, GSM8K-1319 (5-shot, greedy, 512 tokens, MTP 5/1/6 natural acceptance, 2 in flight): megakernel 0.9447 (AL 4.04) vs stock cutedsl 0.9484 (AL 4.01), −0.4 pp, 21 vs 26 discordant questions (exact McNemar p = 0.56). Every TP rank logs NVIDIA megakernel: active with the TP4 units and the NextN draft, with the same plans and kernels as before the refactor; no tracebacks. This includes the FP32-squares change.
  • Rubin: one-node check, 2026-11-21 SGLang nightly image (cu134), TP4 aggregated, megakernel on, same GSM8K protocol: GSM8K-1319 0.9416 / 0.9371 (2 passes), AL 4.03, against 0.9390 in the PR; TP0–3 active for target and draft, 0 tracebacks.
  • Both megakernel runs set SGLANG_ENABLE_EMBED_REPLICATION=1 (see [Feat] [RUBIN] glm5_3/sm107: GLM-5.2 TP16 bs=1 megakernels and EAGLE v2 step CUDA graph (spec_step) #19). Since [Feat] [RUBIN] glm5_3/sm107: GLM-5.2 TP16 bs=1 megakernels and EAGLE v2 step CUDA graph (spec_step) #19, the GLM-5.3 spec checks its environment per TP size instead of declaring it in Requirements.env. As a result, SGLang's FLAG_SETS_ENV no longer sets the variable, and without it the server stops at startup. This PR's docs now say to set it. Restoring the automatic setting would change main's behavior, so I can open that as a small follow-up PR if you want it.

3. E2E tests. They are in a separate draft PR, #92, so that the glm5_3 entry lands on main first (the label is created from ci_models.yaml on main) and run-ci-sglang:glm5_3 can then run on this PR. It follows DeepSeek-V4.1's layout: a helper module, a server test (baseline vs megakernel on GSM8K with a paired verdict and an engagement check), a switch test (stock parity with every slot off) and a glm5_3 entry (GB300, 4 GPUs).

🤖 Generated with Claude Code

@YAMY1234 YAMY1234 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, all three are addressed. LGTM; please do open the small follow-up that restores SGLANG_ENABLE_EMBED_REPLICATION automatically, since on main a GLM-5.3 server with the draft doesn't start without it.

@YAMY1234

Copy link
Copy Markdown
Collaborator

Merge this first. Once #85 and #92 are merged, please make sure CI still works (and fix it if there are any problems).

@YAMY1234
YAMY1234 merged commit 4e897b8 into sgl-project:main Nov 24, 2026
5 checks passed
@mattteochen

Copy link
Copy Markdown
Contributor Author

Opened #95 for the SGLANG_ENABLE_EMBED_REPLICATION follow-up.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants