arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.00733cs.CLcs.LG
收藏

论层剪枝对于较小BERT模型与低资源语言的重要性

On Importance of Layer Pruning for Smaller BERT Models and Low Resource Languages

Pune Institute of Computer Technology(浦那计算机技术学院);L3Cube Labs(L3Cube实验室);Indian Institute of Technology Madras(马德拉斯印度理工学院)

Mayur Shirke, Amey Shembade, Madhushri Wagh, Pavan Thorat, Raviraj Joshi

AI总结:

本文研究层剪枝在低资源语言BERT模型中的效果,发现剪枝模型可在减少层数的同时保持性能并优于同规模从头训练模型,其中中间层剪枝策略尤为有效。

摘要:

本研究探讨了层剪枝在为低资源语言中特定下游任务开发更高效BERT模型方面的有效性。我们的主要目标是评估剪枝后的BERT模型能否在减小模型规模和复杂度的同时保持高性能。我们对多种BERT变体进行了实验,包括MahaBERT-v2和Google-Muril,应用不同的剪枝策略,并将其性能与MahaBERT-Small和MahaBERT-Smaller等从头训练的较小模型进行比较。我们在马拉地语数据集上对这些模型进行微调,具体包括短标题分类(SHC)、长段落分类(LPC)和长文档分类(LDC),以评估其分类准确率。我们的研究结果表明,尽管剪枝后的模型层数更少,但其性能可与完整层数的对应模型相媲美,并且始终优于规模相近的从头训练模型。值得注意的是,从模型中间层进行剪枝被证明是最有效的策略,其性能与从顶部和底部剪枝具有竞争力。然而,并不存在明确的优胜者,因为不同的剪枝策略在不同的模型和数据集组合中表现更好。此外,在这些实验中,单语BERT模型优于多语模型。这种方法降低了计算需求,为从头训练较小模型提供了一种更快、更高效的替代方案,使先进的NLP模型在不牺牲分类准确率的情况下更容易用于低资源语言。

英文摘要:

This study explores the effectiveness of layer pruning for developing more efficient BERT models tailored to specific downstream tasks in low-resource languages. Our primary objective is to evaluate whether pruned BERT models can maintain high performance while reducing model size and complexity. We experiment with several BERT variants, including MahaBERT-v2 and Google-Muril, applying different pruning strategies and comparing their performance to smaller, scratch-trained models like MahaBERT-Small and MahaBERT-Smaller. We fine-tune these models on Marathi datasets, specifically Short Headlines Classification (SHC), Long Paragraph Classification (LPC) and Long Document Classification (LDC), to assess their classification accuracy. Our findings demonstrate that pruned models, despite having fewer layers, achieve comparable performance to their fully-layered counterparts while consistently outperforming scratch-trained models of similar size. Notably, pruning layers from the middle of the model proves to be the most effective strategy, offering performance competitive with pruning from the top and bottom. However, there is no clear winner, as different pruning strategies perform better in different model and dataset combinations. Additionally, monolingual BERT models outperform multilingual ones in these experiments. This approach, which reduces computational demands, provides a faster and more efficient alternative to training smaller models from scratch, making advanced NLP models more accessible for low-resource languages without compromising classification accuracy.

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

↑