suppress numerals change logic

This commit is contained in:
Max Bain
2023-06-05 15:44:17 +01:00
parent 74a00eecd7
commit d7f1d16f19

View File

@ -17,7 +17,8 @@ def find_numeral_symbol_tokens(tokenizer):
numeral_symbol_tokens = []
for i in range(tokenizer.eot):
token = tokenizer.decode([i]).removeprefix(" ")
if all(c in "0123456789@#%&*+=_$:-.,?!" for c in token):
has_numeral_symbol = any(c in "0123456789%" for c in token)
if has_numeral_symbol:
numeral_symbol_tokens.append(i)
return numeral_symbol_tokens