diff --git a/outlines/models/vllm.py b/outlines/models/vllm.py index 982b57293..ea7eb19ee 100644 --- a/outlines/models/vllm.py +++ b/outlines/models/vllm.py @@ -232,11 +232,7 @@ def convert_token_to_string( string = tokenizer.convert_tokens_to_string([token]) # A hack to handle missing spaces to HF's Llama tokenizers - if ( - type(token) is str - and token.startswith(SPIECE_UNDERLINE) - or token == "<0x20>" - ): + if type(token) is str and token.startswith(SPIECE_UNDERLINE) or token == "<0x20>": return " " + string return string