Hosstia/bert-tiny-chinese-onnx
015
bert-tiny-chinese-onnx
Model [ckiplab/bert-tiny-chinese](https://huggingface.co/ckiplab/bert-tiny-chinese), converted to ONNX format for use with ONNX Runtime.
Original model
For details: ckiplab/ckip-transformers
ONNX format
Export was performed using torch.onnx.export with dynamic axes for batch and sequence length.
Files:
model.onnx– full model (encoder + pooler)config.json– model configuration
Usage
import onnxruntime as ort
import numpy as np
session = ort.InferenceSession("model.onnx")
inputs = {
"input_ids": np.array([[101, ... , 102]], dtype=np.int64),
"attention_mask": np.array([[1, ..., 1]], dtype=np.int64),
"token_type_ids": np.array([[0, ..., 0]], dtype=np.int64),
}
outputs = session.run(None, inputs)License
The original model is distributed under GPL-3.0. This ONNX export is provided under Apache License 2.0.
