Model reference · open weights
Idefics3-Llama3 is an open-weight language model from HuggingFaceM4. Idefics3-8B-Llama3 (BF16) weighs 16.9 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the HuggingFaceM4/Idefics3-8B-Llama3 model card, 2026-10-01
What it is
| Released by | HuggingFaceM4 |
|---|---|
| Released | 2024-08-05 |
| Parameters | 8.5B |
| VRAM | 16.9 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB … RTX 4060 Ti 16 GB 2 smaller cards | ||||
| RTX 3090 24 GB | 4 | 1 | 33K | 23.4 GB |
| RTX 4090 24 GB | 4 | 1 | 32K | 23.4 GB |
| RTX 5090 32 GB | 11 | 2 | 89K | 31.0 GB |
| L40S 48 GB | 23 | 5 | all 128K | 44.0 GB |
| A100 80 GB | 55 | 13 | all 128K | 78.2 GB |
| H100 80 GB | 51 | 12 | all 128K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 65 | 16 | all 128K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 78 | 19 | all 128K | 107 GB |
| H200 141 GB | 107 | 26 | all 128K | 138 GB |
| B200 180 GB | 141 | 35 | all 128K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 2 | 16K | 11.6 GB a card | |
| 2× RTX 4060 Ti 16 GB tensor parallel | 9 | 2 | 73K | 15.4 GB a card |
| 2× RTX 4090 24 GB tensor parallel | 23 | 5 | all 128K | 23.4 GB a card |
| 2× RTX 3090 24 GB tensor parallel | 24 | 6 | all 128K | 23.4 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 20.0 GB | 23.3 GB |
| 5 | 24.3 GB | 40.4 GB |
| 8 | 27.5 GB | 53.3 GB |
| 16 | 36.1 GB | 87.7 GB |
| 32 | 53.3 GB | 156 GB |
| 64 | 87.7 GB | 294 GB |
One card, with vLLM's small-card settings.
From the model card
Transformers version: >4.46.
Idefics3 is an open multimodal model that accepts arbitrary sequences of image and text inputs and produces text outputs. The model can answer questions about images, describe visual content, create stories grounded on multiple images, or simply behave as a pure language model without visual inputs. It improves upon Idefics1 and Idefics2, significantly enhancing capabilities around OCR, document understanding and visual reasoning.
We release the checkpoints under the Apache 2.0.
Idefics3-8B can be used to perform inference on multimodal (image + text) tasks in which the input is composed of a text query along with one (or multiple) image(s). Text and images can be arbitrarily interleaved. That includes image captioning, visual question answering, etc. These model does not support image generation.
The post-training of Idefics3-8B involves only a supervised fine-tuning stage, without RLHF alignment. As a result, the model may produce short answers or require prompt iterations to fully address the user's request. Adding a prefix to the assistant's response, such as "Let's fix this step by step" has been found to effectively influence the generated output.
To fine-tune Idefics3-8B on a specific task, we provide a fine-tuning tutorial.
Other resources for the fine-tuning of Idefics2 (can easily be adapted to Idefics3):
Idefics3 demonstrates a great improvement over Idefics2, especially in document understanding tasks. It serves as a strong foundation for various use-case specific fine-tunings.
| Model | MMMU (val) | MathVista (test) | MMStar (val) | DocVQA (test) | TextVQA (val) |
|---|---|---|---|---|---|
| Idefics2-8B | 45.2 | 52.2 | 49.5 | 74.0 | 73.0 |
| Idefics3-8B | 46.6 | 58.4 | 55.9 | 87.7 | 74.9 |
Idefics3 introduces several changes compared to Idefics2:
More details about the training of the model is available in our technical report.
This section shows snippets of code for generation for Idefics3-8B.
import requests
import torch
from PIL import Image
from io import BytesIO
from transformers import AutoProcessor, AutoModelForVision2Seq
from transformers.image_utils import load_image
DEVICE = "cuda:0"
# Note that passing the image urls (instead of the actual pil images) to the processor is also possible
image1 = load_image("https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg")
image2 = load_image("https://cdn.britannica.com/59/94459-050-DBA42467/Skyline-Chicago.jpg")
image3 = load_image("https://cdn.britannica.com/68/170868-050-8DDE8263/Golden-Gate-Bridge-San-Francisco.jpg")
processor = AutoProcessor.from_pretrained("HuggingFaceM4/Idefics3-8B-Llama3")
model = AutoModelForVision2Seq.from_pretrained(
"HuggingFaceM4/Idefics3-8B-Llama3", torch_dtype=torch.bfloat16
).to(DEVICE)
# Create inputs
messages = [
{
"role": "user",
"content": [
{"type": "image"},
{"type": "text", "text": "What do we see in this image?"},
]
},
{
"role": "assistant",
"content": [
{"type": "text", "text": "In this image, we can see the city of New York, and more specifically the Statue of Liberty."},
]
},
{
"role": "user",
"content": [
{"type": "image"},
{"type": "text", "text": "And how about this image?"},
]
},
]
prompt = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(text=prompt, images=[image1, image2], return_tensors="pt")
inputs = {k: v.to(DEVICE) for k, v in inputs.items()}
# Generate
generated_ids = model.generate(**inputs, max_new_tokens=500)
generated_texts = processor.batch_decode(generated_ids, skip_special_tokens=True)
print(generated_texts)
Text generation inference
TODO.
If your GPU allows, we first recommend loading (and running inference) in half precision (torch.float16 or torch.bfloat16).
model = AutoQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.