Deprecate Transformers v4 support (#45161)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -56,11 +56,6 @@ class MistralCommonPixtralProcessor(ProcessorMixin):
|
||||
image_processor: MistralCommonImageProcessor,
|
||||
) -> None:
|
||||
self.tokenizer = tokenizer.transformers_tokenizer
|
||||
|
||||
# Back-compatibility for Transformers v4
|
||||
if not hasattr(self.tokenizer, "init_kwargs"):
|
||||
self.tokenizer.init_kwargs = {}
|
||||
|
||||
self.image_processor = image_processor
|
||||
|
||||
image_special_ids = self.image_processor.mm_encoder.special_ids
|
||||
|
||||
@@ -111,11 +111,6 @@ class MistralCommonVoxtralProcessor(ProcessorMixin):
|
||||
feature_extractor: MistralCommonFeatureExtractor,
|
||||
) -> None:
|
||||
self.tokenizer = tokenizer.transformers_tokenizer
|
||||
|
||||
# Back-compatibility for Transformers v4
|
||||
if not hasattr(self.tokenizer, "init_kwargs"):
|
||||
self.tokenizer.init_kwargs = {}
|
||||
|
||||
self.feature_extractor = feature_extractor
|
||||
|
||||
audio_special_ids = self.feature_extractor.audio_encoder.special_ids
|
||||
|
||||
Reference in New Issue
Block a user