Sponsored by

❝

Most people think document parsing is a vision problem that bigger models will solve. OCRia-1 says otherwise: a 4B model, fine-tuned on about 100,000 carefully audited pages, takes the base Qwen3.5-4B from 12.86 to 86.28 on tables and 6.88 to 77.66 on charts. The capability was data all along. The fine print is where the benchmark comes from, which parts of the score the model actually earns, and who is allowed to use it for free.

SnackOnAI Engineering | Senior AI Systems Researcher | Technical Deep Dive | December 01, 2026

Promise and Fence

The promise: by the end of this issue you will know how LlamaIndex turned a general 4B VLM into the top open-weight document parser, what its speculative decoding stack has to do differently on a hybrid recurrent model, and how much of the leaderboard lead survives once you read the evaluation code.

The fence: this is not a LlamaParse review and not a full OCR shootout. I read the OCRia-1 technical report, the ParseBench-2 paper and the inference blog. I also cloned run-llama/ParseBench at commit 31575e1 (Nov 25, 2026), ranked its leaderboard-v2.csv myself, and ran the model's real post-processor on a test answer. I did not run the 4B weights; Hugging Face is unreachable from my sandbox.

What It Actually Does

OCRia-1 takes one page image and returns one Markdown transcription:

  • Tables are emitted as HTML with rowspan/colspan, because Markdown cannot express merged cells.

  • Charts are transcribed as data tables, not described in prose.

  • Formulas are written in LaTeX with $...$ and $$...$$.

  • Inline formatting survives: <sup>, <sub>, bold, italic, <u>, ~~strike~~ and <mark>.

  • No bounding boxes. The report says plainly that OCRia-1 does not output them yet.

It is a 4B fine-tune of Qwen3.5-4B, trained with SFT and then GRPO on verifiable rewards, served through a heavily modified vLLM, and available as open weights on Hugging Face plus GGUF builds for llama.cpp and Ollama. Inside LlamaParse it has already been succeeded: LlamaIndex released OCRia-1.5 on November 18, 2026 in 4B and 2B sizes, now live in LlamaParse. The open weights you can download are the 1.0 model.

The Architecture, Unpacked

Read it top to bottom as data → reward → recurrence. The model is stock Qwen3.5; the curated pages, the 34-term reward and the rollback-aware decoder are what LlamaIndex actually built.

Three decisions do the work.

1. Quality over quantity in data. The report credits OCRia-1's performance mainly to careful data curation that puts quality and diversity ahead of quantity. Real pages are capped at three per document (six for table collections), so no single report dominates. Every teacher label is audited against 25 table rules and 7 page rules. Synthetic pages fill the gaps the real web lacks: 13,953 tables and charts, including 28 chart types and tables of 5,000 to 12,000 tokens.

2. A reward made of the benchmark's own concerns. GRPO optimizes 34 reward components (22 scores, 12 penalties) grouped into 16 panels and 9 targets, including table_teds, table_grits, chart_keying, formatting and table_seg_penalty. Panel weights are rescaled by their running within-group variance, so the reward keeps chasing whatever the model is still inconsistent at.

3. A serving stack built around a recurrent decoder. Qwen3.5 is a hybrid: the inference blog lists 24 Gated DeltaNet layers next to 8 attention layers. GDN layers carry a fixed-size state instead of a KV cache. That is cheap for long outputs, but it breaks speculative decoding's usual assumption that a rejected draft token can simply be dropped from the cache.

The Code, Annotated

The scorer's severity cap (real code, parse_bench/evaluation/metric_policy.py)

