Towards Building Efficient Sentence BERT Models using Layer Pruning

Anushka Shelke, Riya Savant, Raviraj Joshi
9/21/2024
cs.CLcs.LG

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{shelke2024towards,
  title  = {Towards Building Efficient Sentence BERT Models using Layer Pruning},
  author = {Anushka Shelke and Riya Savant and Raviraj Joshi},
  year   = {2024},
  eprint = {2409.14168},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.14168v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.14168.svg)](https://codeofpaper.com/paper/2409.14168)

Discussion