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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Ajwani, Rohan Deepak, Zhu, Zining, Rose, Jonathan, Rudzicz, Frank
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866910402328133632
author Ajwani, Rohan Deepak
Zhu, Zining
Rose, Jonathan
Rudzicz, Frank
author_facet Ajwani, Rohan Deepak
Zhu, Zining
Rose, Jonathan
Rudzicz, Frank
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2404_05143
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Plug and Play with Prompts: A Prompt Tuning Approach for Controlling Text Generation
Ajwani, Rohan Deepak
Zhu, Zining
Rose, Jonathan
Rudzicz, Frank
Computation and Language
Artificial Intelligence
Machine Learning
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.
title Plug and Play with Prompts: A Prompt Tuning Approach for Controlling Text Generation
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2404.05143