Skip to content

Commit c64861d

Browse files
authored
[Bugfix] Mamba2 remove bugged initial state condition in chunk scan (#22034)
Signed-off-by: Chih-Chieh-Yang <[email protected]>
1 parent 8564dc9 commit c64861d

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -476,15 +476,8 @@ def _chunk_scan_fwd(
476476
# with initial states, we need to take care of how
477477
# seq_idx crosses the boundaries
478478
assert batch == 1, "chunk scan only supports initial states with batch 1"
479-
480-
if initial_states.shape[0] == 1:
481-
# no in this case no point to use initial states
482-
initial_states = None
483-
else:
484-
assert chunk_indices is not None and chunk_offsets is not None, \
485-
(
486-
"chunk_indices and chunk_offsets should have been set"
487-
)
479+
assert chunk_indices is not None and chunk_offsets is not None, \
480+
"chunk_indices and chunk_offsets should have been set"
488481
else:
489482
chunk_indices, chunk_offsets = None, None
490483
else:

0 commit comments

Comments
 (0)