bogdanraduta commited on
Commit
b616fa7
·
verified ·
1 Parent(s): a4e5f55

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
+ - insurance
13
+ - de-identification
14
+ - token-classification
15
+ metrics:
16
+ - f1
17
+ ---
18
+
19
+ # PerilClassify
20
+
21
+ **PerilClassify** is a small, on-device insurance 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 (2):** CAUSE_OF_LOSS, PERIL
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/perilclassify")
37
+ model = AutoModelForTokenClassification.from_pretrained("flowxai/perilclassify")
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,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-PERIL",
25
+ "2": "I-PERIL",
26
+ "3": "B-CAUSE_OF_LOSS",
27
+ "4": "I-CAUSE_OF_LOSS"
28
+ },
29
+ "initializer_cutoff_factor": 2.0,
30
+ "initializer_range": 0.02,
31
+ "intermediate_size": 1152,
32
+ "label2id": {
33
+ "B-CAUSE_OF_LOSS": 3,
34
+ "B-PERIL": 1,
35
+ "I-CAUSE_OF_LOSS": 4,
36
+ "I-PERIL": 2,
37
+ "O": 0
38
+ },
39
+ "layer_norm_eps": 1e-05,
40
+ "layer_types": [
41
+ "full_attention",
42
+ "sliding_attention",
43
+ "sliding_attention",
44
+ "full_attention",
45
+ "sliding_attention",
46
+ "sliding_attention",
47
+ "full_attention",
48
+ "sliding_attention",
49
+ "sliding_attention",
50
+ "full_attention",
51
+ "sliding_attention",
52
+ "sliding_attention",
53
+ "full_attention",
54
+ "sliding_attention",
55
+ "sliding_attention",
56
+ "full_attention",
57
+ "sliding_attention",
58
+ "sliding_attention",
59
+ "full_attention",
60
+ "sliding_attention",
61
+ "sliding_attention",
62
+ "full_attention"
63
+ ],
64
+ "local_attention": 128,
65
+ "max_position_embeddings": 8192,
66
+ "mlp_bias": false,
67
+ "mlp_dropout": 0.0,
68
+ "model_type": "modernbert",
69
+ "norm_bias": false,
70
+ "norm_eps": 1e-05,
71
+ "num_attention_heads": 12,
72
+ "num_hidden_layers": 22,
73
+ "pad_token_id": 50283,
74
+ "position_embedding_type": "absolute",
75
+ "rope_parameters": {
76
+ "full_attention": {
77
+ "rope_theta": 160000.0,
78
+ "rope_type": "default"
79
+ },
80
+ "sliding_attention": {
81
+ "rope_theta": 10000.0,
82
+ "rope_type": "default"
83
+ }
84
+ },
85
+ "sep_token_id": 50282,
86
+ "sparse_pred_ignore_index": -100,
87
+ "sparse_prediction": false,
88
+ "tie_word_embeddings": true,
89
+ "transformers_version": "5.14.1",
90
+ "use_cache": false,
91
+ "vocab_size": 50368
92
+ }
metrics.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "test_loss": 2.2800104204634408e-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.3514,
8
+ "test_samples_per_second": 919.24,
9
+ "test_steps_per_second": 28.726,
10
+ "epoch": 3.0
11
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43a9e2a68f7a95e4893fe5c82525a356bca88c33ca404f6310498c7cb9a22a3d
3
+ size 598449012
onnx/model.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b98de802829967613d24a05105b0a6ad334b351fa0fcac6138781f9202ee4ef
3
+ size 152198888
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30c00a6810013013de8938d8f6047b907ba0b6a92872784ccd5ce5182fb06e69
3
+ size 2616321
onnx/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7172d42837550a6b07c7e3c7cf9e5982dd5a0104cda817081a9198078e3c021e
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:feb97dc1b8834e80e25e18297d4b38a1ca1e2e5533e3dc66439ea42cf75019dc
3
+ size 5201