Downloads · 30 days
14
28% of all-time downloads
Hosstia/bert-tiny-chinese-onnx
bert-tiny-chinese-onnx is a machine learning model from Hosstia. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Model ckiplab/bert-tiny-chinese, converted to ONNX format for use with ONNX Runtime.
Downloads · 30 days
14
28% of all-time downloads
All-time downloads
50
Public
Repo size
57.5 MB
Likes
0
Public
Click a slice to open those files.
.onnx57.5 MB · 100%
From the Hugging Face model README
Model ckiplab/bert-tiny-chinese, converted to ONNX format for use with ONNX Runtime.
| Parameter | Value |
|---|---|
| Architecture | BERT (BertForMaskedLM) |
| Number of layers | 4 |
| Hidden size | 312 |
| Attention heads | 12 |
| Intermediate size | 1248 |
| Vocabulary size | 21128 |
| Max sequence length | 512 |
| Activation function | GELU |
| Language | Traditional Chinese (zh) |
For details: ckiplab/ckip-transformers
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 configurationimport 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)
The original model is distributed under GPL-3.0. This ONNX export is provided under Apache License 2.0.