2 ms·
> Finetuning and distillation methods allow for specialization of LMs without prompting, but require retraining the model for each task. To avoid this trade-off
by abrichr 3y ago
> 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% FLOPs reductions, 4.2% wall time speedups, storage savings, and minimal loss in output quality.
Sounds promising! No code?
Edit: here it is! https://github.com/jayelm/gisting https://github.com/jayelm/gisting
From this Twitter thread: https://twitter.com/jayelmnop/status/1648365743195684873 https://twitter.com/jayelmnop/status/1648365743195684873