Skip to content

feat(moe): add opt-in FlashInfer AlphaMoE W8A8 and NVFP4 backends - #34072

Open
yyihuang wants to merge 22 commits into
sgl-project:mainfrom
yyihuang:codex/flashinfer-alphamoe-integration-b61a
Open

yyihuang wants to merge 22 commits into
sgl-project:mainfrom
yyihuang:codex/flashinfer-alphamoe-integration-b61a

Conversation

@yyihuang

@yyihuang yyihuang commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Add an explicit flashinfer_alphamoe MoE backend for the supported Qwen3-Next FP8 and GLM-5.2 NVFP4 checkpoints, plus a router-only mode that retains Triton expert compute. Shared backend registration, weight handling, workspace lifetime and runtime tracing are kept in one integration.

Final W8 compute dependency validation

Published W8 source: f37119c07d56. The tested CUDA hash is unchanged; the accompanying test-text edit documents FP32 scale reassociation.

Current W8-head CI: pre-commit, API/docs checks and Build Docs passed. PR Test skipped its GPU matrix pending run-ci authorization; no CI GPU pass is claimed. The appendix below is historical.

FlashInfer W8 compute #4287 supplies the compute dependency. This pair uses SGLang runtime 5407ec1a7dfee227a408702addcc15007ec7f126 and W8 CUDA SHA256 237a9b44549fa82fb3f7833ee51df76dd08d0927fc22674bc62c77c2182429b1. The SGLang production implementation is unchanged.

Final Qwen correctness (v46)

4xGB300,TP4/EP1; Qwen/Qwen3-Next-80B-A3B-Instruct-FP8@c5f5f263bdd5cc134092897864e8905d8fe7b928. Fixed AlphaMoE router: stock Triton experts B vs final W8 C (independent W8 attribution).

Independent audit: B=C=1259/1314 (95.8143%), delta 0; 7 gains/7 losses. Unchanged gates pass: both>=0.95,C-B>=-0.005. Five-shot GSM8K questions/prompts/references and wire/SDK inputs match. Each side: 1314 successful HTTP responses; 0 failures/retries/invalid/empty answers. Empty answers count wrong; paired outputs/HTTP receipts retained.

Runtime and CUDA identities are above. Dataset SHA256:3730d312f6e3440559ace48831e51066acaca737f6eabec99bccb9e4b3c39d14.

Four TP ranks: actual router kernels in B/C; kernel_alpha_moe_w8a8_up_down in C. Real requests: H2048/I128/E512/k10/BM8,z1. C kernel-M discrete sets (count;min,max): decode(49;8,512), eager(97;515,911), prefill(28;64,16384). Exact sets/token counts retained; graph M denotes real-request replay geometry. Integrity passes.

API B/C: 62.166970/50.689964s; harness 1448.686871s; physical turnaround 1460.407082s. Correctness wall times, not serving throughput or kernel timing.

Separate GB300 sanitizer replays preserve real eager inputs/layout: M1/H2048/I128/E512/k10/BM8,scale1,rank0/layer0,z1. Synccheck: 0 errors (23.510655s physical); racecheck: 0 hazards/errors/warnings (25.081664s). Scope excludes z2, graphs and other ranks. Capture: 545.017671s physical, 536.014468s harness, 513.267672s startup, 3.942568s request; no new accuracy/performance run.

Retained earlier integration measurements and review history

The unchanged record below retains earlier W8 accuracy and serving measurements, NVFP4 results and CI history. Its current/final-source wording applies to the recorded revisions. The new fixed-router W8 result above has separate attribution and no new serving-throughput measurement.

Code ready for review. Fresh Qwen E2E passed its accuracy gate. The preceding GLM/NVFP4 implementation failed accuracy and performance; the final FP32 accumulation repair passes full-model accuracy and request/kernel integrity but fails serving performance. The backend remains opt-in and is not automatically selected. Review-ready status does not assert model correctness, throughput improvement or release readiness.

Dependencies:

Current SGLang head: 05b536ae075e56145c3e80b9bd6a4bec58b6265b. The Qwen and preceding NVFP4 runs used 5407ec1a7dfee227a408702addcc15007ec7f126 with combined FlashInfer c6407025a445d0d6c3bcfd28a7326456b17e4387. The only intervening changes are two CI test fixtures; the complete python/sglang production tree is identical (fb8de627afc329699e8b1b9b87b3df89ee0de438). The final FP32 GLM run uses the same SGLang runtime and FlashInfer union f5c95353d3723360c55c6af313afd09bbd8bfdac; its NVFP4 files match public head 17d0ba9ab8fc43cafbd0981944013f622a9f99fc. Shipping also requires the dependency APIs to land in an appropriate released FlashInfer pin.

Fresh validation status — 2026-09-12

Qwen3-Next-80B-A3B-Instruct-FP8, TP4/EP1, identical 1314 held-out five-shot GSM8K requests:

Path Correct / 1314 Accuracy Delta vs stock
Stock Triton 1261 95.9665%
Fused router + Triton 1263 96.1187% +0.1522 pp
Fused router + AlphaMoE W8A8 1260 95.8904% −0.0761 pp

All three have zero invalid answers. Paired prompts/raw outputs, all 45 serving records and actual CUDA symbols on all four TP ranks were independently audited. Both candidate comparisons retain accuracy ≥0.95 and delta ≥−0.005; W8A8 isolated against the fixed fused router also passes (−3/1314). Five-repeat median serving speedups at C32/C64/C128 are router-only 0.9162/0.9127/0.8891×, combined versus stock 1.0560/1.0629/0.9388×, and W8A8 versus the fixed fused router 1.1514/1.1640/1.0600×. Overall serving promotion fails because regressions remain. Full per-repeat absolute Performance, Speedup, latency and configuration records are in the router PR and the W8A8 PR. Physical execution totaled8550.42s; first-start-to-final-completion8774.24s including the preserved timeout/resume. GSM8K API runtimes were110.65/54.85/49.01s, respectively.

GLM-5.2-NVFP4: the preceding NVFP4 revision 85de99d87cb9e86076296d29264d53f09cafb748 in FlashInfer c6407025a445d0d6c3bcfd28a7326456b17e4387 recorded 1267/1314 → 1249/1314, a −1.3699-percentage-point accuracy change that fails the unchanged −0.5-point allowance. The original empty-response guard also left both quality phases unsealed; empty predictions remain graded incorrect. The later diagnostic completed all 30 serving executions and four-rank GPU traces without replacing those original scores. C1/C8/C16 median paired serving speedups were 0.3422/0.1974/0.1543×, with zero wins at every concurrency. The full configuration, all 15 paired performance rows, response diagnostics and physical timing follow below. The current FP32 repair in FlashInfer #4340 at 17d0ba9ab8fc43cafbd0981944013f622a9f99fc completed its full GLM A/B and independent audit: 1254 → 1255 correct of 1314; accuracy passes and performance fails, with complete results below. Its passing scoped compilation/import CI is not GB300 numerical evidence; the Qwen results above are unchanged.

Current test-only CI repairs add AlphaMoE to the existing dispatcher-contract test while preserving its LoRA rejection, and make the existing MLX shutdown fixture model the actual receive→process→return sequence. Remote CPU validation passed39 tests and4 subtests (21.73s test runtime,33.21s physical step). Apple Silicon MLX CI run #34711186190 passed. The scheduler-mixin check took 11 s; the CI job took 401 s including setup. The model E2E stages in that workflow were skipped, so this result is test coverage rather than model-accuracy evidence.

Current Qwen per-repeat Performance and attribution

Model Qwen/Qwen3-Next-80B-A3B-Instruct-FP8@c5f5f263bdd5cc134092897864e8905d8fe7b928, TP4/EP1/DP1, BF16 activations from the FP8 checkpoint, Triton attention, KV dtype auto, chunked prefill 16384, memory fraction 0.7, full decode and breakable prefill graphs. Speculative decoding and shared-expert fusion are disabled. Only the stated router/compute path changes. Measurements below are the same audited 45 serving executions reused for three paired comparisons, not additional runs.

