Granite Embedding R2 Models

Parul Awasthy, Aashka Trivedi, Yulong Li, Meet Doshi, Riyaz A. Bhat, Vignesh P, Vishwajeet Kumar, Yushu Yang, Bhavani Iyer, Abraham Daniels, Rudra Murthy, Ken Barker, Martin Franz, Madison Lee, Todd Ward, Salim Roukos, David Cox, Luis A. Lastras, Jaydeep Sen, Radu FlorianarXiv 2025 · DOI

Abstract

IBM Research has released the Granite Embedding R2 family, a set of open-source (Apache 2.0) encoder-based models designed specifically for enterprise-grade retrieval-augmented generation (RAG). These models offer a 16x expansion in context length (up to 8,192 tokens) and a significant speed advantage—processing documents 19-44% faster than leading competitors—while setting new performance benchmarks across text, code, and tabular data.

Introduction

In production RAG environments, developers frequently encounter a "trilemma" involving context length, inference speed, and licensing. Many existing embedding models are constrained by a 512-token context window, limiting their utility for long-document search. Conversely, models supporting longer contexts often suffer from prohibitive inference latency or restrictive non-commercial licenses. Furthermore, standard models often struggle with "non-standard" enterprise data, such as complex tables or multi-turn conversational histories. The Granite R2 models address these challenges by providing a high-speed, long-context, and commercially permissive solution explicitly trained for diverse corporate data types.

Methodology and Architecture

The Granite R2 models are built upon the ModernBERT architecture, an encoder-only transformer utilizing Flash Attention and alternating global/local attention layers. The training pipeline consists of four distinct stages:

  1. Retrieval-Oriented Pre-training: Employs a RetroMAE (Masked Auto-Encoder) approach for robust representation learning.
  2. Novel Tabular Pre-training: A modified RetroMAE objective forces the encoder to align table structures with natural language by reconstructing masked table tokens from contextual embeddings and summaries.
  3. Contrastive Fine-tuning: Standard query-passage pair training using an improved contrastive loss.
  4. Contrastive Distillation: A final polishing stage where models learn to mimic the similarity score distribution of a larger teacher model (Mistral-7B-Instruct).
Architectural specifications for Granite R2 encoder models, highlighting the 80k RoPE theta value.

The release includes two bi-encoders (149M and 47M parameters) and a 149M parameter cross-encoder reranker utilizing a list-wise ranking objective (PListMLE) to refine search results.

Evaluation and Datasets

Training was conducted on a massive 2-trillion-token corpus, including GneissWeb, CodePile, and curated internal technical documents. Evaluation spanned a comprehensive battery of benchmarks:

  • MTEB-v2 & BEIR: General English text retrieval.
  • COIR: Code-to-code and text-to-code retrieval.
  • MLDR & LongEmbed: Long-context document search.
  • Table-IR: Structured data retrieval (e.g., OpenWikiTables, AIT-QA).
  • MT-RAG: Multi-turn conversational retrieval.

Key Results and Insights

The Granite R2 models demonstrate superior performance and efficiency across all tested domains. The base model (149M) is approximately 20% faster than comparable models like BGE-base, while the small model (47M) offers a 44% speed advantage.

Average retrieval performance of Granite R2 models compared to industry baselines across six benchmarks.

Key insights from the development process include:

  • Efficiency via Architecture: ModernBERT and Flash Attention allow the R2 models to maintain the speed of their predecessors despite increased parameter counts.
  • Optimizing RoPE: A Rotary Positional Embedding (RoPE) theta value of 80k was identified as the optimal configuration for the 8k context window, balancing long-context capability with short-task performance.
  • Tabular Alignment: Treating tables as first-class citizens during pre-training significantly boosted structured data retrieval.

Conclusion and Future Work

While the Granite R2 models set a new standard for English-language enterprise RAG, future work will focus on expanding language support and closing the zero-shot gap on specific long-context benchmarks through targeted fine-tuning. Scaling to even larger context windows and multilingual capabilities remains a priority for supporting global enterprise use cases.

Summary updated

BibTeX
@misc{awasthy2025granite,
  author = {Parul Awasthy and Aashka Trivedi and Yulong Li and Meet Doshi and Riyaz A. 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 A. Lastras and Jaydeep Sen and Radu Florian},
  title = {{Granite Embedding R2 Models}},
  year = {2025},
  eprint = {2508.21085},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.21085},
}
Figure