ChatPaper.aiChatPaper

선택적 주의는 트랜스포머의 성능을 향상시킵니다.

Selective Attention Improves Transformer

October 3, 2024
저자: Yaniv Leviathan, Matan Kalman, Yossi Matias
cs.AI

초록

주의 집중의 맥락에서 불필요한 요소는 성능을 저하시킨다. 우리는 표준 주의 메커니즘에 간단한 매개변수가 필요 없는 변경 사항인 선택적 주의(Selective Attention)를 소개한다. 선택적 주의는 불필요한 요소에 대한 주의를 줄이며 언어 모델링 성능을 향상시킨다. 선택적 주의는 다양한 모델 크기와 맥락 길이에서 언어 모델링 성능을 개선한다. 예를 들어, C4에서 언어 모델링 목적으로 훈련된 일련의 트랜스포머는 선택적 주의를 사용하여 표준 트랜스포머와 동등한 성능을 발휘하는데, 이때 표준 트랜스포머는 주의 모듈에서 약 2배 더 많은 헤드와 매개변수를 사용한다. 선택적 주의는 또한 주의의 맥락 버퍼 크기를 줄일 수 있어 추론 중에 메모리 및 계산 요구 사항을 의미 있는 수준으로 감소시킬 수 있다. 예를 들어, C4에서 100M 매개변수로 훈련된 트랜스포머는 선택적 주의를 사용할 경우, 같은 검증 퍼플렉서티를 유지하면서 주의 모듈에 대해 각각 512, 1,024 및 2,048의 맥락 크기를 갖는 경우, 선택적 주의를 사용하지 않은 경우보다 각각 16배, 25배 및 47배 적은 메모리가 필요하다.
English
Unneeded elements in the attention's context degrade performance. We introduce Selective Attention, a simple parameter-free change to the standard attention mechanism which reduces attention to unneeded elements. Selective attention improves language modeling performance in a variety of model sizes and context lengths. For example, a range of transformers trained with the language modeling objective on C4 with selective attention perform equivalently to standard transformers with ~2X more heads and parameters in their attention modules. Selective attention also allows decreasing the size of the attention's context buffer, leading to meaningful reductions in the memory and compute requirements during inference. For example, transformers with 100M parameters trained on C4 with context sizes of 512, 1,024, and 2,048 need 16X, 25X, and 47X less memory for their attention module, respectively, when equipped with selective attention, as those without selective attention, with the same validation perplexity.

Summary

AI-Generated Summary

PDF242November 16, 2024