def score_metric(metric, metadata, policy):
    parsing = metadata["proportional"]            # how much of the page was recovered (0..1)
    ...
    totals = Counter()
    for event in events:                          # every detected error, already classified
        severity = policy.error_classes[key].get(event["label"], event["severity"])
        totals[severity] += event["count"]        # critical / major / minor / ignore

    # The first error of each class costs full weight; repeats are scaled down by
    # page size, so one wrong number hurts a lot but a long table with many small
    # slips is not driven to zero.
    scale = min(1, constant / max(1, size))
    charged = {s: w[s] * (min(totals[s], 1) + max(0, totals[s] - 1) * scale) for s in LEVELS}
    penalty = (charged["critical"] + charged["major"]
               + min(p["minorCap"], charged["minor"]))   # minor errors can never sink a page

    # A page that recovers 99% of its cells but swaps one revenue figure still
    # loses: the final score is the LOWER of recovery and the severity cap.
    return float(min(parsing, max(0, min(1, 1 - penalty))))   # ← THIS is the trick

ParseBench-2 replaces "how similar is the text" with "how bad is the worst mistake". Its policy-compliance score for Formatting hits the target on 96% of critical cases versus 5% for ParseBench-1. It is a better benchmark, and it was built by the same team that trained the model.

Turning the model's answer into what gets scored (real code, run locally)

# From parse_bench/inference/providers/parse/ocria_1.py ("the model card's post-processing").
# I fed it a hand-written answer in the compact table dialect the post-processor
# accepts: [thead] header cells, [colspan=N], and ROW_SPAN_CONTINUE for merged rows.
FENCE = "`" * 3                                   # avoids breaking this code block
raw = ("<page_header>ACME Corp. Annual Report 2025</page_header>\n## Segment revenue\n\n"
       + FENCE + "tsv\n"
       "[thead]Segment\t[thead][colspan=2]Revenue (USD m)\t[thead]Change\n"
       "[thead]\t[thead]2024\t[thead]2025\t[thead]\n"
       "Cloud\t1,153\t1,822\t+58.0%\n"
       "ROW_SPAN_CONTINUE\tof which **AI**\t412\tn/a\n"
       "Hardware\t960\t<sup>1</sup>871\t−9.3%\n"
       + FENCE + "\n<!-- table spans full page width -->\n<page_number>14</page_number>")

print(ocria_postprocess(raw))
# <table><thead>
# <tr><th>Segment</th><th colspan="2">Revenue (USD m)</th><th>Change</th></tr>
# <tr><th></th><th>2024</th><th>2025</th><th></th></tr></thead><tbody>
# <tr><td rowspan="2">Cloud</td><td>1,153</td><td>1,822</td><td>+58.0%</td></tr>
# <tr><td>of which **AI**</td><td>412</td><td>n/a</td></tr>         ← THIS is the trick
# <tr><td>Hardware</td><td>960</td><td><sup>1</sup>871</td><td>−9.3%</td></tr>
# </tbody></table>
# The marker became rowspan="2": a merged cell costs one token-cheap word,
# not a nested HTML attribute the model must balance across rows.

The table body is 204 characters in TSV form and 395 as HTML, 1.9× longer. On a 10,000-token table that is the difference between finishing inside the output budget and the "long tables" failure the report lists as unsolved. The same function also strips <!-- --> analysis comments, runaway dot leaders and &nbsp; padding, which hints at the failure modes it was written to clean up.

The context-overflow retry (real code, trimmed)

