[Chore] Use Transformers v5 names and drop redundant processor use_fast (#58550)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Harry Mellor
2026-09-24 14:14:10 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 484c211fe8
commit d881812500
218 changed files with 869 additions and 813 deletions
@@ -14,7 +14,7 @@ from types import SimpleNamespace
from typing import cast
import pytest
from transformers import PretrainedConfig
from transformers import PreTrainedConfig
from vllm.config import ModelConfig
from vllm.model_executor.models.config import (
@@ -23,7 +23,7 @@ from vllm.model_executor.models.config import (
)
def _model_config(hf_config: PretrainedConfig) -> ModelConfig:
def _model_config(hf_config: PreTrainedConfig) -> ModelConfig:
"""Minimal stand-in for ModelConfig; only hf_config is read."""
return cast(ModelConfig, SimpleNamespace(hf_config=hf_config))
@@ -42,7 +42,7 @@ def test_encoder_backbone_enables_bidirectional_attention():
EncoderOnlyAttention; JinaEmbeddingsV5Model then dispatches to the encoder
implementation.
"""
hf_config = PretrainedConfig(is_decoder=False)
hf_config = PreTrainedConfig(is_decoder=False)
JinaEmbeddingsV5ModelConfig.verify_and_update_model_config(_model_config(hf_config))
@@ -55,13 +55,13 @@ def test_supported_decoder_backbone_is_accepted():
`-small` omits `is_decoder` entirely, so an absent attribute has to be
treated as a decoder. The first assertion pins that assumption: if
PretrainedConfig ever gains an `is_decoder=False` default, this fails here
PreTrainedConfig ever gains an `is_decoder=False` default, this fails here
rather than silently rejecting a supported checkpoint.
"""
absent = PretrainedConfig()
absent = PreTrainedConfig()
assert not hasattr(absent, "is_decoder")
JinaEmbeddingsV5ModelConfig.verify_and_update_model_config(_model_config(absent))
JinaEmbeddingsV5ModelConfig.verify_and_update_model_config(
_model_config(PretrainedConfig(is_decoder=True))
_model_config(PreTrainedConfig(is_decoder=True))
)