From b983f4fc7067154ae0680dcaaf941638a577e5fd Mon Sep 17 00:00:00 2001 From: fritzprix Date: Mon, 27 Mar 2023 14:35:02 +0900 Subject: [PATCH] Removed unused `model` variable and verified that the code functions correctly with `vocab_only` setting. Also confirmed that the code works as expected after running with reduced memory usage due to deletion of no-longer-needed variable. --- convert-pth-to-ggml.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/convert-pth-to-ggml.py b/convert-pth-to-ggml.py index ccf2c57b1..d83f8a137 100644 --- a/convert-pth-to-ggml.py +++ b/convert-pth-to-ggml.py @@ -145,13 +145,11 @@ def main(): print(f"Extracting only the vocab from '{fname_model}'\n") - model = torch.load(fname_model, map_location="cpu") with open(fname_out, "wb") as fout: write_header(fout, hparams, ftype) write_tokens(fout, tokenizer) - del model print(f"Done. Output file: {fname_out}\n")