jina ocr v1
Jina-OCR-v1 is an end-to-end document parsing and OCR model from Jina AI, built on DeepSeek-OCR with a DeepEncoder vision tower and a 3B-parameter mixture-of-experts decoder. It adds a FastMTP speculative decoding head for acceleration. The model weights and custom loading code are provided in the repository, with Transformers or vLLM backends. It is licensed under cc-by-nc-4.0 and supports multilingual image-text-to-text tasks.
At a glance
- Parameters
- 3.37B
- Architecture
- deepseek_vl_v2
- Context length
- 32,768
- License
- cc-by-nc-4.0
- Software
- Transformers
Will it run on your machine?
Save your machine to see a personalized rating and its reasoning.
Add my hardwareBest for
- OCR of document images
- Multilingual document parsing
- Vision-language document intelligence
- Image-text-to-text inference with Transformers or vLLM
- Document understanding tasks such as text extraction
Tradeoffs
- License is cc-by-nc-4.0, which restricts commercial use
- Requires trust_remote_code=True to load custom modeling code
- vLLM support requires a one-time architecture registration from deepseek_ocr_mtp.py
- No separate training or serving package; must use the provided example.py
- No details on hardware requirements beyond an A100 throughput figure
Ways to run it
Transformers · See official guide
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
import torch
from PIL import Image
from transformers import AutoModelForCausalLM, AutoProcessor
MODEL_ID = 'jinaai/jina-ocr-v1'
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID, dtype=torch.bfloat16, trust_remote_code=True,
).to(device)
image = Image.open('document.png').convert('RGB')
inputs = processor.prepare_ocr_inputs(image, device=device)
output = model.generate(**inputs, max_new_tokens=4096, do_sample=False)
print(processor.decode_ocr(output, inputs['input_ids']))Explore its uses
Keep exploring
Bonsai 2 · 27B
A compressed 27B-class reasoning model with publisher-provided GGUF packs and a dedicated llama.cpp fork for CUDA, Metal, and CPU.
DeepSeek V4.1 Flash
A multimodal reasoning model with a compressed key-value cache, published as open weights.
Qwen3.8-Flash-Next
An experimental open-weight multimodal model with sparse attention and 262K native context.