Local models
Books on your own machine
Book bank and card lines to a client's accounts with a model that runs on your computer, so their transactions never leave it.
What it does
bonfyre books puts each bank or card line in one of the client's accounts. It first learns from lines the client has already categorised, which settles most of a month in a fraction of a second. Only lines that history is sure of are booked. Lines it is unsure of go to your local model, which is shown how the client booked the most similar earlier lines; its answer is a suggestion, and the line is held for review with it.
Start the local model
The three commands on these pages ask a model that runs on your own computer. Start it once and leave it running; it loads a model only when a question arrives, and only if there is memory for it.
bonfyre-moe serve --port 7000
bonfyre model local
bonfyre model local lists the models in ~/BonfyreModels, how much memory each needs and which one would answer now. Left to itself, the server loads the largest model that fits. To ask for a particular one, add --model with its file name or part of it, such as --model qwen2.5-3b-instruct. While a command runs it holds the model, so the server does not swap or unload it partway through. The hold ends when the command finishes, or ten minutes after a command stops without saying so. A command that settles every line without the model never loads one. Every answer records the exact model file that gave it.
Learn from earlier months
Give a file of lines that are already categorised. Any export with a description column and a Category or Account column will do.
bonfyre books learn --history examples/history.csv --out learned.json
The examples are 6,000 lines of DoDataThings/us-bank-transaction-categories-v2, a public synthetic set of US bank statement lines in 17 categories, published under the MIT licence. They are nobody's real accounts.
Book a month
bonfyre books --transactions examples/september.csv \
--learned learned.json --out booked.csv
booked.csv has the date, description, amount, the amount as the bank wrote it, account, the suggestion, its confidence, what decided it and whether it is held for review. If the file you book already has a Category or Account column, the summary says how many lines agree with it.
Amounts are read exactly as money: $1,234.56, -12.50, (12.50) and 12.50 DR all work, and a debit column counts as money out. An empty cell, or one that does not read as money, is kept as written and its line is held. It is never booked as zero. If a file could be read two ways, such as a signed amount column next to debit and credit columns, the command stops and asks you to name the columns:
bonfyre books --transactions bank.csv --learned learned.json \
--columns date=Posted,description=Payee,amount=Amount
How well it works
The next 1,500 lines of the same public set, which the learning step never saw:
| Lines | |
|---|---|
| Booked from what the history taught | 1,447 |
| Of those, matching the set's own category | 1,438 |
| Held for review | 53 |
That took under a second on this computer. An earlier version let the local model book the 53 unsure lines itself; it suggested the right account for 37 of them. It now only suggests, because its confidence has not been checked against any client's own books.
Without any history, every line goes to the local model and all of them are held for review. On 40 hand-written small business lines against the IRS Schedule C expense lines, a 7 billion parameter model suggested the right account for 31, and the 3 billion parameter models for 17 to 24. Those suggestion counts come from the earlier version, which chose among many accounts in a different way, and have not been measured again.
Where the data goes
Transactions are marked private and stay on this computer; nothing in this command can send them to a hosted model. Each line keeps a receipt naming the learned file and the model that answered. The client or their bookkeeper still owns the books, and a line held for review is not booked.