]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
py : removed unused `model` variable and verified that the code functions correctly...
authorDooWoong Lee (David) <redacted>
Tue, 28 Mar 2023 17:02:34 +0000 (02:02 +0900)
committerGitHub <redacted>
Tue, 28 Mar 2023 17:02:34 +0000 (20:02 +0300)
convert-pth-to-ggml.py

index ccf2c57b1e6970aaa9077a8eb1977fa398c924e2..d83f8a13732517c09894c4008fbb2eec253bc99d 100644 (file)
@@ -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")