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.8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Censer.8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Censer.8")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Censer.8") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Censer.8", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download reports/external_h2h.json from KucLab/Censer.8: direct link, hf CLI and curl.
- Browser
- Download file 4.43 kB
-
https://huggingface.co/KucLab/Censer.8/resolve/main/reports/external_h2h.json
- Command line
-
hf download hf://KucLab/Censer.8/reports/external_h2h.json
-
curl -L -o external_h2h.json https://huggingface.co/KucLab/Censer.8/resolve/main/reports/external_h2h.json
4.43 kB
| { | |
| "checkpoint": "checkpoints8f/epoch2.pt", | |
| "device": "cuda", | |
| "results": { | |
| "toxigen": { | |
| "n": 940, | |
| "unsafe": 402, | |
| "censer7": { | |
| "at_0.5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.6170212765957447, | |
| "precision": 0.5522388059701493, | |
| "recall": 0.5522388059701493, | |
| "f1": 0.5522388059701493, | |
| "tp": 222, | |
| "fp": 180, | |
| "tn": 358, | |
| "fn": 180, | |
| "total": 940 | |
| }, | |
| "best": { | |
| "threshold": 0.17, | |
| "accuracy": 0.5255319148936171, | |
| "precision": 0.4713541666666667, | |
| "recall": 0.900497512437811, | |
| "f1": 0.6188034188034187, | |
| "tp": 362, | |
| "fp": 406, | |
| "tn": 132, | |
| "fn": 40, | |
| "total": 940 | |
| } | |
| }, | |
| "unitary/unbiased-toxic-roberta": { | |
| "at_0.5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.526595744680851, | |
| "precision": 0.44584382871536526, | |
| "recall": 0.44029850746268656, | |
| "f1": 0.4430538172715895, | |
| "tp": 177, | |
| "fp": 220, | |
| "tn": 318, | |
| "fn": 225, | |
| "total": 940 | |
| }, | |
| "best": { | |
| "threshold": 0.05, | |
| "accuracy": 0.44574468085106383, | |
| "precision": 0.40165289256198344, | |
| "recall": 0.6044776119402985, | |
| "f1": 0.48262164846077454, | |
| "tp": 243, | |
| "fp": 362, | |
| "tn": 176, | |
| "fn": 159, | |
| "total": 940 | |
| }, | |
| "latency_ms": 8.932797452236743 | |
| }, | |
| "unitary/toxic-bert": { | |
| "at_0.5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.4276595744680851, | |
| "precision": 0.4276595744680851, | |
| "recall": 1.0, | |
| "f1": 0.5991058122205664, | |
| "tp": 402, | |
| "fp": 538, | |
| "tn": 0, | |
| "fn": 0, | |
| "total": 940 | |
| }, | |
| "best": { | |
| "threshold": 0.5, | |
| "accuracy": 0.4276595744680851, | |
| "precision": 0.4276595744680851, | |
| "recall": 1.0, | |
| "f1": 0.5991058122205664, | |
| "tp": 402, | |
| "fp": 538, | |
| "tn": 0, | |
| "fn": 0, | |
| "total": 940 | |
| }, | |
| "latency_ms": 8.897622849078887 | |
| } | |
| }, | |
| "hatexplain_test": { | |
| "n": 1924, | |
| "unsafe": 1376, | |
| "censer7": { | |
| "at_0.5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.5956340956340956, | |
| "precision": 0.6988031914893617, | |
| "recall": 0.7638081395348837, | |
| "f1": 0.7298611111111111, | |
| "tp": 1051, | |
| "fp": 453, | |
| "tn": 95, | |
| "fn": 325, | |
| "total": 1924 | |
| }, | |
| "best": { | |
| "threshold": 0.05, | |
| "accuracy": 0.7151767151767152, | |
| "precision": 0.7151767151767152, | |
| "recall": 1.0, | |
| "f1": 0.833939393939394, | |
| "tp": 1376, | |
| "fp": 548, | |
| "tn": 0, | |
| "fn": 0, | |
| "total": 1924 | |
| } | |
| }, | |
| "unitary/unbiased-toxic-roberta": { | |
| "at_0.5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.4734927234927235, | |
| "precision": 0.6784660766961652, | |
| "recall": 0.501453488372093, | |
| "f1": 0.5766819891349769, | |
| "tp": 690, | |
| "fp": 327, | |
| "tn": 221, | |
| "fn": 686, | |
| "total": 1924 | |
| }, | |
| "best": { | |
| "threshold": 0.05, | |
| "accuracy": 0.5623700623700624, | |
| "precision": 0.6998502994011976, | |
| "recall": 0.6795058139534884, | |
| "f1": 0.68952802359882, | |
| "tp": 935, | |
| "fp": 401, | |
| "tn": 147, | |
| "fn": 441, | |
| "total": 1924 | |
| }, | |
| "latency_ms": 7.521902820920251 | |
| }, | |
| "unitary/toxic-bert": { | |
| "at_0.5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.7151767151767152, | |
| "precision": 0.7151767151767152, | |
| "recall": 1.0, | |
| "f1": 0.833939393939394, | |
| "tp": 1376, | |
| "fp": 548, | |
| "tn": 0, | |
| "fn": 0, | |
| "total": 1924 | |
| }, | |
| "best": { | |
| "threshold": 0.5, | |
| "accuracy": 0.7151767151767152, | |
| "precision": 0.7151767151767152, | |
| "recall": 1.0, | |
| "f1": 0.833939393939394, | |
| "tp": 1376, | |
| "fp": 548, | |
| "tn": 0, | |
| "fn": 0, | |
| "total": 1924 | |
| }, | |
| "latency_ms": 7.333174316897957 | |
| } | |
| } | |
| } | |
| } |