LlamaIndex

OCRia-nano-1

Technical report · Blog post · LiteParse · OCRia-1 · ParseBench

OCRia-nano-1 is an 8.1M-parameter model pipeline for document parsing on CPU from LlamaIndex. It pairs a detector–recognizer OCR stack with LayoutNet, a joint table and layout model, and it runs inside LiteParse, the open-source local document parser. Its models are distilled from OCRia-1, our 4B document VLM, with 1/500th of its parameters.

  • Accuracy: 59.2 on ParseBench-2, ahead of the CPU parsers Indra (55.1) and Marker (52.5). It lifts LiteParse from 48.7 with Tesseract. See Benchmarks.
  • Speed: 27.8 pages per second on 16 vCPUs, 426 ms per page on one core, twice as fast as LiteParse with Tesseract.
  • Tables and layout: LayoutNet finds tables (rows, columns, spanning header cells) and classifies layout blocks (headings, lists, captions, page headers and footers) on scanned and born-digital pages.
  • Scripts: a router sends each text line to one of four recognizers: Latin, CJK, right-to-left (Arabic, Hebrew), and a world-script model for about 17 more scripts.
  • CPU runtime, everywhere LiteParse runs: the CLI, Python and Node.js on Linux, macOS and Windows, and the browser and edge runtimes through WebAssembly.

These are the model files LiteParse runs; they are not a standalone model with its own inference script. LiteParse renders the page, runs the detector, router and recognizers, merges the OCR text with the PDF text layer, runs LayoutNet, and writes Markdown or JSON with bounding boxes. Use them through LiteParse (see Quickstart).

ParseBench-2 against throughput and parameters

Examples

Text lines detected on scanned pages, colored by the recognizer the router picked for each line:

Detected lines colored by recognizer

LayoutNet's layout blocks on two multi-column pages, from the PDF text layer alone:

LayoutNet layout blocks on multi-column pages

Quickstart

Install LiteParse (pip install liteparse, npm i -g @llamaindex/liteparse or cargo install liteparse), then pull the models once. lit models pull downloads this repository's files and ONNX Runtime and checks every file against its pinned sha256; after that, OCRia-nano-1 is LiteParse's OCR backend by default.

lit models pull ocria-nano                    # once: models + ONNX Runtime (60-75 MB)
lit parse scan.pdf --format markdown          # OCR, tables and layout with OCRia-nano-1
lit parse scan.pdf --ocr-backend tesseract    # force Tesseract for one run

Python

from liteparse import LiteParse, models

models.pull("ocria-nano")
result = LiteParse(ocr_backend="ocria-nano", output_format="markdown").parse("scan.pdf")
print(result.text)

Node.js

import { LiteParse, models } from "@llamaindex/liteparse";

models.pull("ocria-nano");
const result = await new LiteParse({ ocrBackend: "ocria-nano", outputFormat: "markdown" }).parse("scan.pdf");
console.log(result.text);

Browser and edge (WebAssembly)

WASM and edge runtimes fully support OCRia-nano. You can also control which models download to minimize download sizes.

import init, { LiteParse, OcriaNano } from "@llamaindex/liteparse-wasm";
await init();

const ocria = await OcriaNano.fromUrl();   // or { scripts: ["latin"], layout: false } for 1.5 MB of models
const parser = LiteParse.withOcriaNano({ ocrEnabled: true, outputFormat: "markdown" }, ocria);
const result = await parser.parse(pdfBytes);

