Large-scale pre-trained language models have demonstrated strong capabilities of generating realistic text. However, it remains challenging to control the generation results. Previous approaches such as prompting are far from sufficient, which limits the usage of language models. To tackle this challenge, we propose an innovative method, inverse prompting, to better control text generation. The core idea of inverse prompting is to use generated text to inversely predict the prompt during beam search, which enhances the relevance between the prompt and the generated text and provides better controllability. Empirically, we pre-train a large-scale Chinese language model to perform a systematic study using human evaluation on the tasks of open-domain poem generation and open-domain long-form question answering. Our results show that our proposed method substantially outperforms the baselines and that our generation quality is close to human performance on some of the tasks. Narrators can try our poem generation demo at https://pretrain.aminer.cn/apps/poetry.html, while our QA demo can be found at https://pretrain.aminer.cn/app/qa. For researchers, the code is provided in https://github.com/THUDM/InversePrompting.
翻译:大规模培训前语言模型已经显示出产生现实文本的强大能力。然而,控制生成结果仍然具有挑战性。以前的方法,如催化远远不够,这限制了语言模型的使用。为了应对这一挑战,我们提出了一个创新方法,反推动更好地控制文本的生成。反推动的核心思想是使用生成的文本来反向预测梁搜索过程中的迅速性,这将增强快速文本和生成文本的相关性,并提供更好的控制性。我们先行开发一个大规模中文模型,以便利用人类评估对开放式地段生成诗歌的任务和开放式地段长式问题进行系统研究。我们的结果显示,我们提出的方法大大超越了基线,我们的新一代质量接近于某些任务的人类性能。Narrator可以在 https://pretrain.amir.cn/apps/poetry.html上尝试我们的诗创作演示,而在 https://preptrainin.car.cn/ppr/Promptinging/comfreatr.html上可以找到我们的QAde,而在 https://pretrain.Protument/Protustrings.