bert-base-NER / README.md
vccarvalho11's picture
Upload bert-base-NER ONNX model
f598b89 verified
---
library_name: onnx
tags:
- bert
- ner
- named-entity-recognition
- token-classification
- conll2003
- onnx
- inference4j
license: mit
pipeline_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
```java
try (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).