Skip to content

[Feat] srt: Add attention, memory and DFlash DP support for Beam (4/8) - #45255

Closed
Jiminator wants to merge 35 commits into
mainfrom
beam-stack-03-srt
Closed

Jiminator wants to merge 35 commits into
mainfrom
beam-stack-03-srt

Conversation

@Jiminator

@Jiminator Jiminator commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Split #44747 into reviewable parts. This is the attention, memory and DFlash DP part, position 4 of 8 in the merge order below. Like every part it targets main; its branch also carries #45254, so its diff includes it.

Modifications

Adds the shared runtime support Beam relies on:

  • TRT-LLM MHA: mixed decode with FP8 KV, the fmha_v2 prefill workspace and page copies, unified page-table bounds.
  • FlashInfer ragged prefill for sliding windows and cached prefixes.
  • Unified hybrid SWA memory and SWA HiCache.
  • DFlash with attention DP.
  • FlashInfer MegaMoE all-to-all under attention DP, with an optional decode-only workspace (SGLANG_FLASHINFER_MEGAMOE_DECODE_MAX_TOKENS_PER_RANK).
  • PD token-ID logprob streaming, the speculative metrics fallback, and the NCCL graph-buffer registration guard.
  • The tests for all of the above.

This part still carries the cherry-picks made on the beam branch:

They will be reverted or dropped when the parts are synced with main.

This part changes 44 files (+3,115 / -226) beyond the parts its branch carries. The split commit carries the 18 Co-authored-by trailers of the Beam commits that touched these files.

Validation

Merge order

Every part targets main. #44747 stays open, unchanged, as the full reference. Merge in this order:

  1. [Chore] docker: Add Beam CUDA image (1/8) #45253 — Beam CUDA Docker image
  2. [Chore] deps: Bump the OpenAI SDK to 2.8.0 for Responses shell tools (2/8) #45291 — OpenAI SDK 2.8.0, needed by the Responses shell tools in [Feat] parser: Add Beam reasoning, tool calls and response templates (5/7) #45257
  3. [Feat] kernels: Beam model support #45254 — Kernels
  4. [Feat] srt: Add attention, memory and DFlash DP support for Beam (4/8) #45255 — Attention, memory and DFlash DP support
  5. [Feat] beam: Add Beam model, runtime support and checkpoints (4/7) #45256 — Beam model, checkpoints and tests
  6. [Feat] parser: Add Beam reasoning, tool calls and response templates (5/7) #45257 — Beam reasoning, tool calls and response templates (also after [Feat] parser: Enrich chat_parsing streaming events #40478, [Fix] parser: Accept whole-number floats for integer tool arguments #43941 and [Feat] parser: Add checkpoint-driven response-template adapters #40479)
  7. [Chore] deps: Add nvidia-cuda-tileiras for the optional cuTile router #45290 — nvidia-cuda-tileiras, needed by [Perf] beam: Add optional cuTile BF16x3 router GEMM #45361
  8. [Perf] beam: Add optional cuTile BF16x3 router GEMM #45361 — cuTile BF16x3 router GEMM (optional: without it Beam uses the cuBLAS router)

#45292 (Dynamo and grpcio-tools pins for the Beam image) is not in the merge order for now.

🤖 Generated with Claude Code


CI States

Latest PR Test (Base): 🚫 Run #39646405301
Latest PR Test (Extra): 🚫 Run #39646405451
Latest PR Test (AMD ROCm 10): ❌ Run #39646405429

Jiminator and others added 3 commits October 19, 2026 16:50
Add a Beam serving image on top of the v0.5.22 release image. It clones the upstream beam branch and adds the pins that branch needs, without changing docker/Dockerfile.

Split from #44747.
…ary (2/5)

Add the Beam fused projection/norm/residual and attention-gate ops, the FP32 router GEMV, BF16x3 and cuTile router GEMMs, the Beam all-reduce boundary kernel, and their kernel tests and benchmarks.

Split from #44747.

Co-authored-by: BBuf <1182563586@qq.com>
Co-authored-by: Caihua Li <caihua.li@bytedance.com>
Co-authored-by: Florent Gbelidji <florentgbelidji@Florents-MacBook-Pro.local>
Co-authored-by: iaroslav-reflection <iaroslav@reflection.ai>
Co-authored-by: Jinze Xue <jinzex@nvidia.com>
Co-authored-by: mloh <mloh@nvidia.com>
Co-authored-by: neilkg <33635204+neilkg@users.noreply.github.com>
Co-authored-by: thibautbar <t.barroyer@icloud.com>
Add the shared runtime support Beam relies on: TRT-LLM MHA and FlashInfer attention fixes, unified hybrid SWA memory, DFlash with attention DP, FlashInfer MegaMoE all-to-all under attention DP, and their tests.

Split from #44747.

Co-authored-by: BBuf <1182563586@qq.com>
Co-authored-by: Caihua Li <caihua.li@bytedance.com>
Co-authored-by: Florent Gbelidji <florent@reflection.ai>
Co-authored-by: Florent Gbelidji <florentgbelidji@Florents-MacBook-Pro.local>
Co-authored-by: Florent Gbelidji <florentgbelidji@florents-macbook-pro1.home>
Co-authored-by: Florent Gbelidji <florentgbelidji@Host-002.lan>
Co-authored-by: iaroslav-reflection <iaroslav@reflection.ai>
Co-authored-by: Jiajun Li <jiajun.li@radixark.ai>
Co-authored-by: Jinze Xue <jinzex@nvidia.com>
Co-authored-by: Kaiwu <kai@reflection.ai>
Co-authored-by: mloh <mloh@nvidia.com>
Co-authored-by: Neil Gollapudi <neil@reflection.ai>
Co-authored-by: neilkg <33635204+neilkg@users.noreply.github.com>
Co-authored-by: Qiaolin-Yu <liin1211@outlook.com>
Co-authored-by: Renault Young <renault@reflection.ai>
Co-authored-by: thibautbar <t.barroyer@icloud.com>
Co-authored-by: Yoni Gozlan <yoni@reflection.ai>
Co-authored-by: zhihengy <andy.ye@radixark.ai>
Beam serving does not use Dynamo, and the v0.5.22 release already
resolves grpcio-tools 1.84.0. The pins move to their own PR so they
can be dropped without touching this layer.
The kernel, its test and its benchmark need the tileiras compiler.
They move with the router dispatch that uses them, so this layer
needs no new dependency.
@Jiminator Jiminator changed the title [Feat] srt: Add attention, memory and DFlash DP support for Beam (3/5) [Feat] srt: Add attention, memory and DFlash DP support for Beam (4/8) Oct 20, 2026
…e graph can capture a collective"

This reverts commit 035ee0f.
main has the merged #42930 version.
@Jiminator

Copy link
Copy Markdown
Collaborator Author

Folded into #45256, which now carries both the shared runtime support and the Beam model (4/7 in the merge order), as Muse Spark's runtime and model landed together. Closing this one.

@Jiminator Jiminator closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant