Skip to content

Commit 677ebdd

Browse files
committed
fix draft attn metadata mapping
Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com>
1 parent 42111d9 commit 677ebdd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

vllm/v1/worker/gpu_model_runner.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,11 +1178,13 @@ def _prepare_inputs(
11781178
)
11791179

11801180
if (self.speculative_config
1181-
and spec_decode_common_attn_metadata is None
1182-
and isinstance(self.drafter, EagleProposer)
1183-
and self.drafter.attn_layer_names[0]
1184-
in kv_cache_group_spec.layer_names):
1185-
spec_decode_common_attn_metadata = common_attn_metadata
1181+
and spec_decode_common_attn_metadata is None):
1182+
if isinstance(self.drafter, EagleProposer):
1183+
if (self.drafter.attn_layer_names[0]
1184+
in kv_cache_group_spec.layer_names):
1185+
spec_decode_common_attn_metadata = common_attn_metadata
1186+
else:
1187+
spec_decode_common_attn_metadata = common_attn_metadata
11861188

11871189
for attn_group in self.attn_groups[kv_cache_group_id]:
11881190
# Prepare for cascade attention if enabled & beneficial.

0 commit comments

Comments
 (0)