Skip to content

Commit

Permalink
chore: fix ci lint
Browse files Browse the repository at this point in the history
  • Loading branch information
e1ijah1 committed Jan 13, 2025
1 parent 714d54b commit b6770d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions benchmarks/backend_request_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,13 @@ def get_tokenizer(
**kwargs,
) -> Union[PreTrainedTokenizer, PreTrainedTokenizerFast]:
if pretrained_model_name_or_path is not None and not os.path.exists(
pretrained_model_name_or_path
):
pretrained_model_name_or_path = get_model(pretrained_model_name_or_path)
pretrained_model_name_or_path):
pretrained_model_name_or_path = get_model(
pretrained_model_name_or_path)
if tokenizer_mode == "slow":
if kwargs.get("use_fast", False):
raise ValueError(
"Cannot use the fast tokenizer in slow tokenizer mode."
)
"Cannot use the fast tokenizer in slow tokenizer mode.")
kwargs["use_fast"] = False
if tokenizer_mode == "mistral":
vllm_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand All @@ -439,7 +438,8 @@ def get_tokenizer(
MistralTokenizer
)

return MistralTokenizer.from_pretrained(str(pretrained_model_name_or_path))
return MistralTokenizer.from_pretrained(
str(pretrained_model_name_or_path))
else:
return AutoTokenizer.from_pretrained(
pretrained_model_name_or_path,
Expand Down

0 comments on commit b6770d9

Please sign in to comment.