Skip to main content

OpenNER

Small, on-device NER & de-identification models for regulated industries — banking · insurance · logistics. Fine-tuned encoders that match or beat frontier LLMs on structured, convention-bound extraction, while running on a CPU, a single GPU, Apple Silicon, or in the browser/edge via ONNX — with zero data egress.

Built and maintained by FlowX.AI. Apache-2.0. Pretrained models: huggingface.co/flowxai.

Install

pip install flowx-openner            # core inference
pip install "flowx-openner[serve]"   # + FastAPI server
pip install "flowx-openner[all]"     # + training, ONNX export, benchmarking

Quickstart

Load any published model straight from the Hub by its repo id, or a local directory:

from openner import analyze

res = analyze("Wire EUR 12,500 to DE44 5001 0517 5407 3249 31", model="flowxai/ibandetect")
print(res.entities)                       # [{'type': 'IBAN', 'text': 'DE44 ...', 'valid': True, ...}]

# De-identify with a compliance profile → redacted text + a signed audit report
deid = res.deidentify("pci-glba")
print(deid.text)                          # "Wire EUR 12,500 to [IBAN]"
print(deid.report.to_json())

Detected identifiers are validated by checksum — IBAN mod-97, card Luhn, ISIN/LEI (ISO-7064), container (ISO-6346), VIN (ISO-3779), and national IDs (CNP, EGN, OIB, EMŠO, Steuer-ID, NIR, Codice Fiscale, HU tax id) — a correctness guarantee general LLMs lack.

De-identification fails safe: every detected candidate is redacted even if its checksum fails; the valid flag is recorded in the audit report but never suppresses redaction.

Models

33 models grouped into five collections on the Hub. Every model is a fine-tuned encoder (token- or text-classification, plus one LayoutLMv3 Document-AI model), Apache-2.0, with its own model card. Load any of them by short name (analyze(text, model="mortgagedocner")) and it is pulled from flowxai/<name> on first use.

Collection Models
Banking ibandetect, panredact, counterpartylink, txnclassify, kycextract, sanctionscreen, amlnarrate, filingtag, mortgagedocner
Insurance policydetect, claimextract, assetdetect, perilclassify, partyresolve, codemap, insurredact, medclaimner
Logistics containerdetect, portroute, incotermextract, hazmatguard, partylink, bolparse, traderedact, hscodeclassify
Healthcare intentrouter (inbox routing), expiryner (expiry / lot / returns)
Cross-industry piiguard (multilingual PII), privacyfilter, invoicener, cvner, kybextract, docformner (Document-AI, scanned forms)

piiguard covers en, ro, bg, hu, sl, hr, de, it, fr with country-matched national-ID checksums. docformner is a LayoutLMv3 Document-AI preview trained on synthetic rendered forms; fine-tune it on real OCR'd scans before production. hscodeclassify, intentrouter and privacyfilter are text classifiers; the rest are token-classification NER.

Serve it (local REST API)

openner-serve                         # http://127.0.0.1:8000  (API + web UI)
curl localhost:8000/models
curl -X POST localhost:8000/deidentify -H 'content-type: application/json' \
  -d '{"text":"Wire to DE44 5001 0517 5407 3249 31","model":"ibandetect","profile":"pci-glba"}'

Endpoints: GET /health, GET /models, POST /analyze, POST /deidentify (redacted text + a signed audit report), POST /filter (PrivacyFilter guard: NONE / PERSONAL / FINANCIAL / HEALTH). Everything runs on-device.

Train your own

Each model is one YAML config. Train on a laptop (small slice), a CUDA box, or a cloud GPU:

python -m openner.train --config configs/banking/filingtag.yaml --profile full

Add a model = add configs/<industry>/<name>.yaml (+ a dataset adapter if new). No other code changes. Training data is synthetic and checksum-validated by construction (plus real SEC filings for filingtag).

Export for edge / phone / browser

python -m openner.export.to_onnx --model artifacts/filingtag-full
# → model.onnx (fp32) + model.int8.onnx (INT8, ~4× smaller), parity-checked against PyTorch.
# Load with onnxruntime / onnxruntime-web / onnxruntime-mobile.

Layout

openner/    industry-agnostic library (data · train · metrics · serve · deid · export · benchmark)
configs/    one YAML per model  (banking/ · insurance/ · logistics/ · cross/)
scripts/    smoke_test.sh (laptop) · train_gcp.sh (GPU) · run_benchmark.py

License

Apache-2.0. Copyright 2026 FlowX.AI. See LICENSE and NOTICE. Models are trained on synthetic, checksum-validated data; validate on your own real documents before production use.

Metadata

Release files for flowx-openner 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowx-openner 0.2.0
File Size Uploaded Provenance
flowx_openner-0.2.0.tar.gz 62.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flowx-openner 0.2.0
File Interpreter ABI Platform
flowx_openner-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 145.4 kB

Release files / flowx_openner-0.2.0.tar.gz

Download URL flowx_openner-0.2.0.tar.gz
Size 62.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e1c0500ff5c39439d1f173cdcc47f1f4cfc83bbdcbd3db51fa64a7fe0fc81719
BLAKE2b-256 checksum
How to use checksums
05e26ad2c1b25b5198bb37ee4a367ad8abef9186f0983eb66c496ea16363ec93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / flowx_openner-0.2.0-py3-none-any.whl

Download URL flowx_openner-0.2.0-py3-none-any.whl
Size 83.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
097a8f8709dbb48b9c391b25bd2648773ea426b8365f09623b2dac6bbb29742e
BLAKE2b-256 checksum
How to use checksums
a1fff2a0711bbe56069ef2150933356535cefa707e2398fb04ad0ad9457de11a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for flowx-openner 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page