Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLight1337 committed Aug 28, 2024
1 parent 61ea59c commit 5a97c5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vllm/transformers_utils/tokenizers/mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ def __init__(self, tokenizer: PublicMistralTokenizer) -> None:
assert isinstance(self.tokenizer,
(Tekkenizer, SentencePieceTokenizer)), type(
self.tokenizer)
self._is_tekken = isinstance(self.tokenizer, Tekkenizer)

if self._is_tekken:
if (is_tekken := isinstance(self.tokenizer, Tekkenizer)):
# Make sure special tokens will not raise
self.tokenizer.special_token_policy = SpecialTokenPolicy.IGNORE

self._is_tekken = is_tekken

# the following attributes are set to fit VLLM's design
self.is_fast = True
self.chat_template = True
Expand Down

0 comments on commit 5a97c5b

Please sign in to comment.