Router only: stock Triton → fused router + Triton

Five fixed-workload repetitions run per server variant and are paired by repeat ID and seed. They are not five independent server launches. All repeats are included. Throughput speedup is candidate output tokens/s divided by baseline output tokens/s; values below 1 are regressions. TTFT, TPOT and request E2E columns are per-repeat medians in milliseconds; lower is better.

Workload: 1024 input / 512 output tokens, 1,024 requests per repeat.

Concurrency Repeat Baseline output tok/s Candidate output tok/s Speedup TTFT B → C (ms) TPOT B → C (ms) E2E B → C (ms)
32 1 3931.74 3600.96 0.9159× 258.66 → 305.18 7.68 → 8.28 4181.76 → 4572.73
32 2 3903.13 3576.56 0.9163× 245.61 → 290.00 7.72 → 8.32 4197.90 → 4576.59
32 3 3896.20 3569.70 0.9162× 234.99 → 283.50 7.74 → 8.37 4218.70 → 4598.48
32 4 3920.03 3596.07 0.9174× 250.85 → 295.33 7.66 → 8.28 4181.58 → 4556.68
32 5 3903.24 3569.92 0.9146× 256.73 → 294.05 7.70 → 8.33 4178.47 → 4577.83
64 1 6066.99 5566.76 0.9175× 439.97 → 556.52 9.77 → 10.47 5411.06 → 5885.69
64 2 6067.16 5536.31 0.9125× 399.88 → 435.59 9.78 → 10.62 5381.46 → 5887.46
64 3 6046.65 5519.01 0.9127× 355.60 → 437.51 9.83 → 10.58 5416.43 → 5934.70
64 4 6101.55 5535.61 0.9072× 350.43 → 570.39 9.75 → 10.52 5342.81 → 5875.06
64 5 6057.65 5537.93 0.9142× 350.76 → 460.49 9.82 → 10.58 5380.58 → 5889.05
128 1 9436.00 8408.49 0.8911× 652.36 → 872.12 12.31 → 13.58 6912.17 → 7804.26
128 2 9495.66 8358.83 0.8803× 594.71 → 861.38 12.29 → 13.74 6879.95 → 7799.41
128 3 9392.04 8350.30 0.8891× 639.30 → 743.39 12.40 → 13.78 6945.49 → 7779.44
128 4 9517.56 8438.90 0.8867× 643.29 → 875.43 12.23 → 13.54 6852.26 → 7702.39
128 5 9413.79 8385.25 0.8907× 647.43 → 869.88 12.36 → 13.65 6902.31 → 7746.61
Concurrency Mean baseline output tok/s Mean candidate output tok/s Median paired speedup Candidate wins
32 3910.87 3582.64 0.9162× 0 / 5
64 6068.00 5539.13 0.9127× 0 / 5
128 9451.01 8388.35 0.8891× 0 / 5

Performance gate: FAIL. Every concurrency must have median paired speedup ≥ 1, and at least one must win all five paired repetitions.

W8A8 attribution: fixed fused router + Triton → fixed fused router + W8A8

Five fixed-workload repetitions run per server variant and are paired by repeat ID and seed. They are not five independent server launches. All repeats are included. Throughput speedup is candidate output tokens/s divided by baseline output tokens/s; values below 1 are regressions. TTFT, TPOT and request E2E columns are per-repeat medians in milliseconds; lower is better.

Workload: 1024 input / 512 output tokens, 1,024 requests per repeat.

Concurrency Repeat Baseline output tok/s Candidate output tok/s Speedup TTFT B → C (ms) TPOT B → C (ms) E2E B → C (ms)
32 1 3600.96 4145.22 1.1511× 305.18 → 418.72 8.28 → 6.66 4572.73 → 3963.22
32 2 3576.56 4118.20 1.1514× 290.00 → 408.89 8.32 → 6.75 4576.59 → 3975.70
32 3 3569.70 4115.10 1.1528× 283.50 → 418.02 8.37 → 6.72 4598.48 → 3993.60
32 4 3596.07 4139.69 1.1512× 295.33 → 425.59 8.28 → 6.68 4556.68 → 3965.68
32 5 3569.92 4123.11 1.1550× 294.05 → 406.05 8.33 → 6.73 4577.83 → 3975.12
64 1 5566.76 6453.25 1.1592× 556.52 → 781.30 10.47 → 8.49 5885.69 → 5063.53
64 2 5536.31 6449.45 1.1649× 435.59 → 769.43 10.62 → 8.42 5887.46 → 5065.06
64 3 5519.01 6426.75 1.1645× 437.51 → 697.30 10.58 → 8.46 5934.70 → 5078.82
64 4 5535.61 6443.33 1.1640× 570.39 → 840.72 10.52 → 8.33 5875.06 → 5072.09
64 5 5537.93 6415.55 1.1585× 460.49 → 942.88 10.58 → 8.49 5889.05 → 5067.80
128 1 8408.49 8920.52 1.0609× 872.12 → 1392.23 13.58 → 11.53 7804.26 → 7328.25
128 2 8358.83 8914.45 1.0665× 861.38 → 1477.78 13.74 → 11.51 7799.41 → 7330.97
128 3 8350.30 8851.62 1.0600× 743.39 → 1482.56 13.78 → 11.77 7779.44 → 7343.11
128 4 8438.90 8897.23 1.0543× 875.43 → 1458.07 13.54 → 11.75 7702.39 → 7283.14
128 5 8385.25 8835.57 1.0537× 869.88 → 1474.67 13.65 → 11.83 7746.61 → 7322.19
Concurrency Mean baseline output tok/s Mean candidate output tok/s Median paired speedup Candidate wins
32 3582.64 4128.26 1.1514× 5 / 5
64 5539.13 6437.67 1.1640× 5 / 5
128 8388.35 8883.88 1.0600× 5 / 5

Performance gate: PASS. Every concurrency must have median paired speedup ≥ 1, and at least one must win all five paired repetitions.

Combined path: stock Triton → fused router + W8A8

Five fixed-workload repetitions run per server variant and are paired by repeat ID and seed. They are not five independent server launches. All repeats are included. Throughput speedup is candidate output tokens/s divided by baseline output tokens/s; values below 1 are regressions. TTFT, TPOT and request E2E columns are per-repeat medians in milliseconds; lower is better.

Workload: 1024 input / 512 output tokens, 1,024 requests per repeat.

Concurrency Repeat Baseline output tok/s Candidate output tok/s Speedup TTFT B → C (ms) TPOT B → C (ms) E2E B → C (ms)
32 1 3931.74 4145.22 1.0543× 258.66 → 418.72 7.68 → 6.66 4181.76 → 3963.22
32 2 3903.13 4118.20 1.0551× 245.61 → 408.89 7.72 → 6.75 4197.90 → 3975.70
32 3 3896.20 4115.10 1.0562× 234.99 → 418.02 7.74 → 6.72 4218.70 → 3993.60
32 4 3920.03 4139.69 1.0560× 250.85 → 425.59 7.66 → 6.68 4181.58 → 3965.68
32 5 3903.24 4123.11 1.0563× 256.73 → 406.05 7.70 → 6.73 4178.47 → 3975.12
64 1 6066.99 6453.25 1.0637× 439.97 → 781.30 9.77 → 8.49 5411.06 → 5063.53
64 2 6067.16 6449.45 1.0630× 399.88 → 769.43 9.78 → 8.42 5381.46 → 5065.06
64 3 6046.65 6426.75 1.0629× 355.60 → 697.30 9.83 → 8.46 5416.43 → 5078.82
64 4 6101.55 6443.33 1.0560× 350.43 → 840.72 9.75 → 8.33 5342.81 → 5072.09
64 5 6057.65 6415.55 1.0591× 350.76 → 942.88 9.82 → 8.49 5380.58 → 5067.80
128 1 9436.00 8920.52 0.9454× 652.36 → 1392.23 12.31 → 11.53 6912.17 → 7328.25
128 2 9495.66 8914.45 0.9388× 594.71 → 1477.78 12.29 → 11.51 6879.95 → 7330.97
128 3 9392.04 8851.62 0.9425× 639.30 → 1482.56 12.40 → 11.77 6945.49 → 7343.11
128 4 9517.56 8897.23 0.9348× 643.29 → 1458.07 12.23 → 11.75 6852.26 → 7283.14
128 5 9413.79 8835.57 0.9386× 647.43 → 1474.67 12.36 → 11.83 6902.31 → 7322.19
Concurrency Mean baseline output tok/s Mean candidate output tok/s Median paired speedup Candidate wins
32 3910.87 4128.26 1.0560× 5 / 5
64 6068.00 6437.67 1.0629× 5 / 5
128 9451.01 8883.88 0.9388× 0 / 5

