Instructions to use CobuildX-AI/cbx-bfs-transaction-categorizer-68M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CobuildX-AI/cbx-bfs-transaction-categorizer-68M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CobuildX-AI/cbx-bfs-transaction-categorizer-68M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("CobuildX-AI/cbx-bfs-transaction-categorizer-68M") model = AutoModelForSequenceClassification.from_pretrained("CobuildX-AI/cbx-bfs-transaction-categorizer-68M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Access requires accepting the CBX BFS Model Non-Production Licence
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
This model is free for research, personal use and evaluation only. Production and commercial use need a separate licence from CobuildX.
Log in or Sign Up to review the conditions and access this model content.
cbx-bfs-transaction-categorizer-68M
Categorises one bank transaction line into one of 55 subcategories, and from that one of 15 groups (for
example Food & Dining / restaurants, Utilities / electricity_gas, Income / salary). English; US and UK statement
formats. Fine-tuned from Ettin encoder 68m
(68.4M parameters). A 17M version is also available: CobuildX-AI/cbx-bfs-transaction-categorizer-17M.
Licence: CBX BFS Model Non-Production Licence (see
LICENSE). Free for research, personal use and evaluation (including internal evaluation by companies and banks). Production and commercial use, and sharing the model, need a separate licence: hello@cobuildx.ai. The scriptscbx_txn.pyandexample.pyare Apache-2.0.
Quick start
pip install -r requirements.txt
python example.py
from cbx_txn import TransactionCategorizer
tc = TransactionCategorizer(".") # folder with the model files
tc.categorize({"description": "WHOLEFDS MKT 10234 AUSTIN TX", "amount": -84.10})
# {'input': '[debit] WHOLEFDS MKT 10234 AUSTIN TX', 'subcategory': 'groceries', 'group': 'Food & Dining', ...}
Input. One transaction: its description plus its direction, given as a signed amount (negative = money out)
or direction (debit / credit). The model reads [debit] <description> or [credit] <description>, at most
64 tokens; you can also pass that string directly. Use the description as the bank shows it; do not clean it.
Output. subcategory, group, confidence and the top 3 subcategories. The model was trained with label
smoothing 0.1, so the top confidence rarely goes above about 0.9; set any review threshold on this model's own scores.
Taxonomy (15 groups, 55 subcategories)
| Group | Subcategories |
|---|---|
| Food & Dining | groceries, restaurants, food_delivery, cafes_coffee, bars_alcohol |
| Shopping | ecommerce_marketplaces, clothing_accessories, electronics, home_furniture, general_department_stores, software_digital |
| Transport | fuel_ev_charging, ride_hailing_taxi, public_transport, parking_tolls, vehicle_service |
| Housing | rent, mortgage, home_maintenance |
| Utilities | electricity_gas, water_waste, internet_tv, mobile_phone |
| Entertainment | streaming, gaming_betting, events_attractions, hobbies_clubs |
| Healthcare | doctors_hospitals, pharmacy, diagnostics_labs, dental_vision |
| Financial | insurance, investments_savings, bank_fees, loan_payments |
| Income | salary, interest_dividends, refunds_cashback, other_income |
| Transfers | p2p, own_account, credit_card_payment, atm_cash |
| Education | tuition_fees, courses_online_learning, books_supplies |
| Travel | flights, hotels_stays, holidays_agencies |
| Personal Care | fitness_gym, salon_grooming, beauty_cosmetics |
| Taxes & Government | taxes, government_fees |
| Other / Unknown | other_unknown |
Descriptions of every subcategory are in tc_config.json. Business-account lines follow the same taxonomy: payroll
tax debits are taxes; wage payouts, provider fees and other business-only items are other_unknown.
Evaluation
Accuracy (group / subcategory) of this model on held-out test sets.
| Test set | This model | TF-IDF + logistic regression |
|---|---|---|
| MoneyVis test (real UK personal account) | 0.731 / 0.670 | 0.418 / 0.258 |
| ZeraBooks easy test (US small business), per row | 0.933 / 0.903 | 0.527 / 0.266 |
| ZeraBooks easy test, per pattern | 0.848 / 0.825 | โ |
| ZeraBooks context test (needs bookkeeper context) | 0.550 / 0.535 | 0.468 / 0.426 |
| Internal test (US, DoDataThings-style lines) | 0.875 / 0.840 | 0.650 / 0.589 |
- MoneyVis (Firat et al., 2023, CC BY 4.0): real UK current-account lines. None of its lines are used for training.
- ZeraBooks (ZeraBooks benchmark, CC BY 4.0): a fictional US small-business ledger, mapped to this taxonomy (payroll lines relabelled under the guide's payroll rule). Many lines repeat with new reference numbers; "per pattern" counts each repeated line once. "Context" lines need the bookkeeper's knowledge of the business (personal-type purchases on a business card) and are hard for any line-only model.
- Internal test: held-out DoDataThings v2 lines relabelled into this taxonomy.
- The DoDataThings DistilBERT classifier (17 groups, mapped to ours) scores group accuracy 0.402 on MoneyVis test and 0.266 on ZeraBooks easy test.
Speed (one line; CPU with 8 threads / GPU): 12.09 / 7.67 ms; a batch of 64: 253.72 / 18.18 ms.
Training data
- DoDataThings/us-bank-transaction-categories-v2 (MIT): synthetic US bank lines, relabelled into this taxonomy.
- Generated lines: real-merchant and UK lines in many bank formats, business-account lines, payment flows (transfers, standing orders, payroll), with statement noise. Merchant and phrase lists were written with gpt-5.4-mini; UK business names with Qwen2.5-7B-Instruct; the rest by templates.
- Labels: two blind LLM taggers (gpt-5.4-mini and claude-haiku-5-5) under a written annotation guide, kept when they agreed (91% agreement on subcategory), with a tie-break pass; generated lines were kept only when the template label and a blind claude-haiku-5-5 label agreed.
- No eval line (MoneyVis, ZeraBooks, internal test) is in the training data. Data without a clear licence was not used, except aggregate statistics (category mix, line length) from one public challenge set to shape the generated data.
Limitations
- English, US and UK formats only. Other countries' statement formats and languages are untested.
- One line at a time. The model does not see the account, the business, or other transactions. Lines whose category depends on that context (ZeraBooks context: about 0.55 group accuracy) are often wrong.
- The UK long tail is the weakest area (independent shops and restaurants behind card processors): MoneyVis subcategory accuracy is about 0.67.
- Labels come from LLMs, checked against each other, not by humans line by line. Some subcategory boundaries (books vs hobbies, salary vs other income) are a matter of policy.
- Not for decisions about people. Do not use it for credit, fraud, AML, account or similar decisions (see the licence, Schedule 1). Outputs are not financial, accounting or tax advice.
Files
| File | |
|---|---|
model.safetensors, config.json, tokenizer.json, tokenizer_config.json |
the model |
tc_config.json |
taxonomy (55 subcategories with group and description), input format, base model, scores |
cbx_txn.py, example.py, requirements.txt |
loader and example (Apache-2.0) |
LICENSE, LICENSE-CODE, NOTICE |
model licence, script licence, third-party notices |
checksums.sha256 |
SHA-256 of every file |
Contact
Commercial licensing and questions: hello@cobuildx.ai. Release v0.1 (2026-11-13).
- Downloads last month
- 8
Model tree for CobuildX-AI/cbx-bfs-transaction-categorizer-68M
Base model
jhu-clsp/ettin-encoder-68m