Text Classification
Transformers
Safetensors
English
llama
safety
content-moderation
tiny-language-model
from-scratch
text-embeddings-inference
Instructions to use KucLab/Censer.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Censer.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Censer.1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Censer.1") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Censer.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Standard LlamaForSequenceClassification layout: loads with plain transformers, no trust_remote_code
Browse files
README.md
CHANGED
|
@@ -177,6 +177,28 @@ Measured on an AMD Radeon RX 9060 XT (ROCm 7.1, torch 2.13.0):
|
|
| 177 |
|
| 178 |
Training the whole model from scratch takes about 3.5 minutes on the same GPU.
|
| 179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
## Usage
|
| 181 |
|
| 182 |
Plain `transformers`, nothing else to install — `from_pretrained` downloads
|
|
|
|
| 177 |
|
| 178 |
Training the whole model from scratch takes about 3.5 minutes on the same GPU.
|
| 179 |
|
| 180 |
+
## Comparison with other models
|
| 181 |
+
|
| 182 |
+
Benchmarked against public safety classifiers on the **same held-out test split**
|
| 183 |
+
(6,496 rows, threshold 0.5, AMD Radeon RX 9060 XT):
|
| 184 |
+
|
| 185 |
+
| Model | Params | Checkpoint | F1 | Latency | Throughput (b=32) | Peak VRAM |
|
| 186 |
+
| --- | --- | --- | --- | --- | --- | --- |
|
| 187 |
+
| **Censer.1 (ours)** | 1.1M | 4.3 MB | **0.835** | 2.17 ms | 1,454 texts/s | 102 MB |
|
| 188 |
+
| unitary/unbiased-toxic-roberta | 124.7M | 498.7 MB | 0.741 | 15.54 ms | 62 texts/s | 928 MB |
|
| 189 |
+
| unitary/toxic-bert | 109.5M | 876.0 MB | 0.682 | 14.85 ms | 65 texts/s | 853 MB |
|
| 190 |
+
| martin-ha/toxic-comment-model | 67.0M | 267.9 MB | 0.567 | 7.98 ms | 124 texts/s | 691 MB |
|
| 191 |
+
| Hate-speech-CNERG/bert-base-uncased-hatexplain | 109.5M | 438.0 MB | 0.545 | 15.04 ms | 66 texts/s | 722 MB |
|
| 192 |
+
| Hate-speech-CNERG/dehatebert-mono-english | 167.4M | 669.5 MB | 0.253 | 15.36 ms | 64 texts/s | 960 MB |
|
| 193 |
+
| keyword baseline | — | — | 0.094 | 0.03 ms | 29,689 texts/s | — |
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+

|
| 197 |
+

|
| 198 |
+
|
| 199 |
+
Censer.1 is ~60-150x smaller than the encoder baselines, 3-7x faster per text and
|
| 200 |
+
uses ~7-9x less VRAM — with the highest F1 on this split.
|
| 201 |
+
|
| 202 |
## Usage
|
| 203 |
|
| 204 |
Plain `transformers`, nothing else to install — `from_pretrained` downloads
|