Skip to content

Commit b9bd1d0

Browse files
authored
python/pytorch compat notes (abetlen#44)
1 parent 129c7d1 commit b9bd1d0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ ls ./models
136136
65B 30B 13B 7B tokenizer_checklist.chk tokenizer.model
137137

138138
# install Python dependencies
139+
# preferred versions: python 3.10 (not 3.11), torch 1.13.1+
139140
python3 -m pip install torch numpy sentencepiece
140141

141142
# convert the 7B model to ggml FP16 format

convert-pth-to-ggml.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def get_n_parts(dim):
8686
if (p > 0):
8787
fname_out = sys.argv[1] + "/ggml-model-" + ftype_str[ftype] + ".bin" + "." + str(p)
8888

89+
# weights_only requires torch 1.13.1, remove this param or update if you get an "invalid keyword argument" error
8990
model = torch.load(fname_model, map_location="cpu", weights_only=True)
9091

9192
fout = open(fname_out, "wb")

0 commit comments

Comments
 (0)