In recent years, there has been a growing interest in the development of language models capable of generating text with controllable attributes. While several approaches have been proposed, many of these methods require condition-specific data or significant computational resources. In this study, we propose a novel method called Gamma Sampling, which enables controllable language generation without the need for any training data and maintains a fast generation speed. Gamma Sampling incorporates attribute-related information into the sampling process, effectively guiding the language model to produce text with desired attributes. Our experimental results demonstrate that Gamma Sampling, when applied to GPT2, outperforms representative baselines in terms of diversity, attribute relevance, and overall quality of the generated samples.
翻译:近年来,具有可控属性文本生成能力的语言模型开发引起了广泛关注。尽管已有多种方法被提出,但其中许多方法依赖于特定条件的数据或需要大量计算资源。在本研究中,我们提出了一种名为Gamma Sampling的新方法,该方法无需任何训练数据即可实现可控语言生成,并保持快速生成速度。Gamma Sampling将属性相关信息融入采样过程,有效引导语言模型生成具有目标属性的文本。实验结果表明,当将Gamma Sampling应用于GPT2时,其在生成样本的多样性、属性相关性和整体质量方面均优于代表性基线方法。