Upload bert-base-NER ONNX model
Browse filesFiles changed (4)
- README.mdAdded+54
- config.jsonAdded+48
- model.onnxAdded+3
- vocab.txtAdded
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354---library_name: onnxtags: - bert - ner - named-entity-recognition - token-classification - conll2003 - onnx - inference4jlicense: mitpipeline_tag: token-classification---
# BERT Base NER — ONNX
ONNX export of [dslim/bert-base-NER](https://huggingface.co/dslim/bert-base-NER), a BERT model fine-tuned on CoNLL-2003 for Named Entity Recognition. Identifies persons, organizations, locations, and miscellaneous entities in text using IOB2 tagging.
Mirrored for use with [inference4j](https://github.com/inference4j/inference4j), an inference-only AI library for Java.
## Original Source
- **Repository:** [dslim (ONNX by Xenova)](https://huggingface.co/dslim/bert-base-NER)- **License:** mit
## Usage with inference4j
```javatry (BertNerRecognizer ner = BertNerRecognizer.builder() .modelId("inference4j/bert-base-NER") .build()) { List<NamedEntity> entities = ner.recognize("John works at Google in London."); for (NamedEntity e : entities) { System.out.printf("%s (%s)%n", e.text(), e.label()); }}```
## Model Details
| Property | Value ||----------|-------|| Architecture | BERT Base (12 layers, 768 hidden, 110M params) || Task | Named Entity Recognition (IOB2 tagging) || Labels | O, B-PER, I-PER, B-ORG, I-ORG, B-LOC, I-LOC, B-MISC, I-MISC || Training data | CoNLL-2003 || F1 score | 91.3 || Max sequence length | 512 || Tokenizer | WordPiece (cased) || Original framework | PyTorch (HuggingFace Transformers) |
## License
This model is licensed under the [MIT License](https://opensource.org/licenses/MIT). Original model by [dslim](https://huggingface.co/dslim/bert-base-NER), ONNX export by [Xenova](https://huggingface.co/Xenova).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748{ "_name_or_path": "dslim/bert-base-NER", "_num_labels": 9, "architectures": [ "BertForTokenClassification" ], "attention_probs_dropout_prob": 0.1, "classifier_dropout": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "id2label": { "0": "O", "1": "B-MISC", "2": "I-MISC", "3": "B-PER", "4": "I-PER", "5": "B-ORG", "6": "I-ORG", "7": "B-LOC", "8": "I-LOC" }, "initializer_range": 0.02, "intermediate_size": 3072, "label2id": { "B-LOC": 7, "B-MISC": 1, "B-ORG": 5, "B-PER": 3, "I-LOC": 8, "I-MISC": 2, "I-ORG": 6, "I-PER": 4, "O": 0 }, "layer_norm_eps": 1e-12, "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 12, "num_hidden_layers": 12, "output_past": true, "pad_token_id": 0, "position_embedding_type": "absolute", "transformers_version": "4.29.2", "type_vocab_size": 2, "use_cache": true, "vocab_size": 28996}123version https://git-lfs.github.com/spec/v1oid sha256:9784f160524c01c12145872ed76c3361b0f90285b484678ad92b2c30be57b408size 431172606README.mdAdded+54
config.jsonAdded+48
model.onnxAdded+3
vocab.txtAdded