Your PDFs Are Worth Trillions of Tokens. Most OCR Pipelines Are Throwing Them Away.
Based on: olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models — Jake Poznanski, Aman Rangapur, Jon Borchardt, Jason Dunkelberger, Regan Huff, Daniel Lin, Aman Rangapur, Christopher Wilhelm, Kyle Lo, Luca Soldaini
Here's a number that should stop you mid-scroll: running every PDF page on the internet through GPT-4o to extract clean text would cost more than $6,240 per million pages. Scale that to the billions of PDFs sitting in government archives, scientific journals, court filings, and old scanned books, and you're looking at a bill in the tens of millions of dollars just to make that text usable by a language model or a search index.
A team at the Allen Institute for AI (Ai2) looked at that number and asked a more interesting question: what if you didn't need GPT-4o at all? Their answer is olmOCR, a 7-billion-parameter vision model fine-tuned specifically for reading PDFs, and it processes a million pages for $176. That's not a rounding error away from the GPT-4o price. It's about 35 times cheaper, and according to their benchmark, it's also more accurate.
If you build anything that touches document extraction, this paper is worth understanding in detail, because it quietly settles an argument that's been running for a couple of years: do you need a giant, general-purpose model to read a PDF well, or can a smaller, specialized one do it better?

Figure from olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models (Poznanski et al., arXiv:2502.18443), licensed CC BY 4.0.
Why reading a PDF is a harder problem than it looks
A PDF isn't text with a wrapper around it. It's a set of drawing instructions: put this character glyph at this x/y coordinate, put that line here, put this image there. There's no inherent concept of "this is a paragraph" or "this is a table" or "read top to bottom, then left column, then right column." Traditional PDF text extractors (pdftotext, PyMuPDF, and friends) parse those drawing instructions and try to reconstruct reading order, but they fall apart constantly: two-column academic papers get their columns interleaved line by line, tables turn into word soup, footnotes get glued into the middle of a sentence, and scanned pages (which are just images, no embedded text at all) return nothing.
Vision language models sidestep this by treating the page the way a person does: as a picture. Show the model an image of the page, ask it to describe what's written on it, in order. This works dramatically better than layout parsing for messy documents, which is why people have been piping PDFs through GPT-4o and Gemini for OCR. The catch is cost, latency, and the fact that a lot of PDFs (medical records, legal documents, anything with a confidentiality requirement) can't be sent to a third-party API at all.
So the real target isn't "can a VLM read a PDF." That's established. The target is: can you get GPT-4o-level page reading out of a small model you can run yourself, on your own hardware, at a cost that makes processing a hundred million pages a weekend project instead of a budget line item.
The training data problem: 260,000 pages, deliberately messy
You can't fine-tune a model to read PDFs well without training examples of a model reading PDFs well, and that turns out to be the hard part. The Ai2 team built olmOCR-mix-0225, a dataset of 260,000 pages pulled from more than 100,000 crawled PDFs, and the interesting part isn't the size, it's the composition.
Instead of curating a clean, representative sample, they deliberately loaded it with the documents that break OCR systems: pages with dense math notation, tables with merged cells, handwritten annotations, low-quality scans with visible speckling and skew, forms, and multi-column layouts. They generated ground-truth text for these pages using GPT-4o itself (an expensive, one-time cost, since you only need to do it once per training example, not per production page) and had humans review a portion of it for quality.
This is the same insight behind most successful distillation projects: a smaller model can match a bigger one on a narrow task if you feed it the bigger model's outputs as training signal, but only if your training examples cover the actual distribution of hard cases you'll see in production. A dataset of easy, clean PDFs would have produced a model that's great at easy, clean PDFs and useless the moment it hits a receipt photographed at an angle.
Building a benchmark that existing tools weren't allowed to be good at
Before they built olmOCR, the team built olmOCR-Bench, a set of 1,400 PDFs designed around a specific idea: most existing OCR benchmarks are too easy, because they're dominated by clean, single-column, born-digital documents that every tool already handles fine. If your benchmark is 90% easy documents, a bad tool looks almost as good as a great one, and you can't tell the difference between systems that actually matter.
olmOCR-Bench instead concentrates on the categories that separate real capability from marketing claims: scientific papers full of equations, tables with irregular structure, documents in tiny or unusual fonts, old and degraded scans, and multi-column layouts. Rather than scoring extracted text against a reference with a fuzzy string-similarity metric (which can reward a tool for getting words right while completely destroying the document's structure), they use targeted unit tests. Does the equation render with the correct LaTeX? Does the table's row and column structure survive? Does natural reading order hold across a two-column layout? A tool either passes each check or it doesn't.
This matters more than it sounds like it should. A lot of published OCR comparisons quietly benchmark on the easy 90%, which is exactly where the differences between tools are smallest and least useful to know about.

Figure from olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models (Jake Poznanski et al., arXiv:2502.18443), licensed CC BY 4.0.
The numbers: olmOCR beats GPT-4o, Gemini Flash 2, and Qwen-2.5-VL
On olmOCR-Bench, the fine-tuned 7B model outperforms GPT-4o, Gemini Flash 2, and Qwen-2.5-VL, the general-purpose vision models it was distilled from. A specialized model built for one task beating the general models that trained it isn't a new phenomenon, but it's still worth sitting with: the smaller model isn't winning because it's smarter in some general sense. It's winning because its entire capacity is spent on one narrow, well-defined skill, and the training data was built specifically to cover the failure modes that skill needs to survive.
The cost comparison is the part that actually changes what's feasible. At roughly $6,240 per million pages for GPT-4o versus $176 per million pages for olmOCR, you're not choosing between "affordable" and "slightly less affordable." You're choosing between a tool you can run on a research budget and one you can only justify for a narrow, high-value slice of your documents. That gap is what makes phrases like "unlocking trillions of tokens" more than a marketing headline: at GPT-4o pricing, most of the world's PDF archive stays locked up, because nobody's budget covers reading all of it. At $176 per million pages, mass digitization projects, whole-corpus training runs, and full-archive search indexes become things a mid-sized team can actually plan for and ship.
The pipeline is also built for throughput rather than one-off calls: it supports both vLLM and SGLang as inference backends, and it's designed to scale across whatever GPU setup you have rather than requiring one specific configuration. That's a deliberate choice for the target user, which is someone processing millions of pages in batch, not someone building a single-document upload feature.
Why it matters for anyone building or choosing OCR
If you're deciding how to handle document extraction in a product, olmOCR is evidence for a specific claim: for high-volume OCR, a specialized open model can beat a general-purpose frontier model on both quality and cost, provided someone has done the unglamorous work of building a training set that covers the ugly cases. That's a different lesson than "smaller models are catching up to big ones" in general. It's narrower and more useful: task-specific fine-tuning on hard, representative data can outperform raw model scale, at least for problems as visually structured as reading a page.
The practical takeaway breaks into three real decisions:
- If you're processing PDFs at scale (archives, training corpora, document pipelines with millions of pages), a self-hosted model like olmOCR removes the per-page API cost that makes those projects expensive to even prototype. The gap between $6,240 and $176 per million pages is the difference between "we ran a pilot on 10,000 pages" and "we processed the whole archive."
- If your documents are sensitive (medical, legal, financial records that can't leave your infrastructure), a model you can run yourself isn't just cheaper, it's the only option that satisfies your compliance requirements in the first place.
- If you're benchmarking OCR tools for a purchase decision, ask what the benchmark is actually testing. A tool that scores well on clean single-column PDFs and poorly on scanned tables or multi-column academic papers will behave very differently depending on what you actually feed it. olmOCR-Bench's approach, deliberately weighting toward hard cases, is the right question to ask any vendor's numbers, including OpenOCR's own catalog comparisons.
What the paper doesn't solve
The results are strong, but it's worth being honest about the scope. olmOCR-Bench is 1,400 PDFs curated by the same team that built the model being evaluated against it, and while the unit-test methodology is a real improvement over fuzzy string matching, "we built the hardest benchmark and then did best on it" is a claim that deserves some healthy skepticism until independent groups reproduce the ranking on their own document sets.
The model is also a 7B parameter model, meaning it needs real GPU infrastructure to run at the throughput the paper describes. $176 per million pages assumes you already have or can rent the hardware to run vLLM or SGLang efficiently; it isn't a price you pay per API call the way GPT-4o pricing is. For someone processing a few hundred pages a month, the frontier API might still be the simpler and cheaper choice once you account for the engineering time to stand up a self-hosted pipeline. And handwriting, extremely degraded scans, and documents in low-resource languages remain listed as open challenges in the paper itself, not solved problems.
None of that undercuts the core finding. It just means the honest read is "this is a very strong, very cheap option for large-scale PDF processing where you control the infrastructure," not "OCR is now solved and free." For the specific problem it targets, unlocking large volumes of PDF text without frontier-API pricing, it's a genuinely useful piece of open infrastructure, and the fact that Ai2 released the model, training data, and benchmark rather than just the paper means anyone can verify these numbers instead of taking them on faith.