Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
๐ฉ DistilBERT Quantized Model for SMS Spam Detection
This repository contains a production-ready
quantized DistilBERT
model fine-tuned for
SMS spam classification
, achieving
99.94% accuracy
while optimizing inference speed using ONNX Runtime.
Fine-tuning Framework:
Hugging Face Transformers + Optimum
๐ Quick Start
๐งฐ Installation
pip install -r requirements.txt
โ Basic Usage
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="./spam_model_quantized",
tokenizer="./spam_model"
)
sample = "WINNER!! Claim your $1000 prize now!"
result = classifier(sample)
print(f"Prediction: {result[0]['label']} (confidence: {result[0]['score']:.2%})")
๐ Performance Metrics
Metric
Value
Accuracy
99.94%
F1 Score
0.9977
Precision
100%
Recall
99.55%
Inference*
2.7ms
* Tested on AWS
t3.xlarge
(4 vCPUs)
๐ Advanced Usage
๐ Load Quantized Model Directly
from optimum.onnxruntime import ORTModelForSequenceClassification
model = ORTModelForSequenceClassification.from_pretrained(
"./spam_model_quantized",
provider="CPUExecutionProvider"
)
May require
retraining
for regional language or localized spam patterns
Quantized model requires
x86 CPUs with AVX2
support
๐ Contributions
Pull requests and suggestions are welcome! Please open an issue for feature requests or bug reports.
Runs of AventIQ-AI distilBERT_spam_detection on huggingface.co
11
Total runs
0
24-hour runs
0
3-day runs
3
7-day runs
8
30-day runs
More Information About distilBERT_spam_detection huggingface.co Model
distilBERT_spam_detection huggingface.co
distilBERT_spam_detection huggingface.co is an AI model on huggingface.co that provides distilBERT_spam_detection's model effect (), which can be used instantly with this AventIQ-AI distilBERT_spam_detection model. huggingface.co supports a free trial of the distilBERT_spam_detection model, and also provides paid use of the distilBERT_spam_detection. Support call distilBERT_spam_detection model through api, including Node.js, Python, http.
distilBERT_spam_detection huggingface.co is an online trial and call api platform, which integrates distilBERT_spam_detection's modeling effects, including api services, and provides a free online trial of distilBERT_spam_detection, you can try distilBERT_spam_detection online for free by clicking the link below.
AventIQ-AI distilBERT_spam_detection online free url in huggingface.co:
distilBERT_spam_detection is an open source model from GitHub that offers a free installation service, and any user can find distilBERT_spam_detection on GitHub to install. At the same time, huggingface.co provides the effect of distilBERT_spam_detection install, users can directly use distilBERT_spam_detection installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
distilBERT_spam_detection install url in huggingface.co: