ModelIBM (Granite)IBM (Granite)published Apr 16, 2026seen 5d

ibm-granite/granite-vision-4.1-4b

Open original ↗

Captured source

source ↗
published Apr 16, 2026seen 5dcaptured 15hhttp 200method plaintask image-text-to-textlicense apache-2.0library transformersparams 4Bdownloads 200klikes 87

Granite-Vision-4.1-4B

Model Summary: Granite Vision 4.1 4B is a vision-language model (VLM) that delivers frontier-level performance on structured document extraction tasks — chart extraction, table extraction, and semantic key-value pair extraction — in a compact 4B parameter footprint, providing a lightweight alternative to much larger frontier models for these tasks:

  • Chart extraction: Converting charts into structured, machine-readable formats (Chart2CSV, Chart2Summary, and Chart2Code)
  • Table extraction: Accurately extracting tables with complex layouts from document images to JSON, HTML, or OTSL
  • Semantic Key-Value Pair (KVP) extraction: Extracting values based on key names and descriptions across diverse document layouts

The model is finetuned on top of Granite-4.1-3B, with a 3.4B LLM and 0.6B Vision Encoder and Projectors. See [Model Architecture](#model-architecture) for details.

The methodology and data (ChartNet) used for this model are described in the paper ChartNet: A Million-Scale, High-Quality Multimodal Dataset for Robust Chart Understanding.

While our focus is on specialized document extraction tasks, the current model preserves and extends the capabilities of Granite Vision 4.0 3B, ensuring that existing users can adopt it seamlessly with no changes to their workflow. It continues to support vision‑language tasks such as producing detailed natural‑language descriptions from images (image‑to‑text). The model can be used standalone and integrates seamlessly with Docling to enhance document processing pipelines with deep visual understanding capabilities.

  • Developer: IBM Research
  • GitHub Repository: https://github.com/ibm-granite
  • Release Date: April 29th, 2026
  • License: Apache 2.0

Supported Tasks

The model supports specialized extraction tasks, each activated by a simple task tag in the user message. The chat template automatically expands tags into the full prompt — no need to write verbose instructions.

| Tag | Task | Output | |-----|------|--------| | ` | Chart to CSV | CSV table with headers and numeric values | | | Chart to Python code | Python code that recreates the chart | | | Chart to summary | Natural-language description of the chart | | | Table extraction (JSON) | Structured JSON with dimensions and cells | | | Table extraction (HTML) | HTML markup | | ` | Table extraction (OTSL) | OTSL markup with cell/merge tags | | KVP (see prompt instructions below) | Schema based Key-Value pairs extraction | JSON with nested dictionaries and arrays |

Model Performance

Benchmark Results

Granite Vision 4.1 4B provides a lightweight alternative to frontier models on structured document extraction benchmarks, delivering comparable performance at a fraction of the parameter count.

Chart Extraction

We evaluate chart extraction using the human-verified test-set from ChartNet. Models are scored by LLM-as-a-judge (GPT4o) comparing predictions against ground truth. We report average scores (0–100) on Chart2CSV and Chart2Summary tasks.

Table Extraction

To benchmark table extraction, we construct a unified evaluation suite spanning multiple datasets and settings to assess end-to-end table extraction capabilities of vision-language models:

1. [TableVQA-Extract](https://github.com/naver-ai/tablevqabench) — Converts the original visual table QA benchmark into a cropped table extraction task. 2. [OmniDocBench-tables](https://github.com/opendatalab/OmniDocBench) — A document parsing benchmark over diverse PDF types with detailed annotations for layout, text, formulas, and tables. We use the subset of pages that contain one or more tables to evaluate table extraction in full-page settings. 3. [PubTablesV2](https://huggingface.co/datasets/kensho/PubTables-v2) — A large-scale table extraction benchmark evaluated in both cropped-table and full-page document settings.

To unify evaluation, we replace each dataset’s original annotations (e.g., Q&A pairs) with a single instruction: *extract the table(s) from the image in HTML format*, using the corresponding HTML as ground truth. For full-page inputs, only tabular elements are considered; when multiple tables appear, they are aggregated into a Python list.

We report results using TEDS (Tree-Edit Distance-based Similarity), which measures structural and content similarity between predicted and ground-truth HTML tables.

Results are presented separately for cropped-table and full-page settings to highlight performance across controlled and realistic document scenarios.

Key-Value Pair (KVP) Extraction

We evaluate on VAREX, a benchmark for multimodal structured extraction from documents. Granite Vision 4.1 4B achieves 94.2% exact-match accuracy (zero-shot), competitive with much larger frontier models (view results here).

Setup

Tested with python=3.11

pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cu128
pip install transformers>=5.8.0 peft>=0.19.1 tokenizers>=0.22.2 pillow>=12.2.0

Requires transformers>=5.8.0 for native support. On older versions, pass trust_remote_code=True to both from_pretrained calls to use the bundled legacy modeling code.

Usage with Transformers

import re
from io import StringIO

import pandas as pd
import torch
from transformers import AutoProcessor, AutoModelForImageTextToText
from PIL import Image
from huggingface_hub import hf_hub_download

model_id = "ibm-granite/granite-vision-4.1-4b"
device = "cuda" if torch.cuda.is_available() else "cpu"

processor = AutoProcessor.from_pretrained(model_id)
processor.tokenizer.padding_side = "left" # required for correct batched generation
model = AutoModelForImageTextToText.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map=device
).eval()

def run_inference(model, processor, images, prompts):
"""Run batched inference on image+prompt pairs (one image per prompt)."""
conversations = [
[{"role": "user", "content": [
{"type": "image"},
{"type": "text", "text": prompt},
]}]
for prompt in prompts
]
texts = […

Excerpt shown — open the source for the full document.

Notability

notability 8.0/10

New vision model from IBM, strong downloads.