Fix sentencepiece model saving

This commit is contained in:
henk717 2022-02-23 22:04:41 +01:00
parent 6151d16df0
commit 7de3311000
1 changed files with 1 additions and 1 deletions

View File

@ -1063,10 +1063,10 @@ if(not vars.model in ["InferKit", "Colab", "OAI", "ReadOnly", "TPUMeshTransforme
if not args.colab:
import shutil
shutil.rmtree("cache/")
model = model.half()
model.save_pretrained("models/{}".format(vars.model.replace('/', '_')))
tokenizer.save_pretrained("models/{}".format(vars.model.replace('/', '_')))
shutil.rmtree("cache/")
if(vars.hascuda):
if(vars.usegpu):