TRANSMISSION // 2605.07719v2

How Mosaic coordinates CPUs and GPUs for long-context AI

Source published

Mosaic adapts sparse attention to individual model heads and coordinates CPU–GPU work. In tested setups, it improved decoding speed while keeping results close to full attention.

AI-generated conceptual illustration for How Mosaic coordinates CPUs and GPUs for long-context AI
AI-generated conceptual illustration; not documentary evidence.

Long-context language models may keep much of their working memory in CPU memory when it will not fit on a GPU. But finding and using relevant parts of that memory can slow generation. Mosaic aims to make this process more efficient without giving up too much output quality.

When a language model generates text, it repeatedly consults a key–value (KV) cache: stored representations of earlier tokens. Long contexts can make this cache too large for GPU memory, so some serving systems place much of it in CPU memory. The model must then coordinate with the CPU to use that history.

Mosaic, described by Feiyu Yao and colleagues, tackles this problem with block-sparse attention. Rather than calculate attention over the entire cache, the system compares a query with metadata for candidate blocks, selects some blocks, and calculates attention over those. The research question is how to make this process faster when much of the context cache resides on the CPU, while preserving output quality.

Sharing work across devices

The paper examines two designs for sparse attention with CPU-resident memory. In the GPU-centralized design, the GPU selects relevant blocks and fetches them across the CPU–GPU connection, which can make data transfer a bottleneck. In the CPU–GPU partitioned design, the CPU performs sparse attention over its own memory. This reduces transfers of selected cache blocks, but can leave the GPU waiting for the CPU’s work to finish.

Mosaic coordinates the devices rather than assigning all sparse attention to one. Its predictor classifies attention heads as “streaming” or “retrieval” heads. Streaming heads can meet an output-deviation threshold using the small portion of the cache already on the GPU; retrieval heads need access to older context. For retrieval heads, a selector chooses both the block size and the KV budget—the amount of cache to use. A scheduler assigns tasks to CPU or GPU workers, prioritizing tasks estimated to involve more data while allowing the devices to work in parallel.

The budget is based on more than attention scores. The paper argues that score coverage may not capture how much selected information affects the resulting attention output. For example, attention sinks can receive substantial scores while having small value-vector norms. Mosaic therefore estimates output deviation and accounts for each head’s relative contribution, aiming to avoid spending retrieval resources on low-impact heads while protecting more influential ones.

What the evaluation reports

The main evaluation used Qwen2.5-7B-Instruct and Llama-3.1-8B-Instruct, with LongBench, L-Eval and RULER. Contexts reached 128,000 tokens. The authors also tested four CPU–GPU hardware configurations and ran a separate multi-GPU experiment with GLM-4.5-Air, a 110-billion-parameter mixture-of-experts model.

Across the reported quality tests, Mosaic’s results were close to full attention, but not identical. The paper reports small average gaps on LongBench and somewhat larger gaps on L-Eval; some individual tasks also showed declines. “Near-full quality” describes an overall pattern, not a guarantee that every task retains the same score.

For decoding speed, the paper compares Mosaic with Quest using a fixed configuration chosen for high quality. It reports time-per-output-token (TPOT) speedups of 1.9×–3.4× on Qwen and 2.5×–3.7× on Llama in the main experiments. These figures apply to the evaluated workloads and configurations, not every model or deployment. In a separate comparison at 32K context, Mosaic was 1.48×–1.71× faster than the faster of CPU-only and GPU-only execution across the four tested hardware platforms. In the GLM-4.5-Air experiment, it remained close to full-attention accuracy and reported a 1.7×–3.3× TPOT speedup over the fixed Quest reference.

Limits and uncertainty

These are systems experiments, so results depend on the models, tasks, hardware and implementation tested. The predictor was trained on samples from LongBench V2 and applied to other evaluated workloads without retraining. That is evidence within the study, but does not establish how it will perform across all models or real-world request patterns. The paper also finds a quality–speed trade-off: relaxing the output-error threshold can reduce TPOT but may lower accuracy.

The authors note that Mosaic’s budget and block-size selection are not directly applicable to models with a model-native sparse-attention indexer, though its CPU–GPU scheduling may still be useful. The supplied paper text identifies the work with SIGOPS ATC 2026 and includes publication details. This article summarizes the authors’ reported experiments; it does not independently reproduce or verify them. Results should be understood in the context of the tested setups.

Reviewed cross-references

These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.

  • A Head-by-Head Approach to Faster AI Attention

    Shared method: Both methods adapt sparse-attention selection by attention head: Mosaic predicts head-specific KV budgets and block granularity, while HASA derives head-specific feature rank and context-region granularity. The mechanisms differ, and HASA’s excerpt does not establish CPU-resident KV coordination, so this is a connection in head-adaptive selection rather than system setting or performance.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2605.07719v2 — Original paper

      Excerpt reference: static/papers/2605.07719v2.md:182-244
      Basis: Paper text
      Source SHA-256: 5aa3622e9e9efc62b96ea1c8d0a60456ad85ef1009f84ad45b2810b6cd937fc2

    • 2611.09700v1 — Original paper

      Excerpt reference: static/papers/2611.09700v1.md:105-191
      Basis: Paper text
      Source SHA-256: 866056a158deb547b414e381e03ae4ec94a1c47d1625f72eee6efcd6b94c8edd

  • VerKV checks compressed AI memory before fetching more

    Supporting evidence: In separate long-context decoding evaluations with CPU-resident KV, Mosaic reports near-FULL quality and improved TPOT through sparse configuration and CPU–GPU scheduling; VerKV reports near-dense quality while fetching only a fraction of the cache through verification-guided retrieval. These results support the bounded proposition that selective host-to-GPU KV access can accompany quality-preserving, more efficient decoding, but the systems, benchmarks, and evaluation conditions differ and do not establish a direct comparison.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2605.07719v2 — Original paper

      Excerpt reference: static/papers/2605.07719v2.md:182-244
      Basis: Paper text
      Source SHA-256: 5aa3622e9e9efc62b96ea1c8d0a60456ad85ef1009f84ad45b2810b6cd937fc2

    • 2611.11319v1 — Original paper

      Excerpt reference: static/papers/2611.11319v1.md:134-216
      Basis: Paper text
      Source SHA-256: 4ecca0ec478f47751806e451dc8c89100cc9ec89dd8951999a08c7c91442f9c2

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.