Vcc: 중요 토큰 우선순위 지정을 통해 트랜스포머를 128K 토큰 이상으로 확장하기
Vcc: Scaling Transformers to 128K Tokens or More by Prioritizing Important Tokens
May 7, 2023
저자: Zhanpeng Zeng, Cole Hawkins, Mingyi Hong, Aston Zhang, Nikolaos Pappas, Vikas Singh, Shuai Zheng
cs.AI
초록
Transformer 모델은 자연어 처리(NLP)와 컴퓨터 비전의 기반이 되는 기술입니다. 최근 다양한 연구들이 이러한 모델의 시퀀스 길이 n에 대한 이차 비용을 줄이기 위해 노력하고 있지만, 초장기 시퀀스(예: 16K 토큰 이상)를 효율적으로 처리하는 것은 여전히 어려운 과제로 남아 있습니다. 전체 책을 기반으로 질문에 답하거나 과학 논문을 요약하는 등의 응용 프로그램은 비효율적이거나 실행 불가능한 경우가 많습니다. 본 논문에서는 각 레이어에서 입력을 크기 r이 n과 독립적인 표현으로 압축함으로써 Transformer 모델의 복잡성이 n에 미치는 의존성을 크게 줄이는 방법을 제안합니다. 특히, 많은 작업에서 최종 예측과 가장 관련이 있는 특수 토큰의 작은 부분집합(이를 VIP 토큰이라고 명명)만이 중요하다는 사실을 활용하여, VIP 토큰의 표현을 근사화하는 데 미치는 영향을 기반으로 입력 시퀀스를 선택적으로 압축하는 VIP 토큰 중심 압축(Vcc) 기법을 제안합니다. 경쟁력 있는 베이스라인과 비교했을 때, 제안된 알고리즘은 효율적일 뿐만 아니라(4K 및 16K 길이에서 베이스라인 대비 3배 이상의 효율성 향상), 다양한 작업에서 경쟁력 있거나 더 나은 성능을 달성합니다. 또한, 본 알고리즘은 128K 토큰(또는 그 이상)으로 확장 가능하면서도 일관되게 정확도 향상을 제공할 수 있음을 보여줍니다.
English
Transformer models are foundational to natural language processing (NLP) and
computer vision. Despite various recent works devoted to reducing the quadratic
cost of such models (as a function of the sequence length n), dealing with
ultra long sequences efficiently (e.g., with more than 16K tokens) remains
challenging. Applications such as answering questions based on an entire book
or summarizing a scientific article are inefficient or infeasible. In this
paper, we propose to significantly reduce the dependency of a Transformer
model's complexity on n, by compressing the input into a representation whose
size r is independent of n 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 input
sequence based on their impact on approximating the representation of these
VIP-tokens. Compared with competitive baselines, the proposed algorithm not
only is efficient (achieving more than 3times efficiency improvement
compared to baselines on 4K and 16K lengths), but also achieves competitive or
better performance on a large number of tasks. Further, we show that our
algorithm can be scaled to 128K tokens (or more) while consistently offering
accuracy improvement.