/ Модель

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

Контекст
32 768 токенов
Базовая модель
Qwen2-VL-2B-Instruct-unsloth-bnb-4bit
Библиотека
peft
Опубликована
10 мар 2025

Qaari-0.1-Urdu-OCR-VL-2B-Instruct

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

Qaari 0.1 Urdu — мультимодальная модель для распознавания текста на изображениях на языке урду.

785скачиваний за 30 дней11лайковвеса обновлены17 апр 2026

Бенчмарки

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

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

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

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

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

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

Она разработана Ahmed Wasfy и представляет собой дообученную версию Qwen2-VL-2B, предназначенную прежде всего для OCR документов и изображений с текстом на урду. Модель принимает изображение и текстовую инструкцию, а в ответ генерирует текстовую расшифровку содержимого документа.

Модель имеет архитектуру Qwen2-VL с размером 2B параметров и дообучалась на 10 000 синтетических пар изображений текста на урду и эталонных транскрипций. В обучении использовались шрифты AlQalam Taj Nastaleeq, Alvi Nastaleeq, Gandhara Suls, Jameel Noori Nastaleeq и NotoNastaliqUrdu; проверенные размеры шрифта составляют от 14 до 40 пунктов. На заявленном наборе данных Qaari 0.1 Urdu показала WER 0,048, CER 0,029, BLEU 0,916 и соотношение длины 0,978, превзойдя базовую Qwen2-VL-2B и Tesseract.

Сильные стороны модели — специализация на урду, высокая точность распознавания и поддержка письменности Nastaleeq. К ограничениям относятся возможное снижение качества на шрифтах и размерах, не представленных при дообучении, сложных лигатурах, нестандартных вариантах Nastaleeq, изображениях низкого разрешения и цифровых дисплеях. Модель распространяется на условиях лицензии базовой модели Qwen2-VL-2B; точные условия в README не приведены.

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

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

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

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

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

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

Открыть на Hugging Face

Qaari 0.1 Urdu: OCR Model for Urdu Language

Model Description

Qaari 0.1 Urdu is a fine-tuned version of Qwen/Qwen2-VL-2B specifically optimized for Optical Character Recognition (OCR) of Urdu text. It represents a significant advancement in Urdu language OCR capabilities, dramatically outperforming both the base model and traditional OCR solutions like Tesseract.

image/png

Key Features

  • Specialized for Urdu OCR: Optimized for recognizing Urdu script with high accuracy
  • Superior Performance: Achieves 97.35% reduction in Word Error Rate compared to the base model
  • High Accuracy: 0.048 WER and 0.029 CER, with a BLEU score of 0.916
  • Balanced Output Length: Near-perfect length ratio of 0.978 (ideal is 1.0)

Performance Metrics

ModelWER ↓CER ↓BLEU ↑Length Ratio
Qaari 0.1 Urdu0.0480.0290.9160.978
Tesseract0.3520.2270.5180.770
Qwen Base1.8231.7390.0091.288

Improvement Percentages

ComparisonWER ImprovementCER ImprovementBLEU Improvement
vs. Qwen Base97.35%98.32%91.55%
vs. Tesseract86.25%87.11%82.60%

Supported Fonts

The model was fine-tuned on the following fonts:

  • AlQalam Taj Nastaleeq Regular
  • Alvi Nastaleeq Regular
  • Gandhara Suls Regular
  • Jameel Noori Nastaleeq Regular
  • NotoNastaliqUrdu-Regular

Supported Font Sizes

The model has been tested and optimized for the following font sizes:

  • 14pt
  • 16pt
  • 18pt
  • 20pt
  • 24pt
  • 32pt
  • 40pt

Usage

Try Qaari - Google Colab

You can load this model using the transformers and qwen_vl_utils library:

!pip install transformers qwen_vl_utils accelerate>=0.26.0 PEFT -U
!pip install -U bitsandbytes
from PIL import Image
from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
import torch
import os
from qwen_vl_utils import process_vision_info



model_name = "oddadmix/Qaari-0.1-Urdu-OCR-VL-2B-Instruct"
model = Qwen2VLForConditionalGeneration.from_pretrained(
                model_name,
                torch_dtype="auto",
                device_map="auto"
            )
processor = AutoProcessor.from_pretrained(model_name)
max_tokens = 2000

prompt = "Below is the image of one page of a document, as well as some raw textual content that was previously extracted for it. Just return the plain text representation of this document as if you were reading it naturally. Do not hallucinate."
image.save("image.png")

messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "image": f"file://{src}"},
            {"type": "text", "text": prompt},
        ],
    }
]
text = processor.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
    text=[text],
    images=image_inputs,
    videos=video_inputs,
    padding=True,
    return_tensors="pt",
)
inputs = inputs.to("cuda")
generated_ids = model.generate(**inputs, max_new_tokens=max_tokens)
generated_ids_trimmed = [
    out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
    generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)[0]
os.remove(src)
print(output_text)

Limitations

  • Performance may degrade when using fonts not included in the fine-tuning dataset
  • Font sizes outside the supported range may result in suboptimal rendering
  • The model may not handle complex ligatures in non-Nastaleeq scripts effectively
  • Performance on digital-only displays has not been fully optimized
  • Low-resolution print environments might experience quality degradation
  • Custom font modifications or non-standard Nastaleeq variants might not render as expected

Training Details

This model was fine-tuned from Qwen2-VL-2B using a dataset of Urdu text images with paired transcriptions. The training process focused on optimizing for accurate Urdu character recognition and natural language understanding.

Training Dataset

  • Dataset Type: Paired Urdu text images with ground truth transcriptions
  • Size: 10,000
  • Source: Syntehtic Dataset

Training Configuration

  • Base Model: Qwen/Qwen2-VL-2B
  • Hardware: A6000 GPU
  • Training Time: 24 Hours

Citation

If you use this model in your research, please cite:

@misc{qaari-0.1-urdu,
  author = {Ahmed Wasfy},
  title = {Qaari 0.1 Urdu: OCR Model for Urdu Language},
  year = {2025},
  publisher = {HuggingFace},
  howpublished = {\url{https://huggingface.co/oddadmix/Qaari-0.1-Urdu-OCR-VL-2B-Instruct}}
}

License

This model is subject to the license terms of the base Qwen2-VL-2B model.

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

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

GPU в ailist

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

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

Репозиторий содержит только адаптер (LoRA/PEFT) без базовой модели.

Ревизия весов
96bdfeb

0 моделей