R458 · Agent architecture › Context economics and caching

The bottleneck moved: compressing recurrent-state checkpoints so agent prefixes survive memory pressure

Read the original

inference-servingcontext-engineeringagent-harnessbenchmarksopen-sourceclaim-checking

Filed 2026-12-01. Primary source: WEAVE, arXiv:2611.36893v1 (27 Nov 2026), by Zedong Liu, Xinyang Ma, Man Liu, Bing Lu, Chen Yuhan, Dingwen Tao and Guangming Tan of the University of Chinese Academy of Sciences and the Institute of Computing Technology, Chinese Academy of Sciences. Covered here: the abstract, sections 1–4 with both result tables and the ablations, and the conclusion. The appendix, which holds the detailed overhead measurements and the stated experimental scope, is not covered.

The setup, and why it is not the problem people expect

Hybrid linear-attention models were supposed to end the long-context memory problem. Instead of a KV cache that grows with every token, most layers keep a fixed-size recurrent state; only a few layers retain token-indexed KV. During a single sequential generation that is exactly as good as advertised — you need the current state and nothing else.

Agent serving does not do a single sequential generation. It reuses the same long prefix across turns and across branches, which is why prefix-cache hit rates in these workloads run above 96%. To reuse a prefix you must be able to restore the state at that point, so the server keeps checkpoints — many of them, at many boundaries, available for random access.

That is where the fixed-size promise quietly stops paying. The paper gives the number that makes it concrete: for the 35B model they test, one recurrent-state checkpoint takes about as much storage as 3.2K tokens of full-attention KV cache. Denser checkpointing buys finer prefix-reuse granularity and costs proportionally more HBM. Under load, checkpoints and KV blocks get evicted, long prefixes are recomputed, time-to-first-token climbs, and sustainable concurrency falls. In their agent workload at 48 concurrent requests, the uncompressed baseline ends up recomputing 68% of prefixes.

The framing worth keeping is the authors' own: hybrid attention "shifts long-context serving from a growing KV cache to fixed-size recurrent states, but agentic prefix reuse turns these states into a persistent, random-access checkpoint store." The bottleneck did not disappear. It changed shape, from a cache that grows along one sequence into a store that grows with how many reuse points you want to keep.

Why quantization is the wrong instrument here

The obvious move is the one that worked for KV caches: quantize. Prior work (KIVI, KVQuant and others) cut KV footprint substantially at acceptable quality by exploiting per-token numerical structure. The paper's argument is that recurrent states do not have that structure — they are not collections of independently compressible token entries, they are one dense tensor per layer per checkpoint, and shrinking each one in isolation throws away the thing that actually makes them compressible.

The other obvious move — store deltas between consecutive checkpoints — fails for a systems reason rather than a quality one. A plain residual chain makes each checkpoint recursively dependent on its predecessor, so restoring one prefix may mean replaying a long chain, and losing an intermediate checkpoint can break recovery for everything after it. For a store whose whole purpose is random access, that is a non-starter. Factorising each dense residual properly with SVD is accurate but far too slow for the serving path.

The mechanism

WEAVE is training-free and has three parts.

Shared-anchor residuals. The empirical observation the method rests on is that state changes have substantially stronger low-rank structure than states. So keep one anchor state in full and store compact low-rank residual factors for the checkpoints after it. A reader's analogy: one base document plus small edit records, rather than a full copy at every save point.

Recurrence-driven encoding. Rather than materialise a residual and then factorise it, WEAVE builds the factors from updates the model already computes. Different linear-attention variants evolve their states differently — one retains the previous state through a gate and writes a structured update from the current chunk, another applies channel-wise transport followed by a delta-rule innovation — but both "construct the next state by evolving an existing one", and that evolution is already low-rank-shaped. The compression primitive is handed to you by the architecture; you just have to stop throwing it away. This is the idea the conclusion generalises: "model-state evolution can itself serve as a compression primitive."

Periodic compaction. This is what makes the residual chain safe for random access: compaction bounds recovery dependencies, so a hit on an arbitrary historical prefix recovers its state directly instead of replaying an unbounded chain. Compaction runs asynchronously and is load-gated, with measured foreground interference of at most 3.35% in batch wall time and 3.51% in tail latency.

Plus fused GPU kernels, which turn out to matter more than the algorithm in the cost budget — see below. The whole thing is wired into vLLM's native prefix-cache path rather than sitting beside it.

Results

Quality at compression

Two models (a 35B with Gated DeltaNet, a 48B with Kimi Delta Attention), six benchmarks spanning reasoning, long-context understanding and agentic execution, on two RTX PRO 6000 GPUs with BF16 execution. Crucially, the quality test follows the checkpoint lifecycle — checkpoints are encoded at multiple boundaries along a trajectory and restored mid-inference to simulate a cache hit — rather than compressing one state offline and measuring it once.

