Upload folder using huggingface_hub
Browse files- config.json +42 -0
- onnx/model.onnx +3 -0
- onnx/model_quantized.onnx +3 -0
- quantize_config.json +32 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +15 -0
- vocab.txt +0 -0
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 |
+
}
|
onnx/model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a092927576be0a4884f791415fd375a702c09f1f10411295c56728404a5ff3e2
|
3 |
+
size 438214184
|
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
|
quantize_config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"per_channel": true,
|
3 |
+
"reduce_range": true,
|
4 |
+
"per_model_config": {
|
5 |
+
"model": {
|
6 |
+
"op_types": [
|
7 |
+
"Reshape",
|
8 |
+
"Slice",
|
9 |
+
"Sqrt",
|
10 |
+
"Unsqueeze",
|
11 |
+
"Gather",
|
12 |
+
"ReduceMean",
|
13 |
+
"Concat",
|
14 |
+
"Gemm",
|
15 |
+
"Constant",
|
16 |
+
"Pow",
|
17 |
+
"Erf",
|
18 |
+
"Add",
|
19 |
+
"Transpose",
|
20 |
+
"Shape",
|
21 |
+
"Sub",
|
22 |
+
"MatMul",
|
23 |
+
"Softmax",
|
24 |
+
"Cast",
|
25 |
+
"Tanh",
|
26 |
+
"Div",
|
27 |
+
"Mul"
|
28 |
+
],
|
29 |
+
"weight_type": "QInt8"
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
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
|
|