From 8ef11569a2b2959d62ec57def30031a6e78d9af5 Mon Sep 17 00:00:00 2001 From: Yuan Luo Date: Mon, 24 Nov 2025 22:15:10 +0800 Subject: [PATCH] [VLM] Revise InternVL Piecewise CUDA Graph Supporting (#13846) Co-authored-by: luoyuan.luo --- python/sglang/srt/model_executor/model_runner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/sglang/srt/model_executor/model_runner.py b/python/sglang/srt/model_executor/model_runner.py index b95759af4..535af6c6a 100644 --- a/python/sglang/srt/model_executor/model_runner.py +++ b/python/sglang/srt/model_executor/model_runner.py @@ -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