[VLM] Revise InternVL Piecewise CUDA Graph Supporting (#13846)

Co-authored-by: luoyuan.luo <luoyuan.luo@antgroup.com>
This commit is contained in:
Yuan Luo
2025-11-24 22:15:10 +08:00
committed by GitHub
parent ecefc7904f
commit 8ef11569a2

View File

@@ -362,6 +362,10 @@ class ModelRunner:
elif hasattr(layer.self_attn, "attn_mqa"):
# For DeepSeek model
self.attention_layers.append(layer.self_attn.attn_mqa)
# For InternVL model
elif hasattr(layer, "attention"):
if hasattr(layer.attention, "attn"):
self.attention_layers.append(layer.attention.attn)
if len(self.attention_layers) < self.model_config.num_hidden_layers:
# TODO(yuwei): support Non-Standard GQA