Open-source financial NER

Your Data. Your Model. Your Hardware.

Detect 30+ financial entity types and redact PCI & PII — 100% on your hardware.

Small encoder models built for banking: extract IBANs, PANs, counterparties and financial facts, and de-identify regulated data without a single byte leaving your network. Apache-2.0, hosted on Hugging Face.

9
models
banking family, all trained
9
languages
multilingual PII
~140 ms
per document
on-device latency
$0 · 0
cost · bytes egress
no API fees, no data movement
Quickstart

Four lines to production-grade financial NER.

  • Models download once from Hugging Face, then run fully offline.
  • Pick a redaction profile — pci-glba, gdpr, or aml — and get consistent entity policies out of the box.
  • Entities come back with spans, confidence, and checksum validation for IBANs and card numbers.
  • De-identification runs in the same pass. Nothing is queued, batched, or sent anywhere.

$ pip install git+https://github.com/flowx-ai/openner

quickstart.py
from openner import analyze

result = analyze(text, profile="pci-glba")
print(result.entities)      # IBAN, PAN, COUNTERPARTY, AMOUNT …
safe = result.deidentify()  # redacts cardholder data & PII on-device
Runtime

Runs everywhere your data is allowed to be.

The same weights, from an air-gapped mainframe adjacency to a browser tab. If Python or ONNX runs there, OpenLedger runs there.

01

On-prem CPU / GPU

Millisecond inference on commodity servers — no accelerators required, GPU optional for bulk jobs.

02

Air-gapped

Install from a wheel, load weights from disk. Zero network dependencies after setup.

03

Browser (ONNX / WASM)

Quantized builds run client-side in the browser — redact before data ever reaches a server.

04

REST / gRPC microservice

A single container exposes analyze-and-redact endpoints for every team behind your firewall.

Privacy & de-identification

Keep regulated data inside your walls.

De-identification isn't a feature bolted onto NER — it is the point. Every model ships with a redaction pipeline tuned for the data regimes banks actually answer to.

PCI-DSS cardholder dataDetects and redacts PANs, CVVs, expiry dates and magnetic-stripe track data before it lands anywhere it shouldn't.
GLBA NPI protectionCovers nonpublic personal information — account numbers, balances, credit history references — in one pass.
Checksum validationIBAN mod-97 and card Luhn checks separate real identifiers from lookalike noise, cutting false positives.
Context-aware boostingSurrounding language — "wire to", "beneficiary", "card ending" — raises or lowers entity confidence.
Configurable redaction profilesShip-ready policies for pci-glba, gdpr and aml — or compose your own entity-by-entity.
Signed audit reportsEvery redaction run emits a cryptographically signed report: what was found, what was masked, under which policy.
Zero data movementNo API keys, no callbacks, no usage pings. The library has no network code in the inference path.
No telemetry, everAuditable in an afternoon: the source is small enough for your security team to actually read.
Model library

Small models for banking.

Nine encoder models, each trained for one job in the financial document stack. Small enough for a laptop, precise enough for production. The cross-industry DocFormNER model (LayoutLMv3 — text + 2D layout + page image) now reads scanned and photographed mortgage packets on-prem; it is a preview trained on synthetic rendered forms, so fine-tune it on your own OCR'd scans before production.

IbanDetect

Extracts and validates IBAN, account, routing and SWIFT-BIC identifiers.

IBANSWIFT/BICACCOUNT
PanRedact

PCI-DSS cardholder-data detection and redaction.

PANCVVEXPIRYTRACK
KycExtract

Identity fields from onboarding documents.

NAMEDOBTAX_IDADDRESS
SanctionScreen

Party, counterparty and UBO detection with watchlist flags.

PARTYUBOSANCTIONED
TxnClassify

Parses transaction narratives into structured fields.

MERCHANTAMOUNTCURRENCYTXN_TYPE
FilingTag

XBRL-style numeric financial facts using FiNER-139 labels.

REVENUEEBITDARATE
CounterpartyLink

Counterparty and issuer NER with LEI, ISIN and ticker linking.

LEIISINTICKER
AmlNarrate

Entity and event extraction from SAR / STR narratives.

ENTITYEVENTJURISDICTION
MortgageDocNER

Extracts mortgage-specific fields from applications and offers: borrower, lender, property, loan amount, LTV, rate, term, income.

BORROWERLENDERPROPERTY_ADDRLOAN_AMOUNTLTVINTEREST_RATE
Built with OpenLedger

From library to product.

The toolkit is the foundation. These are the products teams assemble on top of it — each one runs entirely inside your perimeter.

Data protection

De-ID Gateway

An on-prem redaction proxy that strips PCI and PII from every document, log line and prompt before it reaches your analytics stack or an LLM — with signed audit logs for each pass.

