Upload CustomTextClassificationPipeline
Browse files- config.json +18 -3
- configuration_deberta_multi.py +7 -0
- special_tokens_map.json +42 -6
- tokenizer.json +0 -0
- tokenizer_config.json +8 -1
config.json
CHANGED
@@ -1,8 +1,22 @@
|
|
1 |
{
|
|
|
2 |
"architectures": [
|
3 |
-
"
|
4 |
],
|
5 |
"attention_probs_dropout_prob": 0.1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
"hidden_act": "gelu",
|
7 |
"hidden_dropout_prob": 0.1,
|
8 |
"hidden_size": 768,
|
@@ -11,9 +25,10 @@
|
|
11 |
"layer_norm_eps": 1e-07,
|
12 |
"max_position_embeddings": 512,
|
13 |
"max_relative_positions": -1,
|
14 |
-
"model_type": "deberta-
|
15 |
"norm_rel_ebd": "layer_norm",
|
16 |
"num_attention_heads": 12,
|
|
|
17 |
"num_hidden_layers": 6,
|
18 |
"pad_token_id": 0,
|
19 |
"pooler_dropout": 0,
|
@@ -28,7 +43,7 @@
|
|
28 |
"relative_attention": true,
|
29 |
"share_att_key": true,
|
30 |
"torch_dtype": "float32",
|
31 |
-
"transformers_version": "4.
|
32 |
"type_vocab_size": 0,
|
33 |
"vocab_size": 128100
|
34 |
}
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "./celadon",
|
3 |
"architectures": [
|
4 |
+
"MultiHeadDebertaForSequenceClassificationModel"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"auto_map": {
|
8 |
+
"AutoConfig": "configuration_deberta_multi.MultiHeadDebertaV2Config",
|
9 |
+
"AutoModelForSequenceClassification": "modelling_deberta_multi.MultiHeadDebertaForSequenceClassificationModel"
|
10 |
+
},
|
11 |
+
"custom_pipelines": {
|
12 |
+
"text-classification": {
|
13 |
+
"impl": "custom_pipeline.CustomTextClassificationPipeline",
|
14 |
+
"pt": [
|
15 |
+
"AutoModelForSequenceClassification"
|
16 |
+
],
|
17 |
+
"tf": []
|
18 |
+
}
|
19 |
+
},
|
20 |
"hidden_act": "gelu",
|
21 |
"hidden_dropout_prob": 0.1,
|
22 |
"hidden_size": 768,
|
|
|
25 |
"layer_norm_eps": 1e-07,
|
26 |
"max_position_embeddings": 512,
|
27 |
"max_relative_positions": -1,
|
28 |
+
"model_type": "multi-head-deberta-for-sequence-classification",
|
29 |
"norm_rel_ebd": "layer_norm",
|
30 |
"num_attention_heads": 12,
|
31 |
+
"num_heads": 5,
|
32 |
"num_hidden_layers": 6,
|
33 |
"pad_token_id": 0,
|
34 |
"pooler_dropout": 0,
|
|
|
43 |
"relative_attention": true,
|
44 |
"share_att_key": true,
|
45 |
"torch_dtype": "float32",
|
46 |
+
"transformers_version": "4.46.2",
|
47 |
"type_vocab_size": 0,
|
48 |
"vocab_size": 128100
|
49 |
}
|
configuration_deberta_multi.py
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import DebertaV2Config
|
2 |
+
|
3 |
+
class MultiHeadDebertaV2Config(DebertaV2Config):
|
4 |
+
model_type = "multi-head-deberta-for-sequence-classification"
|
5 |
+
def __init__(self, num_heads=5, **kwargs):
|
6 |
+
self.num_heads = num_heads
|
7 |
+
super().__init__(**kwargs)
|
special_tokens_map.json
CHANGED
@@ -1,10 +1,46 @@
|
|
1 |
{
|
2 |
-
"bos_token":
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
"unk_token": {
|
9 |
"content": "[UNK]",
|
10 |
"lstrip": false,
|
|
|
1 |
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "[CLS]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "[SEP]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "[MASK]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "[PAD]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "[SEP]",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
"unk_token": {
|
45 |
"content": "[UNK]",
|
46 |
"lstrip": false,
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
CHANGED
@@ -47,12 +47,19 @@
|
|
47 |
"do_lower_case": false,
|
48 |
"eos_token": "[SEP]",
|
49 |
"mask_token": "[MASK]",
|
50 |
-
"
|
|
|
|
|
51 |
"pad_token": "[PAD]",
|
|
|
|
|
52 |
"sep_token": "[SEP]",
|
53 |
"sp_model_kwargs": {},
|
54 |
"split_by_punct": false,
|
|
|
55 |
"tokenizer_class": "DebertaV2Tokenizer",
|
|
|
|
|
56 |
"unk_token": "[UNK]",
|
57 |
"vocab_type": "spm"
|
58 |
}
|
|
|
47 |
"do_lower_case": false,
|
48 |
"eos_token": "[SEP]",
|
49 |
"mask_token": "[MASK]",
|
50 |
+
"max_length": 512,
|
51 |
+
"model_max_length": 512,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
"pad_token": "[PAD]",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
"sep_token": "[SEP]",
|
57 |
"sp_model_kwargs": {},
|
58 |
"split_by_punct": false,
|
59 |
+
"stride": 0,
|
60 |
"tokenizer_class": "DebertaV2Tokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
"unk_token": "[UNK]",
|
64 |
"vocab_type": "spm"
|
65 |
}
|