[Bugfix] Skip out-of-stage layers in get_layers_from_vllm_config for pipeline parallel (#36243)

Signed-off-by: Tushar Shetty <tushar.shetty@abbyy.com>
Signed-off-by: Tushar Shetty <54362365+tusharshetty61@users.noreply.github.com>
This commit is contained in:
Tushar Shetty
2026-03-08 20:40:16 -07:00
committed by GitHub
parent 747431044d
commit c4d859c274
+2 -1
View File
@@ -1795,5 +1795,6 @@ def get_layers_from_vllm_config(
return {
layer_name: forward_context[layer_name]
for layer_name in layer_names
if isinstance(forward_context[layer_name], layer_type)
if layer_name in forward_context
and isinstance(forward_context[layer_name], layer_type)
}