bogdanraduta commited on
Commit
30a2fa2
·
verified ·
1 Parent(s): 3a9c86a

Add OpenNER model, card, NOTICE (Apache-2.0, FlowX.AI)

Browse files
.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
+ - cross
13
+ - de-identification
14
+ - token-classification
15
+ metrics:
16
+ - f1
17
+ ---
18
+
19
+ # KybExtract
20
+
21
+ **KybExtract** is a small, on-device cross 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 (6):** ADDRESS, COMPANY, LEI, REG_NO, SIGNATORY, 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/kybextract")
37
+ model = AutoModelForTokenClassification.from_pretrained("flowxai/kybextract")
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,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-COMPANY",
25
+ "2": "I-COMPANY",
26
+ "3": "B-REG_NO",
27
+ "4": "I-REG_NO",
28
+ "5": "B-LEI",
29
+ "6": "I-LEI",
30
+ "7": "B-UBO",
31
+ "8": "I-UBO",
32
+ "9": "B-SIGNATORY",
33
+ "10": "I-SIGNATORY",
34
+ "11": "B-ADDRESS",
35
+ "12": "I-ADDRESS"
36
+ },
37
+ "initializer_cutoff_factor": 2.0,
38
+ "initializer_range": 0.02,
39
+ "intermediate_size": 1152,
40
+ "label2id": {
41
+ "B-ADDRESS": 11,
42
+ "B-COMPANY": 1,
43
+ "B-LEI": 5,
44
+ "B-REG_NO": 3,
45
+ "B-SIGNATORY": 9,
46
+ "B-UBO": 7,
47
+ "I-ADDRESS": 12,
48
+ "I-COMPANY": 2,
49
+ "I-LEI": 6,
50
+ "I-REG_NO": 4,
51
+ "I-SIGNATORY": 10,
52
+ "I-UBO": 8,
53
+ "O": 0
54
+ },
55
+ "layer_norm_eps": 1e-05,
56
+ "layer_types": [
57
+ "full_attention",
58
+ "sliding_attention",
59
+ "sliding_attention",
60
+ "full_attention",
61
+ "sliding_attention",
62
+ "sliding_attention",
63
+ "full_attention",
64
+ "sliding_attention",
65
+ "sliding_attention",
66
+ "full_attention",
67
+ "sliding_attention",
68
+ "sliding_attention",
69
+ "full_attention",
70
+ "sliding_attention",
71
+ "sliding_attention",
72
+ "full_attention",
73
+ "sliding_attention",
74
+ "sliding_attention",
75
+ "full_attention",
76
+ "sliding_attention",
77
+ "sliding_attention",
78
+ "full_attention"
79
+ ],
80
+ "local_attention": 128,
81
+ "max_position_embeddings": 8192,
82
+ "mlp_bias": false,
83
+ "mlp_dropout": 0.0,
84
+ "model_type": "modernbert",
85
+ "norm_bias": false,
86
+ "norm_eps": 1e-05,
87
+ "num_attention_heads": 12,
88
+ "num_hidden_layers": 22,
89
+ "pad_token_id": 50283,
90
+ "position_embedding_type": "absolute",
91
+ "rope_parameters": {
92
+ "full_attention": {
93
+ "rope_theta": 160000.0,
94
+ "rope_type": "default"
95
+ },
96
+ "sliding_attention": {
97
+ "rope_theta": 10000.0,
98
+ "rope_type": "default"
99
+ }
100
+ },
101
+ "sep_token_id": 50282,
102
+ "sparse_pred_ignore_index": -100,
103
+ "sparse_prediction": false,
104
+ "tie_word_embeddings": true,
105
+ "transformers_version": "5.14.1",
106
+ "use_cache": false,
107
+ "vocab_size": 50368
108
+ }
metrics.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "test_loss": 8.47950104798656e-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.8071,
8
+ "test_samples_per_second": 832.095,
9
+ "test_steps_per_second": 26.003,
10
+ "epoch": 3.0
11
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c61bc13e7f40430f894a1db86abd989e04228d9ec9efa90c005d12bbf1c45096
3
+ size 598473628
onnx/model.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8a19c4566009f55e953fbb9b24c4d915a58a84f46b0b5a0503d55244e50c0c4
3
+ size 152205064
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:505fbe4c170915ebbc973d33c71ff4b5df5798602bcc6109d241c899277f4de3
3
+ size 2616353
onnx/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8194b8fba5a3da24b6e5ce2b1c9fdf50840d012d2770682bca5298cba47739c
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:14fc3d40dad693858ae144e0599884abb5215088d9695456262b2aee21d834cf
3
+ size 5201