|
--- |
|
license: mit |
|
language: en |
|
library_name: onnxruntime |
|
pipeline_tag: text-classification |
|
tags: |
|
- roberta |
|
- spam |
|
- text-classification |
|
- onnx |
|
- distilled |
|
- quantized |
|
base_model: mshenoda/roberta-spam |
|
--- |
|
|
|
# ONNX Distilled Spam Classifier |
|
|
|
This repository contains a distilled and quantized version of a RoBERTa-based spam classification model, optimized for high-performance CPU inference in the ONNX format. |
|
|
|
This model was created by distilling `mshenoda/roberta-spam` for the purpose of efficient on-device and cross-platform deployment. |
|
|
|
## Model Description |
|
|
|
* **Model Type:** A distilled RoBERTa-base model. |
|
* **Task:** Spam classification (binary classification). |
|
* **Format:** ONNX, with dynamic quantization. |
|
* **Key Features:** Lightweight, fast, and ideal for CPU-based inference. |
|
|
|
## Intended Uses & Limitations |
|
|
|
This model is designed for client-side applications where performance and low resource usage are critical. It's perfect for: |
|
|
|
* Desktop applications (Windows, Linux, macOS) |
|
* Mobile applications (with an appropriate ONNX runtime) |
|
* Edge devices |
|
|
|
As a distilled model, there may be a minor trade-off in accuracy compared to the larger `roberta-base` teacher model, in exchange for a significant boost in speed and a smaller memory footprint. |
|
|
|
## How to Get Started |
|
|
|
You can use this model directly with the `onnxruntime` and `transformers` libraries. |
|
|
|
### 1. Installation |
|
|
|
First, make sure you have the necessary libraries installed. For GPU usage, install `onnxruntime-gpu`; for CPU-only, `onnxruntime` is sufficient. |
|
|
|
```bash |
|
# For CPU |
|
pip install onnxruntime transformers |
|
|
|
# OR for NVIDIA GPU |
|
pip install onnxruntime-gpu transformers |