birgermoell commited on
Commit
a27c158
1 Parent(s): 3aeea40

Updated pytorch model export

Browse files
exported_pytorch_model/config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": ".",
3
+ "architectures": [
4
+ "RobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "eos_token_id": 2,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 3072,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 514,
17
+ "model_type": "roberta",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 12,
20
+ "pad_token_id": 1,
21
+ "position_embedding_type": "absolute",
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.9.0.dev0",
24
+ "type_vocab_size": 1,
25
+ "use_cache": true,
26
+ "vocab_size": 50265
27
+ }
exported_pytorch_model/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
exported_pytorch_model/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea3fa1dcdc98e0f6702ebc4dec5962555ad413f2a9795de69371106dfb806a8a
3
+ size 498661169
exported_pytorch_model/special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": false}}
exported_pytorch_model/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
exported_pytorch_model/tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "<unk>", "bos_token": "<s>", "eos_token": "</s>", "add_prefix_space": false, "errors": "replace", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": "<mask>", "special_tokens_map_file": null, "name_or_path": ".", "tokenizer_class": "RobertaTokenizer"}
exported_pytorch_model/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
save_updated.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+
2
+ from transformers import AutoTokenizer, RobertaModel
3
+ model = RobertaModel.from_pretrained('.',from_flax=True)
4
+ tokenizer = AutoTokenizer.from_pretrained(".")
5
+ tokenizer.save_pretrained('exported_pytorch_model')
6
+ model.save_pretrained('exported_pytorch_model')