Génération de texte au-delà de l'échantillonnage de tokens discrets
Text Generation Beyond Discrete Token Sampling
May 20, 2025
papers.authors: Yufan Zhuang, Liyuan Liu, Chandan Singh, Jingbo Shang, Jianfeng Gao
cs.AI
papers.abstract
Dans la génération autorégressive standard, un LLM prédit la distribution du prochain token, échantillonne un token discret, puis rejette cette distribution, ne transmettant que le token échantillonné comme nouvelle entrée. Pour préserver les informations riches de cette distribution, nous proposons Mixture of Inputs (MoI), une méthode sans entraînement pour la génération autorégressive. Après avoir généré un token suivant le paradigme standard, nous construisons une nouvelle entrée qui combine le token généré discret avec la distribution de tokens précédemment rejetée. Plus précisément, nous utilisons une méthode d'estimation bayésienne qui traite la distribution de tokens comme un a priori, le token échantillonné comme une observation, et remplace le vecteur one-hot conventionnel par l'espérance continue a posteriori comme nouvelle entrée du modèle. MoI permet au modèle de maintenir une représentation interne plus riche tout au long du processus de génération, ce qui améliore la qualité du texte et les capacités de raisonnement. Sur des tâches de raisonnement mathématique, de génération de code et de questions-réponses de niveau doctorat, MoI améliore systématiquement les performances sur plusieurs modèles, notamment QwQ-32B, Nemotron-Super-49B, Gemma-3-27B et DAPO-Qwen-32B, sans entraînement supplémentaire et avec une surcharge computationnelle négligeable.
English
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.