arXiv:2501.00733cs.CLcs.LG2025-01中稿 · FIRE 2024: 16th me…被引 1

剪枝中间层可让小模型在低资源语言上保持高精度

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

  • 从中间剪枝层比上下剪更有效,提升模型效率
  • 剪枝后模型性能接近完整版,优于同尺寸从零训练的模型
  • 适合想低成本部署NLP模型的低资源语言研究者

本研究探索了层剪枝在构建面向低资源语言特定下游任务的高效BERT模型中的有效性。实验对比了MahaBERT-v2和Google-Muril等BERT变体在不同剪枝策略下的表现,并与小型自训练模型(如MahaBERT-Small、MahaBERT-Smaller)进行比较。在马拉地语数据集(包括短标题分类、长段落分类和长文档分类)上微调后发现:剪枝模型虽层数减少,但性能与全量模型相当,且始终优于同规模从零训练的模型。中层剪枝效果最佳,但无绝对最优策略,不同模型与数据组合下表现各异。此外,单语BERT在实验中优于多语模型。该方法显著降低计算开销,为低资源语言提供高效、快速的先进NLP部署路径。

原文摘要 · Abstract (English)

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.

BERT剪枝低资源语言模型压缩NLP

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。