/ Модель

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

Базовая модель
Qwen3-1.7B
Опубликована
27 ноя 2026

munshi-qwen3-1.7b-gguf

Генерация текстаТекст → текст3 профессии
278скачиваний за 30 дней0лайковвеса обновлены27 ноя 2026

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

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

Munshi преобразует короткие сообщения владельцев магазинов на Roman Urdu в структурированные JSON-записи для учёта продаж, долгов, оплат, закупок и расходов.

Munshi — модель на базе Qwen3-1.7B, дообученная автором wadaeedkhan1 для извлечения записей из коротких сообщений владельцев магазинов на Roman Urdu. Она преобразует сообщение об отпуске товара в долг, оплате покупателя, продаже, закупке или расходе в одну запись JSON с полями типа операции, контрагента, товара, количества, единицы измерения и суммы. Модель рассчитана на локальный запуск через Ollama или llama.cpp на скромном оборудовании; для работы ей нужен системный промпт из репозитория. В каталоге представлены GGUF Q4_K_M и safetensors; README также описывает LoRA-адаптер и обучение методом QLoRA с SFTTrainer.

В оценке автора модель выдала точное совпадение всех шести полей для 63% синтетических примеров и корректный JSON для всех 150 примеров; на отдельной выборке из 50 реальных сообщений точность совпадения не приведена. Частая ошибка — путать оплату покупателя с записью долга. Обучение основано на небольшом синтетическом наборе и ограниченном словаре: сообщения на письме урду, незнакомые товары, несколько товаров в одном сообщении и некоторые варианты формулировок могут обрабатываться неверно. Модель не ведёт баланс, не выполняет расчёты и не должна сама сохранять записи без проверки человеком. Лицензия в предоставленных данных не указана.

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

  • Извлечение записи о товаре, отпущенном покупателю в долг
  • Формирование записи об оплате покупателя
  • Структурирование наличной продажи товара
  • Извлечение записи о закупке товара для магазина
  • Структурирование сообщения о расходе магазина

Ограничения

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

Munshi: Qwen3 1.7B for Roman-Urdu shop ledger entries

Munshi turns a shopkeeper's Roman-Urdu message into one JSON ledger entry. It is the extraction step of Munshi, an offline bookkeeping assistant for small shops in Pakistan, built for the Qwen Local Hackathon 2026.

Input:  Ahmed ko 5 kilo chawal udhaar diye
Output: {"type": "udhaar", "party": "Ahmed", "item": "chawal", "qty": 5, "unit": "kg", "amount": null}

Intended use

  • Extracting a structured entry from a short Roman-Urdu message about credit (udhaar), a customer payment (payment), a cash sale, a stock purchase or a shop expense.
  • Running locally on modest hardware through Ollama or llama.cpp.
  • The model only extracts. In the Munshi app, plain code stores the entries and calculates balances, and the user confirms every entry before it is saved.

Not intended for: doing arithmetic or keeping balances, guessing prices that are not in the message, financial or legal advice, or saving entries without a person checking them.

Files

FileWhat it is
finetuned-q4_k_m.ggufThe fine-tuned model, merged and quantized to Q4_K_M (1.1 GB), for Ollama or llama.cpp
adapter/The LoRA adapter (rank 16, 70 MB) on unsloth/Qwen3-1.7B-unsloth-bnb-4bit, with tokenizer and chat template
ModelfileOllama import file with the system prompt built in

How to use

Use the exact system prompt from training (system_prompt.txt in the repo):

You turn a shopkeeper's Roman Urdu message into one ledger entry. Reply with JSON only, with exactly these keys: "type" (one of "udhaar", "payment", "sale", "purchase", "expense"), "party" (person or supplier name, or null), "item" (standard item name, or null), "qty" (number or null), "unit" (kg, litre, packet, dozen, bori, piece, or null), "amount" (rupees as a number, or null).

With Ollama, download the GGUF and the repo's Modelfile (which builds in the system prompt):

git clone https://github.com/wadeedkhan1/munshi && cd munshi
hf download wadeedkhan1/munshi-qwen3-1.7b-gguf finetuned-q4_k_m.gguf --local-dir .
ollama create munshi -f Modelfile
python ledger.py

