Model reference · open weights
granite-embedding-english is an open-weight embedding model from IBM. granite-embedding-125m-english (BF16) weighs 249 MB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the ibm-granite/granite-embedding-125m-english model card, 2026-10-01
What it is
| Released by | IBM |
|---|---|
| Released | 2024-12-04 |
| Parameters | 125M |
| VRAM | 249 MB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| granite-embedding-125m-english (above) ↗ | 125M | BF16 | 249 MB | RTX 3060 12 GB |
| granite-embedding-30m-english ↗ | 30M | BF16 | 61 MB | RTX 3060 12 GB |
From the model card
News: Granite Embedding R2 models with 8192 context length released.
Model Summary: Granite-Embedding-125m-English is a 125M parameter dense biencoder embedding model from the Granite Embeddings suite that can be used to generate high quality text embeddings. This model produces embedding vectors of size 768. Compared to most other open-source models, this model was only trained using open-source relevance-pair datasets with permissive, enterprise-friendly license, plus IBM collected and generated datasets. While maintaining competitive scores on academic benchmarks such as BEIR, this model also performs well on many enterprise use cases. This model is developed using retrieval oriented pretraining, contrastive finetuning and knowledge distillation.
Supported Languages: English.
Intended use: The model is designed to produce fixed length vector representations for a given text, which can be used for text similarity, retrieval, and search applications.
Usage with Sentence Transformers: The model is compatible with SentenceTransformer library and is very easy to use:
First, install the sentence transformers library
pip install sentence_transformers
The model can then be used to encode pairs of text and find the similarity between their representations
from sentence_transformers import SentenceTransformer, util
model_path = "ibm-granite/granite-embedding-125m-english"
# Load the Sentence Transformer model
model = SentenceTransformer(model_path)
input_queries = [
' Who made the song My achy breaky heart? ',
'summit define'
]
input_passages = [
"Achy Breaky Heart is a country song written by Don Von Tress. Originally titled Don't Tell My Heart and performed by The Marcy Brothers in 1991. ",
"Definition of summit for English Language Learners. : 1 the highest point of a mountain : the top of a mountain. : 2 the highest level. : 3 a meeting or series of meetings between the leaders of two or more governments."
]
# encode queries and passages
query_embeddings = model.encode(input_queries)
passage_embeddings = model.encode(input_passages)
# calculate cosine similarity
print(util.cos_sim(query_embeddings, passage_embeddings))
Usage with Huggingface Transformers: This is a simple example of how to use the Granite-Embedding-125m-English model with the Transformers library and PyTorch.
First, install the required libraries
pip install transformers torch
The model can then be used to encode pairs of text
import torch
from transformers import AutoModel, AutoTokenizer
model_path = "ibm-granite/granite-embedding-125m-english"
# Load the model and tokenizer
model = AutoModel.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path)
model.eval()
input_queries = [
' Who made the song My achy breaky heart? ',
'summit define'
]
# tokenize inputs
tokenized_queries = tokenizer(input_queries, padding=True, truncation=True, return_tensors='pt')
# encode queries
with torch.no_grad():
# Queries
model_output = model(**tokenized_queries)
# Perform pooling. granite-embedding-125m-english uses CLS Pooling
query_embeddings = model_output[0][:, 0]
# normalize the embeddings
query_embeddings = torch.nn.functional.normalize(query_embeddings, dim=1)
Evaluation:
The performance of the Granite-Embedding-125M-English model on MTEB Retrieval (i.e., BEIR) and code retrieval (CoIR) benchmarks is reported below.
| Model | Paramters (M) | Embedding Dimension | MTEB Retrieval (15) | CoIR (10) |
|---|---|---|---|---|
| granite-embedding-125m-english | 125 | 768 | 52.3 | 50.3 |
Model Architecture: Granite-Embedding-125m-English is based on an encoder-only RoBERTa like transformer architecture, trained internally at IBM Research.
| Model | granite-embedding-30m-english | granite-embedding-125m-english | granite-embedding-107m-multilingual | granite-embedding-278m-multilingual |
|---|---|---|---|---|
| Embedding size | 384 | 768 | 384 | 768 |
| Number of layers | 6 | 12 | 6 | 12 |
| Number of attention heads | 12 | 12 | 12 | 12 |
| Intermediate size | 1536 | 3072 | 1536 | 3072 |
| Activation Function | GeLU | GeLU | GeLU | GeLU |
| Vocabulary Size | 50265 | 50265 | 250002 | 250002 |
| Max. Sequence Length | 512 | 512 | 512 | 512 |
| # Parameters | 30M | 125M | 107M | 278M |
Training Data: Overall, the training data consists of four key sources: (1) unsupervised title-body paired data scraped from the web, (2) publicly available paired with permissive, enterprise-friendly license, (3) IBM-internal paired data targetting specific technical domains,
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
Benchmarks
As published on the model card: the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | accuracy | 67.361 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | f1 | 55.079 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | f1_weighted | 73.551 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | ap | 17.644 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | ap_weighted | 17.644 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | main_score | 67.361 |
| Classification | MTEB AmazonCounterfactualClassification (en) | accuracy | 63.403 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1 | 57.418 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1_weighted | 66.970 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap | 26.892 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap_weighted | 26.892 |
| Classification | MTEB AmazonCounterfactualClassification (en) | main_score | 63.403 |
| Classification | MTEB AmazonPolarityClassification (default) | accuracy | 64.587 |
| Classification | MTEB AmazonPolarityClassification (default) | f1 | 64.333 |
| Classification | MTEB AmazonPolarityClassification (default) | f1_weighted | 64.333 |
| Classification | MTEB AmazonPolarityClassification (default) | ap | 59.602 |
| Classification | MTEB AmazonPolarityClassification (default) | ap_weighted | 59.602 |
| Classification | MTEB AmazonPolarityClassification (default) | main_score | 64.587 |
| Classification | MTEB AmazonReviewsClassification (en) | accuracy | 33.534 |
| Classification | MTEB AmazonReviewsClassification (en) | f1 | 32.539 |
| Classification | MTEB AmazonReviewsClassification (en) | f1_weighted | 32.539 |
| Classification | MTEB AmazonReviewsClassification (en) | main_score | 33.534 |
| Retrieval | MTEB AppsRetrieval (default) | ndcg_at_1 | 6.932 |
| Retrieval | MTEB AppsRetrieval (default) | ndcg_at_3 | 9.577 |