[Bugfix][Models] Fix OpenPangu sleep mode with static sinks (#53696)

Signed-off-by: Ronald1995 <ronaldautomobile@163.com>

Ronald committed Sep 14, 2026 at 21:05 UTC e0c04c7b4dddceb25eb9d23d87c3914bfc2ad3f9
2 files changed +11 -9
vllm/model_executor/layers/attention/static_sink_attention.py
-2
@@ -152,8 +152,6 @@ class StaticSinkAttention(Attention, CustomOp):
152 attn_backend=attn_backend,
153 **kwargs,
154 )
155 - CustomOp.__init__(self)
156 -
155 self.sink_len = sink_len
156 self.sink_populated = False
157 self.sink_key = None
vllm/model_executor/models/openpangu.py
+11 -7
@@ -677,14 +677,18 @@ class OpenPanguSinkAttention(nn.Module):
677 },
678 )
679 else:
680 - self.param_sink_value = torch.zeros(
681 - (
682 - self.param_sink_number,
683 - self.num_kv_heads,
684 - self.v_channels,
680 + self.register_buffer(
681 + "param_sink_value",
682 + torch.zeros(
683 + (
684 + self.param_sink_number,
685 + self.num_kv_heads,
686 + self.v_channels,
687 + ),
688 + device=current_platform.current_device(),
689 + dtype=config.torch_dtype,
690 ),
686 - device=current_platform.current_device(),
687 - dtype=config.torch_dtype,
691 + persistent=False,
692 )
693 # To enable dummy run with out weight
694 self.post_weight_load()