pere commited on
Commit
c581921
1 Parent(s): b7ec3b6

save model script

Browse files
Files changed (3) hide show
  1. config.json +2 -2
  2. generate_pytorch_model.py +4 -4
  3. pytorch_model.bin +2 -2
config.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
- "_name_or_path": ".",
3
  "architectures": [
4
- "RobertaModel"
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(".",from_flax=True)
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:fe7566fa48538d19b771ecebd60b91f7d294e0e0365368f95cd7610ea258801b
3
- size 498661169
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95e26332a282f00db4b34330bceaec2b4bc6c2a6166aeef8692dcf9ee7a5881a
3
+ size 498872555