English

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

Machine Learning 2024-11-22 v2

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.

Keywords

Cite

@article{arxiv.2406.04165,
  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ś},
  journal= {arXiv preprint arXiv:2406.04165},
  year   = {2024}
}

Comments

NeurIPS 2024

R2 v1 2026-06-28T16:56:02.165Z