save model script
Browse files- config.json +2 -2
- generate_pytorch_model.py +4 -4
- pytorch_model.bin +2 -2
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 |
+
"RobertaForMaskedLM"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
"bos_token_id": 0,
|
generate_pytorch_model.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# This script overwrites any existing PyTorch model. Generates a new one with an LM head from the pretrained Flax model.
|
2 |
from transformers import RobertaForMaskedLM, AutoTokenizer
|
3 |
-
model = RobertaForMaskedLM.from_pretrained("
|
4 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
5 |
-
tokenizer.save_pretrained("
|
6 |
-
model.save_pretrained("
|
7 |
|
|
|
1 |
# This script overwrites any existing PyTorch model. Generates a new one with an LM head from the pretrained Flax model.
|
2 |
from transformers import RobertaForMaskedLM, AutoTokenizer
|
3 |
+
model = RobertaForMaskedLM.from_pretrained("./",from_flax=True)
|
4 |
+
tokenizer = AutoTokenizer.from_pretrained("./")
|
5 |
+
tokenizer.save_pretrained("./")
|
6 |
+
model.save_pretrained("./")
|
7 |
|
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:95e26332a282f00db4b34330bceaec2b4bc6c2a6166aeef8692dcf9ee7a5881a
|
3 |
+
size 498872555
|