olmOCR 2 improves AI-powered PDF reading
Ai2 has launched olmOCR 2, an AI model that converts complex PDFs into structured text. Its training uses automated tests to check tables, formulas, and reading order, and it scores 82.4 points in the company’s evaluation.

PDFs with tables, formulas, and multiple columns are still difficult to convert into reliable text. Ai2 has introduced olmOCR 2, an AI model that scores 82.4 points in its benchmark and performs especially well on the cases where OCR systems usually fail.
OCR is the technology that recognizes text inside an image or scanned document. But reading the words is not enough: the system also has to preserve their order, the structure of tables, equations, and the relationships between headings, paragraphs, and notes.
What makes olmOCR 2 different
olmOCR 2 analyzes each full page in a single pass. From the image, it directly generates:
- Markdown for headings and document structure.
- HTML for tables.
- LaTeX for mathematical equations.
This avoids relying on multiple tools connected through post-processing rules. In a two-column document, for example, the system tries to preserve the correct reading order instead of mixing one column with the other.
The model is based on Qwen2.5-VL-7B and was fine-tuned with olmOCR-mix-1025, a dataset of 270,000 PDF pages that includes academic papers, legal documents, brochures, historical archives, and other formats. The new version adds 20,000 especially difficult pages containing handwritten and typewritten text.
Training AI with tests similar to those used in software
The main innovation lies in how the model was trained. Ai2 turned document correction into a series of automated tests, similar to the unit tests programmers use to check whether a function behaves as expected.
A test can verify whether:
- The structure of a table is preserved.
- An equation was transcribed correctly.
- The reading order is coherent.
- The document metadata was extracted consistently.
To create training data, the team took real pages, reconstructed them as clean HTML, and generated the corresponding text and tests from that code. The result was a synthetic dataset of 2,186 pages and 30,381 verifiable tests, created at a cost of $0.12 per page.
The model then generated 28 responses for each document during training. Responses that passed more tests received a higher reward. This meant the system learned not only to produce text resembling the original, but also to meet specific accuracy requirements.
The same battery of tests is used to measure the final result, although Ai2 says it keeps the training and evaluation data separate.
Better performance on tables, formulas, and columns
On the olmOCR-Bench test, olmOCR 2 scores 82.4 points, nearly four more than the previous version. According to Ai2, it outperforms specialized tools such as Marker, at 76.1 points, and MinerU, at 75.8.
The most notable improvements appear in several categories:
- Old scans with mathematics: 82.3%, compared with 79.9% previously.
- Tables: 84.9%, compared with 72.9%.
- Documents with multiple columns: 83.7%, compared with 77.3%.
It also performs better on historical documents. Ai2 gives the example of an 1864 letter from Abraham Lincoln whose date was misread in earlier versions because of the difficulty of interpreting its handwriting.
What this changes for you
The usefulness depends on how you work with documents. A library could turn thousands of historical scans into searchable text. A company could extract data from financial reports and contracts without creating different rules for every template. It could also improve access to documents that previously could only be read as images.
The model is released with its weights, datasets, and training and fine-tuning code. That makes it possible to adapt the model with a relatively small sample of your own pages, such as internal forms or case files with a specific layout.
The FP8-quantized version, which reduces memory usage, reaches 3,400 output tokens per second on an H100 GPU. Ai2 estimates that processing 10,000 pages costs less than $2 under those conditions.
The next thing to watch is not just speed, but performance outside English and on even more irregular documents. olmOCR 2 points in a specific direction: teaching AI to read documents through errors that can be checked, not just through increasingly large numbers of examples.