python/pytorch compat notes (#44)

This commit is contained in:
Oleksandr Nikitin 2023-03-12 14:16:33 +02:00 committed by GitHub
parent 129c7d1ea8
commit b9bd1d0141
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -86,6 +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)
fout = open(fname_out, "wb")