AIsaAIsaStudio English 打开 AIsa Studio

LlamaIndex 发布 4B 文档解析模型 OCRia-1

原标题:llamaindex/OCRia-1 (image-text-to-text)

LlamaIndex 发布 4B 文档解析视觉语言模型 OCRia-1,基于 Qwen3.5-4B,可将页面图像转写为 Markdown,表格输出为 HTML,图表转为数据表。模型在 ParseBench 2 得 85.2 分、ParseBench 1 得 84.7 分,均为开源权重模型中的最高分;仓库提供 BF16 权重,另有 GGUF 和 vLLM 部署方式。

为什么值得看

README 给出 ParseBench 多个榜单的分数、部署命令与模板注意事项,读者可直接上手复现或对比现有文档解析方案。

阅读原文 ↗

本页的摘要、推荐理由与解读出自 AIsa Studio 的 AI 风向智能体,原文版权归原作者所有。

原文

Hugging Face 热门模型第 30 名:llamaindex/OCRia-1,110 赞,近期下载 419 次。 标签:transformers, joblib, safetensors, qwen3_5, image-text-to-text, ocr, pdf, markdown, document-parsing, tables, charts, parsebench

README:

OCRia-1

Technical report · Blog post · Inference blog · LlamaParse · ParseBench · Ollama · GGUF

OCRia-1 is a 4B vision-language model for document parsing from LlamaIndex. It reads a page image and writes the page as Markdown, with tables in HTML, and it is built for the content that document parsers get wrong most often: merged cells and spanning headers, tables with thousands of cells, charts whose data has to be read off the plot, and formatting that carries meaning, such as strikethrough, underline, sub- and superscripts and checkboxes.

  • Accuracy: the highest-scoring open-weight model on both ParseBench leaderboards, with visual grounding included: 85.2 on ParseBench 2 (six dimensions, seventh of 61 systems) and 84.7 on ParseBench 1 (five dimensions, second of 158). It is also first on olmOCR-bench tables and formulas, PulseBench-Tab and fr-bench-pdf2md. See Benchmarks.
  • Tables: nested headers, merged cells as colspan / rowspan, irregular grids and long financial tables.
  • Charts: every chart becomes an HTML table of its data points, with each value under the right series and label (82.5 on ParseBench 1 charts, against 69.1 for the next-best open-weight model).
  • Formatting and math: bold, italic, strikethrough, underline, highlights, / ``, [ ] / [x] checkboxes, [___] blank fields, and formulas in LaTeX, including handwritten ones.
  • Page structure: headers, footers, page numbers and watermarks in their own tags, multi-column text unrolled, diagrams as Mermaid.
  • One call per page: the text comes from the page image alone, with no layout detector, OCR engine or text layer. Layout boxes are added afterwards.

[!NOTE] This repository holds the unoptimized BF16 weights. The OCRia-1 that serves LlamaParse is the same model, quantized and served with a speculative decoder and custom kernels, which makes it about ten times faster. See Speed and The Inference Stack Behind OCRia.

OCRia-1 runs inside LlamaParse, which also handles multi-page documents.

Examples

Pages from ParseBench, rendered at 150 DPI and transcribed with greedy decoding. The right-hand image renders what the model wrote, without editing.

Page OCRia-1 output
Dense financial table: a Texas insurance rate filing with a three-level header; the header spans become colspan and the section rows stay in place.
Chart as data: a line chart with three series over five years becomes a table of its 15 data points, matching the printed labels.
Formatting: a hearing notice with struck-through withdrawn cases, underlined case names and bold times; all three are kept.
Handwritten formulas: a handwritten note in Czech; the text is transcribed and each formula written as LaTeX.

More examples, including cash-flow statements, bank statements, timetables and economic charts, are in the blog post.

Quickstart

To run OCRia-1 on your own machine with llama.cpp or Ollama (Linux, Windows, macOS), use the GGUF builds in llamaindex/OCRia-1-GGUF; the Q8_0 build scores the same as these weights on a ParseBench 2 sample. On a GPU server:

Serve with vLLM 0.30 or later. vLLM compiles kernels for this architecture at start-up and needs the CUDA toolkit (nvcc); the vllm/vllm-openai Docker image has it.

vllm serve llamaindex/OCRia-1 --served-model-name ocria-1 --max-model-len 32768 \
  --limit-mm-per-prompt '{"image": 1}'

Send each page as one image, with prompt.txt as the system message, no user text, and thinking off. The Qwen3.5 chat template turns thinking on by default, and with it on the model answers in the wrong format.

import base64
from huggingface_hub import hf_hub_download
from openai import OpenAI

prompt = open(hf_hub_download("llamaindex/OCRia-1", "prompt.txt")).read()
page = base64.b64encode(open("page.png", "rb").read()).decode()

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
resp = client.chat.completions.create(
    model="ocria-1",
    messages=[
        {"role": "system", "content": prompt},
        {"role": "user", "content": [{"type": "image_url", "image_url": {"url": f"data:im

原文版权归 Hugging Face 热门模型 及原作者所有,本站转载仅供阅读。如需删除,请联系 support@aisa.one。

事件综述

LlamaIndex 发布 4B 文档解析视觉语言模型 OCRia-1

2026年11月24日,LlamaIndex 发布 OCRia-1,一个用于文档解析的 4B 视觉语言模型,可将页面图像转写为 Markdown,表格用 HTML,图表转数据表,公式转 LaTeX。据发布介绍,模型在 ParseBench 2 得 85.24、ParseBench 1 得 84.65,均为开源权重模型最高分,训练数据约 100,979 页,采用 SFT 加 GRPO 强化学习,发布仓库为未优化的 BF16 权重,LlamaParse 服务版本经量化与推测解码约快十倍;许可基于 RAIL-M,年收入或融资超 200 万美元需商业授权。11月26日的跟进报道称,模型基于 Qwen3.5-4B,ParseBench 2 得 85.2 分、ParseBench 1 得 84.7 分(与早先报道的 85.24/84.65 四舍五入一致),除 BF16 权重外另提供 GGUF 和 vLLM 部署方式。