The Unreasonable Ineffectiveness of the Deeper Layers

LLM LoRA/Adapter MQIA
2024年03月26日
我们对流行的开放权重预训练LLMs家族进行了实证研究,发现在删除大约一半的层之前,不同的问答基准测试中性能只有轻微的下降。为了修剪这些模型,我们通过考虑层之间的相似性来确定最佳的层块进行修剪;然后,为了“修复”损坏,我们进行了少量的微调。具体来说,我们使用了参数高效微调(PEFT)方法,特别是量化和低秩适配器(QLoRA),使得我们的每个实验都可以在单个A100 GPU上进行。从实际的角度来看,这些结果表明,层修剪方法可以补充其他PEFT策略,进一步减少微调的计算资源,一方面可以提高推理的内存和延迟。从科学的角度来看,这些LLMs对层的删除的鲁棒性意味着当前的预训练方法要么没有充分利用网络深层参数,要么浅层在存储知识方面发挥了关键作用。
We empirically study a simple layer-pruning strategy for popular families of open-weight pretrained LLMs, finding minimal degradation of performance on different question-answering benchmarks until after a large fraction (up to half) of the layers are removed. To prune these models, 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. In particular, 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 A100 GPU. From a practical perspective, these results suggest that layer pruning methods can complement other PEFT strategies to further reduce computational resources of finetuning on the one hand, and can improve the memory and latency of inference on the other hand. 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.
许愿