ALBERT-tiny Chinese NER (ONNX INT8)
INT8 quantized ONNX export of ckiplab/albert-tiny-chinese-ner for token-classification (NER) tasks.
Files
model_int8.onnxβ INT8 quantized ONNX modelvocab.txtβ WordPiece vocabularylabels.txtβ NER label set (line N = label ID N)
Usage
import onnxruntime as ort
import numpy as np
session = ort.InferenceSession("model_int8.onnx")
inputs = {
"input_ids": np.array([[...]], dtype=np.int64),
"attention_mask": np.array([[...]], dtype=np.int64),
"token_type_ids": np.array([[...]], dtype=np.int64),
}
logits = session.run(None, inputs)[0] # (batch, seq_len, num_labels)