Merged bbox variant (advanced).
This model combines OCR-improving RLVR signals with bounding-box-focused RLVR updates via joint merging, preserving OCR quality while providing image localization.
About LightOnOCR-2
LightOnOCR-2 is an efficient end-to-end 1B-parameter vision-language model for converting documents (PDFs, scans, images) into clean, naturally ordered text without relying on brittle pipelines. This second version is trained on a larger and higher-quality corpus with stronger French, arXiv, and scan coverage, improved LaTeX handling, and cleaner normalization. LightOnOCR-2 achieves state-of-the-art performance on OlmOCR-Bench while being ~9× smaller and significantly faster than competing approaches.
Highlights
⚡
Speed:
3.3× faster than Chandra OCR, 1.7× faster than OlmOCR, 5× faster than dots.ocr, 2× faster than PaddleOCR-VL-0.9B, 1.73× faster than DeepSeekOCR
💸
Efficiency:
Processes 5.71 pages/s on a single H100 (~493k pages/day) for
<$0.01 per 1,000 pages
🧠
End-to-End:
Fully differentiable, no external OCR pipeline
🧾
Versatile:
Handles tables, receipts, forms, multi-column layouts, and math notation
import base64
import requests
import pypdfium2 as pdfium
import io
ENDPOINT = "http://localhost:8000/v1/chat/completions"
MODEL = "lightonai/LightOnOCR-2-1B-bbox-soup"# 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)
Rendering and Preprocessing Tips
Render PDFs to
PNG
or
JPEG
at a target longest dimension of
1540px
Maintain aspect ratio to preserve text geometry
Use one image per page; batching supported by vLLM
Fine-tuning
LightOnOCR-2 is fully differentiable and supports:
LoRA fine-tuning
Domain adaptation with image localization requirements
Multilingual fine-tuning with task-specific corpora
For fine-tuning with bounding boxes, we recommend starting with
LightOnOCR-2-1B-bbox-base
instead of this merged variant.
License
Apache License 2.0
Citation
@misc{lightonocr2_2026,
title = {LightOnOCR: End-to-End, Multilingual, Efficient, State-of-the-Art Vision-Language Model for OCR},
author = {Said Taghadouini and Adrien Cavaill\`{e}s and Baptiste Aubertin},
year = {2026},
howpublished = {\url{https://huggingface.co/blog/lightonai/lightonocr-2}}
}
Runs of lightonai LightOnOCR-2-1B-bbox-soup on huggingface.co
17.5K
Total runs
-620
24-hour runs
501
3-day runs
1.8K
7-day runs
8.1K
30-day runs
More Information About LightOnOCR-2-1B-bbox-soup huggingface.co Model
More LightOnOCR-2-1B-bbox-soup license Visit here:
LightOnOCR-2-1B-bbox-soup huggingface.co is an AI model on huggingface.co that provides LightOnOCR-2-1B-bbox-soup's model effect (), which can be used instantly with this lightonai LightOnOCR-2-1B-bbox-soup model. huggingface.co supports a free trial of the LightOnOCR-2-1B-bbox-soup model, and also provides paid use of the LightOnOCR-2-1B-bbox-soup. Support call LightOnOCR-2-1B-bbox-soup model through api, including Node.js, Python, http.
LightOnOCR-2-1B-bbox-soup huggingface.co is an online trial and call api platform, which integrates LightOnOCR-2-1B-bbox-soup's modeling effects, including api services, and provides a free online trial of LightOnOCR-2-1B-bbox-soup, you can try LightOnOCR-2-1B-bbox-soup online for free by clicking the link below.
lightonai LightOnOCR-2-1B-bbox-soup online free url in huggingface.co:
LightOnOCR-2-1B-bbox-soup is an open source model from GitHub that offers a free installation service, and any user can find LightOnOCR-2-1B-bbox-soup on GitHub to install. At the same time, huggingface.co provides the effect of LightOnOCR-2-1B-bbox-soup install, users can directly use LightOnOCR-2-1B-bbox-soup installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
LightOnOCR-2-1B-bbox-soup install url in huggingface.co: