In partnership with

❝

Most people assume good document parsing now means a GPU and a vision-language model. LlamaIndex's OCRia-nano-1 does it with seven small models totaling 8.1M parameters, about 500 times smaller than its own 4B sibling, on ordinary CPU cores. It beats Marker on ParseBench-2. The interesting part is not that it is small. It is how the smallness is spent.

SnackOnAI Engineering | Senior AI Systems Researcher | Technical Deep Dive | November 29, 2026

Found this useful?
A tip keeps the deep-dives free for everyone.
$0 of $10,000 · 0 supporters
$1,000 Silver
$5,000 Gold
$10,000 Platinum
Other amount

Promise and Fence

The promise: by the end of this issue you will know how OCRia-nano-1 splits parsing into seven specialist models, why its parameter budget goes mostly to tables rather than reading, and where 8.1M parameters stop being enough.

The fence: this is not a LlamaParse pitch and not a GPU-model comparison. I cloned run-llama/liteparse at commit 44ceb6a (Nov 25, 2026) and read the Rust pipeline: detector, router, recognizers and LayoutNet. I estimated each model's size from the pinned file manifest and ranked the ParseBench leaderboard CSV myself. The technical report PDF was unreachable from my sandbox, as was the Hugging Face model page, so I did not run the models. Headline benchmark numbers are the report's, as reproduced in LiteParse's README.

What It Actually Does

OCRia-nano-1 is the optional model pack for LiteParse, LlamaIndex's open-source Rust PDF parser. LiteParse alone extracts the PDF text layer in about 2 to 5 ms per page, but it had no layout model and fell back to Tesseract for scans. One command changes that:

lit models pull ocria-nano     # 60-75 MB: models + ONNX Runtime, sha256-pinned
lit parse scan.pdf             # now the default OCR backend, pages rendered at 250 dpi

After that, every page that needs it runs a seven-model pipeline in-process on CPU through ONNX Runtime. The same models also run in the browser through the WASM build. The weights come under a modified OpenRAIL license, separate from LiteParse's Apache 2.0.

System (CPU)

ParseBench-2

olmOCR-bench

BHL char error ↓

pages/s (16 vCPU)

LiteParse + OCRia-nano-1

59.2

60.9

0.048

27.8

Indra 1.1.2

55.1

60.8

0.062

29.6

Marker 2.2.0 (fast)

52.5

60.8

0.067

24.7

LiteParse + Tesseract (default)

48.7

45.7

0.275

14.2

+10.5 points over its own Tesseract default at twice the speed, +6.7 over Marker. On olmOCR-bench the three leaders sit within 0.1 points of each other.

The Architecture, Unpacked

Read the parameter column: the model that reads English is the smallest of the four readers, about 0.24M parameters. More than half the budget goes to LayoutNet, which reads no pixels of text at all. It decides which words belong in the same table cell.

Three decisions shape the system.

1. Specialists instead of one generalist. A single multilingual recognizer would have to carry Latin, CJK, Arabic, Hebrew and 17 more scripts in every forward pass. OCRia-nano-1 routes each line to one of four recognizers, so a Latin-only page never pays for a 1.27M-parameter CJK vocabulary.

2. Use the PDF when it can be trusted. Born-digital pages already carry exact text. The pipeline OCRs only what needs it and merges the results with the native text layer, which is why LiteParse alone parses about 2 to 5 ms per page with OCR off.

3. Tables as a graph problem. LayoutNet does not draw boxes on pixels. It treats each text unit as a node, runs a small transformer over all of them, and predicts for every pair whether they share a table, row, column or cell. That is why it scales with N² and is skipped above 1,500 units.

The Code, Annotated

The script rescue (real code, ocr/ocria/mod.rs, trimmed)

