Instructions to use llm-jp/llm-jp-4-vl-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llm-jp/llm-jp-4-vl-9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="llm-jp/llm-jp-4-vl-9b", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("llm-jp/llm-jp-4-vl-9b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use llm-jp/llm-jp-4-vl-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "llm-jp/llm-jp-4-vl-9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llm-jp/llm-jp-4-vl-9b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/llm-jp/llm-jp-4-vl-9b
- SGLang
How to use llm-jp/llm-jp-4-vl-9b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "llm-jp/llm-jp-4-vl-9b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llm-jp/llm-jp-4-vl-9b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "llm-jp/llm-jp-4-vl-9b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llm-jp/llm-jp-4-vl-9b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use llm-jp/llm-jp-4-vl-9b with Docker Model Runner:
docker model run hf.co/llm-jp/llm-jp-4-vl-9b
LLM-jp-4-VL 9B is a vision-language model developed by LLM-jp.
It is built upon llm-jp/llm-jp-4-8b-thinking and SigLIP 2 So400m.
Compared with the earlier LLM-jp-4-VL 9B beta, the new model is trained on datasets that have no license or terms-of-use issues for commercial use. It is also enhanced to generate a reasoning trace before a final answer. Our evaluation shows improved performance over the beta version, particularly on text-only tasks and challenging chart-understanding benchmarks such as CharXiv and HakushoBench.
To support the continued development of LLM-jp, we would greatly appreciate it if you could share how you utilize LLM-jp outcomes via the survey form.
Model Architecture
The model architecture is inspired by InternVL3.0. It consists of a language model, a vision encoder, and a lightweight projector.
- LLM: llm-jp/llm-jp-4-8b-thinking (8.6B)
- Vision Encoder: google/siglip2-so400m-patch16-512 (0.4B)
- Projector: 2-layer MLP
Chat Template
We adopt a customized chat template based on an extension of the OpenAI Harmony format.
In this template, a sequence of image tokens is wrapped with special tokens <|image_start|> and <|image_end|>, and inserted into the user message.
Because this is a reasoning model, the assistant may first produce an analysis message (reasoning content) and then a final message (the answer). An example input/output is shown below:
<|start|>system<|message|>{system_message}<|end|>
<|start|>user<|message|><|image_start|><|image_pad|>...<|image_pad|><|image_end|>What is the animal shown in this image?<|end|>
<|start|>assistant<|channel|>analysis<|message|>The image shows a small four-legged animal with pointed ears and whiskers ...<|end|><|start|>assistant<|channel|>final<|message|>It is a cat.<|return|>
Training Data
The training data is a mixture of four large-scale datasets (≈29.3M samples in total):
- Jagle (9.2M): a Japanese multimodal dataset built by LLM-jp.
- RefinedVision (12.0M): a refined version of FineVision built by LLM-jp. Of the 185 subsets in FineVision, we removed 61 that include images with licensing concerns and poor quality. Of the remaining 124 subsets, we regenerated QA pairs for 58 subsets whose original QA pairs were of low quality or had license/terms-of-use concerns (e.g., QA generated by GPT-4o or other proprietary models): keeping the original images, we regenerated the QA from scratch with Qwen3.5 397B-A17B using per-category generation prompts. The other 66 subsets were used as-is. See the RefinedVision dataset page for details.
- Nemotron-Image-Training-v3 subset (5.0M): an English multimodal dataset built by NVIDIA, from which we removed subsets with license/terms-of-use issues. The exact list of subsets we used is given in nemotron_subsets.md.
- llm-jp-4-thinking-sft-data (3.2M): a text-only Japanese reasoning SFT dataset built by LLM-jp.
Training Details
The language model and vision encoder are initialized from their pretrained weights, while the projector is initialized randomly. We then train the model in a single stage for 120,000 steps, with all three components trainable from the start (no projector-only warmup or frozen-backbone stage).
We use different maximum learning rates for each component: 2e-5 for both the language model and the vision encoder, and 1e-4 for the projector.
The learning rate follows the Warmup–Stable–Decay (WSD) schedule, with a warmup phase of 2,000 steps, followed by stable training, and linear decay starting after 80% of the total training steps.
Evaluation
We evaluate our model and all baselines with simple-evals-mm, our evaluation framework for VLMs, across a broad suite of English and Japanese multimodal and text-only benchmarks. For several Japanese benchmarks, we use the refined versions from the JAMMEval collection.
Evaluation settings
LLM-jp-4-VL 9B is decoded greedily (temperature=0.0) with max_new_tokens=32k and reasoning effort medium. Each baseline uses its own recommended sampling temperature; for the reasoning models Qwen3.5-9B and Gemma-4-12B, we increase max_new_tokens to 64k to avoid truncating long chains of thought. Scores are averaged over 3 runs.
Per-benchmark score vs training step
As training progresses, the model improves on most multimodal benchmarks. On the text-only benchmarks, it preserves the reasoning ability of the base LLM (llm-jp-4-8b-thinking), so adding vision capability does not degrade its language reasoning.
Per-benchmark results
| Benchmark | LLM-jp-4-VL-9B | LLM-jp-4-VL-9B-beta | InternVL3.5-8B | Qwen3.5-9B | Gemma-4-12B |
|---|---|---|---|---|---|
| Document Understanding | |||||
| AI2D (N=3088) | 80.1 | 76.2 | 83.4 | 90.8 | 79.9 |
| ChartQA (N=1250) | 64.9 | 70.5 | 75.0 | 86.4 | 72.6 |
| JGraphQA (N=196) | 86.7 | 87.8 | 85.9 | 98.8 | 89.5 |
| CharXiv-Reasoning (N=1000) | 40.7 | 33.2 | 39.9 | 69.1 | 55.8 |
| ChartQAPro (N=1948) | 30.8 | 27.8 | 33.5 | 58.9 | 53.9 |
| HakushoBench (N=2053) | 46.3 | 41.3 | 39.4 | 74.3 | 71.5 |
| DocVQA (N=5349) | 89.5 | 90.1 | 89.4 | 94.2 | 88.5 |
| InfoVQA (N=2065) | 67.4 | 69.6 | 68.9 | 88.2 | 81.5 |
| TextVQA (N=5000) | 88.4 | 87.7 | 83.9 | 87.7 | 73.8 |
| JDocQA (N=861) | 74.0 | 73.7 | 59.5 | 93.3 | 69.4 |
| CC-OCR-JA (N=145) | 70.3 | 67.6 | 51.5 | 79.8 | 47.8 |
| BusinessSlideVQA (N=216) | 60.6 | 62.2 | 57.4 | 84.1 | 69.3 |
| STEM | |||||
| MMMU (N=847) | 50.4 | 52.3 | 65.3 | 79.1 | 72.7 |
| JMMMU (N=1270) | 47.5 | 46.8 | 50.9 | 69.6 | 63.8 |
| MathVision (N=304) | 13.2 | 17.4 | 30.6 | 71.4 | 51.4 |
| Multi-Image | |||||
| BLINK (N=1901) | 47.3 | 46.2 | 54.7 | 71.3 | 58.4 |
| JA-Multi-Image-VQA (N=53) | 75.5 | 88.7 | 62.3 | 92.5 | 84.9 |
| 2D/3D Grounding | |||||
| CountBenchQA (N=491) | 79.2 | 82.9 | 78.4 | 93.5 | 72.0 |
| General VQA | |||||
| OK-VQA (N=5046) | 67.5 | 65.8 | 70.5 | 66.1 | 58.7 |
| RealWorldQA (N=765) | 70.5 | 71.2 | 64.4 | 79.0 | 64.3 |
| CVQA-JA (N=200) | 69.5 | 70.2 | 50.5 | 72.8 | 68.5 |
| MECHA-ja (N=1818) | 69.7 | 63.6 | 56.6 | 68.4 | 71.5 |
| Heron-Bench (N=88) | 63.6 | 63.6 | 50.4 | 61.7 | 40.5 |
| JA-VLM-Bench (N=49) | 65.3 | 70.1 | 46.9 | 72.1 | 51.7 |
| Text-only | |||||
| GPQA (N=198) | 40.9 | 29.3 | 48.0 | 82.8 | 73.4 |
| MMLU-Redux (N=5376) | 84.2 | 73.5 | 80.1 | 92.1 | 91.2 |
| SimpleQA (N=4326) | 6.1 | 5.8 | 3.3 | 8.7 | 4.3 |
| MATH (N=500) | 79.7 | 46.1 | 62.7 | 96.5 | 95.7 |
Domain-level averages
The following table reports the average score for each domain, along with the overall average (All), the average over Japanese benchmarks (Ja-Avg), and the average over English benchmarks (En-Avg). Benchmarks with fewer than 100 examples are excluded from these averages.
| Category | LLM-jp-4-VL-9B | LLM-jp-4-VL-9B-beta | InternVL3.5-8B | Qwen3.5-9B | Gemma-4-12B |
|---|---|---|---|---|---|
| Document Understanding (12) | 66.7 | 65.6 | 64.0 | 83.8 | 71.1 |
| STEM (3) | 37.0 | 38.9 | 48.9 | 73.4 | 62.7 |
| Multi-Image (1) | 47.3 | 46.2 | 54.7 | 71.3 | 58.4 |
| 2D/3D Grounding (1) | 79.2 | 82.9 | 78.4 | 93.5 | 72.0 |
| General VQA (4) | 69.3 | 67.7 | 60.5 | 71.6 | 65.7 |
| Text-only (4) | 52.7 | 38.6 | 48.5 | 70.0 | 66.1 |
| All (25) | 61.0 | 58.3 | 59.3 | 78.3 | 68.0 |
| Ja-Avg (8) | 65.6 | 64.1 | 56.5 | 80.1 | 68.9 |
| En-Avg (17) | 58.9 | 55.6 | 60.7 | 77.4 | 67.5 |
Compared to the beta version, LLM-jp-4-VL 9B showed improved performance on text-only tasks such as GPQA, as well as on challenging chart understanding tasks such as CharXiv Reasoning and HakushoBench. It also outperformed Gemma-4-12B on some tasks.
Usage
Install requirements:
uv add "torch==2.8.0" "transformers==4.57.0" "flash-attn==2.8.3" "pillow==11.3.0"
Below is the sample code to run the model.
import torch
import requests
from PIL import Image
from transformers import AutoProcessor, AutoModel
model_id = "llm-jp/llm-jp-4-vl-9b"
# load model
model = (
AutoModel.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
use_flash_attn=True,
)
.eval()
.cuda()
)
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
# Example images are fetched from the GitHub repo so this snippet runs anywhere.
ASSETS = "https://raw.githubusercontent.com/llm-jp/llm-jp-4-vl/main/assets"
def load_image(name):
return Image.open(requests.get(f"{ASSETS}/{name}", stream=True).raw).convert("RGB")
def generate(messages, max_new_tokens=1024, temperature=0.0, reasoning_effort="medium"):
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
reasoning_effort=reasoning_effort, # "low" (direct) / "medium" / "high"
).to(model.device)
if "pixel_values" in inputs:
inputs["pixel_values"] = inputs["pixel_values"].to(dtype=model.dtype)
outputs = model.generate(
**inputs,
max_new_tokens=max_new_tokens,
do_sample=temperature > 0,
temperature=temperature if temperature > 0 else None,
)
# The generated turn is `<|channel|>analysis<|message|>{thinking}<|end|>` (the
# reasoning) followed by `<|channel|>final<|message|>{answer}<|return|>`.
# Return (thinking, answer). decode() can put spaces around the harmony
# markers, so we match them space-tolerantly.
import re
text = processor.decode(outputs[0], skip_special_tokens=False)
m = re.search(r"<\|channel\|>\s*analysis\s*<\|message\|>(.*?)<\|end\|>", text, re.S)
thinking = m.group(1).strip() if m else ""
finals = list(re.finditer(r"<\|channel\|>\s*final\s*<\|message\|>", text))
answer = text[finals[-1].end():] if finals else text
answer = re.sub(r"<\|[^|]*\|>", "", answer).replace(processor.tokenizer.eos_token, "").strip()
return thinking, answer
def show(messages, **kwargs):
thinking, answer = generate(messages, **kwargs)
print(f"[thinking] {thinking}")
print(f"[answer] {answer}\n")
# -----------------------
# 1. Text-only
# -----------------------
messages = [
{
"role": "user",
"content": [{"type": "text", "text": "富士山について簡潔に説明してください。"}],
}
]
show(messages)
# [thinking] User asks to briefly explain Mt. Fuji; list key facts (location, height, ...).
# [answer] **富士山(ふじさん)** — 静岡・山梨県境の活火山、標高3,776 m(日本最高峰)。
# 成層火山で、2013年に世界遺産に登録。登山シーズンは7〜9月上旬。
# -----------------------
# 2. Single image
# -----------------------
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": load_image("kaonashi.jpg")},
{"type": "text", "text": "このキャラクターの名前は何ですか?"},
],
}
]
show(messages)
# [thinking]
# [answer] カオナシ
# -----------------------
# 3. Multi-image
# -----------------------
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": load_image("Shiba_inu.jpg")},
{"type": "image", "image": load_image("yesoensis.jpg")},
{"type": "text", "text": "それぞれの動物の名前を教えてください。"},
],
}
]
show(messages)
# [thinking] 画像には2匹の動物が写っている。1匹は犬(柴犬)、もう1匹は鹿。
# [answer] 柴犬と鹿です。
# -----------------------
# 4. Multi-turn (image + follow-up)
# -----------------------
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": load_image("kaonashi.jpg")},
{
"type": "text",
"text": "このキャラクターが登場する映画のタイトルは何ですか?",
},
],
},
{
"role": "assistant",
"content": [{"type": "text", "text": "千と千尋の神隠し"}],
},
{
"role": "user",
"content": [{"type": "text", "text": "監督は誰ですか?"}],
},
]
show(messages) # reasoning_effort="medium" (recommended for vision)
# [answer] 宮崎駿
# -----------------------
# 5. Reasoning (text-only; effort is controllable)
# -----------------------
messages = [
{
"role": "user",
"content": [{"type": "text", "text": "9.11 と 9.9 はどちらが大きいですか?理由も述べてください。"}],
}
]
show(messages, reasoning_effort="high")
# [thinking] Compare 9.11 vs 9.9: integer parts equal (9); 0.9 > 0.11, so 9.9 is larger.
# [answer] **答え: 9.9 の方が大きいです。** 整数部は同じ 9、小数部は 0.9 > 0.11 なので 9.9 > 9.11。
For inputs that include images, the reasoning effort is not yet reliably controllable. We therefore recommend
reasoning_effort="medium"for vision inputs.
For more details, please refer to the official GitHub repository: https://github.com/llm-jp/llm-jp-4-vl
LICENSE
Apache License 2.0
Citation
If you find our work useful, please consider citing the following papers:
@misc{sugiura2026jaglebuildinglargescalejapanese,
title={Jagle: Building a Large-Scale Japanese Multimodal Post-Training Dataset for Vision-Language Models},
author={Issa Sugiura and Keito Sasagawa and Keisuke Nakao and Koki Maeda and Ziqi Yin and Zhishen Yang and Shuhei Kurita and Yusuke Oda and Ryoko Tokuhisa and Daisuke Kawahara and Naoaki Okazaki},
year={2026},
eprint={2604.02048},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2604.02048},
}
@misc{sugiura2026jammevalrefinedcollectionjapanese,
title={JAMMEval: A Refined Collection of Japanese Benchmarks for Reliable VLM Evaluation},
author={Issa Sugiura and Koki Maeda and Shuhei Kurita and Yusuke Oda and Daisuke Kawahara and Naoaki Okazaki},
year={2026},
eprint={2604.00909},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2604.00909},
}
- Downloads last month
- 9
