NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

EAT: Eviction-Aware Training for Long-Context LLM Inference on Edge Devices

Ke Chen, Xiaohui Song, Chi Xie, ZhiGuang Zhu, Zixian Li, Hao-Yun Chen, Peng-Wen Chen, Haonan LuNeurIPS 2026

TL;DR

To squeeze long-context LLMs onto edge devices like smartphones, engineers normally combine two compression tricks: shrinking numerical precision (quantization) and throwing away unimportant memory tokens (KV-cache eviction). Turns out, these two tricks silently sabotage each other—quantization adds noise to attention scores, tricking the eviction algorithm into throwing away critical context. Eviction-Aware Training (EAT) fixes this by teaching the model to handle both compression techniques simultaneously during training, recovering lost accuracy and boosting real-world mobile decoding speeds by over 64% without changing the model's architecture.

What Problem Does This Paper Address?

Running long-context LLMs locally on edge hardware faces a massive bottleneck: the Key-Value (KV) cache—the model's "working memory" of past tokens—grows linearly with prompt length, quickly choking limited memory capacity and bandwidth.

We have two standard tools for this: quantization (storing weights and cached states in lower-bit formats) and KV-cache eviction (discarding cached prompt tokens that receive low attention scores). Intuitively, these two axes should be independent. In reality, they collide. Because modern eviction heuristics rely directly on attention scores to decide which tokens survive, the numerical noise introduced by quantization scrambles those exact scores.

Figure 1: Quantization and eviction are not orthogonal. (a) Mean score on BoolQ and LongBench (VCsum, 2WikiMQA). (b) First 160 key positions of 50% RKV masks on a VCsum case; FP16/Quant rows (gray/white: retain/evict); Diff highlights disagreements (red: FP16-only retained; blue: quant- only retained; gray/white: agreement). (c) Layer-wise KL of quantized vs FP16 attention over full VCsum under full KV.

As shown above, quantization causes "retention-mask drift"—the model starts throwing away the wrong words, leading to severe accuracy drops when the two methods are naively combined post-hoc.

Methods

Standard Quantization-Aware Training (QAT) simulates low-bit math during fine-tuning so the model adapts to numerical noise, assuming it still gets to see the entire prompt. Eviction-Aware Training (EAT) upgrades QAT by bringing the exact deployment-time eviction rule directly inside the training loop:

  1. Deployment-Consistent Simulation: Inside each attention layer, EAT computes fake-quantized queries, keys, and values, then runs an existing attention-based eviction policy (like RKV or SnapKV) on the prompt prefix to generate a discrete column mask.
  2. Masked Straight-Through Estimator (MaskSTE): Because discrete token selection isn't differentiable, EAT uses a straight-through estimator. Crucially, during the backward pass, MaskSTE zeroes out gradients for evicted token positions. This prevents the optimizer from relying on "ghost" context that will be physically deleted at inference.
  3. Dynamic Budget Sampling: Rather than locking into one compression rate, EAT randomly samples the eviction ratio during training ($r \sim \mathcal{U}(0.5, 0.9)$), preparing a single model checkpoint to handle varying memory budgets gracefully.
Overview of the EAT framework, showing per-layer quantized attention eviction and gradient masking via MaskSTE.

EAT requires zero architectural changes, no learned routing modules, and no extra inference-time parameters.

Datasets

No new benchmarks are introduced. The authors train and evaluate on established datasets:

  • Training Mixture: Official training splits of task-aligned datasets (GovReport, BoolQ, VCsum) blended with general instruction and math corpora (Alpaca-GPT4 in English/Chinese, CodeAlpaca, GSM8K, MATH, and MathQA).
  • Evaluation Suite: Five tasks covering context-grounded QA, commonsense reasoning, summarization, and multi-hop reasoning: BoolQ, PIQA, and three LongBench tasks (VCsum, GovReport, and 2WikiMQA).

Key Insights and Ideas

  • Mask drift is the primary culprit: In an offline diagnostic, taking a quantized model and forcing it to use the clean, unquantized FP16 eviction mask recovered 81.5% of the performance gap. Quantization doesn't just blur representations; it breaks the sorting hat that picks which tokens matter.
  • EAT suppresses "attention sinks" rather than sharpening attention: You might expect EAT to work by making attention sharper (lower entropy) so important tokens stand out over quantization noise. Surprisingly, attention entropy increases slightly (from 4.658 to 4.865 bits). Instead, EAT crushes attention sinks—the tendency of LLMs to dump useless probability mass onto the very first token—dropping first-token attention from 26.8% down to 0.7%. Because evicted tokens block gradients, parking attention on non-semantic anchors becomes an optimization dead end, nudging the model to redistribute attention across informative, retained tokens.
  • Forward simulation isn't enough: Simulating eviction in the forward pass while letting gradients flow through all tokens in the backward pass drops the 5-task average score from 39.44 to 34.08. Strict backward masking is essential.

Key Results

Evaluated primarily on Qwen2.5-3B-Instruct and Llama3.2-3B-Instruct under 4-bit weights, 16-bit activations, and 8-bit KV cache (W4A16 + KV-INT8) at a 50% KV eviction budget:

  • Accuracy Recovery: On Qwen2.5-3B, naive QAT + RKV eviction crashes the 5-task average score from 38.37 (full KV) to 29.04. EAT + RKV rebounds to 39.44—slightly outperforming even the uncompressed quantized baseline. Llama3.2-3B shows the same recovery (31.69 $\rightarrow$ 40.93).
  • Larger Scale: The gains hold at larger scales under the same 50% budget, beating naive QAT + RKV by +8.30 points on Qwen2.5-7B and +7.74 points on Llama3.1-8B.
  • Real-World Edge Speedup: Deployed on a MediaTek Dimensity 9500 mobile chip with a 16K-token context and 50% KV retention, EAT increases decoding throughput by 64.1% and cuts total memory traffic by 20.4% compared to quantized full-KV inference.

Limitations and Future Work

  • Method & Scope Boundaries: EAT is scoped specifically to attention-driven eviction policies (tested on RKV and SnapKV) and still performs best when the training eviction policy matches the deployment policy. Furthermore, only two model families (up to 8B) and one quantization recipe (W4A16 + KV-INT8) were tested.
  • Extreme Compression: Quality still degrades noticeably past 80% eviction, where vital context is simply gone for good.
  • Hardware & Mechanistic Depth: On-device testing is limited to normalized metrics on a single SoC without thermal, energy, or multi-length latency sweeps. Additionally, the attention-sink explanation is currently correlational; causal intervention studies remain open for future work.

Summary updated

BibTeX
@inproceedings{chen2026eat,
  author = {Ke Chen and Xiaohui Song and Chi Xie and ZhiGuang Zhu and ZIXIAN LI and Hao-Yun Chen and Peng-Wen Chen and Chen Chen and Haonan Lu},
  title = {{EAT: Eviction-Aware Training for Long-Context LLM Inference on Edge Devices}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=4YJpkRqrAO},
}
Figure