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

直接多令牌解码

Direct Multi-Token Decoding

Department of Computer Science, UC Santa Barbara(计算机科学系,加州大学圣芭芭拉分校)

Xuan Luo, Weizhi Wang, Xifeng Yan

AI总结:

提出直接多令牌解码(DMTD)方法,利用LLM晚期层直接生成多个令牌,无需额外参数或验证,在Qwen3-4B上实现2倍加速且性能损失小,并有望随数据规模扩大而提升。

摘要:

仅解码器Transformer因其强大的性能已成为大型语言模型(LLM)的标准架构。近期研究表明,在预训练的LLM中,早期、中期和晚期层可能扮演不同角色:早期层专注于理解输入上下文,中期层处理任务特定加工,而晚期层将抽象表示转换为输出令牌。我们假设,一旦表示经过早期和中期层的处理,所产生的隐藏状态可能封装了足够的信息,仅使用晚期层即可支持生成多个令牌,从而无需重复遍历早期和中期层。我们将这种推理范式称为直接多令牌解码(DMTD)。与推测解码不同,我们的方法不引入额外参数、辅助例程或生成后验证。尽管仅在有限数据集上训练,微调后的DMTD Qwen3-4B模型已展现出有前景的结果,实现了高达2倍的加速,且仅伴有轻微性能损失。此外,如我们的扩展分析所示,其性能预计将随着更大训练数据集的加入而进一步提升。

英文摘要:

Decoder-only transformers have become the standard architecture for large language models (LLMs) due to their strong performance. Recent studies suggest that, in pre-trained LLMs, early, middle, and late layers may serve distinct roles: Early layers focus on understanding the input context, middle layers handle task-specific processing, and late layers convert abstract representations into output tokens. We hypothesize that once representations have been processed by the early and middle layers, the resulting hidden states may encapsulate sufficient information to support the generation of multiple tokens using only the late layers, eliminating the need to repeatedly traverse the early and middle layers. We refer to this inference paradigm as Direct Multi-Token Decoding (DMTD). Unlike speculative decoding, our method introduces no additional parameters, auxiliary routines, or post-generation verification. Despite being trained on a limited dataset, a fine-tuned DMTD Qwen3-4B model has already demonstrated promising results, achieving up to a 2x speedup with only minor performance loss. Moreover, as shown in our scaling analysis, its performance is expected to further improve with larger training datasets.

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

↑