arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.14168cs.CLcs.LG
收藏

使用层剪枝构建高效 Sentence BERT 模型

Towards Building Efficient Sentence BERT Models using Layer Pruning

MKSSS Cummins College of Engineering for Women(MKSSS库明斯女子工程学院);L3Cube Labs(L3Cube实验室);Indian Institute of Technology Madras(马德拉斯印度理工学院)

Anushka Shelke, Riya Savant, Raviraj Joshi

AI总结:

本研究探讨了通过层剪枝创建高效 Sentence BERT 模型的方法,发现剪枝后模型在保持嵌入质量的同时显著降低计算需求,且优于同等大小的从头训练模型。

摘要:

本研究探讨了层剪枝在创建高效 Sentence BERT (SBERT) 模型中的有效性。我们的目标是创建更小的句子嵌入模型,在降低复杂度的同时保持强大的嵌入相似性。我们在剪枝前后对 Muril 和 MahaBERT-v2 等 BERT 模型进行评估,并将它们与 MahaBERT-Small 和 MahaBERT-Smaller 等从头训练的较小模型进行比较。通过包含自然语言推理(NLI)和语义文本相似度(STS)的两阶段 SBERT 微调过程,我们评估了层减少对嵌入质量的影响。我们的研究结果表明,剪枝后的模型尽管层数较少,但与全层版本相比仍具有竞争力的性能。此外,剪枝模型始终优于同等大小的从头训练模型,这确立了层剪枝作为创建更小、更高效嵌入模型的有效策略。这些结果突显了层剪枝作为一种减少计算需求同时保留高质量嵌入的实用方法,使 SBERT 模型更易于在技术资源有限的语言中使用。

英文摘要:

This study examines the effectiveness of layer pruning in creating efficient Sentence BERT (SBERT) models. Our goal is to create smaller sentence embedding models that reduce complexity while maintaining strong embedding similarity. We assess BERT models like Muril and MahaBERT-v2 before and after pruning, comparing them with smaller, scratch-trained models like MahaBERT-Small and MahaBERT-Smaller. Through a two-phase SBERT fine-tuning process involving Natural Language Inference (NLI) and Semantic Textual Similarity (STS), we evaluate the impact of layer reduction on embedding quality. Our findings show that pruned models, despite fewer layers, perform competitively with fully layered versions. Moreover, pruned models consistently outperform similarly sized, scratch-trained models, establishing layer pruning as an effective strategy for creating smaller, efficient embedding models. These results highlight layer pruning as a practical approach for reducing computational demand while preserving high-quality embeddings, making SBERT models more accessible for languages with limited technological resources.

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

↑