Matej Martinc commited on
Commit
88a2027
1 Parent(s): 25d64e7

adding model files

Browse files
README.md CHANGED
@@ -1,3 +1,44 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # bert-small-buddhist-nonbuddhist-sanskrit
2
+
3
+ BERT model trained on a lemmatized corpus containing Buddhist and non-Buddhist Sanskrit texts.
4
+
5
+ ## Model description
6
+
7
+ The model has the bert architecture and was pretrained from scratch as a masked language model
8
+ on the lemmatized Sanskrit corpus. Due to lack of resources and to prevent overfitting, the model is smaller than bert-base,
9
+ i.e. the number of attention heads and hidden layers have been reduced to 8 and the context has been reduced to 128 tokens. Vocabulary size is 10000 tokens.
10
+
11
+ ## How to use it
12
+
13
+ ```
14
+ model = AutoModelForMaskedLM.from_pretrained("Matej/bert-small-buddhist-nonbuddhist-sanskrit")
15
+ tokenizer = AutoTokenizer.from_pretrained("Matej/bert-small-buddhist-nonbuddhist-sanskrit", use_fast=True)
16
+ ```
17
+
18
+ ## Intended uses & limitations
19
+
20
+ MIT license, no limitations
21
+
22
+ ## Training and evaluation data
23
+
24
+ See the paper 'Embeddings models for Buddhist Sanskrit' for details on the corpora and the evaluation procedure.
25
+
26
+ ### Training hyperparameters
27
+
28
+ The following hyperparameters were used during training:
29
+ - learning_rate: 5e-05
30
+ - train_batch_size: 32
31
+ - eval_batch_size: 4
32
+ - seed: 42
33
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
34
+ - lr_scheduler_type: linear
35
+ - num_epochs: 200
36
+
37
+ ### Framework versions
38
+
39
+ - Transformers 4.20.0
40
+ - Pytorch 1.9.0
41
+ - Datasets 2.3.2
42
+ - Tokenizers 0.12.1
43
+
44
+
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "configs/models_reference_tokens_all_short_small.json",
3
+ "architectures": [
4
+ "BertForMaskedLM"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 3072,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 128,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 8,
17
+ "num_hidden_layers": 8,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.20.1",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 10000
25
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:868f218809024aa909b83949a12ec39dacbf173141e27fd5d3890e40427c559d
3
+ size 260392875
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,3 @@
 
 
 
 
1
+ {
2
+ "tokenizer_class": "PreTrainedTokenizerFast"
3
+ }