initial public commit ⚙️
Browse files- README.md +47 -0
- added_tokens.json +3 -0
- config.json +54 -0
- model.safetensors +3 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +9 -0
- spm.model +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +16 -0
README.md
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- text-classification
|
4 |
+
language:
|
5 |
+
- unk
|
6 |
+
widget:
|
7 |
+
- text: "Enter Any Text"
|
8 |
+
co2_eq_emissions:
|
9 |
+
emissions: 0.06970131721690424
|
10 |
+
---
|
11 |
+
|
12 |
+
## Validation Metrics
|
13 |
+
|
14 |
+
- Loss: 0.214
|
15 |
+
- Accuracy: 0.950
|
16 |
+
- Macro F1: 0.950
|
17 |
+
- Micro F1: 0.950
|
18 |
+
- Weighted F1: 0.950
|
19 |
+
- Macro Precision: 0.950
|
20 |
+
- Micro Precision: 0.950
|
21 |
+
- Weighted Precision: 0.950
|
22 |
+
- Macro Recall: 0.950
|
23 |
+
- Micro Recall: 0.950
|
24 |
+
- Weighted Recall: 0.950
|
25 |
+
|
26 |
+
|
27 |
+
## Usage
|
28 |
+
|
29 |
+
You can use cURL to access this model:
|
30 |
+
|
31 |
+
```
|
32 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "Enter Text"}' https://api-inference.huggingface.co/models/labofsahil/mod
|
33 |
+
```
|
34 |
+
|
35 |
+
Or Python API:
|
36 |
+
|
37 |
+
```
|
38 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
39 |
+
|
40 |
+
model = AutoModelForSequenceClassification.from_pretrained("labofsahil/mod"")
|
41 |
+
|
42 |
+
tokenizer = AutoTokenizer.from_pretrained("labofsahil/mod")
|
43 |
+
|
44 |
+
inputs = tokenizer("Enter Text", return_tensors="pt")
|
45 |
+
|
46 |
+
outputs = model(**inputs)
|
47 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[MASK]": 128000
|
3 |
+
}
|
config.json
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "AutoTrain",
|
3 |
+
"_num_labels": 6,
|
4 |
+
"architectures": [
|
5 |
+
"DebertaV2ForSequenceClassification"
|
6 |
+
],
|
7 |
+
"attention_probs_dropout_prob": 0.1,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.1,
|
10 |
+
"hidden_size": 1024,
|
11 |
+
"id2label": {
|
12 |
+
"0": "NFSW",
|
13 |
+
"1": "humiliation",
|
14 |
+
"2": "profanity",
|
15 |
+
"3": "self-harm",
|
16 |
+
"4": "threat",
|
17 |
+
"5": "toxic"
|
18 |
+
},
|
19 |
+
"initializer_range": 0.02,
|
20 |
+
"intermediate_size": 4096,
|
21 |
+
"label2id": {
|
22 |
+
"NFSW": 0,
|
23 |
+
"humiliation": 1,
|
24 |
+
"profanity": 2,
|
25 |
+
"self-harm": 3,
|
26 |
+
"threat": 4,
|
27 |
+
"toxic": 5
|
28 |
+
},
|
29 |
+
"layer_norm_eps": 1e-07,
|
30 |
+
"max_length": 128,
|
31 |
+
"max_position_embeddings": 512,
|
32 |
+
"max_relative_positions": -1,
|
33 |
+
"model_type": "deberta-v2",
|
34 |
+
"norm_rel_ebd": "layer_norm",
|
35 |
+
"num_attention_heads": 16,
|
36 |
+
"num_hidden_layers": 24,
|
37 |
+
"pad_token_id": 0,
|
38 |
+
"padding": "max_length",
|
39 |
+
"pooler_dropout": 0,
|
40 |
+
"pooler_hidden_act": "gelu",
|
41 |
+
"pooler_hidden_size": 1024,
|
42 |
+
"pos_att_type": [
|
43 |
+
"p2c",
|
44 |
+
"c2p"
|
45 |
+
],
|
46 |
+
"position_biased_input": false,
|
47 |
+
"position_buckets": 256,
|
48 |
+
"relative_attention": true,
|
49 |
+
"share_att_key": true,
|
50 |
+
"torch_dtype": "float32",
|
51 |
+
"transformers_version": "4.29.2",
|
52 |
+
"type_vocab_size": 0,
|
53 |
+
"vocab_size": 128100
|
54 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:07f33bc79f026c33dd634b9a1084bf8d2ca9ca02653b61182b12d6a16ea4edeb
|
3 |
+
size 1740325040
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:723b68493e28cab1925a0b0c7874d94019ed351dcb9215b07d0dd4f232fe77a9
|
3 |
+
size 1740412665
|
special_tokens_map.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "[CLS]",
|
3 |
+
"cls_token": "[CLS]",
|
4 |
+
"eos_token": "[SEP]",
|
5 |
+
"mask_token": "[MASK]",
|
6 |
+
"pad_token": "[PAD]",
|
7 |
+
"sep_token": "[SEP]",
|
8 |
+
"unk_token": "[UNK]"
|
9 |
+
}
|
spm.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fd
|
3 |
+
size 2464616
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "[CLS]",
|
3 |
+
"clean_up_tokenization_spaces": true,
|
4 |
+
"cls_token": "[CLS]",
|
5 |
+
"do_lower_case": false,
|
6 |
+
"eos_token": "[SEP]",
|
7 |
+
"mask_token": "[MASK]",
|
8 |
+
"model_max_length": 1000000000000000019884624838656,
|
9 |
+
"pad_token": "[PAD]",
|
10 |
+
"sep_token": "[SEP]",
|
11 |
+
"sp_model_kwargs": {},
|
12 |
+
"split_by_punct": false,
|
13 |
+
"tokenizer_class": "DebertaV2Tokenizer",
|
14 |
+
"unk_token": "[UNK]",
|
15 |
+
"vocab_type": "spm"
|
16 |
+
}
|