Performance gate: FAIL. Every concurrency must have median paired speedup ≥ 1, and at least one must win all five paired repetitions.

The final FP32 NVFP4 source is public FlashInfer 17d0ba9ab8fc43cafbd0981944013f622a9f99fc, tested in the combined revision f5c95353d3723360c55c6af313afd09bbd8bfdac. Both NVFP4 implementation files match the public head exactly. SGLang runtime 5407ec1a7dfee227a408702addcc15007ec7f126 and public head 05b536ae075e56145c3e80b9bd6a4bec58b6265b have identical complete python/sglang trees; their only differences are two CI test files.

The full run and an independent audit of its retained raw records are complete. Accuracy passes the unchanged ≥0.92 / delta ≥−0.005 gate; serving performance fails at every concurrency. The extra correct answer does not establish a statistically significant improvement or attribute the earlier regression solely to accumulation precision. The preceding revision's failed evaluation remains below, unchanged.

2026-09-12 final FP32 NVFP4: accuracy PASS, performance FAIL

Model: nvidia/GLM-5.2-NVFP4 at aec724e8c7b8ee9db3b48c01c320f63f9cdaf8aa. SGLang: 5407ec1a7dfee227a408702addcc15007ec7f126; FlashInfer: f5c95353d3723360c55c6af313afd09bbd8bfdac.

Comparison: stock MoE backend → AlphaMoE NVFP4 MoE. TP4 / EP1 / DP1, execution mode graph, speculative decoding disabled, shared-expert fusion disabled on both sides.

TP4/EP1 with speculative decoding and shared-expert fusion disabled on both sides; the current model registration also tests MTP, which is outside this AlphaMoE integration's supported scope.

Resolved server setting Baseline Candidate
moe_runner_backend flashinfer_trtllm flashinfer_alphamoe
attention_backend dsa dsa
prefill_attention_backend None None
decode_attention_backend None None
kv_cache_dtype fp8_e4m3 fp8_e4m3
chunked_prefill_size 16384 16384
mem_fraction_static 0.9 0.9
cuda_graph_config {'decode': {'backend': 'full', 'bs': [1, 2, 4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512], 'full_prefill_max_req': None, 'full_prefill_prefix_chunk_tokens': None, 'max_bs': 512, 'tc_compiler': 'eager'}, 'prefill': {'backend': 'breakable', 'bs': [4, 8, 12, 16, 20, 24, 28, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384, 416, 448, 480, 512, 576, 640, 704, 768, 832, 896, 960, 1024, 1280, 1536, 1792, 2048], 'full_prefill_max_req': None, 'full_prefill_prefix_chunk_tokens': None, 'max_bs': 2048, 'tc_compiler': 'eager'}} {'decode': {'backend': 'full', 'bs': [1, 2, 4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512], 'full_prefill_max_req': None, 'full_prefill_prefix_chunk_tokens': None, 'max_bs': 512, 'tc_compiler': 'eager'}, 'prefill': {'backend': 'breakable', 'bs': [4, 8, 12, 16, 20, 24, 28, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384, 416, 448, 480, 512, 576, 640, 704, 768, 832, 896, 960, 1024, 1280, 1536, 1792, 2048], 'full_prefill_max_req': None, 'full_prefill_prefix_chunk_tokens': None, 'max_bs': 2048, 'tc_compiler': 'eager'}}

GSM8K uses the repository's retained five-shot chat scorer (sglang.test.simple_eval_mixed_prefix_gsm8k.GSM8KEval), all 1,314 held-out examples (the first five of the 1,319-example split supply the examples), temperature 0, top-p 1, and a 2,048-token generation limit. Both variants receive the same prompts and references.

Metric Baseline Candidate Change
Correct / evaluated 1254 / 1314 1255 / 1314 +1 questions
Accuracy 0.954338 0.955099 +0.0761 percentage points
Invalid answer parses 33 35
GSM8K API runtime (s) 189.18 510.40

Accuracy gate: PASS. Both accuracies must be at least 0.92, and candidate minus baseline must be ≥ −0.005. The candidate gained 21 questions and lost 20; a passing accuracy gate does not assert bitwise equality or zero accuracy loss.

End-to-end kernel verification: PASS. This additionally requires complete server/request evidence and actual GPU kernel traces for each AlphaMoE variant in this comparison.

Performance

Five fixed-workload repetitions run per server variant and are paired by repeat ID and seed. They are not five independent server launches. All repeats are included. Throughput speedup is candidate output tokens/s divided by baseline output tokens/s; values below 1 are regressions. TTFT, TPOT and request E2E columns are per-repeat medians in milliseconds; lower is better.

Workload: 8192 input / 512 output tokens, 4 × concurrency requests per repeat.

Concurrency Repeat Baseline output tok/s Candidate output tok/s Speedup TTFT B → C (ms) TPOT B → C (ms) E2E B → C (ms)
1 1 135.52 45.09 0.3327× 302.67 → 2811.32 6.79 → 16.70 3773.34 → 11346.24
1 2 135.25 45.06 0.3332× 303.36 → 2811.44 6.79 → 16.70 3773.73 → 11347.26
1 3 135.22 45.08 0.3334× 300.69 → 2809.87 6.79 → 16.70 3775.20 → 11348.93
1 4 135.63 44.94 0.3314× 300.01 → 2811.75 6.79 → 16.73 3769.79 → 11357.73
1 5 135.86 45.40 0.3342× 300.06 → 2786.41 6.79 → 16.70 3770.21 → 11328.81
8 1 579.50 113.43 0.1957× 1608.87 → 16868.85 10.66 → 37.63 7056.61 → 36094.50
8 2 576.86 112.79 0.1955× 1682.06 → 17100.61 10.57 → 37.63 7107.61 → 36305.58
8 3 577.14 112.81 0.1955× 1611.95 → 16866.47 10.70 → 38.01 7084.01 → 36298.35
8 4 579.55 113.30 0.1955× 1610.72 → 16866.95 10.66 → 37.86 7059.08 → 36210.85
8 5 578.65 113.26 0.1957× 1612.41 → 16862.94 10.70 → 37.76 7079.56 → 36156.57
16 1 780.02 119.06 0.1526× 2655.04 → 27848.02 15.36 → 80.20 10508.00 → 68847.02
16 2 778.03 118.83 0.1527× 2650.98 → 27858.21 15.32 → 80.24 10509.94 → 68914.93
16 3 777.03 118.87 0.1530× 2652.86 → 27860.68 15.42 → 80.42 10546.49 → 68956.38
16 4 777.14 119.06 0.1532× 2652.85 → 27856.51 15.33 → 80.07 10502.45 → 68822.21
16 5 776.11 118.96 0.1533× 2696.56 → 28038.52 15.32 → 79.83 10562.11 → 68867.66
Concurrency Mean baseline output tok/s Mean candidate output tok/s Median paired speedup Candidate wins
1 135.50 45.12 0.3332× 0 / 5
8 578.34 113.12 0.1955× 0 / 5
16 777.67 118.96 0.1530× 0 / 5

