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.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Barist.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Barist.2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Barist.2") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Barist.2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 2,472 Bytes
eb9cdb1 | 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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | {
"checkpoint": "checkpoints_b2x/best.pt",
"split": "test",
"at_0.5": {
"threshold": 0.5,
"accuracy": 0.8580665024630542,
"precision": 0.8603148970528866,
"recall": 0.7872183228666421,
"f1": 0.8221450617283952,
"tp": 2131,
"fp": 346,
"tn": 3443,
"fn": 576,
"total": 6496
},
"best": {
"threshold": 0.39,
"accuracy": 0.8585283251231527,
"precision": 0.8143459915611815,
"recall": 0.8555596601403768,
"f1": 0.8344442442803098,
"tp": 2316,
"fp": 528,
"tn": 3261,
"fn": 391,
"total": 6496
},
"per_source": {
"civil_comments": {
"threshold": 0.5,
"accuracy": 0.841148673209742,
"precision": 0.8142681426814268,
"recall": 0.6983122362869199,
"f1": 0.7518455423055083,
"tp": 662,
"fp": 151,
"tn": 1652,
"fn": 286,
"total": 2751
},
"jigsaw": {
"threshold": 0.5,
"accuracy": 0.899885801294252,
"precision": 0.8796400449943758,
"recall": 0.8336886993603412,
"f1": 0.856048166392994,
"tp": 782,
"fp": 107,
"tn": 1582,
"fn": 156,
"total": 2627
},
"aegis": {
"threshold": 0.5,
"accuracy": 0.8256880733944955,
"precision": 0.9389140271493213,
"recall": 0.8592132505175983,
"f1": 0.8972972972972972,
"tp": 415,
"fp": 27,
"tn": 35,
"fn": 68,
"total": 545
},
"beavertails": {
"threshold": 0.5,
"accuracy": 0.7834224598930482,
"precision": 0.8811881188118812,
"recall": 0.8557692307692307,
"f1": 0.8682926829268293,
"tp": 267,
"fp": 36,
"tn": 26,
"fn": 45,
"total": 374
},
"dolly": {
"threshold": 0.5,
"accuracy": 0.8857142857142857,
"precision": 0.0,
"recall": 0.0,
"f1": 0.0,
"tp": 0,
"fp": 16,
"tn": 124,
"fn": 0,
"total": 140
},
"toxic_chat": {
"threshold": 0.5,
"accuracy": 0.4915254237288136,
"precision": 0.35714285714285715,
"recall": 0.19230769230769232,
"f1": 0.25,
"tp": 5,
"fp": 9,
"tn": 24,
"fn": 21,
"total": 59
}
},
"model_metrics": {
"loss": 0.34322415865384615,
"accuracy": 0.858466211085801,
"precision": 0.8503480278422274,
"recall": 0.8013848396501457,
"f1": 0.8251407129455911,
"tp": 2199,
"fp": 387,
"tn": 3454,
"fn": 545
}
} |