mirror of
https://github.com/turboderp-org/exllamav2.git
synced 2026-05-11 08:20:29 +00:00
Fix 2-byte UTF8 decoding
This commit is contained in:
@@ -220,6 +220,7 @@ class ExLlamaV2StreamingGenerator(ExLlamaV2BaseGenerator):
|
||||
b = id_to_ord[t]
|
||||
|
||||
if 0 < b < 256:
|
||||
if b & 0b1100000 == 0b1000000: self.expect_utf8 = 2
|
||||
if b & 0b1110000 == 0b1100000: self.expect_utf8 = 3
|
||||
if b & 0b1111000 == 0b1110000: self.expect_utf8 = 4
|
||||
if b & 0b1111100 == 0b1111000: self.expect_utf8 = 5
|
||||
|
||||
Reference in New Issue
Block a user