Rust in Everything
← Papers

Accelerating Mixture of Block Attention via Dynamic Routing, KV-Centric Execution and Runtime Pipelining

Yingqi Shi, Junru Lu, Yun Liu, Di Yin, Xing Sun

2026-11-20▲ 13arXiv 2611.26268v1Hugging FaceCode

AI-generated from the full paper (deepseek-flash). It may contain mistakes; check the original.

TL;DR

LightningMoBA co-designs dynamic threshold routing, KV-centric execution, fanout-aware splitting, and Hopper pipelining to accelerate MoBA while decoupling retention from GPU scheduling granularity.

Problem

MoBA and FlashMoBA use a fixed Top-k budget per query, which applies one retention budget across different score distributions and requires ordered candidate-set maintenance. FlashMoBA also assigns CTA ownership by logical query range, so queries in different ranges that select the same KV block are handled by different CTAs and KV reuse is fragmented. Coupling query-group size to k makes a routing parameter determine scheduling granularity.

Method

LightningMoBA keeps MoBA's mean-pooled query-block scoring rule and standard softmax attention over retained tokens, but replaces fixed Top-k with a per-query threshold rule. It retains compulsory sink and local-window blocks and optional preceding blocks whose score lies within a margin Delta of the query's strongest preceding-block score. The router uses a two-pass streaming construction to emit compact CSC metadata without an ordered candidate set. Execution is organized by query-head and KV-block columns so each work unit reuses its loaded KV tile across assigned query rows, with high-fanout columns split into bounded tasks. On Hopper, TMA-based K/V transfers and irregular query gathers are overlapped with Tensor Core computation.

Results

  • At matched Top-16 retention across five checkpoints, LightningMoBA accelerates end-to-end generation while raising mean RULER score. §Abstract
  • The cumulative device-path final variant is faster than FlashMoBA at Top-16 and Top-32. §4.3.1
  • Against FlashMoBA's ordered Top-k candidate set at matched realized pair counts, threshold routing is faster at k=32 and k=64. §4.3.2
  • On identical Top-16 metadata, column ownership cuts attention-stage latency at 32K and 128K, with smaller reductions on GQA-30B-A3B. §4.3.3
  • Splitting the actual all-pair columns at T=4096 reduces attention-stage latency and lowers the largest work item to 64 tiles. §4.3.4
  • With Top-16 routing and T=4096 partitioning, the two-stage query-gather pipeline yields speedup with zero measured output error on sampled CSC rows. §4.3.5

Limitations

  • At 64K, LightningMoBA scores 1.41 to 5.67 points lower than FlashMoBA on all five models, as stated in Section 4.2.1.
  • At Top-16, the complete-router advantage reverses at 128K in both models, while larger budgets favor threshold selection, as stated in Section 4.3.2.
  • The pipelining gains are tied to Hopper; porting requires hardware support or an alternative software mechanism for concurrent contiguous transfers, indexed gathers, and matrix operations, as stated in Section B.3.1.
  • Fanout-aware splitting does not redistribute work between tensor-parallel ranks, and rank-aware budget control or cross-rank work redistribution is left as future work in Section B.3.2.

Key points

  • Fixed Top-k fixes how many blocks are retained rather than what score level is sufficient, so it can retain weakly related blocks for concentrated scores and discard non-negligible blocks for diffuse scores. §3.2
  • The threshold rule retains compulsory sink and local-window blocks plus optional preceding blocks within a fixed margin Delta of the strongest preceding score, with no softmax normalization required. §3.2.1
  • Lemma 3.1 states that unit multiplicity under query-band ownership requires M at least the maximum column query span; content-based routing can span the sequence and no shorter band can own it alone. §3.3.1
  • Column fanout is strongly skewed: the median is 0.064 times the mean, while P99 and the maximum reach 28.1 times and 64.5 times the mean. §3.3.2
  • KV-centric ownership groups all selected rows of a query-head and KV-block column under the same owner before tasks are formed, giving column-level unit multiplicity before deliberate fanout splitting. §3.3.1
  • Fanout-aware decomposition partitions high-fanout columns into bounded work units, with T=4096 used as the default balance between the largest work item and repeated K/V loads. §4.3.4
  • With pipelining, long-scoreboard stall falls from about 63% to below 8%, tensor-pipe activity rises from about 7% to 17%, and SM issue activity from about 15% to 36%. §B.2.1
  • Training integration using the adapted FlashMoBA backward implementation achieves a 1.602 times speedup on Qwen3-4B at Top-64 with closely aligned observed training losses. §5

Mind map

LightningMoBA
Problem
Fixed Top-k budget
Query-centric KV reuse
Routing coupling to scheduling
Dynamic routing
Per-query threshold rule
Compulsory sink and local blocks
Streaming CSC metadata
KV-centric execution
Column ownership
Fanout-aware splitting
Online softmax merge
Runtime pipelining
TMA K/V transfers
Producer Q gathers
WGMMA overlap
Evaluation
End-to-end RULER
Device-path ablation
Routing sweep
Quality analysis
Limitations
64K quality drop
128K router reversal
Hopper tied pipelining
TP rank imbalance