about
ChunkLLM: A Lightweight Pluggable Framework for Accelerating LLMs Inference (arxiv.org)
96 points by PaulHoule 344 days ago | hide | past | pdf | 8 comments on HN

In plain words: Add-on modules, trained while the big model stays frozen, spot where chunks begin and let attention look only at key past chunks instead of all earlier words. On 120K-token inputs it runs up to 4.48 times faster than full attention, keeping nearly all long-context accuracy.

Abstract

Transformer-based large models excel in natural language processing and computer vision, but face severe computational inefficiencies due to the self-attention's quadratic complexity with input tokens. Recently, researchers have proposed a series of methods based on block selection and compression to alleviate this problem, but they either have issues with semantic incompleteness or poor training-inference efficiency. To comprehensively address these challenges, we propose ChunkLLM, a lightweight and pluggable training framework. Specifically, we introduce two components: QK Adapter (Q-Adapter and K-Adapter) and Chunk Adapter. The former is attached to each Transformer layer, serving dual purposes of feature compression and chunk attention acquisition. The latter operates at the bottommost layer of the model, functioning to detect chunk boundaries by leveraging contextual semantic information. During the training phase, the parameters of the backbone remain frozen, with only the QK Adapter and Chunk Adapter undergoing training. Notably, we design an attention distillation method for training the QK Adapter, which enhances the recall rate of key chunks. During the inference phase, chunk selection is triggered exclusively when the current token is detected as a chunk boundary, thereby accelerating model inference. Experimental evaluations are conducted on a diverse set of long-text and short-text benchmark datasets spanning multiple tasks. ChunkLLM not only attains comparable performance on short-text benchmarks but also maintains 98.64% of the performance on long-context benchmarks while preserving a 48.58% key-value cache retention rate. Particularly, ChunkLLM attains a maximum speedup of 4.48x in comparison to the vanilla Transformer in the processing of 120K long texts.

Haojie Ouyang, Jianwei Lv, Lei Ren, Chen Wei, Xiaojie Wang, Fangxiang Feng
arXiv:2510.02361 · cs.CL, cs.AI · submitted Sep 28, 2025 · updated May 25, 2026
abstract · pdf · html

add comment on HN

From the results in Figure 5, it appears that this would only be advantageous for long long contexts.

In particular, it is slower when used with <30k token context.

High context is pretty normal these days though, as you keep interfacing with the llms the context window just grows. And with mcps and RAG is trivial to get 30k contexts++ in every query
The system prompt for coding agents is already in the 30k range.
Seeing frameworks like this pop up reminds me how much the LLM ecosystem is moving toward more modular and hardware-aware solutions. Performance at lower compute cost will be key as adoption spreads past tech giants. Curious to see how devs plug this into real-time apps; so much room for lightweight innovation now.
Love it, they're teaching LLMs how to skim texts properly, which is exactly the right approach for handling long contexts.
wasn't this the attention sink concept to some degree? I mean it doesn't seem out of the realm of possibility that if the latency overhead isn't signifigant, that frontier models start adopting similar to DeepSeek OCR tech
skimmed the paper - how well does this plug into real serving stacks (paged-kv, vllm, speculative decoding, caching)? layer-wise top-k chunk voting sounds compatible, but does it fight with RoPE scaling or sliding-window kv eviction policies?
High speed improvement (4x) with low quality loss (2%). Sounds promising.