We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be3de0f commit 4314792Copy full SHA for 4314792
exllamav2/generator/dynamic.py
@@ -2001,12 +2001,12 @@ def emit(
2001
2002
# Hold text if it contains an incomplete character
2003
2004
- if self.held_text.endswith("�") and not self.held_text.endswith("�����"):
+ if 1 <= self.held_text.count("�") < 5:
2005
test_decode = self.generator.tokenizer.decode(
2006
self.held_tokens.torch(),
2007
decode_special_tokens = self.decode_special_tokens
2008
)[0]
2009
- if not test_decode.endswith("�"):
+ if not "�" in test_decode:
2010
self.held_text = test_decode
2011
else:
2012
return emit(results)
0 commit comments