Support piecewise cuda graph for Qwen3-next (#13081)

This commit is contained in:
Chen1022
2025-11-25 21:01:27 +08:00
committed by GitHub
parent 432ecf841e
commit d64bf6c6ce
6 changed files with 112 additions and 3 deletions

View File

@@ -363,6 +363,11 @@ class ModelRunner:
elif hasattr(layer.self_attn, "attn_mqa"):
# For DeepSeek model
self.attention_layers.append(layer.self_attn.attn_mqa)
# For hybrid model
elif hasattr(layer, "attn"):
self.attention_layers.append(layer.attn)
elif hasattr(layer, "linear_attn"):
self.attention_layers.append(layer.linear_attn)
# For InternVL model
elif hasattr(layer, "attention"):
if hasattr(layer.attention, "attn"):