arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.01866cs.LGcs.AIcs.CL
收藏

纸牌屋:大语言模型中的巨量权重

House of Cards: Massive Weights in LLMs

Samsung Advanced Institute of Technology(三星先进技术研究院)

Jaehoon Oh, Seungjun Shin, Dokwan Oh

AI总结:

本文发现大语言模型中巨量激活源于早期前馈网络的巨量权重,并提出 MacDrop 方法在参数高效微调时对巨量权重进行课程式 dropout,以提升模型性能和鲁棒性。

摘要:

巨量激活(massive activations)出现在隐藏状态的特定特征维度中,会给大语言模型(LLMs)引入显著偏差,导致模型过度关注对应 token。本文发现,巨量激活并非源于隐藏状态,而是来自早期层中前馈网络模块的中间状态。基于此前关于巨量激活只出现在特定特征维度的观察,我们深入研究了导致巨量激活的权重。具体来说,我们将对中间状态中幅值最大的前 k 个维度有贡献的权重定义为 top-k 巨量权重。当这些巨量权重被置零时,LLM 的功能会被完全破坏;然而,当除巨量权重之外的所有权重都被置零时,即使被置零的权重数量远多于此,性能下降却相对较小。这表明在预训练过程中,学习主要集中于巨量权重。基于这一观察,我们提出了一种简单的即插即用方法 MacDrop(巨量权重课程式 dropout),用于在参数高效微调期间减少对巨量权重的依赖。该方法对预训练得到的巨量权重施加 dropout,初始使用较高的 dropout 概率,并随着微调进行逐步降低。通过在零样本下游任务、长上下文任务和消融研究等多种实验,我们证明 MacDrop 通常能提升性能并增强鲁棒性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