Large Language Models Are Overparameterized Text Encoders
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) demonstrate strong performance as text embedding models when finetuned with supervised contrastive training. However, their large size balloons inference time and memory requirements. In this paper, we show that by pruning the last p% layers of an LLM before supervised training for only 1000 steps, we can achieve a proportional reduction in memory and inference time. We evaluate four different state-of-the-art LLMs on text embedding tasks and find that our method can prune up to 30% of layers with negligible impact on performance and up to 80% with only a modest drop. With only three lines of code, our method is easily implemented in any pipeline for transforming LLMs to text encoders. We also propose L3 Prune, a novel layer-pruning strategy based on the model's initial loss that provides two optimal pruning configurations: a large variant with negligible performance loss and a small variant for resource-constrained settings. On average, the large variant prunes 21% of the parameters with a -0.3 performance drop, and the small variant only suffers from a -5.1 decrease while pruning 74% of the model. We consider these results strong evidence that LLMs are overparameterized for text embedding tasks, and can be easily pruned.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 43 of its 65 references that are in the map. First posted on arXiv 18 Oct 2024.
Builds on
43 of 65 references.
References · 43
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
31 more
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2015Learning both Weights and Connections for Efficient Neural Networkscited by 2,031
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,917
- 2015A large annotated corpus for learning natural language inferencecited by 1,847
- 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,605
- 2018FEVER: a large-scale dataset for Fact Extraction and VERificationcited by 1,375
- 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,253
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 856
- 2019Are Sixteen Heads Really Better than One?cited by 816
- 2023Towards General Text Embeddings with Multi-stage Contrastive Learningcited by 723
- 2023C-Pack: Packed Resources For General Chinese Embeddingscited by 578
- 2019ELI5: Long Form Question Answeringcited by 575
- 2016Learning Structured Sparsity in Deep Neural Networkscited by 541
- 2024NV-Embed: Improved Techniques for Training LLMs as Generalist Embedding Modelscited by 472
- 2021Large Dual Encoders Are Generalizable Retrieverscited by 456
- 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 439
- 2017Supervised Learning of Universal Sentence Representations from Natural Language Inference Datacited by 432
- 2024LLM2Vec: Large Language Models Are Secretly Powerful Text Encoderscited by 404
- 2023Fine-Tuning LLaMA for Multi-Stage Text Retrievalcited by 272
- 2024Generative Representational Instruction Tuningcited by 233
- 2024The Unreasonable Ineffectiveness of the Deeper Layerscited by 226
- 2022SGPT: GPT Sentence Embeddings for Semantic Searchcited by 204
- 2021Mr. TyDi: A Multi-lingual Benchmark for Dense Retrievalcited by 119
- 2020On the Effect of Dropping Layers of Pre-trained Transformer Modelscited by 118
- 2017DuReader: a Chinese Machine Reading Comprehension Dataset from Real-world Applicationscited by 110
- 2022Task-aware Retrieval with Instructionscited by 107
- 2024Not All Layers of LLMs Are Necessary During Inferencecited by 96
- 2023T2Ranking: A large-scale Chinese Benchmark for Passage Rankingcited by 60
- 2023BeLLM: Backward Dependency Enhanced Large Language Model for Sentence Embeddingscited by 32
- 2020FastFormers: Highly Efficient Transformer Models for Natural Language Understandingcited by 28
Built on by
Citing papers per year: 2024: 1; 2025: 3; 2026: 2.
6 papers.
- 2024Lightweight Safety Classification Using Pruned Language Modelscited by 5
- 2025GAPrune: Gradient-Alignment Pruning for Domain-Aware Embeddingscited by 2
- 2025Toward Efficient Influence Function: Dropout as a Compression Toolcited by 2
- 2026It Takes a MAESTRO To Prune Bad Expertscited by 2
- 2025Statistical Deficiency for Task Inclusion Estimationcited by 1
- 2026Invariant Pretraining for Robust Code Representationscited by 0
- 2026Invariant Pretraining for Robust Code Representations15 Aug 2026
- 2026It Takes a MAESTRO To Prune Bad Experts9 Jul 2026
- 2025Toward Efficient Influence Function: Dropout as a Compression Tool19 Sep 2025
- 2025GAPrune: Gradient-Alignment Pruning for Domain-Aware Embeddings13 Sep 2025
- 2025Statistical Deficiency for Task Inclusion Estimation7 Mar 2025
- 2024Lightweight Safety Classification Using Pruned Language Models18 Dec 2024