[Bugfix][MRV2] Reset num_accepted_tokens on add_request in all modes (#48132)
Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2285cfca46
commit
ff8d3488f2
@@ -100,12 +100,13 @@ class MambaHybridModelState(DefaultModelState):
|
|||||||
|
|
||||||
def add_request(self, req_index: int, new_req_data: NewRequestData) -> None:
|
def add_request(self, req_index: int, new_req_data: NewRequestData) -> None:
|
||||||
super().add_request(req_index, new_req_data)
|
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:
|
if self._align_mode:
|
||||||
# Seed the running state block from the resumed/prefilled position.
|
# Seed the running state block from the resumed/prefilled position.
|
||||||
self._mamba_state_idx_gpu[req_index] = (
|
self._mamba_state_idx_gpu[req_index] = (
|
||||||
new_req_data.num_computed_tokens - 1
|
new_req_data.num_computed_tokens - 1
|
||||||
) // self.cache_config.block_size
|
) // self.cache_config.block_size
|
||||||
self.num_accepted_tokens_gpu[req_index] = 1
|
|
||||||
|
|
||||||
def _get_mamba_group_info(
|
def _get_mamba_group_info(
|
||||||
self, kv_cache_config: KVCacheConfig
|
self, kv_cache_config: KVCacheConfig
|
||||||
|
|||||||
Reference in New Issue
Block a user