baseline4 NAN 0X7FFF7FFF
This commit is contained in:
@@ -208,7 +208,14 @@ class MambaCacheManager:
|
|||||||
finished_seq_groups_req_ids: List[str]):
|
finished_seq_groups_req_ids: List[str]):
|
||||||
for req_id in finished_seq_groups_req_ids:
|
for req_id in finished_seq_groups_req_ids:
|
||||||
if req_id in self.mamba_cache_indices_mapping:
|
if req_id in self.mamba_cache_indices_mapping:
|
||||||
self.mamba_cache_indices_mapping.pop(req_id)
|
seq_mapping = self.mamba_cache_indices_mapping.pop(req_id)
|
||||||
|
# Zero out released cache slots so new requests start from
|
||||||
|
# clean state. Without this, a new prefill reuses the stale
|
||||||
|
# temporal_state of the previous (unrelated) request, causing
|
||||||
|
# the GDN delta-rule to diverge → NaN → GPU memory corruption.
|
||||||
|
for cache_idx in seq_mapping.values():
|
||||||
|
for cache_t in self.mamba_cache:
|
||||||
|
cache_t[:, cache_idx].zero_()
|
||||||
|
|
||||||
def _first_free_index_in_mamba_cache(
|
def _first_free_index_in_mamba_cache(
|
||||||
self, indices_range: Optional[List[int]] = None) -> int:
|
self, indices_range: Optional[List[int]] = None) -> int:
|
||||||
@@ -221,4 +228,4 @@ class MambaCacheManager:
|
|||||||
if i not in all_occupied_indices:
|
if i not in all_occupied_indices:
|
||||||
return i
|
return i
|
||||||
raise Exception("Couldn't find a free spot in the mamba cache! This"
|
raise Exception("Couldn't find a free spot in the mamba cache! This"
|
||||||
"should never happen")
|
"should never happen")
|
||||||
Reference in New Issue
Block a user