Model reference · open weights

olmOCR-2-1025

LLMs allenai Vision + text 2 builds Open weights 276k dl/mo

olmOCR-2-1025 is an open-weight language model from allenai. olmOCR-2-7B-1025-FP8 (FP8) weighs 10.1 GB; the smallest configuration that runs it is RTX 4060 Ti 16 GB.

  • olmOCR-2-1025 is an 8.3B parameter image-text-to-text model developed by allenai, fine-tuned from Qwen2.5-VL-7B-Instruct for document OCR tasks.
  • It supports a context length of 128,000 tokens and is designed to process English documents, with specific optimizations for math equations and tables.
  • The model is released under the Apache 2.0 license.

Summary of the allenai/olmOCR-2-7B-1025-FP8 model card, 2026-10-01

What it is

Released byallenai
Released2025-10-06
Parameters8.3B
VRAM10.1 GB for the weights

What it runs on

Memory and cards for olmOCR-2-7B-1025-FP8 (FP8)

10.1 GBweights, file size
57 MBcache per 1K tokens
2.1 GBruntime overhead, at least
128,000 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB———11.6 GB
RTX 4060 Ti 16 GB6155K15.4 GB
RTX 3090 24 GB
FP8 without its speed-up here
235all 125K23.4 GB
RTX 4090 24 GB235all 125K23.4 GB
RTX 5090 32 GB4010all 125K31.0 GB
L40S 48 GB6716all 125K44.0 GB
A100 80 GB
FP8 without its speed-up here
14035all 125K78.2 GB
H100 80 GB13032all 125K78.1 GB
RTX PRO 6000 Blackwell 96 GB16441all 125K93.8 GB
DGX Spark (GB10) 128 GB unified19348all 125K107 GB
H200 141 GB25864all 125K138 GB
B200 180 GB33784all 125K176 GB
2× RTX 3060 12 GB
tensor parallel · FP8 without its speed-up here
194all 125K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
358all 125K15.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
112.6 GB14.0 GB
514.5 GB21.5 GB
815.9 GB27.2 GB
1619.7 GB42.2 GB
3227.2 GB72.3 GB
6442.2 GB132 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
olmOCR-2-7B-1025-FP8 (above) ↗ 8.3BFP8 10.1 GBRTX 4060 Ti 16 GB
olmOCR-2-7B-1025 ↗ 8.3BBF16 16.6 GB2× RTX 3060 12 GB

From the model card

What allenai says about olmOCR-2-1025

Read the model card

Quantized to FP8 Version of olmOCR-2-7B-1025, using llmcompressor.

This is a release of the olmOCR model that's fine tuned from Qwen2.5-VL-7B-Instruct using the olmOCR-mix-1025 dataset. It has been additionally fine tuned using GRPO RL training to boost its performance at math equations, tables, and other tricky OCR cases.

Quick links:

The best way to use this model is via the olmOCR toolkit. The toolkit comes with an efficient inference setup via VLLM that can handle millions of documents at scale.

olmOCR-Bench Scores

This model scores the following scores on olmOCR-bench when used with the olmOCR toolkit toolkit which automatically renders, rotates, and retries pages as needed.

Usage

This model expects as input a single document image, rendered such that the longest dimension is 1288 pixels.

The prompt must then contain the additional metadata from the document, and the easiest way to generate this is to use the methods provided by the olmOCR toolkit.

Manual Prompting

If you want to prompt this model manually instead of using the olmOCR toolkit, please see the code below.

In normal usage, the olmOCR toolkit builds the prompt by rendering the PDF page, and extracting relevant text blocks and image metadata. To duplicate that you will need to

pip install olmocr>=0.4.0

and then run the following sample code.

import torch
import base64
import urllib.request

from io import BytesIO
from PIL import Image
from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration

from olmocr.data.renderpdf import render_pdf_to_base64png
from olmocr.prompts import build_no_anchoring_v4_yaml_prompt

# Initialize the model
model = Qwen2_5_VLForConditionalGeneration.from_pretrained("allenai/olmOCR-2-7B-1025-FP8", device_map="auto").eval()
processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-7B-Instruct")
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)

# Grab a sample PDF
urllib.request.urlretrieve("https://olmocr.allenai.org/papers/olmocr.pdf", "./paper.pdf")

# Render page 1 to an image
image_base64 = render_pdf_to_base64png("./paper.pdf", 1, target_longest_image_dim=1288)

# Build the full prompt
messages = [
            {
                "role": "user",
                "content": [
                    {"type": "text", "text": build_no_anchoring_v4_yaml_prompt()},
                    {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_base64}"}},
                ],
            }
        ]

# Apply the chat template and processor
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
main_image = Image.open(BytesIO(base64.b64decode(image_base64)))

inputs = processor(
    text=[text],
    images=[main_image],
    padding=True,
    return_tensors="pt",
)
inputs = {key: value.to(device) for (key, value) in inputs.items()}

# Generate the output
output = model.generate(
            **inputs,
            temperature=0.1,
            max_new_tokens=50,
            num_return_sequences=1,
            do_sample=True,
        )

# Decode the output
prompt_length = inputs["input_ids"].shape[1]
new_tokens = output[:, prompt_length:]
text_output = processor.tokenizer.batch_decode(
    new_tokens, skip_special_tokens=True
)

print(text_output)
# ['---\nprimary_language: en\nis_rotation_valid: True\nrotation_correction: 0\nis_table: False\nis_diagram: False\n---\nolmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models\n\nJake Poz']

License and use

This model is licensed under Apache 2.0. It is intended for research and educational use in accordance with Ai2's Responsible Use Guidelines.

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms