[Bugfix] Handle mistral tokenizer in get_hf_processor (#31817)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -1186,10 +1186,16 @@ class InputProcessingContext:
|
||||
|
||||
typ = ProcessorMixin
|
||||
|
||||
from vllm.tokenizers.mistral import MistralTokenizer
|
||||
|
||||
tokenizer = self.tokenizer
|
||||
if isinstance(tokenizer, MistralTokenizer):
|
||||
tokenizer = tokenizer.transformers_tokenizer
|
||||
|
||||
return cached_processor_from_config(
|
||||
self.model_config,
|
||||
processor_cls=typ,
|
||||
tokenizer=self.tokenizer,
|
||||
tokenizer=tokenizer,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user