SharPT: Shared Latent Space Prompt Tuning
33358Authors
nan
Abstract
AbstractPrompt tuning is an efficient method for adapting large language models, and Soft Prompt Transfer (SPoT) further narrows the gap between prompt tuning and full model tuning by transferring prompts learned from source tasks to target tasks. It is nevertheless difficult and expensive to identify the source task that provides optimal prompts. In this work, we propose to learn a shared latent space which captures a set of basis skills from a mixture of source tasks. Given an instance, its embedding queries the latent space, yielding a basis skill vector. This vector generates soft prompts, via a lightweight prompt generator, which modulates a frozen model. The latent space and prompt transformation are learned end-to-end by training on source tasks. Transfer learning from source tasks to a target task simply amounts to finetuning the prompt generator, accounting for roughly 0.3% parameters of the frozen backbone model, while the shared latent space is also frozen in finetuning. Our approach outperforms prior soft prompt methods by a significant margin on a variety of tasks such as NLI, sentence completion, QA, conference resolution, word sense disambiguation. We also find, on various model scales, our method achieves competitive performance compared to finetuning the full model.
Keywords
Full Content
Findings of the Association for Computational Linguistics: EACL 2023, pages 1244–1250 May 2-6, 2023 ©2023 Association for Computational Linguistics SharPT: Shared Latent Space Prompt Tuning Bo Pang Semih Yavuz Caiming Xiong Yingbo Zhou Salesforce Research {b.pang, syavuz, cxiong, yingbo.zhou}@salesforce.com Abstract Prompt tuning is an efficient method for adapt- ing large language models, and Soft Prompt Transfer (SPoT) further narrows the gap be- tween prompt tuning and full model tuning by transferring prompts learned from source tasks to target tasks. It is nevertheless difficult and ex- pensive to identify the source task that provides optimal prompts. In this work, we propose to learn a shared latent space which captures a set of basis skills from a mixture of source tasks. Given an instance, its embedding queries the latent space, yielding a basis skill vector. This vector generates soft prompts, via a lightweight prompt generator, which modulates a frozen model. The latent space and prompt transfor- mation are learned end-to-end by training on source tasks. Transfer learning from source tasks to a target task simply amounts to fine- tuning the prompt generator, accounting for roughly 0.3% parameters of the frozen back- bone model, while the shared latent space is also frozen in finetuning. Our approach outper- forms prior soft prompt methods by a signifi- cant margin on a variety of tasks such as NLI, sentence completion, QA, conference resolu- tion, word sense disambiguation. We also find, on various model scales, our method achieves competitive performance compared to finetun- ing the full model. 1 Introduction Adapting pre-trained large language models (LLMs) has advanced the progress in many NLP areas (Devlin et al., 2019; Raffel et al., 2020). This is typically done by finetuning all parameters of a model on a downstream task (i.e., MODELTUN- ING). This approach is however expensive, espe- cially given the growing sizes of SOTA LLMs. This limitation motivates recent research on parameter-efficient methods which only tune a small amount of parameters (Houlsby et al., 2019; Brown et al., 2020; Karimi Mahabadi et al., 2021; Figure 1: An illustration of SharPT. An instance, as illus- trated by with three tokens {X1, X2, X3}, is encoded by the instance encoder, giving e(0) x , and then queries the skill la- tent space, resulting in a skill vector e(1) x . The skill vector is transformed by a simple and lightweight prompt generator, out- putting prompt tokens (e.g., {P1, P2}). They are prepended to the instance tokens and modulate the pre-trained frozen model. The instance encoder and the pre-trained model are frozen in all scenarios. The skill vectors are tuned in source task training and frozen in target task training. The prompt generator is tuned in both source task and target task training. Lester et al., 2021; Li and Liang, 2021; Ham- bardzumyan et al., 2021). Among them, a line of research focus on the methods that modulate a frozen LLM via prompts (Liu et al., 2021). Brown et al. (2020) showed that prepending an input text with a prompt, which typically …
Content truncated to 500 words
Labeled Text
AbstractPrompt tuning is an efficient method for adapting large language models, and Soft Prompt Transfer (SPoT) further narrows the gap between prompt tuning and full model tuning by transferring prompts learned from source tasks to target tasks. It is nevertheless difficult and expensive to identify the source task that provides optimal prompts. In this work, we propose to learn a shared latent space which captures a set of basis skills from a mixture of source tasks. Given an instance, its embedding queries the latent space, yielding a basis skill vector. This vector generates soft prompts, via a lightweight prompt generator, which modulates a frozen model. The latent space and prompt transformation are learned end-to-end by training on source tasks. Transfer learning from source tasks to a target task simply amounts to finetuning the prompt generator, accounting for roughly 0.3% parameters of the frozen backbone model, while the shared latent space is also frozen in finetuning. Our approach outperforms prior soft prompt methods by a significant margin on a variety of tasks such as NLI, sentence completion, QA, conference resolution, word sense disambiguation. We also find, on various model scales, our method achieves competitive performance compared to finetuning the full model.
Publication Details
- Paper ID:
- 33358
- Year:
- 2023
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan