AIARTICLE

5 min read

Granite Embedding Vision R2 searches documents by image without OCR, with an open 748M-parameter model

Granite Embedding Vision R2 searches documents by image without OCR, with an open 748M-parameter model
Image: Alan Andrade
Article · AI
Reading
5 min
Tables
1
Code
1
In short

IBM published an open-source visual embedding model that indexes PDF pages directly from the image, without going through OCR. With an Apache 2.0 license and 748 million parameters, it promises predictable speed and GPU cost for those building RAG in production.

The problem the model solves

Much of the most useful content in a corporate PDF isn't running text: it's a chart, a financial table, or a scanned page. Traditional RAG pipelines depend on OCR, layout detection, and table extraction before indexing anything, and each step discards information. A bar chart becomes a caption; a complex table becomes loose rows out of context.

Granite Embedding Vision R2, published by IBM on the Hugging Face blog on November 30, 2026, tackles the problem differently: instead of converting the page to text before indexing, it embeds the image of the whole page, as it is. The model has 748 million parameters, is released under the Apache 2.0 license, and can be downloaded and run locally, without depending on a closed API to generate embeddings.

Granite Embedding Vision R2 searches page images without OCR, using one 748M-parameter model for fast single and multi-vector search or reranking.

Granite Embedding Team, IBM

Three ways to search in a single forward pass

Each page passes through the model once and comes out with two ready representations: a single 768-dimensional vector (1.5 KiB per page) for fast, cheap search, and about 600 smaller 128-dimensional vectors that align query words with specific regions of the page. This opens up three search paths, chosen according to the vector database and storage budget available:

  • Multi-vector search: databases like Milvus 3.0, Qdrant, and Weaviate already know how to score per-page vector lists with MaxSim natively, so you can index the multi-vectors directly.
  • Single-vector search: a 768-dimensional vector per page works in any common vector database, with the lowest storage cost.
  • Hybrid search: the single vector filters a short list of candidates, and the stored multi-vectors do the reranking only on that list, working with any vector database, without requiring native MaxSim support.

Since both representations come from the same forward pass, you can switch strategies without reprocessing the entire collection.

Why it's fast: the architecture underneath

Three design decisions explain the speed gain. The vision tower uses the NaFlex technique, which reads at most 2,880 patches per page while respecting the image's original aspect ratio, instead of forcing each page into a fixed grid of tiles. Next, a Window Q-Former reduces visual tokens by 4x, so that an entire page becomes about 600 tokens before reaching the text encoder. That encoder is a compact ModernBERT, with just 110 million parameters.

With this combination, and using FlashAttention-2 (enabled by default when installed), IBM measured 35.3 pages per second on a single NVIDIA H200 GPU, the highest rate among the 20 visual retrieval models tested on the same harness, with a batch size of 32. At scale, this means indexing a million pages in about eight hours on a single H100, not counting PDF rendering or index construction.

What the benchmarks show (and what they don't)

Speed alone solves nothing if the search gets the page wrong. IBM reports an average nDCG of 0.721 across eight benchmarks (including ViDoRe v1, v2, and v3, Real-MM-RAG, JinaVDR, and VisDocOOD), using the multi-vector head. Among the tested models with fewer than 1 billion parameters, Granite ranks second on this metric.

ModelAverage nDCGSpeed (pages/s)Index per page
Granite Embedding Vision R20.72135.3~149 KiB
pplx-embed-v2-late-0.6b0.75317.4~370 KiB (2.5x larger)
VultronRetrieverFlash0.71017.1~715 KiB (4.8x larger)

In other words: those who need the highest possible nDCG among small models have a better option than Granite. Those who need to index millions of pages fast, with a small and predictable index, get a combination of speed and index size from this model that neither competitor offers at the same time. Compression techniques widen this advantage further: pooling down to 128 vectors per page reduces the multi-vector index by 78%, keeping 98.8% of the quality, and int8 quantization cuts the index in half with no measurable loss.

Searching across multiple languages and poor scans

IBM tested the model with queries in one language against documents written in another, such as a question in German about a report in English, or one in Japanese about an invoice in Spanish, plus synthetic versions of degraded scans (noise, blur, skew). Across the 20 tests performed, the correct page ranked first in every case.

IBM itself is cautious in describing this result: according to the report, these are illustrative examples, not systematic proof of multilingual robustness or robustness to poor scans, for which the broader benchmarks cited in the previous section apply. Even so, the test is a signal that the model associates semantic content with the page image, not just with the text it can recognize in it.

How to use it

The model requires the sentence-transformers library version 6 or higher, loaded via the MultiVectorEncoder class; loading with SentenceTransformer discards the multi-vector head:

python
from pathlib import Path
import torch
from PIL import Image
from sentence_transformers import MultiVectorEncoder

model = MultiVectorEncoder(
    "ibm-granite/granite-embedding-748m-vision-r2",
    trust_remote_code=True,
    model_kwargs={"torch_dtype": torch.bfloat16},
)

# Load all page images from the folder
paths = sorted(p for p in Path("images").iterdir() if p.suffix.lower() in {".png", ".jpg", ".jpeg"})
pages = [Image.open(p).convert("RGB") for p in paths]

query = "What do elephants use their trunks and tusks for?"
q_out = model.encode_query([query], output_value=None)
d_out = model.encode_document(pages, output_value=None)

From there, the single vector is available in sentence_embedding and the multi-vector tokens in token_embeddings, filtered by the attention_mask attention mask. The model is also compatible, at the single-vector level, with existing indexes from granite-embedding-311m-multilingual-r2: you can keep an old text index intact and just add image pages, as long as queries are encoded by the vision model.

Why it matters for those building RAG in Brazil

The core promise here isn't just technical: the Apache 2.0 license and open weights mean running the embedding on your own infrastructure, without network latency, without rate limits, and without revisiting a contract every time document volume grows. For teams handling sensitive documents (contracts, tax invoices, medical records), this also removes the need to send page images to a third-party API just to generate a vector.

The trade-off is operational: running the model locally requires a GPU and the pipeline engineering (PDF rendering, index construction, vector database choice) that a closed API abstracts away. For those who already pay for a multimodal embedding API and just need to search documents reliably, migrating makes sense when volume justifies the fixed cost of a GPU. The roughly eight-hour H100 calculation to index a million pages, cited by IBM itself, is the concrete number to put into the spreadsheet for this decision.

Translated from the Brazilian Portuguese original · Read the original

View profile →