Model reference · open weights
granite-embedding-reranker-english-r2 is an open-weight embedding model from IBM. granite-embedding-reranker-english-r2 (FP32) weighs 299 MB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the ibm-granite/granite-embedding-reranker-english-r2 model card, 2026-10-01
What it is
| Released by | IBM |
|---|---|
| Released | 2025-08-04 |
| Parameters | 150M |
| VRAM | 299 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 |
From the model card
Model Summary: granite-embedding-reranker-english-r2 is a 149M parameter dense cross-encoder model from the Granite Embeddings collection that can be used to generate high quality text embeddings. This model produces embedding vectors of size 768 based on context length of upto 8192 tokens. 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.
The granite-embedding-reranker-english-r2 model uses a cross-encoder architecture to compute high-quality relevance scores between queries and documents by jointly encoding their text, enabling precise reranking based on contextual alignment. The model is trained with ranking-specific loss functions such as pListMLE, along with model merging techniques to enhance performance. The reranker model shows strong performance on standard information retrieval benchmark (BEIR, MIRACL), long-document search benchmarks (MLDR), and on many enterprise use cases.
The latest granite embedding r2 release introduces two English embedding models, and one English reranking all based on the ModernBERT architecture:
The model is designed to compute relevance scores for query-document pairs, making it well-suited for reranking tasks in information 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 jointly encode pairs of text to compute a relevance score.
from sentence_transformers import CrossEncoder, util
model_path = "ibm-granite/granite-embedding-reranker-english-r2"
# Load the Sentence Transformer model
model = CrossEncoder(model_path)
passages = [
"Romeo and Juliet is a play by William Shakespeare.",
"Climate change refers to long-term shifts in temperatures.",
"Shakespeare also wrote Hamlet and Macbeth.",
"Water is an inorganic compound with the chemical formula H2O.",
"In liquid form, H2O is also called 'water' at standard temperature and pressure."
]
query = "what is the chemical formula of water?"
# encodes query and passages jointly and computes relevance score.
ranks = model.rank(query, passages, return_documents=True)
# Print document rank and relevance score
for rank in ranks:
print(f"- #{rank['corpus_id']} ({rank['score']:.2f}): {rank['text']}")
Usage with Huggingface Transformers: This is a simple example of how to use the reranking 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 AutoModelForSequenceClassification, AutoTokenizer
model_path = "ibm-granite/granite-embedding-reranker-english-r2"
# Load the model and tokenizer
model = AutoModelForSequenceClassification.from_pretrained(model_path).eval()
tokenizer = AutoTokenizer.from_pretrained(model_path)
pairs = [
["what is the chemical formula of water?", "Water is an inorganic compound with the chemical formula H2O."],
["what is the chemical formula of water?", "In liquid form, H2O is also called 'water' at standard temperature and pressure."],
["how to implement quick sort in python?", "The weather is nice today"],
]
# tokenize inputs
tokenized_pairs = tokenizer(pairs, padding=True, truncation=True, return_tensors='pt')
# encode and compute scores
with torch.no_grad():
scores = model(**tokenized_pairs, return_dict=True).logits.view(-1, ).float()
print(scores)
Usage with Huggingface Transformers (Retriever + Reranker E2E): This is a simple example of how to use the Granite retriever and reranker together end-to-end with the Transformers library and PyTorch. The retriever first finds the most relevant candidate documents for a query, and then the reranker re-orders those candidates to produce the final ranked list.
import torch
from transformers import AutoModel, AutoTokenizer, AutoModelForSequenceClassification
# --------------------------
# 1. Load retriever (149M)
# --------------------------
retriever_model_path = "ibm-granite/granite-embedding-english-r2"
retriever = AutoModel.from_pretrained(retriever_model_path).eval()
retriever_tokenizer = AutoTokenizer.from_pretrained(retriever_model_path)
# Example query + candidate documents
query = "what is the chemical formula of water?"
documents = [
"Water is an inorganic compound with the chemical formula H2O.",
"In liquid form, H2O is also called 'water' at standard temperature and pressure.",
"The weather is nice today",
"Quick sort is a divide and conquer algorithm that sorts by partitioning."
]
# Encode query and documents
with torch.no_grad():
query_emb = retriever(Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.