Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Model] Add mistral function calling format to all models loaded with "mistral" format #8515

Merged
Prev Previous commit
Next Next commit
Apply suggestion
  • Loading branch information
DarkLight1337 committed Sep 17, 2024
commit 1ec00bc99fa39349d20e2f4082de7e6bec2ab52c
4 changes: 2 additions & 2 deletions vllm/transformers_utils/tokenizers/mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ def apply_chat_template(self,

def convert_tokens_to_string(self, tokens: List[str]) -> str:
if isinstance(self.tokenizer, Tekkenizer):
return "".join([
return "".join(
t for t in tokens
if t not in self.tokenizer._all_special_tokens
])
)
else:
return self.tokenizer.decode(tokens) # type: ignore[arg-type]

Expand Down
Loading