File size: 555 Bytes
00aad8d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from transformers.modeling_flax_pytorch_utils import load_flax_checkpoint_in_pytorch_model
from transformers import T5Config, T5Model
config = T5Config.from_pretrained("./")
model = T5Model(config)
load_flax_checkpoint_in_pytorch_model(model, "./flax_model.msgpack")
model.save_pretrained("./")
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("./")
tokenizer.save_pretrained("./")
('./tokenizer_config.json',
'./special_tokens_map.json',
'./vocab.json',
'./merges.txt',
'./added_tokens.json',
'./tokenizer.json') |