Revert "weights_only" arg - this causing more trouble than help

This commit is contained in:
Georgi Gerganov 2023-03-12 20:59:01 +02:00
parent b9bd1d0141
commit 7c9e54e55e
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 1 additions and 3 deletions

View File

@ -136,7 +136,6 @@ ls ./models
65B 30B 13B 7B tokenizer_checklist.chk tokenizer.model
# install Python dependencies
# preferred versions: python 3.10 (not 3.11), torch 1.13.1+
python3 -m pip install torch numpy sentencepiece
# convert the 7B model to ggml FP16 format

View File

@ -86,8 +86,7 @@ for p in range(n_parts):
if (p > 0):
fname_out = sys.argv[1] + "/ggml-model-" + ftype_str[ftype] + ".bin" + "." + str(p)
# weights_only requires torch 1.13.1, remove this param or update if you get an "invalid keyword argument" error
model = torch.load(fname_model, map_location="cpu", weights_only=True)
model = torch.load(fname_model, map_location="cpu")
fout = open(fname_out, "wb")