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