arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2404.05143cs.CLcs.AIcs.LG

即插即用的提示:一种用于控制文本生成的提示调优方法

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

University of Toronto(多伦多大学);Vector Institute for Artificial Intelligence(向量人工智能研究院);Stevens Institute of Technology(史蒂文斯理工学院);Dalhousie University(达尔豪斯大学)

Rohan Deepak Ajwani, Zining Zhu, Jonathan Rose, Frank Rudzicz

AI总结:

本文提出利用 Prompt Tuning 训练提示嵌入,并以小型语言模型作为判别器,实现数据与参数高效的文本生成控制,在四类数据集上验证了情感、正式度和毒性控制效果。

摘要:

基于 Transformer 的大型语言模型(LLM)在响应基于文本的提示时,已展现出卓越的语言生成能力。然而,通过文本提示控制生成方向一直具有挑战性,尤其是对于较小的模型。在本研究中,我们探索使用 Prompt Tuning(提示调优)来实现受控语言生成。生成文本由提示嵌入引导,这些提示嵌入使用一个充当判别器的小型语言模型进行训练。此外,我们证明这些提示嵌入可以使用非常小的数据集进行训练,训练样本少至几百个。因此,我们的方法为控制语言模型输出提供了一种数据高效且参数高效的解决方案。我们在四个数据集上进行了广泛评估:SST-5 和 Yelp(情感分析)、GYAFC(正式程度)以及 JIGSAW(有毒语言)。最后,我们证明了本方法在缓解语言模型生成的有害、有毒和带有偏见的文本方面的有效性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