Skip to content

Commit

Permalink
fix missing token issue
Browse files Browse the repository at this point in the history
  • Loading branch information
r0y6a3n0 committed Oct 17, 2022
1 parent 0ad085f commit 949f97a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion convert-pt-to-ggml.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def bytes_to_unicode():
fout.write(struct.pack("i", len(tokens)))

for key in tokens:
text = bytearray([byte_decoder[c] for c in key]).decode('utf-8', errors='replace').encode('utf-8')
text = bytearray([byte_decoder[c] for c in key])
fout.write(struct.pack("i", len(text)))
fout.write(text)

Expand Down

0 comments on commit 949f97a

Please sign in to comment.