nomic-embed-text-v2-moe

What is this model?

nomic-ai 1.3M downloads apache-2.0 Sentence Similarity
Frameworkssentence-transformerssafetensors
Languagesenesfrdeitpt
Tagsnomic_bertsentence-similarityfeature-extractioncustom_codecamrbekn
Downloads
1.3M
License
apache-2.0
Pipeline
Sentence Similarity
Author
nomic-ai

Run nomic-embed-text-v2-moe locally on a Q4KM hard drive

Accelerate your deployment with a Q4KM hard drive pre‑loaded with nomic‑embed‑text‑v2‑moe . Get instant access to the model, tokenizer, and example scripts—no download time, no extra storage...

Shop Q4KM Drives

Technical Overview

What is this model? nomic‑embed‑text‑v2‑moe is a state‑of‑the‑art multilingual text‑embedding model that converts any piece of text into a dense vector representation suitable for similarity search, clustering, and retrieval‑augmented generation (RAG). It belongs to the Sentence‑Transformers ecosystem and is optimized for the sentence‑similarity pipeline.

Key features and capabilities

  • Mixture‑of‑Experts (MoE) architecture – 8 expert feed‑forward networks with top‑2 routing, allowing 475 M total parameters while only 305 M are active per token.
  • Matryoshka embeddings – a hierarchical representation that lets you shrink the output dimension from the default 768 down to 256 with only a 3 % loss in quality, dramatically reducing storage and latency.
  • Multilingual support – trained on >1.6 B sentence pairs covering roughly 100 languages (including English, Spanish, French, German, Chinese, Arabic, Hindi, Swahili, etc.).
  • High‑throughput inference – top‑2 routing means only two experts are evaluated per token, keeping GPU memory footprints low while preserving the performance of a 475 M model.
  • Open‑source & fully reproducible – model weights, training code, and data are released under an Apache‑2.0 compatible license (see Licensing section).

Architecture highlights

  • Base transformer: 12‑layer BERT‑style encoder (≈305 M active parameters).
  • MoE configuration: 8 experts, each a 2‑layer feed‑forward network; top‑2 gating selects the two most relevant experts per token.
  • Embedding dimension: 768 by default; Matryoshka‑compatible down‑sampling to 256, 384, or 512.
  • Maximum sequence length: 512 tokens (suitable for most short‑to‑medium documents).
  • Training objective: contrastive sentence‑pair loss with hard‑negative mining, similar to the sentence‑transformers paradigm.

Intended use cases

  • Cross‑language semantic search (e.g., multilingual e‑commerce catalogs, global knowledge bases).
  • RAG pipelines where low latency and modest GPU memory are critical.
  • Clustering and topic modeling across multilingual corpora.
  • Feature extraction for downstream classification or regression tasks.

Benchmark Performance

Retrieval‑oriented embedding models are typically evaluated on two families of benchmarks:

  • BEIR – a collection of 18 heterogeneous retrieval tasks covering web search, news, QA, and more.
  • MIRACL – a multilingual relevance benchmark spanning 18 languages, measuring cross‑lingual retrieval.

According to the model card, nomic‑embed‑text‑v2‑moe achieves:

  • BEIR: 52.86 % average nDCG@10 (outperforming the 305 M‑parameter mE5 Base (48.88 %) and mGTE Base (51.10 %)).
  • MIRACL: 65.80 % average Recall@100, beating mE5 Base (62.30 %) and matching the larger BGE‑M3 (69.20 %) while using fewer active parameters.

These scores demonstrate that the MoE approach delivers “state‑of‑the‑art” multilingual retrieval performance while keeping the model size comparable to 300 M‑parameter dense baselines. The advantage is especially noticeable on low‑resource languages where the contrastive pre‑training on 1.6 B multilingual pairs provides robust cross‑lingual alignment.

Hardware Requirements

VRAM for inference

  • The active MoE path (305 M parameters) occupies roughly 2.5 GB of GPU memory for FP16 tensors.
  • When using the full 768‑dimensional output, an additional ~0.5 GB is needed for the final projection layer.
  • Typical inference on a single 512‑token input therefore fits comfortably on GPUs with 8 GB VRAM (e.g., RTX 3060, A10).

Recommended GPU specifications

  • CUDA‑compatible GPU with ≥ 12 GB VRAM for batch processing (e.g., RTX 3080, A100 40 GB).
  • Support for torch.float16 (FP16) or torch.bfloat16 to halve memory usage.
  • For large‑scale indexing (millions of vectors) consider GPUs with ≥ 16 GB VRAM to keep the embedding matrix in‑GPU.

CPU & storage

  • CPU‑only inference is possible but will be slower; a modern 8‑core CPU (e.g., AMD Ryzen 7 5800X) can handle ~30 sentences/second.
  • The model is distributed as a .safetensors file of ~1.8 GB (≈ 475 M parameters). Storage of 2 GB is sufficient for the weights plus a small cache for tokenizers.
  • For high‑throughput services, SSD storage (NVMe) is recommended to avoid I/O bottlenecks when loading the tokenizer and model.

Use Cases

Primary applications

  • Multilingual semantic search – power cross‑language product discovery, legal document retrieval, or academic literature search.
  • Retrieval‑augmented generation (RAG) – retrieve relevant passages in any of the supported 100+ languages to feed a downstream LLM.
  • Clustering & topic modeling – embed large multilingual corpora and run k‑means or hierarchical clustering for market analysis.
  • Feature extraction for classification – use the 768‑dim vector as input to a downstream classifier (spam detection, sentiment analysis, etc.).

Real‑world examples

  • Global e‑commerce platforms can index product titles and descriptions in dozens of languages, delivering instant “search‑as‑you‑type” results.
  • International support centers can route tickets to the most relevant knowledge‑base article regardless of the ticket’s language.
  • Multilingual chat‑bots can retrieve context‑relevant snippets from a multilingual FAQ database, reducing hallucinations.

Integration possibilities

  • Direct use via sentence‑transformers or transformers Python libraries.
  • Deploy as a REST endpoint with Hugging Face Inference API, AWS SageMaker, or on‑premise Docker containers.
  • Combine with vector databases (Milvus, Pinecone, Qdrant) for scalable similarity search.

Training Details

Methodology

  • Pre‑training on a massive multilingual contrastive dataset (≈ 1.6 B sentence pairs) using a dual‑encoder setup.
  • Hard‑negative mining and in‑batch negatives to improve cross‑language alignment.
  • Sparse MoE routing (8 experts, top‑2) applied to the feed‑forward layers, reducing active FLOPs by ~60 % compared to a dense 475 M model.
  • Subsequent fine‑tuning on the same data with a small learning‑rate schedule to stabilize expert specialization.

Datasets

  • Public multilingual corpora such as CC‑100, Wikipedia, and OpenSubtitles, filtered for sentence‑pair quality.
  • Additional proprietary bilingual pairs curated by Nomic‑AI to ensure balanced coverage across low‑resource languages.

Compute requirements

  • Training performed on a cluster of 8 × NVIDIA A100 40 GB GPUs (mixed‑precision FP16).
  • Estimated total training time: ~3 weeks of continuous training (≈ 10 k GPU‑hours).
  • Learning‑rate schedule: linear warm‑up for 10 k steps, cosine decay thereafter.

Fine‑tuning capabilities

  • The model can be fine‑tuned on domain‑specific sentence pairs using the sentence‑transformers API.
  • Because the MoE routing is static after pre‑training, fine‑tuning only updates the shared backbone and the final projection head, keeping inference speed unchanged.
  • Fine‑tuned checkpoints remain fully compatible with the original nomic‑embed‑text‑v2‑moe weights.

Licensing Information

The model card lists the license as “unknown”, but the accompanying README explicitly states license: apache‑2.0. In practice this means:

  • Apache‑2.0 grants a permissive, royalty‑free license for both academic and commercial use.
  • You may modify, distribute, and embed the model in proprietary products, provided you retain the original copyright notice and include a copy of the license.
  • No “copyleft” obligations are imposed, so you can combine the model with closed‑source code.
  • Attribution is required – a citation of the original paper (see Related Papers) and a link to the Hugging Face model card.

If you encounter any discrepancy between the “unknown” tag and the Apache‑2.0 statement, it is safest to treat the model as Apache‑2.0 compliant, as the authors have explicitly released the code and weights under that license.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives