Results
Our own test split of ReceiptBench (English receipts), 1,941 test receipts, cleaned labels,
same scorer for every model.
Table with columns: Model, Micro F1, All 4 fields right| Model | Micro F1 | All 4 fields right |
|---|
| Expense Snap v2 (this model) | 0.937 | 77.4% |
Per field (F1, 1,941 test receipts):
Table with columns: Field, F1| Field | F1 |
|---|
| type | 0.987 |
| seller_name | 0.916 |
| date | 0.914 |
| total | 0.930 |
Before vs after training (97 test receipts)
The untrained models were run earlier on the first 100 test receipts (97 are still kept after the
clean-up). Same receipts, same cleaned labels, same 4-field scorer. The untrained models were asked for
all ReceiptBench fields and scored on these 4.
Table with columns: Model, Micro F1, All 4 fields right| Model | Micro F1 | All 4 fields right |
|---|
| Expense Snap v2 (trained 0.8B) | 0.928 | 73% |
| Qwen3.5-4B, untrained | 0.879 | 57% |
| Qwen3-VL-4B, untrained | 0.816 | 40% |
| Qwen3.5-2B, untrained | 0.807 | 46% |
| Qwen3-VL-2B, untrained | 0.794 | 40% |
| Qwen3.5-0.8B, untrained (the base model) | 0.582 | 2% |
Training takes the 0.8B from 2% to 73% of receipts fully right, above the untrained 4B (5× bigger).
- Micro F1: every field of every receipt is marked right or wrong; F1 balances wrong answers
against missed ones. All 4 right: share of receipts with every field correct.
- Our split and 4 fields only: not directly comparable with ReceiptBench's published 19-field numbers.
- Best on taxi (87% all 4 right) and plane (86%) receipts; weakest on train (52%) and metro (54%) tickets
and long hotel bills.
How to use
import json, torchfrom PIL import Imagefrom transformers import AutoProcessor, AutoModelForImageTextToText repo = "rasheq/expense-snap"proc = AutoProcessor.from_pretrained(repo)model = AutoModelForImageTextToText.from_pretrained(repo, dtype=torch.bfloat16).to("cuda") def resize(im, budget=1280): """Same as training: area at most 1280 x 1280, shape kept, never enlarged.""" im = im.convert("RGB") s = (budget * budget / (im.width * im.height)) ** 0.5 return im.resize((round(im.width * s), round(im.height * s)), Image.BICUBIC) if s < 1 else im prompt = "Extract this receipt as JSON with these fields: type, seller_name, date, total."messages = [{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": prompt}]}]text = proc.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False) image = resize(Image.open("receipt.jpg"))inputs = proc(text=[text], images=[image], return_tensors="pt").to("cuda")out = model.generate(**inputs, max_new_tokens=256, do_sample=False)answer = proc.batch_decode(out[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True)[0]print(json.loads(answer))
Use the exact prompt above and greedy decoding (do_sample=False), as in training.
Training
Table with columns: Setting, Value| Setting | Value |
|---|
| Base model | Qwen/Qwen3.5-0.8B, full fine-tune from the base weights |
| Data | ReceiptBench (MIT), English receipts, our fixed split: train 6,807 · val 469 · test 1,941 |
| Labels | cleaned for the 4 fields: rule fixes, a second reading of every train image, test checked on the image |
| Epochs | 2 |
| Learning rate | 1e-5 language part, 2e-6 vision part, cosine, 3% warm-up |
| Effective batch | 16 |
| Precision | bf16 mixed (fp32 master weights), 8-bit AdamW, gradient checkpointing |
| Image size | pixel budget 1280 × 1280 |
| Loss | on the answer tokens only |
Limitations
- English receipts only.
- Day/month order can be wrong on ambiguous dates (e.g.
06/12/14), mostly when the country is unclear.
- When several names are printed (brand, legal company, booking site, airline), it may pick a different one.
- Blurry or faded digits can be misread.
- No "unsure" flag yet: every answer looks equally confident. Check important values.
- Do not send receipts with personal data to shared services; the model runs locally.
Licence
Apache 2.0, as the Qwen3.5 base model. Training data: ReceiptBench (MIT).