Text Classification
Transformers
ONNX
Safetensors
llama
safety
content-moderation
multi-label
multilingual
tiny-language-model
from-scratch
distilled
text-embeddings-inference
Instructions to use KucLab/Censer.9 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Censer.9 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Censer.9")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Censer.9") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Censer.9", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add report adversarial.md
Browse files- reports/adversarial.md +12 -0
reports/adversarial.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Adversarial robustness (unsafe items under text attacks)
|
| 2 |
+
|
| 3 |
+
n=160 unsafe items, threshold 0.5, detection rate = fraction still flagged unsafe.
|
| 4 |
+
|
| 5 |
+
| Attack | Detection rate | Mean unsafe prob |
|
| 6 |
+
| --- | --- | --- |
|
| 7 |
+
| clean | 99.4% | 0.917 |
|
| 8 |
+
| typo | 94.4% | 0.858 |
|
| 9 |
+
| leet | 97.5% | 0.906 |
|
| 10 |
+
| homoglyph | 100.0% | 0.947 |
|
| 11 |
+
| zero_width | 100.0% | 0.939 |
|
| 12 |
+
| case | 95.6% | 0.833 |
|