Skip to content

[Feat] beam: Add native Beam serving support - #44747

Draft
Jiminator wants to merge 347 commits into
mainfrom
beam
Draft

Jiminator wants to merge 347 commits into
mainfrom
beam

Conversation

@Jiminator

@Jiminator Jiminator commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Add native serving support for Beam, a 501B-parameter MoE model with 23B active parameters and a 1M-token context configuration.

Modifications

  • Implement Beam's hybrid sliding-window/full attention, SSMax query scaling, attention output gating, sandwich normalization, depth-scaled residuals, and grouped MoE routing.
  • Support BF16, ModelOpt NVFP4, and compressed-tensors FP8 checkpoints, with BF16 LoRA serving.
  • Integrate DFlash2, attention data parallelism, unified hybrid KV allocation, prefix caching, and HiCache. DFlash attention DP supports the matching FlashInfer MegaMoE runner/all-to-all configuration.
  • Add Beam reasoning and tool-call parsing across Chat Completions, Responses, and Messages, including checkpoint response-template handling and structured-output constraints.
  • Add fused projection/norm/residual/collective paths, router GEMV/BF16x3/cuTile kernels, and GB300 MoE tuning, together with registered unit, kernel, and end-to-end coverage.
  • Include the serving dependency and Docker updates used by this implementation.

Accuracy Tests

Recorded results at head f7473673ddf6175f301782af57e684d33d3e3f96, using the original Beam verifier at e698bb518d5117a3f1ba93357bfb72999a586020 and its full GSM8K 10-shot preset. All runs use actual DFlash decoding with eight draft tokens and no acceptance simulation.

Checkpoint Layout GSM8K accuracy Problems Request errors
NVFP4 TP4, 4 GB300 GPUs 94.69% 1,319 0
FP8 TP4, 4 GB300 GPUs 96.13% 1,319 0
BF16 TP8, 8 GB300 GPUs across two nodes 95.68% 1,319 0

Startup and the configured 1M context limit were checked. Actual 1M-token prompts and maximum-capacity operation were not exercised. Upstream CI and comparison against current main remain pending for this draft.

Speed Tests and Profiling

Recorded OpenHands multi-turn replay on four GB300 GPUs, NVFP4 TP4/EP1: 127,588.4 total tokens/s/GPU at 185.87 tokens/s/user (p50), concurrency 32. Total throughput includes cached input. This performance replay uses eight draft tokens, simulated acceptance length 4 with real draft tokens, and 88 GB HiCache per rank. It is a single measurement and does not measure natural draft acceptance or model accuracy.

No fresh performance comparison against current main has been run for this draft.

Checklist

  • Complete upstream formatting/pre-commit checks.
  • Include registered unit, kernel, and end-to-end tests for the implementation.
  • Complete upstream documentation integration.
  • Provide recorded accuracy and performance results with their protocols and limitations.
  • Complete upstream CI and maintainer review.

CI States

Latest PR Test (Base): ❌ Run #38909662145
Latest PR Test (Extra): ❌ Run #38909662423
Latest PR Test (AMD ROCm 10): ❌ Run #38909662232

thibautbar and others added 30 commits October 3, 2026 19:08
perf(beam): fuse the attention Q/K norm, RoPE and SSMax prologue
Use FP32 math attention in the Beam test oracle
…leanup

Fix unused request states after parallel sampling
…20260928

fix: retain page-aligned SWA history for prefix reuse
…60928

fix: preserve token-ID logprobs in PD streaming
Use a literal analysis opener whose closer also consumes the next
message's anchor, give calls the same closer between parallel calls,
require the XML constraint marker and newline value framing, accept any
recipient-style tool name, and let answers end on <|call|>.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Jiminator and others added 3 commits October 14, 2026 14:19
…y-swa-20261014

[Cherry-pick] Bring unified-memory and SWA fixes into dev
…-20261014

[Speculative] Allow DFlash with FlashInfer MegaMoE under attention DP
@mintlify

mintlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
sglang-doc 🟢 Ready View Preview Oct 16, 2026, 1:45 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-actions github-actions Bot added documentation Improvements or additions to documentation quant LLM Quantization dependencies Pull requests that update a dependency file lora speculative-decoding hicache Hierarchical Caching for SGLang blackwell SM100/SM120 npu jit-kernel unified-radix-cache memory-pool labels Oct 16, 2026

This branch was successfully deployed

1 active deployment
staging - docs — f7473673 Deployed Oct 16, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blackwell SM100/SM120 dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation hicache Hierarchical Caching for SGLang jit-kernel lora memory-pool npu quant LLM Quantization speculative-decoding unified-radix-cache

Projects

None yet

Development

Successfully merging this pull request may close these issues.