/ Модель

Характеристики

Контекст
8 192 токена
Параметры
47,7 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Библиотека
sentence-transformers
Опубликована
17 июл 2025

granite-embedding-small-english-r2

ЭмбеддингиТекст → embedding10 профессий

Компактная англоязычная модель IBM на базе ModernBERT, которая создаёт векторные представления текста для семантического поиска и сопоставления.

5,2 млнскачиваний за 30 дней97лайковвеса обновлены21 янв 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки34

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

  • CUREv1

    main_score

    Результат

    0,1767

    Общий результат 0,2653Общий результат 0,1764
    MTEB

    Публичная таблицадругая ревизия

  • TwentyNewsgroupsClustering.v2

    main_score

    Результат

    0,4477

    MTEB

    Публичная таблицадругая ревизия

  • MemBench

    main_score

    Результат

    0,8022

    MTEB

    Публичная таблицадругая ревизия

  • WikiSQLRetrieval

    main_score

    Результат

    0,9329

    MTEB

    Публичная таблицадругая ревизия

  • EPBench

    main_score

    Результат

    0,8868

    Общий результат 1Общий результат 1Общий результат 1
    MTEB

    Публичная таблицадругая ревизия

  • LongMemEval

    main_score

    Результат

    0,6373

    MTEB

    Публичная таблицадругая ревизия

  • TMD

    main_score

    Результат

    0,3628

    MTEB

    Публичная таблицадругая ревизия

  • EnglishFinance3Retrieval

    main_score

    Результат

    0,6535

    MTEB

    Публичная таблицадругая ревизия

  • RedditClusteringP2P

    main_score

    Результат

    0,5492

    MTEB

    Публичная таблицадругая ревизия

  • TweetSentimentExtractionClassification

    main_score

    Результат

    0,5005

    MTEB

    Публичная таблицадругая ревизия

  • MIRACLRetrievalHardNegatives

    main_score

    Результат

    0,345

    Общий результат 0,2911Общий результат 0,0117
    MTEB

    Публичная таблицадругая ревизия

  • SummEvalSummarization.v2

    main_score

    Результат

    0,2674

    MTEB

    Публичная таблицадругая ревизия

  • MedrxivClusteringS2S

    main_score

    Результат

    0,3261

    MTEB

    Публичная таблицадругая ревизия

  • LEMBPasskeyRetrieval

    main_score

    Результат

    1

    Общий результат 0,9
    MTEB

    Публичная таблицадругая ревизия

  • MultiSWEbenchRR

    main_score

    Результат

    0,5218

    MTEB

    Публичная таблицадругая ревизия

  • LMEB_SciFact

    main_score

    Результат

    0,7613

    MTEB

    Публичная таблицадругая ревизия

  • STS15

    main_score

    Результат

    0,8386

    MTEB

    Публичная таблицадругая ревизия

  • CodeSearchNetCCRetrieval

    main_score

    Результат

    0,5333

    MTEB

    Публичная таблицадругая ревизия

  • SWEbenchMultilingualRR

    main_score

    Результат

    0,425

    MTEB

    Публичная таблицадругая ревизия

  • DS1000Retrieval

    main_score

    Результат

    0,4331

    MTEB

    Публичная таблицадругая ревизия

  • CodeEditSearchRetrieval

    main_score

    Результат

    0,6048

    Общий результат 0,606Общий результат 0,594
    MTEB

    Публичная таблицадругая ревизия

  • CodeTransOceanContest

    main_score

    Результат

    0,7763

    MTEB

    Публичная таблицадругая ревизия

  • ReMe

    main_score

    Результат

    0,5623

    MTEB

    Публичная таблицадругая ревизия

  • NQ

    main_score

    Результат

    0,5537

    MTEB

    Публичная таблицадругая ревизия

  • MemGovern

    main_score

    Результат

    0,9302

    Общий результат 0,9143Общий результат 0,9086
    MTEB

    Публичная таблицадругая ревизия

  • STS17

    main_score

    Результат

    0,8518

    MTEB

    Публичная таблицадругая ревизия

  • COIRCodeSearchNetRetrieval

    main_score

    Результат

    0,5012

    MTEB

    Публичная таблицадругая ревизия

  • LoCoMo

    main_score

    Результат

    0,2376

    MTEB

    Публичная таблицадругая ревизия

  • STS22.v2

    main_score

    Результат

    0,6685

    MTEB

    Публичная таблицадругая ревизия

  • HotpotQAHardNegatives

    main_score

    Результат

    0,6623

    MTEB

    Публичная таблицадругая ревизия

  • Touche2020

    main_score

    Результат

    0,2417

    MTEB

    Публичная таблицадругая ревизия

  • ProceduralMemBench

    main_score

    Результат

    0,4384

    MTEB

    Публичная таблицадругая ревизия

  • PeerQA

    main_score

    Результат

    0,2907

    MTEB

    Публичная таблицадругая ревизия

  • MassiveIntentClassification

    main_score

    Результат

    0,6708

    MTEB

    Публичная таблицадругая ревизия

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Granite-Embedding-Small-English-R2 — плотная модель эмбеддингов из семейства Granite Embeddings, разработанная командой Granite Embedding Team в IBM. Она преобразует английские запросы, фрагменты и документы в векторы размером 384, предназначенные для сравнения по косинусному сходству и использования в поиске и извлечении информации.

