Latent Sparse Attention Speeds Up 10M-Token AI Contexts by 9x

Latent Sparse Attention (LSA) from Prefrontal AI and ETH Zurich clusters keys to speed long-context LLM inference, cutting 10M-token time to first token by over 9 times

·
·
·
Latent Sparse Attention Speeds Up 10M-Token AI Contexts by 9x
AuthorBy Ben Dickson
Read2 min
TopicLlms · Infra
  • Researchers from Prefrontal AI and ETH Zurich developed Latent Sparse Attention (LSA), which in 10-million-token tasks cut time to first token by over 9x versus full attention and 2.2x versus a popular sparse attention baseline.
  • In a 10-million-token experiment using GLM-5.3-Flash (a DeepSeek Sparse Attention variant), the indexer's key-selection step consumed 98% of an attention layer's prefill time, highlighting the search bottleneck LSA addresses.
  • On an NVIDIA H200 at 10 million tokens, D-LSA sped up one GLM attention layer's prefill by 22.7x and decoding by 4.6x, while Qwen-3.8-27B prefill was 72.4x faster than full attention.
  • Across eight H200 GPUs in end-to-end serving, GLM's time to first token improved by 2.2x and time per output token by 2.1x, while Qwen's time to first token improved by 9.2x; on the RULER benchmark, Qwen scored 63.9 versus 59.9 for full attention at 10 million tokens.
  • Testing N-LSA on a 500-million-parameter hybrid model trained up to 128,000 tokens showed matched validation loss versus full attention, with training 1.6x faster per attention layer and 1.24x faster end to end, and code released under the Apache 2.0 license.

AI agents are getting better at working on tasks that span hours and involve entire codebases, document libraries, and long histories of interactions.

But the longer they work, the more expensive it becomes for the underlying models to process their growing context. Even sparse attention, designed to reduce this cost, has scaling problems of its own.

Researchers have developed Latent Sparse Attention (LSA), a technique that could make million-token contexts much more practical. Today, we examine the results, the tradeoffs, and what developers can already test.

How latent sparse attention tackles the search bottleneck in long-context AI

AI agents (particularly coding agents) accumulate millions of tokens of context as they work with large code repositories and document libraries. At that scale, handling the attention values of the underlying model becomes tedious and expensive.

To address this bottleneck, researchers at Prefrontal AI and ETH Zurich have developed Latent Sparse Attention (LSA), a new technique that cuts the compute costs of processing long contexts in LLMs.

LSA is among a growing range of techniques for optimizing the attention mechanism in LLMs. However, it addresses a bottleneck in other sparse attention methods, which limits how many previous tokens a model examines.

LSA organizes attention values into clusters and groups to make it easier to search through them when mapping new queries. For example, in experiments on 10-million-token tasks, it reduced time to first token by more than 9 times a full-attention model and 2.2 times against a model using a popular sparse attention mechanism.

For developers building long-running agents and LLM applications that process large contexts, LSA offers a way to reduce inference latency.

Keep reading

Don't miss what's next in AI

Join 300,000+ engineers and researchers who get the signal, not the noise. Create a free account to read the rest of this story.

  • Full access to in-depth AI research breakdowns
  • Be the first to know what's trending before it hits mainstream
  • Daily curated papers, repos, and industry moves
Trending
  • No trending articles

Comments

avatar

Next Reads