upload model files
Browse files- README.md +46 -0
- config.json +40 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- vocab.txt +0 -0
README.md
CHANGED
@@ -1,3 +1,49 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: gpl-3.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- zh
|
4 |
+
thumbnail: https://ckip.iis.sinica.edu.tw/files/ckip_logo.png
|
5 |
+
tags:
|
6 |
+
- pytorch
|
7 |
+
- token-classification
|
8 |
+
- bert
|
9 |
+
- zh
|
10 |
license: gpl-3.0
|
11 |
---
|
12 |
+
|
13 |
+
# CKIP Oldhan BERT Base Chinese WS
|
14 |
+
|
15 |
+
This model provides word segmentation for the oldhan Chinese language. Our training dataset covers four eras of the Chinese language.
|
16 |
+
|
17 |
+
## Homepage
|
18 |
+
* [ckiplab/han-transformers](https://github.com/ckiplab/han-transformers)
|
19 |
+
|
20 |
+
## Training Datasets
|
21 |
+
The copyright of the datasets belongs to the Institute of Linguistics, Academia Sinica.
|
22 |
+
* [中央研究院上古漢語標記語料庫](http://lingcorpus.iis.sinica.edu.tw/cgi-bin/kiwi/akiwi/kiwi.sh?ukey=-406192123&qtype=-1)
|
23 |
+
* [中央研究院中古漢語語料庫](http://lingcorpus.iis.sinica.edu.tw/cgi-bin/kiwi/dkiwi/kiwi.sh?ukey=852967425&qtype=-1)
|
24 |
+
* [中央研究院近代漢語語料庫](http://lingcorpus.iis.sinica.edu.tw/cgi-bin/kiwi/pkiwi/kiwi.sh?ukey=-299696128&qtype=-1)
|
25 |
+
* [中央研究院現代漢語語料庫](http://lingcorpus.iis.sinica.edu.tw/cgi-bin/kiwi/mkiwi/kiwi.sh)
|
26 |
+
|
27 |
+
## Contributors
|
28 |
+
* Chin-Tung Lin at [CKIP](https://ckip.iis.sinica.edu.tw/)
|
29 |
+
|
30 |
+
## Usage
|
31 |
+
|
32 |
+
* Using our model in your script
|
33 |
+
```python
|
34 |
+
from transformers import (
|
35 |
+
AutoTokenizer,
|
36 |
+
AutoModel,
|
37 |
+
)
|
38 |
+
|
39 |
+
tokenizer = AutoTokenizer.from_pretrained("ckiplab/oldhan-bert-base-chinese-ws")
|
40 |
+
model = AutoModel.from_pretrained("ckiplab/oldhan-bert-base-chinese-ws")
|
41 |
+
```
|
42 |
+
|
43 |
+
* Using our model for inference
|
44 |
+
```python
|
45 |
+
>>> from transformers import pipeline
|
46 |
+
>>> classifier = pipeline("token-classification", model="ckiplab/oldhan-bert-base-chinese-ws")
|
47 |
+
>>> classifier("帝堯曰放勳")
|
48 |
+
|
49 |
+
```
|
config.json
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "hub/ckiplab/bert-base-chinese-20210817-001848",
|
3 |
+
"architectures": [
|
4 |
+
"BertForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
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 |
+
"label2id": {
|
14 |
+
"B": 0,
|
15 |
+
"I": 1
|
16 |
+
},
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"intermediate_size": 3072,
|
19 |
+
"id2label": {
|
20 |
+
"0": "B",
|
21 |
+
"1": "I"
|
22 |
+
},
|
23 |
+
"layer_norm_eps": 1e-12,
|
24 |
+
"max_position_embeddings": 512,
|
25 |
+
"model_type": "bert",
|
26 |
+
"num_attention_heads": 12,
|
27 |
+
"num_hidden_layers": 12,
|
28 |
+
"pad_token_id": 0,
|
29 |
+
"pooler_fc_size": 768,
|
30 |
+
"pooler_num_attention_heads": 12,
|
31 |
+
"pooler_num_fc_layers": 3,
|
32 |
+
"pooler_size_per_head": 128,
|
33 |
+
"pooler_type": "first_token_transform",
|
34 |
+
"position_embedding_type": "absolute",
|
35 |
+
"tokenizer_class": "BertTokenizerFast",
|
36 |
+
"transformers_version": "4.7.0",
|
37 |
+
"type_vocab_size": 2,
|
38 |
+
"use_cache": true,
|
39 |
+
"vocab_size": 26140
|
40 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:77687080ddfd8fe3a74f3d0baac12b6a69a615396b6d74d8dfda0ffe172eedd7
|
3 |
+
size 422162983
|
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.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
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, "model_max_length": 512, "name_or_path": "hub/ckiplab/bert-base-chinese-20210817-001848", "special_tokens_map_file": "/home/cindy666/.cache/huggingface/transformers/d8a1a1b7a3de221ae53bf9d55154b9df9c4cda18409b393ee0fda4bce4ca7818.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d", "do_basic_tokenize": true, "never_split": null}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|