The small model that reads invoices, charts and manuscripts: how was OCRia-1 trained?
LlamaIndex's open 4B document model was trained on 100,979 pages with a 34-part reward; its 8.1M-parameter nano pipeline runs on a CPU.
Reading a table on an invoice, a chart in a report or a 19th-century manuscript all come down to the same problem: turning a page image into clean, usable text. LlamaIndex has released two open models for it. OCRia-1 is a 4-billion-parameter vision-language model that, by the company's own measurement, ranks first among open models on the ParseBench 2 document benchmark. OCRia-nano-1 is an 8.1-million-parameter pipeline that runs on a CPU, even in a browser, with no GPU.
OCRia-1 was announced on 22 October inside LlamaParse, the company's document service. Its open version went up on Hugging Face in November, with GGUF files following on 25 November; OCRia-nano-1 was introduced on 23 November. Both come with detailed reports that also describe what did not work.
What OCRia-1 does
OCRia-1 takes one page image and writes Markdown directly, with no separate OCR engine, layout detector or PDF text layer. Tables and charts come out as HTML tables with merged cells, diagrams as Mermaid and math as LaTeX, and bold, italics, strikethrough, highlights, checkboxes, blank fields, headers, footers, page numbers and watermarks are all marked. It is built on Alibaba's Apache 2.0 Qwen3.5-4B, whose 32-layer text stack uses Gated DeltaNet linear attention in three of every four layers. The card recommends 300 DPI, greedy decoding and thinking switched off. An optional package adds bounding boxes using the Docling Heron layout detector.
How OCRia-1 was trained
The 37-page technical report on arXiv describes 100,979 training pages and about 370 million target tokens: 82,943 real pages and 18,036 synthetic ones, with no customer data. About a million PDFs were gathered from 11 permissively licensed source families, at most 3 pages per document, and pages with tables, charts and math were picked using the PDF text layer. The largest sources are public-domain scans from 1800 to 1975 on the Internet Archive (23,722 pages), formula-heavy arXiv papers (16,142) and US and UK government statistics (12,966).
Real pages were labelled by a "teacher" pipeline of proprietary vision-language models, audited by a mid-size model against 25 table rules and 7 page rules, checked against the PDF text where possible and corrected by a large model, with humans stepping in when that failed. The synthetic pages, including 5,000 to 12,000-token tables, 28 chart types, checkboxes and tracked changes, are rendered in styles copied from real documents, so their ground truth is exact.
Supervised fine-tuning ran for two epochs with AdamW, batch 64, a 1e-5 peak learning rate and 1,024-pixel pages on 32 B200 GPUs. Then came GRPO with verifiable rewards on 11,234 pages: 12 readings per page scored by a 34-component reward, 12 of them penalties for split or unfinished tables, repetition, excess length or invented formatting. A component's weight drops by up to 70% once its rollouts stop differing. The final model averages two RL checkpoints that were strong in different areas.
What did not work
Per-component reward normalization (MO-GRPO) failed: the model dropped formatting altogether to dodge the formatting penalty. With fixed weights, the formatting term took over within 10 steps and table scores fell. Training at 1,536 pixels instead of 1,024 changed no score by more than about a point and took 1.2 times as long, while downscaling pages at serving time cost about 0.08 on ParseBench. Retraining only the vision projector dropped olmOCR-bench from 71 to 48, and a Q4_K_M quantization was not released because it lost 6.3 points on financial tables.
OCRia-1 results
All numbers are LlamaIndex's own, and LlamaIndex also maintains ParseBench. In the report OCRia-1 scores 0.87 on ParseBench against 0.75 for LightOnOCR-3-4B and Chandra-OCR-2 and 0.68 for Mistral OCR 4.1, with 0.92 on tables and 0.85 on charts. On the card's ParseBench 2 table it scores 85.24, seventh of 61 systems and first of 23 open ones. Weak spots include old scans (48.9 on olmOCR-bench), tables in some non-Latin scripts, tables beyond 1,000 cells and chart values not printed on the chart. On the company's own serving stack, one B200 reads 10.21 pages per second, about 860,000 a day; the public BF16 weights on stock vLLM run roughly 9 times slower.
OCRia-nano-1: no GPU needed
OCRia-nano-1 is a pipeline of seven small ONNX models inside LiteParse, LlamaIndex's Apache 2.0 parsing tool: a line detector, a script router, four recognizers for Latin, right-to-left, CJK and about 17 other scripts, and a 4.27M-parameter LayoutNet with 13 layout classes, 8.1 million parameters in all. According to the nano report, it was distilled from OCRia-1 using PDF text-layer pages, scans, 30,000 synthetic pages in 47 languages, OCRia-1-labelled handwriting and typewriting, 658,000 table-cell crops and 381,000 human-labelled crops. A label was kept only if a second reader agreed, which removed 3% of Latin lines and 63% of right-to-left lines.
The ablations are the most instructive part. On ParseBench 2 the PDF text layer alone scores 46.3, adding LayoutNet gives 53.7, adding OCR 51.2 and both 59.2. Swapping in Tesseract costs 2.4 points, models 2 to 9 times larger add at most 0.9, and growing LayoutNet to 11.6M changes nothing. On 16 CPU cores it reaches 59.2 at 27.8 pages per second, against 48.7 and 14.2 pages per second for LiteParse with Tesseract. It does not read charts or equations on scanned pages.
How to try them
For nano: pip install liteparse, lit models pull ocria-nano (60 to 75 MB) and lit parse scan.pdf --format markdown, from Python, Node or WebAssembly. OCRia-1 runs with vllm serve llamaindex/OCRia-1 --max-model-len 32768, thinking off, temperature 0. The 5.2 GB Q8_0 file in the GGUF repo runs in llama.cpp or Ollama and matched the full model in the company's 301-page test (85.77 vs 85.56). Both licenses are based on Open RAIL-M: free for research, personal use and companies under $2 million in annual revenue and total funding, with a commercial license for larger companies and competing parsing services.
Sources: OCRia-1 card, OCRia-1 GGUF, OCRia-nano-1 card, OCRia-1 report, Nano report, OCRia-1 launch, Nano launch, LiteParse guide