let mut dom = page::majority(&groups);
// a routed reading this confident is a real reading, not the 0.5-0.7 junk of the wrong recognizer
const KEEP_CONF: f32 = 0.75;
if self.opts.rescue && dom == 0 {                        // page was routed to LATIN
    // A whole page of another script sent to the Latin recognizer reads as
    // confident-looking junk at 0.5-0.7; the right recognizer scores 0.83-0.90.
    const RESCUE_CONF: f64 = 0.75;
    const RESCUE_MARGIN: f64 = 0.15;
    const RESCUE_SHARE: f64 = 0.2;   // only scripts the router saw a fair share of
    let lat: Vec<usize> = (0..n).filter(|&i| groups[i] == dom).collect();
    if !lat.is_empty() && share[1..].iter().any(|&s| s >= RESCUE_SHARE) {
        let lat_conf = mean(lat.iter().map(|&i| out[i].1));
        if lat_conf < RESCUE_CONF {
            let sample: Vec<usize> = lat.iter().copied().take(40).collect();  // test on 40 lines
            let (mut best, mut best_conf) = (None, lat_conf + RESCUE_MARGIN);
            for gi in (1..GROUPS.len()).filter(|&gi| share[gi] >= RESCUE_SHARE) {
                let c = mean(self.rec_for(gi).read(&subset(&sample))?.into_iter().map(|r| r.1));
                if c >= best_conf { best = Some(gi); best_conf = c; }   // ← THIS is the trick
            }
            if let Some(gi) = best {
                for (&i, res) in lat.iter().zip(self.rec_for(gi).read(&subset(&lat))?) {
                    // per line: a bilingual page keeps its confident Latin lines
                    if !(out[i].1 >= KEEP_CONF && out[i].1 >= res.1) { out[i] = res; groups[i] = gi; }
                }
            }
        }
    }
}

The router is a 40K-parameter guess, so the pipeline audits it with the recognizers' own confidence. A Latin model on a Chinese page "reads" at 0.5 to 0.7; the CJK model on the same lines reads at 0.83 to 0.90. Re-reading a 40-line sample buys back whole pages, and the 0.2 share gate keeps chart labels and logos from triggering it. The source comments say that gate exists because trying every script made the slowest pages about 13% slower.

Width-bucketed batching (real code, ocr/ocria/rec.rs)

pub const H: usize = 32;          // every line is resized to 32 px tall
const MAX_W: usize = 1280;
const BUCKET_W: usize = 128;
const BATCH: usize = 32;

/// Lines are batched by width (sorted, 32 per batch, padded to a multiple of 128 px)
/// exactly as the reference does: a line's output depends on the padded width it was run at.
pub fn read(&self, crops: &[&Img]) -> Result<Vec<(String, f32)>, OcriaError> {
    let lines: Vec<Img> = crops.iter().map(|c| prep(c, STRIDE * 2, MAX_W)).collect();
    let mut order: Vec<usize> = (0..lines.len()).collect();
    order.sort_by_key(|&i| lines[i].w);                    // short lines batch with short lines
    for batch in order.chunks(BATCH) {
        let maxw = batch.iter().map(|&i| lines[i].w).max().unwrap_or(1);
        let w = maxw.div_ceil(BUCKET_W) * BUCKET_W;        // ← THIS is the trick
        for idx in batch.chunks((RUN_PIXELS / (H * w)).max(1)) {
            self.read_run(&lines, idx, w, &mut out)?;      // CTC ids + confidence, decoded in-graph
        }
    }
    ...
}

Sorting by width before batching stops a page number from being padded to the width of a full paragraph line. The comment admits something most OCR stacks hide: padding changes the output, so the Rust port must batch exactly like the Python reference to reproduce benchmark numbers. In the WASM build, RUN_PIXELS caps each run at 4 × 32 × 1,280 pixels so activations fit a 128 MB isolate.

Where the parameters go (mine, from the pinned manifest in ocr/ocria/package.rs)

# file sizes from OCRIA_NANO_FILES (v1.0.0); fp32 → 4 bytes per parameter
files = {"det.onnx": 347_580, "router.onnx": 159_029, "rec_latin.onnx": 943_530,
         "rec_cjk.onnx": 5_077_778, "rec_rtl.onnx": 2_842_451,
         "rec_world.onnx": 3_913_987, "tablenet.bin": 17_084_482}
for name, size in files.items():
    print(f"{name:16s} ~{size / 4 / 1e6:.2f}M")
