aboutsummaryrefslogtreecommitdiff
path: root/convert-pth-to-ggml.py
diff options
context:
space:
mode:
authorOleksandr Nikitin <oleksandr@tvori.info>2023-03-12 14:16:33 +0200
committerGitHub <noreply@github.com>2023-03-12 14:16:33 +0200
commitb9bd1d014113b7498f04ad4d28e6021d5f4cddad (patch)
treed9da0d2d216cbd20622ecee281c646eb4694cb1d /convert-pth-to-ggml.py
parent129c7d1ea886e52ac1b87ff6184310bab3158806 (diff)
python/pytorch compat notes (#44)
Diffstat (limited to 'convert-pth-to-ggml.py')
-rw-r--r--convert-pth-to-ggml.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/convert-pth-to-ggml.py b/convert-pth-to-ggml.py
index 98693e3..ef50fc6 100644
--- a/convert-pth-to-ggml.py
+++ b/convert-pth-to-ggml.py
@@ -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")