ChatPaper.aiChatPaper

Generazione di Testo Oltre il Campionamento Discreto di Token

Text Generation Beyond Discrete Token Sampling

May 20, 2025
Autori: Yufan Zhuang, Liyuan Liu, Chandan Singh, Jingbo Shang, Jianfeng Gao
cs.AI

Abstract

Nella generazione autoregressiva standard, un LLM predice la distribuzione del token successivo, campiona un token discreto e poi scarta la distribuzione, passando solo il token campionato come nuovo input. Per preservare le ricche informazioni di questa distribuzione, proponiamo Mixture of Inputs (MoI), un metodo senza addestramento per la generazione autoregressiva. Dopo aver generato un token seguendo il paradigma standard, costruiamo un nuovo input che combina il token discreto generato con la distribuzione dei token precedentemente scartata. Nello specifico, utilizziamo un metodo di stima bayesiana che tratta la distribuzione dei token come prior, il token campionato come osservazione e sostituisce il convenzionale vettore one-hot con l'aspettativa continua a posteriori come nuovo input del modello. MoI consente al modello di mantenere una rappresentazione interna più ricca durante l'intero processo di generazione, portando a un miglioramento della qualità del testo e delle capacità di ragionamento. Su compiti di ragionamento matematico, generazione di codice e domande a livello di dottorato, MoI migliora costantemente le prestazioni su più modelli, tra cui QwQ-32B, Nemotron-Super-49B, Gemma-3-27B e DAPO-Qwen-32B, senza ulteriore addestramento e con un overhead computazionale trascurabile.
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.
PDF102May 22, 2025