# det.onnx         ~0.09M
# router.onnx      ~0.04M
# rec_latin.onnx   ~0.24M   ← reads every English page
# rec_cjk.onnx     ~1.27M
# rec_rtl.onnx     ~0.71M
# rec_world.onnx   ~0.98M
# tablenet.bin     ~4.27M   ← LayoutNet, 56% of the estimate
# total            ~7.6M  vs 8.1M reported (file overhead and precision make this approximate)

My estimate, not the report's breakdown, but the shape is unambiguous: tables cost about 18 times more parameters than reading English.

It In Action

Input: a scanned bilingual form, English labels with Chinese field values (the XFUND case the source comments cite), on one CPU core.

Step

What happens

Number

Render

no usable text layer, page rendered

250 dpi

Detect

text-line quads, column gutters split

long side 1,600 px, threshold 0.5

Route

width-weighted script shares

CJK share 0.49, above the 0.2 rescue gate

First read

majority routed to Latin

CJK lines read as junk at 0.5 to 0.7

Rescue

40-line sample re-read by CJK model

0.83 to 0.90, beats Latin mean + 0.15 margin

Per-line keep

English labels stay Latin

kept when Latin confidence ≥ 0.75

LayoutNet

units ≤ 1,500, node + pair heads

label/value cells and header row decoded

Output

Markdown table + JSON with boxes

report: 426 ms per page on one core

Throughput check (my arithmetic). The README's 27.8 pages per second on 16 vCPUs with one worker per core is about 1.74 pages per second per core, or roughly 575 ms per page. That is in the same range as the report's 426 ms single-core figure; ParseBench pages vary in how much OCR they need.

Cost check (my estimate). At an assumed $0.50 to $0.80 per hour for a 16-vCPU machine, 27.8 pages per second is about 100,000 pages per hour, or $0.005 to $0.008 per 1,000 pages. Last issue's estimate for OCRia-1 on a fully loaded B200 was $0.11 to $0.16 per 1,000. Roughly 15 to 30× cheaper, for 26 fewer points.

Why This Design Works

Most pages are easy, so make easy pages cheap. Born-digital text skips OCR entirely, and Latin lines go to a ~0.24M-parameter recognizer. Expensive capacity is spent only where documents are actually hard: structure.

Specialists stay small because their vocabularies are small. A CJK charset file alone is 43 KB of characters; keeping it out of the Latin model is where most of the savings come from. The router plus rescue logic is the price of that split.

Structure is a relational problem. Deciding whether two numbers share a row is easier from their positions and the words around them than from raw pixels. LayoutNet's pair heads over text units capture exactly that, and it runs in plain Rust with no ONNX dependency, so it builds for WASM too.

What it trades away. Charts (3.16 on ParseBench-2, effectively zero), pages with more than 1,500 text units (falls back to heuristics), handwriting and anything that needs reasoning. It also gives up a single-model simplicity: seven models, four thresholds per stage and a rescue path all have to agree.

Technical Moats

  1. A teacher that already parses well. LlamaIndex lists OCRia-1, its 4B parser, as the teacher model. Small students are only as good as their labels, and few teams own a top-ranked open parser to generate them.

  2. Benchmark-driven thresholds. Every constant in the rescue path, from the 0.75 confidence bar to the 0.2 share gate, is annotated with the failure it fixed (bilingual forms, Armenian read as Latin, specks on old scans read as two-character CJK). That is months of error analysis encoded as numbers.

  3. One pipeline, four runtimes. The same pinned models run from Rust, Python, Node.js and the browser, with sha256-checked downloads and a WASM path tuned for 128 MB isolates. Packaging is boring, and it is exactly why competitors' "fast CPU parsers" stay research code.

Contrarian Insights

1. "Beats Marker" is a ParseBench-2 claim, on LlamaIndex's own benchmark. The 59.2 vs 52.5 gap is real and on the official scorer. But on olmOCR-bench, an independent benchmark, LiteParse + OCRia-nano-1 scores 60.9 against 60.8 for both Marker and Indra, a 0.1-point lead. The same home-field pattern appeared with OCRia-1 last issue. Indra is also 6% faster (29.6 vs 27.8 pages per second). Treat OCRia-nano-1 as "clearly better than Tesseract, roughly tied with the best CPU alternatives on neutral ground."