Then send the system prompt and the message to /api/chat with "format": "json" and "think": false. See evaluate.py and ledger.py in the repo.

Training

Base modelQwen/Qwen3-1.7B (finetune-anywhere starter alias)
MethodLoRA on a 4-bit base (QLoRA) with Unsloth + TRL SFTTrainer, via finetune-anywhere paths/nvidia-gpu/train_unsloth.py
Settingsrank 16, alpha 32, learning rate 2e-4 (linear decay, Unsloth warm-up), 3 epochs (1125 steps), max sequence length 1024, batch size 1, gradient accumulation 4, seed 42
HardwareNVIDIA RTX 5060 (8 GB), local, WSL2
Training time21 minutes (1265 s, from run.json)
Lossfinal train loss 0.068; validation loss 0.110 after epoch 1, 0.097 after epoch 3
ExportGGUF, Q4_K_M

Data

The data is synthetic Roman-Urdu messages from generate_dataset.py (seed 42): 1500 train / 150 valid / 150 eval, in chat format. Messages vary spelling (chawal/chawl), units (kilo, darjan, bori), amount wording (dedh hazar, 5k, 10,000), casing and filler words.

The eval split uses held-out names, items and phrasings. Exact eval messages never appear in training. Some eval rows still reuse a training phrasing and the shared expense vocabulary, so the synthetic eval is not entirely out-of-distribution. A separate hand-written real eval set has 50 messages (udhaar 15, payment 11, sale 9, expense 8, purchase 7); none of them appear in train or valid.

Dataset link: https://github.com/wadeedkhan1/munshi/tree/master/data

Evaluation

All results come from evaluate.py (temperature 0, Ollama). An exact match means all six fields are right.

ModelEval setExact matchValid JSONPer-field (type / party / item / qty / unit / amount)Avg latency
qwen3:1.7b (base)synthetic eval (150)9/150 (6%)150/15049 / 53 / 30 / 54 / 53 / 75 %2.25 s
Munshisynthetic eval (150)94/150 (63%)150/15081 / 91 / 79 / 91 / 91 / 96 %2.24 s
qwen3:1.7b (base)real eval (50)16/50 (32%)50/5064 / 64 / 64 / 60 / 72 / 82 %2.25 s
Munshireal eval (50)34/50 (68%)50/5086 / 98 / 90 / 92 / 94 / 94 %2.35 s
qwen2.5:7b (larger, not fine-tuned)synthetic eval (150)46/150 (31%)150/15089 / 91 / 48 / 94 / 86 / 86 %2.72 s
qwen2.5:7b (larger, not fine-tuned)real eval (50)31/50 (62%)50/5076 / 96 / 86 / 94 / 90 / 90 %2.62 s
llama3.2:3b (not fine-tuned)synthetic eval (150)5/150 (3%)150/15061 / 57 / 34 / 66 / 49 / 71 %2.39 s
llama3.2:3b (not fine-tuned)real eval (50)3/50 (6%)50/5052 / 64 / 64 / 66 / 52 / 76 %2.33 s

Hardware used for evaluation: NVIDIA RTX 5060 (8 GB), Ollama 0.40.18, Q4_K_M GGUF.

The most common error is a customer payment predicted as udhaar (12/150 synthetic, 4/50 real), usually for wording not in the training data.

Limitations

  • It is trained on synthetic data with a small vocabulary: 25 training names, 12 items, 6 units and 8 expense kinds. Real messages with other items, multiple items per message, or Urdu script are out of scope.
  • Every sale in the training data uses the masculine verb "becha" and has a price, so a sale written with "bechi"/"beche" or without a price (for example "5 kilo cheeni bechi") can be labelled purchase.
  • The model expects the system prompt above. Without it (for example in a chat app that sends no system message), it does not produce ledger entries. The repo's Modelfile builds the prompt in.
  • If a message has no price, amount is null. The model is trained not to guess, so an udhaar entry may carry no rupee value.
  • Some training messages contain small grammar slips, such as a masculine verb after a female name.
  • Always show the extracted entry to the user before saving it.

Citation / links

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

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

GPU в ailist

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

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

Не удалось определить, чем загружать веса модели (нет library_name и architectures).

Ревизия весов
6b06ed1

0 моделей