fix: update MistralProcessor to be v5 compat (#3423)

* fix: update MistralProcessor to be v5 compat

* feat: add test for mistral3 processor

* chore: comment
This commit is contained in:
NanoCode012
2026-02-23 23:39:13 +07:00
committed by GitHub
parent 5ed455715e
commit 86ca1e27c0
2 changed files with 150 additions and 11 deletions

View File

@@ -30,18 +30,8 @@ class Mistral3Processor(ProcessorMixin):
Wraps HFMistralTokenizer and adds image processing capabilities.
"""
# TODO(nano): This should be removed in transformers V5
attributes = ["tokenizer"]
tokenizer_class = "HFMistralTokenizer"
def __init__(self, tokenizer: HFMistralTokenizer):
# Don't call super().__init__ to avoid the class validation issue
self.tokenizer = tokenizer
@property
def chat_template(self) -> None:
"""Chat template is not supported. Dummy method to satisfy HuggingFace API."""
return None
super().__init__(tokenizer)
@property
def audio_tokenizer(self) -> None: