Training Sparse Mixture Of Experts Text Embedding Models

Zach Nussbaum, Brandon Duderstadt
2/11/2025
cs.CLcs.AIcs.IR

Official code: nomic-ai/contrastors (799 stars, Apache-2.0, PyTorch, last commit 2025-03-26).

Abstract

Transformer-based text embedding models have improved their performance on benchmarks like MIRACL and BEIR by increasing their parameter counts. However, this scaling approach introduces significant deployment challenges, including increased inference latency and memory usage. These challenges are particularly severe in retrieval-augmented generation (RAG) applications, where large models' increased memory requirements constrain dataset ingestion capacity, and their higher latency directly impacts query-time performance. While causal language models have addressed similar efficiency challenges using Mixture of Experts (MoE) architectures, this approach hasn't been successfully adapted to the general text embedding setting. In this paper, we introduce Nomic Embed v2, the first general purpose MoE text embedding model. Our model outperforms models in the same parameter class on both monolingual and multilingual benchmarks while also maintaining competitive performance with models twice its size. We open-source all code, models, and evaluation data to ensure full reproducibility of our training pipeline at \href{https://github.com/nomic-ai/contrastors}{https://github.com/nomic-ai/contrastors}.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

Train Models Contrastively in Pytorch

79965Shell, PythonJan 30, 20241 years agoApache-2.0
contrastive-learningdeep-learningdense-retrievalembeddingsimage-embeddings+6 more

Similar Papers

Cite this paper

@article{nussbaum2025training,
  title  = {Training Sparse Mixture Of Experts Text Embedding Models},
  author = {Zach Nussbaum and Brandon Duderstadt},
  year   = {2025},
  eprint = {2502.07972},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.07972v3}
}

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

Discussion