diff --git a/vllm/v1/worker/gpu/model_states/mamba_hybrid.py b/vllm/v1/worker/gpu/model_states/mamba_hybrid.py index 26439a9858..d04400afae 100644 --- a/vllm/v1/worker/gpu/model_states/mamba_hybrid.py +++ b/vllm/v1/worker/gpu/model_states/mamba_hybrid.py @@ -100,12 +100,13 @@ class MambaHybridModelState(DefaultModelState): def add_request(self, req_index: int, new_req_data: NewRequestData) -> None: super().add_request(req_index, new_req_data) + # Must reset the speculative acceptance count in this idx which could be stale. + self.num_accepted_tokens_gpu[req_index] = 1 if self._align_mode: # Seed the running state block from the resumed/prefilled position. self._mamba_state_idx_gpu[req_index] = ( new_req_data.num_computed_tokens - 1 ) // self.cache_config.block_size - self.num_accepted_tokens_gpu[req_index] = 1 def _get_mamba_group_info( self, kv_cache_config: KVCacheConfig