Add model card.
Browse files
README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language: en
|
| 4 |
+
library_name: onnxruntime
|
| 5 |
+
pipeline_tag: text-classification
|
| 6 |
+
tags:
|
| 7 |
+
- roberta
|
| 8 |
+
- spam
|
| 9 |
+
- text-classification
|
| 10 |
+
- onnx
|
| 11 |
+
- distilled
|
| 12 |
+
- quantized
|
| 13 |
+
base_model: mshenoda/roberta-spam
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# ONNX Distilled Spam Classifier
|
| 17 |
+
|
| 18 |
+
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.
|
| 19 |
+
|
| 20 |
+
This model was created by distilling `mshenoda/roberta-spam` for the purpose of efficient on-device and cross-platform deployment.
|
| 21 |
+
|
| 22 |
+
## Model Description
|
| 23 |
+
|
| 24 |
+
* **Model Type:** A distilled RoBERTa-base model.
|
| 25 |
+
* **Task:** Spam classification (binary classification).
|
| 26 |
+
* **Format:** ONNX, with dynamic quantization.
|
| 27 |
+
* **Key Features:** Lightweight, fast, and ideal for CPU-based inference.
|
| 28 |
+
|
| 29 |
+
## Intended Uses & Limitations
|
| 30 |
+
|
| 31 |
+
This model is designed for client-side applications where performance and low resource usage are critical. It's perfect for:
|
| 32 |
+
|
| 33 |
+
* Desktop applications (Windows, Linux, macOS)
|
| 34 |
+
* Mobile applications (with an appropriate ONNX runtime)
|
| 35 |
+
* Edge devices
|
| 36 |
+
|
| 37 |
+
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.
|
| 38 |
+
|
| 39 |
+
## How to Get Started
|
| 40 |
+
|
| 41 |
+
You can use this model directly with the `onnxruntime` and `transformers` libraries.
|
| 42 |
+
|
| 43 |
+
### 1. Installation
|
| 44 |
+
|
| 45 |
+
First, make sure you have the necessary libraries installed. For GPU usage, install `onnxruntime-gpu`; for CPU-only, `onnxruntime` is sufficient.
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
# For CPU
|
| 49 |
+
pip install onnxruntime transformers
|
| 50 |
+
|
| 51 |
+
# OR for NVIDIA GPU
|
| 52 |
+
pip install onnxruntime-gpu transformers
|