针对低资源语言马拉地语,通过剪枝与蒸馏提升Transformer模型效率。
On Importance of Pruning and Distillation for Efficient Low Resource NLP
- 结合剪枝、蒸馏和混合精度优化模型
- 25%剪枝+蒸馏实现2.56倍加速且保持准确率
- 为低资源语言NLP提供可复用的轻量化方案
大型Transformer模型虽推动了自然语言处理进展,但其计算开销巨大。尽管英语模型已有轻量化研究(如DistilBERT、MobileBERT),低资源语言相关工作仍匮乏。本文以马拉地语为例,基于marathi-topic-all-doc-v2模型,在MahaNews文档分类数据集上应用块移动剪枝、知识蒸馏与混合精度技术,单独或组合使用以降低计算时间与内存消耗。结果表明,策略性剪枝对效率提升至关重要。在单个GPU系统上,最优配置为25%剪枝+知识蒸馏,实现2.56倍计算速度提升,同时保持原始模型准确率,并兼顾环境可持续性。
原文摘要 · Abstract (English)
The rise of large transformer models has revolutionized Natural Language Processing, leading to significant advances in tasks like text classification. However, this progress demands substantial computational resources, escalating training duration, and expenses with larger model sizes. Efforts have been made to downsize and accelerate English models (e.g., Distilbert, MobileBert). Yet, research in this area is scarce for low-resource languages. In this study, we explore the case of the low-resource Indic language Marathi. Leveraging the marathi-topic-all-doc-v2 model as our baseline, we implement optimization techniques to reduce computation time and memory usage. Our focus is on enhancing the efficiency of Marathi transformer models while maintaining top-tier accuracy and reducing computational demands. Using the MahaNews document classification dataset and the marathi-topic-all-doc-v2 model from L3Cube, we apply Block Movement Pruning, Knowledge Distillation, and Mixed Precision methods individually and in combination to boost efficiency. We demonstrate the importance of strategic pruning levels in achieving desired efficiency gains. Furthermore, we analyze the balance between efficiency improvements and environmental impact, highlighting how optimized model architectures can contribute to a more sustainable computational ecosystem. Implementing these techniques on a single GPU system, we determine that the optimal configuration is 25\% pruning + knowledge distillation. This approach yielded a 2.56x speedup in computation time while maintaining baseline accuracy levels.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。