[Bugfix] Fix Qwen3/DSV3/DSV3.2 model support (#11510)

This commit is contained in:
Even Zhou
2025-10-16 15:14:09 +08:00
committed by GitHub
parent b0d20cdec7
commit 3cceaa381a
12 changed files with 102 additions and 33 deletions

View File

@@ -119,7 +119,7 @@ class AscendPagedTokenToKVPoolAllocator(PagedTokenToKVPoolAllocator):
assert len(torch.unique(out_indices)) == len(out_indices)
self.free_pages = self.free_pages[num_new_pages_item:]
return out_indices
return out_indices.int()
def alloc_decode(
self,

View File

@@ -347,11 +347,7 @@ def alloc_for_extend(
else:
# Paged allocation - build last_loc
last_loc = [
(
t[-1:]
if len(t) > 0
else torch.tensor([-1], device=batch.tree_cache.device)
)
(t[-1:] if len(t) > 0 else torch.tensor([-1], device=batch.device))
for t in prefix_tensors
]
out_cache_loc = alloc_paged_token_slots_extend(