Token Classification
Transformers
ONNX
Safetensors
modernbert
ner
on-device
privacy
flowx
openner
banking
de-identification
Instructions to use flowxai/sanctionscreen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flowxai/sanctionscreen with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="flowxai/sanctionscreen")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("flowxai/sanctionscreen") model = AutoModelForTokenClassification.from_pretrained("flowxai/sanctionscreen", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add OpenNER model, card, NOTICE (Apache-2.0, FlowX.AI)
Browse files- .gitattributes +1 -0
- NOTICE +8 -0
- README.md +43 -0
- config.json +100 -0
- metrics.json +11 -0
- model.safetensors +3 -0
- onnx/model.int8.onnx +3 -0
- onnx/model.onnx +3 -0
- onnx/model.onnx.data +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +17 -0
- training_args.bin +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
onnx/model.onnx.data filter=lfs diff=lfs merge=lfs -text
|
NOTICE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FlowX OpenNER
|
| 2 |
+
Copyright 2026 FlowX.AI
|
| 3 |
+
|
| 4 |
+
This product includes software and models developed at FlowX.AI (https://flowx.ai).
|
| 5 |
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use these
|
| 6 |
+
files except in compliance with the License. You may obtain a copy of the License at
|
| 7 |
+
|
| 8 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: token-classification
|
| 5 |
+
base_model: answerdotai/ModernBERT-base
|
| 6 |
+
tags:
|
| 7 |
+
- ner
|
| 8 |
+
- on-device
|
| 9 |
+
- privacy
|
| 10 |
+
- flowx
|
| 11 |
+
- openner
|
| 12 |
+
- banking
|
| 13 |
+
- de-identification
|
| 14 |
+
- token-classification
|
| 15 |
+
metrics:
|
| 16 |
+
- f1
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# SanctionScreen
|
| 20 |
+
|
| 21 |
+
**SanctionScreen** is a small, on-device banking NER model from the FlowX **OpenNER** family. Developed by **FlowX.AI**. Runs 100% on-premise / air-gapped, so no data leaves your boundary.
|
| 22 |
+
|
| 23 |
+
## What it does
|
| 24 |
+
- **Task:** token-classification
|
| 25 |
+
- **Base model:** `answerdotai/ModernBERT-base`
|
| 26 |
+
- **Entity types (4):** JURISDICTION, PARTY, SANCTIONED, UBO
|
| 27 |
+
- **Held-out F1:** 1.0000
|
| 28 |
+
- **Runtime:** CPU, Apple Silicon, one GPU, or browser/edge via ONNX (INT8). ~100-160 ms/doc on CPU.
|
| 29 |
+
|
| 30 |
+
## Why a small model
|
| 31 |
+
Fine-tuned encoders match or beat frontier LLMs on structured, convention-bound extraction, at a fraction of the latency and cost, with **zero data egress**. Identifiers are validated by checksum (IBAN mod-97, card Luhn, ISIN/LEI, container ISO-6346, VIN, national IDs), a correctness guarantee general LLMs lack. See the FlowX OpenNER benchmark for measured results.
|
| 32 |
+
|
| 33 |
+
## Usage
|
| 34 |
+
```python
|
| 35 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 36 |
+
tok = AutoTokenizer.from_pretrained("flowxai/sanctionscreen")
|
| 37 |
+
model = AutoModelForTokenClassification.from_pretrained("flowxai/sanctionscreen")
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
## License & attribution
|
| 41 |
+
Licensed under the **Apache License 2.0**. Copyright 2026 **FlowX.AI** (https://flowx.ai). See the `NOTICE` file. Trained on synthetic, checksum-validated data.
|
| 42 |
+
|
| 43 |
+
_Part of the FlowX OpenNER model family. Synthetic-data F1 reflects an in-distribution synthetic distribution; validate on real documents before production use._
|
config.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ModernBertForTokenClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 50281,
|
| 8 |
+
"classifier_activation": "gelu",
|
| 9 |
+
"classifier_bias": false,
|
| 10 |
+
"classifier_dropout": 0.0,
|
| 11 |
+
"classifier_pooling": "mean",
|
| 12 |
+
"cls_token_id": 50281,
|
| 13 |
+
"decoder_bias": true,
|
| 14 |
+
"deterministic_flash_attn": false,
|
| 15 |
+
"dtype": "float32",
|
| 16 |
+
"embedding_dropout": 0.0,
|
| 17 |
+
"eos_token_id": 50282,
|
| 18 |
+
"global_attn_every_n_layers": 3,
|
| 19 |
+
"gradient_checkpointing": false,
|
| 20 |
+
"hidden_activation": "gelu",
|
| 21 |
+
"hidden_size": 768,
|
| 22 |
+
"id2label": {
|
| 23 |
+
"0": "O",
|
| 24 |
+
"1": "B-PARTY",
|
| 25 |
+
"2": "I-PARTY",
|
| 26 |
+
"3": "B-UBO",
|
| 27 |
+
"4": "I-UBO",
|
| 28 |
+
"5": "B-SANCTIONED",
|
| 29 |
+
"6": "I-SANCTIONED",
|
| 30 |
+
"7": "B-JURISDICTION",
|
| 31 |
+
"8": "I-JURISDICTION"
|
| 32 |
+
},
|
| 33 |
+
"initializer_cutoff_factor": 2.0,
|
| 34 |
+
"initializer_range": 0.02,
|
| 35 |
+
"intermediate_size": 1152,
|
| 36 |
+
"label2id": {
|
| 37 |
+
"B-JURISDICTION": 7,
|
| 38 |
+
"B-PARTY": 1,
|
| 39 |
+
"B-SANCTIONED": 5,
|
| 40 |
+
"B-UBO": 3,
|
| 41 |
+
"I-JURISDICTION": 8,
|
| 42 |
+
"I-PARTY": 2,
|
| 43 |
+
"I-SANCTIONED": 6,
|
| 44 |
+
"I-UBO": 4,
|
| 45 |
+
"O": 0
|
| 46 |
+
},
|
| 47 |
+
"layer_norm_eps": 1e-05,
|
| 48 |
+
"layer_types": [
|
| 49 |
+
"full_attention",
|
| 50 |
+
"sliding_attention",
|
| 51 |
+
"sliding_attention",
|
| 52 |
+
"full_attention",
|
| 53 |
+
"sliding_attention",
|
| 54 |
+
"sliding_attention",
|
| 55 |
+
"full_attention",
|
| 56 |
+
"sliding_attention",
|
| 57 |
+
"sliding_attention",
|
| 58 |
+
"full_attention",
|
| 59 |
+
"sliding_attention",
|
| 60 |
+
"sliding_attention",
|
| 61 |
+
"full_attention",
|
| 62 |
+
"sliding_attention",
|
| 63 |
+
"sliding_attention",
|
| 64 |
+
"full_attention",
|
| 65 |
+
"sliding_attention",
|
| 66 |
+
"sliding_attention",
|
| 67 |
+
"full_attention",
|
| 68 |
+
"sliding_attention",
|
| 69 |
+
"sliding_attention",
|
| 70 |
+
"full_attention"
|
| 71 |
+
],
|
| 72 |
+
"local_attention": 128,
|
| 73 |
+
"max_position_embeddings": 8192,
|
| 74 |
+
"mlp_bias": false,
|
| 75 |
+
"mlp_dropout": 0.0,
|
| 76 |
+
"model_type": "modernbert",
|
| 77 |
+
"norm_bias": false,
|
| 78 |
+
"norm_eps": 1e-05,
|
| 79 |
+
"num_attention_heads": 12,
|
| 80 |
+
"num_hidden_layers": 22,
|
| 81 |
+
"pad_token_id": 50283,
|
| 82 |
+
"position_embedding_type": "absolute",
|
| 83 |
+
"rope_parameters": {
|
| 84 |
+
"full_attention": {
|
| 85 |
+
"rope_theta": 160000.0,
|
| 86 |
+
"rope_type": "default"
|
| 87 |
+
},
|
| 88 |
+
"sliding_attention": {
|
| 89 |
+
"rope_theta": 10000.0,
|
| 90 |
+
"rope_type": "default"
|
| 91 |
+
}
|
| 92 |
+
},
|
| 93 |
+
"sep_token_id": 50282,
|
| 94 |
+
"sparse_pred_ignore_index": -100,
|
| 95 |
+
"sparse_prediction": false,
|
| 96 |
+
"tie_word_embeddings": true,
|
| 97 |
+
"transformers_version": "5.14.1",
|
| 98 |
+
"use_cache": false,
|
| 99 |
+
"vocab_size": 50368
|
| 100 |
+
}
|
metrics.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"test_loss": 7.403320978482952e-07,
|
| 3 |
+
"test_precision": 1.0,
|
| 4 |
+
"test_recall": 1.0,
|
| 5 |
+
"test_f1": 1.0,
|
| 6 |
+
"test_accuracy": 1.0,
|
| 7 |
+
"test_runtime": 4.435,
|
| 8 |
+
"test_samples_per_second": 901.91,
|
| 9 |
+
"test_steps_per_second": 28.185,
|
| 10 |
+
"epoch": 3.0
|
| 11 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a3877235586fdd18d56f7abdaa66a66372aa45cb9d3fce592b8c51d92f02506d
|
| 3 |
+
size 598461316
|
onnx/model.int8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05337a3aedafbf1c1b82e2c29afb30a8ebb9e298cb1eb713b57ddb3a1277c08c
|
| 3 |
+
size 152201976
|
onnx/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:506c604382d07b9937f2df1ef4b80af5f3cd0cf1313d6d1491c35da28d15cf16
|
| 3 |
+
size 2616337
|
onnx/model.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc2f520b35aae884371ef8519a8f576400816ae8dbf547faa313ddba05a2e852
|
| 3 |
+
size 598474752
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"clean_up_tokenization_spaces": true,
|
| 4 |
+
"cls_token": "[CLS]",
|
| 5 |
+
"is_local": false,
|
| 6 |
+
"local_files_only": false,
|
| 7 |
+
"mask_token": "[MASK]",
|
| 8 |
+
"model_input_names": [
|
| 9 |
+
"input_ids",
|
| 10 |
+
"attention_mask"
|
| 11 |
+
],
|
| 12 |
+
"model_max_length": 8192,
|
| 13 |
+
"pad_token": "[PAD]",
|
| 14 |
+
"sep_token": "[SEP]",
|
| 15 |
+
"tokenizer_class": "TokenizersBackend",
|
| 16 |
+
"unk_token": "[UNK]"
|
| 17 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e37c2a499b3e46e4c2270b7c4d7ecacece26dbe469f80174b69e7ff5d4b4b4c
|
| 3 |
+
size 5201
|