Language models generate texts by successively predicting probability distributions for next tokens given past ones. A growing field of interest tries to leverage external information in the decoding process so that the generated texts have desired properties, such as being more natural, non toxic, faithful, or having a specific writing style. A solution is to use a classifier at each generation step, resulting in a cooperative environment where the classifier guides the decoding of the language model distribution towards relevant texts for the task at hand. In this paper, we examine three families of (transformer-based) discriminators for this specific task of cooperative decoding: bidirectional, left-to-right and generative ones. We evaluate the pros and cons of these different types of discriminators for cooperative generation, exploring respective accuracy on classification tasks along with their impact on the resulting sample quality and computational performances. We also provide the code of a batched implementation of the powerful cooperative decoding strategy used for our experiments, the Monte Carlo Tree Search, working with each discriminator for Natural Language Generation.
翻译:语言模型通过连续预测过去给定的下一批标牌的概率分布产生文本。 越来越多的关注领域试图在解码过程中利用外部信息,使生成的文本具有想要的特性,例如更自然、更无毒性、忠诚或具有特定的写作风格。 解决办法是每一代一步使用分类器,从而形成一个合作环境,使分类员指导语言模型分布的解码,走向手头任务的相关文本。 在本文件中,我们检查了合作解码这一具体任务的三组(跨型)歧视者:双向、左对右和基因化的。 我们评估了这些不同类型的歧视者的利弊特性,探索了分类任务的各自准确性,以及它们对由此产生的样本质量和计算性能的影响。 我们还提供了分批执行我们实验所使用的强有力的合作解码,即“蒙特卡洛树搜索”的代码,与每一个“自然语言一代”歧视者一起工作。