Downloads · 30 days
18
2% of all-time downloads
philschmid/quantized-distilbert-banking77
quantized-distilbert-banking77 is a text classification model from philschmid. Use it when you need a label for a piece of text. It is set up for transformers.
This model is a statically quantized version of optimum/distilbert-base-uncased-finetuned-banking77 on the banking77 dataset.
Downloads · 30 days
18
2% of all-time downloads
All-time downloads
1K
Public
Repo size
141 MB
Likes
0
Public
Click a slice to open those files.
.onnx141 MB · 99%
From the Hugging Face model README
This model is a statically quantized version of optimum/distilbert-base-uncased-finetuned-banking77 on the banking77 dataset.
The model was created using the optimum-static-quantization notebook.
It achieves the following results on the evaluation set:
Accuracy
The quantized model achieves 99.72% accuracy of the fp32 model
Latency
Payload sequence length: 128
Instance type: AWS c6i.xlarge
| latency | vanilla transformers | quantized optimum model | improvement |
|---|---|---|---|
| p95 | 75.69ms | 26.75ms | 2.83x |
| avg | 57.52ms | 24.86ms | 2.31x |
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import pipeline, AutoTokenizer
model = ORTModelForSequenceClassification.from_pretrained("philschmid/quantized-distilbert-banking77")
tokenizer = AutoTokenizer.from_pretrained("philschmid/quantized-distilbert-banking77")
remote_clx = pipeline("text-classification",model=model, tokenizer=tokenizer)
remote_clx("What is the exchange rate like on this app?")