Large pre-trained language models have repeatedly shown their ability to produce fluent text. Yet even when starting from a prompt, generation can continue in many plausible directions. Current decoding methods with the goal of controlling generation, e.g., to ensure specific words are included, either require additional models or fine-tuning, or work poorly when the task at hand is semantically unconstrained, e.g., story generation. In this work, we present a plug-and-play decoding method for controlled language generation that is so simple and intuitive, it can be described in a single sentence: given a topic or keyword, we add a shift to the probability distribution over our vocabulary towards semantically similar words. We show how annealing this distribution can be used to impose hard constraints on language generation, something no other plug-and-play method is currently able to do with SOTA language generators. Despite the simplicity of this approach, we see it works incredibly well in practice: decoding from GPT-2 leads to diverse and fluent sentences while guaranteeing the appearance of given guide words. We perform two user studies, revealing that (1) our method outperforms competing methods in human evaluations; and (2) forcing the guide words to appear in the generated text has no impact on the fluency of the generated text.
Variator: Accelerating Pre-trained Models with Plug-and-Play Compression Modules
Tsinghua University(清华大学);Quan Cheng Laboratory(泉城实验室);Zhili College, Tsinghua University(清华大学志道书院);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Tencent Inc.(腾讯公司)
Decoupled Alignment for Robust Plug-and-Play Adaptation
Northwestern University(西北大学);New York University Abu Dhabi(纽约大学阿布扎克分校);Stanford University(斯坦福大学);Texas A&M University(德克萨斯农工大学);University of California, Los Angeles(加州大学洛杉矶分校);Illinois Institute of Technology(伊利诺伊理工学院)
Plug-and-Play Document Modules for Pre-trained Models
Tsinghua University(清华大学);International Innovation Center of Tsinghua University, Shanghai(清华大学上海国际创新中心);Quan Cheng Laboratory(之江实验室);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Beijing Key Laboratory of Big Data Management and Analysis Methods(大数据管理与分析方法北京市重点实验室);Huawei Technologies Co., Ltd.(华为技术有限公司)
Plug-and-Play Knowledge Injection for Pre-trained Language Models
Renmin University of China(中国人民大学);Tsinghua University(清华大学);International Innovation Center of Tsinghua University(清华大学国际创新中心);Institute for AI Industry Research (AIR), Tsinghua University(清华大学人工智能产业研究院(AIR));Tencent Inc(腾讯公司);Quan Cheng Laboratory(泉城实验室)