Accelerating Mixture of Block Attention via Dynamic Routing, KV-Centric Execution and Runtime Pipelining
Yingqi Shi, Junru Lu, Yun Liu, Di Yin, Xing Sun
Tencent Youtu Lab
Published November 19, 2026 · on the feed November 20, 2026 · ▲ 15 · arXiv 2611.26268
The abstract
Mixture of Block Attention (MoBA) reduces long-context computation by selecting key-value (KV) blocks for each query. FlashMoBA implements MoBA efficiently but retains a fixed Top-k budget and query-centric schedule. Fixed Top-k applies one budget across different score distributions and couples routing to task granularity; query-range ownership fragments K/V reuse when several ranges select the same column. We present LightningMoBA, which co-designs selection and execution through dynamic routing, KV-centric ownership, and runtime pipelining. Dynamic routing thresholds MoBA's per-query block scores and directly emits variable-cardinality sparse metadata. KV-centric ownership groups selected rows by (query head, KV block) column, splits high-fanout columns into bounded tasks, and reuses each task's loaded KV tile. On Hopper, pipelining overlaps regular K/V transfers and irregular query gathers with Tensor Core computation. Together, these mechanisms decouple retention from GPU scheduling granularity. At matched Top-16 retention across five checkpoints, LightningMoBA accelerates end-to-end generation by 1.20 to 1.60x while raising mean RULER score from 74.42 to 75.28.
The Brief
2:00A short podcast summary of the paper. Written and voiced by AI.
Transcript
Accelerating Mixture of Block Attention via Dynamic Routing, KV-Centric Execution and Runtime Pipelining. By Yingqi Shi and four others, from Tencent Youtu Lab. Published on the nineteenth of November.
Mixture of Block Attention, or MoBA, cuts the cost of long contexts by having each query select a set of key-value blocks to attend to, rather than all of them. FlashMoBA already implements this efficiently, but it keeps two fixed choices. One is a fixed Top-k budget. A single budget gets applied across score distributions that differ, and it ties routing to the granularity of tasks. The other is a query-centric schedule, where each range of queries owns its work. When several query ranges select the same column, that ownership fragments the reuse of keys and values.
LightningMoBA co-designs selection and execution instead of treating them separately. It brings three mechanisms: dynamic routing, KV-centric ownership, and runtime pipelining. Together, the authors say, these decouple how much is retained from the granularity at which the GPU schedules work.
Dynamic routing applies a threshold to MoBA's per-query block scores, and directly emits sparse metadata whose cardinality can vary from query to query. KV-centric ownership flips the schedule around. Selected rows are grouped by column, meaning a query head paired with a KV block. Columns with high fanout are split into bounded tasks, and each task reuses the KV tile it has loaded.
On Hopper, runtime pipelining overlaps two kinds of data movement with Tensor Core computation: the regular transfers of keys and values, and the irregular gathers of queries.
The comparison holds retention matched at Top-16, across five checkpoints. Under that setting, LightningMoBA accelerates end-to-end generation by between one point two and one point six times. It does so while the mean RULER score rises, from seventy-four point four two to seventy-five point two eight.
The thread running through all three mechanisms is that the choice of what to keep should not be dictated by how the hardware schedules its tasks. Once those are separated, the speedup and the small gain in RULER arrive together rather than being traded against each other.
The deep dive
6:20A longer episode, written from the whole paper. Written and voiced by AI.
Transcript
Accelerating Mixture of Block Attention via Dynamic Routing, KV-Centric Execution and Runtime Pipelining. By Yingqi Shi and four others, from Tencent Youtu Lab. Published on the nineteenth of November. This is the long version: the whole paper rather than the abstract.
Sparse attention promises that a long-context model need not compare every query with every key. On a GPU that promise does not pay out by itself: choosing keys, building an index, moving scattered data and balancing uneven work can each eat the arithmetic saved. LightningMoBA, from Tencent Youtu Lab, targets Mixture of Block Attention, MoBA for short, and its fast implementation, FlashMoBA. The argument is that selection and execution must be designed together, and that FlashMoBA lets a routing parameter decide how the GPU divides its work.
MoBA cuts the sequence into blocks of tokens. To route, it averages each block's keys into one pooled key and scores that against the query. Each query keeps a fixed number of the best-scoring earlier blocks, plus its own block, and then runs ordinary softmax attention over every token it kept. The pooled score is only for choosing. FlashMoBA executes this by maintaining an ordered list of the best candidates for each query, and by giving each thread block on the GPU a band of consecutive queries. Two problems follow. A fixed budget keeps the same count whatever a query's scores look like. And several bands can claim the same key-value block, each loading it on its own.
The first idea is dynamic routing. The scorer is untouched; only the rule that turns scores into a kept set changes. For each query, find the highest score among the complete blocks before its own. Then keep every optional block whose score falls within a fixed margin of that maximum. The margin comes from a single threshold parameter divided by the softmax scale, so no softmax normalisation is needed, and the number kept varies by query. A sink block and a local window are always kept. The query's own block is left out of the reference maximum, because its pooled key can contain future tokens. The router runs in two streaming passes, one for the maximum and one setting a bit per kept block, with no score matrix stored and nothing sorted. A prefix sum and a scatter then write the result transposed: for every key-value block, the compact list of queries that chose it.
That transposition is the second idea. Work is owned by columns, one per query head and key-value block, so a thread block loads that block once and reuses it across every query that chose it. The paper proves why query bands cannot get there: a band owns a column alone only if it spans from the first query that chose it to the last. Bands group queries by position, routing groups them by content, and the two coincide only by accident. On captured traces, a selected column was claimed by up to twenty-one bands on average.
Column ownership brings its own hazard. A column's work grows with its fanout, the number of queries that chose it, and fanout is badly skewed. In one trace the median column carried zero point zero six four times the mean, the largest sixty-four point five times. One giant column would set the critical path. So ownership and task size are separated: each column is split into work items capped at four thousand and ninety-six selected rows. Each item reloads the block and writes a partial output, and an online softmax merge combines them exactly, trading some reuse for parallelism.
The third idea is the Hopper pipeline. Keys and values are contiguous, so the Tensor Memory Accelerator moves them. Query rows are scattered, so a dedicated producer warp gathers the next tile into a two-stage buffer while a consumer warpgroup does the matrix work on the current one.
The headline: at a matched budget of sixteen blocks across five checkpoints, generation over the full RULER suite runs one point two to one point six times faster, and mean RULER rises from seventy-four point four two to seventy-five point two eight. The comparison that tests the thesis more directly holds the new execution engine fixed and swaps only the routing rule. At sixteen blocks, dynamic routing was actually slower in four of six configurations. At thirty-two it was faster in all six. At sixty-four it was one point one six to one point five six times faster and more accurate in every configuration.
The component ablations line up. Column ownership cut attention latency by up to thirty-three point eight percent, and splitting at the default cap cut another fifteen to sixteen percent. The query-gather pipeline was the largest single step, two point five three to two point six five times faster than gathering serially, with warps stalled on memory falling from about sixty-three percent to below eight. The router alone, at sixty-four blocks, beat the ordered candidate list by six point nine nine to eleven point two five times.
There is no dedicated limitations section, though the appendix is candid. At sixty-four thousand tokens LightningMoBA scores lower on all five models, by one point four one to five point six seven points. Much of that is variable tracking, a multi-hop task, which fell by an average of twenty-five point seven seven points; the authors suspect missed intermediate blocks but say they have not verified the cause. FlexPrefill is slower but more accurate in most configurations. The pipeline gains are tied to Hopper, and splitting does not balance work across tensor-parallel ranks. Training evidence is one model, one seed, one hundred steps.
The idea to carry away is that how many blocks a query keeps and how the GPU divides the work should be separate decisions. LightningMoBA lets scores set retention, columns set ownership, a row cap set task size, and hardware overlap hide the scattered gathers. The execution half delivers at small budgets; the routing half earns more as the budget grows.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free