Sentence Similarity
sentence-transformers
Safetensors
nomic_bert
feature-extraction
custom_code
text-embeddings-inference
Instructions to use nomic-ai/nomic-embed-text-v2-moe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use nomic-ai/nomic-embed-text-v2-moe with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nomic-ai/nomic-embed-text-v2-moe", trust_remote_code=True) sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
fix: add paper order
Browse files135 unmodified lines1361371381391401411421431441453 unmodified lines149150151152153154135 unmodified lines| Arctic Embed v2 Large | 568 | 1024 | **55.65** | 66.00 | ❌ | ❌ | ❌ || mE5 Large | 560 | 1024 | 51.40 | 66.50 | ❌ | ❌ | ❌ |## Paper AbstractTransformer-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 https://github.com/nomic-ai/contrastors.## Model Architecture- **Total Parameters**: 475M- **Active Parameters During Inference**: 305M3 unmodified lines- **Maximum Sequence Length**: 512 tokens- **Languages**: Supports dozens of languages (see Performance section)## Usage Guide135 unmodified lines1361371381391401413 unmodified lines145146147148149150151152153154155135 unmodified lines| Arctic Embed v2 Large | 568 | 1024 | **55.65** | 66.00 | ❌ | ❌ | ❌ || mE5 Large | 560 | 1024 | 51.40 | 66.50 | ❌ | ❌ | ❌ |## Model Architecture- **Total Parameters**: 475M- **Active Parameters During Inference**: 305M3 unmodified lines- **Maximum Sequence Length**: 512 tokens- **Languages**: Supports dozens of languages (see Performance section)## Paper AbstractTransformer-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 https://github.com/nomic-ai/contrastors.## Usage Guide
README.md+5-4