NEWVectors or files. Pick a path.Start →
    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
    Identifiers
    Model ID
    lightonai/LightOnOCR-3-4B
    Feature URI

    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.

    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

    # 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

    DatasetMetricScoreSource
    olmOCR-BenchOverall86.3LightOn launch post (vendor-run, LightOn's published normalization)
    olmOCR-Bench, Infinity Parser Pro (35.1B)Overall87.6LightOn launch post (vendor-run comparison)
    olmOCR-Bench, Chandra 2 (4B)Overall85.8LightOn launch post (vendor-run comparison)
    ParseBenchOverall (5 categories)75.1LightOn launch post (vendor-run)
    ParseBenchCharts66.1LightOn launch post (vendor-run)
    fr-bench-pdf2mdOverall74.1LightOn 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.

    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.

    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

    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