50 16 hours ago

OCRia-1 is a 4B vision-language model for document parsing from LlamaIndex. It reads page images into Markdown and HTML tables, preserving complex tables, chart data, mathematical formulas and document formatting.

vision tools thinking
ollama run llamaindex/ocria-1:bf16

Details

16 hours ago

2664fd902637 · 10GB

{ "architectures": [ "Qwen3_5ForConditionalGeneration" ], "bos_token_id": null, "dtype": "float32",
{ "_from_model_config": true, "eos_token_id": 248046, "output_attentions": false, "output_hidden_sta
{ "repo": "llamaindex/OCRia-1", "revision": "2b133ff86040704cec5dce1b3c99eec5c7268217", "files": [ {
{ "image_processor": { "data_format": "channels_first", "do_convert_rgb": true, "do_normalize": true
{ "version": "1.0", "truncation": null, "padding": null, "added_tokens": [ { "id": 248044, "content"
{ "add_prefix_space": false, "audio_bos_token": "<|audio_start|>", "audio_eos_token": "<|audio_end|>
{ "hf_revision": "2b133ff86040704cec5dce1b3c99eec5c7268217", "weight_sha256": "426d9aa2df62e72e1e790
Transcribe this Page in markdown, be as accurate as possible in your transcription, do not describe/
OCRia-1 MODEL AND CODE LICENSE Licensor: LlamaIndex, Inc. Based on the AI Pubs Open RAIL-M License,
{ "num_ctx": 32768, "num_predict": 24576, "temperature": 0 }
724 tensors

Readme

OCRia-1

OCRia-1 is LlamaIndex’s document-parsing vision-language model, based on Qwen3.5-4B. Give it a page image and it transcribes the page into Markdown, with tables and chart data represented as HTML tables.

This tag contains the original BF16 weights, without quantization or a speculative draft model. The OCR system prompt is included.

Run

Install Ollama 0.40.16 or later, start Ollama, and pull the model:

ollama pull llamaindex/ocria-1:bf16

The following Python example uses only the standard library. Save it as transcribe.py and run python transcribe.py page.png:

import base64
import json
import sys
import urllib.request
from pathlib import Path

image = Path(sys.argv[1])
payload = {
    "model": "llamaindex/ocria-1:bf16",
    "messages": [{
        "role": "user",
        "content": "",
        "images": [base64.b64encode(image.read_bytes()).decode("ascii")],
    }],
    "think": False,
    "stream": False,
    "keep_alive": "0",
}
request = urllib.request.Request(
    "http://localhost:11434/api/chat",
    data=json.dumps(payload).encode("utf-8"),
    headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(request, timeout=600) as response:
    result = json.load(response)
print(result["message"]["content"])
if result.get("done_reason") == "length":
    raise SystemExit("Output was truncated; increase num_predict and num_ctx.")

Send one page image per request. Render PDF pages to images first. Keep think set to false; the bundled system prompt supplies the transcription instructions. Output can include a surrounding Markdown code fence.

Defaults are temperature 0, a 32768-token context, and up to 24576 generated tokens. Dense pages may hit these limits. keep_alive: "0" unloads the model after the request; use "5m" to keep it loaded when processing several pages.

Compatibility and memory

The weights are approximately 10.35 GB; runtime memory also includes image features, context and temporary buffers. Weight size is not a RAM requirement.

This package was tested with Ollama 0.40.16 on an Apple M4 Max with 36 GB unified memory, using MLX. Windows, Linux and other hardware have not been validated for this package. The version requirement reflects the tested version, not a claim that earlier versions cannot work.

Grounding

This Ollama package returns transcription text. Stock Ollama does not expose the attention maps needed by OCRia’s fast or slow bounding-box grounders. Those require a separate runtime integration; pulling this model does not enable them.

Model and license

Weights and configuration are pinned to Hugging Face revision 2b133ff86040704cec5dce1b3c99eec5c7268217. The same license is bundled with this release. Benchmark results in the Hugging Face model card describe their stated evaluation setup; this Ollama package has not undergone a full benchmark evaluation.