/ Модель

Характеристики

Контекст
16 384 токена
Параметры
232 млн
Лицензия
openmdw-1.1
Архитектура
nemotron_parse · dense
Базовая модель
Nemotron-3.5-Parse
Библиотека
transformers
Опубликована
12 ноя 2026

absir-arabic-ocr-mini

Генерация текстаТекст → текст5 профессий

Модель распознаёт печатные арабские страницы книг и документов, выдавая текст в порядке чтения с базовой HTML-структурой.

158скачиваний за 30 дней0лайковвеса обновлены12 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

absir-arabic-ocr-mini — модель для постраничного распознавания печатных арабских документов, созданная g3ida на основе nvidia/Nemotron-3.5-Parse. Она принимает изображение страницы и возвращает распознанный текст в порядке чтения с лёгкой HTML-разметкой абзацев, заголовков, сносок, таблиц и оглавлений; диакритические знаки ташкиль сохраняются. Модель дообучена на 58 700 изображениях страниц примерно из 3 400 книг с дополнительным обучением с подкреплением. В README указан размер 0,7 млрд параметров, тогда как метаданные Hugging Face сообщают 231,5 млн параметров; архитектура в метаданных — RadioMBartPrefixForCausalLM семейства Nemotron Parse, библиотека — Transformers, контекст — 16 384 токена.

Модель предназначена прежде всего для OCR книжных страниц на арабском языке. В описанных тестах она показывает хорошие результаты распознавания текста и таблиц KITAB, но хуже справляется со структурой таблиц в Misraj-DocOCR. Ограничения включают ошибки в написании хамзы и йа относительно старопечатных оригиналов, возможную подмену плохо читаемых слов и циклическое повторение, особенно на страницах с большим количеством латиницы или длинными числовыми таблицами. Почерк, отдельные строки, текст на изображениях вне документов и другие письменности не входят в целевой сценарий. Лицензия — OpenMDW-1.1.

Сценарии применения

  • OCR печатных страниц арабских книг
  • оцифровка арабских документов с сохранением порядка чтения
  • извлечение текста и диакритических знаков ташкиль со страниц
  • распознавание таблиц и оглавлений в арабских книгах
  • создание черновой HTML-разметки абзацев, заголовков и сносок

Ограничения

Модель рассчитана на печатные книжные страницы, а не на рукопись, отдельные строки или другие письменности; в старых изданиях может нормализовать написание хамзы и йа. Иногда подменяет неразборчивые слова или зацикливается, а структуру таблиц в некоторых документах распознаёт ненадёжно.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

absir-arabic-ocr-mini

absir-arabic-ocr-mini is the second version of absir-arabic-ocr-1.6B: a page-level OCR model for printed Arabic documents, less than half the size (0.7B parameters). It is more accurate than the 1.6B on every text score below and on KITAB table recognition (TEDS 85.4 against 64.6); on Misraj's table structure the two are level. It reads a full page image and returns the text in reading order, with light HTML structure:

  • <p> paragraphs and <h1> to <h6> headings
  • <strong>, <sup> (note markers), <br> and <hr>
  • <table> for printed tables and tables of contents
  • the footnote block wrapped in <footnotes>

Diacritics (tashkeel) are kept.

absir-arabic-ocr-mini is based on nvidia/Nemotron-3.5-Parse with 0.7B parameters (0.44B vision encoder, 10-layer mBART decoder). The model went through supervised fine-tuning on 58,700 page images from about 3,400 books, plus rendered pages, then few rounds of GRPO reinforcement learning to reduce repetition and loops.

Examples

Real outputs of this model (greedy decoding, as in Usage), with the HTML rendered and every difference from the print highlighted: red for a misread word, amber where the model changed the print's spelling. On older prints the model often confuses hamza and ya: it adds hamzas the print leaves out (الى → إلى, ان → أن) and writes the print's final ى as ي (فى → في). This is probably learned from the training labels. Both pages are from public-domain books on Wikimedia Commons; neither page's text is in the training labels.

Old print

Headings and footnotes

Sources: Qasim Amin, Tahrir al-Mar'a, Cairo 1899, p. 36 (Commons, public domain); Ibn al-Nadim, al-Fihrist, ed. G. Flügel, Leipzig 1871, p. 40 (Commons, public domain).

Usage

import torch
from PIL import Image
from transformers import AutoModel, AutoProcessor

repo = "g3ida/absir-arabic-ocr-mini"
model = AutoModel.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).to("cuda").eval()
processor = AutoProcessor.from_pretrained(repo, trust_remote_code=True)

PROMPT = "</s><s><no_bbox><no_classes><output_markdown><predict_no_text_in_pic>"

def enlarge(im):
    # The model was trained on pages enlarged to fill 1664x2048; the processor only ever shrinks.
    s = min(1664 / im.width, 2048 / im.height)
    return im.resize((round(im.width * s), round(im.height * s)), Image.LANCZOS) if s > 1 else im

image = enlarge(Image.open("page.png").convert("RGB"))
inputs = processor(images=[image], text=PROMPT, return_tensors="pt", add_special_tokens=False).to("cuda")
with torch.inference_mode():
    out = model.generate(**inputs, max_new_tokens=4096, do_sample=False, repetition_penalty=1.0)
print(processor.batch_decode(out, skip_special_tokens=True)[0])

