arXiv:2510.11958cs.CLcs.AI2025-10

让大模型一次生成多个词,提速两倍且不丢质量

Direct Multi-Token Decoding

  • 直接用深层网络一次性生成多个输出词,跳过重复计算浅层
  • 微调后Qwen3-4B模型实现2倍加速,性能损失极小
  • 无需额外参数,适合追求推理速度的部署场景

解码器仅使用Transformer架构已成为大型语言模型的标准。近期研究指出,预训练大模型中,早期、中期和晚期层可能承担不同功能:早期层关注输入语境理解,中期层处理任务特定信息,晚期层将抽象表征转化为输出词元。我们假设,一旦表示经由早期和中期层处理后,其隐藏状态已包含足够信息,仅通过晚期层即可支持多词生成,无需反复遍历浅层。我们称此推理范式为直接多词解码(DMTD)。与推测解码不同,该方法不引入额外参数、辅助流程或生成后验证。尽管在有限数据集上训练,微调后的DMTD Qwen3-4B模型已展现良好效果,实现最高2倍加速且性能下降轻微。此外,我们的缩放分析表明,随着训练数据集增大,其性能有望进一步提升。

原文摘要 · Abstract (English)

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.

推理加速大模型解码优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。