Skip to content

Commit 692ce31

Browse files
authored
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)
1 parent 96f9c05 commit 692ce31

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

convert-pth-to-ggml.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,11 @@ def main():
145145

146146
print(f"Extracting only the vocab from '{fname_model}'\n")
147147

148-
model = torch.load(fname_model, map_location="cpu")
149148

150149
with open(fname_out, "wb") as fout:
151150
write_header(fout, hparams, ftype)
152151
write_tokens(fout, tokenizer)
153152

154-
del model
155153

156154
print(f"Done. Output file: {fname_out}\n")
157155

0 commit comments

Comments
 (0)