1
1
mirror of https://github.com/KoboldAI/KoboldAI-Client.git synced 2025-04-16 03:07:21 +02:00

Fix sentencepiece model saving

This commit is contained in:
henk717 2022-02-23 22:04:41 +01:00
parent 6151d16df0
commit 7de3311000

@ -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):