[论文解读] The Unreasonable Ineffectiveness of the Deeper Layers
这篇论文表明,开放权重的大型语言模型在最深层的约一半层被裁剪后,QA性能的下降极小,尤其是在经过少量PEFT微调(QLoRA)后,这表明更深的层并不总是必需的。
How is knowledge stored in an LLM's weights? We study this via layer pruning: if removing a certain layer does not affect model performance in common question-answering benchmarks, then the weights in that layer are not necessary for storing the knowledge needed to answer those questions. To find these unnecessary parameters, we identify the optimal block of layers to prune by considering similarity across layers; then, to "heal" the damage, we perform a small amount of finetuning. Surprisingly, with this method we find minimal degradation of performance until after a large fraction (up to half) of the layers are removed for some common open-weight models. From a scientific perspective, the robustness of these LLMs to the deletion of layers implies either that current pretraining methods are not properly leveraging the parameters in the deeper layers of the network or that the shallow layers play a critical role in storing knowledge. For our study, we use parameter-efficient finetuning (PEFT) methods, specifically quantization and Low Rank Adapters (QLoRA), such that each of our experiments can be performed on a single 40GB A100 GPU.
研究动机与目标
- 评估在开放权重的LLMs中,裁剪更深层变换器层对在QA基准(MMLU 和 BoolQ)上的性能影响
- 开发基于相似性的判定方法,以识别应裁剪的层
- 展示一种简单、资源高效的修复步骤,使用参数高效微调(QLoRA)
- 评估裁剪与量化及基于LoRA的微调在多个模型族中的耦合效果
提出的方法
- 定义一个简单的裁剪算法,通过最小化由裁剪块分隔的层对输入之间的角距离,来选择应移除的最优层区块
- 移除所识别的层块并重连周围的层以保持计算流程
- 可选地在预训练数据集或任务数据上,使用少量的QLoRA微调来执行修复步骤
- 将参数量化为4位并使用QLoRA进行微调,以便在单个A100 GPU上进行实验
- 评估裁剪对MMLU和BoolQ等下游任务以及C4验证损失作为预训练目标的影响
- 比较基于相似性的信息驱动裁剪策略与更简单的最深层裁剪策略
实验结果
研究问题
- RQ1在下游QA性能崩溃之前,可以裁剪更深的变换器层到多大程度?
- RQ2更深的层是否越来越与相邻层相似,从而实现安全裁剪?
- RQ3少量的PEFT微调(QLoRA)是否能修复裁剪在各任务和指标上的损害?
- RQ4裁剪能否与量化和基于LoRA的微调有效结合,在降低资源使用的同时维持性能?
主要发现
- 模型可以容忍对最深层的大量裁剪,在达到关键阈值前QA性能损失很小(随模型族而异,QA任务中通常大约裁剪20–55%)
- 使用QLoRA进行修复显著恢复下一个标记预测的损失,并使裁剪分数间的性能更平滑,将QA波动与自回归损失解耦
- 角距离分析显示更深的层彼此之间更相似,而最后一层仍然不相似,指导裁剪的层块选择
- 对最深层进行裁剪的简单启发式方法在修复后与基于相似性的信息驱动方法表现相似,强调裁剪目标是修复接口损伤而不是获取知识
- 层裁剪使内存占用和推理时间随移除的层线性减少,并且与PEFT和量化兼容,从而实现开放权重LLM的实际高效
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。