Financial crime

KYC / AML Copilot

Assembles KYC packets from onboarding documents and pre-drafts SAR narratives by cross-referencing parties, transactions and jurisdictions your analysts would otherwise chase by hand.

Capital markets

Filing & Contract Intelligence

Turns filings, credit agreements and term sheets into structured financial facts and counterparty graphs — LEI-linked, queryable, and current the moment a document lands.

Compliance coverage

Built for the regimes banks answer to.

Entity coverage and redaction profiles map to the frameworks your compliance team already speaks.

PCI-DSScardholder dataGLBAcustomer NPIBSA/AMLSAR narrativesKYC/CIP/CDDonboardingOFACsanctionsGDPRdata residencyMiFID IIcomms recordsSOXreportingPSD2payments
Benchmarks

Measured against frontier LLMs.

We benchmarked our small on-device models head-to-head against the latest cost-effective frontier LLMs. Same held-out documents, same entity types.

TaskOpenLedgerCost-effective frontier LLMsWhy the gap
SEC-filing extractionFilingTag · real FiNER-139 · 139 XBRL fact typesF1 0.667pipeline-usable metric≤ 0.02every model testedFrontier models identify the facts but don't match the token convention a pipeline consumes.
Common extractionIBANs · PANs · invoices · multilingual PIIF1 1.000≤ 1.000Matches or beats every cheap frontier model — at a fraction of the latency and none of the cost.
Mortgage-doc extractionMortgageDocNER · borrower · lender · LTV · rate · termF1 1.000~120 ms/doc · $0≤ 0.995gemini-3.5-flash bestPerfect strict entity-F1 ahead of every cost-effective frontier model — gemini-3.5-flash 0.995, gpt-5.4-mini 0.967, claude-haiku-4-5 0.954, gemini-3.1-flash-lite 0.940, gpt-5.4-nano 0.919.
6–36×
faster
$0 vs $5.57
per 1k docs, worst case
0
bytes leave your network

N=30 held-out documents per task. Frontier tier: Claude Haiku 4.5, GPT-5.4-mini, GPT-5.4-nano, Gemini 3.5-flash, Gemini 3.1-flash-lite (OpenAI models via the Responses API). Frontier LLMs remain better at open-ended reasoning — not what these models are for. Small fine-tuned encoders win on structured, convention-bound, on-device extraction.

FAQ

Questions banks ask first.

Q.01What is OpenLedger?

An open-source toolkit of small encoder-based NER models for banking and financial services, plus a de-identification pipeline. It detects 30+ financial entity types — IBANs, PANs, counterparties, financial facts — and redacts regulated data, all on your own hardware.

Q.02Why encoder models instead of a generative LLM?

Extraction is a labeling problem, not a generation problem. Encoder NER models are two to three orders of magnitude smaller, run in milliseconds on CPUs, produce deterministic character-level spans, and never hallucinate an account number that wasn't in the text. For classification and extraction over regulated data, small and exact beats large and creative.

Q.03Does my data ever leave my network?

No. Models are downloaded once (or side-loaded in air-gapped environments) and inference runs entirely locally. There are no API calls, no telemetry, and no network code in the inference path — a claim your security team can verify by reading the source.

Q.04How does this help with PCI-DSS or GLBA scope?

Systems that store or process cardholder data are in PCI scope. Redacting PANs, CVVs and track data at the boundary — before data reaches logs, analytics warehouses or LLM prompts — keeps those downstream systems out of scope. The same pattern applies to GLBA NPI: de-identify at ingestion, and everything after it handles only masked data. Signed audit reports document each redaction pass for your assessor.

Q.05Can I fine-tune on my own data?

Yes. Every model ships with training scripts and a documented label schema. Fine-tune on your own annotated corpus — internal transaction narratives, proprietary document formats — and the resulting weights stay yours, on your infrastructure.

Q.06How does it handle scanned or photographed documents?

The text NER models expect extracted text, so pair them with your OCR of choice for scans. For layout-heavy paperwork we also ship DocFormNER, a cross-industry model built on LayoutLMv3 — it reads text, 2D layout and the page image together, so it can pull fields from scanned and photographed mortgage packets entirely on-prem. It is a preview trained on synthetic rendered forms and should be fine-tuned on your own OCR'd scans before production use.

Q.07Is it really open-source?

Apache-2.0, for both code and model weights. Use it commercially, modify it, embed it in proprietary products. No dual licensing, no open-core upsell, no usage caps.

Trained and shipped: 9 open banking models, ONNX/edge exports, checksum validation (IBAN mod-97, card Luhn, ISIN/LEI), and de-identification with signed audit reports. Apache-2.0.