Plug and Play with Prompts: A Prompt Tuning Approach for Controlling Text Generation

Rohan Deepak Ajwani, Zining Zhu, Jonathan Rose, Frank Rudzicz
4/8/2024
cs.CLcs.AIcs.LG

No confident code implementation found for this paper. 9 possible matches can be shown below.

Abstract

Transformer-based Large Language Models (LLMs) have shown exceptional language generation capabilities in response to text-based prompts. However, controlling the direction of generation via textual prompts has been challenging, especially with smaller models. In this work, we explore the use of Prompt Tuning to achieve controlled language generation. Generated text is steered using prompt embeddings, which are trained using a small language model, used as a discriminator. Moreover, we demonstrate that these prompt embeddings can be trained with a very small dataset, with as low as a few hundred training examples. Our method thus offers a data and parameter efficient solution towards controlling language model outputs. We carry out extensive evaluation on four datasets: SST-5 and Yelp (sentiment analysis), GYAFC (formality) and JIGSAW (toxic language). Finally, we demonstrate the efficacy of our method towards mitigating harmful, toxic, and biased text generated by language models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 9 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ajwani2024plug,
  title  = {Plug and Play with Prompts: A Prompt Tuning Approach for Controlling Text Generation},
  author = {Rohan Deepak Ajwani and Zining Zhu and Jonathan Rose and Frank Rudzicz},
  year   = {2024},
  eprint = {2404.05143},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.05143v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2404.05143.svg)](https://codeofpaper.com/paper/2404.05143)

Discussion