Fix SWA double-free in disagg decode with MTP speculation (#25805)
Co-authored-by: Ke Bao <ispobaoke@gmail.com>
This commit is contained in:
@@ -561,6 +561,8 @@ class SWATokenToKVPoolAllocator(BaseTokenToKVPoolAllocator):
|
||||
self.full_to_swa_index_mapping[alloc_full_indices[-swa_tail_len:]] = (
|
||||
alloc_swa_indices
|
||||
)
|
||||
if swa_tail_len < extend_num_tokens:
|
||||
self.full_to_swa_index_mapping[alloc_full_indices[:-swa_tail_len]] = 0
|
||||
return alloc_full_indices
|
||||
|
||||
def alloc_decode(
|
||||
|
||||
Reference in New Issue
Block a user