recoverssm: read the GDN RecoverSSM flag defensively in _forward_core (port of upstream #58863, c1d2da8773)

Port of the upstream vLLM change #58863 (Apache-2.0). One check read use_gdn_recoverssm directly; it now uses getattr with a False
default like its neighbours, so layers built without __init__ in tests work.

Co-Authored-By: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-09 20:08:55 +07:00
co-authored by Hinata
parent cb27582783
commit eb68fb9105
@@ -1453,7 +1453,7 @@ class QwenGatedDeltaNetAttention(GatedDeltaNetAttention):
if (
spec_sequence_masks is not None
and mixed_qkv_spec is not None
and self.use_gdn_recoverssm
and getattr(self, "use_gdn_recoverssm", False)
):
query_spec, key_spec, value_spec, verify_views = (
self._recoverssm_verify_qkv(mixed_qkv_spec)