Performance gate: FAIL (complete measurements). Every concurrency must have median paired speedup ≥ 1, and at least one must win all five paired repetitions.

Memory and execution evidence

Memory values below are resident-device snapshots after health/model/graph startup or after the named phase. They include model, KV cache and allocator reservations; they are not peak measurements or isolated CUDA Graph allocations.

Snapshot Baseline per-device MiB Candidate per-device MiB
after health 273106, 273170, 273170, 272850 272588, 272652, 272652, 272332
after accuracy 277440, 277504, 277504, 277184 277728, 277792, 277792, 277472
after performance 283194, 283254, 283254, 282934 279636, 277472, 277472, 279484

Post-health GSM8K dispatch/capture receipts observed execution modes: decode_graph_replay, eager, prefill_graph_replay. Startup capture and fixed-workload performance requests are excluded from this coverage.

Observed AlphaMoE runtime shapes below come from those request receipts. Kernel M is the submitted kernel geometry, or the registered capture geometry when a real request replayed that graph. Dispatch M includes graph padding; real tokens are the actual request tokens before that padding. Each column lists its observed values separately, not a Cartesian product of supported shapes. An inclusive range contains only consecutive values that were all observed; missing values are not inferred. The stock baseline has no AlphaMoE kernel shape records.

Variant Execution Kernel E H I local Routed top-k Block M Observed kernel M Observed dispatch M Observed real tokens
nvfp4 decode_graph_replay alphamoe_nvfp4_aligned_moe 256 6144 512 8 8 1–2, 4, 8, 12, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512 1–2, 4, 8, 12, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512 1–9, 43–102, 104–119, 121–123, 125–132, 134–149, 151–159, 162–168, 170–174, 176–183, 185–188, 190–195, 197, 199, 201–209, 211, 213–220, 222–225, 227–235, 237–241, 243–248, 252–253, 257–259, 261, 263, 265–268, 270, 272, 274–276, 279–283, 285–294, 296, 298, 300–303, 305, 308–312, 315–317, 319, 322–323, 325, 327, 329, 331, 334–339, 341–342, 345, 347–349, 351–358, 360, 362–364, 366, 368–373, 375, 377, 380, 382–386, 388, 391–396, 398–400, 402–403, 405–407, 409, 411, 413–414, 416–418, 423–424, 426, 428–429, 432, 434–437, 439–442, 445, 447–448, 450, 452–454, 456, 458, 460–463, 465–467, 469, 472, 474–476, 478, 482–484, 486, 488–491, 497–502, 505, 507–509
nvfp4 eager alphamoe_nvfp4_aligned_moe 256 6144 512 8 8 513–514, 516, 518, 522–523, 525, 527, 530, 532, 534–536, 539, 543, 545, 547, 550–556, 558–561, 563–564, 568, 572, 574, 576, 579–580, 582, 584, 587–589, 591–594, 596, 599, 601, 605–606, 608–609, 611, 614, 616–617, 619, 621, 623–624, 628, 630, 633–634, 638–639, 642, 646, 648, 651, 653, 655, 660–662, 664, 666–668, 670–671, 674, 677, 679–684, 686, 689, 691, 694–696, 698, 701, 703–707, 709–712, 714–715, 717, 719–720, 724–725, 729–730, 732–734, 736–739, 741–743, 746, 748, 750–752, 755–760, 762, 764–766, 769, 771, 773–774, 776–777, 780–781, 783, 785–788, 790, 793, 796, 802–803, 805, 807, 810–811, 813–814, 816, 819–821, 826–828, 830–831, 833–834, 837, 840–841, 843, 846, 849, 853, 855–856, 858, 861, 863, 865–866, 868, 871, 873, 877, 880–882, 885–886, 888, 890, 893, 896, 898–899, 902–905, 907, 910, 912, 914–916, 918, 920–921, 924, 928–929, 933, 935, 939–940, 943, 945–946, 951, 953, 955, 957, 960, 962–963, 965, 968–969, 971, 973–974, 976, 979, 981, 983, 986–988, 990, 992, 994, 997, 999, 1001–1002, 1005, 1008, 1010, 1012, 1015, 1018–1024, 3779, 12242, 12258, 12433, 12454, 12535, 12563, 12629, 12736, 15640 513–514, 516, 518, 522–523, 525, 527, 530, 532, 534–536, 539, 543, 545, 547, 550–556, 558–561, 563–564, 568, 572, 574, 576, 579–580, 582, 584, 587–589, 591–594, 596, 599, 601, 605–606, 608–609, 611, 614, 616–617, 619, 621, 623–624, 628, 630, 633–634, 638–639, 642, 646, 648, 651, 653, 655, 660–662, 664, 666–668, 670–671, 674, 677, 679–684, 686, 689, 691, 694–696, 698, 701, 703–707, 709–712, 714–715, 717, 719–720, 724–725, 729–730, 732–734, 736–739, 741–743, 746, 748, 750–752, 755–760, 762, 764–766, 769, 771, 773–774, 776–777, 780–781, 783, 785–788, 790, 793, 796, 802–803, 805, 807, 810–811, 813–814, 816, 819–821, 826–828, 830–831, 833–834, 837, 840–841, 843, 846, 849, 853, 855–856, 858, 861, 863, 865–866, 868, 871, 873, 877, 880–882, 885–886, 888, 890, 893, 896, 898–899, 902–905, 907, 910, 912, 914–916, 918, 920–921, 924, 928–929, 933, 935, 939–940, 943, 945–946, 951, 953, 955, 957, 960, 962–963, 965, 968–969, 971, 973–974, 976, 979, 981, 983, 986–988, 990, 992, 994, 997, 999, 1001–1002, 1005, 1008, 1010, 1012, 1015, 1018–1024, 3779, 12242, 12258, 12433, 12454, 12535, 12563, 12629, 12736, 15640 513–514, 516, 518, 522–523, 525, 527, 530, 532, 534–536, 539, 543, 545, 547, 550–556, 558–561, 563–564, 568, 572, 574, 576, 579–580, 582, 584, 587–589, 591–594, 596, 599, 601, 605–606, 608–609, 611, 614, 616–617, 619, 621, 623–624, 628, 630, 633–634, 638–639, 642, 646, 648, 651, 653, 655, 660–662, 664, 666–668, 670–671, 674, 677, 679–684, 686, 689, 691, 694–696, 698, 701, 703–707, 709–712, 714–715, 717, 719–720, 724–725, 729–730, 732–734, 736–739, 741–743, 746, 748, 750–752, 755–760, 762, 764–766, 769, 771, 773–774, 776–777, 780–781, 783, 785–788, 790, 793, 796, 802–803, 805, 807, 810–811, 813–814, 816, 819–821, 826–828, 830–831, 833–834, 837, 840–841, 843, 846, 849, 853, 855–856, 858, 861, 863, 865–866, 868, 871, 873, 877, 880–882, 885–886, 888, 890, 893, 896, 898–899, 902–905, 907, 910, 912, 914–916, 918, 920–921, 924, 928–929, 933, 935, 939–940, 943, 945–946, 951, 953, 955, 957, 960, 962–963, 965, 968–969, 971, 973–974, 976, 979, 981, 983, 986–988, 990, 992, 994, 997, 999, 1001–1002, 1005, 1008, 1010, 1012, 1015, 1018–1024, 3779, 12242, 12258, 12433, 12454, 12535, 12563, 12629, 12736, 15640
nvfp4 prefill_graph_replay alphamoe_nvfp4_aligned_moe 256 6144 512 8 8 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 288, 320, 352, 384, 416, 448, 512, 576, 640, 768 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 288, 320, 352, 384, 416, 448, 512, 576, 640, 768 77, 79–80, 82, 86, 88, 90–91, 93–96, 98–99, 101–102, 105–106, 108–109, 111–112, 119, 121, 124, 127, 129, 133–135, 141, 144, 150, 152–154, 164–165, 167, 169–170, 173, 179–180, 182, 185, 187, 191, 193–195, 198–199, 201, 207, 212, 216–217, 219, 223, 232, 238, 263, 271, 288, 291, 294, 306–307, 313–315, 319, 325, 327, 330, 333, 338, 342–344, 356, 360, 373, 378–379, 381–382, 388–389, 393, 398, 414, 434, 437, 486, 489, 494, 501, 533, 566, 591, 599, 628, 737

