Abstract: Jintian Zhang, Yuqi Zhu, Mengshu Sun, Yujie Luo, Shuofei Qiao, Lun Du, Da Zheng, Huajun Chen, Ningyu Zhang. Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing.
2025.
Introduction
The emergence of "slow thinking" models, such as OpenAI’s o1 and DeepSeek-R1, has demonstrated that allowing Large Language Models (LLMs) to generate internal reasoning chains—often referred to as Chain-of-Thought (CoT)—significantly enhances their performance on complex logical and mathematical tasks. However, this performance boost comes with a substantial "long context tax." As reasoning chains grow to thousands of tokens, the quadratic computational cost of attention and the linear memory requirements for the Key-Value (KV) cache create significant latency and hardware bottlenecks.
LightThinker addresses this challenge by introducing a framework that dynamically compresses verbose intermediate reasoning steps into compact "gist tokens." This approach allows models to retain the benefits of deep thinking while drastically reducing the memory footprint and increasing inference speed.
Methodology: Thought-Level Compression
LightThinker mimics the human cognitive process of distilling complex thoughts into key milestones. Rather than maintaining every word of an internal monologue, the model learns to generate and then compress segments of reasoning.
Data Reconstruction and Gist Tokens
The framework utilizes a specialized data format where reasoning chains are punctuated by compression triggers (<w>). When the model encounters this trigger, it generates a fixed number of "gist tokens" ($C$) that encapsulate the preceding reasoning segment. A mandatory output token ([o]) then signals the model to proceed to the next step or the final answer, relying on these condensed representations.
Specialized Attention Masking
The core innovation of LightThinker lies in its attention mechanism. During training, the model is constrained by a specialized attention mask. It can only attend to the full, verbose reasoning step while generating the corresponding gist tokens. Once the gist tokens are produced, the original verbose tokens are masked out. Subsequent reasoning steps must then be generated using only the initial question and the accumulated gist tokens. This forces the model to learn highly efficient, semantic-rich representations within the gist tokens.
Experimental Setup
The researchers trained LightThinker variants using the Bespoke-Stratos-17k (BS17K) dataset, which provides high-quality reasoning trajectories. The models were evaluated on four major benchmarks:
- GSM8K (Grade school math)
- MMLU (General knowledge)
- GPQA (Graduate-level reasoning)
- BBH (Complex logical tasks)
The primary base models used for evaluation were Qwen2.5-7B and Llama3.1-8B.
Key Results and Efficiency
LightThinker demonstrates a remarkable ability to maintain reasoning accuracy while significantly improving resource efficiency.
Memory and Speed Gains
On the Qwen2.5-7B model, LightThinker achieved a 70% reduction in peak token usage and a 26% reduction in total inference time. These efficiency gains translated into a 2.5x increase in total throughput under the same memory budget, as the reduced KV cache allowed for larger batch sizes.
The Dependency Metric
To better evaluate compression, the authors proposed the Dependency (Dep) metric. Unlike peak token count, which only looks at the maximum memory usage, Dependency measures the total "area under the curve" of token reliance throughout the entire generation process. As shown in Figure 3, while vanilla models exhibit linear growth in context length, LightThinker maintains a much lower average context length by periodically "flushing" verbose thoughts into gist tokens.
Performance Retention
Crucially, these gains do not come at the cost of intelligence. The Qwen-based LightThinker model maintained nearly identical accuracy to the uncompressed vanilla model, with only a marginal ~1% drop across the tested benchmarks.
Discussion and Limitations
A key insight from the study is that semantic boundaries matter. Compressing at the "thought level" (e.g., after a complete logical step) was found to be significantly more effective than compressing at fixed token intervals, which often breaks logical flow and leads to higher error rates.
However, several areas for future work remain:
- Numerical Precision: Case studies indicated that the model occasionally loses track of specific large numbers during compression, suggesting that the current gist representation is not entirely lossless for high-precision tasks.
- Static Cache Size: The number of gist tokens is currently fixed during training. Future iterations could explore dynamic cache sizes that adapt to the complexity of the thought being compressed.
- Task Generalization: While highly effective for math and logic, the framework's performance on creative or multi-turn dialogue tasks has yet to be fully explored.
Conclusion
LightThinker represents a significant step toward making "slow thinking" LLMs practical for real-world deployment. By enabling models to "forget" the details while "remembering" the gist, it provides a path toward high-performance reasoning without the prohibitive memory costs of long-context generation.
Summary updated