发现大模型中关键权重导致激活偏移,提出新方法缓解其过度依赖。
House of Cards: Massive Weights in LLMs
- 定位到早期前馈层中间态中的关键大权重,是激活异常根源。
- 仅保留大权重时模型性能下降小,说明预训练主要学这些权重。
- 提出MacDrop方法渐进式丢弃大权重,提升微调效果与鲁棒性。
大规模激活出现在特定隐藏状态特征维度,导致大语言模型对相应标记过度关注。本文发现,这类激活并非源于隐藏状态,而是源自早期前馈网络模块的中间状态。我们定义了贡献于中间态前k大幅值维度的权重为顶k大权重。当这些大权重被置零时,模型功能完全崩溃;而若仅保留大权重,其余权重全置零,性能下降较小,尽管被置零的权重数量更多。这表明预训练过程主要聚焦于大权重的学习。基于此,我们提出一种即插即用的MacDrop(大权重课程丢弃)方法,在参数高效微调中逐步降低大权重的丢弃概率,以减少对其依赖。通过零样本下游任务、长上下文任务及消融实验验证,MacDrop普遍提升性能并增强鲁棒性。
原文摘要 · Abstract (English)
Massive activations, which manifest in specific feature dimensions of hidden states, introduce a significant bias in large language models (LLMs), leading to an overemphasis on the corresponding token. In this paper, we identify that massive activations originate not from the hidden state but from the intermediate state of a feed-forward network module in an early layer. Expanding on the previous observation that massive activations occur only in specific feature dimensions, we dive deep into the weights that cause massive activations. Specifically, we define top-$k$ massive weights as the weights that contribute to the dimensions with the top-$k$ magnitudes in the intermediate state. When these massive weights are set to zero, the functionality of LLMs is entirely disrupted. However, when all weights except for massive weights are set to zero, it results in a relatively minor performance drop, even though a much larger number of weights are set to zero. This implies that during the pre-training process, learning is dominantly focused on massive weights. Building on this observation, we propose a simple plug-and-play method called MacDrop (massive weights curriculum dropout), to rely less on massive weights during parameter-efficient fine-tuning. This method applies dropout to the pre-trained massive weights, starting with a high dropout probability and gradually decreasing it as fine-tuning progresses. Through various experiments, including zero-shot downstream tasks, long-context tasks, and ablation studies, we demonstrate that \texttt{MacDrop} generally improves performance and strengthens robustness.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。