BiTA:用于大型语言模型无损加速的双向微调
BiTA: Bi-Directional Tuning for Lossless Acceleration in Large Language Models
AI总结:
本文提出BiTA,一种通过双向微调实现半自回归生成与草稿验证的轻量级无损加速方法,无需额外辅助模型即可显著提升LLMs推理速度,在LLaMA-2-70B-Chat上实现2.7倍加速。
摘要:
大型语言模型(LLMs)在推理时通常采用自回归生成,导致高内存带宽需求并延长延迟。为缓解此低效问题,我们提出用于无损加速的双向微调(Bi-directional Tuning for lossless Acceleration, BiTA),这是一种通过简化的半自回归生成和草稿验证来加速LLMs的创新方法。受prompt tuning概念启发,我们通过名为双向微调的参数高效设计增强LLMs,使其具备半自回归生成能力。采用高效的基于树的解码,模型并行执行草稿候选生成和验证,确保在贪婪采样下输出与自回归对应物完全相同。BiTA作为轻量级插件模块,无需额外辅助模型或显著额外内存开销,即可无缝提升现有LLMs的推理效率。应用所提出的BiTA,LLaMA-2-70B-Chat在MT-Bench基准上实现了2.7倍加速。大量实验证实我们的方法超越了最先进的加速技术。
英文摘要:
Large language models (LLMs) commonly employ autoregressive generation during inference, leading to high memory bandwidth demand and consequently extended latency. To mitigate this inefficiency, we present Bi-directional Tuning for lossless Acceleration (BiTA), an innovative method expediting LLMs via streamlined semi-autoregressive generation and draft verification. Inspired by the concept of prompt tuning, we enhance LLMs with a parameter-efficient design called bi-directional tuning for the capability in semi-autoregressive generation. Employing efficient tree-based decoding, the models perform draft candidate generation and verification in parallel, ensuring outputs identical to their autoregressive counterparts under greedy sampling. BiTA serves as a lightweight plug-in module, seamlessly boosting the inference efficiency of existing LLMs without requiring additional assistance models or incurring significant extra memory costs. Applying the proposed BiTA, LLaMA-2-70B-Chat achieves a 2.7$\times$ speedup on the MT-Bench benchmark. Extensive experiments confirm our method surpasses state-of-the-art acceleration techniques.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。