GPU execution witness: PASS. After unprofiled measurements, one stored real GSM8K prompt was replayed with a 32-token limit under SGLang's GPU/CUPTI profiler. This request is excluded from accuracy and performance. Required actual CUDA kernel symbols in all four TP traces: kernel_alpha_moe_nvfp4_up_down.

Harness invocation wall time: 6427.43 s (includes server startup, evaluation, optional timing/profiling and cleanup; excludes scheduler queue time). GSM8K runtime and per-request serving latency are reported separately above.

Final request integrity and physical timing

The auditor reconstructed every score from the canonical question, five-shot prompt, final successful HTTP response and returned SDK content. Both sides cover the same 1,314 held-out IDs. Empty final answers count as incorrect; failed or missing final requests cannot pass request integrity.

Metric Baseline Candidate
Successful HTTP responses 1314 1314
Request failures 0 0
Empty final answers, graded incorrect 33 34
Invalid answer parses 33 35

Full managed execution and first-start-to-completion turnaround: 6484.477 s; model harness: 6427.427 s. The serving rows measure completed HTTP workloads; startup, compilation, model loading and profiler collection are outside those rows. The GSM8K API times and per-request latencies have their separate boundaries above. All per-question paired outputs, HTTP receipts, serving records, post-health runtime shapes and four-rank device profiles are retained.

2026-09-12 preceding NVFP4 revision: accuracy FAIL; complete serving and response diagnostics

These results belong to the preceding NVFP4 implementation, public revision 85de99d87cb9e86076296d29264d53f09cafb748, contained in the combined FlashInfer revision c6407025a445d0d6c3bcfd28a7326456b17e4387, on 4×GB300. Its recorded full-model accuracy fails the unchanged gate, and its complete serving measurements fail the performance gate. The current FP32 accumulation repair, public revision 17d0ba9ab8fc43cafbd0981944013f622a9f99fc, is a different implementation. The final FP32 run is reported separately above and passes accuracy while failing performance. No result in this section establishes correctness or performance of that repair. The eight selected diagnostic responses and later serving/profile measurements remain separate from the original 1,314-question evaluation.

Model: nvidia/GLM-5.2-NVFP4 at aec724e8c7b8ee9db3b48c01c320f63f9cdaf8aa. SGLang: 5407ec1a7dfee227a408702addcc15007ec7f126; FlashInfer: c6407025a445d0d6c3bcfd28a7326456b17e4387.

Comparison: stock MoE backend → AlphaMoE NVFP4 MoE. TP4 / EP1 / DP1, execution mode graph, speculative decoding disabled, shared-expert fusion disabled on both sides.

TP4/EP1 with speculative decoding and shared-expert fusion disabled on both sides; the current model registration also tests MTP, which is outside this AlphaMoE integration's supported scope.

Resolved server setting Baseline Candidate
moe_runner_backend flashinfer_trtllm flashinfer_alphamoe
attention_backend dsa dsa
prefill_attention_backend None None
decode_attention_backend None None
kv_cache_dtype fp8_e4m3 fp8_e4m3
chunked_prefill_size 16384 16384
mem_fraction_static 0.9 0.9
cuda_graph_config {'decode': {'backend': 'full', 'bs': [1, 2, 4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512], 'full_prefill_max_req': None, 'full_prefill_prefix_chunk_tokens': None, 'max_bs': 512, 'tc_compiler': 'eager'}, 'prefill': {'backend': 'breakable', 'bs': [4, 8, 12, 16, 20, 24, 28, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384, 416, 448, 480, 512, 576, 640, 704, 768, 832, 896, 960, 1024, 1280, 1536, 1792, 2048], 'full_prefill_max_req': None, 'full_prefill_prefix_chunk_tokens': None, 'max_bs': 2048, 'tc_compiler': 'eager'}} {'decode': {'backend': 'full', 'bs': [1, 2, 4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512], 'full_prefill_max_req': None, 'full_prefill_prefix_chunk_tokens': None, 'max_bs': 512, 'tc_compiler': 'eager'}, 'prefill': {'backend': 'breakable', 'bs': [4, 8, 12, 16, 20, 24, 28, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384, 416, 448, 480, 512, 576, 640, 704, 768, 832, 896, 960, 1024, 1280, 1536, 1792, 2048], 'full_prefill_max_req': None, 'full_prefill_prefix_chunk_tokens': None, 'max_bs': 2048, 'tc_compiler': 'eager'}}

GSM8K uses the repository's retained five-shot chat scorer (sglang.test.simple_eval_mixed_prefix_gsm8k.GSM8KEval), all 1,314 held-out examples (the first five of the 1,319-example split supply the examples), temperature 0, top-p 1, and a 2,048-token generation limit. Both variants receive the same prompts and references.

The recorded accuracy regression fails the required gate. Full response diagnostics remain separate.

The original full evaluation recorded every answer but failed its empty-response guard. Its original scores below are unchanged. The later diagnostic replayed four selected original prompts sequentially and recorded complete HTTP responses, then measured serving and GPU execution using restarted servers. Selected responses do not replace, rescore or validate the full evaluation.

Metric Baseline Candidate
Correct / evaluated 1267 / 1314 1249 / 1314
Accuracy 0.964231 0.950533
Empty final answers 20 36
Invalid answer parses 20 38
Original GSM8K API runtime (s) 209.59 490.86

Recorded accuracy change: -1.3699 percentage points. Acceptance still requires both accuracies ≥ 0.92, candidate minus baseline ≥ −0.005, and complete paired request evidence. Empty final answers are graded incorrect. The original harness additionally stopped on empty text; that stop does not erase the measured accuracy regression. This diagnostic makes no passing accuracy claim.

Four selected original prompts were replayed sequentially with the same generation settings. An empty final answer can coexist with successful HTTP completion when the reasoning uses the token budget. These observations diagnose response termination and do not replace the original high-concurrency outputs.

Prompt ID Variant HTTP Finish reason Final content empty Completion tokens Reasoning tokens
119 baseline 200 length True 2048 2048
87 baseline 200 stop False 1672 1542
81 baseline 200 stop False 518 416
5 baseline 200 stop False 610 516
119 nvfp4 200 length True 2048 2048
87 nvfp4 200 stop False 1644 1514
81 nvfp4 200 stop False 381 295
5 nvfp4 200 stop False 626 535

Performance

Five fixed-workload repetitions run per server variant and are paired by repeat ID and seed. They are not five independent server launches. All repeats are included. Throughput speedup is candidate output tokens/s divided by baseline output tokens/s; values below 1 are regressions. TTFT, TPOT and request E2E columns are per-repeat medians in milliseconds; lower is better.

Workload: 8192 input / 512 output tokens, 4 × concurrency requests per repeat.

