58 Downloads Updated 6 days ago
ollama run tarioch/qwen2.5-coder-bql
A fine-tune of Qwen2.5-Coder for the Beancount Query Language (BQL), the query language of beanquery used with Beancount v3. Ask a question about your ledger in plain English and get a BQL query back.
:7b: more accurate, recommended if you have the resources for it.:3b: smaller and faster, matches :7b closely on in-scope questions, but more likely to invent plausible-looking table or column names for questions outside BQL’s scope.latest points to :3b.ollama run tarioch/qwen2.5-coder-bql "How much did I spend on groceries in 2024?"
Send just the question. The model replies with a sql block holding the BQL query. No system prompt is needed and it works with any system prompt or none. The Modelfile sets temperature 0; clients that use Ollama’s OpenAI-compatible /v1 API should send temperature: 0 themselves.
Accounts, payees, tags and currencies you name are used exactly as written. Natural words are matched by keyword (“groceries” becomes account ~ 'Groceries'), and generic wording like “all expenses” by account root (account ~ '^Expenses').
Example questions:
The tags above are updated in place when a new version of the model is trained. Run ollama pull tarioch/qwen2.5-coder-bql:7b (or :3b) to get the latest one. What changed in each version is listed in the GitHub releases.
Training data, methodology and license (GPL-2.0-only): github.com/tarioch/bql-lora