Declarative Attention cuts long-context KV reads by up to 52%

Share
Declarative Attention cuts long-context KV reads by up to 52%

A paper from KAIST AI and Google DeepMind argues the model already knows which part of its context matters — and a community fork just put that claim into llama.cpp.

An off-the-shelf model can be prompted to declare, inside its own chain of thought, which slice of its context it needs next — and the inference engine can then skip reading the rest of the KV cache. The method, called Declarative Attention (DA), splits generation into three modes: global (the full context), focus (one specific region), and local (recent output only). The model emits a tag naming the chunk it wants, and the engine parses that tag the way it would parse a tool call. No trained scorer, no proxy network, no fine-tuning — just a prompt and an engine that listens.

The numbers are the interesting part. Across 15 long-context tasks in zero-shot evaluation, total attended tokens during decoding fell 52.0% on Gemma-4-31B and 31.1% on Qwen-3.6-27B, with accuracy dropping 1.27 and 2.75 percentage points respectively. The authors report the accuracy gap shrinking as models get larger, while token savings stay roughly scale-independent. That is the whole bet: the existing sparse-attention approach pre-selects tokens with a lightweight proxy score, but that scoring pass still reads the context, so it moves the cost rather than removing it. Letting the model declare its own focus is the only version of this that actually gets cheaper per decode step.

The paper is the theory; a fork called focus-llama is the first attempt to run it on the local stack. Its author extended llama.cpp's server so it can drop KV token ranges for a request, either mid-prefill or after, and added a tag-driven mode where the server parses the model's first focus declaration during generation and discards the chunks it didn't ask for. A second-sequence variant keeps the original context intact for a later return to global attention, a path the author says is not implemented yet.

The fork also documents why this is harder on llama.cpp than on a serving stack. Stock llama-server has no way to touch KV ranges mid-generation, so server changes were unavoidable. llama.cpp has no paged block table — the paper's vLLM implementation rewrites one — so masking alone doesn't reduce what the GPU actually reads, and single-token decode on CUDA doesn't currently skip masked chunks. Real skipping needs kernel support or compaction. On hybrid models, only the attention layers are restricted; the recurrent state is untouched.

Worth keeping the honesty in view: the fork's author says he has benchmarked nothing yet — no speed run, no accuracy run — and the 0.71× and 0.77× decode-time figures circulating with the post are the paper's vLLM numbers, not measurements from the fork. What exists today is a working protocol implementation on small smoke tests. That is still the useful artifact: it shows the mechanism is portable, and it names exactly which piece of the local inference stack is missing.

What to watch: whether llama.cpp gains the kernel-level KV skipping that makes this pay off, or whether the paper's training-based follow-up lands first — the authors say DA unlocks an unexplored axis of sparse attention under training.

Would you trade a couple of accuracy points for half the context reads on a long agent run? Write to us via our contact page.

Sources: focus-llama (GitHub)

Get SiliconNoon in your inbox

One email a day with the AI stories that matter — what happened, the numbers, and why it matters. No spam, unsubscribe in one click.

Read more

Halogen doubles 1M-context decode speed on a 128 GB Strix Halo box

Halogen doubles 1M-context decode speed on a 128 GB Strix Halo box

Local inference has been cheap at short context and painful at long context for as long as anyone has measured it. This release attacks that slope directly — on one chip, for one model. A 128 GB Strix Halo machine running Qwen3.8-Flash-Next now decodes at 38.3 tokens/s with a million tokens of context loaded, up from 27.3 — same box, same session, same prompts, same bits. The engine is halogen-flash-server, version 0.12.0, written for exactly one GPU (AMD's Ryzen AI Max+ 395) and one model…

Kev's open Jev alternative now trains on Qwen3.5 for about $95

Kev's open Jev alternative now trains on Qwen3.5 for about $95

The decision-model category Jev created a week ago now has a full open implementation, a cost figure that undercuts every "frontier model" story this month — and a benchmark table that still puts Jev on top. Jared Palmer ported Kev, his open decision-model family, onto Qwen3.5 bases and published the 0.8B, 4B and 9B checkpoints under Apache 2.0 — and the experiment log shows the whole Qwen3.5 effort cost about $95 of rented H100 time, plus three cents of Jev API calls.

StepFun's Step 5 Preview leaks at 600B — and the weights stay closed

StepFun's Step 5 Preview leaks at 600B — and the weights stay closed

StepFun's next flagship surfaced on a benchmark page before the company said a word about it, and it breaks the pattern the Shanghai lab built its reputation on. Tesla, meanwhile, is putting its Chinese in-car assistant behind a subscription. StepFun's Step 5 Preview appeared on Artificial Analysis's model page dated September 18 — a 600-billion-parameter reasoning model with a 1M-token context window, text and image input, and a score of 44 on the Artificial Analysis Intelligence Index.

Anthropic's Opus 5.5 matches Fable 5.1 for 40% less than Opus 5

Anthropic's Opus 5.5 matches Fable 5.1 for 40% less than Opus 5

Anthropic's first release since Dario Amodei called for pacing the frontier is not a capability jump. It is a cost cut — with a guardrail bolted on. Anthropic released Claude Opus 5.5 on Tuesday, saying it performs at the level of the larger Fable 5.1 on most work and costs 40% less to run than Opus 5. Output tokens drop to $20 per million from $25, input to $4 from $5, and the model uses fewer tokens per task on top of the cheaper rate — which is where the 40% figure comes from.

OpenAI halves GPT-6 Sol and Luna prices hours after Anthropic's cut

OpenAI halves GPT-6 Sol and Luna prices hours after Anthropic's cut

Two frontier labs spent Tuesday afternoon arguing about the same thing — not who is smartest, but who costs least per task. OpenAI cut API prices for GPT-6 Sol and Luna in half on Tuesday, hours after Anthropic cut Opus 5.5 pricing by 40%. Sol drops to $2 per million input tokens and $10 per million output, from $4 and $20; Luna goes to $0.10 and $0.50 from $0.20 and $1.20, measured against the promotional pricing of the GPT-5.6 versions they replace.