Model reference · open weights
LightOnOCR-1025 is an open-weight language model from lightonai. LightOnOCR-1B-1025 (BF16) weighs 2.3 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the lightonai/LightOnOCR-1B-1025 model card, 2026-10-01
What it is
| Released by | lightonai |
|---|---|
| Released | 2025-10-20 |
| Parameters | 1.2B |
| VRAM | 2.3 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 8K each | |||
| RTX 3060 12 GB | 7 | all 8K | 11.6 GB |
| RTX 4060 Ti 16 GB | 11 | all 8K | 15.4 GB |
| RTX 3090 24 GB | 20 | all 8K | 23.4 GB |
| RTX 4090 24 GB | 20 | all 8K | 23.4 GB |
| RTX 5090 32 GB | 28 | all 8K | 31.0 GB |
| L40S 48 GB | 42 | all 8K | 44.0 GB |
| A100 80 GB | 78 | all 8K | 78.2 GB |
| H100 80 GB | 74 | all 8K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 91 | all 8K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 105 | all 8K | 107 GB |
| H200 141 GB | 138 | all 8K | 138 GB |
| B200 180 GB | 178 | all 8K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 18 | all 8K | 11.6 GB a card |
| Requests at once | 8K tokens each |
|---|---|
| 1 | 5.2 GB |
| 5 | 8.9 GB |
| 8 | 11.8 GB |
| 16 | 19.3 GB |
| 32 | 34.3 GB |
| 64 | 64.4 GB |
One card, with vLLM's small-card settings.
From the model card
[!NOTE] 🚀 LightOnOCR-2 is now available and state-of-the-art on OlmOCR-bench, with new image detection variants! Check it out here: lightonai/LightOnOCR-2-1B
Full BF16 version of the model. We recommend this variant for inference and further fine-tuning.
LightOnOCR-1B is a compact, end-to-end vision–language model for Optical Character Recognition (OCR) and document understanding. It achieves state-of-the-art accuracy in its weight class while being several times faster and cheaper than larger general-purpose VLMs.
Highlights
LightOnOCR combines a Vision Transformer encoder(Pixtral-based) with a lightweight text decoder(Qwen3-based) distilled from high-quality open VLMs. It is optimized for document parsing tasks, producing accurate, layout-aware text extraction from high-resolution pages.
All benchmarks evaluated using vLLM on the Olmo-Bench.
[2025/11/24] 🚀 LightOnOCR is now officially supported in vLLM v0.11.1 🚀
uv venv --python 3.12 --seed
source .venv/bin/activate
# install any version higher than 0.11.1
uv pip install vllm==0.11.2
# extra deps need only to run the example below
uv pip install pypdfium2 pillow requests
Start Server
vllm serve lightonai/LightOnOCR-1B-1025 \
--limit-mm-per-prompt '{"image": 1}' --mm-processor-cache-gb 0 --no-enable-prefix-caching
PDF Inference
import base64
import requests
import pypdfium2 as pdfium
import io
ENDPOINT = "http://localhost:8000/v1/chat/completions"
MODEL = "lightonai/LightOnOCR-1B-1025"
# Download PDF from arXiv
pdf_url = "https://arxiv.org/pdf/2412.13663"
pdf_data = requests.get(pdf_url).content
# Open PDF and convert first page to image
pdf = pdfium.PdfDocument(pdf_data)
page = pdf[0]
# Render at 200 DPI (scale factor = 200/72 ≈ 2.77)
pil_image = page.render(scale=2.77).to_pil()
# Convert to base64
buffer = io.BytesIO()
pil_image.save(buffer, format="PNG")
image_base64 = base64.b64encode(buffer.getvalue()).decode('utf-8')
# Make request
payload = {
"model": MODEL,
"messages": [{
"role": "user",
"content": [{
"type": "image_url",
"image_url": {"url": f"data:image/png;base64,{image_base64}"}
}]
}],
"max_tokens": 4096,
"temperature": 0.2,
"top_p": 0.9,
}
response = requests.post(ENDPOINT, json=payload)
text = response.json()['choices'][0]['message']['content']
print(text)
Note: LightOnOCR-2 requires transformers installed from source (not yet in a stable release).
uv pip install git+https://github.com/huggingface/transformers
import torch
from transformers import LightOnOcrForConditionalGeneration, LightOnOcrProcessor
device = "mps" if torch.backends.mps.is_available() else "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.float32 if device == "mps" else torch.bfloat16
model = LightOnOcrForConditionalGeneration.from_pretrained("lightonai/LightOnOCR-2-1B-base", torch_dtype=dtype).to(device)
processor = LightOnOcrProcessor.from_pretrained("lightonai/LightOnOCR-2-1B-base")
url = "https://huggingface.co/datasets/hf-internal-testing/fixtures_ocr/resolve/main/SROIE-receipt.jpeg"
conversation = [{"role": "user", "content": [{"type": "image", "url": url}]}]
inputs = processor.apply_chat_template(
conversation,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
)
inputs = {k: v.to(device=device, dtype=dtype) if v.is_floating_point() else v.to(device) for k, v in inputs.items()}
output_ids = model.generate(**inputs, max_new_tokens=1024)
generated_ids = output_ids[0, inputs["input_ids"].shape[1]:]
output_text = processor.decode(generated_ids, skip_special_tokens=True)
print(output_text)
| Variant | Description |
|---|---|
| LightOnOCR-1B-1025 | Full multilingual model (default) |
| LightOnOCR-1B-32k | Fastest pruned-vocabulary version (32k tokens) optimized for European languages |
| LightOnOCR-1B-16k | Most compact variant with smallest vocabulary |
Transformers integration is coming soon for training and inference.
LightOnOCR is fully differentiable and sup
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.