[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
@@ -11,7 +11,7 @@ from typing import cast
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from transformers import PretrainedConfig
|
||||
from transformers import PreTrainedConfig
|
||||
|
||||
from vllm.config.model import ModelConfig
|
||||
from vllm.tokenizers import get_tokenizer
|
||||
@@ -223,7 +223,7 @@ def test_model_config_generation_fallback_forwards_code_revision():
|
||||
patch.object(
|
||||
config_module,
|
||||
"get_config",
|
||||
return_value=PretrainedConfig(),
|
||||
return_value=PreTrainedConfig(),
|
||||
) as get_config,
|
||||
):
|
||||
ModelConfig.try_get_generation_config(model_config)
|
||||
@@ -269,7 +269,7 @@ def test_safetensors_metadata_of_repo_without_safetensors():
|
||||
],
|
||||
)
|
||||
def test_mrope_num_dims(section_key, mrope_section, expected_num_dims):
|
||||
config = PretrainedConfig()
|
||||
config = PreTrainedConfig()
|
||||
config.rope_parameters = {"rope_type": "default", section_key: mrope_section}
|
||||
|
||||
assert uses_mrope(config)
|
||||
@@ -280,7 +280,7 @@ def test_mrope_num_dims(section_key, mrope_section, expected_num_dims):
|
||||
def test_mrope_num_dims_from_config_attribute(section_name):
|
||||
"""Some configs expose the section as an attribute rather than under
|
||||
`rope_parameters`."""
|
||||
config = PretrainedConfig()
|
||||
config = PreTrainedConfig()
|
||||
setattr(config, section_name, [16, 16, 16, 16])
|
||||
|
||||
assert uses_mrope(config)
|
||||
@@ -289,7 +289,7 @@ def test_mrope_num_dims_from_config_attribute(section_name):
|
||||
|
||||
def test_mrope_num_dims_from_nested_rope_parameters():
|
||||
"""Sections nested by layer type must be found, not silently defaulted."""
|
||||
config = PretrainedConfig()
|
||||
config = PreTrainedConfig()
|
||||
config.rope_parameters = {
|
||||
"full_attention": {"mrope_section": [16, 16, 16, 16]},
|
||||
"linear_attention": {"rope_type": "default"},
|
||||
@@ -300,4 +300,4 @@ def test_mrope_num_dims_from_nested_rope_parameters():
|
||||
|
||||
|
||||
def test_mrope_num_dims_without_mrope():
|
||||
assert mrope_num_dims(PretrainedConfig()) == 0
|
||||
assert mrope_num_dims(PreTrainedConfig()) == 0
|
||||
|
||||
Reference in New Issue
Block a user