PPLM  by uber-research

PPLM: Steerable text generation research paper

created 5 years ago
1,149 stars

Top 34.3% on sourcepulse

GitHubView on GitHub
Project Summary

PPLM (Plug and Play Language Model) offers a method for controlled text generation by steering large, unconditional language models (LMs) towards specific topics or attributes without requiring LM fine-tuning. This approach benefits researchers and developers who want to leverage state-of-the-art LMs without the substantial computational resources needed for training.

How It Works

PPLM integrates small, pre-trained attribute models (e.g., bag-of-words or discriminators) with an existing LM. It uses a gradient-based approach to modify the LM's internal states, guiding the generation process towards the desired attributes. This method preserves the original LM's capabilities while enabling flexible control, making it advantageous for targeted text generation tasks.

Quick Start & Requirements

  • Install via pip install -r requirements.txt.
  • Requires Python and standard ML libraries.
  • Demo and Colab notebook available for setup-free experimentation.

Highlighted Details

  • Enables steering of GPT-2 models.
  • Supports control via bag-of-words or discriminator models.
  • Offers hyperparameter tuning for fine-grained control over generation.
  • Integrated into the 🤗/Transformers repository.

Maintenance & Community

The project is associated with Uber AI Labs. Further community engagement details are not explicitly provided in the README.

Licensing & Compatibility

The repository does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The README notes that hyperparameters for models in the main directory and 🤗/Transformers may differ from those in the original paper by a factor of 5. Specific code and models corresponding to the paper's analysis are available in a separate linked location.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
7 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
21 more.

guidance by guidance-ai

0.1%
21k
Guidance is a programming paradigm for steering LLMs
created 2 years ago
updated 1 day ago
Feedback? Help us improve.