Модель использует архитектуру биэнкодера на базе ModernBERT: 12 слоёв и 12 голов внимания. Она содержит 47,7 млн параметров и поддерживает контекст до 8192 токенов. В обучении применялись ориентированное на поиск предварительное обучение, контрастивное дообучение, дистилляция и объединение моделей; заявлены результаты на бенчмарках поиска по документам, коду, таблицам и многоходовым диалогам.

Модель предназначена для английского текста. Тексты длиннее 8192 токенов обрезаются; для других языков качество не заявлено. Лицензия — Apache 2.0.

Сценарии применения

  • Семантический поиск по англоязычным документам
  • Извлечение релевантных фрагментов для RAG
  • Поиск похожих текстов и запросов
  • Поиск по исходному коду
  • Поиск сведений в таблицах и длинных документах

Ограничения

Модель обучена для английского текста, поэтому качество на других языках не заявлено. Вход длиннее 8192 токенов обрезается.

Для каких профессий подходит10

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

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

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.

ModelParameters (M)Embedding SizeBEIR Retrieval (15)MTEB-v2 (41)CoIR (10)MLDR (En)MTRAG (4)Encoding Speed (dosc/sec)
granite-embedding-125m-english12576852.362.150.335.049.4149
granite-embedding-30m-english3038449.160.247.032.648.6198
granite-embedding-english-r214976853.162.855.340.756.7144
granite-embedding-small-english-r24738450.961.153.839.848.1199
ModelParameters (M)Embedding SizeAVERAGEMTEB-v2 Retrieval (10)CoIR (10)MLDR (En)LongEmbed (6)Table IR (5)MTRAG (4)Encoding Speed (docs/sec)
e5-small-v23338445.3948.547.129.940.772.3133.8138
bge-small-en-v1.53338445.2253.945.831.432.169.9138.2138
granite-embedding-english-r214976859.556.454.841.667.878.5357.6144
granite-embedding-small-english-r24738455.653.953.440.161.975.5148.9199

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:

Modelgranite-embedding-small-english-r2granite-embedding-english-r2
Embedding size384768
Number of layers1222
Number of attention heads1212
Intermediate size15361152
Activation FunctionGeGLUGeGLU
Vocabulary Size5036850368
Max. Sequence Length81928192
# Parameters47M149M

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).

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}, 
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
ModernBertModel
Ревизия весов
2ab6fa8

0 моделей