Token Classification
Transformers
ONNX
Safetensors
modernbert
ner
on-device
privacy
flowx
openner
insurance
de-identification
Instructions to use flowxai/codemap with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flowxai/codemap with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="flowxai/codemap")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("flowxai/codemap") model = AutoModelForTokenClassification.from_pretrained("flowxai/codemap", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add OpenNER model, card, NOTICE (Apache-2.0, FlowX.AI)
Browse filesFiles changed (12)
- .gitattributes+1
- NOTICEAdded+8
- README.mdAdded+43
- config.jsonAdded+104
- metrics.jsonAdded+11
- model.safetensorsAdded+3
- onnx/model.int8.onnxAdded+3
- onnx/model.onnxAdded+3
- onnx/model.onnx.dataAdded+3
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+17
- training_args.binAdded+3
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textonnx/model.onnx.data filter=lfs diff=lfs merge=lfs -text
12345678FlowX OpenNERCopyright 2026 FlowX.AI
This product includes software and models developed at FlowX.AI (https://flowx.ai).Licensed under the Apache License, Version 2.0 (the "License"); you may not use thesefiles except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.012345678910111213141516171819202122232425262728293031323334353637383940414243---license: apache-2.0library_name: transformerspipeline_tag: token-classificationbase_model: answerdotai/ModernBERT-basetags: - ner - on-device - privacy - flowx - openner - insurance - de-identification - token-classificationmetrics: - f1---
# CodeMap
**CodeMap** 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.
## What it does- **Task:** token-classification- **Base model:** `answerdotai/ModernBERT-base`- **Entity types (5):** CAT, CPT, ICD, NAIC, NCCI- **Held-out F1:** 1.0000- **Runtime:** CPU, Apple Silicon, one GPU, or browser/edge via ONNX (INT8). ~100-160 ms/doc on CPU.
## Why a small modelFine-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.
## Usage```pythonfrom transformers import AutoTokenizer, AutoModelForTokenClassificationtok = AutoTokenizer.from_pretrained("flowxai/codemap")model = AutoModelForTokenClassification.from_pretrained("flowxai/codemap")```
## License & attributionLicensed under the **Apache License 2.0**. Copyright 2026 **FlowX.AI** (https://flowx.ai). See the `NOTICE` file. Trained on synthetic, checksum-validated data.
_Part of the FlowX OpenNER model family. Synthetic-data F1 reflects an in-distribution synthetic distribution; validate on real documents before production use._123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104{ "architectures": [ "ModernBertForTokenClassification" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 50281, "classifier_activation": "gelu", "classifier_bias": false, "classifier_dropout": 0.0, "classifier_pooling": "mean", "cls_token_id": 50281, "decoder_bias": true, "deterministic_flash_attn": false, "dtype": "float32", "embedding_dropout": 0.0, "eos_token_id": 50282, "global_attn_every_n_layers": 3, "gradient_checkpointing": false, "hidden_activation": "gelu", "hidden_size": 768, "id2label": { "0": "O", "1": "B-NAIC", "2": "I-NAIC", "3": "B-ICD", "4": "I-ICD", "5": "B-CPT", "6": "I-CPT", "7": "B-NCCI", "8": "I-NCCI", "9": "B-CAT", "10": "I-CAT" }, "initializer_cutoff_factor": 2.0, "initializer_range": 0.02, "intermediate_size": 1152, "label2id": { "B-CAT": 9, "B-CPT": 5, "B-ICD": 3, "B-NAIC": 1, "B-NCCI": 7, "I-CAT": 10, "I-CPT": 6, "I-ICD": 4, "I-NAIC": 2, "I-NCCI": 8, "O": 0 }, "layer_norm_eps": 1e-05, "layer_types": [ "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention" ], "local_attention": 128, "max_position_embeddings": 8192, "mlp_bias": false, "mlp_dropout": 0.0, "model_type": "modernbert", "norm_bias": false, "norm_eps": 1e-05, "num_attention_heads": 12, "num_hidden_layers": 22, "pad_token_id": 50283, "position_embedding_type": "absolute", "rope_parameters": { "full_attention": { "rope_theta": 160000.0, "rope_type": "default" }, "sliding_attention": { "rope_theta": 10000.0, "rope_type": "default" } }, "sep_token_id": 50282, "sparse_pred_ignore_index": -100, "sparse_prediction": false, "tie_word_embeddings": true, "transformers_version": "5.14.1", "use_cache": false, "vocab_size": 50368}1234567891011{ "test_loss": 2.8653639105868933e-07, "test_precision": 1.0, "test_recall": 1.0, "test_f1": 1.0, "test_accuracy": 1.0, "test_runtime": 4.622, "test_samples_per_second": 865.43, "test_steps_per_second": 27.045, "epoch": 3.0}123version https://git-lfs.github.com/spec/v1oid sha256:46fb509a83d8ee07b7222f1ff51062f1bb95af25a2ab0be80d0ca3266a252d21size 598467476123version https://git-lfs.github.com/spec/v1oid sha256:792386b0beb8a2f10f222041c6ed9342140c3e365efb460672076785c279aea3size 152203520123version https://git-lfs.github.com/spec/v1oid sha256:104f808057c94cbf84c15e91fee0d88117630321beb09bcd3ed24e5070b29ff1size 2616345123version https://git-lfs.github.com/spec/v1oid sha256:06e80a219b04535ce6ac2d80a13f5606c26b6ad3f0ba85842f9352411df74e7bsize 5984747521234567891011121314151617{ "backend": "tokenizers", "clean_up_tokenization_spaces": true, "cls_token": "[CLS]", "is_local": false, "local_files_only": false, "mask_token": "[MASK]", "model_input_names": [ "input_ids", "attention_mask" ], "model_max_length": 8192, "pad_token": "[PAD]", "sep_token": "[SEP]", "tokenizer_class": "TokenizersBackend", "unk_token": "[UNK]"}123version https://git-lfs.github.com/spec/v1oid sha256:b70da71902ad58cb7b1f843e9f1ce144bf6d4598df319c3ed85213299f6b38fbsize 5201.gitattributes+1
NOTICEAdded+8
README.mdAdded+43
config.jsonAdded+104
metrics.jsonAdded+11
model.safetensorsAdded+3
onnx/model.int8.onnxAdded+3
onnx/model.onnxAdded+3
onnx/model.onnx.dataAdded+3
tokenizer.jsonAdded
tokenizer_config.jsonAdded+17
training_args.binAdded+3