A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
Remove Phi 4 Flash configuration workaround (#22723)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Aug 14, 2025 at 12:03 UTC
f4efda821d7f144f5f9478e960b5011578c69bf0
1 file changed
-17
vllm/transformers_utils/config.py
-17
@@ -449,23 +449,6 @@ def get_config(
449
raise e
450
config = _maybe_remap_hf_config_attrs(config)
451
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
-
452
elif config_format == ConfigFormat.MISTRAL:
453
# This function loads a params.json config which
454
# should be used when loading models in mistral format