[Fix] DSV4 cached_loc invalidated when SWA mapping is rebuilt (#25889)
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
3a6de13cd8
commit
888a8794ef
@@ -492,6 +492,10 @@ class DeepSeekV4TokenToKVPool(BaseSWAKVPool):
|
||||
|
||||
def register_mapping(self, full_to_swa_index_mapping: torch.Tensor):
|
||||
self.full_to_swa_index_mapping = full_to_swa_index_mapping
|
||||
self.cached_loc = None # mapping replaced; discard any cached translation
|
||||
|
||||
def invalidate_loc_cache(self) -> None:
|
||||
self.cached_loc = None
|
||||
|
||||
def get_ring_size(self, compress_ratio: int) -> int:
|
||||
server_args = get_global_server_args()
|
||||
|
||||
Reference in New Issue
Block a user