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

论剪枝与蒸馏在高效低资源NLP中的重要性

On Importance of Pruning and Distillation for Efficient Low Resource NLP

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

Aishwarya Mirashi, Purva Lingayat, Srushti Sonavane, Tejas Padhiyar, Raviraj Joshi, Geetanjali Kale

AI总结:

针对低资源语言马拉地语的NLP模型,本研究结合块移动剪枝与知识蒸馏技术,在保持基线精度的同时实现了2.56倍的计算加速,有效降低了计算需求并促进了可持续性。

摘要:

大型Transformer模型的兴起彻底改变了自然语言处理,在文本分类等任务上取得了显著进展。然而,这种进步需要大量的计算资源,随着模型规模扩大,训练时长和费用也不断攀升。已有研究致力于缩小和加速英文模型(如Distilbert、MobileBert),但针对低资源语言的相关研究仍然非常匮乏。在本研究中,我们探索了低资源印度语言Marathi的案例。我们以marathi-topic-all-doc-v2模型作为基线,实施优化技术以减少计算时间和内存使用。我们的重点是在保持顶级精度的同时,提升Marathi Transformer模型的效率并降低计算需求。使用L3Cube的MahaNews文档分类数据集和marathi-topic-all-doc-v2模型,我们分别及组合应用了Block Movement Pruning、Knowledge Distillation和Mixed Precision方法来提升效率。我们证明了战略性剪枝水平对于实现预期效率提升的重要性。此外,我们分析了效率提升与环境影响之间的平衡,强调了优化的模型架构如何有助于构建更具可持续性的计算生态系统。在单GPU系统上实施这些技术后,我们确定最优配置为25%剪枝+知识蒸馏。该方法在保持基线精度水平的同时,实现了2.56倍的计算时间加速。

英文摘要:

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.

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

↑