Learning to Compress Prompts with Gist Tokens

04/17/2023
by   Jesse Mu, et al.
0

Prompting is now the primary way to utilize the multitask capabilities of language models (LMs), but prompts occupy valuable space in the input context window, and re-encoding the same prompt is computationally inefficient. Finetuning and distillation methods allow for specialization of LMs without prompting, but require retraining the model for each task. To avoid this trade-off entirely, we present gisting, which trains an LM to compress prompts into smaller sets of "gist" tokens which can be reused for compute efficiency. Gist models can be easily trained as part of instruction finetuning via a restricted attention mask that encourages prompt compression. On decoder (LLaMA-7B) and encoder-decoder (FLAN-T5-XXL) LMs, gisting enables up to 26x compression of prompts, resulting in up to 40 speedups, storage savings, and minimal loss in output quality.

READ FULL TEXT
research
05/21/2023

Task-agnostic Distillation of Encoder-Decoder Language Models

Finetuning pretrained language models (LMs) have enabled appealing perfo...
research
08/17/2023

Discrete Prompt Compression with Reinforcement Learning

Instruction-tuned Language Models (LMs) are widely used by users to addr...
research
07/13/2022

Masked Autoencoders that Listen

This paper studies a simple extension of image-based Masked Autoencoders...
research
01/27/2021

Scheduled Sampling in Vision-Language Pretraining with Decoupled Encoder-Decoder Network

Despite having impressive vision-language (VL) pretraining with BERT-bas...
research
12/20/2022

In-context Learning Distillation: Transferring Few-shot Learning Ability of Pre-trained Language Models

Given the success with in-context learning of large pre-trained language...
research
05/23/2023

NAIL: Lexical Retrieval Indices with Efficient Non-Autoregressive Decoders

Neural document rerankers are extremely effective in terms of accuracy. ...
research
09/30/2022

Learning by Distilling Context

Language models significantly benefit from context tokens, such as promp...

Please sign up or login with your details

Forgot password? Click here to reset