From a1f2dc90e4e4d59d36ed0bb91137ce5d778f6261 Mon Sep 17 00:00:00 2001 From: Xuchun Shang Date: Tue, 28 Oct 2025 16:27:24 +0800 Subject: [PATCH] [Bug fix] [PP] fix wrong dtype for quantified model (#12247) Signed-off-by: Xuchun Shang --- python/sglang/srt/model_executor/cuda_graph_runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/model_executor/cuda_graph_runner.py b/python/sglang/srt/model_executor/cuda_graph_runner.py index 612b4d243..80f8c6564 100644 --- a/python/sglang/srt/model_executor/cuda_graph_runner.py +++ b/python/sglang/srt/model_executor/cuda_graph_runner.py @@ -323,11 +323,11 @@ class CudaGraphRunner: self.pp_proxy_tensors = { "hidden_states": torch.zeros( (self.max_bs, self.model_runner.model_config.hidden_size), - dtype=torch.bfloat16, + dtype=self.model_runner.model_config.dtype, ), "residual": torch.zeros( (self.max_bs, self.model_runner.model_config.hidden_size), - dtype=torch.bfloat16, + dtype=self.model_runner.model_config.dtype, ), }