[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:
co-authored by
Claude Opus 5.5
parent
484c211fe8
commit
d881812500
@@ -15,20 +15,20 @@ import functools
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from transformers import PretrainedConfig
|
||||
from transformers import PreTrainedConfig
|
||||
|
||||
from vllm.config.parallel import ParallelConfig
|
||||
from vllm.config.speculative import SpeculativeConfig
|
||||
|
||||
|
||||
def _make_hf_config(**kwargs) -> PretrainedConfig:
|
||||
def _make_hf_config(**kwargs) -> PreTrainedConfig:
|
||||
defaults = dict(
|
||||
architectures=["LlamaForCausalLM"],
|
||||
model_type="llama",
|
||||
num_hidden_layers=64,
|
||||
)
|
||||
defaults.update(kwargs)
|
||||
return PretrainedConfig(**defaults)
|
||||
return PreTrainedConfig(**defaults)
|
||||
|
||||
|
||||
@pytest.mark.cpu_test
|
||||
@@ -137,7 +137,7 @@ def test_callable_overrides_reach_the_draft_config():
|
||||
"""A callable override (config-to-config transform) composes with the
|
||||
architecture-mapping override and is applied to the draft config."""
|
||||
|
||||
def shrink(hf_config: PretrainedConfig) -> PretrainedConfig:
|
||||
def shrink(hf_config: PreTrainedConfig) -> PreTrainedConfig:
|
||||
hf_config.num_hidden_layers = 1
|
||||
return hf_config
|
||||
|
||||
@@ -155,7 +155,7 @@ def test_arch_mapping_applies_before_callable_override():
|
||||
observes (and may adjust) the post-mapping config."""
|
||||
seen_architectures: list[str] = []
|
||||
|
||||
def record(hf_config: PretrainedConfig) -> PretrainedConfig:
|
||||
def record(hf_config: PreTrainedConfig) -> PreTrainedConfig:
|
||||
seen_architectures.append(hf_config.architectures[0])
|
||||
return hf_config
|
||||
|
||||
@@ -202,7 +202,7 @@ def test_inkling_override_exposes_all_mtp_depths():
|
||||
assert out.local_layer_ids == [0, 2, 4]
|
||||
|
||||
|
||||
def _module_level_shrink(hf_config: PretrainedConfig) -> PretrainedConfig:
|
||||
def _module_level_shrink(hf_config: PreTrainedConfig) -> PreTrainedConfig:
|
||||
hf_config.num_hidden_layers = 1
|
||||
return hf_config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user