legacy-datasets/banking77
Viewer โข Updated โข 13.1k โข 6.32k โข 52
Run lewtun/quantized-distilbert-banking77 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/lewtun/quantized-distilbert-banking77. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/lewtun/quantized-distilbert-banking77 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use lewtun/quantized-distilbert-banking77 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="lewtun/quantized-distilbert-banking77") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained("lewtun/quantized-distilbert-banking77", device_map="auto")This model is a dynamically quantized version of optimum/distilbert-base-uncased-finetuned-banking77 on the banking77 dataset.
The model was created using the dynamic-quantization notebook from a workshop presented at MLOps World 2022.
It achieves the following results on the evaluation set:
Accuracy
The quantized model achieves 99.93% accuracy of the FP32 model
Latency
Payload sequence length: 128
Instance type: AWS c6i.xlarge
| latency | vanilla transformers | quantized optimum model | improvement |
|---|---|---|---|
| p95 | 63.24ms | 37.06ms | 1.71x |
| avg | 62.87ms | 37.93ms | 1.66x |
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import pipeline, AutoTokenizer
model = ORTModelForSequenceClassification.from_pretrained("lewtun/quantized-distilbert-banking77")
tokenizer = AutoTokenizer.from_pretrained("lewtun/quantized-distilbert-banking77")
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
classifier("What is the exchange rate like on this app?")