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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flowx_openner-0.2.0.tar.gz (62.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flowx_openner-0.2.0-py3-none-any.whl (83.1 kB view details)

Uploaded Python 3

File details

Details for the file flowx_openner-0.2.0.tar.gz.

File metadata

  • Download URL: flowx_openner-0.2.0.tar.gz
  • Upload date:
  • Size: 62.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for flowx_openner-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e1c0500ff5c39439d1f173cdcc47f1f4cfc83bbdcbd3db51fa64a7fe0fc81719
MD5 9ba60f1d15e9c7cde234aeef5f96748f
BLAKE2b-256 05e26ad2c1b25b5198bb37ee4a367ad8abef9186f0983eb66c496ea16363ec93

See more details on using hashes here.

File details

Details for the file flowx_openner-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: flowx_openner-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 83.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for flowx_openner-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 097a8f8709dbb48b9c391b25bd2648773ea426b8365f09623b2dac6bbb29742e
MD5 7221fda58e992ead969a4d808831ead8
BLAKE2b-256 a1fff2a0711bbe56069ef2150933356535cefa707e2398fb04ad0ad9457de11a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page