ONNX Model Zoo

StefanStefan/bert-base-NER-onnx

By StefanStefan · ↓ 0 · ♥ 0 · Updated 2025-03-26

What's in this repo

This page lists the files in StefanStefan/bert-base-NER-onnx, including model.onnx.

  • 1 ONNX models (.onnx files)
  • 7 files, including 3 .json, 1 .md, 1 .onnx, 1 .txt
  • Last updated 2025-03-26

ONNX files

File Size Download
model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

# bert-base-NER-onnx

This model is a ONNX-exported version of [dslim/bert-base-NER](https://huggingface.co/dslim/bert-base-NER).

## Model description
BERT-NER model converted to ONNX format

## Usage
This model can be used with ONNX Runtime for inference.

```python
import numpy as np
import onnxruntime as ort
from transformers import AutoTokenizer

# Load tokenizer and ONNX session
tokenizer = AutoTokenizer.from_pretrained("StefanStefan/bert-base-NER-onnx")
session = ort.InferenceSession("StefanStefan/bert-base-NER-onnx/model.onnx")

# Prepare input
text = "Hello, my name is Wolfgang and I live in Berlin"
inputs = tokenizer(text, return_tensors="np")

# Run inference
ort_inputs = {
    'input_ids': inputs['input_ids'].astype(np.int64),
    'attention_mask': inputs['attention_mask'].astype(np.int64),
    'token_type_ids': inputs['token_type_ids'].astype(np.int64)
}

ort_outputs = session.run(None, ort_inputs)
```

Model info

onnx region:us
↓ 0 ♥ 0

Created: 2025-03-26

Updated: 2025-03-26

View on Hugging Face

Files (7)

.gitattributes
README.md
model.onnx ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt

Related models