/ Модель

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

Контекст
262 144 токена
Лицензия
Apache 2.0
Архитектура
qwen3_vl · dense
Базовая модель
Qwen3-VL-2B-Instruct
Библиотека
transformers
Опубликована
8 июл 2026

qwen3vl-2b-receipt-extraction

Изображение и текст → текст4 профессии

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

23скачиваний за 30 дней0лайковвеса обновлены10 июл 2026

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Изображение → текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

ratlinghitman/qwen3vl-2b-receipt-extraction — дообученная с помощью LoRA модель Qwen3-VL-2B-Instruct для извлечения данных из фотографий и сканов розничных чеков. Модель принимает изображение чека и запрос, затем формирует JSON с позициями меню, промежуточной и итоговой суммами; значения передаются как строки, переписанные с чека.

Модель основана на Qwen3-VL-2B-Instruct с архитектурой Qwen3-VL и обучена на датасете CORD-v2. Адаптер LoRA применён к языковой части модели, а зрительная часть оставлена замороженной. На тестовой выборке из 100 чеков автор сообщает field F1 0,8857 и корректность JSON 0,99; структура JSON при этом может быть менее надёжной, чем у более крупной версии на 4B параметров.

Модель предназначена для автоматизации учёта расходов и конвейеров обработки чеков, а также для исследований понимания документов. Обучение охватывает индонезийские чеки из сферы розничной торговли и ресторанов, поэтому точность на других языках и макетах может снижаться. Она не обучалась для счетов-фактур, рукописей или изображений других типов; суммы и позиции не проверяются арифметически, поэтому результат требует проверки человеком. Лицензия — Apache-2.0.

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

  • Извлечение позиций и сумм из фотографий чеков
  • Преобразование сканов чеков в JSON для учёта расходов
  • Автоматизация загрузки чеков в бухгалтерский конвейер
  • Подготовка данных чеков для анализа и исследований

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Qwen3-VL-2B Receipt Extraction (bf16)

Reads a receipt image and returns it as structured JSON. Smaller 2B fine-tune: it matches the 4B on field_f1 and runs faster, but structures the JSON less reliably.

At a glance

Base modelQwen/Qwen3-VL-2B-Instruct
Fine-tuningLoRA r=16, language tower only
Datasetnaver-clova-ix/cord-v2
Formatbf16 safetensors
Size on disk4.0 GB
VRAM (weights)4.33 GB
Runtimetransformers

Intended use

Turning a photo or scan of a retail receipt into structured JSON, for bookkeeping and expense pipelines, or as a starting point for research on document understanding.

Out of scope

Invoices, handwritten notes, and non-receipt images. The model was never trained on them. It also should not be trusted to make financial decisions on its own; treat the output as an extraction to be reviewed.

How to use

The model expects one image and this exact prompt, which is the prompt it was trained with:

Extract the receipt from the image into a structured JSON. Your output should contain ONLY correct JSON!
import torch
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor

REPO = "<your-hf-username>/qwen3vl-2b-receipt-extraction"
model = Qwen3VLForConditionalGeneration.from_pretrained(REPO, dtype=torch.bfloat16, device_map="auto")
processor = AutoProcessor.from_pretrained(REPO, max_pixels=1600 * 28 * 28)

messages = [{"role": "user", "content": [
    {"type": "image", "image": "receipt.jpg"},
    {"type": "text", "text": "Extract the receipt from the image into a structured JSON. Your output should contain ONLY correct JSON!"},
]}]
inputs = processor.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=True,
    return_dict=True, return_tensors="pt",
).to(model.device)

out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Output

A single JSON object with three top-level keys: menu (the line items), sub_total and total. Every value is a string, copied from the receipt.

{"menu": [{"nm": "Es Teh Manis", "cnt": "2", "price": "8,000"}],
 "sub_total": {"subtotal_price": "8,000"},
 "total": {"total_price": "8,000", "cashprice": "10,000", "changeprice": "2,000"}}

Evaluation

CORD-v2 test split, 100 receipts, greedy decoding, images capped at 1600 patches.

field_f1nTEDjson_validityexact_match
0.88570.89900.99000.4300

Measured in section 7.3 of finetune_qwen3vl.ipynb.

  • field_f1 flattens the predicted and gold JSON into (field-path, value) leaf pairs and scores precision/recall over them. It asks whether the right values landed at the right paths.
  • nTED (normalized tree-edit distance, following the CORD paper) compares the two JSON trees directly. It catches structural mistakes, like wrong nesting or a missing key, that leaf-flattening misses.

Neither subsumes the other, which is why both are here.

Training

Fine-tuned from Qwen/Qwen3-VL-2B-Instruct with LoRA on naver-clova-ix/cord-v2 (800 train / 100 validation / 100 test receipts). Labels were losslessly normalized before training.

LoRA rank / alpha / dropout16 / 32 / 0.05
Adapted moduleslanguage tower only (q,k,v,o,gate,up,down_proj); vision tower frozen
Precisionbf16
Learning rate1e-4
Batch size2 per device x 4 gradient accumulation
Epochs20
Image budget1600 patches of 28x28

Training ran well past convergence on purpose, so there was a wide range of adapters to pick from. Validation loss and the task metrics peak at different times here: loss starts rising around epoch 3, while the best field_f1 and nTED land at epoch 9 or later. The adapter published here is the one that scored best on the validation split by field_f1, and it was then scored once on the held-out test split. Early-stopping on loss would have picked a noticeably worse one.

Limitations

  • The test split is 100 receipts. Gaps of a point or two in field_f1 are inside the noise band and should be read as ties.
  • CORD-v2 is photographed Indonesian retail and restaurant receipts. Expect worse results on other layouts, languages, or document types (invoices, handwriting).
  • Field names mirror the raw CORD keys (nm, cnt, unitprice), not friendly names.
  • Values are transcribed text, not validated arithmetic. Nothing checks that the line items sum to the total. Do not use the output for financial decisions without review.
  • Schema-constrained decoding was tried and scored far worse than plain decoding (field_f1 falls roughly 35 points), so plain greedy decoding is what these numbers use and what is recommended.
  • Any timing or throughput figure depends heavily on hardware. Measure on the machine you intend to deploy on.

License

apache-2.0, inherited from the base model. The CORD-v2 dataset carries its own terms; see its dataset card.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

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

0 моделей