Skip to content

Commit 3a98747

Browse files
author
Mug
committed
One day, i'll fix off by 1 errors permanently too
1 parent c39547a commit 3a98747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama_cpp/llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def _create_completion(
463463
for num,pattern in [(2, 192), (3, 224), (4, 240)]:
464464
# Bitwise AND check
465465
if (pattern & token == pattern):
466-
multibyte_fix = num
466+
multibyte_fix = num - 1
467467

468468
if self.cache and len(completion_tokens) == 0:
469469
if prompt_tokens not in self.cache:

0 commit comments

Comments
 (0)