emfomy commited on
Commit
77b8582
1 Parent(s): 00fcdd0

Upload model files.

Browse files
Files changed (6) hide show
  1. README.md +45 -0
  2. config.json +32 -0
  3. pytorch_model.bin +3 -0
  4. special_tokens_map.json +7 -0
  5. tokenizer_config.json +14 -0
  6. vocab.txt +0 -0
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - zh
4
+ thumbnail: https://ckip.iis.sinica.edu.tw/files/ckip_logo.png
5
+ tags:
6
+ - pytorch
7
+ - question-answering
8
+ - bert
9
+ - zh
10
+ license: gpl-3.0
11
+ ---
12
+
13
+ # CKIP BERT Base Chinese
14
+
15
+ This project provides traditional Chinese transformers models (including ALBERT, BERT, GPT2) and NLP tools (including word segmentation, part-of-speech tagging, named entity recognition).
16
+
17
+ 這個專案提供了繁體中文的 transformers 模型(包含 ALBERT、BERT、GPT2)及自然語言處理工具(包含斷詞、詞性標記、實體辨識)。
18
+
19
+ ## Homepage
20
+
21
+ - https://github.com/ckiplab/ckip-transformers
22
+
23
+ ## Contributers
24
+
25
+ - [Mu Yang](https://muyang.pro) at [CKIP](https://ckip.iis.sinica.edu.tw) (Author & Maintainer)
26
+
27
+ ## Usage
28
+
29
+ Please use BertTokenizerFast as tokenizer instead of AutoTokenizer.
30
+
31
+ 請使用 BertTokenizerFast 而非 AutoTokenizer。
32
+
33
+ ```
34
+ from transformers import (
35
+ BertTokenizerFast,
36
+ AutoModel,
37
+ )
38
+
39
+ tokenizer = BertTokenizerFast.from_pretrained('bert-base-chinese')
40
+ model = AutoModel.from_pretrained('ckiplab/bert-base-chinese-qa')
41
+ ```
42
+
43
+ For full usage and more information, please refer to https://github.com/ckiplab/ckip-transformers.
44
+
45
+ 有關完整使用方法及其他資訊,請參見 https://github.com/ckiplab/ckip-transformers 。
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForQuestionAnswering"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "directionality": "bidi",
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 0,
20
+ "pooler_fc_size": 768,
21
+ "pooler_num_attention_heads": 12,
22
+ "pooler_num_fc_layers": 3,
23
+ "pooler_size_per_head": 128,
24
+ "pooler_type": "first_token_transform",
25
+ "position_embedding_type": "absolute",
26
+ "tokenizer_class": "BertTokenizerFast",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.21.3",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 21128
32
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b97fee98374da90086cf6dc7e49ffa6c35057e5900bec2bbb7125ea81a807088
3
+ size 406784817
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
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "do_lower_case": false,
4
+ "mask_token": "[MASK]",
5
+ "model_max_length": 512,
6
+ "name_or_path": "bert-base-chinese",
7
+ "pad_token": "[PAD]",
8
+ "sep_token": "[SEP]",
9
+ "special_tokens_map_file": null,
10
+ "strip_accents": null,
11
+ "tokenize_chinese_chars": true,
12
+ "tokenizer_class": "BertTokenizer",
13
+ "unk_token": "[UNK]"
14
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff