File size: 2,011 Bytes
72e3eab
fb462b5
 
 
72e3eab
 
fb462b5
72e3eab
 
c796971
fb462b5
 
 
 
 
72e3eab
 
fb462b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
title: Paper Decoder  Розшифровувач паперів
emoji: 📄
colorFrom: yellow
colorTo: gray
sdk: docker
app_port: 7860
pinned: false
license: apache-2.0
short_description: Ukrainian official-letter decoder for my parents.
tags:
  - backyard-ai
  - off-the-grid
  - llama-cpp
  - tiny-titan
---

# Paper Decoder — Розшифровувач паперів

My parents in Uzhhorod receive official Ukrainian letters — utility debt
notices, bank letters, tax demands — and "official-looking" scam messages.
They can read every word and still not know what the letter wants from them,
or whether it's real.

Paper Decoder takes a phone photo or pasted text of a letter and returns:

1. a plain-Ukrainian summary (3–4 sentences, no bureaucratese),
2. a "what you must do" action list,
3. every date, deadline and amount, extracted,
4. scam-pattern flags with the matched evidence quoted.

## Why a small local model

These letters contain names, addresses, account numbers, debts. Sending them
to a cloud API is exactly what I'd tell my parents never to do. Everything
runs on this CPU Space: Tesseract OCR (ukr+rus) for the photo path,
Qwen3-4B-Instruct-2507 at Q4_K_M served by llama.cpp. No external calls at
inference time.

## Model selection was gated, not assumed

Before building, three candidate models ran a 10-prompt Ukrainian spot-check
on real letter types (scored 0–2 per prompt, blind rubric):

| Model | Score | Verdict |
|---|---|---|
| MiniCPM5-1B (Q4_K_M) | 0/20 | Russian bleed, script corruption, empty outputs |
| Qwen3-1.7B (Q4_K_M) | 11/20 | Fluent Ukrainian, zero scam awareness |
| Qwen3-4B-Instruct-2507 (Q4_K_M) | 14/20 | Pass — shipped |

A fine-tuned LoRA targeting the remaining failure modes (protective actions
on scam letters, date fidelity in summaries) is in progress; the before/after
eval will be published with the model.

Built solo by [aleks-gotsa](https://huggingface.co/aleks-gotsa) for the
Build Small Hackathon 2026, Backyard AI track.