[K3 Bug] Fix Kimi-K3 RecoverSSM startup failure `'MambaAttentionBackendEnum.GDN_ATTN declares 4 states, but provides 2 state copy funcs'` (#54634)

Signed-off-by: yewentao256 <zhyanwentao@126.com>

Wentao Ye committed Aug 31, 2026 at 19:22 UTC 91752b7a3e0cd20ba2a41a65069ece1b29825ee5
1 file changed +3 -2
vllm/v1/worker/mamba_utils.py
+3 -2
@@ -713,9 +713,10 @@ def validate_mamba_state_copy_funcs(
713 f"missing state copy funcs for {mamba_spec.mamba_type}"
714 )
715 state_copy_funcs = copy_funcs[mamba_spec.mamba_type]
716 - assert len(state_copy_funcs) == len(mamba_spec.shapes), (
716 + assert 0 < len(state_copy_funcs) <= len(mamba_spec.shapes), (
717 f"{mamba_spec.mamba_type} declares {len(mamba_spec.shapes)} states, "
718 - f"but provides {len(state_copy_funcs)} state copy funcs"
718 + f"but provides {len(state_copy_funcs)} state copy funcs; expected "
719 + "a non-empty copyable prefix"
720 )
721
722