브레인포머: 단순성 대신 효율성을 추구하다
Brainformers: Trading Simplicity for Efficiency
May 29, 2023
저자: Yanqi Zhou, Nan Du, Yanping Huang, Daiyi Peng, Chang Lan, Da Huang, Siamak Shakeri, David So, Andrew Dai, Yifeng Lu, Zhifeng Chen, Quoc Le, Claire Cui, James Laundon, Jeff Dean
cs.AI
초록
트랜스포머(Transformers)는 최근 자연어 처리와 컴퓨터 비전 분야에서 큰 성공을 거두는 데 핵심적인 역할을 해왔습니다. 트랜스포머는 주로 피드포워드(feed-forward)와 셀프 어텐션(self-attention) 레이어가 번갈아 가며 쌓여 깊은 네트워크를 구성하는 균일한 백본 구조를 가지고 있습니다. 본 연구에서는 이러한 설계 선택을 조사하고, 레이어 기본 요소들의 다양한 순열로 구성된 더 복잡한 블록이 더 효율적일 수 있음을 발견했습니다. 이러한 통찰을 바탕으로, 희소 게이트 피드포워드 레이어(sparsely gated feed-forward layers), 밀집 피드포워드 레이어(dense feed-forward layers), 어텐션 레이어(attention layers), 그리고 다양한 형태의 레이어 정규화(layer normalization)와 활성화 함수(activation functions)로 구성된 복잡한 블록인 브레인포머(Brainformer)를 개발했습니다. 브레인포머는 품질과 효율성 측면에서 최신의 밀집 및 희소 트랜스포머를 일관되게 능가합니다. 토큰당 80억 개의 활성화된 파라미터를 가진 브레인포머 모델은 GLaM 대비 2배 빠른 학습 수렴 속도와 5배 빠른 스텝 시간을 보여줍니다. 다운스트림 작업 평가에서도 브레인포머는 유사한 수의 활성화된 파라미터를 가진 GLaM 대비 파인튜닝 시 SuperGLUE 점수가 3% 더 높았습니다. 마지막으로, 브레인포머는 토큰당 유사한 계산량을 가진 NAS로 파생된 Primer 밀집 모델을 퓨샷(few-shot) 평가에서 크게 앞섰습니다.
English
Transformers are central to recent successes in natural language processing
and computer vision. Transformers have a mostly uniform backbone where layers
alternate between feed-forward and self-attention in order to build a deep
network. Here we investigate this design choice and find that more complex
blocks that have different permutations of layer primitives can be more
efficient. Using this insight, we develop a complex block, named Brainformer,
that consists of a diverse sets of layers such as sparsely gated feed-forward
layers, dense feed-forward layers, attention layers, and various forms of layer
normalization and activation functions. Brainformer consistently outperforms
the state-of-the-art dense and sparse Transformers, in terms of both quality
and efficiency. A Brainformer model with 8 billion activated parameters per
token demonstrates 2x faster training convergence and 5x faster step time
compared to its GLaM counterpart. In downstream task evaluation, Brainformer
also demonstrates a 3% higher SuperGLUE score with fine-tuning compared to GLaM
with a similar number of activated parameters. Finally, Brainformer largely
outperforms a Primer dense model derived with NAS with similar computation per
token on fewshot evaluations.