Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Models

Robert L. Logan, Ivana Balažević, Eric Wallace, Fabio Petroni, Sameer Singh +1 more
6/24/2021
253 citations
cs.CLcs.LG

Official code: ucinlp/null-prompts (19 stars, Jupyter Notebook, Apache-2.0, last commit 2022-02-02).

Abstract

Prompting language models (LMs) with training examples and task descriptions has been seen as critical to recent successes in few-shot learning. In this work, we show that finetuning LMs in the few-shot setting can considerably reduce the need for prompt engineering.

Show full abstract

In fact, one can use null prompts, prompts that contain neither task-specific templates nor training examples, and achieve competitive accuracy to manually-tuned prompts across a wide range of tasks. While finetuning LMs does introduce new parameters for each downstream task, we show that this memory overhead can be substantially reduced: finetuning only the bias terms can achieve comparable or better accuracy than standard finetuning while only updating 0.1% of the parameters. All in all, we recommend finetuning LMs for few-shot learning as it is more accurate, robust to different prompts, and can be made nearly as efficient as using frozen LMs.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Code for: "Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Models"

192Jupyter Notebook, PythonSep 24, 20214 years agoApache-2.0

Similar Papers

Cite this paper

@article{logan2021cutting,
  title  = {Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Models},
  author = {Robert L. Logan and Ivana Balažević and Eric Wallace and Fabio Petroni and Sameer Singh and Sebastian Riedel},
  year   = {2021},
  eprint = {2106.13353},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.13353}
}

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/2106.13353.svg)](https://codeofpaper.com/paper/2106.13353)

Discussion