2. 8.1M parameters is a pipeline, not a model, and the pipeline has a ceiling. On ParseBench-2, OCRia-nano-1 scores 59.25 overall against OCRia-1's 85.24. Charts are 3.16 vs 77.66, tables 59.49 vs 86.28. Text formatting is closer (82.18 vs 91.58), likely helped by what the PDF text layer already encodes. A cascade of specialists can read and find tables; it cannot recover a bar chart's data series, because no stage was ever built to. If your documents are financial reports with charts, this is the wrong tier.

❝

Surprising Takeaway: the model that reads English in OCRia-nano-1 is roughly 0.24M parameters, smaller than a single attention layer in most LLMs. Meanwhile LayoutNet, which never reads a character, takes more than half of the 8.1M budget. In 2026, recognizing printed Latin text is a solved, tiny problem. Deciding which words belong in the same table cell is where the parameters go.

TL;DR For Engineers

  • OCRia-nano-1 = line detector + script router + four CTC recognizers (Latin, CJK, RTL, world) + LayoutNet, 8.1M parameters total, CPU only via ONNX Runtime, also in the browser via WASM.

  • ParseBench-2: 59.2 vs Marker 52.5, Indra 55.1, LiteParse + Tesseract 48.7, at 27.8 pages per second on 16 vCPUs; olmOCR-bench is a near tie (60.9 vs 60.8).

  • By my file-size estimate, LayoutNet is ~4.3M parameters (over half) and the Latin recognizer only ~0.24M.

  • A confidence-based script rescue re-reads 40-line samples when the router's Latin call looks like junk (0.5 to 0.7 vs 0.83 to 0.90).

  • Charts score 3.16: no chart extraction at all. Weights are under a modified OpenRAIL license.

Explain It Like I'm New

Before an AI system can answer questions about a contract or an invoice, something has to turn each page into clean text and tables. The most accurate tools today are large AI models that need expensive graphics cards, which is overkill for millions of ordinary pages.

OCRia-nano-1 takes a different approach. Instead of one big model that does everything, it is an assembly line of seven small models, each with one job. One finds the lines of text. One looks at each line and decides what alphabet it is in, then hands it to a reader specialized in that alphabet: one for English and European languages, one for Chinese and Japanese, one for Arabic and Hebrew, one for many other scripts. The last model looks at where all the words sit on the page and works out which ones form a table.

Think of a mail-sorting room. A clerk glances at each envelope and sends it to the right desk, instead of one person trying to read every language in the world.

The whole thing is small enough to run on an ordinary laptop processor, quickly and privately, without sending documents anywhere.

The catch is that small specialists only do what they were built for. It reads and finds tables well, but it cannot pull numbers out of a chart.

This points to a future where routine document work runs locally and cheaply, and big models are saved for the pages that really need them.

See It In Action

  • LiteParse demo (run-llama, GitHub): github.com/run-llama/liteparse. The README's animated demo and one-line install; pull ocria-nano and parse a scanned PDF in under a minute.

  • WASM demo site (run-llama): wasm-demo-site in the repo. The same seven models running in your browser, a direct way to feel CPU-only latency and see the output with boxes.

  • LiteParse OCR guide (LlamaIndex docs): developers.llamaindex.ai/liteparse. Install, offline mode, backend switching and the Python and Node APIs.

  • Introducing LiteParse (LlamaIndex blog): llamaindex.ai/blog/liteparse-local-document-parsing-for-ai-agents. The original launch explaining spatial grid projection, the foundation OCRia-nano-1 plugs into.

  • ParseBench leaderboard (parsebench.ai): parsebench.ai. Filter for open-weight CPU systems and compare the per-dimension columns, especially charts.

