All benchmarks

  Technical report

Ai2’s 7B olmOCR beat its teacher GPT-4o at turning PDF pages into clean text

Made by Jake Poznanski and eight co-authors

arXiv preprint

The result

  • Quality

    olmOCR-Bench overall: share of 7,010 pass/fail tests passed, averaged over 7 document types plus baseline checks (95% CI ±1.0 and ±1.1). Small model: olmOCR-7B-0225-preview (toolkit v0.1.75, anchored). Large model: GPT-4o (anchored prompt).

    75.5%vs 69.9%

    Ahead by 5.6 points

    olmOCR 7B75.5%
    GPT-4o, anchored69.9%

    olmOCR-Bench, tests passed · higher is better

  • Cost per call

    One call = one page. Table 6’s per-million-page figures divided by 1,000,000; they are Ai2’s own inference-cost estimates. olmOCR (launch version) was timed on 1,288 pages on an NVIDIA L40S (17 min 10 s, plus a 12% retry rate) and priced at RunPod’s on-demand rate of US$0.79/hour (Feb 2025). GPT-4o was priced from the tokens it used on 1,288 pages (3,093,315 in, 833,599 out) at US$2.50/US$10.00 per million tokens (Feb 2025), halved for batch pricing. As reported: US$176 per million pages for olmOCR on an NVIDIAL40S (US$178 on an NVIDIAH100) vs US$6,240 for GPT-4o with batch pricing (US$12,480 without)

    35×cheaper

    olmOCR 7BUS$0.000176on 1× NVIDIA L40S, at RunPod’s on-demand rate
    GPT-4o, anchoredUS$0.00624via OpenAI’s API, at batch prices

    US$ per call · lower is better

The story

Text locked in PDFs

The Allen Institute for AI (Ai2) builds open language models, and a lot of useful text sits inside PDFs: papers, brochures, legal documents, scanned books. Getting it out cleanly is hard, because a PDF stores characters and their positions, not paragraphs in reading order. Vision models such as GPT-4o read page images well, but Ai2 put the cost at more than US$6,240 per million pages for GPT-4o, even with batch pricing.

So the team asked whether a smaller, specialized vision model could be as accurate as a large general model with a carefully built prompt.

A teacher writes the answer key

Ai2 sampled up to three pages from each of over 100,000 English PDFs and had GPT-4o transcribe them. To stop it from skipping or rewriting text, each request carried the page image plus text blocks and their positions pulled from the PDF itself, which the paper calls document anchoring, and asked for a fixed JSON format.

Data

olmOCR-mix-0225

258,641 pages from 102,825 PDFs

96,929 web-crawled PDFs and 5,896 public-domain books from the Internet Archive; English only

Transcribed by gpt-4o-2024-08-06 with document anchoring. About 56% academic papers, by the authors’ estimate from a 707-page sample. On Hugging Face it is split into 256,575 training and 2,066 evaluation pages.

Small model

olmOCR-7B-0225-preview

7B (8.3B with the vision encoder, per Hugging Face) · Allen Institute for AI (Ai2)

Full fine-tune on olmOCR-mix-0225

Base
Qwen2-VL-7B-Instruct (Alibaba Qwen)
allenai/olmOCR-7B-0225-preview

Training

Full fine-tune (a LoRA run gave higher validation loss)

10,000 steps, about 1.2 epochs, effective batch size 4, learning rate 1e-6, AdamW, cosine schedule; loss only on the answer tokens

One node of 8x NVIDIA H100 80GB
Time
16 node-hours per run; 365 node-hours for all training experiments

Not reported: cost.

A benchmark made of unit tests

To compare systems, Ai2 built olmOCR-Bench, and says it did so after training the model so as not to tune on it. It holds 1,402 PDFs and 7,010 pass-or-fail checks: is this sentence present, is this page number gone, does this cell sit above that one, does this formula come out right? Documents that appear in the training mix were removed by URL. The score is the share of checks passed, averaged over seven document types and a set of baseline checks.

Evaluation

1,402 PDFs, 7,010 tests

Test set
olmOCR-Bench
Metric
Share of unit tests passed, averaged over 7 document types plus baseline checks (95% intervals by bootstrap)
How it was compared
Same pages and checks for every system. GPT-4o got the anchored prompt, a JSON output schema and temperature 0.1 (gpt-4o-2024-08-06 in the released runner); without anchoring it scored 68.9. The runner capped GPT-4o at 3,000 output tokens and one try per page, while olmOCR’s pipeline allows 4,500 tokens and retries.

Large model

GPT-4o

Size not disclosed · OpenAI

Used as released, prompted with the same document anchoring (page image plus PDF text and positions)

Base
OpenAI API (gpt-4o-2024-08-06 in the released runner code)

olmOCR passed 75.5% of the checks (±1.0) and its teacher GPT-4o 69.9% (±1.1). It also finished ahead of Mistral’s OCR API (72.0) and Gemini Flash 2 (63.8), though not on every document type: GPT-4o did better on old scanned math, Gemini Flash 2 on tables, Marker on long tiny text, Mistral OCR on arXiv math and MinerU on headers and footers.

What a million pages cost

