maurodore commited on
Commit
0b23420
·
verified ·
1 Parent(s): 3e81138

Publish toxicity model and artifacts

Browse files
README.md CHANGED
@@ -31,23 +31,29 @@ by [HikmaAI](https://huggingface.co/HikmaAI).
31
  ## Model Description
32
 
33
  - **Task**: Binary classification (benign=0, toxic=1)
 
34
  - **Base model**: `xlm-roberta-large`
35
  - **Languages**: 11 (en, vi, hi, th, zh, ja, ru, ar, sv, es, it)
36
  - **Export formats**: ONNX FP32 + FP16 + INT8 (x86-safe dynamic)
37
 
 
 
 
 
 
38
  ## Performance
39
 
40
 
41
  | Metric | Score |
42
  |--------|-------|
43
- | loss | 0.3252 |
44
- | accuracy | 0.9415 |
45
- | precision | 0.9133 |
46
- | recall | 0.9234 |
47
- | f1 | 0.9183 |
48
 
49
 
50
- Optimized threshold: **0.5000**
51
 
52
  ## Usage (ONNX)
53
 
@@ -73,9 +79,10 @@ outputs = model(**inputs)
73
 
74
  - Epochs: 5
75
  - Learning rate: 2e-05
76
- - Batch size: 8
77
  - Class weights: [1.0, 1.0]
78
- - Dataset: multilingual (11 languages), 12+ sources + synthetic data
 
79
 
80
  ## License
81
 
 
31
  ## Model Description
32
 
33
  - **Task**: Binary classification (benign=0, toxic=1)
34
+ - **Version**: 3.0.0
35
  - **Base model**: `xlm-roberta-large`
36
  - **Languages**: 11 (en, vi, hi, th, zh, ja, ru, ar, sv, es, it)
37
  - **Export formats**: ONNX FP32 + FP16 + INT8 (x86-safe dynamic)
38
 
39
+ Beyond declarative toxicity (slurs, hate speech, threats *in the words*), the
40
+ classifier is trained to flag politely-phrased harmful **requests**: harm
41
+ solicitation, doxxing/privacy requests, solicited discrimination, atrocity
42
+ denial, and illicit-capability questions.
43
+
44
  ## Performance
45
 
46
 
47
  | Metric | Score |
48
  |--------|-------|
49
+ | loss | 0.1001 |
50
+ | accuracy | 0.9834 |
51
+ | precision | 0.9507 |
52
+ | recall | 0.8914 |
53
+ | f1 | 0.9201 |
54
 
55
 
56
+ Optimized threshold: **0.6600** (val recall: 0.8854)
57
 
58
  ## Usage (ONNX)
59
 
 
79
 
80
  - Epochs: 5
81
  - Learning rate: 2e-05
82
+ - Batch size: 32
83
  - Class weights: [1.0, 1.0]
84
+ - Dataset: multilingual (11 languages), ~90/10 benign/toxic, 12+ sources +
85
+ targeted synthetic data (request-style harm cells in all 11 languages)
86
 
87
  ## License
88
 
model_card.json CHANGED
@@ -1,17 +1,17 @@
1
  {
2
  "classifier_name": "toxicity",
3
- "version": "2.0.0",
4
  "task_type": "sequence_classification",
5
  "base_model": "xlm-roberta-large",
6
  "metrics": {
7
- "loss": 0.325167179107666,
8
- "accuracy": 0.9415098374679213,
9
- "precision": 0.9133016627078385,
10
- "recall": 0.9234464124887422,
11
- "f1": 0.9183460217942977
12
  },
13
  "dataset_hash": "",
14
- "created_at": "2026-07-23T11:06:52.180593Z",
15
  "export_format": "onnx",
16
  "quantization": "fp16+int8"
17
  }
 
1
  {
2
  "classifier_name": "toxicity",
3
+ "version": "3.0.0",
4
  "task_type": "sequence_classification",
5
  "base_model": "xlm-roberta-large",
6
  "metrics": {
7
+ "loss": 0.10005442798137665,
8
+ "accuracy": 0.9834395959261406,
9
+ "precision": 0.9507429829389102,
10
+ "recall": 0.8913828689370485,
11
+ "f1": 0.9201065246338216
12
  },
13
  "dataset_hash": "",
14
+ "created_at": "2026-07-28T08:45:42.899160Z",
15
  "export_format": "onnx",
16
  "quantization": "fp16+int8"
17
  }
onnx/fp16/model.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4b15b3eac7c859f1559d23a12a82ddef60759d9d4a96dbf450929a50125b9fc0
3
  size 492775
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4ae1390fc655d08396be5bce51243c7677cccdde86c8bc1264f11d2090733a9
3
  size 492775
onnx/fp16/model.onnx_data CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:81b80b32a9357ce623f13b6e2917d2c2a89e68762e889a85e951df01e14cdd72
3
  size 1119784960
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b798d973d2d6dbab396980ebdfa268eb6d37726e7d378b4d18e7c719318ed407
3
  size 1119784960
onnx/fp32/model.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:18e97156bb4bf4343f454ba6116999c6c3d840ae26894090e04cd906f9bfa960
3
  size 489246
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ff5a98a0d0fecd92272433f9bd8b7746aae77b5bb60973426cbf1f282439883
3
  size 489246
onnx/fp32/model.onnx_data CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:be934f74c8dbfeb3a8fd62c19590cc0203bdaacd1df925a1628b7106ae1a3ac3
3
  size 2239574032
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff30e88059c46c124df879265eec373a2cc63ba8807a8c50444c5072e18be7c2
3
  size 2239574032
onnx/int8/model_quantized.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:aa9ea6c4b572ee919d975b03f8fd09bf9ee887adece704217920cc2a56f40a12
3
- size 562892984
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b66e23667b483e8dc9f200586583753297ad65332d1fc3460bae91da6816dae6
3
+ size 562892985
threshold.json CHANGED
@@ -1,6 +1,7 @@
1
  {
2
- "threshold": 0.5,
3
- "objective": "production-robust (bimodal model; F1 flat 0.045-0.9, 0.5 = max margin, gateway-aligned)",
4
- "val_f1": 0.9128,
5
- "note": "max-F1 sweep lands at 0.045 but that is the low edge of a narrow plateau; 0.5 chosen for drift robustness"
 
6
  }
 
1
  {
2
+ "threshold": 0.66,
3
+ "val_recall": 0.8853743470690656,
4
+ "val_precision": 0.9442896935933147,
5
+ "val_f1": 0.9138834806050622,
6
+ "val_accuracy": 0.9837501766285149
7
  }