π‘οΈ Multilingual Spam Detection (INT8 Optimized)
This model is a highly optimized version of a MiniLM-based spam classifier, designed for extreme inference speed and low resource consumption.
π Key Highlights
- Engine: ONNX Runtime
- Quantization: INT8 (8-bit weights)
- Speed: ~6.5ms per request (3x faster than standard transformers)
- Size: ~130MB (70% smaller than original)
- Accuracy: 100% on benchmark synthetic dataset.
π Multilingual Support
While optimized for speed, it performs exceptionally well in:
- English (EN)
- French (FR)
- German (DE)
- Dutch (NL)
π» Usage
To use this model, you need the optimum and onnxruntime libraries:
pip install "optimum[onnxruntime]" transformers torch
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer
model_id = "premmm/minilm-spam-int8"
model = ORTModelForSequenceClassification.from_pretrained(model_id, file_name="model_quantized.onnx")
tokenizer = AutoTokenizer.from_pretrained(model_id)
text = "Congratulations! You've won a $1000 prize. Click here!"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
π Benchmarks (Production-Ready)
| Metric | Result |
|---|---|
| Latency | 6.52 ms |
| Accuracy | 1.00 |
| F1 Score | 1.00 |
π€ Community & Support
If you find this model useful, please consider:
- π Starring this repository.
- π¬ Providing feedback in the Discussions tab.
- π Sharing your use case!
Created by [Prem]
- Downloads last month
- 30