alt.freeweights.text / LightOnOCR-2-1B
From: lightonai <huggingface.co/lightonai>Newsgroups: alt.freeweights.textSubject:

LightOnOCR-2-1B

Date: 2026-11-15Commit: be7c413Signed: 2DC28CC7B26A283B ✓

Image text to text model with 1B parameters. Safetensors weights, 2.02 GB in all. Published by lightonai under Apache-2.0.

1B params2.02GBLightOnOCR-2-1Bsafetensorspermissive
FactsParams1BSize2.02 GBFormatssafetensorsTaskimage text to textLicenseApache-2.0From sourcepermissive
$ fw get lightonai/LightOnOCR-2-1B
# manifest sha256 eb31931ee689… · 2.02 GB · 16 files
$ fw verify ./LightOnOCR-2-1B lightonai/LightOnOCR-2-1B
From sourceHosted (signed)lightonai/LightOnOCR-2-1BLast check: 2026-11-15 02:26 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Overview

Size
2.02 GB
Weights
2.01 GB (safetensors)
Parameters
1B
Formats
safetensors
Task
image text to text
License
Apache-2.0 (permissive)
Files
16, each with a sha256
Publisher
lightonai
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commitโ†’You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 02:26 UTCpassed

Model card

From the publisher at commit be7c413. Shown as plain text with links; images open at the publisher.

Image: LightOnOCR-2-1B Banner


Website LinkedIn X

๐Ÿ“„ Paper | ๐Ÿ“ Blog | ๐Ÿš€ Demo | ๐Ÿ“Š Dataset | ๐Ÿ““ Finetuning

LightOnOCR-2-1B#

Best OCR model . LightOnOCR-2-1B is LightOn's flagship OCR model, refined with RLVR training for maximum accuracy. We recommend this variant for most OCR tasks.

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
  • ๐Ÿ“ Image detection: Predicts bounding boxes for embedded images (bbox variants)

๐Ÿ“„ Paper | ๐Ÿ“ Blog Post | ๐Ÿš€ Demo | ๐Ÿ“Š Dataset | ๐Ÿ“Š BBox Dataset | ๐Ÿ““ Finetuning Notebook | LightOn blog entry


Model Variants#

VariantDescription
LightOnOCR-2-1BBest OCR model
LightOnOCR-2-1B-baseBase model, ideal for fine-tuning
LightOnOCR-2-1B-bboxBest model with image bounding boxes
LightOnOCR-2-1B-bbox-baseBase bbox model, ideal for fine-tuning
LightOnOCR-2-1B-ocr-soupMerged variant for extra robustness
LightOnOCR-2-1B-bbox-soupMerged variant: OCR + bbox combined

Benchmarks#

Image: OlmOCR-Bench Results

See the paper for full benchmark details and methodology.


Usage with Transformers#

Note: LightOnOCR-2 is avaible in latest transformers release starting from v5.

uv pip install transformers # => 5.0.0
uv pip install pillow pypdfium2
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", torch_dtype=dtype).to(device)
processor = LightOnOcrProcessor.from_pretrained("lightonai/LightOnOCR-2-1B")

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)

Usage with vLLM#

vllm serve lightonai/LightOnOCR-2-1B \
    --limit-mm-per-prompt '{"image": 1}' --mm-processor-cache-gb 0 --no-enable-prefix-caching
import base64
import requests
import pypdfium2 as pdfium
import io

ENDPOINT = "http://localhost:8000/v1/chat/completions"
MODEL = "lightonai/LightOnOCR-2-1B"

# 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 at 200 DPI to images using a target longest dimension of 1540px
  • Maintain aspect ratio to preserve text geometry

Fine-tuning#

LightOnOCR-2 is fully differentiable and supports:

  • LoRA fine-tuning
  • Domain adaptation (receipts, scientific articles, forms, etc.)
  • Multilingual fine-tuning with task-specific corpora

For fine-tuning, we recommend starting with the LightOnOCR-2-1B-base variant.


License#

Apache License 2.0


Acknowlegments#

The project received funding from the BPI Scribe project.


Citation#

@misc{lightonocr2_2026,
  title        = {LightOnOCR: A 1B End-to-End Multilingual Vision-Language Model for State-of-the-Art OCR},
  author       = {Said Taghadouini and Adrien Cavaill\`{e}s and Baptiste Aubertin},
  year         = {2026},
  howpublished = {\url{https://arxiv.org/abs/2601.14251}}
}

Downloads EU

Files

16 files ยท 2.02 GBWeights 2.01 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 16 files with their sha256
FileSizesha256
.eval_results/mdpbench.yaml5.00 KB32b7297301bb5a9ab1832e1a0a85cbaddc4c6c891321f93e107bebfb9aedbecb
.eval_results/olmocrbench.yaml2.13 KB778f5089c7f10555bcb8fa6a915dfab7695bb619284966615ef4c5f545c5137b
.eval_results/parsebench.yaml1.56 KBd823f4f4ffbc0d1af85ef9a0f67f1fee8cff221b4072f988f8ca4d2c40bb3fac
.gitattributes1.68 KB5c07eeea89802ab6212aac209440c1f5ef8e0172dd885f18b5ec6912e255ceb3
README.md7.95 KBd1f6210e238042fa858dc7a8449b40f7e973c7ceca20b2de9f0b0e5523f68394
added_tokens.json707 Bc0284b582e14987fbd3d5a2cb2bd139084371ed9acbae488829a1c900833c680
benchmark.png327 KB588f08c83690be0564e0275a369911b17fae02c4bfaac46a243323bd4efe23b8
chat_template.jinja720 B0942a43ee0ba48a608814e0b40ac9cb70bcc29ea72f19c84b1bf2597f05aa2bd
config.json2.36 KB43b62f9ec0a7207f67fd032f7ef9719fa8b6b44d7b3cf20fbc2346329493ff3a
generation_config.json219 B7d2566b271454af41e9ebc28851888e1ec7ca33a53fe644dac207856df952981
lightonocr-banner.png351 KBe32c44dc131d4e07b344a41bb9651eb97ce4ce73d4e78463821267467810462c
model.safetensors2.01 GBcbe12d0831cca119facce91268fc7c5fb72babdf919a6e352e3131bda85c8fbb
processor_config.json1.02 KB5292a61a089835ec6884836e3896bba1fc571c60df872e3ca9eb45bd3288910d
special_tokens_map.json613 B76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd
tokenizer.json11.4 MBf54b55fa0c3aba0c91ce09ea79ae4e62da24e2a1a630f96c4bae34aba25e234a
tokenizer_config.json5.56 KB31f5876fbfe2bba0d931d540b84f4ffa03eb7c364d31858c38d1bf2c2fff97f3
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
be7c41313c pinned now2026-11-15 02:26 UTC16 files ยท 2.02 GB

Use it

$ fw get lightonai/LightOnOCR-2-1B
# manifest sha256 eb31931ee689… · 2.02 GB · 16 files
$ fw verify ./LightOnOCR-2-1B lightonai/LightOnOCR-2-1B
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/lightonai/LightOnOCR-2-1B.json --dir ./LightOnOCR-2-1B $ python3 fw.py verify ./LightOnOCR-2-1B ./lightonai__LightOnOCR-2-1B.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download lightonai/LightOnOCR-2-1B --revision be7c41313c30e940fe5571de59e5fabc779e00c8 --local-dir ./LightOnOCR-2-1B
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForImageTextToText, AutoProcessor processor = AutoProcessor.from_pretrained("lightonai/LightOnOCR-2-1B", revision="be7c41313c30e940fe5571de59e5fabc779e00c8") model = AutoModelForImageTextToText.from_pretrained("lightonai/LightOnOCR-2-1B", revision="be7c41313c30e940fe5571de59e5fabc779e00c8", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve lightonai/LightOnOCR-2-1B --revision be7c41313c30e940fe5571de59e5fabc779e00c8

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
d1f6210e238042fa858dc7a8449b40f7e973c7ceca20b2de9f0b0e5523f68394
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: lightonai <huggingface.co/lightonai>Newsgroups: alt.freeweights.textSubject: LightOnOCR-2-1BDate: 2026-11-15Commit: be7c413Signed: 2DC28CC7B26A283B ✓
Upstream
lightonai/LightOnOCR-2-1B
Pinned commit
be7c41313c30e940fe5571de59e5fabc779e00c8
Manifest
LightOnOCR-2-1B.json ยท .minisig
Manifest sha256
eb31931ee689fa374e89b78c46bacb7f70927f1eeca03dd6088181aae5a40b40
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:26 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/lightonai/LightOnOCR-2-1B.json $ curl -O https://freeweights.allternit.com/manifests/lightonai/LightOnOCR-2-1B.json.minisig $ minisign -Vm LightOnOCR-2-1B.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

1 model in the catalog name this one as their parent.

Quantizations
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download lightonai/LightOnOCR-2-1B
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. LightOnOCR-2-1B.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of LightOnOCR-2-1B. Each has its own license check and page.

From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B