[Models](/models)/lightonai/LightOnOCR-3-4B

Apache 2.0

# LightOnOCR-3-4B

by lightonai

LightOn's 4B OCR model that turns a page image into Markdown, with optional labeled bounding boxes, image descriptions and chart data as tables

82likes

4B class (about 4.54B in the BF16 weights)params

[HuggingFace](https://huggingface.co/lightonai/LightOnOCR-3-4B)[Run it on your own data, free](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=model_page&utm_campaign=mvs_onramp)

Identifiers

Model ID

`lightonai/LightOnOCR-3-4B`

## Deploy LightOnOCR-3-4B

Single-tenant

Mixpeek has no managed extractor for this model. On a single-tenant deployment you upload the weights and a custom plugin serves them next to the rest of your pipeline.

[Read the customer-hosted guide](https://mixpeek.com/docs/customer-hosted/overview) [Talk to us about single-tenant](/demo)

## Overview

LightOnOCR-3-4B reads a scanned or rendered document page and writes its text out as Markdown. Called with the prompt "grounding", it also puts a label and a bounding box in front of every block, describes each image in a sentence, and turns each chart into an HTML table of its data points. It is the largest of LightOn's three LightOnOCR-3 models, released in October 2026 under Apache 2.0, and the one LightOn recommends for most OCR work.

LightOn's launch post reports 86.3 on olmOCR-Bench, 75.1 on ParseBench (five-category overall) and 74.1 on the French fr-bench-pdf2md. These are LightOn's own runs, scored after normalization functions they publish in the LightOnOCR repository, and the post says normalization changes scores noticeably for every top model. On olmOCR-Bench it sits 1.3 points behind Infinity Parser Pro, a 35.1B model, and 0.5 points ahead of Chandra 2 at the same 4B size.

For search, the grounding mode is the useful part. Each block arrives with its type (title, table, chart, footnote and 12 other labels) and its position on the page, so you can index a page block by block, filter out headers and footers, and point a search result at the exact region that answered it.

## Architecture

Qwen3.5 vision-language architecture, loaded with Qwen3\_5ForConditionalGeneration (Transformers 5.2 or later). Per the repo's config.json: a 24-layer vision encoder (hidden size 1024, 16-pixel patches) projecting into a 32-layer language model (hidden size 2560, 248,320-token vocabulary). About 4.54B parameters in BF16 safetensors. Trained and evaluated with thinking disabled. Two prompt modes: an empty prompt for plain transcription, or "grounding" for blocks prefixed with !\[label\](x0,y0,x1,y1), coordinates normalized to 0-1000. LightOn says other instructions are out of distribution.

## Mixpeek SDK Integration

IngestRetrieve

\# LightOnOCR-3-4B runs on your side, as in the model card: render PDF pages
# at 400 DPI with a 2048 px longest edge, then call the model with the
# "grounding" prompt. No Mixpeek extractor runs these weights.
import re, requests, torch
from transformers import AutoProcessor, Qwen3\_5ForConditionalGeneration

model\_id = "lightonai/LightOnOCR-3-4B"
model = Qwen3\_5ForConditionalGeneration.from\_pretrained(model\_id, dtype=torch.bfloat16, device\_map="auto")
processor = AutoProcessor.from\_pretrained(model\_id)

conversation = \[{"role": "user", "content": \[
    {"type": "image", "url": "https://your-cdn.example.com/reports/2026-q3/page-004.png"},
    {"type": "text", "text": "grounding"},
\]}\]
inputs = processor.apply\_chat\_template(
    conversation, add\_generation\_prompt=True, tokenize=True,
    return\_dict=True, return\_tensors="pt", enable\_thinking=False,
).to(model.device)
output\_ids = model.generate(\*\*inputs, max\_new\_tokens=1024, do\_sample=True, temperature=0.2)
page = processor.decode(output\_ids\[0, inputs\["input\_ids"\].shape\[1\]:\], skip\_special\_tokens=True)

# Each block starts with !\[label\](x0,y0,x1,y1). Upload one object per block to
# a bucket whose collection uses features: \["text\_search"\] (text\_extractor,
# E5-Large). The text extractor reads up to 512 tokens, so block-sized
# objects keep long pages from being truncated. List source\_key, page, label
# and bbox in the collection's field\_passthrough so they reach each document.
MARK = re.compile(r"!\\\[(\[a-z\_\]+\\+?)\\\]\\((\\d+),(\\d+),(\\d+),(\\d+)\\)\\n")
parts = MARK.split(page)
for i in range(1, len(parts), 6):
    label, x0, y0, x1, y1, text = parts\[i:i + 6\]
    if label.rstrip("+") in ("header", "footer", "page\_number"):
        continue
    requests.post(
        "https://api.mixpeek.com/v1/buckets/bkt\_your\_bucket/objects",
        headers={"Authorization": "Bearer API\_KEY", "X-Namespace": "ns\_your\_namespace"},
        json={
            "key\_prefix": "/reports/2026-q3",
            "blobs": \[{"property": "block\_text", "type": "text", "data": text.strip()}\],
            "source\_key": "reports/2026-q3.pdf", "page": 4, "label": label,
            "bbox": \[int(x0), int(y0), int(x1), int(y1)\],
        },
    )

## Capabilities

*   Page image to Markdown text with an empty prompt, the same interface as LightOnOCR-2
*   Grounding mode: every block gets one of 16 labels plus a bounding box
*   Short descriptions for image regions
*   Charts and graphs converted to HTML tables of their data points
*   Tables, forms, receipts, multi-column layouts and math notation
*   Serves with vLLM or Transformers; Apache 2.0 for research and commercial use

## Use Cases on Mixpeek

Making scanned PDFs, slide exports and receipts searchable by their text

Indexing a long report block by block, so a hit points at the paragraph or table that matched

Answering questions about charts by searching the data table the model extracted

Dropping page headers, footers and page numbers before embedding, using the block labels

## Benchmarks

Dataset

Metric

Score

Source

olmOCR-Bench

Overall

86.3

LightOn launch post (vendor-run, LightOn's published normalization)

olmOCR-Bench, Infinity Parser Pro (35.1B)

Overall

87.6

LightOn launch post (vendor-run comparison)

olmOCR-Bench, Chandra 2 (4B)

Overall

85.8

LightOn launch post (vendor-run comparison)

ParseBench

Overall (5 categories)

75.1

LightOn launch post (vendor-run)

ParseBench

Charts

66.1

LightOn launch post (vendor-run)

fr-bench-pdf2md

Overall

74.1

LightOn launch post (vendor-run)

## Performance

Input SizePage images; the card recommends 400 DPI rendering with a 2048 px longest edge

Embedding Dimn/a (generates text)

GPU LatencyInput dependent

GPU Throughput3.36 pages/s on one H100 at 1540 px (LightOn launch post, vLLM 0.30.0)

GPU MemoryModel dependent

Throughput is LightOn's measurement on the 512 olmOCR-Bench pages; at 400 DPI with a 5 MP cap, about 4.8k image tokens per page, peak throughput is lower. The card says grounding mode adds about 25% output tokens (1,433 against 1,158 per page on average). We have not measured it.

## Common Pipeline Companions

[

intfloat/multilingual-e5-large-instruct

The text embedder behind Mixpeek's text\_search feature, for the extracted blocks

](/model/intfloat/multilingual-e5-large-instruct)[

lightonai/LightOnOCR-2-1B

The previous generation; LightOnOCR-3 keeps its empty-prompt interface

](/model/lightonai/LightOnOCR-2-1B)[

tencent/EVIE-4.5B

Searches page images directly, to compare against OCR-then-embed on the same documents

](/model/tencent/EVIE-4.5B)

## Frequently Asked Questions

### What is LightOnOCR-3-4B?

An open OCR model from LightOn that converts a document page image into Markdown text. With the "grounding" prompt it also returns a label and bounding box for every block, a short description of each image and chart data as tables. It is the largest of three LightOnOCR-3 sizes and is released under Apache 2.0.

### How accurate is LightOnOCR-3-4B?

LightOn's launch post reports 86.3 on olmOCR-Bench, 75.1 on ParseBench and 74.1 on fr-bench-pdf2md. LightOn ran these evaluations and applied its own published normalization before scoring, so check the model on your own documents before relying on the ranking.

### Which LightOnOCR-3 size should I use?

LightOn recommends the 4B for most OCR tasks. The 0.8B shares the Qwen3.5 architecture and scores 85.5 on olmOCR-Bench in LightOn's runs; the 1B keeps the LightOnOCR-2 architecture as a drop-in upgrade for existing deployments.

### Can I use LightOnOCR-3-4B commercially?

Yes. The model card and launch post state Apache 2.0 for research and commercial use.

### How do I search documents parsed by LightOnOCR-3-4B?

Run the model with the grounding prompt, split its output into blocks and upload each block to a Mixpeek bucket as a text object with its page, label and bounding box. A collection with the text\_search feature embeds each block, and a retriever searches them and returns the page and region that matched.

## Explore on Mixpeek

[

Browse all models

Search the full model catalog

](/models)[

Feature Extractors

See how Mixpeek runs models as extractors

](/extractors)[

Mixpeek Vector Store

Store & search embeddings at scale

](/mvs)[

Pricing

Usage-based pricing for pipelines

](/pricing)[

All Curated Lists

Compare models, APIs & infrastructure

](/curated-lists)

### Specification

Organizationlightonai

Retriever\-

Parameters4B class (about 4.54B in the BF16 weights)

LicenseApache 2.0

Downloads/moN/A

Likes82

[

### Research Paper

LightOnOCR-3: High-Performance OCR and Layout Extraction in One Model (LightOn, October 2026)

arxiv.org](https://huggingface.co/blog/lightonai/lightonocr-3)

### Build a pipeline with LightOnOCR-3-4B

Add this model to a processing pipeline alongside other extractors. Combine with retrieval stages for end-to-end search.

[Run it on your own data, free](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=model_page&utm_campaign=mvs_onramp)