Ai2 timed the launch version of olmOCR on 1,288 pages on an NVIDIA L40S (17 minutes 10 seconds, with a 12% retry rate) and priced it at RunPod’s February 2025 rate of US$0.79 an hour: about US$176 per million pages. GPT-4o, priced from the tokens it used on 1,288 pages at February 2025 list prices with the batch discount, came to US$6,240. Both are the authors’ inference-cost estimates.

All the numbers

Show all numbersHide all numbersEvery model · Cost, latency and energy · 4 more results

Every model on the headline test

Cost, latency and energy, as reported

Cost · US$ per million pages (estimated)
olmOCR 7B176
GPT-4o, anchored6240
olmOCR: 1x NVIDIA L40S (also measured on 1x NVIDIAH100 80GB), priced at RunPod on-demand rates. GPT-4o: OpenAI Batch API, hardware not disclosed.
Authors’ estimates (Table 6, Appendix B). olmOCR: measured run time on 1,288 test pages x RunPod on-demand price as of February 2025 (NVIDIAL40S US$0.79/hour; on an NVIDIAH100 80GB at US$2.69/hour it is US$178), including a measured 12% retry rate. GPT-4o: tokens used on the same 1,288 pages (3,093,315 input, 833,599 output) at US$2.50 / US$10.00 per million tokens = US$16.07, halved to US$8.03 with batch pricing; without batch it is US$12,480 per million pages. Training cost excluded.
Latency
Not reported
No per-page latency is reported; only throughput (see otherMetrics).
Energy
Not reported

More from the source

  • Other systems on olmOCR-Bench (overall)

    olmOCR without anchoring74.7 ± 1.1
    Mistral OCR API72.0 ± 1.1
    Marker v1.7.570.1 ± 1.1
    GPT-4o without anchoring68.9 ± 1.1
    Qwen 2.5 VL (no anchor)65.5 ± 1.2
    Gemini Flash 2 (anchored)63.8 ± 1.2
    MinerU v1.3.1061.5 ± 1.1
    GOT OCR48.3 ± 1.1
    Qwen 2 VL, the untuned base model (no anchor)31.5 ± 0.9

    Table 4

  • Where another system beats olmOCR on a document type

    Old scans with mathGPT-4o anchored 74.5 (no anchor 75.5) vs olmOCR 71.2
    TablesGemini Flash 2 anchored 72.1 vs olmOCR 71.0
    Long tiny textMarker 84.6 vs olmOCR 73.3
    arXiv mathMistral OCR 77.2 vs olmOCR 74.9
    Headers and footersMinerU 96.6 vs olmOCR 94.5

    Table 4

  • Throughput on one GPU

    NVIDIA L40S906 output tokens/s; 1,288 test pages in 17 min 10 s, plus a 12% retry rate
    NVIDIA H100 80GB3,050 output tokens/s; 5 min 7 s for the same pages

    Table 6, Appendix B

  • Downstream check: continued pretraining of OLMo-2-7B on 50B tokens of peS2o papers re-extracted with olmOCR vs the original Grobid extraction, average over six benchmarks

    Small model 55.2Large model 53.9 average score

    This compares two extraction pipelines, not olmOCR vs GPT-4o.

    Table 5, Section 4.2

Worth knowing

  • Developer-reported: Ai2 built the model, the training data and the benchmark, and ran all comparisons.
  • olmOCR was trained on GPT-4o’s own outputs, so this is a student beating its teacher on one benchmark, not an independent replacement.
  • Not a win on every document type: GPT-4o is ahead on old scanned math, Gemini Flash 2 on tables, Marker on long tiny text, Mistral OCR on arXiv math.
  • The headline numbers changed between versions: v1 said US$190 per million pages and had no benchmark.
2 more caveats
  • Some benchmark tests were found or drafted with model help: olmOCR itself was run to find candidate pages for the arXiv-math and old-scans-math tests, and GPT-4o, Gemini Flash 2.0 and Claude Sonnet 3.7 were prompted to draft tests, which people then reviewed (Section 3.2).
  • Costs are the authors’ estimates: rented-GPU hourly rates vs API list prices (Feb to May 2025), training excluded.

Weights on Hugging Face

Published

Verified 03 Oct 2026: base_model Qwen/Qwen2-VL-7B-Instruct, dataset allenai/olmOCR-mix-0225, licence Apache-2.0. Table 4 labels the row ‘Ours (v0.1.75 Anchored)’, the olmOCR toolkit version; Section 4.1 identifies the model as olmOCR-7B-0225-preview.

Sources

  1. Poznanski et al., “olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models”, arXiv 2502.18443 (v3)
  2. olmOCR code (GitHub, allenai/olmocr)
  3. olmOCR-7B-0225-preview weights (Hugging Face)
  4. olmOCR-bench dataset (Hugging Face)
  5. arXiv 2502.18443. v1 (25 Feb 2025) had no benchmark and quoted US$190 per million pages; olmOCR-Bench (Table 4) and the US$176 figure appear in v2 (18 Jun 2025) and v3 (2 Jul 2025). Every number here is from v3.
4 more sources behind this page
  1. arXiv 2502.18443v3
  2. github.com/allenai/olmocr/olmocr/bench/README.md
  3. github.com/allenai/olmocr/olmocr/bench/runners/run_chatgpt.py
  4. allenai.org/about
Share this benchmark

Drawing the image…

Post text