Community Conversation

  • MarkTechPost, Marker v2 vs MinerU, Docling and LiteParse: in July, it noted LiteParse with OCR off ran at about 73× Marker's CPU speed but had no layout model and collapsed on non-linear pages. LayoutNet is LlamaIndex's direct answer to that critique.

  • LlamaIndex engineering, LiteParse September updates: PDFium changes in their fork cut 20 to 25% off text extraction, to 2.8 ms per page with OCR off. That fast native path is what lets OCRia-nano-1 spend its time only on hard pages.

  • MindStudio, What is LiteParse?: frames LiteParse as the GPU-free, local option next to cloud LlamaParse, and that positioning now has a real model tier behind it.

  • MarkTechPost, LiteParse launch coverage: emphasizes local-first privacy, with all processing, OCR included, on the local CPU. That is the strongest argument for nano over any hosted parser.

  • KoreaDeep, KDL-Frontier-Parser-nano: a contrasting "nano" at 1.2B parameters served by vLLM on GPU, scoring 80.10 on ParseBench-2. It shows how differently the industry uses the word nano: 8.1M on CPU vs 1.2B on GPU.

Conclusion: Use OCRia-nano-1 as Your Default, and Route the Charts Elsewhere

OCRia-nano-1 is the best argument yet that most document parsing does not need a GPU. Seven specialists, 8.1M parameters and careful thresholds beat the established CPU parsers on ParseBench-2, double LiteParse's speed over Tesseract, and run anywhere from a server to a browser tab.

Be clear-eyed about the edges. Its lead over Marker and Indra shrinks to a tie on olmOCR-bench, charts are untouched, and dense pages fall back to heuristics. The right architecture is a router: OCRia-nano-1 on every page by default, with OCRia-1 or another VLM only for the pages with charts or complex tables. That split, cheap specialists first and big models on demand, is where production document pipelines are heading.

References

  • OCRia-nano-1: Fast, Accurate CPU Parsing with 8.1M Parameters (LlamaIndex, 2026). Technical report

  • Rangapur, Jimeno Yepes, Bustamante et al., OCRia-1 Technical Report (2026). arXiv:2611.00092

  • Graves et al., Connectionist Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural Networks (2006). ICML

  • Hinton, Vinyals and Dean, Distilling the Knowledge in a Neural Network (2015). arXiv:1503.02531

  • Smock, Pesala and Abraham, PubTables-1M: Towards Comprehensive Table Extraction from Unstructured Documents (2022). arXiv:2110.00061

Summary

OCRia-nano-1 is a seven-model CPU pipeline (detector, script router, four recognizers, LayoutNet) totaling 8.1M parameters that lifts LiteParse to 59.2 on ParseBench-2, ahead of Marker's 52.5, at 27.8 pages per second on 16 vCPUs. Most of its budget goes to table structure, its lead narrows to a tie on olmOCR-bench, and it cannot read charts.

Found this useful?
A tip keeps the deep-dives free for everyone.
$0 of $10,000 · 0 supporters
$1,000 Silver
$5,000 Gold
$10,000 Platinum
Other amount

Sponsored Ad
If you enjoy practical AI insights, check out SnackOnAI and support the newsletter by subscribing, sharing, and exploring our sponsored ad—it helps us keep building and delivering value 🚀

The AI notetaker that gets the hard words right

Your AI is only as good as what you feed it. Feed it a transcript with your product names, acronyms, and numbers spelled wrong, and you spend the afternoon hand-fixing the output.

Wispr Flow Notetaker uses your dictionary and calendar, so product names, acronyms, numbers, and uncommon names come out spelled right. It pops up when your meeting starts and captures Zoom, Google Meet, Teams, and Slack huddles with one click, no bot joining the call.

Then your meetings show up inside Claude or ChatGPT through the built-in connector. No copy paste. Try Notetaker free on Mac and Windows.

$1,000 in Nvidia Became $132,000. Analysts Eye 5 More

Most people heard about Nvidia and never bought a share. Now analysts have flagged five smaller AI suppliers with price targets as high as 55%. We'll text you all five tickers free, plus alerts on the next setup. Normally $19.99, free today.

Recommended for you

View all
caret-right