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/Barist.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Barist.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Barist.5")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Barist.5") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Barist.5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,410 Bytes
c4c14ea | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | {
"checkpoint": "checkpoints_b5c/best.pt",
"device": "cuda",
"results": {
"toxigen_test": {
"n": 940,
"unsafe": 402,
"at_0.5": {
"threshold": 0.5,
"accuracy": 0.6053191489361702,
"precision": 0.5359628770301624,
"recall": 0.5746268656716418,
"f1": 0.5546218487394959,
"tp": 231,
"fp": 200,
"tn": 338,
"fn": 171,
"total": 940
},
"best": {
"threshold": 0.2,
"accuracy": 0.5106382978723404,
"precision": 0.4643734643734644,
"recall": 0.9402985074626866,
"f1": 0.6217105263157895,
"tp": 378,
"fp": 436,
"tn": 102,
"fn": 24,
"total": 940
}
},
"hatexplain_test": {
"n": 1924,
"unsafe": 1376,
"at_0.5": {
"threshold": 0.5,
"accuracy": 0.5940748440748441,
"precision": 0.6966292134831461,
"recall": 0.7659883720930233,
"f1": 0.7296642436829353,
"tp": 1054,
"fp": 459,
"tn": 89,
"fn": 322,
"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
}
}
}
} |