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% FLOPs reductions, 4.2% wall time speedups, storage savings, and minimal loss in output quality.


翻译:引导是利用语言模型(LM)的多任务能力的主要方法,但要点占据了输入上下文窗口中宝贵的空间,而重新编码相同的要点在计算上是低效的。微调和蒸馏方法允许LM定制化而不需要引导,但需要为每个任务重新训练模型。为了完全避免这种权衡,我们提出了要点标记压缩,它训练LM将要点压缩为更小的“要点标记”集合,可以重复使用以提高计算效率。通过鼓励要点压缩的受限关注屏蔽,可以在指令微调的一部分轻松训练Gist模型。在解码器(LLaMA-7B)和编码器-解码器(FLAN-T5-XXL)LM上,要点标记压缩使要点最多压缩了26倍,导致了高达40%的FLOPs减少、4.2%的墙时速度提高、存储节省和输出质量最小的损失。

1
下载
关闭预览

相关内容

【NAACL2022】自然语言处理的对比数据与学习
专知会员服务
46+阅读 · 2022年7月10日
【AAAI2022】基于对比学习的预训练语言模型剪枝压缩
专知会员服务
28+阅读 · 2022年1月24日
最新《Transformers模型》教程,64页ppt
专知会员服务
312+阅读 · 2020年11月26日
100+篇《自监督学习(Self-Supervised Learning)》论文最新合集
专知会员服务
165+阅读 · 2020年3月18日
TensorFlow 2.0 学习资源汇总
专知会员服务
67+阅读 · 2019年10月9日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Transferring Knowledge across Learning Processes
CreateAMind
28+阅读 · 2019年5月18日
基于PyTorch/TorchText的自然语言处理库
专知
28+阅读 · 2019年4月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
42+阅读 · 2019年1月3日
笔记 | Deep active learning for named entity recognition
黑龙江大学自然语言处理实验室
24+阅读 · 2018年5月27日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
UNITER: Learning UNiversal Image-TExt Representations
Arxiv
23+阅读 · 2019年9月25日
Arxiv
19+阅读 · 2018年3月28日
VIP会员
相关基金
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员