大型语言模型中的神经元:死神经元、N-gram与位置神经元
Neurons in Large Language Models: Dead, N-gram, Positional
AI总结:
本文轻量级分析了OPT模型家族,发现网络早期存在大量死神经元和token检测器,首次揭示了FFN更新专门移除而非添加信息的机制,并指出模型规模影响稀疏性及位置神经元的运作方式。
摘要:
我们以一种轻量级的方式分析了一个大型语言模型家族,这种方式可以在单个GPU上完成。具体来说,我们关注参数规模从125m到66b的OPT模型家族,并且仅依赖于FFN神经元是否被激活。首先,我们发现网络的早期部分是稀疏的,并且表示许多离散特征。在这里,许多神经元(在66b模型的某些层中超过70%)是“死”的,即它们在大量多样化数据上从不激活。同时,许多存活的神经元被保留用于离散特征,并充当token和n-gram检测器。有趣的是,它们对应的FFN更新不仅如预期那样促进下一个token候选者,还明确地专注于移除关于触发它们的token(即当前输入)的信息。据我们所知,这是专门从残差流中移除(而非添加)信息的机制的首个示例。随着规模扩大,模型在某种意义上变得更加稀疏,因为它们拥有更多的死神经元和token检测器。最后,一些神经元是位置性的:它们是否被激活在很大程度上(或完全)取决于位置,而在较小程度上(或完全不)取决于文本数据。我们发现较小的模型具有充当位置范围指示器的神经元集合,而较大的模型则以不太明确的方式运作。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。