大语言模型中的知情路由:更智能的令牌级计算以实现更快推理
Informed Routing in LLMs: Smarter Token-Level Computation for Faster Inference
AI总结:
本文提出知情路由范式,通过轻量级特征预测器评估令牌可恢复性,实现执行或近似策略,在保持模型保真度的同时大幅降低推理计算,并在多个稀疏度下取得最先进的效率-性能权衡。
摘要:
大语言模型(LLM)在实际应用中的部署日益受到其高推理成本的限制。尽管近期在动态令牌级计算分配方面的进展试图通过按令牌选择性激活模型组件来提高效率,但现有方法依赖于贪婪路由——一种短视的执行或跳过机制,往往导致不可逆的信息丢失和次优的令牌选择。本文引入了知情路由(informed routing),一种主动解决这些问题的全新范式。其关键洞察在于不仅评估令牌的即时重要性,还评估其可恢复性,即其变换能被近似的程度。为此,我们提出了轻量级特征预测器(LFF),一个在路由决策之前估计单元输出的小型预测模块。这使得灵活的执行或近似策略得以实现,在大幅减少计算的同时保持模型保真度。在语言建模和推理任务上的大量实验表明,知情路由在多个稀疏度水平上实现了最先进的效率-性能权衡。值得注意的是,即使没有最终的LoRA微调,我们的方法也能匹配或超越需要完全微调的强基线,同时将训练时间减少超过50%。代码可在 https://github.com/EIT-NLP/informed-routing 获取。
英文摘要:
The deployment of large language models (LLMs) in real-world applications is increasingly limited by their high inference cost. While recent advances in dynamic token-level computation allocation attempt to improve efficiency by selectively activating model components per token, existing methods rely on greedy routing--a myopic execute-or-skip mechanism that often leads to irreversible information loss and suboptimal token selection. This paper introduces informed routing, a new paradigm that proactively addresses these issues. The key insight is to assess not only a token's immediate importance but also its recoverability, i.e., how well its transformation can be approximated. To this end, we propose the Lightweight Feature Forecaster (LFF), a small predictive module that estimates a unit's output before routing decisions are made. This enables a flexible execute-or-approximate policy that preserves model fidelity while drastically reducing computation. Extensive experiments on both language modeling and reasoning tasks show that informed routing achieves state-of-the-art efficiency-performance trade-offs across multiple sparsity levels. Notably, even without final LoRA fine-tuning, our method matches or surpasses strong baselines that require full fine-tuning, all while reducing training time by over 50%. The code is available at: https://github.com/EIT-NLP/informed-routing
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。