[Model] Use upstream GLM-5.3 and Qwen4-Exp configs and processor (#57387)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
866f02db8a
commit
e3cae8d2ac
@@ -24,11 +24,6 @@ from vllm.transformers_utils.config import (
|
||||
try_get_generation_config,
|
||||
uses_mrope,
|
||||
)
|
||||
from vllm.transformers_utils.configs.glm5_next import (
|
||||
Glm5NextConfig,
|
||||
Glm5NextTextConfig,
|
||||
Glm5NextVisionConfig,
|
||||
)
|
||||
from vllm.transformers_utils.configs.mistral import adapt_config_dict
|
||||
|
||||
|
||||
@@ -174,54 +169,6 @@ def test_mistral_yarn_apply_scale_false_disables_yarn_magnitude_scaling():
|
||||
assert config.rope_parameters["attention_factor"] == 1.0
|
||||
|
||||
|
||||
def test_glm5_next_accepts_deepseek_sparse_attention_layers():
|
||||
layer_types = ["linear_attention", "deepseek_sparse_attention"]
|
||||
|
||||
config = Glm5NextTextConfig(
|
||||
num_hidden_layers=len(layer_types), layer_types=layer_types
|
||||
)
|
||||
|
||||
assert config.layer_types == layer_types
|
||||
assert config.layers_block_type == ["linear_attention", "attention"]
|
||||
|
||||
|
||||
def test_glm5_next_accepts_prebuilt_subconfigs():
|
||||
text_config = Glm5NextTextConfig(hidden_size=1024)
|
||||
vision_config = Glm5NextVisionConfig(hidden_size=768)
|
||||
|
||||
config = Glm5NextConfig(
|
||||
text_config=text_config,
|
||||
vision_config=vision_config,
|
||||
)
|
||||
|
||||
assert config.text_config is text_config
|
||||
assert config.vision_config is vision_config
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("kwargs", "option"),
|
||||
[
|
||||
(
|
||||
{"index_topk": 2048, "index_dsa_use_layernorm": False},
|
||||
"index_dsa_use_layernorm",
|
||||
),
|
||||
(
|
||||
{"index_topk": 2048, "index_kpool_compress": False},
|
||||
"index_kpool_compress",
|
||||
),
|
||||
(
|
||||
{"index_topk": 2048, "index_kpool_always_select_tail": False},
|
||||
"index_kpool_always_select_tail",
|
||||
),
|
||||
({"hres_vwnstyle": False}, "hres_vwnstyle"),
|
||||
({"mhc_no_norm_weight": True}, "mhc_no_norm_weight"),
|
||||
],
|
||||
)
|
||||
def test_glm5_next_rejects_unimplemented_config_options(kwargs, option):
|
||||
with pytest.raises(NotImplementedError, match=option):
|
||||
Glm5NextTextConfig(**kwargs)
|
||||
|
||||
|
||||
def test_get_llama3_eos_token():
|
||||
model_name = "meta-llama/Llama-3.2-1B-Instruct"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user