Skip to main content
Back

LlamaIndex's OCRia-nano-1 Parses Documents on a CPU at 27.8 Pages per Second

LlamaIndex released an 8.1M-parameter OCR model that runs document parsing on a single CPU core at 426ms per page with open weights.

  • LlamaIndex released OCRia-nano-1, an 8.1M parameter OCR model with open weights on Hugging Face
  • Runs at 426ms per page on a single CPU core, 27.8 pages/sec with 16 workers
  • Combines seven specialist models: line detector, script router, four recognizers, and LayoutNet
  • Scores 59.2 overall on ParseBench-2, beating Tesseract, Marker, PP-OCRv6 tiny on CPU
  • Install via LiteParse: pip install, pull model, parse to Markdown or JSON
  • Skip it for charts, handwriting, or math-heavy scans. Use OCRia-1 instead

LlamaIndex has released OCRia-nano-1, an open-weight document parser with 8.1 million parameters. It runs on CPUs and handles text recognition, table reconstruction, and page-layout recovery without a GPU, cloud API, or vision-language model.

Conventional OCR engines extract text quickly but often lose tables and layout, while vision-language models require more compute and add latency. LlamaIndex positions Nano as the first pass for large document collections, with larger models handling complex or degraded pages.

426 milliseconds per page

LlamaIndex reports an overall score of 59.2 on ParseBench-2, including 59.5 for tables. A single-core worker averaged 426 milliseconds per page, with 90% of measured pages completing within 862 milliseconds.

Metric Reported result
ParseBench-2 overall score 59.2
Table score 59.5
Mean single-core latency 426 ms per page
90th-percentile latency 862 ms per page
Throughput with 16 workers 27.8 pages per second
Throughput comparison About 2× LiteParse’s default Tesseract configuration

The overall score aggregates ParseBench-2’s quality measures, so production error rates will depend on the document mix. CPU model, available memory, rasterization settings, page resolution, and worker count can also change latency and throughput, making local replication necessary before capacity planning.

Scatter plot comparing the accuracy and speed of lightweight CPU document parsers
Reported ParseBench-2 accuracy and speed for lightweight CPU parsers.

The team places Nano on the accuracy-speed Pareto frontier among the tested lightweight parsers. In plain terms, no tested alternative was both faster and more accurate under the reported setup. The comparison includes PP-OCRv6 tiny, Marker, Indra, and standard Tesseract configurations across five quality benchmarks.

Benchmark table comparing OCRia-nano-1 with other document parsers
Detailed benchmark results published with the release.

Seven small models split the work

Nano combines seven specialized models inside LiteParse, dividing the pipeline into native-text extraction, optical character recognition, and layout recovery.

  1. PDFium checks the text layer. Digital PDFs retain their embedded text when it is usable, avoiding unnecessary OCR.
  2. A 3.8-million-parameter OCR stack handles scanned pages. It contains an 82,000-parameter line detector, a 38,000-parameter script router, and four recognizers ranging from roughly 700,000 to 1.3 million parameters. The recognizers cover Latin, CJK, right-to-left, and other scripts.
  3. LayoutNet reconstructs the page. The 4.3-million-parameter model maps OCR results and native text onto a grid, then recovers tables and content blocks.

The script router selects a page’s dominant script, allows confident lines to override that choice, and detects upside-down pages before recognition. This keeps each text line with the smallest suitable recognizer instead of running every script model.

Training used knowledge distillation from the larger OCRia-1 model. In this process, the larger teacher generated text transcriptions, table annotations, and layout labels used to train the smaller models.

Three commands to first output

LiteParse is the Apache 2.0 Rust parser that hosts Nano. Installation, model download, and parsing use the following commands:

pip install liteparse
lit models pull ocria-nano
lit parse doc.pdf --format markdown

The parser produces Markdown, JSON, or plain text. JSON output includes bounding boxes for extracted spans, allowing retrieval-augmented generation systems to connect an answer or citation to its location on the source page.

LiteParse provides Python, Node.js, Rust, and WebAssembly bindings. It accepts image inputs and uses LibreOffice conversion for Word, PowerPoint, and Excel files. Once the package and model weights are staged locally, parsing can run without network access or document egress.

Pages that need a heavier route

The release targets routine business documents and standard layouts. LlamaIndex recommends OCRia-1 when accuracy takes priority over CPU latency, particularly for handwriting, damaged scans, mathematical notation, and unusually complex tables.

Document content Nano’s behavior Recommended handling
Digital PDFs with embedded text Extracts native text and recovers layout Use Nano as the default parser
Scans with common scripts and standard tables Runs the OCR and layout models Benchmark against representative pages
Handwriting, degraded scans, complex tables, or mathematical notation Falls outside the model’s primary scope Route to OCRia-1 or another specialist
Charts Preserves them as images without structured extraction Add a chart extraction stage

Academic papers dominated by equations and financial reports filled with charts therefore need an escalation path. A production pipeline can run Nano first, apply page-level quality checks, and send empty, malformed, or unsupported results to a larger model.

The code and weights use different licenses

Component License Deployment implication
LiteParse Apache 2.0 The parser code can be used, modified, and distributed under Apache 2.0 terms.
OCRia-nano-1 weights Modified Open RAIL-M The model’s additional use terms apply to deployment and distribution.

Commercial and regulated deployments need to evaluate the weight license separately from LiteParse’s code license. The local architecture supports air-gapped and data-residency-sensitive environments after dependencies and weights have been transferred into the environment.

A sustained rate of 27.8 pages per second would equal roughly 100,000 pages per hour across 16 single-core workers under the reported conditions. The practical deployment pattern is a CPU-first parser for routine pages, backed by targeted escalation for documents that require handwriting, equation, chart, or advanced table analysis.