alt.freeweights.olmo / olmOCR-2-7B-1025
From: allenai <huggingface.co/allenai>Newsgroups: alt.freeweights.olmoSubject:

olmOCR-2-7B-1025

Date: 2026-11-14Commit: e52d6f0Signed: 2DC28CC7B26A283B ✓

Image text to text model with 8.3B parameters. Safetensors weights, 16.6 GB in all. Published by allenai under Apache-2.0.

8.3B params16.6GBolmOCR-2-7B-1025safetensorspermissive
FactsParams8.3BSize16.6 GBFormatssafetensorsTaskimage text to textLicenseApache-2.0From sourcepermissive
$ fw get allenai/olmOCR-2-7B-1025
# manifest sha256 5c4f42a873a6… · 16.6 GB · 21 files
$ fw verify ./olmOCR-2-7B-1025 allenai/olmOCR-2-7B-1025
From sourceHosted (signed)allenai/olmOCR-2-7B-1025Last check: 2026-11-14 21:14 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Fine-tune of Qwen2.5-VL-7B-Instruct.

Works with

Overview

Size
16.6 GB
Weights
16.6 GB (safetensors)
Parameters
8.3B
Formats
safetensors
Task
image text to text
License
Apache-2.0 (permissive)
Files
21, each with a sha256
Publisher
allenai
Added
2026-11-14
Section
alt.freeweights.olmo
Lineage

Original release from the publisher.

Base model: Qwen/Qwen2.5-VL-7B-Instruct

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:14 UTCpassed

Model card

From the publisher at commit e52d6f0. Shown as plain text with links; images open at the publisher.

Image: olmOCR Logo

olmOCR-2-7B-1025#

Full BF16 version of olmOCR-2-7B-1025-FP8. We recommend using the FP8 version for all practical purposes except further fine tuning.

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.

| Model | ArXiv | Old Scans Math | Tables | Old Scans | Headers and Footers | Multi column | Long tiny text | Base | Overall

| olmOCR pipeline v0.4.0 with olmOCR-2-7B-1025 | 82.9 | 82.1 | 84.3 | 48.3 | 95.7 | 84.3 | 81.4 | 99.7 | 82.3 ± 1.1

| olmOCR pipeline v0.4.0 with olmOCR-2-7B-1025-FP8 | 83.0 | 82.3 | 84.9 | 47.7 | 96.1 | 83.7 | 81.9 | 99.7 | 82.4 ± 1.1

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", torch_dtype=torch.bfloat16).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.

Files

21 files · 16.6 GBWeights 16.6 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 21 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md6.14 KB651827a702c15ba145c46f5a34338563d455068a68038f173400e90fd78b00f8
added_tokens.json605 B58b54bbe36fc752f79a24a271ef66a0a0830054b4dfad94bde757d851968060b
chat_template.jinja1.02 KBa0bc6f6fc7a29a80017a433e8f03a1cc1236e838a944a2d034295a60c4f2fddb
chat_template.json1.05 KBad60d90252ed0b0705ba14e2d0ad0fec0beac1ea955642b54059b36052d8bc96
config.json3.22 KB7daf88568646276440e7f51d9d5c7845925e92c9f54aa18c1f621f5029b4331d
generation_config.json260 Bf8f9e40b9d85636128865f0be3c696b915932049b6c25b087241f63f5ef4e785
latest14 Bbdf1586d0f35cf1a2aabb39bd88270f5c060ad58e946b4284cf9133803e073a6
merges.txt1.67 MB599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3
model-00001-of-00004.safetensors4.97 GBf752fd105e3d9ecd4efc16cb5c40e9f97f46c0d0614e328b5723a74df4634561
model-00002-of-00004.safetensors4.99 GB0bbaa22a46fdad5a68c733f59712e87e83dacfccfd0f14c300074992642bcd90
model-00003-of-00004.safetensors4.93 GB41ecc0cc06829b18c2fdcd704c2c3032bafc3b51e79d73c5b536f9c142a07e2e
model-00004-of-00004.safetensors1.69 GBffca66cb61f6ad70364a095fee84ccf40597476f82649983003e41e305dfc5f8
model.safetensors.index.json57.7 KB4be35310ddc165e46e88de4c3fec8c1210014b0b8717f4544d82cc740814ae0c
preprocessor_config.json350 Bf2058c716eef96ccaed1cc1e2d0c08306b62586d535b28d9d08e691b2fab7ca0
special_tokens_map.json613 B76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd
tokenizer.json7.03 MBc0382117ea329cdf097041132f6d735924b697924d6f6fc3945713e96ce87539
tokenizer_config.json5.70 KB4abd3520120e266da84c0864fee064d1fb10806f02225911a47253dd38dc5f56
video_preprocessor_config.json907 B09e98526bcd1b8584217418253badf2824ecf2815933b0583cdceb2e8f79ebb0
vocab.json2.78 MBca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910
zero_to_fp32.py33.3 KBe8a2553b434ac043ec63b022db1e768277acf8d4e70f10a2842db6d238977135
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
e52d6f090b pinned now manifest updated, same commit2026-11-14 21:14 UTC21 files · 16.6 GB
e52d6f090b2026-11-14 21:14 UTC21 files · 16.6 GB

