KoichiYasuoka commited on
Commit
fde9504
β€’
1 Parent(s): 9a5e901

initial release

Browse files
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - "zh"
4
+ tags:
5
+ - "chinese"
6
+ - "token-classification"
7
+ - "pos"
8
+ - "dependency-parsing"
9
+ datasets:
10
+ - "universal_dependencies"
11
+ license: "cc-by-sa-4.0"
12
+ pipeline_tag: "token-classification"
13
+ ---
14
+
15
+ # deberta-base-chinese-upos
16
+
17
+ ## Model Description
18
+
19
+ This is a DeBERTa(V2) model pre-trained on Chinese Wikipedia texts (both simplified and traditional) for POS-tagging and dependency-parsing, derived from [deberta-base-chinese](https://huggingface.co/KoichiYasuoka/deberta-base-chinese). Every word is tagged by [UPOS](https://universaldependencies.org/u/pos/) (Universal Part-Of-Speech).
20
+
21
+ ## How to Use
22
+
23
+ ```py
24
+ from transformers import AutoTokenizer,AutoModelForTokenClassification
25
+ tokenizer=AutoTokenizer.from_pretrained("KoichiYasuoka/deberta-base-chinese-upos")
26
+ model=AutoModelForTokenClassification.from_pretrained("KoichiYasuoka/deberta-base-chinese-upos")
27
+ ```
28
+
29
+ or
30
+
31
+ ```py
32
+ import esupar
33
+ nlp=esupar.load("KoichiYasuoka/deberta-base-chinese-upos")
34
+ ```
35
+
36
+ ## See Also
37
+
38
+ [esupar](https://github.com/KoichiYasuoka/esupar): Tokenizer POS-tagger and Dependency-parser with BERT/RoBERTa/DeBERTa models
39
+
config.json ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "DebertaV2ForTokenClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "hidden_act": "gelu",
7
+ "hidden_dropout_prob": 0.1,
8
+ "hidden_size": 768,
9
+ "id2label": {
10
+ "0": "ADJ",
11
+ "1": "ADP",
12
+ "2": "ADV",
13
+ "3": "AUX",
14
+ "4": "B-ADJ",
15
+ "5": "B-ADP",
16
+ "6": "B-ADV",
17
+ "7": "B-AUX",
18
+ "8": "B-CCONJ",
19
+ "9": "B-DET",
20
+ "10": "B-NOUN",
21
+ "11": "B-NUM",
22
+ "12": "B-PART",
23
+ "13": "B-PRON",
24
+ "14": "B-PROPN",
25
+ "15": "B-PUNCT",
26
+ "16": "B-SYM",
27
+ "17": "B-VERB",
28
+ "18": "B-X",
29
+ "19": "CCONJ",
30
+ "20": "DET",
31
+ "21": "I-ADJ",
32
+ "22": "I-ADP",
33
+ "23": "I-ADV",
34
+ "24": "I-AUX",
35
+ "25": "I-CCONJ",
36
+ "26": "I-DET",
37
+ "27": "I-NOUN",
38
+ "28": "I-NUM",
39
+ "29": "I-PART",
40
+ "30": "I-PRON",
41
+ "31": "I-PROPN",
42
+ "32": "I-PUNCT",
43
+ "33": "I-SYM",
44
+ "34": "I-VERB",
45
+ "35": "I-X",
46
+ "36": "NOUN",
47
+ "37": "NUM",
48
+ "38": "PART",
49
+ "39": "PRON",
50
+ "40": "PROPN",
51
+ "41": "PUNCT",
52
+ "42": "SYM",
53
+ "43": "VERB",
54
+ "44": "X"
55
+ },
56
+ "initializer_range": 0.02,
57
+ "intermediate_size": 3072,
58
+ "label2id": {
59
+ "ADJ": 0,
60
+ "ADP": 1,
61
+ "ADV": 2,
62
+ "AUX": 3,
63
+ "B-ADJ": 4,
64
+ "B-ADP": 5,
65
+ "B-ADV": 6,
66
+ "B-AUX": 7,
67
+ "B-CCONJ": 8,
68
+ "B-DET": 9,
69
+ "B-NOUN": 10,
70
+ "B-NUM": 11,
71
+ "B-PART": 12,
72
+ "B-PRON": 13,
73
+ "B-PROPN": 14,
74
+ "B-PUNCT": 15,
75
+ "B-SYM": 16,
76
+ "B-VERB": 17,
77
+ "B-X": 18,
78
+ "CCONJ": 19,
79
+ "DET": 20,
80
+ "I-ADJ": 21,
81
+ "I-ADP": 22,
82
+ "I-ADV": 23,
83
+ "I-AUX": 24,
84
+ "I-CCONJ": 25,
85
+ "I-DET": 26,
86
+ "I-NOUN": 27,
87
+ "I-NUM": 28,
88
+ "I-PART": 29,
89
+ "I-PRON": 30,
90
+ "I-PROPN": 31,
91
+ "I-PUNCT": 32,
92
+ "I-SYM": 33,
93
+ "I-VERB": 34,
94
+ "I-X": 35,
95
+ "NOUN": 36,
96
+ "NUM": 37,
97
+ "PART": 38,
98
+ "PRON": 39,
99
+ "PROPN": 40,
100
+ "PUNCT": 41,
101
+ "SYM": 42,
102
+ "VERB": 43,
103
+ "X": 44
104
+ },
105
+ "layer_norm_eps": 1e-07,
106
+ "max_position_embeddings": 512,
107
+ "max_relative_positions": -1,
108
+ "model_type": "deberta-v2",
109
+ "num_attention_heads": 12,
110
+ "num_hidden_layers": 12,
111
+ "pad_token_id": 0,
112
+ "pooler_dropout": 0,
113
+ "pooler_hidden_act": "gelu",
114
+ "pooler_hidden_size": 768,
115
+ "pos_att_type": null,
116
+ "position_biased_input": true,
117
+ "relative_attention": false,
118
+ "tokenizer_class": "BertTokenizerFast",
119
+ "torch_dtype": "float32",
120
+ "transformers_version": "4.22.1",
121
+ "type_vocab_size": 0,
122
+ "vocab_size": 26582
123
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a50326cd8550f74be43b2f68234c4b772c9c81c4c8287283274f0f88f7f21009
3
+ size 423666163
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
+ }
supar.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca39f3787e2d0797e32b24001c6570d55d716421d22367350ecdf7a507003545
3
+ size 476345963
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "do_basic_tokenize": true,
4
+ "do_lower_case": false,
5
+ "mask_token": "[MASK]",
6
+ "model_max_length": 512,
7
+ "never_split": [
8
+ "[CLS]",
9
+ "[PAD]",
10
+ "[SEP]",
11
+ "[UNK]",
12
+ "[MASK]"
13
+ ],
14
+ "pad_token": "[PAD]",
15
+ "sep_token": "[SEP]",
16
+ "strip_accents": false,
17
+ "tokenize_chinese_chars": true,
18
+ "tokenizer_class": "BertTokenizerFast",
19
+ "unk_token": "[UNK]"
20
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff