Publish toxicity model and artifacts
Browse files- README.md +15 -8
- model_card.json +7 -7
- onnx/fp16/model.onnx +1 -1
- onnx/fp16/model.onnx_data +1 -1
- onnx/fp32/model.onnx +1 -1
- onnx/fp32/model.onnx_data +1 -1
- onnx/int8/model_quantized.onnx +2 -2
- threshold.json +5 -4
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.
|
| 44 |
-
| accuracy | 0.
|
| 45 |
-
| precision | 0.
|
| 46 |
-
| recall | 0.
|
| 47 |
-
| f1 | 0.
|
| 48 |
|
| 49 |
|
| 50 |
-
Optimized threshold: **0.
|
| 51 |
|
| 52 |
## Usage (ONNX)
|
| 53 |
|
|
@@ -73,9 +79,10 @@ outputs = model(**inputs)
|
|
| 73 |
|
| 74 |
- Epochs: 5
|
| 75 |
- Learning rate: 2e-05
|
| 76 |
-
- Batch size:
|
| 77 |
- Class weights: [1.0, 1.0]
|
| 78 |
-
- Dataset: multilingual (11 languages), 12+ sources +
|
|
|
|
| 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": "
|
| 4 |
"task_type": "sequence_classification",
|
| 5 |
"base_model": "xlm-roberta-large",
|
| 6 |
"metrics": {
|
| 7 |
-
"loss": 0.
|
| 8 |
-
"accuracy": 0.
|
| 9 |
-
"precision": 0.
|
| 10 |
-
"recall": 0.
|
| 11 |
-
"f1": 0.
|
| 12 |
},
|
| 13 |
"dataset_hash": "",
|
| 14 |
-
"created_at": "2026-07-
|
| 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:
|
| 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:
|
| 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:
|
| 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:
|
| 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:
|
| 3 |
-
size
|
|
|
|
| 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.
|
| 3 |
-
"
|
| 4 |
-
"
|
| 5 |
-
"
|
|
|
|
| 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 |
}
|