KoichiYasuoka
commited on
Commit
•
fa67bf7
1
Parent(s):
1cfee99
initial release
Browse files- README.md +26 -0
- config.json +27 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +20 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- "zh"
|
4 |
+
tags:
|
5 |
+
- "chinese"
|
6 |
+
- "masked-lm"
|
7 |
+
- "wikipedia"
|
8 |
+
license: "cc-by-sa-4.0"
|
9 |
+
pipeline_tag: "fill-mask"
|
10 |
+
mask_token: "[MASK]"
|
11 |
+
---
|
12 |
+
|
13 |
+
# roberta-base-chinese
|
14 |
+
|
15 |
+
## Model Description
|
16 |
+
|
17 |
+
This is a RoBERTa model pre-trained on Chinese Wikipedia texts (both simplified and traditional). You can fine-tune `roberta-base-chinese` for downstream tasks, such as [POS-tagging](https://huggingface.co/KoichiYasuoka/roberta-base-chinese-upos), [dependency-parsing](https://huggingface.co/KoichiYasuoka/roberta-base-chinese-ud-goeswith), and so on.
|
18 |
+
|
19 |
+
## How to Use
|
20 |
+
|
21 |
+
```py
|
22 |
+
from transformers import AutoTokenizer,AutoModelForMaskedLM
|
23 |
+
tokenizer=AutoTokenizer.from_pretrained("KoichiYasuoka/roberta-base-chinese")
|
24 |
+
model=AutoModelForMaskedLM.from_pretrained("KoichiYasuoka/roberta-base-chinese")
|
25 |
+
```
|
26 |
+
|
config.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"RobertaForMaskedLM"
|
4 |
+
],
|
5 |
+
"attention_probs_dropout_prob": 0.1,
|
6 |
+
"bos_token_id": 0,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"eos_token_id": 2,
|
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": "roberta",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 1,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"tokenizer_class": "BertTokenizerFast",
|
22 |
+
"torch_dtype": "float32",
|
23 |
+
"transformers_version": "4.22.1",
|
24 |
+
"type_vocab_size": 2,
|
25 |
+
"use_cache": true,
|
26 |
+
"vocab_size": 26582
|
27 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a67dcef87fec9d56698b921ab879921d3b6ac770783c5e746a79da2e176aeed7
|
3 |
+
size 426006827
|
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.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"do_basic_tokenize": true,
|
4 |
+
"do_lower_case": false,
|
5 |
+
"mask_token": "[MASK]",
|
6 |
+
"model_max_length": 512,
|
7 |
+
"never_split": [
|
8 |
+
"[CLS]",
|
9 |
+
"[PAD]",
|
10 |
+
"[SEP]",
|
11 |
+
"[UNK]",
|
12 |
+
"[MASK]"
|
13 |
+
],
|
14 |
+
"pad_token": "[PAD]",
|
15 |
+
"sep_token": "[SEP]",
|
16 |
+
"strip_accents": false,
|
17 |
+
"tokenize_chinese_chars": true,
|
18 |
+
"tokenizer_class": "BertTokenizerFast",
|
19 |
+
"unk_token": "[UNK]"
|
20 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|