Use it

$ fw get allenai/olmOCR-2-7B-1025
# manifest sha256 5c4f42a873a6… · 16.6 GB · 21 files
$ fw verify ./olmOCR-2-7B-1025 allenai/olmOCR-2-7B-1025
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/allenai/olmOCR-2-7B-1025.json --dir ./olmOCR-2-7B-1025 $ python3 fw.py verify ./olmOCR-2-7B-1025 ./allenai__olmOCR-2-7B-1025.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download allenai/olmOCR-2-7B-1025 --revision e52d6f090b7a9007afffbbd6ce510876222fea93 --local-dir ./olmOCR-2-7B-1025
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForImageTextToText, AutoProcessor processor = AutoProcessor.from_pretrained("allenai/olmOCR-2-7B-1025", revision="e52d6f090b7a9007afffbbd6ce510876222fea93") model = AutoModelForImageTextToText.from_pretrained("allenai/olmOCR-2-7B-1025", revision="e52d6f090b7a9007afffbbd6ce510876222fea93", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve allenai/olmOCR-2-7B-1025 --revision e52d6f090b7a9007afffbbd6ce510876222fea93

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
651827a702c15ba145c46f5a34338563d455068a68038f173400e90fd78b00f8
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: allenai <huggingface.co/allenai>Newsgroups: alt.freeweights.olmoSubject: olmOCR-2-7B-1025Date: 2026-11-14Commit: e52d6f0Signed: 2DC28CC7B26A283B ✓
Upstream
allenai/olmOCR-2-7B-1025
Pinned commit
e52d6f090b7a9007afffbbd6ce510876222fea93
Manifest
olmOCR-2-7B-1025.json · .minisig
Manifest sha256
5c4f42a873a60eae4cb1c6aa499142afc82298ba84ee70503c69c333328a0d56
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:14 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/allenai/olmOCR-2-7B-1025.json $ curl -O https://freeweights.allternit.com/manifests/allenai/olmOCR-2-7B-1025.json.minisig $ minisign -Vm olmOCR-2-7B-1025.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

Qwen/Qwen2.5-VL-7B-Instruct · this model is a finetune of it

2 models in the catalog name this one as their parent.

Quantizations
2
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download allenai/olmOCR-2-7B-1025
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. olmOCR-2-7B-1025.json. Provenance. Takedown history: none.

Variants

2 quantized or adapter builds of olmOCR-2-7B-1025. Each has its own license check and page.

From: bartowski <huggingface.co/bartowski>Subject: allenai_Olmo-3-7B-Instruct-GGUF
From: bartowski <huggingface.co/bartowski>Subject: allenai_Olmo-3-7B-Think-GGUF
From: bartowski <huggingface.co/bartowski>Subject: allenai_Olmo-3.1-32B-Instruct-GGUF
From: bartowski <huggingface.co/bartowski>Subject: allenai_Olmo-3.1-32B-Think-GGUF
From: bartowski <huggingface.co/bartowski>Subject: allenai_olmOCR-2-7B-1025-GGUF
From: bartowski <huggingface.co/bartowski>Subject: allenai_olmOCR-7B-0225-preview-GGUF