Prefix-Tuning: Optimizing Continuous Prompts for Generation
Fine-tuning is the de facto way to leverage large pretrained language models to perform downstream tasks. However, it modifies all the language model parameters and therefore necessitates storing a full copy for each task. In this paper, we propose prefix-tuning, a lightweight alternative to fine-tuning for natural language generation tasks, which keeps language model parameters frozen, but optimizes a small continuous task-specific vector (called the prefix). Prefix-tuning draws inspiration from prompting, allowing subsequent tokens to attend to this prefix as if it were "virtual tokens". We apply prefix-tuning to GPT-2 for table-to-text generation and to BART for summarization. We find that by learning only 0.1\% of the parameters, prefix-tuning obtains comparable performance in the full data setting, outperforms fine-tuning in low-data settings, and extrapolates better to examples with topics unseen during training.
Fine-tuning is the de facto way to leverage large pretrained language models to perform downstream tasks. However, it modifies all the language model parameters and therefore necessitates storing a full copy for each task. In this paper, we propose prefix-tuning, a lightweight alternative to fine-tuning for natural language generation tasks, which keeps language model parameters frozen, but optimizes a small continuous task-specific vector (called the prefix). Prefix-tuning draws inspiration from prompting, allowing subsequent tokens to attend to this prefix as if it were "virtual tokens". We
Explore this link on the map →related reading
- Recent Advances in Language Model Fine-tuningruder.io
- Patterns for Building LLM-based Systems & Productseugeneyan.com
- Prompt Tuning and Prefix Tuningericwiener.github.io
- GenAI Handbookgenai-handbook.github.io
- [2106.09685] LoRA: Low-Rank Adaptation of Large Language Modelsarxiv.org
- Fine-Tuning Llama-2: Tailoring Models to Unique Applicationsanyscale.com
- Anatomy of a Modern Finetuning APIbenanderson.work
- Large Language Models Reading List | Sebastian Raschka, PhDsebastianraschka.com
- Fine-tuning LLMs Guide | Unsloth Documentationdocs.unsloth.ai
- Modern Pretraining Strategies: A Hands-On Guidetheneuralmaze.substack.com
- The Ultimate Guide to Fine-Tuning LLMs from Basics to Breakthroughs: An Exhaustive Review of Technologies, Research, Best Practices, Applied Research Challenges and Opportunities (Version 1.0)arxiv.org
- Mastering LLM Techniques: Customization | NVIDIA Technical Blogdeveloper.nvidia.com