#669 · Primary category: Education & Research

PPLM

deep-learning language-modeling machine-learning natural-language-generation natural-language-processing nlp

Plug and Play Language Model implementation. Allows to steer topic and attributes of GPT-2 models.

Project last updated:02/20/24

GitHub Stars

1.2K

Forks

203

Contributors

9

License

Apache-2.0

Why we included this project

PPLM is the reference implementation of a widely cited approach to controlled text generation. Instead of retraining a language model, you steer its output by plugging in one or more small attribute models that push generation toward a chosen topic, sentiment, or other property. The repo ships working code for topic steering, sentiment control, and detoxification on GPT-2, along with the discriminator models and hyperparameters from the paper. Because the base model is used as-is, it offers a practical way to study how to influence generation without the hardware that fine-tuning a large model would demand. It also integrates with Hugging Face Transformers, so it is easy to try in an existing setup.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category