def _transcribe(self, client, b64):
    mt, cur = self._max_tokens, b64                       # 24,576 output tokens by default
    for attempt in range(4):
        try:
            resp = client.chat.completions.create(model=self._model, messages=[...],
                temperature=0.0, max_tokens=mt,
                extra_body={"chat_template_kwargs": {"enable_thinking": False}})
        except Exception as e:                            # vLLM 400: image + budget > 32,768
            m_total = _OVER_TOTAL_RE.search(str(e))
            if m_total and attempt < 3:
                inp = int(m_total.group(1))
                if self._max_model_len - int(inp * 1.5) < 512:
                    cur = _downscale_b64(b64, _IMG_FRAC[attempt])   # shrink to 60%, 40%, 25%
                mt = max(256, min(mt // 2, self._max_model_len - int(inp * 1.5)))  # ← THIS is the trick
                continue
            ...

Every page is rendered at 300 DPI. A US letter page at 300 DPI is 2,550 × 3,300 px, about 8,200 image tokens at 32 px each if nothing downscales it, and 8,200 + 24,576 overflows a 32,768 context. The harness responds by halving the output budget first. That is a sane default, and it means dense pages can quietly be parsed with half the token budget (my arithmetic; the real token count depends on the processor's pixel cap).

It In Action

Input: one dense financial page with a two-level header table (the example above), sent as a 300 DPI PNG to vllm serve llamaindex/OCRia-1 --max-model-len 32768.

Step

What happens

Number

Render

pypdfium2, CropBox, rotation applied

300 DPI, 2,550 × 3,300 px (letter)

Encode

16 px patches, 2×2 merged

1 token per 32 × 32 px; ≈800 tokens at training resolution

Decode

greedy, thinking off, budget

up to 24,576 output tokens

Typical output

0.37B target tokens ÷ 100,979 training pages

≈3,660 tokens per page (training average)

Speed, 1 request

4,734 tok/s on one B200

≈0.8 s per average page (my estimate)

Speed, batch

64 concurrent requests

10.21 pages/s, p90 latency 9.6 s, ≈36,800 pages/hour

Post-process

[thead] / ROW_SPAN_CONTINUE → HTML

2-row merged cell → rowspan="2" (run locally)

Score

min(recovery, severity cap)

a swapped revenue cell caps the page regardless of recovery

The cost math (my estimate). At an assumed $4 to $6 per B200-hour and 36,756 pages per hour at full load, self-hosting works out to roughly $0.11 to $0.16 per 1,000 pages, before idle time, ops and engineering. ParseBench-2 lists LlamaParse Agentic at 1.25 cents per page ($12.50 per 1,000) and Claude Opus 5.5 at 6.49 cents. That is two orders of magnitude, if your volume keeps a B200 busy and your license allows it.

Why This Design Works

Parsing is a tiny output language with a huge visual input. Most of the gains come from teaching a general VLM a strict output contract (HTML tables, data-table charts, LaTeX, inline tags) and rewarding exactly that contract. The jump from base to fine-tune shows it: text rises 10.6 points (77.28 → 87.87), but tables rise 73.4 and charts 70.8. The base model could already read; it just could not structure.

RL on verifiable rewards fits parsing perfectly. Every reward here, from TEDS and GriTS for tables to chart keying and edit distance, is computable from ground truth. No reward model to hack and no human preference noise.

The output dominates latency. A page is about 800 image tokens in and thousands of tokens out, so decoding is the whole game. DFlash2 drafting 31 tokens and accepting 12.5 to 17.5 per verification step is why stock BF16 vLLM's 321 to 333 tok/s becomes 4,734.

What it trades away. Layout boxes (not produced by the model), old scans (48.9% on olmOCR-bench, its weakest category), Arabic, Greek and Korean tables (0.70 to 0.77 on PulseBench-Tab), highlight and strikethrough (35% and 45% rule pass rates) and very long tables that outrun the output budget.

Technical Moats

  1. The audited page corpus. 82,943 real pages from eleven source families, each label checked by 32 rules, corrected by a large VLM, then a human. The 4B base is a commodity; this corpus is not.

  2. A benchmark and a reward that speak the same language. LlamaIndex owns ParseBench, its severity policies and the RL reward panels. That makes iteration very fast, and it is also the source of the main caveat below.

  3. Rollback-aware speculative decoding for hybrid models. ReplaySSM keeps a state checkpoint plus a buffer of recent inputs and rolls back rejected tokens by moving a pointer. The custom CUDA kernel runs at 23 to 24 µs per layer versus 72 to 80 µs for Triton, about 3.3× faster. Few teams have done this for Gated DeltaNet in production.

Contrarian Insights

1. The big lead is on the home field. On LlamaIndex's own ParseBench (v1), OCRia-1 leads the next model by 12.1 points (87.4 vs 75.3). On third-party benchmarks the margins collapse: olmOCR-bench 83.5 vs 83.2 (0.3 points), fr-bench-pdf2md 72.1 vs 71.4 (0.7) and PulseBench-Tab 84.1 vs 82.4 (1.7). It still wins all of them, which is genuinely impressive for 4B. But the reward panels (table_teds, chart_keying, formatting) and ParseBench's dimensions were designed by the same team. Treat the 12-point gap as "best at what LlamaIndex thinks matters" and the 0.3-point gap as the market-neutral number.

2. One of six ParseBench-2 dimensions is not the model's score. The ParseBench provider for OCRia-1 says layout boxes come from the ocria_grounding package: Docling's Heron detector supplies the regions, and each word of the answer is placed by its PDF text-layer box. The model "does not output bounding boxes", yet OCRia-1 posts 85.96 on visual grounding, a dimension where its own base scores 16.14. Strip that dimension and recompute: OCRia-1 still leads the open-weight field (85.10 vs 78.46 for KDL-Frontier-Parser-nano-v2 over the other five), so the ranking holds. But "ranks first" describes a model plus a layout detector plus the PDF text layer. Scanned pages with no text layer fall back to attention-based placement.

❝

Surprising Takeaway: the base model is nearly useless at structure. Qwen3.5-4B scores 12.86 on ParseBench-2 tables and 6.88 on charts. About 0.37B target tokens of curated pages, less than a single day of pretraining for a frontier lab, lifts those to 86.28 and 77.66 and moves the model from 22nd to 1st of 23 open-weight entries. For document parsing, the bottleneck was never model size; it was a few hundred million tokens of correct answers.

TL;DR For Engineers

  • OCRia-1 is Qwen3.5-4B plus 100,979 audited pages (SFT, 2 epochs) plus GRPO with a 34-term verifiable reward; it ranks 1st of 23 open-weight systems and 7th of 62 overall on ParseBench-2 (85.24).

  • Serving: DFlash2 drafts 31 tokens, 12.5 to 17.5 accepted per step, ReplaySSM rolls back Gated DeltaNet state, NVFP4/FP8 decoder → 4,734 tok/s single request and 10.21 pages/s at 64 concurrent on one B200.

  • The lead is 12.1 points on LlamaIndex's own benchmark and 0.3 to 1.7 points on third-party ones.

  • Visual grounding comes from Docling Heron plus the PDF text layer, not the model; the lead survives without that dimension.

  • Weakest spots: old scans, non-Latin tables, highlights and strikethrough, very long tables. Per the input card, commercial use is free only under $2M revenue.

Explain It Like I'm New

Businesses run on PDFs: invoices, insurance filings, annual reports. Before an AI assistant can answer questions about them, something has to turn each page into clean, structured text. The hard parts are tables with merged headers, charts where the numbers live only in the bars, and formatting like strikethrough that changes what a sentence means.

For years, the assumption was that you need a very large AI model to read documents well. OCRia-1 is a small model, small enough to run on a single graphics card, that beats much bigger systems at this one job.

The trick is mostly in the teaching. Imagine training a new accountant not by having them read every book in the library, but by giving them 100,000 carefully checked worksheets and grading every answer against a strict rubric. That focused practice matters more than general knowledge. Here, the "rubric" is automated scoring that knows a wrong number is far worse than a missing comma.

There are caveats. The company that built the model also built the main test it is scored on, and on independent tests its lead is much smaller. Some of what it gets credit for comes from helper tools around it.

Still, it shows where practical AI is heading: smaller, specialized models trained on carefully curated examples, doing one valuable job cheaply and well.

See It In Action

  • Introducing OCRia-1 (LlamaIndex blog): llamaindex.ai/blog/parse-ocria-1. Side-by-side benchmark charts and table and chart reconstructions on real pages; the fastest way to see what "structure preserved" looks like.

  • The Inference Stack Behind OCRia (LlamaIndex engineering): llamaindex.ai/blog/the-inference-stack-behind-ocria. An engineering deep dive on DFlash, ReplaySSM, kernel fusion and CPU overhead, with per-step timings; required reading if you serve hybrid models.

  • Boost Inference up to 15x Using DFlash (NVIDIA Technical Blog): developer.nvidia.com. It explains the block-diffusion drafter OCRia builds on; according to NVIDIA, the integration runs through the open source Speculators library inside vLLM.

  • ParseBench leaderboard (parsebench.ai): parsebench.ai. A sortable, per-dimension view of all 62 ParseBench-2 entries, where you can check the grounding and charts columns yourself.

  • OCRia-1 GGUF builds (Hugging Face): llamaindex/OCRia-1-GGUF and the Ollama page. Local runs on llama.cpp and Ollama; expect the NVFP4 and DFlash speedups not to carry over.

Community Conversation

  • explainx.ai: OCRia-1 analysis. Its headline caveat is that ParseBench is LlamaIndex's own benchmark. That is the same concern this issue quantifies with the 12.1 vs 0.3 point gap.

  • AlphaSignal: news brief. Leads with speed and price: about 0.2 seconds for a typical page, with a chart extraction score of 85.1, 19 points ahead of the next model, where others score near zero.

  • byteiota: OCRia-1 writeup. Stresses the third-party results and notes that olmOCR-bench, PulseBench-Tab and fr-bench-pdf2md are not LlamaIndex's benchmarks, a fair counterweight to the home-field critique.

  • Baseten engineering: DFlash in production. Independent evidence that the drafter matters: Baseten reports about 3× speedups on Qwen3-8B on a single B200, versus 2× with EAGLE. OCRia's roughly 9× comes from stacking that with quantization and its own kernels.

  • intuitionlabs.ai: open-weight license guide. Commercial usability depends on two axes, license family and scale, which is the lens to apply to OCRia-1's revenue-gated terms before you build on it.

Curated Data Beat Scale, but Read the Scorecard Before You Switch

OCRia-1 is the clearest evidence yet that document parsing is a data and reward problem, not a model size problem. A 4B model with 100,979 audited pages and a reward built from table and chart metrics now outranks GPT-6.2 sol and Gemini 4 neon on ParseBench-2, and decodes at 4,734 tokens per second on one GPU.

But the honest pitch is narrower than the launch post. Its decisive margins come from the creator's own benchmark; on independent ones it wins by under two points. Its grounding score comes from a pipeline, not the model. And per the input card, the weights are only free to use commercially below $2M in revenue. If you are a startup with complex tables and charts, self-host it today. If you are an enterprise, benchmark it on your own pages against LightOnOCR and Chandra, then price the license against LlamaParse's per-page rate.

References

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

  • Doulcet, Zhang, Acosta et al., ParseBench-2: Severity-Aware Evaluation of Document Parsing (2026). arXiv:2611.17400

  • Zhang, Acosta, Carlson et al., ParseBench: A Document Parsing Benchmark for AI Agents (2026). arXiv:2604.08538

  • Chen, Liang and Liu, DFlash: Block Diffusion for Flash Speculative Decoding (2026). arXiv:2602.06036

  • Shao et al., DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models (GRPO, 2024). arXiv:2402.03300

OCRia-1 turns Qwen3.5-4B into the top open-weight document parser with 100,979 audited pages, a 34-term GRPO reward and a rollback-aware speculative decoder that reaches 4,734 tok/s on one B200. Its 12-point lead lives on LlamaIndex's own benchmark, shrinks to under two points on independent ones, and its grounding score comes from a helper pipeline.

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 🚀

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

State of Product reveals what AI still hasn’t solved

80% of product professionals say AI helps them ship faster, but customers aren’t seeing value any sooner. Atlassian’s State of Product 2027 explores the gains AI is delivering and the challenges that remain, from decision-making that hasn’t kept pace to gut instinct overriding customer evidence.

The holiday streaming season is almost here

Are you ready? As revealed in our holiday playbook, Roku Ads Manager lets you easily set up, measure and optimize your self-serve holiday ad campaign. You can even create a shoppable ad unit that lets streamers buy directly from their remote.

Recommended for you

View all
caret-right