Model reference · open weights
modernbert-embed is an open-weight embedding model from nomic-ai, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.
About
ModernBERT Embed [](https://huggingface.co/nomic-ai/modernbert-embed-base) ModernBERT Embed is an embedding model trained from ModernBERT-base, bringing the new advances of ModernBERT to embeddings! Trained on the Nomic Embed weakly-supervised and supervised datasets, modernbert-embed also supports Matryoshka Representation Learning dimensions of 256, reducing memory by 3x with minimal performance loss. Performance Usage You can use these models directly with the latest transformers release and requires installing transformers=4.48.0: Reminder, this model is trained similarly to Nomic Embed and REQUIRES prefixes to be added to the input. For more information, see the instructions in Nomic Embed. Most use cases, adding searchquery: to the query and searchdocument: to the documents will be sufficient. Sentence Transformers In Sentence Transformers, you can truncate embeddings to a smaller dimension by using the truncatedim parameter when loading the SentenceTransformer model. Note the small differences compared to the full 768-dimensional similarities. Transformers In transformers, you can truncate embeddings to a smaller dimension by slicing the mean pooled embeddings, prior to normalization. Note the small differences compared to the full 768-dimensional similarities. Transformers.js If you haven't already, you can install the Transformers.js JavaScript library from NPM using: Then, you can compute embeddings as follows: Training Click the Nomic Atlas map below to visualize a 5M sample of our contrastive pretraining data! [](https://atlas.nomic.ai/map/nomic-text-embed-v1-5m-sample) We train our embedder using a multi-stage training pipeline. Starting from a long-context BERT model, the first unsupervised contrastive stage trains on a dataset generated from weakly related text pairs, such as question-answer pairs from forums like StackExchange and Quora, title-body pairs from Amazon reviews, and summarizations from news articles. In the second finetuning stage, higher quality labeled datasets such as search queries and answers from web searches are leveraged. Data curation and hard-example mining is crucial in this stage. For more details, see the Nomic Embed Tec
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | nomic-ai |
|---|---|
| Type | Embedding models |
| Parameters (lead) | 149M |
| Context | 8k tokens |
| Variants | 1 |
| Runs with | sentence-transformers |
| Based on | answerdotai/ModernBERT-base, nomic-ai/modernbert-embed-unsupervised |
| Released | 2024-12-29 |
| Popularity | 244k downloads / month |
| Likes | 233 |
| Licence | Open weights |
How it works
Variants
Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.
| Variant | Params | Precision | VRAM | Fits 16 GB | Weights |
|---|---|---|---|---|---|
| modernbert-embed-base | 149M | BF16 | ~0.3 GB | ✓ | Weights ↗ |
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 | 78.134 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap | 42.19 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1 | 72.344 |
| Classification | MTEB AmazonPolarityClassification | accuracy | 93.094 |
| Classification | MTEB AmazonPolarityClassification | ap | 90.037 |
| Classification | MTEB AmazonPolarityClassification | f1 | 93.087 |
| Classification | MTEB AmazonReviewsClassification (en) | accuracy | 48.428 |
| Classification | MTEB AmazonReviewsClassification (en) | f1 | 47.743 |
| Retrieval | MTEB ArguAna | map_at_1 | 23.898 |
| Retrieval | MTEB ArguAna | map_at_10 | 39.775 |
| Retrieval | MTEB ArguAna | map_at_100 | 40.827 |
| Retrieval | MTEB ArguAna | map_at_1000 | 40.837 |
| Retrieval | MTEB ArguAna | map_at_20 | 40.604 |
| Retrieval | MTEB ArguAna | map_at_3 | 34.519 |
| Retrieval | MTEB ArguAna | map_at_5 | 37.307 |
| Retrieval | MTEB ArguAna | mrr_at_1 | 24.395 |
| Retrieval | MTEB ArguAna | mrr_at_10 | 39.963 |
| Retrieval | MTEB ArguAna | mrr_at_100 | 41.014 |
| Retrieval | MTEB ArguAna | mrr_at_1000 | 41.024 |
| Retrieval | MTEB ArguAna | mrr_at_20 | 40.791 |
| Retrieval | MTEB ArguAna | mrr_at_3 | 34.732 |
| Retrieval | MTEB ArguAna | mrr_at_5 | 37.481 |
| Retrieval | MTEB ArguAna | ndcg_at_1 | 23.898 |
| Retrieval | MTEB ArguAna | ndcg_at_10 | 48.962 |
Using it via the API
Once AxForge deploys modernbert-embed for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (modernbert-embed 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":"modernbert-embed","input":"text to embed"}'
Licence
Open weights under apache-2.0 — commercial use is permitted. Deploy it on AxForge EU hardware on request. Read the licence ↗
Explore