mlsanityData to 14 Oct 2026

Large Language Models Are Overparameterized Text Encoders

arXiv 2410.14578 ↗First posted 18 Oct 2024cs.CL cs.AI cs.LGcited by 6

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  5. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  6. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  7. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  8. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  9. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
  10. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
  11. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
  12. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
31 more
  1. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
  2. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  3. 2015Learning both Weights and Connections for Efficient Neural Networkscited by 2,031
  4. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,917
  5. 2015A large annotated corpus for learning natural language inferencecited by 1,847
  6. 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,605
  7. 2018FEVER: a large-scale dataset for Fact Extraction and VERificationcited by 1,375
  8. 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,253
  9. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 856
  10. 2019Are Sixteen Heads Really Better than One?cited by 816
  11. 2023Towards General Text Embeddings with Multi-stage Contrastive Learningcited by 723
  12. 2023C-Pack: Packed Resources For General Chinese Embeddingscited by 578
  13. 2019ELI5: Long Form Question Answeringcited by 575
  14. 2016Learning Structured Sparsity in Deep Neural Networkscited by 541
  15. 2024NV-Embed: Improved Techniques for Training LLMs as Generalist Embedding Modelscited by 472
  16. 2021Large Dual Encoders Are Generalizable Retrieverscited by 456
  17. 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 439
  18. 2017Supervised Learning of Universal Sentence Representations from Natural Language Inference Datacited by 432
  19. 2024LLM2Vec: Large Language Models Are Secretly Powerful Text Encoderscited by 404
  20. 2023Fine-Tuning LLaMA for Multi-Stage Text Retrievalcited by 272
  21. 2024Generative Representational Instruction Tuningcited by 233
  22. 2024The Unreasonable Ineffectiveness of the Deeper Layerscited by 226
  23. 2022SGPT: GPT Sentence Embeddings for Semantic Searchcited by 204
  24. 2021Mr. TyDi: A Multi-lingual Benchmark for Dense Retrievalcited by 119
  25. 2020On the Effect of Dropping Layers of Pre-trained Transformer Modelscited by 118
  26. 2017DuReader: a Chinese Machine Reading Comprehension Dataset from Real-world Applicationscited by 110
  27. 2022Task-aware Retrieval with Instructionscited by 107
  28. 2024Not All Layers of LLMs Are Necessary During Inferencecited by 96
  29. 2023T2Ranking: A large-scale Chinese Benchmark for Passage Rankingcited by 60
  30. 2023BeLLM: Backward Dependency Enhanced Large Language Model for Sentence Embeddingscited by 32
  31. 2020FastFormers: Highly Efficient Transformer Models for Natural Language Understandingcited by 28

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 1; 2025: 3; 2026: 2.

6 papers.