bogdanraduta commited on
Commit
b17d477
·
verified ·
1 Parent(s): 7cdc5d8

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
+ - logistics
13
+ - de-identification
14
+ - token-classification
15
+ metrics:
16
+ - f1
17
+ ---
18
+
19
+ # BoLParse
20
+
21
+ **BoLParse** is a small, on-device logistics 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):** BL_NO, CARGO, CONSIGNEE, CONTAINER_NO, PORT, SHIPPER
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/bolparse")
37
+ model = AutoModelForTokenClassification.from_pretrained("flowxai/bolparse")
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-BL_NO",
25
+ "2": "I-BL_NO",
26
+ "3": "B-SHIPPER",
27
+ "4": "I-SHIPPER",
28
+ "5": "B-CONSIGNEE",
29
+ "6": "I-CONSIGNEE",
30
+ "7": "B-PORT",
31
+ "8": "I-PORT",
32
+ "9": "B-CARGO",
33
+ "10": "I-CARGO",
34
+ "11": "B-CONTAINER_NO",
35
+ "12": "I-CONTAINER_NO"
36
+ },
37
+ "initializer_cutoff_factor": 2.0,
38
+ "initializer_range": 0.02,
39
+ "intermediate_size": 1152,
40
+ "label2id": {
41
+ "B-BL_NO": 1,
42
+ "B-CARGO": 9,
43
+ "B-CONSIGNEE": 5,
44
+ "B-CONTAINER_NO": 11,
45
+ "B-PORT": 7,
46
+ "B-SHIPPER": 3,
47
+ "I-BL_NO": 2,
48
+ "I-CARGO": 10,
49
+ "I-CONSIGNEE": 6,
50
+ "I-CONTAINER_NO": 12,
51
+ "I-PORT": 8,
52
+ "I-SHIPPER": 4,
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.106691780085384e-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.4461,
8
+ "test_samples_per_second": 899.66,
9
+ "test_steps_per_second": 28.114,
10
+ "epoch": 3.0
11
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d20b7206e5b50c0e7e34f26c4e5bf76ba7edfe95be8942a307941f6451c3de1
3
+ size 598473628
onnx/model.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41d63f39e71405e120a78bae642a76a0315da93c75ff5817f7173a5a7c630670
3
+ size 152205064
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:439c0e818c7eab8d3462852bf525fe97a706d75d2c43faf3a7d1252e9b33f3e6
3
+ size 2616353
onnx/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebbd4ab00f0277493a2985b5fde2f8c69272af9b322bbabb369f93463a5c37d4
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:be357469c08de99faabd90cb348587c5e8b8bc54ace504376303e9b0ea219ac2
3
+ size 5201