arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2505.14827cs.CLcs.AI
收藏

超越离散标记采样的文本生成

Text Generation Beyond Discrete Token Sampling

UC San Diego(加州大学圣地亚哥分校);Microsoft Research(微软研究院)

Yufan Zhuang, Liyuan Liu, Chandan Singh, Jingbo Shang, Jianfeng Gao

AI总结:

提出无需训练的输入混合方法,将离散标记与丢弃的分布通过贝叶斯后验融合,提升多种模型在数学、代码和问答任务上的性能。

摘要:

在标准自回归生成中,大语言模型预测下一个标记的分布,采样一个离散标记,然后丢弃该分布,仅将采样的标记作为新输入传递。为了保留该分布的丰富信息,我们提出了输入混合(Mixture of Inputs, MoI),一种无需训练的自回归生成方法。在按照标准范式生成一个标记后,我们构造一个新输入,将生成的离散标记与先前丢弃的标记分布混合。具体而言,我们采用贝叶斯估计方法,将标记分布视为先验,采样的标记视为观测,并用连续的后验期望替代传统独热向量作为新的模型输入。MoI允许模型在生成过程中保持更丰富的内部表示,从而提升文本质量和推理能力。在数学推理、代码生成和博士级问答任务上,MoI在多个模型(包括QwQ-32B、Nemotron-Super-49B、Gemma-3-27B和DAPO-Qwen-32B)上持续提升性能,且无需额外训练,计算开销可忽略不计。

英文摘要:

In standard autoregressive generation, an LLM predicts the next-token distribution, samples a discrete token, and then discards the distribution, passing only the sampled token as new input. To preserve this distribution's rich information, we propose Mixture of Inputs (MoI), a training-free method for autoregressive generation. After generating a token following the standard paradigm, we construct a new input that blends the generated discrete token with the previously discarded token distribution. Specifically, we employ a Bayesian estimation method that treats the token distribution as the prior, the sampled token as the observation, and replaces the conventional one-hot vector with the continuous posterior expectation as the new model input. MoI allows the model to maintain a richer internal representation throughout the generation process, resulting in improved text quality and reasoning capabilities. On mathematical reasoning, code generation, and PhD-level QA tasks, MoI consistently improves performance across multiple models including QwQ-32B, Nemotron-Super-49B, Gemma-3-27B, and DAPO-Qwen-32B, with no additional training and negligible computational overhead.

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

↑