A LoRA fine-tune of swiss-ai/Apertus-v1.1-1.5B-Instruct that files one US bank-statement line into one of 17 budget categories: Restaurants, Groceries, Shopping, Transportation, Entertainment, Utilities, Subscription, Healthcare, Insurance, Mortgage, Rent, Travel, Education, Personal Care, Transfer, Income, Fees. Add up a month of lines and you have a budget.
Built in lesson 8 of the KGP Talkie series LLM Fine-Tuning on Mac, on a MacBook Pro (Apple M5 Max, 36 GB).
mask_prompt), seed 0. 5.374 M trainable parameters (0.356 %).| Test | Base | This model |
|---|---|---|
| 1,700 lines from shops never seen in training | 9.1 % | 79.3 % |
| 1,700 new lines from known shops | 11.8 % | 98.7 % |
| A month we wrote (31 lines, every merchant made up) | 2 / 31 | 30 / 31 |
The base model answers "Utilities" for most lines (1,566 of the 1,700 never-seen-shop lines). About 40 ms per line in MLX after fusing.
adapters.safetensors, adapter_config.json: the LoRA adapter for the base model (MLX).bank-budget-Q8_0.gguf + Modelfile: the fused model as an 8-bit GGUF for Ollama or llama.cpp.The system prompt (the same one used in training):
You sort lines from a US bank statement into budget categories. Each line starts with [debit] (money out) or [credit] (money in). Reply with exactly one category from this list and nothing else: Restaurants, Groceries, Shopping, Transportation, Entertainment, Utilities, Subscription, Healthcare, Insurance, Mortgage, Rent, Travel, Education, Personal Care, Transfer, Income, Fees.
ollama create bank-budget -f Modelfile
ollama run bank-budget "[debit] SQ *BLUE BOTTLE 0423 SAN FRANCISCO CA"
A teaching model. It was trained on synthetic lines; real statements are messier, and the dataset's labels follow its generator (a pharmacy can be Shopping or Healthcare). Check the answers before you trust a budget. Apertus is released under Apache-2.0; its model card also asks users to follow the Apertus Acceptable Use Policy, including applying Swiss AI's personal-data output filter once one is published.
swiss-ai/Apertus-v1.1-1.5B-Instruct