LMSYS Megakernel Pushes Muse Spark Open to 1,109 Tok/s abstract technical diagram

Updated on November 11, 2026

Researchers at LMSYS (SGLang) and Meta AI have open-sourced facebookresearch/sgl-muse-mega, a custom CUDA C++ and PTX GPU megakernel that pushes Muse Spark Open decoding throughput from a 517 tokens/second speculative-decoding baseline to 1,109 tokens/second (2.14x speedup) on an 8-GPU NVIDIA Blackwell GB300 node (TP8).

At 1,109 output tokens per second on a frontier Mixture-of-Experts (MoE) model (8 of 256 routed experts active across 62 decoder layers in 4-bit NVFP4), an autonomous coding or reasoning agent can emit a complete 550-token file patch or chain-of-thought plan in under 500 milliseconds, closing the throughput gap that previously forced developers toward custom wafer-scale or hardwired ASIC clouds.

Why was standard SGLang leaving more than half of Blackwell GB300 silicon performance on the table even with DFlash V2 tree speculative decoding enabled? As author Pranjal Shankhdhar explains in the technical deep dive, conventional PyTorch/CUDA serving stacks execute Muse Spark Open as a chain of roughly 1,450 separate tiny GPU kernel launches per decode step. At microsecond Blackwell execution speeds, draining and refilling Streaming Multiprocessors (SMs) 1,450 times per step, plus waiting up to 4 microseconds at multi-GPU synchronization barriers, leaves Tensor Cores, Tensor Memory Accelerators (TMA), load units, and NVLink idle for huge stretches of wall-clock time.

sgl-muse-mega treats the GPU like a 1960s operating system transitioning from single-job batch mode to warp-level multiprogramming: collapsing those 1,450 micro-launches into one persistent kernel launch per layer across 144 SMs, where 12 specialized warps per SM overlap KV prefetching, Tensor Core math, SwiGLU activations, instruction-cache warming, and direct NVLink stores simultaneously.

Fast Facts
  • Open-Source Release: facebookresearch/sgl-muse-mega (CUDA C++ and PTX plugin for SGLang), detailed by Pranjal Shankhdhar in the LMSYS Muse Spark Open Ultrafast engineering post.
  • Measured Throughput (GSM8K, TP8): Jumps from 517 tok/s (standard SGLang + speculative decoding) to 1,109 tok/s (2.14x faster) across 8x NVIDIA GB300 Blackwell GPUs.
  • Target Model Topology: Muse Spark Open (62 decoder layers: 46 sliding-window 2,048-token attention + 16 global attention; 8 of 256 experts in NVFP4 with BF16 select layers + pooler/unpooler projections).
  • Kernel Launch Consolidation: Replaces ~1,450 individual CUDA kernel launches per decode step with 1 megakernel launch per layer (1 thread block of 12 role-specialized warps on each of 144 SMs in clusters of 4).
  • Speculative Draft Integration: Pairs with DFlash V2 drafting 15 candidate tokens in a single pass and verifying a 16-token tree in parallel inside the megakernel.

Standard Kernel-Chain Serving vs. sgl-muse-mega Warp Multiprogramming

Look at how sgl-muse-mega reorganizes both intra-SM warp duties and inter-GPU tensor parallelism (TP8) to hide memory and NVLink latency completely:

Architectural Dimension Standard SGLang + Speculative Baseline sgl-muse-mega Megakernel (8x GB300) Low-Level Systems Payoff
CUDA Launches per Decode Step ~1,450 separate single-op kernels 1 launch per layer (~62 launches) Eliminates SM drain/refill launch bubbles
Layer Fusion Boundary Attention -> sync -> Pooler -> MoE -> sync Layer L Attention through Layer L+1 QKV + KV write Prefetches independent KV history immediately
Intra-SM Thread Scheduling Homogeneous warps doing 1 op at a time 12 heterogeneous warps (KV load, TMA, TC, ICache, NVLink) Overlaps memory I/O, compute & network
MoE Sharding Strategy (TP8) Vanilla TP (intermediate-dim shard + 1 all-reduce) N-dimension expert GEMM sharding + 2 all-gathers Lower comm volume; bitwise matches EP training
Decode Speed (GSM8K Median) 517 tokens/sec 1,109 tokens/sec (+114.5%) Breaks 1,000+ tok/s barrier on commodity GPUs
CUDA Launches per Decode Step
Standard SGLang + Speculative Baseline~1,450 separate single-op kernels
sgl-muse-mega Megakernel (8x GB300)1 launch per layer (~62 launches)
Low-Level Systems PayoffEliminates SM drain/refill launch bubbles
Layer Fusion Boundary
Standard SGLang + Speculative BaselineAttention -> sync -> Pooler -> MoE -> sync
sgl-muse-mega Megakernel (8x GB300)Layer L Attention through Layer L+1 QKV + KV write
Low-Level Systems PayoffPrefetches independent KV history immediately
Intra-SM Thread Scheduling
Standard SGLang + Speculative BaselineHomogeneous warps doing 1 op at a time
sgl-muse-mega Megakernel (8x GB300)12 heterogeneous warps (KV load, TMA, TC, ICache, NVLink)
Low-Level Systems PayoffOverlaps memory I/O, compute & network
MoE Sharding Strategy (TP8)
Standard SGLang + Speculative BaselineVanilla TP (intermediate-dim shard + 1 all-reduce)
sgl-muse-mega Megakernel (8x GB300)N-dimension expert GEMM sharding + 2 all-gathers
Low-Level Systems PayoffLower comm volume; bitwise matches EP training
Decode Speed (GSM8K Median)
Standard SGLang + Speculative Baseline517 tokens/sec
sgl-muse-mega Megakernel (8x GB300)1,109 tokens/sec (+114.5%)
Low-Level Systems PayoffBreaks 1,000+ tok/s barrier on commodity GPUs

