bogdanraduta commited on
Commit
37d93a2
·
verified ·
1 Parent(s): b083891

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
+ # CvNER
20
+
21
+ **CvNER** 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 (8):** DEGREE, EMAIL, EMPLOYER, INSTITUTION, PERSON, PHONE, SKILL, TITLE
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/cvner")
37
+ model = AutoModelForTokenClassification.from_pretrained("flowxai/cvner")
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,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-PERSON",
25
+ "2": "I-PERSON",
26
+ "3": "B-EMAIL",
27
+ "4": "I-EMAIL",
28
+ "5": "B-PHONE",
29
+ "6": "I-PHONE",
30
+ "7": "B-TITLE",
31
+ "8": "I-TITLE",
32
+ "9": "B-EMPLOYER",
33
+ "10": "I-EMPLOYER",
34
+ "11": "B-SKILL",
35
+ "12": "I-SKILL",
36
+ "13": "B-DEGREE",
37
+ "14": "I-DEGREE",
38
+ "15": "B-INSTITUTION",
39
+ "16": "I-INSTITUTION"
40
+ },
41
+ "initializer_cutoff_factor": 2.0,
42
+ "initializer_range": 0.02,
43
+ "intermediate_size": 1152,
44
+ "label2id": {
45
+ "B-DEGREE": 13,
46
+ "B-EMAIL": 3,
47
+ "B-EMPLOYER": 9,
48
+ "B-INSTITUTION": 15,
49
+ "B-PERSON": 1,
50
+ "B-PHONE": 5,
51
+ "B-SKILL": 11,
52
+ "B-TITLE": 7,
53
+ "I-DEGREE": 14,
54
+ "I-EMAIL": 4,
55
+ "I-EMPLOYER": 10,
56
+ "I-INSTITUTION": 16,
57
+ "I-PERSON": 2,
58
+ "I-PHONE": 6,
59
+ "I-SKILL": 12,
60
+ "I-TITLE": 8,
61
+ "O": 0
62
+ },
63
+ "layer_norm_eps": 1e-05,
64
+ "layer_types": [
65
+ "full_attention",
66
+ "sliding_attention",
67
+ "sliding_attention",
68
+ "full_attention",
69
+ "sliding_attention",
70
+ "sliding_attention",
71
+ "full_attention",
72
+ "sliding_attention",
73
+ "sliding_attention",
74
+ "full_attention",
75
+ "sliding_attention",
76
+ "sliding_attention",
77
+ "full_attention",
78
+ "sliding_attention",
79
+ "sliding_attention",
80
+ "full_attention",
81
+ "sliding_attention",
82
+ "sliding_attention",
83
+ "full_attention",
84
+ "sliding_attention",
85
+ "sliding_attention",
86
+ "full_attention"
87
+ ],
88
+ "local_attention": 128,
89
+ "max_position_embeddings": 8192,
90
+ "mlp_bias": false,
91
+ "mlp_dropout": 0.0,
92
+ "model_type": "modernbert",
93
+ "norm_bias": false,
94
+ "norm_eps": 1e-05,
95
+ "num_attention_heads": 12,
96
+ "num_hidden_layers": 22,
97
+ "pad_token_id": 50283,
98
+ "position_embedding_type": "absolute",
99
+ "rope_parameters": {
100
+ "full_attention": {
101
+ "rope_theta": 160000.0,
102
+ "rope_type": "default"
103
+ },
104
+ "sliding_attention": {
105
+ "rope_theta": 10000.0,
106
+ "rope_type": "default"
107
+ }
108
+ },
109
+ "sep_token_id": 50282,
110
+ "sparse_pred_ignore_index": -100,
111
+ "sparse_prediction": false,
112
+ "tie_word_embeddings": true,
113
+ "transformers_version": "5.14.1",
114
+ "use_cache": false,
115
+ "vocab_size": 50368
116
+ }
metrics.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "test_loss": 8.739975783100817e-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.7157,
8
+ "test_samples_per_second": 848.234,
9
+ "test_steps_per_second": 26.507,
10
+ "epoch": 3.0
11
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5219087bd109b59b6fb1a6565c4324cecd0227d01be869c6405154db436c384
3
+ size 598485932
onnx/model.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9d6080a7333c914b46ffbdc35dec7a4393f6c0299d96c6c2b533728833b24f0
3
+ size 152208152
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9a1fecedfdf0e89a0ff945a6d23787318f37640759fff9ea3e6c334b2bcd9f8
3
+ size 2616369
onnx/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14bc67b472bbf33cff4b911f63def0d529502849bea03f19064691d82b119ac1
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:8006bed26cc934dd4a46186b967a6ea26f9e48ec365b55bbbdb7ba7103868ea0
3
+ size 5201