[Bugfix] Handle mistral tokenizer in get_hf_processor (#31817)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2026-01-07 07:46:56 +08:00
committed by GitHub
parent e5d427e93a
commit 309a8f66ee

View File

@@ -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,
)