Two subtle hardware insights in LMSYS’s design deserve close study by ML systems engineers:

  1. Solving the “Instruction Cache Curse” of Megakernels: Packing attention, dense GEMMs, MoE expert GEMMs, SwiGLU, and NVLink all-gathers into a single giant binary bloats PTX code size, causing fatal L1 instruction-cache (I-cache) misses right when warps switch phases. sgl-muse-mega dedicates Warp 3 during the attention phase specifically to instruction-cache warming ahead of downstream execution!
  2. N-Dimension MoE Sharding Over Expert Parallelism (EP): Standard Expert Parallelism suffers severe GPU straggler stalls at low batch sizes when 8 active experts happen to land unevenly on one GPU. By sharding both MoE GEMM weights along the N dimension (TP8 with two lightweight NVLink all-gathers via plain remote memory stores), sgl-muse-mega eliminates expert load imbalance, uses less network bandwidth than vanilla TP, and preserves bitwise numerical parity with training.

Deploying Ultrafast Megakernel Profiles for Low-Batch Agent Loops

Megakernels shine brightest at low-to-medium concurrency (batch size 1–8) where memory bandwidth and kernel launch overhead, not raw Tensor Core FLOPs, cap per-user interactivity (such as live voice agents, IDE autocomplete, and sequential Claude Code-style bash loops):

Terminal
# Launch Muse Spark Open on an 8x Blackwell GB300 node with sgl-muse-mega + DFlash V2
git clone https://github.com/facebookresearch/sgl-muse-mega.git
cd sgl-muse-mega && pip install -e .

python3 -m sglang.launch_server   --model-path facebook/Muse-Spark-Open-NVFP4   --tp-size 8   --enable-custom-megakernel sgl_muse_mega   --speculative-algorithm DFLASH_V2   --speculative-num-draft-tokens 15   --port 30000

Keep three infrastructure trade-offs in mind before enabling megakernels across every cluster pool:

  • Separate Interactive Pods From High-Batch Throughput Pools: At massive offline batch sizes (batch 128+), standard CUTLASS / FlashAttention-3 kernels already saturate Tensor Cores without needing warp-specialized megakernels; dedicate sgl-muse-mega pods to latency-critical interactive coding and voice lanes while LMSYS completes larger-batch megakernel extensions.
  • Pin Exact CUDA Toolkit & Blackwell Architecture Flags: Because sgl-muse-mega uses direct PTX, mbarrier-tracked TMA bulk copies, and 4-SM distributed shared-memory clusters tuned for 144-SM GB300 silicon, do not expect drop-in speedups on older Hopper (H100) or Ada cards without architecture-specific warp retuning.
  • Verify Numerical Bitwise Parity in Eval Suites: Take advantage of the N-sharded MoE design’s bitwise equivalence with Expert Parallelism to validate zero accuracy regression on coding and math benchmarks after switching kernels.
Next Steps
  1. Benchmark facebookresearch/sgl-muse-mega on Interactive Coding Harnesses: If you operate GB200 / GB300 clusters, test end-to-end wall-clock completion times on 30-turn agentic coding tasks at 1,109 tok/s vs. standard vLLM/SGLang deployments.
  2. Profile Kernel-Launch Overhead (nsys) on Your Own MoE Models: Measure inter-kernel idle gaps on models launching 1,000+ ops per decode step; even fusing QKV, RoPE, and KV-write boundaries recovers 15%–30% throughput before writing full layer megakernels.
  3. Pair DFlash V2 Tree Speculative Decoding With Megakernels: Combine 15-token single-pass tree drafting with persistent SM kernels to cross 1,000+ tok/s without sacrificing frontier MoE reasoning depth.
Beat: Topics:
#cuda-megakernel #lmsys #meta-ai #nvidia-gb300 #sglang

The Tuesday Intelligence Dispatch

The definitive weekly briefing engineering leaders and technical founders read before deploying AI models to production. Unvarnished latency audits, real-world token unit economics, and architectural teardowns—zero vendor hype, zero sponsored reviews, and 100% empirical verification.

Every Tuesday at 6 AM ET ✓ Tested in Real Environments ✓ Verified by Experts
Strictly no spam. We never share your data. 1-click unsubscribe anytime.
✓ Added to Dispatch

You’re all set!

Stay tuned for the upcoming Tuesday Intelligence Dispatch delivered at 6 AM ET.