AI SeedbankHelp preserve open and free AI for humanity's future

← All models

ibm-granite_granite-embedding-small-english-r2

ibm-granite · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: · Leechers:

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


language:

  • en library_name: sentence-transformers license: apache-2.0 pipeline_tag: feature-extraction tags:
  • granite
  • embeddings
  • transformers
  • mteb
  • feature-extraction

Granite-Embedding-Small-English-R2

Model Summary: Granite-embedding-small-english-r2 is a 47M parameter dense biencoder embedding model from the Granite Embeddings collection that can be used to generate high quality text embeddings. This model produces embedding vectors of size 384 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 r2 models show strong performance across standard and IBM-built information retrieval benchmarks (BEIR, ClapNQ), code retrieval (COIR), long-document search benchmarks (MLDR, LongEmbed), conversational multi-turn (MTRAG), table retrieval (NQTables, OTT-QA, AIT-QA, MultiHierTT, OpenWikiTables), and on many enterprise use cases.

These models use a bi-encoder architecture to generate high-quality embeddings from text inputs such as queries, passages, and documents, enabling seamless comparison through cosine similarity. Built using retrieval oriented pretraining, contrastive finetuning, knowledge distillation, and model merging, granite-embedding-small-english-r2 is optimized to ensure strong alignment between query and passage embeddings.

The latest granite embedding r2 release introduces two English embedding models, both based on the ModernBERT architecture:

  • granite-embedding-english-r2 (149M parameters): with an output embedding size of 768, replacing granite-embedding-125m-english.
  • granite-embedding-small-english-r2 (47M parameters): A first-of-its-kind reduced-size model, with 8192 context length support, fewer layers and a smaller output embedding size (384), replacing granite-embedding-30m-english.

Model Details

  • Developed by: Granite Embedding Team, IBM
  • Repository: ibm-granite/granite-embedding-models
  • Project Page: IBM Granite
  • Paper: Granite Embedding R2 Models
  • Language(s): English
  • Release Date: Aug 15, 2025
  • License: Apache 2.0

Usage

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.

For efficient decoding, these models use Flash Attention 2. Installing it is optional, but can lead to faster inference.

pip install flash_attn==2.6.1

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-small-english-r2"
# 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. The model produces unnormalized vectors. If your task requires normalized embeddings pass normalize_embeddings=True to encode as below.
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-small-english-r2 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-small-english-r2"

# 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-278m-multilingual uses CLS Pooling
    query_embeddings = model_output[0][:, 0]

# normalize the embeddings
query_embeddings = torch.nn.functional.normalize(query_embeddings, dim=1)

Evaluation Results

Granite embedding r2 models show a strong performance across tasks diverse tasks.

Performance of the granite models on MTEB Retrieval (i.e., BEIR), MTEB-v2, code retrieval (CoIR), long-document search benchmarks (MLDR, LongEmbed), conversational multi-turn (MTRAG), table retrieval (NQTables, OTT-QA, AIT-QA, MultiHierTT, OpenWikiTables), benchmarks is reported in the below tables.

The average speed to encode documents on a single H100 GPU using a sliding window with 512 context length chunks is also reported. Nearing encoding speed of 200 documents per second granite-embedding-small-english-r2 demonstrates speed and efficiency, while mainintaining competitive performance.

Model Parameters (M) Embedding Size BEIR Retrieval (15) MTEB-v2 (41) CoIR (10) MLDR (En) MTRAG (4) Encoding Speed (dosc/sec)
granite-embedding-125m-english 125 768 52.3 62.1 50.3 35.0 49.4 149
granite-embedding-30m-english 30 384 49.1 60.2 47.0 32.6 48.6 198
granite-embedding-english-r2 149 768 53.1 62.8 55.3 40.7 56.7 144
granite-embedding-small-english-r2 47 384 50.9 61.1 53.8 39.8 48.1 199
Model Parameters (M) Embedding Size AVERAGE MTEB-v2 Retrieval (10) CoIR (10) MLDR (En) LongEmbed (6) Table IR (5) MTRAG (4) Encoding Speed (docs/sec)
e5-small-v2 33 384 45.39 48.5 47.1 29.9 40.7 72.31 33.8 138
bge-small-en-v1.5 33 384 45.22 53.9 45.8 31.4 32.1 69.91 38.2 138
granite-embedding-english-r2 149 768 59.5 56.4 54.8 41.6 67.8 78.53 57.6 144
granite-embedding-small-english-r2 47 384 55.6 53.9 53.4 40.1 61.9 75.51 48.9 199

Model Architecture and Key Features

The latest granite embedding r2 release introduces two English embedding models, both based on the ModernBERT architecture:

  • granite-embedding-english-r2 (149M parameters): with an output embedding size of 768, replacing granite-embedding-125m-english.
  • granite-embedding-small-english-r2 (47M parameters): A first-of-its-kind reduced-size model, with fewer layers and a smaller output embedding size (384), replacing granite-embedding-30m-english.

The following table shows the structure of the two models:

Model granite-embedding-small-english-r2 granite-embedding-english-r2
Embedding size 384 768
Number of layers 12 22
Number of attention heads 12 12
Intermediate size 1536 1152
Activation Function GeGLU GeGLU
Vocabulary Size 50368 50368
Max. Sequence Length 8192 8192
# Parameters 47M 149M

Training and Optimization

The granite embedding r2 models incorporate key enhancements from the ModernBERT architecture, including:

  • Alternating attention lengths to accelerate processing
  • Rotary position embeddings for extended sequence length
  • A newly trained tokenizer optimized with code and text data
  • Flash Attention 2.0 for improved efficiency
  • Streamlined parameters, eliminating unnecessary bias terms

