Skip to content
Local AI Wizard
Your machine
Theme

granite-4.0-3b-vision

IBM · ibm-granite/granite-4.0-3b-vision

Weights license: Apache 2.0 · code and components may use other terms

Hub downloads · 30 days68.5KPopularity, not quality · read 2026-10-25
Memory needed~3 GBQ4 weights + working room, before the machine's reserve
Parameters4 BHub safetensors total
Repository updated2026-04-30A commit is not a release date

Quality

No comparable score

We track no public, comparable benchmark that covers this model yet. No score is inferred.

Reported by the publisher

The publisher's card states no benchmark result for this checkpoint (read 2026-10-25). not published on the card · read 2026-10-25

Runs on

Fast memory holds it 118

The planning estimate fits the memory the model can use quickly: graphics card VRAM, or unified memory within the macOS GPU share.

Show all 118

Within memory, outside the fast part 1

Within the machine's memory, outside its fast part: on a graphics card the layers that do not fit run on the CPU from PC RAM (the listed RAM, or 32 GB assumed); on a Mac, above the macOS default GPU share. Not a speed figure.

Hardware profiles grouped by the Q4 planning estimate on each machine (dedicated GPUs reserve 2 GB; unified and system memory 25%, 2 to 8 GB): the fast memory holds it, it is within memory but outside the fast part (layers offloaded to PC RAM, or above the macOS GPU share), or the machine is one memory tier short. Not a measured fit or speed.

Consider it for

IBM released granite-4.0-3b-vision on 2026-03-27: a vision-language model that answers about images, with 4B parameters on the Hugging Face count and the Apache 2.0 license. Languages the publisher declares: en.

Check first

License: commercial use allowed. At Q4 the weights load about 3 GB before each machine's reserve; image resolution, video frames and context add memory, and the vision encoder needs support in the runtime you pick.

Measured speed

No published measurement for this checkpoint

Tokens per second are shown only when a source publishes them with hardware, build and setup. They are never estimated.

How to run

Runtime compatibility and tokens per second have not been measured for this entry. Published metadata and a memory estimate do not prove a successful local run.

Library in source: transformers

Documented ways to run it

Copied as printed in the linked source (read 2026-10-18); not run by this site.

Setup stated first by the source · Transformers
pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cu128
pip install transformers==4.57.6 peft==0.18.1 tokenizers==0.22.2 pillow==12.1.1
Transformers · model card · 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-4.0-3b-vision"
device = "cuda" if torch.cuda.is_available() else "cpu"

processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
    model_id,
    trust_remote_code=True,
    dtype=torch.bfloat16,
    device_map=device
).eval()

# Optional: merge LoRA adapters into base weights for faster inference.
# Prefer to skip when using text-only tasks, as the LoRA adapters are vision-specific.
model.merge_lora_adapters()

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 = [
        processor.apply_chat_template(conv, tokenize=False, add_generation_prompt=True)
        for conv in conversations
    ]
    inputs = processor(
        text=texts, images=images, return_tensors="pt", padding=True, do_pad=True
    ).to(model.device)
    outputs = model.generate(
        **inputs,
        max_new_tokens=4096, 
        use_cache=True
    )
    results = []
    for i in range(len(prompts)):
        gen = outputs[i, inputs["input_ids"].shape[1]:]
        results.append(processor.decode(gen, skip_special_tokens=True))
    return results


def display_table(text):
    """Pretty-print CSV (possibly wrapped in ```csv```) or HTML table content via pandas."""
    m = re.search(r"```csv\s*
(.*?)```", text, re.DOTALL)
    if m:
        df = pd.read_csv(StringIO(m.group(1)))
        print(df.to_string(index=False))
    elif "<table" in text.lower():
        df = pd.read_html(StringIO(text))[0]
        print(df.to_string(index=False))
    else:
        print(text)
Setup stated first by the source · vLLM
hf download ibm-granite/granite-4.0-3b-vision granite4_vision.py . 
hf download ibm-granite/granite-4.0-3b-vision start_granite4_vision_server.py .
vLLM · model card · Full merge (adapter merged at load time)
python start_granite4_vision_server.py \
    --model ibm-granite/granite-4.0-3b-vision \
    --trust_remote_code --host 0.0.0.0 --port 8000 \
    --hf-overrides '{"adapter_path": "ibm-granite/granite-4.0-3b-vision"}'
Setup stated first by the source · vLLM
hf download ibm-granite/granite-4.0-3b-vision granite4_vision.py . 
hf download ibm-granite/granite-4.0-3b-vision start_granite4_vision_server.py .
vLLM · model card · Native LoRA runtime
python start_granite4_vision_server.py \
    --model ibm-granite/granite-4.0-3b-vision \
    --trust_remote_code --host 0.0.0.0 --port 8000 \
    --enable-lora --max-lora-rank 256 \
    --default-mm-loras '{"image": "ibm-granite/granite-4.0-3b-vision"}'

Choose my computer

Technical details

What the source and the catalog store for this checkpoint. Missing fields are left out, never zero.

Task
image-text-to-text
Architecture
Granite4VisionForConditionalGeneration
Library in source
transformers
Weight license
Apache 2.0ibm-granite/granite-4.0-3b-vision model card (Hugging Face) · read 2026-10-18source
Commercial use
Allowed Apache License 2.0 text (SPDX) · read 2026-10-18license text
Languages
enModel card metadata · read 2026-10-25source
Released
Granite 4.0 3B Vision model card, 'Release Date: March 27th, 2026' (IBM, Hugging Face) · read 2026-10-18source
Every stored field12 fields
Revision checked
bf108f36960fb4df79bf035e506c592f4ee3c2d3
Architecture
Granite4VisionForConditionalGeneration
Library
transformers
Hub task tag
image-text-to-text
Formats
transformers, safetensors
Access
Open download
Publisher kind
Official
Hub parameter count
3,997,206,464safetensors.total
Repository created
2026-03-03creation is not the model's release
Repository updated
2026-04-30a commit is not a release date
Hub downloads (30 days) · likes
68,528 · 112this repository only · read 2026-10-25
Catalog state
Hub config or weights found; no inventory benchmark link

Sources

Identity and published specifications come from the checkpoint page. Benchmark scores belong to the named release and do not measure speed on your computer.

Curated facts checked: 2026-10-18. The license and release date cite the publisher's sources; parameters, files and task come from the Hugging Face record, and memory is a labelled estimate from its parameter count. A value no source states stays empty; a repository commit is not a model release date.