Model reference · open weights
nomic-embed-text is an open-weight embedding model from RedHatAI. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | Red Hat |
|---|---|
| Published under | RedHatAI |
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 137M |
| Context | 8k tokens |
| Runs with | sentence-transformers |
| Released | 2026-02-18 |
| Popularity | 711 downloads / month |
| Licence | Open weights |
About
Blog | Technical Report | AWS SageMaker | Nomic Platform
Exciting Update!: nomic-embed-text-v1.5 is now multimodal! nomic-embed-vision-v1.5 is aligned to the embedding space of nomic-embed-text-v1.5, meaning any text embedding is multimodal!
ModelCar: registry.redhat.io/rhelai1/modelcar-nomic-embed-text-v1-5:1.5
Important: the text prompt must include a task instruction prefix, instructing the model which task is being performed.
For example, if you are implementing a RAG application, you embed your documents as search_document: and embed your user queries as search_query: .
search_documentThis prefix is used for embedding texts as documents, for example as documents for a RAG index.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", trust_remote_code=True)
sentences = ['search_document: TSNE is a dimensionality reduction algorithm created by Laurens van Der Maaten']
embeddings = model.encode(sentences)
print(embeddings)
search_queryThis prefix is used for embedding texts as questions that documents from a dataset could resolve, for example as queries to be answered by a RAG application.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", trust_remote_code=True)
sentences = ['search_query: Who is Laurens van Der Maaten?']
embeddings = model.encode(sentences)
print(embeddings)
clusteringThis prefix is used for embedding texts in order to group them into clusters, discover common topics, or remove semantic duplicates.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", trust_remote_code=True)
sentences = ['clustering: the quick brown fox']
embeddings = model.encode(sentences)
print(embeddings)
classificationThis prefix is used for embedding texts into vectors that will be used as features for a classification model
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", trust_remote_code=True)
sentences = ['classification: the quick brown fox']
embeddings = model.encode(sentences)
print(embeddings)
import torch.nn.functional as F
from sentence_transformers import SentenceTransformer
matryoshka_dim = 512
model = SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", trust_remote_code=True)
sentences = ['search_query: What is TSNE?', 'search_query: Who is Laurens van der Maaten?']
embeddings = model.encode(sentences, convert_to_tensor=True)
embeddings = F.layer_norm(embeddings, normalized_shape=(embeddings.shape[1],))
embeddings = embeddings[:, :matryoshka_dim]
embeddings = F.normalize(embeddings, p=2, dim=1)
print(embeddings)
import torch
import torch.nn.functional as F
from transformers import AutoTokenizer, AutoModel
def mean_pooling(model_output, attention_mask):
token_embeddings = model_output[0]
input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
sentences = ['search_query: What is TSNE?', 'search_query: Who is Laurens van der Maaten?']
tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased')
model = AutoModel.from_pretrained('nomic-ai/nomic-embed-text-v1.5', trust_remote_code=True, safe_serialization=True)
model.eval()
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
+ matryoshka_dim = 512
with torch.no_grad():
model_output = model(**encoded_input)
embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
+ embeddings = F.layer_norm(embeddings, normalized_shape=(embeddings.shape[1],))
+ embeddings = embeddings[:, :matryoshka_dim]
embeddings = F.normalize(embeddings, p=2, dim=1)
print(embeddings)
The model natively supports scaling of the sequence length past 2048 tokens. To do so,
- tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased')
+ tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased', model_max_length=8192)
- model = AutoModel.from_pretrained('nomic-ai/nomic-embed-text-v1.5', trust_remote_code=True)
+ model = AutoModel.from_pretrained('nomic-ai/nomic-embed-text-v1.5', trust_remote_code=True, rotary_scaling_factor=2)
import { pipeline, layer_norm } from '@huggingface/transformers';
// Create a feature extraction pipeline
const extractor = await pipeline('feature-extraction', 'nomic-ai/nomic-embed-text-v1.5');
// Define sentences
const texts = ['search_query: What is TSNE?', 'search_query: Who is Laurens van der Maaten?'];
// Compute sentence embeddings
let embeddings = await extractor(texts, { pooling: 'mean' });
console.log(embeddings); // Tensor of shape [2, 768]
const matryoshka_dim = 512;
embeddings = layer_norm(embeddings, [embeddings.dims[1]])
.slice(null, [0, matryoshka_dim])
.normalize(2, -1);
console.log(embeddings.tolist());
The easiest way to use Nomic Embed is through the Nomic Embedding API.
Generating embeddings with the nomic Python client is as easy as
from nomic import embed
output = embed.text(
texts=['Nomic Embedding API', '#keepAIOpen'],
model='nomic-embed-text-v1.5',
task_type='From the published model card. Full card on the HuggingFace links in the sidebar.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Classification | MTEB AmazonCounterfactualClassification (en) | accuracy | 75.209 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap | 38.576 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1 | 69.356 |
| Classification | MTEB AmazonPolarityClassification | accuracy | 91.814 |
| Classification | MTEB AmazonPolarityClassification | ap | 88.652 |
| Classification | MTEB AmazonPolarityClassification | f1 | 91.804 |
| Classification | MTEB AmazonReviewsClassification (en) | accuracy | 47.162 |
| Classification | MTEB AmazonReviewsClassification (en) | f1 | 46.593 |
| Retrieval | MTEB ArguAna | map_at_1 | 24.253 |
| Retrieval | MTEB ArguAna | map_at_10 | 38.962 |
| Retrieval | MTEB ArguAna | map_at_100 | 40.081 |
| Retrieval | MTEB ArguAna | map_at_1000 | 40.089 |
| Retrieval | MTEB ArguAna | map_at_3 | 33.499 |
| Retrieval | MTEB ArguAna | map_at_5 | 36.351 |
| Retrieval | MTEB ArguAna | mrr_at_1 | 24.609 |
| Retrieval | MTEB ArguAna | mrr_at_10 | 39.099 |
| Retrieval | MTEB ArguAna | mrr_at_100 | 40.211 |
| Retrieval | MTEB ArguAna | mrr_at_1000 | 40.219 |
| Retrieval | MTEB ArguAna | mrr_at_3 | 33.677 |
| Retrieval | MTEB ArguAna | mrr_at_5 | 36.469 |
| Retrieval | MTEB ArguAna | ndcg_at_1 | 24.253 |
| Retrieval | MTEB ArguAna | ndcg_at_10 | 48.011 |
| Retrieval | MTEB ArguAna | ndcg_at_100 | 52.756 |
| Retrieval | MTEB ArguAna | ndcg_at_1000 | 52.965 |
Using it via the API
Once AxForge deploys redhatai-nomic-embed-text for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (redhatai-nomic-embed-text below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"redhatai-nomic-embed-text","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.