ChatPaper.aiChatPaper

대규모 언어 모델의 뉴런: 비활성, N-그램, 위치 기반

Neurons in Large Language Models: Dead, N-gram, Positional

September 9, 2023
저자: Elena Voita, Javier Ferrando, Christoforos Nalmpantis
cs.AI

초록

우리는 단일 GPU에서도 수행 가능한 경량화된 방식으로 대규모 언어 모델 패밀리를 분석합니다. 구체적으로, 125m에서 66b 파라미터에 이르는 OPT 모델 패밀리에 초점을 맞추고, FFN 뉴런이 활성화되었는지 여부에만 의존합니다. 먼저, 네트워크의 초기 부분이 희소하며 많은 이산적 특징을 나타낸다는 것을 발견했습니다. 여기서 많은 뉴런들(66b 모델의 일부 층에서는 70% 이상)이 "죽은" 상태, 즉 다양한 데이터 집합에서 절대 활성화되지 않습니다. 동시에, 활성 상태인 많은 뉴런들은 이산적 특징을 위해 예약되어 있으며 토큰 및 n-그램 탐지기 역할을 합니다. 흥미롭게도, 이들에 해당하는 FFN 업데이트는 예상대로 다음 토큰 후보를 촉진할 뿐만 아니라, 이를 트리거한 토큰(즉, 현재 입력)에 대한 정보를 명시적으로 제거하는 데 초점을 맞춥니다. 우리가 아는 한, 이는 잔차 스트림에서 정보를 추가하는 대신 제거하는 데 특화된 메커니즘의 첫 번째 사례입니다. 규모가 커질수록 모델들은 더 많은 죽은 뉴런과 토큰 탐지기를 가지는 측면에서 더 희소해집니다. 마지막으로, 일부 뉴런들은 위치에 따라 달라집니다: 이들이 활성화되는지 여부는 주로(또는 전적으로) 위치에 따라 결정되며, 텍스트 데이터에는 덜(또는 전혀) 영향을 받지 않습니다. 우리는 더 작은 모델들이 위치 범위 표시기 역할을 하는 뉴런 집합을 가지고 있는 반면, 더 큰 모델들은 덜 명시적인 방식으로 작동한다는 것을 발견했습니다.
English
We analyze a family of large language models in such a lightweight manner that can be done on a single GPU. Specifically, we focus on the OPT family of models ranging from 125m to 66b parameters and rely only on whether an FFN neuron is activated or not. First, we find that the early part of the network is sparse and represents many discrete features. Here, many neurons (more than 70% in some layers of the 66b model) are "dead", i.e. they never activate on a large collection of diverse data. At the same time, many of the alive neurons are reserved for discrete features and act as token and n-gram detectors. Interestingly, their corresponding FFN updates not only promote next token candidates as could be expected, but also explicitly focus on removing the information about triggering them tokens, i.e., current input. To the best of our knowledge, this is the first example of mechanisms specialized at removing (rather than adding) information from the residual stream. With scale, models become more sparse in a sense that they have more dead neurons and token detectors. Finally, some neurons are positional: them being activated or not depends largely (or solely) on position and less so (or not at all) on textual data. We find that smaller models have sets of neurons acting as position range indicators while larger models operate in a less explicit manner.
PDF170December 15, 2024