On the 35B model, WEAVE reaches 4.26× compression while scoring 83.76 / 53.33 / 90.33 / 22.44 / 33.84 / 43.97 against an uncompressed baseline of 84.60 / 53.33 / 90.91 / 22.40 / 34.10 / 44.25. On the 48B model it reaches 4.12× at 49.21 / 66.67 / 85.30 / 22.83 / 27.98 / 19.12 against 50.57 / 66.67 / 86.67 / 23.08 / 28.66 / 19.72. INT8 gives 1.89× and 1.85× with consistently larger drops; INT4 gives 3.43× and 3.26× with sharp ones — the worst case being the 48B model's agentic coding benchmark, where INT4 falls from 28.66 to 15.12, a 47.2% loss, while WEAVE holds 27.98 at higher compression.

So: more than twice INT8's compression at better quality than INT8. That is the headline and it holds.

A tension the abstract smooths over

The abstract says WEAVE outperforms INT8 and INT4 "on all six benchmarks", which is true of task scores. The state-fidelity measurement runs the other way. Replaying native queries on restored states, WEAVE's readout error is 0.41% on the 35B model against INT8's 0.32%, and 4.32% on the 48B model against INT8's 2.17%. INT4 is far worse on both (6.24% and 19.39%), so the paper's gloss — WEAVE "stays close to INT8 and far below INT4" — is accurate. But INT8 restores the state more faithfully than WEAVE on both models, at less than half the compression.

This is not a contradiction; it is the genuinely interesting finding, and it deserved a paragraph rather than a hedge. Higher state-reconstruction error with better downstream task scores means the errors WEAVE makes are less consequential, not smaller — the residual structure it discards is apparently in directions the model's own readouts do not use much, whereas uniform quantization error lands everywhere including where it hurts. A full-vocabulary Jensen–Shannon check on teacher-forced suffixes supports the benign reading. Anyone adopting this should note the implication: state-level error is the wrong acceptance metric for this class of compression, and a pipeline that gates on reconstruction error will reject the better method.

Serving under pressure

This is where the practical case lives. Agentic request streams with long repeatedly reused prefixes, replayed at increasing concurrency, with scheduler, cache policy, checkpoint placement and memory budget all fixed, and — importantly — all runs including encoding and restoration cost. The SLO is 2× median isolated prefill time; goodput counts output tokens only from requests that met it.

At 48 concurrent requests on the 35B model: SLO attainment 33.3% → 93.1%, goodput 3,638 → 11,432 tokens (3.14×), TTFT 21.248 s → 3.051 s (6.96×). On the 48B model: attainment 27.9% → 87.0%, goodput 3,824 → 10,995 (2.88×), TTFT 59.88 s → 18.67 s (3.21×). INT8 sits between the baseline and WEAVE throughout, and the gains grow with concurrency.

Read those as a pair, not as the headline. The abstract quotes the better model's TTFT figure; the other model gets less than half that speedup from the same method. Nothing was hidden — both are in the text — but "up to 6.96×" is one of two numbers, and if you are sizing a deployment the 3.21× is the one to plan against.

Also worth internalising: none of this speedup comes from faster compute. It comes from fitting more reusable prefixes in the same HBM, so fewer get evicted and fewer have to be recomputed. The lever is cache residency, and the 68%-recomputation baseline is the thing being removed.

Where the cost actually went

The ablation is the most reusable part of the paper for engineers. Encoding one checkpoint's full head set: dense-residual SVD costs 995.16 ms; building native sketches instead of a dense residual brings it to 588.25 ms (1.69×); replacing SVD with projected factor construction brings it to 69.01 ms (a further 8.52×); and grouped Triton kernels bring it to 10.59 ms (another 6.51×). A roughly 94× total reduction, of which the algorithmic insight accounts for about 14× and kernel engineering accounts for the remaining 6.5×. An online-serving method that needs sub-millisecond-class overheads does not get there on the idea alone.

The error ablation is equally honest: dense-residual SVD sets the reference at 3.25% state-relative P95 error; recurrence-driven sketches raise it to 4.16%; per-head rank allocation and factor packing bring it back to 3.47%; and targeted repair reaches 3.38% while touching only seven heads out of hundreds, enough to restore a correct answer that had been lost. Cheap targeted correction recovering most of a cheap approximation's loss is a pattern worth stealing well beyond this setting.

Failure modes and limits

Review checklist

  1. Establish your prefix-cache hit rate and eviction rate before evaluating any of this. If you are not evicting checkpoints under load, the motivating problem is absent.

  2. Measure checkpoint footprint in tokens-of-KV-equivalent, as the paper does. It makes the HBM trade legible in a unit your existing capacity planning already uses.

  3. Do not gate acceptance on state-reconstruction error. On this evidence it ranks INT8 above the method with better task scores at twice the compression. Gate on task scores and output divergence.

  4. Test restoration mid-trajectory at multiple checkpoint boundaries, repeatedly, not once offline. Single-restore evaluation will not surface drift from repeated reuse.

  5. Include encoding and restoration cost in every serving measurement, and verify your own kernels — a large share of the viability here is kernel-level, not algorithmic.

  6. Plan against the weaker of the two reported speedups, not the headline, and re-measure per model: the same method gave 6.96× and 3.21× on two models in the same harness.

  7. Ask what happens to the shared anchor under memory pressure before relying on anchor-plus-residual storage in production.

  8. Re-check the compaction interference figures under your own burst profile rather than inheriting the load-gated numbers.

Connections

See R458 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.