KoichiYasuoka commited on
Commit
56b9b51
β€’
1 Parent(s): 002e7ec

initial release

Browse files
Files changed (6) hide show
  1. README.md +26 -0
  2. config.json +129 -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-roberta-wwm-ext](https://huggingface.co/hfl/chinese-roberta-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-roberta-base-upos")
24
+ model=AutoModelForTokenClassification.from_pretrained("KoichiYasuoka/chinese-roberta-base-upos")
25
+ ```
26
+
config.json ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "hfl/chinese-roberta-wwm-ext",
3
+ "architectures": [
4
+ "BertForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "directionality": "bidi",
9
+ "eos_token_id": 2,
10
+ "finetuning_task": "ner",
11
+ "gradient_checkpointing": false,
12
+ "hidden_act": "gelu",
13
+ "hidden_dropout_prob": 0.1,
14
+ "hidden_size": 768,
15
+ "id2label": {
16
+ "0": "ADJ",
17
+ "1": "ADP",
18
+ "2": "ADV",
19
+ "3": "AUX",
20
+ "4": "B-ADJ",
21
+ "5": "B-ADP",
22
+ "6": "B-ADV",
23
+ "7": "B-AUX",
24
+ "8": "B-CCONJ",
25
+ "9": "B-DET",
26
+ "10": "B-NOUN",
27
+ "11": "B-NUM",
28
+ "12": "B-PART",
29
+ "13": "B-PRON",
30
+ "14": "B-PROPN",
31
+ "15": "B-PUNCT",
32
+ "16": "B-SYM",
33
+ "17": "B-VERB",
34
+ "18": "B-X",
35
+ "19": "CCONJ",
36
+ "20": "DET",
37
+ "21": "I-ADJ",
38
+ "22": "I-ADP",
39
+ "23": "I-ADV",
40
+ "24": "I-AUX",
41
+ "25": "I-CCONJ",
42
+ "26": "I-DET",
43
+ "27": "I-NOUN",
44
+ "28": "I-NUM",
45
+ "29": "I-PART",
46
+ "30": "I-PRON",
47
+ "31": "I-PROPN",
48
+ "32": "I-PUNCT",
49
+ "33": "I-SYM",
50
+ "34": "I-VERB",
51
+ "35": "I-X",
52
+ "36": "NOUN",
53
+ "37": "NUM",
54
+ "38": "PART",
55
+ "39": "PRON",
56
+ "40": "PROPN",
57
+ "41": "PUNCT",
58
+ "42": "SYM",
59
+ "43": "VERB",
60
+ "44": "X"
61
+ },
62
+ "initializer_range": 0.02,
63
+ "intermediate_size": 3072,
64
+ "label2id": {
65
+ "ADJ": 0,
66
+ "ADP": 1,
67
+ "ADV": 2,
68
+ "AUX": 3,
69
+ "B-ADJ": 4,
70
+ "B-ADP": 5,
71
+ "B-ADV": 6,
72
+ "B-AUX": 7,
73
+ "B-CCONJ": 8,
74
+ "B-DET": 9,
75
+ "B-NOUN": 10,
76
+ "B-NUM": 11,
77
+ "B-PART": 12,
78
+ "B-PRON": 13,
79
+ "B-PROPN": 14,
80
+ "B-PUNCT": 15,
81
+ "B-SYM": 16,
82
+ "B-VERB": 17,
83
+ "B-X": 18,
84
+ "CCONJ": 19,
85
+ "DET": 20,
86
+ "I-ADJ": 21,
87
+ "I-ADP": 22,
88
+ "I-ADV": 23,
89
+ "I-AUX": 24,
90
+ "I-CCONJ": 25,
91
+ "I-DET": 26,
92
+ "I-NOUN": 27,
93
+ "I-NUM": 28,
94
+ "I-PART": 29,
95
+ "I-PRON": 30,
96
+ "I-PROPN": 31,
97
+ "I-PUNCT": 32,
98
+ "I-SYM": 33,
99
+ "I-VERB": 34,
100
+ "I-X": 35,
101
+ "NOUN": 36,
102
+ "NUM": 37,
103
+ "PART": 38,
104
+ "PRON": 39,
105
+ "PROPN": 40,
106
+ "PUNCT": 41,
107
+ "SYM": 42,
108
+ "VERB": 43,
109
+ "X": 44
110
+ },
111
+ "layer_norm_eps": 1e-12,
112
+ "max_position_embeddings": 512,
113
+ "model_type": "bert",
114
+ "num_attention_heads": 12,
115
+ "num_hidden_layers": 12,
116
+ "output_past": true,
117
+ "pad_token_id": 1,
118
+ "pooler_fc_size": 768,
119
+ "pooler_num_attention_heads": 12,
120
+ "pooler_num_fc_layers": 3,
121
+ "pooler_size_per_head": 128,
122
+ "pooler_type": "first_token_transform",
123
+ "position_embedding_type": "absolute",
124
+ "torch_dtype": "float32",
125
+ "transformers_version": "4.9.2",
126
+ "type_vocab_size": 2,
127
+ "use_cache": true,
128
+ "vocab_size": 21128
129
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4cbda4a34a1e03b2b48fe832f6d963436e6dd59e4d72d4db0c0c530fcf62ab4
3
+ size 406933135
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, "special_tokens_map_file": "/home/yasuoka/.cache/huggingface/transformers/d521373fc7ac35f63d56cf303de74a202403dcf1aaa792cd01f653694be59563.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d", "name_or_path": "hfl/chinese-roberta-wwm-ext", "tokenizer_class": "BertTokenizer"}
vocab.txt ADDED
The diff for this file is too large to render. See raw diff