Repurposing Language Models into Embedding Models: Finding the Compute-Optimal Recipe

Alicja Ziarko, Albert Q. Jiang, Bartosz Piotrowski, Wenda Li, Mateja Jamnik +1 more
6/6/2024
cs.LG

No official code found. Best implementation: SeqDM/Efficient-Embeddings (3 stars, MIT, last commit 2024-06-05).

Abstract

Text embeddings are essential for many tasks, such as document retrieval, clustering, and semantic similarity assessment. In this paper, we study how to contrastively train text embedding models in a compute-optimal fashion, given a suite of pre-trained decoder-only language models. Our innovation is an algorithm that produces optimal configurations of model sizes, data quantities, and fine-tuning methods for text-embedding models at different computational budget levels. The resulting recipe, which we obtain through extensive experiments, can be used by practitioners to make informed design choices for their embedding models. Specifically, our findings suggest that full fine-tuning and low-rank adaptation fine-tuning produce optimal models at lower and higher computational budgets respectively.

View on arXivView PDF

Code Implementations(1)

MIT
30R, ShellJun 4, 20242 years agoMIT

Similar Papers

Cite this paper

@article{ziarko2024repurposing,
  title  = {Repurposing Language Models into Embedding Models: Finding the Compute-Optimal Recipe},
  author = {Alicja Ziarko and Albert Q. Jiang and Bartosz Piotrowski and Wenda Li and Mateja Jamnik and Piotr Miłoś},
  year   = {2024},
  eprint = {2406.04165},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2406.04165},
  url    = {http://arxiv.org/abs/2406.04165v2},
  journal = {NEURIPS 2024 2024}
}

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/2406.04165.svg)](https://codeofpaper.com/paper/2406.04165)

Discussion