Concurrency Repeat Baseline output tok/s Candidate output tok/s Speedup TTFT B → C (ms) TPOT B → C (ms) E2E B → C (ms)
1 1 132.64 45.95 0.3464× 301.44 → 2794.54 6.77 → 16.32 3761.80 → 11136.19
1 2 133.55 45.70 0.3422× 304.55 → 2793.75 6.77 → 16.32 3762.30 → 11134.70
1 3 136.08 45.97 0.3378× 299.94 → 2793.49 6.77 → 16.32 3757.45 → 11129.78
1 4 135.96 46.00 0.3383× 303.44 → 2794.51 6.76 → 16.31 3761.09 → 11131.23
1 5 134.83 46.30 0.3434× 300.17 → 2770.34 6.77 → 16.31 3757.22 → 11107.65
8 1 563.89 114.30 0.2027× 1797.06 → 16580.07 10.67 → 37.58 7247.62 → 35813.49
8 2 578.02 114.01 0.1973× 1638.06 → 16552.31 10.62 → 37.85 7096.10 → 35915.35
8 3 577.10 113.95 0.1974× 1614.76 → 16556.43 10.71 → 37.92 7089.75 → 35935.56
8 4 579.36 114.39 0.1974× 1613.03 → 16553.04 10.66 → 37.79 7058.19 → 35865.11
8 5 578.40 114.41 0.1978× 1615.27 → 16549.99 10.69 → 37.67 7077.49 → 35800.29
16 1 775.75 119.88 0.1545× 2654.99 → 27466.46 15.38 → 80.05 10513.10 → 68386.72
16 2 779.10 119.67 0.1536× 2654.22 → 27475.09 15.33 → 80.14 10516.94 → 68443.79
16 3 776.59 119.69 0.1541× 2656.29 → 27483.04 15.44 → 80.25 10555.29 → 68489.18
16 4 776.83 119.89 0.1543× 2663.89 → 27475.57 15.35 → 79.90 10508.86 → 68351.55
16 5 775.56 119.82 0.1545× 2663.27 → 27457.26 15.36 → 79.77 10577.65 → 68379.28
Concurrency Mean baseline output tok/s Mean candidate output tok/s Median paired speedup Candidate wins
1 134.61 45.98 0.3422× 0 / 5
8 575.36 114.21 0.1974× 0 / 5
16 776.77 119.79 0.1543× 0 / 5

Performance gate: FAIL (complete measurements). Every concurrency must have median paired speedup ≥ 1, and at least one must win all five paired repetitions.

Memory and execution evidence

Memory values below are resident-device snapshots after health/model/graph startup or after the named phase. They include model, KV cache and allocator reservations; they are not peak measurements or isolated CUDA Graph allocations.

Snapshot Baseline per-device MiB Candidate per-device MiB
after health 273106, 273170, 273170, 272850 272518, 272582, 272582, 272262
after accuracy unavailable unavailable
after performance 283182, 283246, 283246, 282926 278884, 278948, 278948, 278628

Post-health GSM8K dispatch/capture receipts observed execution modes: decode_graph_replay, eager, prefill_graph_replay. Startup capture and fixed-workload performance requests are excluded from this coverage.

Observed AlphaMoE runtime shapes below come from those request receipts. Kernel M is the submitted kernel geometry, or the registered capture geometry when a real request replayed that graph. Dispatch M includes graph padding; real tokens are the actual request tokens before that padding. Each column lists its observed values separately, not a Cartesian product of supported shapes. An inclusive range contains only consecutive values that were all observed; missing values are not inferred. The stock baseline has no AlphaMoE kernel shape records.

Variant Execution Kernel E H I local Routed top-k Block M Observed kernel M Observed dispatch M Observed real tokens
nvfp4 decode_graph_replay alphamoe_nvfp4_aligned_moe 256 6144 512 8 8 1–2, 4, 8, 12, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512 1–2, 4, 8, 12, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512 1–12, 49–91, 93–94, 96–110, 112–115, 117–122, 124, 126, 128–151, 153–157, 161–168, 170, 172–178, 180–185, 187–188, 190–200, 202–203, 205–210, 212–216, 218–228, 230, 232–234, 237–245, 247–249, 252–266, 269–270, 272–274, 276–277, 279–280, 282, 284–288, 290, 293, 295–302, 304, 306–307, 309, 311–313, 316, 318–324, 327–328, 330, 332–333, 336–337, 339–341, 343–345, 347–351, 353–357, 360–361, 363–366, 368–370, 374–375, 378–379, 381–383, 386, 389, 393, 396–397, 400–401, 403, 405, 408–410, 412–414, 416, 418, 421–423, 425–429, 431, 434, 436–440, 442, 445–447, 450, 452, 455–456, 458–460, 464, 466–467, 470–472, 474–476, 479–480, 483, 485, 487–488, 490–494, 496, 498, 502, 505–506, 508, 512
nvfp4 eager alphamoe_nvfp4_aligned_moe 256 6144 512 8 8 514–515, 517–519, 521–522, 527–528, 532–534, 536–537, 539, 542–543, 545–546, 549, 551, 553, 555, 557–558, 560, 563–564, 566–567, 569, 571–572, 574, 577–578, 580–581, 583–585, 588, 590–591, 594, 596, 600, 603–605, 607–608, 611, 613–615, 618, 620–625, 629, 633, 635–636, 638–642, 644–647, 649–652, 654–655, 657–658, 663, 666, 670–671, 673–674, 676, 679–680, 684, 687–689, 691, 696, 698, 701, 704–705, 709, 711, 715, 717, 720, 722, 725, 727, 731–734, 737–738, 740–742, 744–746, 748, 753, 757, 759, 761, 764, 766, 769, 775–776, 778, 782–784, 787, 789–792, 794, 796–799, 802, 804, 809, 813–816, 820, 822, 825–827, 829–832, 834, 837, 841, 846, 848, 850, 852, 855–856, 858–861, 864–866, 868–869, 873, 877, 880, 883, 887–889, 892–893, 895, 898, 901–905, 907–909, 912, 914, 917–918, 920, 923, 925, 928, 931, 933, 936, 938–939, 941, 945, 947–950, 954, 956, 958–959, 965, 968, 970, 972, 976, 979–980, 983–984, 987, 993, 997–998, 1001, 1003, 1007, 1009–1010, 1014, 1018, 1020–1024, 3786, 12222, 12303, 12424, 12475, 12535, 12542, 12622, 12742, 15610 514–515, 517–519, 521–522, 527–528, 532–534, 536–537, 539, 542–543, 545–546, 549, 551, 553, 555, 557–558, 560, 563–564, 566–567, 569, 571–572, 574, 577–578, 580–581, 583–585, 588, 590–591, 594, 596, 600, 603–605, 607–608, 611, 613–615, 618, 620–625, 629, 633, 635–636, 638–642, 644–647, 649–652, 654–655, 657–658, 663, 666, 670–671, 673–674, 676, 679–680, 684, 687–689, 691, 696, 698, 701, 704–705, 709, 711, 715, 717, 720, 722, 725, 727, 731–734, 737–738, 740–742, 744–746, 748, 753, 757, 759, 761, 764, 766, 769, 775–776, 778, 782–784, 787, 789–792, 794, 796–799, 802, 804, 809, 813–816, 820, 822, 825–827, 829–832, 834, 837, 841, 846, 848, 850, 852, 855–856, 858–861, 864–866, 868–869, 873, 877, 880, 883, 887–889, 892–893, 895, 898, 901–905, 907–909, 912, 914, 917–918, 920, 923, 925, 928, 931, 933, 936, 938–939, 941, 945, 947–950, 954, 956, 958–959, 965, 968, 970, 972, 976, 979–980, 983–984, 987, 993, 997–998, 1001, 1003, 1007, 1009–1010, 1014, 1018, 1020–1024, 3786, 12222, 12303, 12424, 12475, 12535, 12542, 12622, 12742, 15610 514–515, 517–519, 521–522, 527–528, 532–534, 536–537, 539, 542–543, 545–546, 549, 551, 553, 555, 557–558, 560, 563–564, 566–567, 569, 571–572, 574, 577–578, 580–581, 583–585, 588, 590–591, 594, 596, 600, 603–605, 607–608, 611, 613–615, 618, 620–625, 629, 633, 635–636, 638–642, 644–647, 649–652, 654–655, 657–658, 663, 666, 670–671, 673–674, 676, 679–680, 684, 687–689, 691, 696, 698, 701, 704–705, 709, 711, 715, 717, 720, 722, 725, 727, 731–734, 737–738, 740–742, 744–746, 748, 753, 757, 759, 761, 764, 766, 769, 775–776, 778, 782–784, 787, 789–792, 794, 796–799, 802, 804, 809, 813–816, 820, 822, 825–827, 829–832, 834, 837, 841, 846, 848, 850, 852, 855–856, 858–861, 864–866, 868–869, 873, 877, 880, 883, 887–889, 892–893, 895, 898, 901–905, 907–909, 912, 914, 917–918, 920, 923, 925, 928, 931, 933, 936, 938–939, 941, 945, 947–950, 954, 956, 958–959, 965, 968, 970, 972, 976, 979–980, 983–984, 987, 993, 997–998, 1001, 1003, 1007, 1009–1010, 1014, 1018, 1020–1024, 3786, 12222, 12303, 12424, 12475, 12535, 12542, 12622, 12742, 15610
nvfp4 prefill_graph_replay alphamoe_nvfp4_aligned_moe 256 6144 512 8 8 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384, 416, 448, 480, 576, 640, 768, 832 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384, 416, 448, 480, 576, 640, 768, 832 79–80, 82–83, 85–87, 89–92, 95, 97–99, 101, 106–108, 112, 121, 124, 128, 132, 135, 147, 151, 153, 160–161, 165–166, 169, 171, 173, 175–176, 192, 194, 196–197, 201, 203–207, 210, 213, 215, 219, 221–222, 224, 226–227, 229, 232–234, 241, 243, 252, 255–256, 260, 262, 265, 267, 272, 275, 277, 288–289, 295–296, 299, 310–311, 315–316, 319–320, 336, 340, 342, 362, 366, 368, 393–395, 403, 408, 417, 420, 427, 429, 436, 453, 469–471, 533, 553, 578, 603, 613, 635, 745, 801

