File size: 1,849 Bytes
1496de7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | ---
library_name: onnx
tags:
- distilbert
- ner
- named-entity-recognition
- token-classification
- conll2003
- onnx
- inference4j
license: apache-2.0
pipeline_tag: token-classification
---
# DistilBERT NER — ONNX
ONNX export of [dslim/distilbert-NER](https://huggingface.co/dslim/distilbert-NER), a DistilBERT 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 onnx-community)](https://huggingface.co/dslim/distilbert-NER)
- **License:** apache-2.0
## Usage with inference4j
```java
try (BertNerRecognizer ner = BertNerRecognizer.builder()
.modelId("inference4j/distilbert-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());
}
// John (PER)
// Google (ORG)
// London (LOC)
}
```
## Model Details
| Property | Value |
|----------|-------|
| Architecture | DistilBERT (6 layers, 768 hidden, 66M 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 | 92.17 |
| Max sequence length | 512 |
| Tokenizer | WordPiece (cased) |
| Original framework | PyTorch (HuggingFace Transformers) |
## License
This model is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). Original model by [dslim](https://huggingface.co/dslim/distilbert-NER), ONNX export by [onnx-community](https://huggingface.co/onnx-community).
|