Vcc:通过优先处理重要令牌将Transformer扩展到128K令牌或更多
Vcc: Scaling Transformers to 128K Tokens or More by Prioritizing Important Tokens
AI总结:
本文提出VIP令牌中心压缩方案VCC,通过选择性压缩序列提升Transformer处理超长序列的效率,可扩展至128K令牌并保持精度提升。
摘要:
Transformer在现代自然语言处理和计算机视觉应用中处于核心地位。尽管近期已有许多工作致力于降低此类模型随序列长度增长的二次方成本,但处理超长序列(例如超过16K令牌)仍然具有挑战性。诸如基于一本书回答问题或总结一篇科学文章等应用效率低下或不可行。在此,我们提出通过在每一层将序列压缩为更小的表示来显著提升Transformer处理超长序列的效率。具体而言,我们利用在许多任务中只有一小部分特殊令牌(我们称之为VIP令牌)与最终预测最相关这一事实,提出了一种以VIP令牌为中心的压缩(VCC)方案,该方案根据令牌对近似VIP令牌表示的影响来选择性地压缩序列。与有竞争力的基线相比,我们的算法不仅高效(在4K和16K长度上相比基线实现了超过3倍的效率提升),而且在大量任务上提供了有竞争力或更好的性能。此外,我们表明我们的算法可扩展到128K令牌(或更多),同时持续提供精度提升。
英文摘要:
Transformers are central in modern natural language processing and computer vision applications. Despite recent works devoted to reducing the quadratic cost of such models (as a function of the sequence length), dealing with ultra long sequences (e.g., with more than 16K tokens) remains challenging. Applications such as answering questions based on a book or summarizing a scientific article are inefficient or infeasible. Here, we propose to significantly improve the efficiency of Transformers for ultra long sequences, by compressing the sequence into a much smaller representation at each layer. Specifically, by exploiting the fact that in many tasks, only a small subset of special tokens (we call VIP-tokens) are most relevant to the final prediction, we propose a VIP-token centric compression (VCC) scheme which selectively compresses the sequence based on their impact on approximating the representation of the VIP-tokens. Compared with competitive baselines, our algorithm is not only efficient (achieving more than $3\times$ efficiency gain compared to baselines on 4K and 16K lengths), but also offers competitive/better performance on a large number of tasks. Further, we show that our algorithm scales to 128K tokens (or more) while consistently offering accuracy improvement.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。