Input

  • PDFs, images and Office documents (through LiteParse's conversion)
  • Pages render at 250 DPI for OCR by default (--dpi changes it).
  • Language detection is automatic, the router in OCRia-nano picks a recognizer per line.

Output

LiteParse's Markdown, text or JSON. With OCRia-nano-1:

Content How it is written
Tables Markdown tables, or HTML with colspan / rowspan for spanning cells
Headings and lists Markdown headings and list items, from LayoutNet's layout classes
Page headers and footers removed from the Markdown by default, kept with --keep-headers-footers
Layout blocks with --extract-blocks, JSON blocks (heading, paragraph, table, figure, ...) with boxes and links to their text items
Words and lines JSON text items with bounding boxes and OCR confidence

How it works

Model File Role Parameters
Line detector det.onnx segmentation map of text lines, depthwise-separable 0.08M
Script router router.onnx picks a recognizer per line crop, and detects upside-down lines 0.04M
Latin recognizer rec_latin.onnx CTC, int8, supports 791 characters 0.80M
World-script recognizer rec_world.onnx CTC, about 17 scripts 0.98M
RTL recognizer rec_rtl.onnx CTC, Arabic and Hebrew 0.71M
CJK recognizer rec_cjk.onnx CTC, Chinese, Japanese and Korean 1.27M
LayoutNet tablenet.bin / tablenet.onnx 6-layer transformer over text units with a CNN image branch: table, row, column, cell and layout-block relations, 13 layout classes 4.27M
Total 8.1M

The OCR stack is 3.9M parameters. LiteParse runs the ONNX models on ONNX Runtime natively and on tract in WebAssembly.

Benchmarks

Results from the technical report. Every local system runs on the same 16-vCPU machine and throughput is measured on 300 random ParseBench pages, with one worker per core.

System (CPU) ParseBench-2 OmniParseBench ParseBench-1 olmOCR-bench BHL CER ↓ pages/s
LiteParse (Tesseract) 48.7 42.3 40.5 45.7 0.275 14.2
Indra 1.1.2 55.1 70.9 42.6 60.8 0.062 29.6
Marker 2.2.0 (fast) 52.5 69.8 40.4 60.8 0.067 24.7
LiteParse + OCRia-nano-1 59.2 74.8 52.7 60.9 0.048 27.8

ParseBench-2 v2.07 with the official parse-bench scorer (parse-bench run liteparse_ocria_nano reproduces our row); OmniParseBench v1.7, ParseBench-1 and olmOCR-bench with their own harnesses; BHL IMPACT character error rate.

ParseBench-2 by dimension

System Overall Text Formatting Tables Charts Layout Forms
LiteParse (Tesseract) 48.7 58.8 78.0 36.2 1.2 49.4 68.5
Marker 2.2.0 (fast) 52.5 62.5 75.5 43.6 3.1 61.0 69.2
Indra 1.1.2 55.1 68.4 76.1 47.6 3.1 65.2 70.2
LiteParse + OCRia-nano-1 59.2 68.5 82.2 59.5 3.1 72.4 69.8
OCRia-1 in LlamaParse (teacher, GPU) 87.0 87.0 92.7 89.9 77.4 89.2 85.6

Speed

On a 16-vCPU container (mean over five hosts, one worker per core):

Configuration ParseBench-2 pages/s ms per page, 1 core (mean / P90)
LiteParse (Tesseract) 48.7 14.2 751 / 2,420
LiteParse + PP-OCRv6 tiny 58.9 14.7 773 / 1,568
LiteParse + PP-OCRv6 small 59.9 5.7 1,963 / 4,988
Indra 1.1.2 55.1 29.6 440 / 871
Marker 2.2.0 (fast) 52.5 24.7 578 / 1,111
LiteParse + OCRia-nano-1 59.2 27.8 426 / 862
OCRia-nano-1 OCR only (no LayoutNet) 51.2 37.2 325 / 751

In WebAssembly the models run on one thread: about 1–4 s per scanned page on a laptop.

License

The weights are released under the OCRia-nano-1 Model License, based on the AI Pubs Open RAIL-M license:

  • Free for research: academic and non-profit research, teaching, evaluation and benchmarking by anyone (including publishing the results), and internal R&D that does not reach a product or production workflow.
  • Free for personal use, and for commercial use by organizations under $2M in annual revenue and under $2M in total funding.
  • Commercial license needed above those thresholds, and for any use in a document parsing, OCR or extraction product or service that competes with LlamaParse or LlamaCloud, whatever your size.

Licensing: anyone interested in licensing OCRia-nano-1 may contact LlamaIndex at https://www.llamaindex.ai/contact.

You own your outputs. LiteParse, which runs the models, is open source under the Apache License 2.0 and is not covered by this license; ONNX Runtime (MIT), which LiteParse downloads to run them, keeps its own license. See Attachment B of the license.

Citation

@techreport{markewich2026ocrianano1,
  title       = {{OCRia-nano-1}: distilling a 4B document {VLM} into an 8.1M-parameter {CPU} pipeline},
  author      = {Markewich, Logan},
  institution = {LlamaIndex},
  year        = {2026},
  url         = {https://www.llamaindex.ai/ocria/ocria-nano-1-report.pdf},
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using llamaindex/OCRia-nano-1 1