tugstugi commited on
Commit
60a73d2
1 Parent(s): e8a8756

initial commit

Browse files
README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: "mn"
3
+ tags:
4
+ - bert
5
+ - mongolian
6
+ - uncased
7
+ ---
8
+
9
+ # BERT-BASE-MONGOLIAN-UNCASED
10
+ [Link to Official Mongolian-BERT repo](https://github.com/tugstugi/mongolian-bert)
11
+
12
+ ## Model description
13
+ This repository contains pre-trained Mongolian [BERT](https://arxiv.org/abs/1810.04805) models trained by [tugstugi](https://github.com/tugstugi), [enod](https://github.com/enod) and [sharavsambuu](https://github.com/sharavsambuu).
14
+ Special thanks to [nabar](https://github.com/nabar) who provided 5x TPUs.
15
+
16
+ This repository is based on the following open source projects: [google-research/bert](https://github.com/google-research/bert/),
17
+ [huggingface/pytorch-pretrained-BERT](https://github.com/huggingface/pytorch-pretrained-BERT) and [yoheikikuta/bert-japanese](https://github.com/yoheikikuta/bert-japanese).
18
+
19
+ #### How to use
20
+
21
+ ```python
22
+ from transformers import pipeline, AutoTokenizer, BertForMaskedLM
23
+
24
+ tokenizer = AutoTokenizer.from_pretrained('tugstugi/bert-base-mongolian-uncased')
25
+ model = BertForMaskedLM.from_pretrained('tugstugi/bert-base-mongolian-uncased')
26
+
27
+ ## declare task ##
28
+ pipe = pipeline(task="fill-mask", model=model, tokenizer=tokenizer)
29
+
30
+ ## example ##
31
+ input_ = 'Миний [MASK] хоол идэх нь тун чухал.'
32
+
33
+ output_ = pipe(input_)
34
+ for i in range(len(output_)):
35
+ print(output_[i])
36
+
37
+ ```
38
+
39
+
40
+ ## Training data
41
+ Mongolian Wikipedia and the 700 million word Mongolian news data set [[Pretraining Procedure](https://github.com/tugstugi/mongolian-bert#pre-training)]
42
+
43
+ ### BibTeX entry and citation info
44
+
45
+ ```bibtex
46
+ @misc{mongolian-bert,
47
+ author = {Tuguldur, Erdene-Ochir and Gunchinish, Sharavsambuu and Bataa, Enkhbold},
48
+ title = {BERT Pretrained Models on Mongolian Datasets},
49
+ year = {2019},
50
+ publisher = {GitHub},
51
+ journal = {GitHub repository},
52
+ howpublished = {\url{https://github.com/tugstugi/mongolian-bert/}}
53
+ }
54
+ ```
added_tokens.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"<pad>": 32000}
config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForMaskedLM"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "gradient_checkpointing": false,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 768,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 3072,
12
+ "layer_norm_eps": 1e-12,
13
+ "max_position_embeddings": 512,
14
+ "model_type": "bert",
15
+ "num_attention_heads": 12,
16
+ "num_hidden_layers": 12,
17
+ "pad_token_id": 0,
18
+ "type_vocab_size": 2,
19
+ "vocab_size": 32000,
20
+ "tokenizer_class": "AlbertTokenizer"
21
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:866380e7756622c93c94b7ffc28cf036b3e621f5e2f596b2d7886c55577d771b
3
+ size 445054385
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "[CLS]", "eos_token": "[SEP]", "unk_token": "<unk>", "sep_token": "[SEP]", "pad_token": "<pad>", "cls_token": "[CLS]", "mask_token": "[MASK]"}
spiece.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19914d955b6d028592b0a331a43b7235b860e5e4964e46e8c004a21eee0b2b27
3
+ size 1007226
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d07d2e1fdb92e85536c0330f5f5c7b46dd0304b3e6722868bd6b2df47a65c7e4
3
+ size 545136208
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"keep_accents": true, "do_lower_case": true}