AdaSkip:用于加速长上下文 LLM 推理的自适应子层跳过
AdaSkip: Adaptive Sublayer Skipping for Accelerating Long-Context LLM Inference
AI总结:
针对长上下文 LLM 推理中逐层跳过难以适应变化、忽视子层差异且不支持预填充的问题,本文提出 AdaSkip,利用实时相似度自适应跳过不重要子层,加速预填充与解码并取得优于基线的性能。
摘要:
长上下文大型语言模型(LLM)推理正变得日益关键,这推动了大量研究致力于缓解此类场景中巨大的存储与计算成本。逐层跳过方法是颇具前景的优化方向,但在长上下文推理中却很少得到探索。我们观察到,现有逐层跳过策略应用于长上下文推理时存在若干局限,包括无法适应模型与上下文的变化、忽视子层重要性,以及不适用于预填充阶段。本文提出 AdaSkip,这是一种专为长上下文推理设计的自适应子层跳过方法。AdaSkip 利用实时相似度信息自适应地识别较不重要的层,支持子层级跳过,并同时加速预填充和解码两个阶段。通过在多种长上下文基准和模型上开展大量实验,AdaSkip 的有效性得到验证,展现出其相较于现有基线更优的推理性能。
英文摘要:
Long-context large language models (LLMs) inference is increasingly critical, motivating a number of studies devoted to alleviating the substantial storage and computational costs in such scenarios. Layer-wise skipping methods are promising optimizations but rarely explored in long-context inference. We observe that existing layer-wise skipping strategies have several limitations when applied in long-context inference, including the inability to adapt to model and context variability, disregard for sublayer significance, and inapplicability for the prefilling phase. This paper proposes \sysname, an adaptive sublayer skipping method specifically designed for long-context inference. \sysname adaptively identifies less important layers by leveraging on-the-fly similarity information, enables sublayer-wise skipping, and accelerates both the prefilling and decoding phases. The effectiveness of \sysname is demonstrated through extensive experiments on various long-context benchmarks and models, showcasing its superior inference performance over existing baselines.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。