OCRia-1
by llamaindex
LlamaIndex's 4B vision-language model that turns a page image into Markdown, with tables, charts and formatting intact
llamaindex/OCRia-1Deploy OCRia-1
Single-tenantMixpeek 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
OCRia-1 is a 4B vision-language model for document parsing from LlamaIndex, published on Hugging Face on November 13, 2026. It reads one page image and writes the page as Markdown, with tables in HTML, and it targets what parsers most often get wrong: merged cells and spanning headers, tables with thousands of cells, charts whose values have to be read off the plot, and formatting that carries meaning, such as strikethrough, underline, sub- and superscripts and checkboxes. Every chart becomes an HTML table of its data points.
It is fine-tuned from Qwen3.5-4B on 100,979 pages, about 83,000 real pages from permissively licensed sources such as arXiv, PubMed Central, EUR-Lex and government filings, plus about 18,000 synthetic tables, charts and forms, then trained further with reinforcement learning whose rewards check table structure, chart values and formatting. On ParseBench 2 it scores 85.24, the highest open-weight model and seventh of 61 systems, and on ParseBench 1 it scores 84.65, second of 158. The same model, quantized and served with a speculative decoder, runs inside LlamaParse.
The weights are under the OCRia-1 Model and Code License, based on Open RAIL-M. They are free for research, personal use and commercial use by organizations under $2M in annual revenue and $2M in total funding. Larger companies need a commercial license, as does any document parsing or OCR product that competes with LlamaParse or LlamaCloud.
Architecture
Qwen3.5-4B vision-language model (5.17B parameters in BF16, including the vision encoder), fine-tuned for two epochs on pages of about 1,024 px, then trained with GRPO using rewards for table structure and cell values, chart data points, text and inline formatting, with penalties for split or merged tables, repetition and invented formatting. The released checkpoint is the average of two RL checkpoints. One call per page with a fixed system prompt and thinking off; text comes from the page image alone, with no separate layout detector, OCR engine or PDF text layer. Optional code in the repository adds layout boxes afterwards.
Mixpeek SDK Integration
# OCRia-1 is not a managed Mixpeek extractor. Serve it with vLLM, parse each page,
# then upsert the Markdown into a Mixpeek collection.
# vllm serve llamaindex/OCRia-1 --served-model-name ocria-1 --max-model-len 32768
import base64, requests
from huggingface_hub import hf_hub_download
from openai import OpenAI
prompt = open(hf_hub_download("llamaindex/OCRia-1", "prompt.txt")).read()
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
page = base64.b64encode(open("10k-page-41.png", "rb").read()).decode()
markdown = client.chat.completions.create(
model="ocria-1", temperature=0.0, max_tokens=24576,
messages=[{"role": "system", "content": prompt},
{"role": "user", "content": [{"type": "image_url",
"image_url": {"url": f"data:image/png;base64,{page}"}}]}],
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
).choices[0].message.content
requests.post(
"https://api.mixpeek.com/v1/namespaces/ns_your_namespace/documents/upsert",
headers={"Authorization": "Bearer API_KEY"},
json={"collection_id": "col_filings",
"documents": [{"document_id": "10k-page-41",
"payload": {"source_file": "10k.pdf", "page": 41,
"text": markdown, "parser": "ocria-1"}}]},
)Capabilities
- Page image to Markdown, with tables in HTML using colspan and rowspan
- Charts converted to tables of their data points, each value under its series and label
- Bold, italic, strikethrough, underline, highlights, sub- and superscripts and checkboxes kept
- Printed and handwritten formulas written as LaTeX, diagrams as Mermaid
- Page headers, footers, page numbers and watermarks in their own tags
Use Cases on Mixpeek
Benchmarks
| Dataset | Metric | Score | Source |
|---|---|---|---|
| ParseBench 2 | Overall (6 dimensions, 4,317 pages) | 85.24 | OCRia-1 model card; 7th of 61 systems, 1st of 23 open-weight; KDL-Frontier-Parser-nano-v2 80.13, Infinity-Parser2-Pro 78.50 |
| ParseBench 2 | Charts | 77.63 | OCRia-1 model card; KDL-Frontier-Parser-nano-v2 73.55, LightOnOCR-3-4B 62.90 |
| ParseBench 1 | Overall (5 dimensions, 2,078 pages) | 84.65 | OCRia-1 model card; 2nd of 158 systems; KDL-Frontier-Parser-nano-v2 79.03 |
| olmOCR-bench | Tables and formulas (mean of 3 categories) | 90.5 | OCRia-1 technical report; Infinity-Parser2-Pro 90.2, LightOnOCR-3-4B 90.1 |
| fr-bench-pdf2md | Score | 72.1 | OCRia-1 technical report; LightOnOCR-3-4B 71.4, Chandra-OCR-2 65.5 |
Performance
LlamaIndex's numbers. The throughput figure is for its optimized serving stack (NVFP4 and FP8 quantization, a speculative decoder and custom kernels), about nine times faster than these BF16 weights. ParseBench is maintained by LlamaIndex; olmOCR-bench, PulseBench-Tab and fr-bench-pdf2md are independent. We have not measured it ourselves.
Common Pipeline Companions
Frequently Asked Questions
What is OCRia-1?
A 4B vision-language model from LlamaIndex, published November 13, 2026, that reads a document page image and writes it as Markdown with tables in HTML. It is fine-tuned from Qwen3.5-4B for dense tables, charts, formatting and formulas, and it is the model that serves LlamaParse.
How accurate is OCRia-1 at parsing PDFs?
LlamaIndex reports 85.24 on ParseBench 2, the highest open-weight score and seventh of 61 systems including commercial APIs, and 84.65 on ParseBench 1, second of 158. On the independent olmOCR-bench table and formula categories it averages 90.5, against 90.2 for Infinity-Parser2-Pro (35B). ParseBench itself is maintained by LlamaIndex.
Can OCRia-1 extract data from charts?
Yes. It writes every chart as an HTML table of its data points, with each value under its series and label. It scores 77.63 on ParseBench 2 charts, against 73.55 for the next open-weight model, and 82.47 on ParseBench 1 charts.
Can I use OCRia-1 commercially?
Free commercial use covers organizations under $2M in annual revenue and under $2M in total funding. Above either threshold you need a commercial license from LlamaIndex, and so does any document parsing, OCR or extraction product that competes with LlamaParse or LlamaCloud. You can also use it through LlamaParse. You own your outputs.
What is the difference between OCRia-1 and OCRia-nano-1?
OCRia-1 is a 4B GPU vision-language model that reads the whole page image. OCRia-nano-1 is an 8.1M-parameter pipeline distilled from it that runs on a CPU inside LiteParse at 27.8 pages per second on 16 vCPUs. OCRia-1 scores 85.24 on ParseBench 2 and OCRia-nano-1 59.2, so a common setup parses everything with nano and re-parses the hard pages with OCRia-1.
Specification
Research Paper
OCRia-1 Technical Report
arxiv.orgBuild a pipeline with OCRia-1
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