Reproduce “Turning Trash into Treasure: Accelerating Inference of Large Language Models with Token Recycling” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Xianzhen Luo, Yixuan Wang, Qingfu Zhu, Zhiming Zhang, Xuanyu Zhang, Qing Yang, Dongliang Xu
Token Recycling (TR) accelerates Large Language Model inference by dynamically building a retrieval library from previously discarded candidate tokens generated during decoding, achieving approximately a 2x speedup across various LLM sizes and tasks. This training-free, memory-efficient method outperforms other speculative decoding techniques, including some requiring additional training.
Key insights
- Discarded candidate tokens from an LLM's decoding process, even those from rejected draft sequences, contain valuable information that can be effectively 'recycled' to predict future sequences.
- A training-free, self-drafting mechanism can be created by dynamically updating a lightweight, context-adaptive retrieval library of these 'trash' tokens.
- Prioritizing minimal latency for update operations, even with relaxed control over parallel merges, is crucial for maximizing the overall speedup in speculative decoding.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.