KoichiYasuoka commited on
Commit
2f1734c
β€’
1 Parent(s): 9911e21

initial release

Browse files
Files changed (6) hide show
  1. README.md +26 -0
  2. config.json +127 -0
  3. pytorch_model.bin +3 -0
  4. special_tokens_map.json +1 -0
  5. tokenizer_config.json +1 -0
  6. vocab.txt +0 -0
README.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - "zh"
4
+ tags:
5
+ - "chinese"
6
+ - "token-classification"
7
+ - "pos"
8
+ - "wikipedia"
9
+ license: "apache-2.0"
10
+ pipeline_tag: "token-classification"
11
+ ---
12
+
13
+ # chinese-bert-wwm-ext-upos
14
+
15
+ ## Model Description
16
+
17
+ This is a BERT model pre-trained on Chinese Wikipedia texts (both simplified and traditional) for POS-tagging, derived from [chinese-bert-wwm-ext](https://huggingface.co/hfl/chinese-bert-wwm-ext). Every word is tagged by [UPOS](https://universaldependencies.org/u/pos/) (Universal Part-Of-Speech).
18
+
19
+ ## How to Use
20
+
21
+ ```py
22
+ from transformers import AutoTokenizer,AutoModelForTokenClassification
23
+ tokenizer=AutoTokenizer.from_pretrained("KoichiYasuoka/chinese-bert-wwm-ext-upos")
24
+ model=AutoModelForTokenClassification.from_pretrained("KoichiYasuoka/chinese-bert-wwm-ext-upos")
25
+ ```
26
+
config.json ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForTokenClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "directionality": "bidi",
8
+ "finetuning_task": "ner",
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "ADJ",
15
+ "1": "ADP",
16
+ "2": "ADV",
17
+ "3": "AUX",
18
+ "4": "B-ADJ",
19
+ "5": "B-ADP",
20
+ "6": "B-ADV",
21
+ "7": "B-AUX",
22
+ "8": "B-CCONJ",
23
+ "9": "B-DET",
24
+ "10": "B-NOUN",
25
+ "11": "B-NUM",
26
+ "12": "B-PART",
27
+ "13": "B-PRON",
28
+ "14": "B-PROPN",
29
+ "15": "B-PUNCT",
30
+ "16": "B-SYM",
31
+ "17": "B-VERB",
32
+ "18": "B-X",
33
+ "19": "CCONJ",
34
+ "20": "DET",
35
+ "21": "I-ADJ",
36
+ "22": "I-ADP",
37
+ "23": "I-ADV",
38
+ "24": "I-AUX",
39
+ "25": "I-CCONJ",
40
+ "26": "I-DET",
41
+ "27": "I-NOUN",
42
+ "28": "I-NUM",
43
+ "29": "I-PART",
44
+ "30": "I-PRON",
45
+ "31": "I-PROPN",
46
+ "32": "I-PUNCT",
47
+ "33": "I-SYM",
48
+ "34": "I-VERB",
49
+ "35": "I-X",
50
+ "36": "NOUN",
51
+ "37": "NUM",
52
+ "38": "PART",
53
+ "39": "PRON",
54
+ "40": "PROPN",
55
+ "41": "PUNCT",
56
+ "42": "SYM",
57
+ "43": "VERB",
58
+ "44": "X"
59
+ },
60
+ "initializer_range": 0.02,
61
+ "intermediate_size": 3072,
62
+ "label2id": {
63
+ "ADJ": 0,
64
+ "ADP": 1,
65
+ "ADV": 2,
66
+ "AUX": 3,
67
+ "B-ADJ": 4,
68
+ "B-ADP": 5,
69
+ "B-ADV": 6,
70
+ "B-AUX": 7,
71
+ "B-CCONJ": 8,
72
+ "B-DET": 9,
73
+ "B-NOUN": 10,
74
+ "B-NUM": 11,
75
+ "B-PART": 12,
76
+ "B-PRON": 13,
77
+ "B-PROPN": 14,
78
+ "B-PUNCT": 15,
79
+ "B-SYM": 16,
80
+ "B-VERB": 17,
81
+ "B-X": 18,
82
+ "CCONJ": 19,
83
+ "DET": 20,
84
+ "I-ADJ": 21,
85
+ "I-ADP": 22,
86
+ "I-ADV": 23,
87
+ "I-AUX": 24,
88
+ "I-CCONJ": 25,
89
+ "I-DET": 26,
90
+ "I-NOUN": 27,
91
+ "I-NUM": 28,
92
+ "I-PART": 29,
93
+ "I-PRON": 30,
94
+ "I-PROPN": 31,
95
+ "I-PUNCT": 32,
96
+ "I-SYM": 33,
97
+ "I-VERB": 34,
98
+ "I-X": 35,
99
+ "NOUN": 36,
100
+ "NUM": 37,
101
+ "PART": 38,
102
+ "PRON": 39,
103
+ "PROPN": 40,
104
+ "PUNCT": 41,
105
+ "SYM": 42,
106
+ "VERB": 43,
107
+ "X": 44
108
+ },
109
+ "layer_norm_eps": 1e-12,
110
+ "max_position_embeddings": 512,
111
+ "model_type": "bert",
112
+ "num_attention_heads": 12,
113
+ "num_hidden_layers": 12,
114
+ "output_past": true,
115
+ "pad_token_id": 0,
116
+ "pooler_fc_size": 768,
117
+ "pooler_num_attention_heads": 12,
118
+ "pooler_num_fc_layers": 3,
119
+ "pooler_size_per_head": 128,
120
+ "pooler_type": "first_token_transform",
121
+ "position_embedding_type": "absolute",
122
+ "torch_dtype": "float32",
123
+ "transformers_version": "4.10.0",
124
+ "type_vocab_size": 2,
125
+ "use_cache": true,
126
+ "vocab_size": 21128
127
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab03aaa26acb1e369be625dabecfdc1491d6bfbba72f27a733be43f9c9a739ef
3
+ size 406933136
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "tokenizer_class": "BertTokenizer"}
vocab.txt ADDED
The diff for this file is too large to render. See raw diff