Data Collection

Granite embedding r2 models are trained using data from 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
  4. IBM-generated synthetic data

Notably, we do not use the popular MS-MARCO retrieval dataset in our training corpus due to its non-commercial license (many open-source models use this dataset due to its high quality).

The underlying encoder models using GneissWeb, an IBM-curated dataset composed exclusively of open, commercial-friendly sources.

For governance, all our data undergoes a data clearance process subject to technical, business, and governance review. This comprehensive process captures critical information about the data, including but not limited to their content description ownership, intended use, data classification, licensing information, usage restrictions, how the data will be acquired, as well as an assessment of sensitive information (i.e, personal information).

Infrastructure

We trained the granite embedding english r2 models using IBM's computing cluster, BlueVela Cluster, which is outfitted with NVIDIA H100 80GB GPUs. This cluster provides a scalable and efficient infrastructure for training our models over multiple GPUs.

Ethical Considerations and Limitations

Granite-embedding-small-english-r2 leverages both permissively licensed open-source and select proprietary data for enhanced performance. The training data for the base language model was filtered to remove text containing hate, abuse, and profanity. Granite-embedding-small-english-r2 is trained only for English texts, and has a context length of 8192 tokens (longer texts will be truncated to this size).

  • ⭐️ Learn about the latest updates with Granite: https://www.ibm.com/granite
  • 📄 Get started with tutorials, best practices, and prompt engineering advice: https://www.ibm.com/granite/docs/
  • 💡 Learn about the latest Granite learning resources: https://ibm.biz/granite-learning-resources

Citation

@misc{awasthy2025graniteembeddingr2models,
      title={Granite Embedding R2 Models}, 
      author={Parul Awasthy and Aashka Trivedi and Yulong Li and Meet Doshi and Riyaz Bhat and Vignesh P and Vishwajeet Kumar and Yushu Yang and Bhavani Iyer and Abraham Daniels and Rudra Murthy and Ken Barker and Martin Franz and Madison Lee and Todd Ward and Salim Roukos and David Cox and Luis Lastras and Jaydeep Sen and Radu Florian},
      year={2025},
      eprint={2508.21085},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2508.21085}, 
}

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:3c8f93d9db9a91d1c6ac8cb39941e6e52464eeca&dn=ibm-granite_granite-embedding-small-english-r2

Open magnet in torrent client · infohash 3c8f93d9db9a91d1c6ac8cb39941e6e52464eeca

Files & hashes

PathSizesha1sha256
1_Pooling/config.json191 B (191 B)7bee187588eb931bb73f2ccf257e06f09d52a8a47fae3727656cff4a760964a58f1e4b31695c97c75d2e26346df32a87d494bbca
README.md12.1 KB (12,373 B)cd0cf62b93717e48db1f9f2adb93059b7372d2552cf921ebf63fc2421584205d1ad7c4eb2b3c6a0b3bfb964e84e3dfb82103e7fb
config.json1.3 KB (1,315 B)8e739547c8ba5895d15a19e43b38e36dede8f1bf154518e6452854eb11123ce433d165f2773437aa0f36935d2204249b2c327198
model.safetensors90.9 MB (95,332,048 B)9043591b86eb24fc1060dc48ca8e4a3ee2ab541cdcbfaf2ee50d358763cbc0c08e5b045ecbf6aeb02dc0e86ffb910029bf9ebb5f
modules.json230 B (230 B)2c787222b8b9fc64a5a5c6bcf7506e2c4906bec50580fad756940809b1bc064ce1e7c1275c8b0dd80869562fe0abeb6f7059cb97
pytorch_model.bin90.9 MB (95,334,202 B)723977cb9e099eab1b1ea821fc1052fa8027db4b189cd50b38b2b3ee6c8d03b76a7dfd4574f27d023294c75c105a725b8ad484b6
sentence_bert_config.json55 B (55 B)b3030f4edaca7791ed3d3bfd6dd41bb25b54718c23aa234ef6021d513cdf56947c07aaa6977000d85dcd1fd423f650b3382a39ca
special_tokens_map.json694 B (694 B)6bf65ea14185a88eef7e24b41c86a953a58dcbadea97ecdbcc73713039d8d64dbb05e3689495c96657fbd9a18f5bed381be81049
tokenizer.json3.4 MB (3,583,228 B)2f4d8583e507b7466d2490e2d6c045647a8226986c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30
tokenizer_config.json20.3 KB (20,836 B)d58c30c7a9f85b40896fd7973a11b24581ab60d7c16f1b07f93d05be753ec0acf8cb511d895a8bdb09669f6b156df81e3f96c2eb

Cite this release

Canonical URL
https://aiseedbank.org/models/ibm-granite_granite-embedding-small-english-r2/
Slug
ibm-granite_granite-embedding-small-english-r2
Infohash
3c8f93d9db9a91d1c6ac8cb39941e6e52464eeca
License
apache-2.0
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: ibm-granite_granite-embedding-small-english-r2.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositoryibm-granite/granite-embedding-small-english-r2
Revision (pinned)2ab6fa8ea2d674564defd37171ae19079b864b33
Fetched at2026-09-04T00:40:21Z
License at fetchapache-2.0
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-04T00:40:26Z

apache-2.0185.3 MB (194,285,172 bytes)sentence-transformerspytorchsafetensorsmodernbertfeature-extractiongraniteembeddingstransformersmtebtext-embeddings-inferenceendpoints_compatible1 language (en)paper: 2508.21085