File size: 1,745 Bytes
f0df930 e2b915e f0df930 e2b915e f0df930 e2b915e f0df930 e2b915e f0df930 e2b915e f0df930 e2b915e | 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 | ---
license: openrail++
base_model: textdetox/bert-multilingual-toxicity-classifier
pipeline_tag: text-classification
tags:
- toxic
- onnx
- int8
language: [en, de, fr, es, it, ru, uk]
---
# Ordicio toxicity classifier (ONNX, int8)
Students of
[textdetox/bert-multilingual-toxicity-classifier](https://huggingface.co/textdetox/bert-multilingual-toxicity-classifier)
for on-device inference in the Ordicio apps (ONNX Runtime on Android / iOS, onnxruntime-web in browsers): layers
taken from the base model, distilled from XLM-R large teachers and fine-tuned on textdetox, GermEval 2018/2019/2021 and
hand-labelled comments. Trained for English, German, French, Spanish, Italian, Russian and Ukrainian; texts in other
scripts score as harmless.
- `manifest.json`: the model the apps load (8 layers, `v2/L8/model.onnx`, 82 MB), with file hashes, tokenizer
settings, labels and threshold. `lowMemory` names the manifest for devices with little memory.
- `manifest-low-memory.json`: the 5-layer model (`v2/L5/model.onnx`, 52 MB) for iPhone and iPad browsers.
- `v2/vocab.txt`: the WordPiece vocabulary of both models (cased, no lowercasing).
- Models: weights quantized to int8, inputs `input_ids`, `attention_mask`, `token_type_ids` as int32, output `logits`
(index 0 harmless, 1 toxic).
- `manifest-v1.json`, `v1/`: the previous model (int8 export of the base model, 179 MB).
On a hand-checked test of 3,664 real comments, at threshold 0.5 the 8-layer model finds 41 % of the attacks and flags
4 of 1,000 harmless comments (5-layer: 38 % and 5.4); ROC-AUC 96 (German 93). In ordinary traffic both flag fewer than
0.4 of 1,000 harmless comments.
The use restrictions of the openrail++ license of the base model apply to these models.
|