Upload folder using huggingface_hub
Browse files- README.md +4 -3
- SHA256SUMS +9 -0
- config.json +42 -0
- deployment_metadata.json +24 -0
- extension_compat.json +22 -0
- onnx/model_quantized.onnx +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +15 -0
- vocab.txt +0 -0
README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
-
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
| 1 |
+
# toxic-bert
|
| 2 |
+
|
| 3 |
+
Stage the remote toxicity classifier assets here before uploading to Hugging Face.
|
| 4 |
+
Expected runtime repo id: `Xenova/toxic-bert` or your pinned mirror.
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
e2c6937717530ce48ea753182c5558c8b285a0e1dd7824759d63a81adce28447 ./config.json
|
| 2 |
+
c4dfb3f96991081b820694578d2b07374dbe61c2032bba4ace4fa0f18022a6b7 ./deployment_metadata.json
|
| 3 |
+
70b5abe097a45c1e267a2eabfd58df03df4d790518b6b13d700137bbf34d7a31 ./extension_compat.json
|
| 4 |
+
620012c9bed13e3c58b9c959d160d955ff033a1a27528212b9da5b0aa4ac3f73 ./onnx/model_quantized.onnx
|
| 5 |
+
64bfa9a6cddba342766ae20724d80ac05c408b79dbca99f957296c46f47d10eb ./README.md
|
| 6 |
+
b6d346be366a7d1d48332dbc9fdf3bf8960b5d879522b7799ddba59e76237ee3 ./special_tokens_map.json
|
| 7 |
+
9261e7d79b44c8195c1cada2b453e55b00aeb81e907a6664974b4d7776172ab3 ./tokenizer_config.json
|
| 8 |
+
d241a60d5e8f04cc1b2b3e9ef7a4921b27bf526d9f6050ab90f9267a1f9e5c66 ./tokenizer.json
|
| 9 |
+
07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3 ./vocab.txt
|
config.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "unitary/toxic-bert",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"gradient_checkpointing": false,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "toxic",
|
| 14 |
+
"1": "severe_toxic",
|
| 15 |
+
"2": "obscene",
|
| 16 |
+
"3": "threat",
|
| 17 |
+
"4": "insult",
|
| 18 |
+
"5": "identity_hate"
|
| 19 |
+
},
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 3072,
|
| 22 |
+
"label2id": {
|
| 23 |
+
"identity_hate": 5,
|
| 24 |
+
"insult": 4,
|
| 25 |
+
"obscene": 2,
|
| 26 |
+
"severe_toxic": 1,
|
| 27 |
+
"threat": 3,
|
| 28 |
+
"toxic": 0
|
| 29 |
+
},
|
| 30 |
+
"layer_norm_eps": 1e-12,
|
| 31 |
+
"max_position_embeddings": 512,
|
| 32 |
+
"model_type": "bert",
|
| 33 |
+
"num_attention_heads": 12,
|
| 34 |
+
"num_hidden_layers": 12,
|
| 35 |
+
"pad_token_id": 0,
|
| 36 |
+
"position_embedding_type": "absolute",
|
| 37 |
+
"problem_type": "multi_label_classification",
|
| 38 |
+
"transformers_version": "4.32.0.dev0",
|
| 39 |
+
"type_vocab_size": 2,
|
| 40 |
+
"use_cache": true,
|
| 41 |
+
"vocab_size": 30522
|
| 42 |
+
}
|
deployment_metadata.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"modelId": "Xenova/toxic-bert",
|
| 3 |
+
"sourceModel": "Xenova/toxic-bert",
|
| 4 |
+
"runtime": "transformers.js-onnxruntime-web-wasm-cpu",
|
| 5 |
+
"task": "text-classification",
|
| 6 |
+
"quantized": true,
|
| 7 |
+
"classifierLabels": [
|
| 8 |
+
"toxic",
|
| 9 |
+
"severe_toxic",
|
| 10 |
+
"obscene",
|
| 11 |
+
"threat",
|
| 12 |
+
"insult",
|
| 13 |
+
"identity_hate"
|
| 14 |
+
],
|
| 15 |
+
"artifacts": {
|
| 16 |
+
"config": "config.json",
|
| 17 |
+
"tokenizer": "tokenizer.json",
|
| 18 |
+
"tokenizerConfig": "tokenizer_config.json",
|
| 19 |
+
"specialTokens": "special_tokens_map.json",
|
| 20 |
+
"vocab": "vocab.txt",
|
| 21 |
+
"onnx": "onnx/model_quantized.onnx"
|
| 22 |
+
},
|
| 23 |
+
"releaseState": "staged-for-upload"
|
| 24 |
+
}
|
extension_compat.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"modelId": "Xenova/toxic-bert",
|
| 3 |
+
"format": "transformers.js",
|
| 4 |
+
"runtime": {
|
| 5 |
+
"transformers": "2.17.2",
|
| 6 |
+
"onnxruntimeWeb": "1.14.x"
|
| 7 |
+
},
|
| 8 |
+
"extension": {
|
| 9 |
+
"minimumVersion": "5.0.0",
|
| 10 |
+
"supportedModes": ["detoxicify"]
|
| 11 |
+
},
|
| 12 |
+
"files": [
|
| 13 |
+
"config.json",
|
| 14 |
+
"deployment_metadata.json",
|
| 15 |
+
"extension_compat.json",
|
| 16 |
+
"onnx/model_quantized.onnx",
|
| 17 |
+
"special_tokens_map.json",
|
| 18 |
+
"tokenizer.json",
|
| 19 |
+
"tokenizer_config.json",
|
| 20 |
+
"vocab.txt"
|
| 21 |
+
]
|
| 22 |
+
}
|
onnx/model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:620012c9bed13e3c58b9c959d160d955ff033a1a27528212b9da5b0aa4ac3f73
|
| 3 |
+
size 110720344
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"clean_up_tokenization_spaces": true,
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"do_basic_tokenize": true,
|
| 5 |
+
"do_lower_case": true,
|
| 6 |
+
"mask_token": "[MASK]",
|
| 7 |
+
"model_max_length": 512,
|
| 8 |
+
"never_split": null,
|
| 9 |
+
"pad_token": "[PAD]",
|
| 10 |
+
"sep_token": "[SEP]",
|
| 11 |
+
"strip_accents": null,
|
| 12 |
+
"tokenize_chinese_chars": true,
|
| 13 |
+
"tokenizer_class": "BertTokenizer",
|
| 14 |
+
"unk_token": "[UNK]"
|
| 15 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|