加载中…
加载中…
Qwen/Qwen3.5-0.8BSmall on-device model for Hishab, a Bangladeshi personal-finance app. It reads a chat message in English, Bangla, Banglish (Bangla in Latin letters) or a mix, and returns the transactions in it as strict JSON:
user: Ajke tution fee 5k disi, riksha 80, cha 20
model: [{"description":"tuition fee","amount":5000.0,"category":"tuition","type":"expense"},{"description":"rickshaw","amount":80.0,"category":"transport","type":"expense"},{"description":"tea","amount":20.0,"category":"food","type":"expense"}]
Fields: description, amount (BDT), category (food, grocery, rent, utilities,
mobile_recharge, transport, tuition, salary, gift, loan, shopping, medical, entertainment,
other), type (income | expense). An empty array means no transaction.
This variant answers with the JSON array only.
Evaluated with llama.cpp (greedy) on held-out splits of ryuma007/hishab-synthetic-v4: test (518 rows, all four
languages) and numbers (357 rows where every amount is spelled out in words, like "der hajar" or
"পনেরো হাজার"). exact = the set of (amount, category, type) tuples equals the gold set.
| file | size | test exact | test tuple F1 | valid JSON | banglish exact | numbers exact |
|---|---|---|---|---|---|---|
qwen3.5-0.8b__json__full__v9-Q4_K_M-imat.gguf |
529 MB | 89.6 | 94.1 | 100.0 | 84.0 | 84.0 |
qwen3.5-0.8b__json__full__v9-Q5_K_M.gguf |
578 MB | 89.4 | 94.1 | 100.0 | 83.6 | 84.0 |
qwen3.5-0.8b__json__full__v9-Q6_K.gguf |
630 MB | 89.2 | 93.9 | 100.0 | 83.1 | 83.8 |
Full fine-tune (all weights) of Qwen/Qwen3.5-0.8B, 3 epochs with TRL, lr 3e-05 cosine, completion-only loss, 20,333 training rows, best epoch
by validation loss. Importance
matrices (-imat files) were computed on rendered training conversations. Full pipeline and
all results: https://github.com/RaihanulHaque/hishab (ml/).
llama-cli --hf-repo ryuma007/hishab-qwen3.5-0.8b-json-full-v9-GGUF --hf-file qwen3.5-0.8b__json__full__v9-Q4_K_M-imat.gguf --jinja \
-sys "You are Hishab, a Bangladeshi personal-finance assistant. The user writes in English, Bangla or Banglish (Bangla in Latin letters), often mixed. Extract every financial transaction they mention as a JSON array of objects with keys description, amount, category, type. Amounts are BDT numbers (expand shorthand like 1.5k or 2 lakh). category is one of: food, grocery, rent, utilities, mobile_recharge, transport, tuition, salary, gift, loan, shopping, medical, entertainment, other. type is income or expense. If there is no transaction, the array is empty. Reply with the JSON array only." \
-p "Salary paisi 35k but basha vara dilam 12k"
The system prompt above is the one used in training; keep it verbatim. Qwen3.5 models were
trained and must be run with thinking disabled (the default with --jinja). On Android the
model runs through kiln.
Trained on synthetic data only; expect lower accuracy on real messages until a human-labelled test set exists.