diff --git a/python/sglang/srt/layers/attention/torch_flex_backend.py b/python/sglang/srt/layers/attention/torch_flex_backend.py index 1af8508cb..1c83d397f 100644 --- a/python/sglang/srt/layers/attention/torch_flex_backend.py +++ b/python/sglang/srt/layers/attention/torch_flex_backend.py @@ -70,10 +70,12 @@ class TorchFlexAttnBackend(AttentionBackend): ) ) - def _causal_mask(self, b, h, q_idx, kv_idx): + @staticmethod + def _causal_mask(b, h, q_idx, kv_idx): return q_idx >= kv_idx - def _decode_mask(self, b, h, q_idx, kv_idx): + @staticmethod + def _decode_mask(b, h, q_idx, kv_idx): return q_idx <= kv_idx def _run_flex_forward_extend(