Chiosa
Machine Learning

QUILT speeds long-context prefill by sharing query work

QUILT: Rethinking Sparse-Attention Prefill through Shared Query Execution · arXiv:2610.11134

3 min
Updated

In plain words

QUILT is a computer-system method for running sparse attention in long-context language models. Instead of handling each query separately, it groups nearby queries, loads key-value entries they selected in common once, and reuses them.

It also arranges the sharing to fit accelerator tiles and overlaps its bookkeeping with attention work.

In tests on GLM-5.3 and DeepSeek-3.2, the largest reported individual reduction in sparse-attention kernel latency was 55.1% across four long-context workloads, while mean absolute score differences across 21 datasets stayed small.

The research

As context windows grow, prefill must process more selected key-value data before the first token appears. It remains unclear whether neighboring queries contain enough shared work for a kernel to reuse it, rather than repeatedly loading, converting and computing the same entries.

QUILT groups neighboring sparse queries and reuses their shared key-value entries, turning overlap into lower kernel and first-token latency.

The authors compared QUILT with OPS-Transformer, an optimized sparse-attention kernel, in the same XYServe serving setup. They tested GLM-5.3 and DeepSeek-3.2 on four long-context workloads under tensor and sequence parallelism, and compared their official task scores on 21 datasets.

QUILT reduced the number of processed key-value entries and lowered both kernel latency and time to the first output token. For GLM-5.3, average kernel latency fell 53.8% under tensor parallelism across the four workloads, while the mean absolute score difference across 21 datasets was 0.42 points. Together, these results support faster tested prefill with little measured score change.

The evidence is bounded to GLM-5.3 and DeepSeek-3.2, LongBench tasks, four workloads for performance and first-token latency, 21 datasets for accuracy, and a 16-Ascend-910C-NPU testbed.

It does not establish the same gains outside those models, tasks, configurations, serving setup and accelerator conditions.

What the evidence shows

  • The execution mismatch

    QUILT is a workload-aware sparse-attention execution mechanism for long-context language-model prefill. Existing kernels handle each query separately after it selects a small set of key-value entries.

    When neighboring queries select overlapping entries, the kernel reloads, converts and computes the same data repeatedly; isolated queries also create narrow operations. The research question is whether execution can use that overlap without changing the evaluated model outputs.

  • Measuring shared work

    To test whether the opportunity exists, the authors profiled GLM-5.3 on LongBench, a collection of long-context tasks, using Qasper question answering and GovReport document summarization. They measured the fraction of selected key-value entries shared by neighboring queries.

    For groups of two, that overlap exceeded 85.91% on Qasper and 78.06% on GovReport across layers, and exceeded 90.03% in the first layer. Larger groups shared less, but overlap remained substantial.

  • Turning overlap into execution

    QUILT's first implementation step is Shift-and-Compare Set Decomposition (SCSD), which turns set matching into sorting, shifting, equality checks and Boolean selection. It separates shared entries from query-specific ones using regular operations suited to accelerators.

    QUILT then builds future sparse segments while current attention computation runs, so this bookkeeping is largely overlapped after the pipeline warms up rather than removed.

  • Handling uneven overlap

    Because overlap differs across query groups, QUILT uses cascaded sharing. It first extracts entries shared by a large group, recursively partitions the residual workloads into smaller groups, and finally processes query-specific entries.

    Tile-aware execution moves short shared tails to better-sized tiles and removes low-scoring residual tails only at the final level, where clipping is approximate. This combines reuse at several granularities with accelerator-aware work sizes.

  • Testing speed and accuracy

    For the main comparison, the authors ran QUILT and the optimized OPS-Transformer kernel in the same XYServe serving setup. Across four long-context workloads, QUILT reduced average kernel latency and the number of processed key-value entries for both tested models, while also lowering time to the first output token.

    Across 21 datasets, mean absolute score differences were 0.42 points for GLM-5.3 and 0.75 points for DeepSeek-3.2, supporting faster tested prefill with little measured score change.

Deep

Next paperSoftmaxLift reduces key retrieval for long-context attention