LLMSteer: Improving Long-Context LLM Inference by Steering Attention on Reused Contexts
Zhuohan Gu, Jiayi Yao, Kuntai Du, Junchen Jiang
TL;DR
LLMSteer tackles long-context understanding in LLM inference without fine-tuning by post-hoc, query-independent attention steering. It leverages dual-prefix contextual rereading to modify and reuse KV caches, aligning attention toward tokens consistently deemed important across passes. The method achieves substantial efficiency gains by remaining compatible with prefix caching and by reducing runtime delays relative to AutoPASTA and larger models, while also improving generation quality across multiple datasets. This work demonstrates a practical path to narrow the performance gap between small and large LLMs without expensive fine-tuning.
Abstract
As large language models (LLMs) show impressive performance on complex tasks, they still struggle with longer contextual understanding and high computational costs. To balance efficiency and quality, we introduce LLMSteer, a fine-tuning-free framework that enhances LLMs through query-independent attention steering. Tested on popular LLMs and datasets, LLMSteer narrows the performance gap with baselines by 65.9% and reduces the runtime delay by up to 4.8x compared to recent attention steering methods.
