Downloads · 30 days
369
32% of all-time downloads
ganmoor-ai-labs/finanalyzer-indian-bank-statements
finanalyzer-indian-bank-statements is a text generation model from ganmoor-ai-labs. Use it when you need the model to write or continue text. It is set up for gguf. The card lists the license as apache-2.0.
A 4B-parameter model that turns the text of any Indian bank or credit-card statement into a structured, machine-verifiable transaction ledger — running fully offline on a phone or a small server.
Downloads · 30 days
369
32% of all-time downloads
All-time downloads
1.1K
Public
Repo size
8.1 GB
Likes
16
Public
Click a slice to open those files.
.gguf8.1 GB · 100%
From the Hugging Face model README
A 4B-parameter model that turns the text of any Indian bank or credit-card statement into a structured, machine-verifiable transaction ledger — running fully offline on a phone or a small server.
FinAnalyzer is the extraction core of an offline-first personal-finance app. It reads a statement page and emits strict JSON: account header + a list of transactions (ISO date, verbatim narration, debit/credit, amount, running balance). Because the most sensitive document most people own is their bank statement, the design goal is that nothing ever leaves the device — the model is small enough to run on-device, and a separate deterministic checker verifies the arithmetic so the language model never has to be trusted with a sum.
Q8_0 (4.0 GB, recommended) and Q4_K_M (2.4 GB, phone-class) GGUFPer statement page, a single JSON object:
{
"bank": "STATE BANK OF INDIA",
"doc_type": "savings",
"account_number": "69666708937",
"holder": "AMIT KULKARNI",
"ifsc": "SBIN0009059",
"period": {"from": "2026-10-01", "to": "2026-10-31"},
"opening_balance": 202552.41,
"closing_balance": 211678.35,
"transactions": [
{"date": "2026-10-03", "narration": "BY DEBIT CARD-OTHPOS531388VIMTA LABS--",
"ref": null, "type": "debit", "amount": 420.53, "balance": 202131.88}
]
}
Credit-card statements emit card_number_masked, total_due, min_due, credit_limit instead of the balance fields. Dates are normalised to ISO-8601; amounts are numbers (no ₹, no lakh commas); multi-line narrations are rejoined; absent fields are null.
Language models miscount. FinAnalyzer's contract is that the model only transcribes — every number it emits must already appear in the source text. A separate deterministic checker then verifies the ledger:
opening + Σcredits − Σdebits == closing (±0.01)prev_balance ± amount == balanceIf any invariant fails, the extraction is flagged for review. This check is pure code, ships with the model, and is what lets a downstream app trust the ₹ figures absolutely.
Transaction-level exact match = every field of a transaction (date, narration, type, amount, balance) correct. Value match = the ledger-critical subset (date, type, amount, balance) correct — narration text ignored.
| Split | Exact | Date | Amount | Balance | Type |
|---|---|---|---|---|---|
| Validation (bf16) | 99.9% | 100% | 100% | 100% | 99.8% |
| Validation (Q4_K_M) | 99.6% | 100% | 100% | 100% | 99.8% |
Supported banks: HDFC, SBI, ICICI, Axis (savings) + HDFC, ICICI (credit card).
| Split | Exact | Value | Amount | Balance |
|---|---|---|---|---|
| Held-out banks — Kotak, Canara (bf16) | 94.5% | 99.3% | 100% | 100% |
| Held-out banks (Q8_0) | 94.9% | ~99% | 100% | 100% |
The numbers that carry money (amount, balance, date) generalise near-perfectly even to unseen layouts; verbatim narration is the only field that softens.
A completely independent generator — fictional banks, business current accounts, narration styles never in our training (By Clg:…). ~6,500 transactions across 40 multi-page statements.
| Variant | Transaction-count parity | Value match |
|---|---|---|
| Digital Type 1 | 3232 / 3232 | 93.9% |
| Digital Type 2 | 3234 / 3226 | 95.0% |
Perfect count parity (no dropped or hallucinated rows) and ~94–95% value accuracy against a generator we never touched.
Q8_0 is near-lossless and is the recommended build (held-out 94.9% ≈ bf16 94.5%). Q4_K_M is near-lossless on supported banks (99.6%) but degrades debit/credit classification on unsupported layouts (held-out exact drops to ~80% because type inference weakens on formats like single-column DR/CR flags). Use Q4_K_M for phone deployment against banks you've trained/validated; use Q8_0 when robustness to unknown layouts matters.
# serve (llama.cpp, OpenAI-compatible). Build with CUDA for GPU.
llama-server -m finanalyzer-q8_0.gguf --port 8091 -c 6144 --parallel 1 -ngl 99
The model expects one page of statement text per request, with this system prompt:
You are a bank-statement extraction engine. Input: the text of one page of an Indian bank or credit-card statement. Output: ONLY a JSON object, no other text. For the first page include: bank, doc_type (savings|current|credit_card), account_number (or card_number_masked), holder, period {from,to} (ISO dates), opening_balance and closing_balance (savings) or total_due, min_due, credit_limit (credit_card), and transactions. For other pages include only transactions. Each transaction: date (ISO), narration (verbatim, join wrapped lines with a space), ref (or null), type (debit|credit), amount (number), balance (number, null if absent). Never invent values not present in the text; use null when absent.
User: Statement page 1 of 1:
<pdftext of the statement page>
Extract the PDF text layer (e.g. pdfplumber) page by page, send each page, and concatenate the transactions. Then run the invariant check before trusting the ledger.
100% synthetic, generated by a purpose-built pipeline — no real customer statement was used, so nothing memorisable is private:
10,000 statements → ~19k page-level training examples. Held-out banks (Kotak, Canara) and the external AgamiAI set were never in training.
Cloud statement-analysis tools face a paradox: you upload your most sensitive document to a server to have sensitive data processed. FinAnalyzer is built to run entirely on-device — the privacy claim is architectural, not a promise. Amounts and balances are verified by deterministic code, not asserted by a language model.
Built on Qwen3-4B-Instruct-2507. Synthetic-data + LoRA pipeline by Ganmoor AI Labs. Evaluated against the independent AgamiAI/Indian-Bank-Statements benchmark. Apache-2.0.