another attempt
Browse files- config.json +1 -1
- pytorch_model.bin +2 -2
- save_model.py +10 -0
- tokenizer_config.json +1 -1
config.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
"_name_or_path": ".",
|
3 |
"architectures": [
|
4 |
-
"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
"bos_token_id": 0,
|
|
|
1 |
{
|
2 |
"_name_or_path": ".",
|
3 |
"architectures": [
|
4 |
+
"RobertaModel"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
"bos_token_id": 0,
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fe7566fa48538d19b771ecebd60b91f7d294e0e0365368f95cd7610ea258801b
|
3 |
+
size 498661169
|
save_model.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers.modeling_flax_pytorch_utils import load_flax_checkpoint_in_pytorch_model
|
2 |
+
from transformers import RobertaConfig, RobertaModel
|
3 |
+
config = RobertaConfig.from_pretrained("./")
|
4 |
+
model = RobertaModel(config)
|
5 |
+
load_flax_checkpoint_in_pytorch_model(model, "./flax_model.msgpack")
|
6 |
+
model.save_pretrained("./")
|
7 |
+
from transformers import AutoTokenizer
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained("./")
|
9 |
+
tokenizer.save_pretrained("./")
|
10 |
+
('./tokenizer_config.json','./special_tokens_map.json', './vocab.json', './merges.txt','./added_tokens.json','./tokenizer.json')
|
tokenizer_config.json
CHANGED
@@ -1 +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": "
|
|
|
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"}
|