GPU execution witness: PASS. After unprofiled measurements, one stored real GSM8K prompt was replayed with a 32-token limit under SGLang's GPU/CUPTI profiler. This request is excluded from accuracy and performance. Required actual CUDA kernel symbols in all four TP traces: kernel_alpha_moe_nvfp4_up_down.

This invocation's physical wall time: 5814.13 s (includes server startup, evaluation, optional timing/profiling and cleanup; excludes scheduler queue time). GSM8K runtime and per-request serving latency are reported separately above.

The invocation time above is the follow-up diagnostic/serving invocation only; the original full GSM8K evaluation ran earlier. Full-evaluation runtime shapes come from the original post-health request trace; the four-rank device profile comes from the later diagnostic. Neither is a replacement correctness evaluation.

Original evaluation plus follow-up physical execution: 8935.65 s; turnaround from first start to final completion: 9829.03 s, including intervening gaps.

Modifications

  • Add opt-in --moe-runner-backend flashinfer_alphamoe, selecting W8A8 or NVFP4 according to the supported checkpoint quantization format.
  • For Qwen W8A8, route raw FP32 logits with perf(cake_alpha_moe): accelerate AlphaMoE fused router and aligned route plan on Blackwell flashinfer-ai/flashinfer#4339, quantize activations in groups of 128, then invoke feat(cake_alpha_moe): add optimized Blackwell W8A8 expert up/down compute flashinfer-ai/flashinfer#4287. Convert and restore gate/up weight and FP32 scale layouts across loading/reloading without changing parameter pointers.
  • Add SGLANG_FLASHINFER_ALPHAMOE_ROUTER_ONLY=1 with --moe-runner-backend triton. This isolates the router while leaving expert compute on Triton.
  • For GLM NVFP4, retain SGLang's existing grouped/sigmoid TopK, correction bias, renormalization and routed scaling; build its aligned plan and invoke feat(cake_alpha_moe): add Blackwell AlphaMoE NVFP4 expert up/down compute flashinfer-ai/flashinfer#4340. Preserve the checkpoint's input scale and independent gate/up/down and intermediate-activation scale semantics.
  • Reuse per-stream workspaces and warm modules before CUDA Graph capture. Ensure aligned-plan inactive capacity satisfies the compute APIs.
  • Add post-health runtime receipts. Eager records identify submissions within the current execute call; graph records bind kernel registrations to the actual graph backend and complete graph key. Receipts distinguish eager, decode replay and prefill replay, and include executed M, live-token count and geometry.
  • Keep unsupported configurations fail-closed: TP4/EP1 only, no expert all-to-all, separate shared experts, BF16 activations, gated SiLU without unsupported biases/clamps/input-side route weighting, and the fixed geometries below. Full torch.compile and speculative decoding are rejected.

Supported integration scope

Path Checkpoint and pinned revision Fixed expert geometry Routing
Router-only / combined W8A8 Qwen/Qwen3-Next-80B-A3B-Instruct-FP8@c5f5f263bdd5cc134092897864e8905d8fe7b928 E512/H2048/I_local128/routed_top_k10/BM8, TP4/EP1 Selected-logit softmax, no groups or correction bias
NVFP4 compute nvidia/GLM-5.2-NVFP4@aec724e8c7b8ee9db3b48c01c320f63f9cdaf8aa E256/H6144/I_local512/routed_top_k8/BM8, TP4/EP1 Existing GLM grouped/sigmoid routing

Both use separate shared experts. An execution plan with eight routed entries plus one forced shared slot does not mean the model has routed top-k nine. Such hand-authored plan fixtures do not establish production-shape coverage.

The table specifies admission scope, not fresh accuracy coverage. Dynamic M coverage must come from actual evaluation requests. Startup/capture buckets are not live-request observations.

Code verification on 2026-09-12

The changed-file pre-commit suite passed on this SGLang source. A real environment-field check passed 111 assertions covering defaults, dynamic reads, overrides, cleanup and metadata export, with the environment restored afterward. These checks did not run GPU inference.

E2E acceptance status

  • Record the SGLang, FlashInfer and model revisions, environment and evaluation configuration for completed Qwen validation and the preceding NVFP4 measurements reported above.
  • Qwen: complete canonical full GSM8K with 1,314 held-out examples, five-shot chat, temperature zero and max output 2,048; retain paired question IDs, prompts, generated answers and scores.
  • Qwen: compare Triton baseline, router-only and combined W8A8 separately. Both candidate comparisons passed accuracy ≥0.95 and delta ≥−0.005; the W8A8 comparison against fixed fused routing also passed.
  • Qwen: audit all 45 serving rows, post-health eager/graph request shapes and actual expected CUDA kernel symbols in all four TP traces. Full per-repeat Performance/Speedup tables are included directly below and in the router and W8A8 PRs.
  • Preceding NVFP4 revision: retain both original 1,314-answer sets and report the failed accuracy gate. Complete and audit all 30 separate follow-up serving executions, selected HTTP-response diagnostics and four-rank GPU profiling. These diagnostics do not replace the failed full-evaluation outputs.
  • Current FP32 NVFP4 repair: complete and independently audit the full GLM A/B. Both variants must reach accuracy ≥0.92 and candidate delta ≥−0.005 on all 1,314 held-out questions; retain complete paired real-request/HTTP-response records with empty predictions graded incorrect.
  • Current FP32 NVFP4 repair: complete, audit and report every serving row at C1/C8/C16, 8,192 input / 512 output tokens and five workload repetitions per point; include absolute Performance, Speedup vs baseline, TTFT/TPOT, memory snapshots and actual GPU kernel witnesses.
  • Meet the unchanged performance-promotion gate without material TTFT/TPOT or graph-memory regression. Completed Qwen and preceding NVFP4 results retain the regressions reported above; complete measurements do not turn a failing performance gate into a pass.
  • Land and release the required FlashInfer APIs and update the dependency pin before shipping.

