AI
Adamas: A Hadamard-based sparse attention method speeds up long-context LLM inference
Researchers present a token-level sparse attention mechanism that maintains performance while achieving up to 6.5× speedups on long-context language model tasks.
Large language models can now handle context windows stretching to hundreds of thousands or millions of tokens, powering applications like document summarization, code generation, and multi-turn dialogue. Yet processing these massive inputs comes with a computational cost: self-attention in transformers scales quadratically with sequence length, turning inference—especially during autoregressive decoding—into a severe latency bottleneck.
The Challenge with Existing Methods#
Sparse attention strategies attempt to sidestep this problem by computing attention only over a subset of key-value (KV) tokens rather than the entire sequence. However, most current approaches rely on fixed or coarse-grained selection rules that either discard critical tokens or retain too much redundant information within tight token budgets, compromising quality or efficiency gains.
How Adamas Works#
Researchers introduce Adamas, a sparse attention mechanism designed for accurate, efficient long-context inference. The method works in three steps:
- Compact representation: The Hadamard transform, bucketization, and 2-bit compression condense token information into lightweight sketches
- Efficient selection: Distance-based estimation identifies the top-k most relevant candidate tokens without expensive computation
- Sparse attention: The selected token positions are used to retrieve their original key-value states, enabling attention over a curated subset
Performance Results#
Testing on Llama-3.1-8B-Instruct revealed that Adamas maintains near-lossless performance across its effective context window. In practical efficiency benchmarks, the approach achieved up to 6.5× speedup in self-attention alone and 1.7× speedup in end-to-end decoding at 32K context length—a substantial gain for real-world deployment. Notably, Adamas held performance comparable to full attention on challenging long-form reasoning tasks, including the AIME 2024 and AIME 2025 problem sets.

