不要丢弃Dropout:优化层稀疏性以实现高效的LLM训练与推理
研究论文 · 2026/09/07
本文重新审视了层丢弃(即随机深度)在大语言模型预训练中的作用,发现通过优化层分布、时间表和优化器超参数,层丢弃可以在相同训练FLOPs下降低损失,节省高达25%的训练FLOPs,并支持推理加速(如提前退出、中间层跳过和自推测解码),实现高达1.5倍的推理加速且精度损失可忽略。研究基于超过2400次实验,模型规模从271M到8.2B参数,数据量达160B tokens,证明这些发现可扩展到大规模训练。
本文挑战了当前LLM预训练中普遍弃用层丢弃的做法,通过大规模实验提供了证据和最佳实践,对提升训练效率和推理性能具有重要价值,值得关注。
Layer dropout (a.k.a. stochastic depth) has been shown to enable faster training, higher accuracy, and robustness to zero-shot layer pruning in both language and vision transformers. However, as models and datasets have scaled, dropout - particularly layer dropout - has largely disappeared from large language models (LLMs) pre-training recipes. While some prior work has reported that dropout can degrade accuracy, no comprehensive study has quantified, let alone mitigated, this effect. In this study, we show that layer dropout should be used in state-of-the-art LLM training, establishing best practices and scaling analysis for both training and post-training benefits. Concretely, with optimal layer distribution, time schedule, and optimizer hyperparameters, we observe that at the same training FLOPs layer dropout leads to lower loss. For a given number of training steps, LLMs can achieve lower or similar validation loss while saving upto 25% of training FLOPs. Moreover, layer dropout enables significant post-training optimizations, such as early exit, intermediate-layer skipping, and self-speculative decoding, yielding up to 1.5x inference speedup with negligible accuracy loss. Across more than 2400 training experiments, spanning models from 271M to 8.2B parameters and datasets up to 160B tokens, we demonstrate that these findings extend reliably to large-scale training regimes. All pre-training experiments were run on Cerebras CS-3 systems.