ChatPaper.aiChatPaper

Генерация текста за пределами дискретного сэмплирования токенов

Text Generation Beyond Discrete Token Sampling

May 20, 2025
Авторы: Yufan Zhuang, Liyuan Liu, Chandan Singh, Jingbo Shang, Jianfeng Gao
cs.AI

Аннотация

В стандартной авторегрессионной генерации языковая модель (LLM) предсказывает распределение следующего токена, выбирает дискретный токен и затем отбрасывает это распределение, передавая только выбранный токен в качестве нового входа. Чтобы сохранить богатую информацию этого распределения, мы предлагаем метод Mixture of Inputs (MoI), который не требует дополнительного обучения и предназначен для авторегрессионной генерации. После генерации токена по стандартной парадигме мы создаем новый вход, который объединяет сгенерированный дискретный токен с ранее отброшенным распределением токенов. В частности, мы используем байесовский метод оценки, который рассматривает распределение токенов как априорное, выбранный токен как наблюдение и заменяет традиционный one-hot вектор на непрерывное апостериорное ожидание в качестве нового входа модели. MoI позволяет модели сохранять более богатое внутреннее представление на протяжении всего процесса генерации, что приводит к улучшению качества текста и способности к рассуждению. На задачах математического рассуждения, генерации кода и вопросов уровня PhD, MoI стабильно улучшает производительность на множестве моделей, включая QwQ-32B, Nemotron-Super-49B, Gemma-3-27B и DAPO-Qwen-32B, без дополнительного обучения и с минимальными вычислительными затратами.
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.

Summary

AI-Generated Summary

PDF72May 22, 2025