Five workload repetitions within one baseline/candidate server deployment are not five independently restarted deployments. No new numerical tolerance or relaxed accuracy gate is introduced. Kernel unit tests, random tensor oracles, smoke tests and microbenchmarks are engineering diagnostics and do not replace real-model accuracy.

Historical Qwen E2E correctness and performance

The following tables are restored reports from 2026-08-08, not results reproduced during this delivery. The source revisions and environments differ from the current candidate. Full raw per-request/per-repeat artifacts have not been revalidated in this session; rounded values are preserved as reported. These historical tables are separate from the current-head results above.

Historical model: Qwen/Qwen3-Next-80B-A3B-Instruct-FP8 at c5f5f263bdd5cc134092897864e8905d8fe7b928, SGLang v0.5.16, 4×GB300, TP4/EP1, Triton baseline versus combined flashinfer-ai/flashinfer#4339 router + flashinfer-ai/flashinfer#4287 W8A8. This does not isolate either kernel.

GSM8K, same 200 questions, 5-shot Baseline Combined candidate Difference
Correct answers 191/200 190/200 −1 answer
Accuracy 0.955 0.950 −0.005 (−0.5 percentage points)

The candidate reached the old accuracy >= 0.95 and delta >= -0.005 gates exactly. This is an observed drop and a boundary pass, not proof of identical outputs or no accuracy loss.

Serving: 1,024 requests per workload, 1,024 input / 512 output tokens, three workload repeats per concurrency. Throughput columns are reported means; speedup is the reported mean of paired repeat ratios, which need not equal a ratio of rounded means.

Concurrency Baseline output tok/s Combined output tok/s Paired speedup Baseline p50 E2E ms Combined p50 E2E ms
32 4460.95 4691.90 1.0518× 3663.9 3477.0
64 6862.00 6940.33 1.0114× 4744.4 4702.1
128 10610.78 9771.34 0.9209× 6150.9 6696.9

TTFT was reported worse at all three concurrencies; exact TTFT/TPOT rows were not restored. Prefill CUDA Graph allocation was reported as 2.76 → 58.04 GB/GPU. This is a historical graph-allocation report, not a newly measured process-memory peak. Individual baseline/candidate repeat values were not restored, so a full repeat table cannot be reconstructed. These are three repeats within one server deployment per backend, not three independently restarted deployments.

The fixed geometry was E512/H2048/I_local128/routed_top_k10/BM8, with shared experts separate. Dynamic M was not traced; the workload does not establish any particular M bucket.

The existing historical source/import/adapter checks on another SGLang main revision were not full model evaluations and do not fill the current E2E gap.

Historical GLM NVFP4 E2E correctness and performance

The following tables are restored reports from 2026-08-08, not results reproduced during this delivery. The source revisions and environments differ from the current candidate. Full raw per-request/per-repeat artifacts have not been revalidated in this session; rounded values are preserved as reported. These historical tables are separate from the current-head results above.

Historical model: nvidia/GLM-5.2-NVFP4 at aec724e8c7b8ee9db3b48c01c320f63f9cdaf8aa, 4×GB300, TP4/EP1, flashinfer_trtllm baseline versus the AlphaMoE NVFP4 integration. The candidate included per-expert ModelOpt scale plumbing and a shared CUDA 13.3 attention-header compatibility fix. It was not raw flashinfer-ai/flashinfer#4340 at c0913e5060a6ddda6aaeb606e0f7bedeecfc3147.

GSM8K, same 1,314 evaluated questions, 5-shot chat, temperature 0, max output 2,048 Baseline Scale-patched candidate Difference
Correct answers 1256/1314 1252/1314 −4 answers
Accuracy 0.95585997 0.95281583 −0.00304414 (−0.304414 percentage points)
Evaluation elapsed seconds 186.93 499.03 Candidate took approximately 2.67× as long

The old accuracy gate passed: both scores exceeded 0.92 and the candidate drop was within 0.005. This establishes only the reported benchmark threshold result for that scale-patched integration. It does not establish identical outputs, general numerical equivalence, or correctness of the raw NVFP4 PR.

Historical serving used 8,192 input / 512 output tokens at C1/C8/C16. All 30 baseline/candidate workload executions were reported complete. There were five workload repeats within one server deployment per backend; these are not five independently restarted deployments. Speedup below is candidate throughput / baseline throughput; larger than one favors the candidate.

Concurrency Repeat Baseline workload seconds Candidate workload seconds Reported throughput speedup
1 1 Not restored Not restored 0.336×
1 2 Not restored Not restored 0.332×
1 3 Not restored Not restored 0.333×
1 4 Not restored Not restored 0.333×
1 5 Not restored Not restored 0.332×
8 1 15.02 71.70 0.209×
8 2 Not restored Not restored 0.202×
8 3 Not restored Not restored 0.202×
8 4 Not restored Not restored 0.201×
8 5 Not restored Not restored 0.202×
16 1 21.46 136.64 0.157×
16 2 Not restored Not restored 0.157×
16 3 Not restored Not restored 0.158×
16 4 Not restored Not restored 0.158×
16 5 Not restored Not restored 0.156×

“Not restored” means the visible recovery report lacked that row's absolute baseline/candidate durations. The reported ratios have not been independently recomputed from raw artifacts. No absolute measurements have been inferred from them.

Concurrency Median reported speedup Candidate wins
1 0.333× 0/5
8 0.202× 0/5
16 0.157× 0/5

Performance regressed by approximately 3.0×, 4.95× and 6.37× in runtime. The historical overall acceptance failed on performance, despite complete workloads and a passing accuracy threshold.

Runtime reports recorded E256/H6144/I_local512/routed_top_k8/TP4/EP1, separate shared experts, and 278 eager M values spanning 513–16384 after health. They did not establish decode-graph kernel coverage. Exact TTFT/TPOT and memory comparison rows were not restored.

Validation status and reviewer notes

Qwen's completed validation passed its accuracy gates; its full per-repeat results still fail overall performance promotion. The preceding NVFP4 implementation failed the recorded full-model accuracy gate and the complete serving-performance gate. The FP32 NVFP4 repair's full GLM A/B and independent audit pass accuracy and request/kernel integrity; serving performance fails at all three concurrencies. The restored August tables remain historical and do not replace these revision-specific September results.

Review the two quantization-specific scale/layout paths, router-only isolation, admission checks, workspace and graph lifetime, and runtime attribution. The FP32 NVFP4 repair's complete current-revision correctness and per-repeat performance results are included above; its substantial serving regressions remain a performance-promotion failure. Qwen's completed results remain attached to their tested source and are not replaced by NVFP4 diagnostics.


CI States

Latest PR Test (Base): ❌ Run #34711186291
Latest PR Test (Extra): ❌ Run #34711186221
Latest PR Test (AMD ROCm 10): ❌ Run #34711186444

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 8, 2026
Keep EnvBool and EnvStr parsing, defaults, overrides, and dynamic reads in a lightweight dedicated registry. Explicitly merge its fields into scheduler environment metadata with the existing encoding and sorted keys. Restore the shared environment registry to upstream main.
@github-actions github-actions Bot added the quant LLM Quantization label Sep 12, 2026
@yyihuang yyihuang changed the title feat(moe): add experimental FlashInfer AlphaMoE W8A8 backend feat(moe): add opt-in FlashInfer AlphaMoE W8A8 and NVFP4 backends Sep 12, 2026
@yyihuang
yyihuang marked this pull request as ready for review September 12, 2026 11:59
@yyihuang

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@yyihuang

Copy link
Copy Markdown
Collaborator Author

/rerun-failed-ci

Resume unfinished checks for 05b536a. PR Test Base run 34711186291 was cancelled while several CPU shards had already passed; no replacement run exists for this head. Preserve successful jobs, including the completed MLX and lint workflows.

@yyihuang

Copy link
Copy Markdown
Collaborator Author

/rerun-failed-ci

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

Labels

apple-silicon documentation Improvements or additions to documentation quant LLM Quantization run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants