Token Classification
Transformers
ONNX
Safetensors
modernbert
ner
on-device
privacy
flowx
openner
logistics
de-identification
Instructions to use flowxai/containerdetect with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flowxai/containerdetect with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="flowxai/containerdetect")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("flowxai/containerdetect") model = AutoModelForTokenClassification.from_pretrained("flowxai/containerdetect", 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 +96 -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 |
+
- logistics
|
| 13 |
+
- de-identification
|
| 14 |
+
- token-classification
|
| 15 |
+
metrics:
|
| 16 |
+
- f1
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# ContainerDetect
|
| 20 |
+
|
| 21 |
+
**ContainerDetect** 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 (3):** CONTAINER_NO, SEAL, SIZE_TYPE
|
| 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/containerdetect")
|
| 37 |
+
model = AutoModelForTokenClassification.from_pretrained("flowxai/containerdetect")
|
| 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,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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-CONTAINER_NO",
|
| 25 |
+
"2": "I-CONTAINER_NO",
|
| 26 |
+
"3": "B-SEAL",
|
| 27 |
+
"4": "I-SEAL",
|
| 28 |
+
"5": "B-SIZE_TYPE",
|
| 29 |
+
"6": "I-SIZE_TYPE"
|
| 30 |
+
},
|
| 31 |
+
"initializer_cutoff_factor": 2.0,
|
| 32 |
+
"initializer_range": 0.02,
|
| 33 |
+
"intermediate_size": 1152,
|
| 34 |
+
"label2id": {
|
| 35 |
+
"B-CONTAINER_NO": 1,
|
| 36 |
+
"B-SEAL": 3,
|
| 37 |
+
"B-SIZE_TYPE": 5,
|
| 38 |
+
"I-CONTAINER_NO": 2,
|
| 39 |
+
"I-SEAL": 4,
|
| 40 |
+
"I-SIZE_TYPE": 6,
|
| 41 |
+
"O": 0
|
| 42 |
+
},
|
| 43 |
+
"layer_norm_eps": 1e-05,
|
| 44 |
+
"layer_types": [
|
| 45 |
+
"full_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"sliding_attention",
|
| 50 |
+
"sliding_attention",
|
| 51 |
+
"full_attention",
|
| 52 |
+
"sliding_attention",
|
| 53 |
+
"sliding_attention",
|
| 54 |
+
"full_attention",
|
| 55 |
+
"sliding_attention",
|
| 56 |
+
"sliding_attention",
|
| 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 |
+
],
|
| 68 |
+
"local_attention": 128,
|
| 69 |
+
"max_position_embeddings": 8192,
|
| 70 |
+
"mlp_bias": false,
|
| 71 |
+
"mlp_dropout": 0.0,
|
| 72 |
+
"model_type": "modernbert",
|
| 73 |
+
"norm_bias": false,
|
| 74 |
+
"norm_eps": 1e-05,
|
| 75 |
+
"num_attention_heads": 12,
|
| 76 |
+
"num_hidden_layers": 22,
|
| 77 |
+
"pad_token_id": 50283,
|
| 78 |
+
"position_embedding_type": "absolute",
|
| 79 |
+
"rope_parameters": {
|
| 80 |
+
"full_attention": {
|
| 81 |
+
"rope_theta": 160000.0,
|
| 82 |
+
"rope_type": "default"
|
| 83 |
+
},
|
| 84 |
+
"sliding_attention": {
|
| 85 |
+
"rope_theta": 10000.0,
|
| 86 |
+
"rope_type": "default"
|
| 87 |
+
}
|
| 88 |
+
},
|
| 89 |
+
"sep_token_id": 50282,
|
| 90 |
+
"sparse_pred_ignore_index": -100,
|
| 91 |
+
"sparse_prediction": false,
|
| 92 |
+
"tie_word_embeddings": true,
|
| 93 |
+
"transformers_version": "5.14.1",
|
| 94 |
+
"use_cache": false,
|
| 95 |
+
"vocab_size": 50368
|
| 96 |
+
}
|
metrics.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"test_loss": 2.3796054904323682e-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.319,
|
| 8 |
+
"test_samples_per_second": 926.134,
|
| 9 |
+
"test_steps_per_second": 28.942,
|
| 10 |
+
"epoch": 3.0
|
| 11 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77a675fb3a2167bf71592eeb7086247262bb0c393b5836d08495264904d787ce
|
| 3 |
+
size 598455164
|
onnx/model.int8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:763485e1b34b1e6bfd9f2a9750e1013c4be9f3881af21596cf8e2099e538b0b2
|
| 3 |
+
size 152200432
|
onnx/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:826d96217b174348fdd5ec4489f84d8b99444367ebaee4a48909c28b52d17f40
|
| 3 |
+
size 2616329
|
onnx/model.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b755348e4d0d512a1cc2e45bc7e34a09addf37051cdedf81dac51ac649f285e
|
| 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:63c3c6d8c1923baab542c42160f021e11d03059ac17436e1962317ae6ec79f41
|
| 3 |
+
size 5201
|