[Bugfix] Fix speculative decoding for short_conv (LFM2) models (#50272)

Signed-off-by: jens.luecke <jens.luecke@liquid.ai>
Co-authored-by: Tonoken3 <sakamakismile@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Jens
2026-08-22 13:34:22 +00:00
committed by GitHub
co-authored by Tonoken3 mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 704f12aa1e
commit da329cc303
4 changed files with 43 additions and 11 deletions
@@ -235,9 +235,10 @@ class MambaStateShapeCalculator:
tp_world_size: int,
intermediate_size: int,
conv_kernel: int,
num_spec: int = 0,
) -> tuple[tuple[int, int]]:
conv_dim = divide(intermediate_size, tp_world_size)
conv_state_shape = cls._orient_conv_shape(conv_dim, conv_kernel - 1)
conv_state_shape = cls._orient_conv_shape(conv_dim, conv_kernel - 1 + num_spec)
return (conv_state_shape,)
@classmethod