Skip to content

Commit

Permalink
style: Black
Browse files Browse the repository at this point in the history
  • Loading branch information
saattrupdan authored and rlouf committed Jan 23, 2025
1 parent 1a42ce2 commit 56f1930
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions outlines/models/vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 56f1930

Please sign in to comment.