Skip to content

Commit 01745ba

Browse files
hmelloramd-xiaoyu12
authored andcommitted
Remove Phi 4 Flash configuration workaround (vllm-project#22723)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Xiao Yu <xiao.yu@amd.com>
1 parent 0d5a614 commit 01745ba

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

vllm/transformers_utils/config.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -449,23 +449,6 @@ def get_config(
449449
raise e
450450
config = _maybe_remap_hf_config_attrs(config)
451451

452-
# Phi4Flash misuses this config as list[int]. Convert it to int and add
453-
# the layer_types list[str] to make it HF compatible
454-
if (config.model_type == "phi4flash"):
455-
# TODO: Remove after the following PR is merged:
456-
# https://huggingface.co/microsoft/Phi-4-mini-flash-reasoning/discussions/6
457-
if not hasattr(config, "layer_types"):
458-
config.layer_types = [
459-
"sliding_attention" if i < config.num_hidden_layers // 2
460-
and i % 2 == 1 else "full_attention"
461-
for i in range(config.num_hidden_layers)
462-
]
463-
# TODO: Remove after the following PR is merged:
464-
# https://huggingface.co/microsoft/Phi-4-mini-flash-reasoning/discussions/7
465-
if isinstance(config.sliding_window, list):
466-
config.sliding_window = next(
467-
filter(None, config.sliding_window), None)
468-
469452
elif config_format == ConfigFormat.MISTRAL:
470453
# This function loads a params.json config which
471454
# should be used when loading models in mistral format

0 commit comments

Comments
 (0)