alt.freeweights.qwen / olmOCR-2-7B-1025-FP8
From: allenai <huggingface.co/allenai>Newsgroups: alt.freeweights.qwenSubject:

olmOCR-2-7B-1025-FP8

Date: 2026-11-15Commit: 40bd720Signed: 2DC28CC7B26A283B ✓

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

8.3B params10.1GBolmOCR-2-7B-1025-FP8safetensorspermissive
FactsParams8.3BSize10.1 GBFormatssafetensorsTaskimage text to textLicenseApache-2.0From sourcepermissive
$ fw get allenai/olmOCR-2-7B-1025-FP8
# manifest sha256 8ace342258f9… · 10.1 GB · 20 files
$ fw verify ./olmOCR-2-7B-1025-FP8 allenai/olmOCR-2-7B-1025-FP8
From sourceHosted (signed)allenai/olmOCR-2-7B-1025-FP8Last check: 2026-11-15 04:36 UTC

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

Quantized of Qwen2.5-VL-7B-Instruct.

Works with

Overview

Size
10.1 GB
Weights
10.1 GB (safetensors)
Parameters
8.3B
Formats
safetensors
Task
image text to text
License
Apache-2.0 (permissive)
Files
20, each with a sha256
Publisher
allenai
Added
2026-11-15
Section
alt.freeweights.qwen
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-15 04:36 UTCpassed

Model card

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

Image: olmOCR Logo

olmOCR-2-7B-1025-FP8#

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.

| 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-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.

Files

20 files · 10.1 GBWeights 10.1 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 20 files with their sha256
FileSizesha256
.eval_results/olmocrbench.yaml1.92 KB86ce2bdfba2aa7346dc4ff09d43dff1afb3568f3ca5d4e53a6947687f1e1f2ff
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
README.md6.07 KB3ad64556c43986a018480b643a12d929a9673835e7d15393e1b3fb29d269448b
added_tokens.json605 B58b54bbe36fc752f79a24a271ef66a0a0830054b4dfad94bde757d851968060b
chat_template.jinja1.02 KBa0bc6f6fc7a29a80017a433e8f03a1cc1236e838a944a2d034295a60c4f2fddb
chat_template.json1.05 KBad60d90252ed0b0705ba14e2d0ad0fec0beac1ea955642b54059b36052d8bc96
config.json11.3 KB2190d9d374d4c3ea63f5e30964ae7065aa49fd56503d4ac1d64a7967fd50cda9
generation_config.json260 Be36f02c07e755015550d4665b711041cc85527b57d7a7d27f64fec4f22e226ea
merges.txt1.67 MB8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5
model-00001-of-00003.safetensors4.94 GB5d5550dbb21e309786fde9a151442181562cf9dc23141116a4e46e3e815b0d02
model-00002-of-00003.safetensors4.03 GB65cb798f6478260b7eba5120cba2041ca252d3f94c9a2e32cc7fba16231f0c4a
model-00003-of-00003.safetensors1.09 GB4a185c74b8147aff33829d1d7384e2781c8dd09461d50499afbd1d80a13e7e1a
model.safetensors.index.json74.7 KB3bfee1d5ee5d128196e128a9e4d0e8d7d788f440765ad406966ae1f9f4b547f5
preprocessor_config.json350 Bf2058c716eef96ccaed1cc1e2d0c08306b62586d535b28d9d08e691b2fab7ca0
recipe.yaml164 Bfbee2c4f579e19ef68f8932819075e3116f58e794c75ce0842f79002de3a6133
special_tokens_map.json613 B76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd
tokenizer.json11.4 MB9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
tokenizer_config.json4.69 KB0a04a9d7d4a62b28482bdfe726c122756de85714fb64166ace92ae75b8f57614
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
40bd720249 pinned now2026-11-15 04:36 UTC20 files · 10.1 GB

Use it

$ fw get allenai/olmOCR-2-7B-1025-FP8
# manifest sha256 8ace342258f9… · 10.1 GB · 20 files
$ fw verify ./olmOCR-2-7B-1025-FP8 allenai/olmOCR-2-7B-1025-FP8
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-FP8.json --dir ./olmOCR-2-7B-1025-FP8 $ python3 fw.py verify ./olmOCR-2-7B-1025-FP8 ./allenai__olmOCR-2-7B-1025-FP8.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download allenai/olmOCR-2-7B-1025-FP8 --revision 40bd7202494b8264ee17ada08b401b5aab7a9ce1 --local-dir ./olmOCR-2-7B-1025-FP8
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-FP8", revision="40bd7202494b8264ee17ada08b401b5aab7a9ce1") model = AutoModelForImageTextToText.from_pretrained("allenai/olmOCR-2-7B-1025-FP8", revision="40bd7202494b8264ee17ada08b401b5aab7a9ce1", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve allenai/olmOCR-2-7B-1025-FP8 --revision 40bd7202494b8264ee17ada08b401b5aab7a9ce1

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-15
Text in
README.md
Text sha256
3ad64556c43986a018480b643a12d929a9673835e7d15393e1b3fb29d269448b
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.qwenSubject: olmOCR-2-7B-1025-FP8Date: 2026-11-15Commit: 40bd720Signed: 2DC28CC7B26A283B ✓
Upstream
allenai/olmOCR-2-7B-1025-FP8
Pinned commit
40bd7202494b8264ee17ada08b401b5aab7a9ce1
Manifest
olmOCR-2-7B-1025-FP8.json · .minisig
Manifest sha256
8ace342258f95788ff2d98ca7ba4d7d51fb41acdc2b5c00a2666be055ff62a41
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:36 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/allenai/olmOCR-2-7B-1025-FP8.json $ curl -O https://freeweights.allternit.com/manifests/allenai/olmOCR-2-7B-1025-FP8.json.minisig $ minisign -Vm olmOCR-2-7B-1025-FP8.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 quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download allenai/olmOCR-2-7B-1025-FP8
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-FP8.json. Provenance. Takedown history: none.
From: BAAI <huggingface.co/BAAI>Subject: Aquila-VL-2B-llava-qwen
From: Perciqa <huggingface.co/Perciqa>Subject: Aurora-Code-1
From: BAAI <huggingface.co/BAAI>Subject: bge-reasoner-embed-qwen3-8b-0923
From: amazon <huggingface.co/amazon>Subject: BMOJOF-primed-HQwen3-8B-Instruct
From: nbeerbower <huggingface.co/nbeerbower>Subject: Bubba-Qwen3.6-27B-LoRA
From: bartowski <huggingface.co/bartowski>Subject: bytkim_Qwen3.8-27B-pi-GGUF