arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.22396cs.CLcs.AI
收藏

QuickSilver——通过动态令牌停止、KV跳过、上下文令牌融合和自适应Matryoshka量化加速LLM推理

QuickSilver -- Speeding up LLM Inference through Dynamic Token Halting, KV Skipping, Contextual Token Fusion, and Adaptive Matryoshka Quantization

Manipal University Jaipur(马尼帕尔大学斋浦尔分校);Vellore Institute of Technology(韦洛尔理工学院);NIT Silchar(西尔查尔国立理工学院);Harrisburg University of Science and Technology(哈里斯堡科技大学);Meta AI;Amazon AI;IISER Kolkata(加尔各答印度科学教育与研究所);BITS Pilani, Goa(比尔拉理工学院果阿分校)

Danush Khanna, Aditya Kumar Guru, Srivarshinee Sridhar, Zidan Ahmed, Rubhav Bahirwani, Meetu Malhotra, Vinija Jain, Aman Chadha, Amitava Das, Kripabandhu Ghosh

AI总结:

提出QuickSilver框架,通过动态令牌停止、KV缓存跳过和上下文令牌融合等机制,在不改变模型权重或结构的情况下加速LLM推理,实现高达39.6%的FLOP减少且困惑度退化极小。

摘要:

推理占大语言模型(LLM)部署中大部分延迟和能耗,通常超过总成本的90%。尽管训练时效率已取得广泛进展,但运行时优化仍是关键瓶颈,特别是在自回归解码下。现有方法——如剪枝、量化、提前退出和推测解码——通常需要重新训练、架构更改或破坏解码兼容性。我们引入QuickSilver,一个模块化的令牌级框架,在推理时实现语义自适应性,而不改变模型权重或结构。QuickSilver整合了四种协同机制:(i)动态令牌停止,对表示已收敛的令牌停止计算;(ii)KV缓存跳过,选择性抑制内存写入以减少注意力开销;(iii)上下文令牌融合,将冗余令牌折叠到共享路径以缩短序列长度。与推测解码或MoE路由不同,QuickSilver完全在冻结的密集模型上运行,不需要辅助网络。在GPT-2和Llama-2上应用于WikiText-103和C4,QuickSilver实现了高达39.6%的FLOP减少,困惑度退化可忽略不计(<=0.2)。

英文摘要:

Inference accounts for the majority of latency and energy consumption in large language model (LLM) deployments, often exceeding 90% of total cost. While training-time efficiency has seen extensive progress, runtime optimization remains a key bottleneck, particularly under autoregressive decoding. Existing approaches -- such as pruning, quantization, early exits, and speculative decoding -- often require retraining, architectural changes, or disrupt decoding compatibility. We introduce QuickSilver, a modular, token-level framework that enables semantic adaptivity at inference time without altering model weights or structure. QuickSilver integrates four synergistic mechanisms: (i) Dynamic Token Halting, which halts computation for tokens with converged representations; (ii) KV Cache Skipping, which selectively suppresses memory writes to reduce attention overhead; and (iii) Contextual Token Fusion, which collapses redundant tokens into shared paths to shrink sequence length. Unlike speculative decoding or MoE routing, QuickSilver operates entirely on frozen, dense models and requires no auxiliary networks. Applied to GPT-2 and Llama-2 across WikiText-103 and C4, QuickSilver achieves up to 39.6% FLOP reduction with negligible perplexity degradation (<=0.2).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