Skip to content

Commit 4e887dc

Browse files
committed
Add enconding parameter to vocab.json opening to fix errors
1 parent 4196856 commit 4e887dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/convert-pt-to-ggml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def bytes_to_unicode():
234234
# output in the same directory as the model
235235
fname_out = dir_out + "/ggml-model.bin"
236236

237-
with open(dir_tokenizer + "/vocab.json", "r") as f:
237+
with open(dir_tokenizer + "/vocab.json", "r", encoding="utf8") as f:
238238
tokens = json.load(f)
239239

240240
# use 16-bit or 32-bit floats

0 commit comments

Comments
 (0)