Downloads · 30 days
39
13% of all-time downloads
sanzh4rr/spent-qwen3-0.6b-expense-parser
spent-qwen3-0.6b-expense-parser is a machine learning model from sanzh4rr. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Fine-tuned for the Swedish language. A LoRA fine-tune of Qwen/Qwen3-0.6B for one job: turn a Swedish speech transcript of a purchase into a compact structured line —
Downloads · 30 days
39
13% of all-time downloads
All-time downloads
292
Public
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.gguf1.1 GB · 77%
From the Hugging Face model README
Fine-tuned for the Swedish language. A LoRA fine-tune of Qwen/Qwen3-0.6B for one job: turn a Swedish speech transcript of a purchase into a compact structured line —
"kaffe 39 kronor och bussbiljett 32 kr" → [39|SEK|kaffe|Fika;32|SEK|bussbiljett|Transport]
"vi är 3 personer" → []
"fick tillbaka 50 kronor" → []
It understands Swedish amount renderings as spoken and transcribed by Whisper
(8 500, 18,90, 12 kronor och 50 öre, en femtiolapp, tusen, typ 200), Swedish
currency words (kronor / kr / spänn / bagis, euro, dollar, pund, danska/norska kronor),
300+ Swedish items and merchants, the "two items, one shared price → one row" pattern,
up to five purchases in one utterance, and — since v3 — numbers that are not prices
(times, counts, ages, bus/phone numbers, durations) and money that is not an expense
(refunds, income, loans), which it answers with [].
Runs fully on-device via llama.cpp / llama.rn.
| File | Version | Size | sha256 | Note |
|---|---|---|---|---|
spent-qwen3-0.6b-v3-Q4_K_M.gguf | v3 | 378 MB | 0618ef539b9187fb59cec119483a887257b24bb2c1c9d0e462771b0a66fdcd62 | Recommended. |
spent-qwen3-0.6b-Q4_K_M-embIQ3_XXS.gguf | v1 | 313 MB | 67c5578dae0007ef9756390e0a81431e8d68873c24d67273a244ff16fc63f608 | Superseded — invents expenses from any number, see below |
spent-qwen3-0.6b-Q4_K_M.gguf | v1 | 378 MB | bea3867c8a3ee6c8efed3af59deb028ffad15721f1bdd14c4483aa8bd17fd515 | Superseded |
max_tokens ≥ 160)| Test set | Cases | v1 | v3 |
|---|---|---|---|
| Fresh in-distribution (seed 29) | 25,000 | 99.1 % | 99.3 % |
| Held-out (seed 13) | 3,200 | 99.3 % | 99.4 % |
| Noisy transcripts (stutters, caps, typos) | 5,000 | 96.7 % | 96.1 % |
| App's own 25 cases | 25 | 98.7 % | 98.7 % |
| Negatives containing a number — invented expenses | 62 | 59 | 0 |
| Money mentioned, not an expense — invented | 20 | 20 | 4 |
| Four–five items in one utterance | 40 | 97.2 % | 100 % |
| Expense buried in long chatter | 15 | 80.0 % | 96.7 % |
| Items never seen in training | 40 | 95.8 % | 93.3 % |
| Bonsai-1.7B Q1_0 (237 MB, untuned), for reference: 3,200 cases | 66.4 % |
Full sweep, all quantization variants, recipes and the full failure analysis: RESULTS.md.
[] (bil 125 000 kronor). Training
expenses cap at 15,000; large numbers appeared only in income negatives.femhundra may parse as 50). Whisper normally
normalises numbers to digits, so this rarely reaches the model.skatteåterbäring 640 kronor).enable_thinking: false / no-think).RESULTS.md,
"For the device session"). A long English prompt still works but costs ~2 pt.[amount|CUR|item|Category]; such a grammar
forces ≥1 row, so gate silence/empty input before calling the model.[] means "no expense mentioned".tagger-bert-v2/) — candidate, not yet deployedA different architecture for the same job: KBLab/bert-base-swedish-cased (CC0-1.0) with a
span-tagging head (AMOUNT / ITEM / MERCHANT) and a pointer head that picks the category by
reading the category descriptions supplied in the input — so user-added categories work
without retraining. Amounts are parsed by a deterministic Swedish number parser, so the
output can never be malformed. Runs with ONNX Runtime on CPU.
| LLM v3 (above) | tagger v2 | |
|---|---|---|
| Size | 378 MB | 120 MB (tagger-w8.onnx, int8) |
| Licence | Apache-2.0 | CC0-1.0 |
| Ordinary input, 28,200 cases | 99.3 % | 99.3 % |
| Malformed outputs | 26 | 0 |
| Invented expenses on numbers / refunds | 4 / 82 | 0 / 82 |
| User-added categories | 98 % | 100 % |
| Expense buried in long chatter | 97 % | 88 % (passive phrasings — known gap) |
| Latency (Mac CPU) | 235 ms (GPU) | 41 ms |
sha256 tagger-w8.onnx: 30247a2fca44938a250842899a3c544225155d57e1ab9e3877d2dd45474cd7a0.
Integration contract (inputs, prompt construction, decoding, pairing rule, parser port):
tagger-bert-v2/README.md; reference implementations tagger_common.py, sv_amount.py.
Not yet tested on a phone. Full comparison in RESULTS.md.
tagger-bert-v3/, recommended over v2Same contract and files as v2 (labels.json, vocab.txt, tokenizer.json byte-identical);
retrained on data fixed after a 1,191-case iPhone stress run (passive phrasings, hotell,
lån till …, öl/tuggummi/tv). 28 remaining phone failures: v2 71.6 % → v3 98.2 %.
Held-out sets: private 99.3 → 99.9 %, noisy 95.9 → 99.7 %, buried 87.8 → 96.7 %.
tagger-w8.onnx 125,935,273 bytes, sha256
5189611f9c323dda8f96b399a92149f1673209996d11ab409d1b5be1d3f488b6.
Apache-2.0, inherited from Qwen3-0.6B. Training data is synthetic; no user data.