paper-with-me

Papers

Plug and Play Language Models: A Simple Approach to Controlled Text Generation

2019-12-04 · ICLR 2020 1 · Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, Rosanne Liu

Large transformer-based language models (LMs) trained on huge text corpora have shown unparalleled generation capabilities. However, controlling attributes of the generated language (e.g. switching topic or sentiment) is difficult without modifying the model architecture or fine-tuning on attribute-specific data and entailing the significant cost of retraining. We propose a simple alternative: the Plug and Play Language Model (PPLM) for controllable language generation, which combines a pretrained LM with one or more simple attribute classifiers that guide text generation without any further training of the LM. In the canonical scenario we present, the attribute models are simple classifiers consisting of a user-specified bag of words or a single learned layer with 100,000 times fewer parameters than the LM. Sampling entails a forward and backward pass in which gradients from the attribute model push the LM's hidden activations and thus guide the generation. Model samples demonstrate control over a range of topics and sentiment styles, and extensive automated and human annotated evaluations show attribute alignment and fluency. PPLMs are flexible in that any combination of differentiable attribute models may be used to steer text generation, which will allow for diverse and creative applications beyond the examples given in this paper.

📄 PDF Abstract BibTeX arXiv:1912.02164

Code (7)

uber-research/PPLM 공식 구현 pytorch
AdarshKumar712/PPLM.jl
ImadENSMN/pplm_gptneo pytorch
fsoft-ailab/poem-generator pytorch
huggingface/transformers pytorch
jefflai108/6.438-final pytorch
qkaren/unsup_gen_for_cms_reasoning pytorch

Tasks

AttributeLanguage ModellingText Generation

Similar Papers 제목 키워드 기반

A Plug-and-Play Method for Controlled Text Generation

2021-09-20 · Findings (EMNLP) 2021 11 · Damian Pascual, Beni Egressy, Clara Meister, Ryan Cotterell 외

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 …

SentenceStory GenerationText Generation

Plug-and-Play Recipe Generation with Content Planning

2022-12-09 · Yinhong Liu, Yixuan Su, Ehsan Shareghi, Nigel Collier

Recent pre-trained language models have shown promising capabilities in generating fluent and realistic natural language text. However, generating multi-sentence text with global content planning has been a long-existing…

Recipe GenerationSentenceText Generation

Plug and Play Counterfactual Text Generation for Model Robustness

2022-06-21 · Nishtha Madaan, Srikanta Bedathur, Diptikalyan Saha

Generating counterfactual test-cases is an important backbone for testing NLP models and making them as robust and reliable as traditional software. In generating the test-cases, a desired property is the ability to cont…

AttributecounterfactualText Generation

Diffusion Guided Language Modeling

2024-08-08 · Justin Lovelace, Varsha Kishore, YiWei Chen, Kilian Q. Weinberger

Current language models demonstrate remarkable proficiency in text generation. However, for many applications it is desirable to control attributes, such as sentiment, or toxicity, of the generated language -- ideally ta…

AttributeLanguage ModelingLanguage ModellingText Generation

Directed Beam Search: Plug-and-Play Lexically Constrained Language Generation

2020-12-31 · Damian Pascual, Beni Egressy, Florian Bolli, Roger Wattenhofer

Large pre-trained language models are capable of generating realistic text. However, controlling these models so that the generated text satisfies lexical constraints, i.e., contains specific words, is a challenging prob…

Language ModelingLanguage ModellingMachine TranslationStory Generation+2