File size: 15,610 Bytes
c6ce1be 1a33636 c6ce1be 1a33636 9b43eab c6ce1be 1a33636 c6ce1be 59adff8 4dd6467 59adff8 919111a c6ce1be 66a0fa3 c6ce1be 9b43eab c6ce1be 919111a 3c865c7 1a33636 c6ce1be 1a33636 919111a 1a33636 c6ce1be da4bbd1 e224ac6 da4bbd1 e224ac6 da4bbd1 e224ac6 da4bbd1 e224ac6 da4bbd1 e224ac6 da4bbd1 c6ce1be bcecc9a c6ce1be bcecc9a c6ce1be 3c865c7 919111a 3c865c7 1a33636 3c865c7 1a33636 3c865c7 1a33636 3c865c7 1a33636 3c865c7 1a33636 919111a 1a33636 c6ce1be ea73f5d 51ec8e9 ea73f5d 51ec8e9 ea73f5d 1a33636 c6ce1be 94a1346 c6ce1be 94a1346 919111a c6ce1be 94a1346 919111a 1a33636 3d813dc 94a1346 1a33636 94a1346 c6ce1be 94a1346 1a33636 331a585 c6ce1be 94a1346 1a33636 94a1346 1a33636 94a1346 c6ce1be 94a1346 1a33636 94a1346 1a33636 94a1346 c6ce1be 3c865c7 94a1346 1a33636 94a1346 1a33636 94a1346 1a33636 94a1346 1a33636 94a1346 1a33636 94a1346 c6ce1be 3c865c7 94a1346 1a33636 94a1346 1a33636 94a1346 1a33636 94a1346 1a33636 94a1346 1a33636 94a1346 3c865c7 c6ce1be 7f50c64 919111a 7f50c64 919111a 7f50c64 919111a 7f50c64 919111a 7f50c64 1a33636 c6ce1be 1a33636 c6ce1be 1a33636 919111a 1a33636 c6ce1be 0661f94 1a33636 c6ce1be 1a33636 919111a 1a33636 c6ce1be 919111a 1a33636 c6ce1be 1a33636 919111a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
---
library_name: transformers
pipeline_tag: image-text-to-text
license: cc-by-nc-4.0
tags:
- multimodal
- multilingual
- vlm
- vision-language
- qwen3
- siglip2
language:
- en
- zh
- ar
- pt
- ru
- tr
- de
- es
- fr
- it
- ja
- ko
- vi
- th
- id
- hi
- bn
- nl
- pl
- sv
- fi
- da
- "no"
- cs
- el
- he
- uk
- ro
- hu
- multilingual
base_model:
- Qwen/Qwen3-1.7B-Base
- google/siglip2-so400m-patch14-384
inference: false
---
<p align="center">
<img src="https://huggingface.co/datasets/jinaai/documentation-images/resolve/main/logo.webp" alt="Jina AI: Your Search Foundation, Supercharged!" width="150px">
</p>
# jina-vlm: Small Multilingual Vision Language Model
[Blog](https://jina.ai/news/jina-vlm-small-multilingual-vision-language-model/) | API | AWS | Azure | GCP | [Arxiv](https://arxiv.org/abs/2512.04032)
`jina-vlm` is a 2.4B parameter vision-language model that achieves state-of-the-art multilingual visual question answering among open 2B-scale VLMs. The model couples a SigLIP2 vision encoder with a Qwen3 language backbone through an attention-pooling connector that enables token-efficient processing of arbitrary-resolution images. Training data comprises approximately 5M multimodal samples and 12B text tokens across 29 languages, with roughly half in English and the remainder spanning high- and moderate-resource languages.

Built on [Qwen3-1.7B-Base](https://huggingface.co/Qwen/Qwen3-1.7B-Base) with [SigLIP2-So400M](https://huggingface.co/google/siglip2-so400m-patch14-384), it processes images via overlapping tiling with attention-based token pooling that reduces visual tokens by 4x while preserving spatial information. The model achieves the highest average score (72.3) across eight VQA benchmarks while leading on multilingual multimodal understanding (MMMB: 78.8, Multilingual MMBench: 74.3).
| Model | Params | VQA Avg | MMMB | MM-Bench | RealWorld QA |
|-------|--------|---------|------|----------|--------------|
| **jina-vlm** | 2.4B | **72.3** | **78.8** | **74.3** | **68.2** |
| Qwen2-VL-2B | 2.2B | 66.4 | 71.3 | 69.4 | 62.9 |
| Qwen3-VL-2B | 2.2B | 71.6 | 75.0 | 72.3 | 63.9 |
| InternVL3-2B | 2.2B | 69.2 | 73.6 | 71.9 | 64.3 |
| InternVL3.5-2B | 2.2B | 71.6 | 74.6 | 70.9 | 62.0 |
## Via Jina API
We provide an OpenAI-compatible API at `https://api-beta-vlm.jina.ai`. All requests require a Jina API key in the Authorization header, get your API key at [jina.ai](https://jina.ai).
### Image from URL
| Format | Example |
|--------|---------|
| HTTP/HTTPS URL | `https://example.com/image.jpg` |
| Base64 data URI | `data:image/jpeg;base64,/9j/4AAQ...` |
```bash
curl https://api-beta-vlm.jina.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JINA_API_KEY" \
-d '{
"model": "jina-vlm",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image"},
{"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}
]
}]
}'
```
### Local image (base64)
```bash
curl https://api-beta-vlm.jina.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JINA_API_KEY" \
-d '{
"model": "jina-vlm",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "What is in this image?"},
{"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,'$(base64 -i image.jpg)'"}}
]
}]
}'
```
### Text-only query
```bash
curl https://api-beta-vlm.jina.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JINA_API_KEY" \
-d '{
"model": "jina-vlm",
"messages": [{"role": "user", "content": "What is the capital of France?"}]
}'
```
### Streaming response
Add `"stream": true` to receive tokens as they're generated:
```bash
curl https://api-beta-vlm.jina.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JINA_API_KEY" \
-d '{
"model": "jina-vlm",
"stream": true,
"messages": [{"role": "user", "content": "Write a haiku about coding"}]
}'
```
When the service is cold starting, you'll receive:
```json
{
"error": {
"message": "Model is loading, please retry in 30-60 seconds. Cold start takes ~30s after the service scales up.",
"code": 503
}
}
```
Simply retry your request after waiting.
## Local Installation
```bash
uv sync
```
For CUDA users with FlashAttention2 support:
```bash
uv sync --extra flash-attn
```
### Using the CLI
You can directly chat with `jina-vlm` using the `infer.py` CLI:
```bash
# Single image
python infer.py -i image.jpg -p "What's in this image?"
# Streaming output
python infer.py -i image.jpg -p "Describe this image" --stream
# Multiple images
python infer.py -i img1.jpg -i img2.jpg -p "Compare these images"
# Text-only
python infer.py -p "What is the capital of France?"
```
**Options:**
- `-m, --model`: Model path. Auto-detects local repo (if `config.json` exists) or falls back to `jinaai/jina-vlm` from HuggingFace.
- `-i, --image`: Image path, URL, or glob pattern (can specify multiple times).
- `-p, --prompt`: Text prompt (can specify multiple times).
- `--max-crops`: Maximum crops (default: 12).
- `--max-tokens`: Maximum output tokens (default: 1024).
- `--max-pixels`: Max pixels per image, larger images are resized preserving aspect ratio.
- `--stream`: Enable streaming output.
**Example:**
```bash
python infer.py -i assets/the_persistence_of_memory.jpg -p "Describe this picture"
```
<table>
<tr>
<td width="40%"><b>Input</b></td>
<td width="60%"><b>Output</b></td>
</tr>
<tr>
<td><img src="./assets/the_persistence_of_memory.jpg" width="100%"></td>
<td>
```
* Conversation 1/1
├── 🖼️Images: ['the_persistence_of_memory.jpg']
├── 📜Prompt: Describe this picture
└── 🧠Response: This image is a surreal painting
by Salvador Dalí, titled "The Persistence of
Memory." It features a dreamlike landscape with
a variety of melting clocks and other objects.
The central focus is a melting clock with a blue
face and yellow hands, which is hanging from a
branch...
Token usage: 1753 tokens (4.3%)
Generated in 8.68s | 20.04 tok/s
```
</td>
</tr>
</table>
### Using Transformers
```python
import torch
from transformers import AutoModelForCausalLM, AutoProcessor, GenerationConfig
processor = AutoProcessor.from_pretrained(
'jinaai/jina-vlm', use_fast=False, trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
'jinaai/jina-vlm',
device_map='auto',
trust_remote_code=True
)
image = 'https://picsum.photos/800/600'
conversation = [
{
'role': 'user',
'content': [
{'type': 'image', 'image': image},
{'type': 'text', 'text': 'Describe this image'},
],
}
]
text = processor.apply_chat_template(conversation, add_generation_prompt=True)
inputs = processor(text=[text], images=[image], padding='longest', return_tensors='pt')
inputs = {k: v.to(model.device) if isinstance(v, torch.Tensor) else v for k, v in inputs.items()}
output = model.generate(
**inputs,
generation_config=GenerationConfig(max_new_tokens=512, do_sample=False),
return_dict_in_generate=True,
use_model_defaults=True,
)
response = processor.tokenizer.decode(
output.sequences[0][inputs['input_ids'].shape[-1]:],
skip_special_tokens=True
)
print(response)
```
<details>
<summary>Multi-image inference</summary>
```python
images = ['https://picsum.photos/id/1/800/600', 'https://picsum.photos/id/2/800/600']
conversation = [
{
'role': 'user',
'content': [
{'type': 'image', 'image': images[0]},
{'type': 'image', 'image': images[1]},
{'type': 'text', 'text': 'What is the difference between these images?'},
],
}
]
text = processor.apply_chat_template(conversation, add_generation_prompt=True)
inputs = processor(text=[text], images=images, padding='longest', return_tensors='pt')
inputs = {k: v.to(model.device) if isinstance(v, torch.Tensor) else v for k, v in inputs.items()}
output = model.generate(
**inputs,
generation_config=GenerationConfig(max_new_tokens=512, do_sample=False),
return_dict_in_generate=True,
use_model_defaults=True,
)
response = processor.tokenizer.decode(
output.sequences[0][inputs['input_ids'].shape[-1]:],
skip_special_tokens=True
)
print(response)
```
</details>
<details>
<summary>Text-only inference</summary>
```python
conversation = [
{
'role': 'user',
'content': [
{'type': 'text', 'text': 'Explain quantum computing in simple terms'},
],
}
]
text = processor.apply_chat_template(conversation, add_generation_prompt=True)
inputs = processor(text=[text], padding='longest', return_tensors='pt')
inputs = {k: v.to(model.device) if isinstance(v, torch.Tensor) else v for k, v in inputs.items()}
output = model.generate(
**inputs,
generation_config=GenerationConfig(max_new_tokens=512, do_sample=False),
return_dict_in_generate=True,
use_model_defaults=True,
)
response = processor.tokenizer.decode(
output.sequences[0][inputs['input_ids'].shape[-1]:],
skip_special_tokens=True
)
print(response)
```
</details>
<details>
<summary>Batch inference</summary>
```python
import torch
from transformers import AutoModelForCausalLM, AutoProcessor, GenerationConfig
processor = AutoProcessor.from_pretrained(
'jinaai/jina-vlm', use_fast=False, trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
'jinaai/jina-vlm',
device_map='auto',
torch_dtype=torch.bfloat16,
attn_implementation='flash_attention_2',
trust_remote_code=True
)
images = [
'https://picsum.photos/id/22/800/600',
'https://picsum.photos/id/49/800/600'
]
conversations = [
[
{
'role': 'user',
'content': [
{'type': 'image', 'image': images[0]},
{'type': 'text', 'text': 'What is the man doing in this image?'},
],
}
],
[
{
'role': 'user',
'content': [
{'type': 'image', 'image': images[1]},
{'type': 'text', 'text': 'What country\'s flag is in this image?'},
],
}
],
]
texts = processor.apply_chat_template(conversations, add_generation_prompt=True)
inputs = processor(text=texts, images=images, padding='longest', return_tensors='pt')
inputs = {k: v.to(model.device) if isinstance(v, torch.Tensor) else v for k, v in inputs.items()}
output = model.generate(
**inputs,
generation_config=GenerationConfig(max_new_tokens=512, do_sample=False),
return_dict_in_generate=True,
use_model_defaults=True,
)
for idx in range(len(output.sequences)):
gen_ids = output.sequences[idx][inputs['input_ids'].shape[-1]:]
response = processor.tokenizer.decode(gen_ids, skip_special_tokens=True)
print(f"Response {idx+1}: {response}")
```
</details>
<details>
<summary>Batch inference with mixed examples</summary>
```python
import torch
from transformers import AutoModelForCausalLM, AutoProcessor, GenerationConfig
processor = AutoProcessor.from_pretrained(
'jinaai/jina-vlm', use_fast=False, trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
'jinaai/jina-vlm',
device_map='auto',
torch_dtype=torch.bfloat16,
attn_implementation='flash_attention_2',
trust_remote_code=True
)
images = [
['https://picsum.photos/id/22/800/600'],
['https://picsum.photos/id/49/800/600'],
['https://picsum.photos/id/0/800/600', 'https://picsum.photos/id/2/800/600'],
[],
]
conversations = [
[
{
'role': 'user',
'content': [
{'type': 'image', 'image': images[0][0]},
{'type': 'text', 'text': 'What is the man doing in this image?'},
],
}
],
[
{
'role': 'user',
'content': [
{'type': 'image', 'image': images[1][0]},
{'type': 'text', 'text': 'What country\'s flag is in this image?'},
],
}
],
[
{
'role': 'user',
'content': [
{'type': 'image', 'image': images[2][0]},
{'type': 'image', 'image': images[2][1]},
{'type': 'text', 'text': 'What is the difference between these two images?'},
],
}
],
[
{
'role': 'user',
'content': [
{'type': 'text', 'text': 'Describe the concept of polymorphism in Computer Science'},
],
}
],
]
texts = processor.apply_chat_template(conversations, add_generation_prompt=True)
inputs = processor(text=texts, images=images, padding='longest', return_tensors='pt')
inputs = {k: v.to(model.device) if isinstance(v, torch.Tensor) else v for k, v in inputs.items()}
output = model.generate(
**inputs,
generation_config=GenerationConfig(max_new_tokens=512, do_sample=False),
return_dict_in_generate=True,
use_model_defaults=True,
)
for idx in range(len(output.sequences)):
gen_ids = output.sequences[idx][inputs['input_ids'].shape[-1]:]
response = processor.tokenizer.decode(gen_ids, skip_special_tokens=True)
print(f"Response {idx+1}: {response}")
```
</details>
## Evaluation
### Multilingual Understanding
| Model | MMMB ar | MMMB cn | MMMB en | MMMB avg | MMBench avg | Overall |
|-------|---------|---------|---------|----------|-------------|---------|
| **jina-vlm** | **76.9** | **80.0** | **82.0** | **78.8** | **74.3** | **59.6** |
| Qwen2-VL-2B | 68.3 | 74.2 | 78.3 | 71.3 | 69.4 | 53.8 |
| Qwen3-VL-2B | 72.7 | 75.7 | 80.7 | 75.0 | 72.3 | 58.2 |
| InternVL3-2B | 68.6 | 78.3 | 81.9 | 73.6 | 71.9 | 57.4 |
| InternVL3.5-2B | 68.5 | 77.7 | 80.2 | 74.6 | 70.9 | 58.0 |
### General VQA Tasks
| Model | AI2D | ChartQA | TextVQA | DocVQA | InfoVQA | OCRBench | SEED-2+ | CharXiv | Avg |
|-------|------|---------|---------|--------|---------|----------|---------|---------|-----|
| **jina-vlm** | **82.0** | **81.9** | **83.2** | 90.6 | 71.6 | 778 | 67.2 | **32.3**/63.5 | **72.3** |
| Qwen2-VL-2B | 74.7 | 73.5 | 79.7 | 89.2 | 64.0 | 809 | 62.4 | 23.3/55.0 | 66.4 |
| Qwen3-VL-2B | 76.9 | 77.2 | 79.5 | **92.3** | **71.9** | **858** | 67.3 | 28.8/62.3 | 71.6 |
| InternVL3-2B | 78.6 | 80.2 | 77.0 | 87.4 | 67.1 | 835 | 64.6 | 28.3/54.7 | 69.2 |
| InternVL3.5-2B | 78.8 | 80.7 | 76.5 | 88.5 | 69.3 | 836 | **68.0** | 31.6/**65.0** | 71.6 |
### Text-Only Performance
| Model | MMLU | MMLU-Pro | GSM-8K | ARC-C | HellaSwag |
|-------|------|----------|--------|-------|-----------|
| **jina-vlm** | 56.1 | **30.3** | 71.3 | **77.3** | **59.4** |
| Qwen3-1.7B | **62.6** | 46.4 | **75.3** | 73.4 | 59.0 |
## Citation
If you find `jina-vlm` useful in your research, please cite our [technical report](https://arxiv.org/abs/2512.04032):
```bibtex
@misc{koukounas2025jinavlm,
title={Jina-VLM: Small Multilingual Vision Language Model},
author={Andreas Koukounas and Georgios Mastrapas and Florian Hönicke and Sedigheh Eslami and Guillaume Roncari and Scott Martens and Han Xiao},
year={2025},
eprint={2512.04032},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2512.04032},
}
```
## License
`jina-vlm` is licensed under CC BY-NC 4.0. For commercial usage inquiries, feel free to [contact us](https://jina.ai/contact-sales/).
|