/ Модель

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

Контекст
262 144 токена
Параметры
3,4 млрд
Лицензия
Apache 2.0
Архитектура
qwen3_5_text · dense
Базовая модель
Qwen3.5-4B
Библиотека
transformers
Опубликована
21 сен 2026

distil-qwen3.5-4b-invoice-grounded-decision

Генерация текстаТекст → текст4 профессии
36скачиваний за 30 дней1лайквеса обновлены21 сен 2026

Описание модели

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

Модель проверяет счета поставщиков по заказу на закупку и подтверждению получения товара и выдаёт обоснованное решение об оплате или удержании.

Distil-Qwen3.5-4B-Invoice-Grounded-Decision — дообученная distil labs модель на базе Qwen/Qwen3.5-4B для второго этапа обработки счетов поставщиков. Она сопоставляет счёт, заказ на закупку и подтверждение получения товара, проверяет позиции и суммы по заданной политике и формирует решение «оплатить» или «приостановить» с указанием проблемной позиции и несовпадающих значений. Модель относится к плотной текстовой архитектуре Qwen3.5, содержит 3,4 млрд параметров и использует контекст до 262 144 токенов. Карточка указывает поддержку английского языка и формат вывода JSON; для работы рекомендуется включать режим рассуждения.

Модель дообучена на синтетических примерах, сгенерированных моделью-учителем, и предназначена для узкого сценария проверки счетов, а не для роли общего помощника. В тесте из 100 счетов все шесть полей ответа были корректны в 97 случаях, а решение об оплате или удержании — в 99; ошибки отмечены при сложении больших итогов по строкам. Данные демонстрационные: вымышленная компания, английский язык и одна валюта. Лицензия — Apache-2.0.

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

  • сверка счёта поставщика с заказом на закупку
  • проверка счёта по подтверждению получения товара
  • поиск расхождений в позициях и суммах счёта
  • выдача решения об оплате или удержании счёта
  • подготовка структурированного результата проверки для accounts payable

Ограничения

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

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

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

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

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

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

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

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

Открыть на Hugging Face

Distil-Qwen3.5-4B-Invoice-Grounded-Decision

A fine-tuned Qwen3.5-4B that reads a vendor invoice, the purchase order and the goods receipt, reasons through four checks, and answers pay or hold together with what is wrong and where: the invoice number, the PO number, the failing item and the two values that disagree. It is step 2 of the invoice processing pipeline.

Trained on the distil labs platform from 40 seed examples: a teacher model (GLM 5.3 with reasoning) generated 4,056 synthetic training examples, and the student was fine-tuned on them. GGUF build for llama.cpp: distil-labs/distil-qwen3.5-4b-invoice-grounded-decision-gguf.

Results

ModelAll six fields correct (100 test invoices)
This model97 (decision alone: 99)
Qwen3.5-4B untuned, thinking on, same promptLLM-as-a-judge 0.12
Jevcannot produce this output (it returns choices, not text)
GPT-5.6 Luna, reasoning high100
GLM 5.3, reasoning high (the teacher)96
Gemini 3.5 Flash Lite76
GPT-5.6 Luna, reasoning off75

A case counts only when all six fields are right. In the whole pipeline (triage, ERP lookup, this model) 197 of 200 inbox messages are handled correctly, also with the Q8_0 GGUF build under llama.cpp on a laptop. All three errors are additions over large line totals; expect roughly 1 invoice in 30 to need a second look.

How it was scored, all baselines, and the raw outputs: https://github.com/distil-labs/invoice-processing-pipeline.

How to use it

The model was trained to reason before it answers, in a short fixed format (the checks in policy order, one line per invoice line, a running sum, stop at the first failure; about 160 tokens). Serve it with thinking on: chat_template_kwargs: {"enable_thinking": true}. The answer follows the reasoning.

Serve it behind an OpenAI-compatible endpoint:

vllm serve distil-labs/distil-qwen3.5-4b-invoice-grounded-decision --port 8001

Call it with the system prompt it was trained with, at temperature 0:

from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:8001/v1", api_key="EMPTY")
response = client.chat.completions.create(
    model="model",
    messages=[{"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": text}],
    temperature=0,
    extra_body={"chat_template_kwargs": {"enable_thinking": True}},
)

Example answer:

{"decision": "hold_price", "invoice_number": "NM-84665", "po_number": "PO-48825", "item": "Floor marking tape, yellow", "invoiced": 14.61, "expected": 14.25}

The model degrades outside its training setup, so keep the system prompt exactly as below. The pipeline repo loads it from training/grounded/job_description.json and shows the input format.

You check vendor invoices for the accounts payable team of Northwind before they are paid.

You receive three documents: the invoice message as it arrived by email, the purchase order (PO) from the ERP, and the goods receipt from the ERP. Invoice lines can be in a different order than the PO lines and can use the vendor's own item names or abbreviations, so match each invoice line to its PO line by item. Amounts in the message that are not part of this invoice (a previous balance, a payment received, a quote) are ignored.

Run these checks in order and stop at the first one that fails:
1. The PO number referenced on the invoice is exactly the number of the PO. If not: hold_no_po.
2. On every invoice line, the invoiced quantity is not more than the received quantity of that item. If not: hold_quantity.
3. On every invoice line, the invoiced unit price is not more than 2% above the PO unit price of that item. A lower price is fine. If not: hold_price.
4. The total stated on the invoice equals the sum of the invoice line totals, plus the freight charge only if the PO says freight may be added by the vendor. If the PO says freight is not allowed, a freight charge must not be part of the total. If not: hold_total.
If every check passes: approve.

Answer with a JSON object and nothing else, with exactly these fields:
{"decision": "<approve | hold_no_po | hold_quantity | hold_price | hold_total>",
 "invoice_number": "<the vendor's invoice number as written in the message>",
 "po_number": "<the PO number as written in the invoice message>",
 "item": "<for hold_quantity and hold_price: the PO item name of the failing line, exactly as written in the PO; otherwise null>",
 "invoiced": <the value from the invoice that fails the check; null for approve>,
 "expected": <the value it was checked against; null for approve>}

What "invoiced" and "expected" hold:
- hold_no_po: the PO number on the invoice, and the number of the PO in the ERP (both as strings).
- hold_quantity: the invoiced quantity, and the received quantity.
- hold_price: the invoiced unit price, and the PO unit price.
- hold_total: the total stated on the invoice, and the total you computed (line totals plus allowed freight).
If several invoice lines fail the same check, report the first failing line in the order of the invoice. Numbers are plain JSON numbers without currency or thousands separators.

Training

Base modelQwen/Qwen3.5-4B
TeacherGLM 5.3, reasoning effort high
Task typequestion answering with JSON output
Seed examples40
Synthetic examples4,056
MethodLoRA (rank 64), 4 epochs, merged weights

Seed data, test set, job description and config: training/grounded.

Limits

The data is synthetic, written for this demo around a fictional company, in English, with amounts in one currency. The model is trained for this one task and this one policy; it is not a general assistant.

Links

distil labs · GitHub · Hugging Face · LinkedIn · Slack · X

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей