arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.00888cs.CL
收藏

DynaMo:利用动态多令牌采样加速语言模型推理

DynaMo: Accelerating Language Model Inference with Dynamic Multi-Token Sampling

Princeton University(普林斯顿大学);Samsung Research America(三星美国研究院)

Shikhar Tuli, Chi-Heng Lin, Yen-Chang Hsu, Niraj K. Jha, Yilin Shen, Hongxia Jin

AI总结:

本文提出DynaMo多令牌预测语言模型,通过动态多令牌采样、共现加权掩码和自适应阈值化,在保持生成质量的同时实现2.57倍推理加速,参数与训练开销极低。

摘要:

传统语言模型以自回归方式运行,即一次预测一个令牌。模型规模的迅速膨胀导致推理时间居高不下。本文提出DynaMo,一套多令牌预测语言模型,旨在降低净推理时间。我们的模型根据其对预测联合概率分布的置信度,动态地预测多个令牌。我们提出一种轻量级技术来训练这些模型,利用传统自回归对应模型的权重。此外,我们提出增强估计联合概率的新方法,以提升文本生成质量,即共现加权掩码和自适应阈值化。我们还提出系统的定性和定量方法,以严格测试非自回归生成的文本质量。我们套件中的一个模型DynaMo-7.3B-T3,在实现与基线(Pythia-6.9B)相同生成文本质量的同时,达到2.57倍的加速,且参数和训练时间开销分别仅为5.87%和2.67%。

英文摘要:

Traditional language models operate autoregressively, i.e., they predict one token at a time. Rapid explosion in model sizes has resulted in high inference times. In this work, we propose DynaMo, a suite of multi-token prediction language models that reduce net inference times. Our models $\textit{dynamically}$ predict multiple tokens based on their confidence in the predicted joint probability distribution. We propose a lightweight technique to train these models, leveraging the weights of traditional autoregressive counterparts. Moreover, we propose novel ways to enhance the estimated joint probability to improve text generation quality, namely co-occurrence weighted masking and adaptive thresholding. We also propose systematic qualitative and quantitative methods to rigorously test the quality of generated text for non-autoregressive generation. One of the models in our suite, DynaMo-7.3B-T3, achieves same-quality generated text as the baseline (Pythia-6.9B) while achieving 2.57$\times$ speed-up with only 5.87% and 2.67% parameter and training time overheads, respectively.

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

↑