One day, i'll fix off by 1 errors permanently too

This commit is contained in:
Mug 2023-04-28 12:54:28 +02:00
parent c39547a986
commit 3a98747026

View file

@ -463,7 +463,7 @@ class Llama:
for num,pattern in [(2, 192), (3, 224), (4, 240)]:
# Bitwise AND check
if (pattern & token == pattern):
multibyte_fix = num
multibyte_fix = num - 1
if self.cache and len(completion_tokens) == 0:
if prompt_tokens not in self.cache: