All models

LightOn

LightOnOCR-3 4B

About

LightOnOCR-3 4B is a 4.5B open-weight model from LightOn. Page to Markdown, or labeled blocks with boxes in one call. It accepts text, images, and documents. Context window is 16K. Released October 6, 2026.

  • Parameters

    4.5B

    Published parameter count.

  • Context window

    16K

    Tokens of context on a request.

  • License

    Apache-2.0

    License on the weights.

Pricing

Token rates are US dollars per 1M tokens. Image rates are per 1K images. Audio rates are per 1M audio seconds.

RatePrice
Input / 1M$0.20
Cached input / 1M$0.20
Output / 1M$0.50

Compare

LightOnOCR-3 4B is one of the catalog's OCR models. The table is each model's published price, size, and context.

ModelWhat it doesPriceParametersContext
LightOnOCR-3 4BPage to Markdown, or labeled blocks with boxes in one call.$0.20 / 1M input4.5B16K
PP-OCRv6PaddleOCR PP-OCRv6 medium text detection and recognition; scene OCR JSONL on image chat; text returns plain text; document_url fan-out via text.$0.02 / 1M input20M—
DeepSeek-OCR-2DeepSeek OCR 2 and markdown extraction.$0.25 / 1M input3.4B32K
dots.mocrMultilingual document layout parsing and markdown OCR.$0.20 / 1M input3B32K

Benchmarks

Published scores for LightOnOCR-3 4B, from the LightOnOCR-3 post.

Evals
ReadingExample
QualitativeClear structure, grounded in the input
QuantitativeolmOCR-Bench overall: 86.3.
Cost and performanceLower listed rate, mid-pack latency

Performance

Latency is the end-to-end round trip. Throughput is completion tokens divided by that time. It is a request rate, not decode speed.

  • Latency

    7,925 ms

  • Throughput

    —

  • Requests

    358

Supported inputs

  • textIgnored

    A text part beside the media is accepted and ignored. A request with no media part is a 400.

  • image_urlYes

    One per request. A second image_url part is a 400.

  • video_urlNo

    Not accepted.

  • document_urlYes

    A PDF, up to 128 pages, rasterized per page at document_dpi (default 96). See Document Inputs.

  • Default method markdown. grounding and layout return the page as blocks, each with a label and a box.
  • Context window 16,384 tokens, with a maximum output of 4,096 tokens.
  • Weights: lightonai/LightOnOCR-3-4B, a 4.5B fine-tune of Qwen3.5-4B. Aliases are listed below.

Methods

Methods this model serves. Payload shapes are in the docs.

MethodReturns
markdownReading-order Markdown string (default). Tables come back as HTML.
groundingBlock items with bbox_xywh, label, and text
layoutRegion items with bbox_xywh, label, and order, no text

Text mode emits the payload alone for one image, and one <document> / <page> block per PDF, each page declaring its kind in format. In JSON mode an image content is the string or the container above, and a document page content is always doc.page.blocks. See Methods & Response Format.

layout is the grounding call with the text dropped, so it bills the same output tokens. grounding writes about 25% more output tokens than markdown. The model grounds on a fixed 0-1000 grid; the Gateway normalizes every box to 0-1 against the image or rasterized page.

Grounding

grounding returns what is on the page and where it is, in one call. Send the media alone; the method picks the prompt:

response = client.chat.completions.create(
    model="lightonai/lightonocr-3-4b",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/document.invoice/invoice_1.jpg"
                    },
                },
            ],
        }
    ],
    extra_body={"method": "grounding"},
)

print(response.choices[0].message.content)

The reply is the block container, alone in text mode and under content in JSON mode. Trimmed to four blocks:

{"object": "doc.page.blocks", "items": [{"block_id": 2, "bbox_xywh": [0.623, 0.112, 0.194, 0.034], "label": "title", "text": "## INVOICE"}, {"block_id": 3, "bbox_xywh": [0.514, 0.187, 0.22, 0.028], "label": "text", "text": "**Date:** November 11, 2023 **Invoice #** 9999999"}, {"block_id": 9, "bbox_xywh": [0.571, 0.639, 0.26, 0.099], "label": "table", "text": "<table><tr><td>Subtotal</td><td>400.00</td></tr></table>", "text_format": "html"}, {"block_id": 10, "bbox_xywh": [0.323, 0.777, 0.275, 0.013], "label": "footer", "text": "THANK YOU FOR YOUR BUSINESS!"}]}
LabelText
text, title, list, header, footer, page_number, footnote, caption, code, aside_textMarkdown
table, chartHTML, with text_format: "html". A chart becomes a table of its data points.
formulaLaTeX
image, header_image, footer_imageA one-line description of the image

A trailing + on a label marks a block that continues the one before it. On a PDF each page's content is doc.page.blocks with the same items. Set method="layout" for the boxes and labels alone.

Aliases

lightonai/lightonocr-3-4b (preferred), lightonocr-3-4b, and lightonai/LightOnOCR-3-4B all resolve to this model.

Estimate cost

Estimate. A page is 2,500 input tokens and 1,000 output tokens.

$1.00

Quick start

Call this model on the OpenAI-compatible gateway. The model id is already filled in.

from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.vlm.run/v1/openai",
    api_key="<VLMRUN_API_KEY>",
)

response = client.chat.completions.create(
    model="lightonai/lightonocr-3-4b",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "document_url",
                    "document_url": {
                        "url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/finance.sec-filings/tsla-8k.pdf"
                    },
                },
            ],
        }
    ],
    extra_body={"method": "markdown"},
)

print(response.choices[0].message.content)

Response

One <document> block per PDF, one <page> block per page. A failed page is self-closing, with status="error" and no body:

tsla-8k.pdf2 pages

Page 0

Annual Report 2024

Overview

The company reported revenue of $1.2M.

Metric20232024
Revenue0.9M1.2M

Page 1 · failed

This page returned no body.

A single image returns the Markdown string alone, with no wrapper.

Get an API key. Ship vision today.