arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2404.19319cs.CL
收藏

固定(计算)预算下知识蒸馏与从零开始预训练的比较

Knowledge Distillation vs. Pretraining from Scratch under a Fixed (Computation) Budget

Johannes Gutenberg University Mainz(美因茨约翰内斯古腾堡大学);Center For Artificial Intelligence and Data Science, University of Würzburg(维尔茨堡大学人工智能与数据科学中心);University of Colorado Boulder(科罗拉多大学博尔德分校)

Minh Duc Bui, Fabian David Schmidt, Goran Glavaš, Katharina von der Wense

AI总结:

本文在固定计算预算下比较从零开始预训练与多种知识蒸馏策略,发现普通蒸馏与从零预训练相当,但TinyBERT和MiniLM等更复杂蒸馏策略显著更优,且数据重复时蒸馏优势更大。

摘要:

与标准语言模型(LM)预训练(即从零开始训练)相比,知识蒸馏(KD)需要额外通过一个教师模型进行前向传播,而该教师模型通常比目标学生模型大得多。因此,在语言模型预训练中,知识蒸馏会显著降低预训练实例的吞吐量,相较于从零开始预训练而言。语言模型预训练的缩放定律表明,如果使用更多数据进行训练(即处理更多token),较小的模型可以缩小与较大模型的差距——并且在固定计算预算下,较小的模型能够比较大的模型处理更多数据。因此,我们假设,在适当考虑计算预算的情况下,知识蒸馏实际上可能不如从零开始预训练更适合获得较小的语言模型。为了验证这一假设,我们在公平的实验设置中,针对掩码语言建模(MLM)比较了从零开始预训练与几种知识蒸馏策略,在计算量和预训练数据方面均保持一致。然而,在GLUE上的下游结果并未证实我们的假设:虽然在固定计算预算下,从零开始预训练的表现与普通知识蒸馏相当,但更复杂的知识蒸馏策略,即TinyBERT(Jiao等人,2020)和MiniLM(Wang等人,2023),以显著优势超越了从零开始预训练。我们进一步发现,当在固定计算预算下必须重复使用数据时,知识蒸馏相较于从零开始预训练能带来更大的收益。

英文摘要:

Compared to standard language model (LM) pretraining (i.e., from scratch), Knowledge Distillation (KD) entails an additional forward pass through a teacher model that is typically substantially larger than the target student model. As such, KD in LM pretraining materially slows down throughput of pretraining instances vis-a-vis pretraining from scratch. Scaling laws of LM pretraining suggest that smaller models can close the gap to larger counterparts if trained on more data (i.e., processing more tokens)-and under a fixed computation budget, smaller models are able be process more data than larger models. We thus hypothesize that KD might, in fact, be suboptimal to pretraining from scratch for obtaining smaller LMs, when appropriately accounting for the compute budget. To test this, we compare pretraining from scratch against several KD strategies for masked language modeling (MLM) in a fair experimental setup, with respect to amount of computation as well as pretraining data. Downstream results on GLUE, however, do not confirm our hypothesis: while pretraining from scratch performs comparably to ordinary KD under a fixed computation budget, more sophisticated KD strategies, namely TinyBERT (Jiao et al., 2020) and MiniLM (Wang et al., 2023), outperform it by a notable margin. We further find that KD yields larger gains over pretraining from scratch when the data must be repeated under the fixed computation budget.

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

↑