Model Summary:
Granite-4.0-3B-Vision is a vision-language model (VLM) designed for enterprise-grade
document data extraction. It focuses on specialized, complex extraction tasks that
ultracompact models often struggle with:
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 delivered as a LoRA adapter on top of
Granite 4.0 Micro
, enabling a single
deployment to support both multimodal document understanding and text-only workloads —
the base model handles text-only requests without loading the adapter. See
Model Architecture
for details.
While our focus is on specialized document extraction tasks, the current model preserves and extends the
capabilities of Granite-Vision-3.3 2B, 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.
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
<chart2csv>
Chart to CSV
CSV table with headers and numeric values
<chart2code>
Chart to Python code
Python code that recreates the chart
<chart2summary>
Chart to summary
Natural-language description of the chart
<tables_json>
Table extraction (JSON)
Structured JSON with dimensions and cells
<tables_html>
Table extraction (HTML)
HTML
<table>
markup
<tables_otsl>
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
We compare Granite-4.0-3B-Vision against leading small VLMs across multiple extraction
benchmarks.
Chart Extraction
We evalute chart extraction using the human-verified test-set from
ChartNet
.
The models are evaluated using LLM-as-a-judge (GPT4o) comparing the model prediction against the ground-truth.
We report the average scores 0-100 on chart2csv and chart2summary extraction tasks.
Table Extraction
To benchmark table extraction, we constructed a unified evaluation suite comprising 2 public datasets, adapted to assess the end-to-end table extraction capabilities of vision-language models:
TableVQA-Bench
— A visual table QA benchmark derived from existing table QA and structure recognition datasets, covering both real and synthetic tables.
OmniDocBench
— A document parsing benchmark spanning diverse PDF document types, with detailed annotations for layout, text, formulas, and tables.
The unified benchmark includes 2,000 cropped table images from TableVQA-Bench, and 112 full pages that include tables from OmniDocBench. To construct it, we replaced each dataset's original Q&A pairs with a single instruction:
extract the table from the image in HTML format
, using the corresponding HTML table as the ground truth. For OmniDocBench, only tabular elements were retained; when multiple tables appeared on the same page, they were aggregated into a single Python list, and the extraction instruction was updated to request a list of HTML tables accordingly. The metric used for evaluation is
TEDS
.
Key-Value Pair (KVP) Extraction
We evaluate on
VAREX
, a benchmark for
multimodal structured extraction from documents. Granite-4.0-3B-Vision achieves
85.5% exact-match accuracy (zero-shot), ranking 3rd among 2–4B
parameter models as of March 2026 (view results
here
).
For KVP extraction use the
VAREX
prompt format. Provide a JSON Schema describing the fields to extract and the model will return a JSON object with the extracted values.
import json
invoice_path = hf_hub_download(repo_id=model_id, filename="invoice.png")
invoice_img = Image.open(invoice_path).convert("RGB")
schema = {
"type": "object",
"properties": {
"invoice_date": {"type": "string", "description": "The date the invoice was issued"},
"order_number": {"type": "string", "description": "The unique identifier for the order"},
"seller_tax_id": {"type": "string", "description": "The tax identification number of the seller"},
}
}
prompt = f"""Extract structured data from this document.Return a JSON object matching this schema:{json.dumps(schema, indent=2)}Return null for fields you cannot find.Return ONLY valid JSON.Return an instance of the JSON with extracted values, not the schema itself."""
result = run_inference(model, processor, [invoice_img], [prompt])[0]
print(result)
Usage with vLLM
This model includes a custom vLLM implementation (
granite4_vision.py
) and a server launcher
(
start_granite4_vision_server.py
) that register the model using vLLM's
out-of-tree model integration
—no need to build vLLM from source.
vLLM applies the LM LoRA dynamically per request. Text-only prompts use the pure base model, while image prompts apply the LoRA adapter at inference time.
Query the running server using the OpenAI-compatible API:
import base64
from openai import OpenAI
from huggingface_hub import hf_hub_download
from PIL import Image
model_id = "ibm-granite/granite-4.0-3b-vision"
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
defrun_inference(client, model_id, image_path, tag):
withopen(image_path, "rb") as f:
image_b64 = base64.b64encode(f.read()).decode("utf-8")
messages = [
{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_b64}"}},
{"type": "text", "text": tag},
]}
]
response = client.chat.completions.create(
model=model_id, messages=messages, max_tokens=4096, temperature=0,
)
return response.choices[0].message.content
chart_path = hf_hub_download(repo_id=model_id, filename="chart.jpg")
table_path = hf_hub_download(repo_id=model_id, filename="table.png")
# Chart tasksfor tag in ["<chart2csv>", "<chart2summary>", "<chart2code>"]:
result = run_inference(client, model_id, chart_path, tag)
print(f"{tag}:\n{result}\n")
# Table tasksfor tag in ["<tables_json>", "<tables_html>", "<tables_otsl>"]:
result = run_inference(client, model_id, table_path, tag)
print(f"{tag}:\n{result}\n")
Training Data
The model was fine-tuned on a curated mixture of extraction-focused datasets spanning
chart understanding, complex table parsing, and document KVP extraction, supplemented
by the general-purpose
Granite Vision instruction-following dataset
for broad visual understanding.
Chart understanding data was created through a novel code‑guided augmentation methodology that produces diverse,
semantically aligned chart samples containing rendering code, chart images, underlying data CSVs, and natural‑language summaries.
Using this pipeline, we are also releasing
ChartNet
, a comprehensive million‑scale multimodal dataset enriched with real‑world,
human‑annotated, safety, and grounding subsets. The dataset and its methodology are detailed in our
CVPR 2026 paper
.
Model Architecture
SigLIP2 Vision encoder:
google/siglip2-so400m-patch16-384
. Input images are tiled into 384×384 patches (with a base downscaled view always included), and each tile is encoded independently.
Window Q-Former projectors:
Visual features are compressed 4× using windowed Q-Former projectors: each 4×4 patch window is reduced to 2×2 tokens via cross-attention, where the queries are initialized from a downsampled version of the window features. This reduces the visual token count fed to the LLM.
Deepstack
injection:
Visual features are additively injected into the LLM hidden states at multiple layers through two complementary mechanisms:
LayerDeepstack:
Features from 4 vision encoder depths are each projected and injected into a different LLM layer. The Q-Former queries are initialized from downsampled features. The mapping is reversed — the deepest (most semantic) vision features feed the earliest LLM layers, providing strong semantic grounding from the start.
SpatialDeepstack:
The deepest vision features at full resolution are split into 4 complementary spatial groups. Each group's Q-Former queries are initialized from the corresponding spatial subset, and injected at a separate later LLM layer, providing fine-grained spatial detail.
In total,
8 vision-to-LLM injection points
distribute visual information across the network for stronger visual grounding.
Language model:
Granite 4.0 Micro (3B) with LoRA (rank 256) across all self-attention projections and MLP layers.
Supported input:
English instructions and images (PNG, JPEG).
Infrastructure
Granite 4.0 Vision was trained on IBM's Blue Vela supercomputing cluster, outfitted with
NVIDIA H100 GPUs. The training was done on 32 GPUs for approximately 200 hours.
Ethical Considerations and Limitations
The use of vision-language models involves certain risks that should be considered before
deployment:
Task scope:
The model is specifically designed for structured extraction tasks and
may not generalize well to open-ended vision-language tasks.
Hallucination:
As with all generative models, outputs should be validated before
use in automated pipelines, particularly for high-stakes document processing.
Language:
The model is trained on English instructions only and may produce
degraded results for documents in other languages.
To enhance safety in enterprise deployments, we recommend using Granite 4.0 Vision
alongside
Granite Guardian
,
a model designed to detect and flag risks in inputs and outputs across key dimensions
outlined in the IBM AI Risk Atlas.
granite-4.0-3b-vision huggingface.co is an AI model on huggingface.co that provides granite-4.0-3b-vision's model effect (), which can be used instantly with this ibm-granite granite-4.0-3b-vision model. huggingface.co supports a free trial of the granite-4.0-3b-vision model, and also provides paid use of the granite-4.0-3b-vision. Support call granite-4.0-3b-vision model through api, including Node.js, Python, http.
granite-4.0-3b-vision huggingface.co is an online trial and call api platform, which integrates granite-4.0-3b-vision's modeling effects, including api services, and provides a free online trial of granite-4.0-3b-vision, you can try granite-4.0-3b-vision online for free by clicking the link below.
ibm-granite granite-4.0-3b-vision online free url in huggingface.co:
granite-4.0-3b-vision is an open source model from GitHub that offers a free installation service, and any user can find granite-4.0-3b-vision on GitHub to install. At the same time, huggingface.co provides the effect of granite-4.0-3b-vision install, users can directly use granite-4.0-3b-vision installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
granite-4.0-3b-vision install url in huggingface.co: