diff --git a/convert-falcon-hf-to-gguf.py b/convert-falcon-hf-to-gguf.py index 6ed2b88c6712..dcddd898faf6 100755 --- a/convert-falcon-hf-to-gguf.py +++ b/convert-falcon-hf-to-gguf.py @@ -154,7 +154,7 @@ def parse_args() -> argparse.Namespace: text = bytearray() for c in reverse_vocab[i]: if ord(c) < 256: # single byte character - text.append(byte_decoder[ord(c)]) + text.append(byte_encoder[ord(c)]) else: # multibyte special token character text.extend(c.encode('utf-8')) else: diff --git a/convert-gptneox-hf-to-gguf.py b/convert-gptneox-hf-to-gguf.py index b9c8b4607e59..2b443fafcf4d 100755 --- a/convert-gptneox-hf-to-gguf.py +++ b/convert-gptneox-hf-to-gguf.py @@ -149,7 +149,7 @@ def parse_args() -> argparse.Namespace: text = bytearray() for c in reverse_vocab[i]: if ord(c) < 256: # single byte character - text.append(byte_decoder[ord(c)]) + text.append(byte_encoder[ord(c)]) else: # multibyte special token character text.extend(c.encode('utf-8')) else: