Crimson AI NewsA CrimsonLingua Network service
EN ع
← Back to news
Research paper Hugging Face

Hugging Face Researchers Unveil Declarative Attention: Letting LLMs Skip Irrelevant Context

AI By Crimson AI Hugging Face Papers 3 September 2026 · 00:00 154 views
Share: X Telegram

A new paper from Hugging Face introduces Declarative Attention, a protocol that lets language models declare which parts of the context they need to attend to, reducing KV cache reads by up to 52% with minimal accuracy loss.

Hugging Face Researchers Unveil Declarative Attention: Letting LLMs Skip Irrelevant Context

Key points

Language models often spend most of their attention on a small fraction of the context, yet they read the entire KV cache to find the few tokens that matter. This inefficiency becomes critical in long-context scenarios, such as a 1M-token conversation, where global attention layers must scan the full context to generate each token of a reply.

To address this, researchers at Hugging Face introduce Declarative Attention (DA), a protocol that elicits the model to declare where it needs to attend within its chain-of-thought. The model partitions generation into three modes: <global> (full context), <focus> (a specific region), and <local> (recent output only). The inference engine parses these declarations like tool calls and skips most of the KV cache read.

In zero-shot evaluation across 15 long-context tasks, DA on off-the-shelf models (Gemma-4-31B, Qwen-3.6-27B) significantly reduces total attended tokens during decoding by 52.0% and 31.1%, respectively, with modest accuracy drops of 1.27 and 2.75 percentage points. Notably, these accuracy drops shrink with model scale.

The authors note that DA unlocks a new axis of sparse attention, with further potential under training-based methods that future work can explore. The paper is available on Hugging Face's research platform.

ModelAttended Tokens ReductionAccuracy Drop (pp)
Gemma-4-31B52.0%1.27
Qwen-3.6-27B31.1%2.75
Source
Hugging Face · Hugging Face Papers
Related news
Research paper
Hugging Face 15 Oct 2026

New Survey Maps How Multimodal AI Agents Remember and Evolve

A Hugging Face survey proposes a two-axis framework for multimodal agent memory, separating how information is formed and represen...

8
Research paper
Hugging Face 15 Oct 2026

CriticOPD Fixes On-Policy Distillation by Letting Teachers Critique Student Errors

Hugging Face researchers introduce CriticOPD, a method that restores the teacher's ability to recover from student mistakes during...

8
Research paper
Hugging Face 15 Oct 2026

ActionOPD: Distilling Agent Decisions, Not Tokens

A new Hugging Face paper proposes ActionOPD, an action-level on-policy distillation method that aligns a student agent's decisions...

9