Use the prompt above exactly: it is the one the model was trained with. The base model's other prompts (bounding boxes, layout classes) were not trained for Arabic here.

Recommended decoding: greedy, repetition_penalty=1.0, max_new_tokens=4096. If a page uses up all 4096 tokens or ends in a repeating tail, read it again with repetition_penalty=1.2, and if it loops again, cut the text where the repetition starts. All the scores below use this retry; it changes a handful of pages per thousand.

vLLM: the architecture needs NVIDIA's Nemotron vLLM plugin. Install it as described in the base model card, then serve this repository the same way (vllm serve g3ida/absir-arabic-ocr-mini --trust-remote-code --chat-template chat_template.jinja ...) and send the prompt above as the text part of the message, with the image enlarged as in enlarge(). Served this way on one RTX 3090, it read the 400 Misraj pages in 5.6 minutes (16 requests at a time).

Evaluation

absir-arabic-ocr-mini against absir-arabic-ocr-1.6B and Gemini

Scores below were run following rule: greedy decoding, repetition_penalty=1.0, max_new_tokens=4096. If a page uses up all 4096 tokens or ends in a repeating tail, read it again with repetition_penalty=1.2, and if it loops again, cut the text where the repetition starts.

Other models numbers are copied from the benchmark papers and from the Nuqta-Arabic-OCR model card; this model's numbers were measured with the same data and scoring code. Pages were enlarged as in Usage.

KITAB-Bench OCR, hindawi subset (200 book pages)

Hindawi is the only full-page printed-document subset of KITAB-Bench's OCR track. Scored with KITAB-Bench's preprocess_arabic_text and torchmetrics CharErrorRate / WordErrorRate over all 200 pages; lower is better.

ModelCERWER
Gemini-2.0-Flash0.010.04
absir-arabic-ocr-mini0.019*0.069*
Nuqta-Arabic-OCR 4B (recommended input)0.029–
absir-arabic-ocr-1.6B0.046*0.145*
Azure OCR0.060.28
Nuqta-Arabic-OCR 4B (images as given)0.090–
Qari0.110.15
Surya0.150.20
Qwen2.5-VL-7B0.270.42
GPT-4o0.340.56

* The absir models output HTML tags and the hindawi ground truth is plain text, so tags are replaced by a space before scoring (re.sub(r"<[^>]+>", " ", pred)).

Misraj-DocOCR (400 modern document pages)

Scored with the recipe the Nuqta-Arabic-OCR card uses. Nothing is clipped: a runaway page counts in full.

ModelSizeCER ↓WER ↓chrF ↑TEDS ↑MARS ↑
Nuqta-Arabic-OCR 4B (recommended input)4.75B0.1210.24689.476.182.8
Baseer v2not stated0.120.1988.96777.8
Gemini-2.5-Proclosed0.310.3789.65270.8
Azure Document Intelligenceclosed0.270.4482.54262.2
dots.ocr3B0.400.5078.44059.2
absir-arabic-ocr-mini0.7B0.1900.27284.428.556.4
GPT-5closed0.620.8661.64854.8
absir-arabic-ocr-1.6B1.6B0.5520.71563.929.446.6
QARI–0.640.7664.52142.8

On text, absir-arabic-ocr-mini is third behind Nuqta 4B and Baseer v2 (CER 0.190, WER 0.272), ahead of Gemini-2.5-Pro and Azure. It is weak on Misraj's table structure: on 24 of the 59 pages with a table in the reference it writes the cells as paragraphs instead of a <table>, which TEDS scores as 0. The absir-arabic-ocr-1.6B row is re-scored here with this recipe; its card reported a per-page mean (CER 0.58) instead.

KITAB-Bench table recognition (241 HTML tables)

TEDS, higher is better. Published models were prompted with KITAB-Bench's table prompt; the absir models are scored with the prompt they were trained on.

ModelTEDS
GPT-4o85.8
absir-arabic-ocr-mini85.4
Gemini-2.0-Flash83.1
AIN-7B75.9
GPT-4o-mini69.3
absir-arabic-ocr-1.6B64.6
Qwen2.5-VL-7B59.3
Qwen2-VL-7B57.8
Surya50.2
EasyOCR (Docling)49.1
Tesseract (Docling)28.2

Limitations

  • Trained mostly on book pages. Handwriting, scene text, single-line crops and pages in other scripts are out of scope; on pages with mostly Latin text or long tables of numbers it can fall into a repetition loop (the retry in Usage catches most of these).
  • Hamza and ya follow modern spelling rather than the print: on older books it may add a hamza to a bare alef (الى → إلى) and write a final ى as ي, probably because many training labels were written that way.
  • Like any model with a language decoder, it may occasionally replace a hard-to-read word with a fluent but different one. Treat the output as a draft for critical use.

License

The weights are released under the OpenMDW-1.1 license, inherited from nvidia/Nemotron-3.5-Parse (see LICENSE). The tokenizer is MIT-licensed (see TOKENIZER_ATTRIBUTION.md); our only change to it is the normalizer, set from NFKC to NFC so that ﷺ and ﷻ are not expanded into words. Third-party notices are in THIRD_PARTY_NOTICES.md.

Benchmarks referenced

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Класс архитектуры
RadioMBartPrefixForCausalLM
Ревизия весов
f516724

0 моделей