ChatPaper.aiChatPaper

大規模言語モデルにおけるニューロン:死んだニューロン、N-gramニューロン、位置ニューロン

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-gramの検出器として機能します。興味深いことに、それらに対応する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