diff options
author | DooWoong Lee (David) <manics99@naver.com> | 2023-03-29 02:02:34 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 20:02:34 +0300 |
commit | 692ce3164ef1201ecb9cfad315cc0a08b965adb8 (patch) | |
tree | 512b4e921fa098c39b5d98b57438cb1ef3843c21 /convert-pth-to-ggml.py | |
parent | 96f9c0506fa81cada6f96f45768c34f45406c4bb (diff) |
py : 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. (#547)
Diffstat (limited to 'convert-pth-to-ggml.py')
-rw-r--r-- | convert-pth-to-ggml.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/convert-pth-to-ggml.py b/convert-pth-to-ggml.py index ccf2c57..d83f8a1 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") |