mirror of
https://github.com/vllm-project/vllm.git
synced 2026-08-24 22:50:15 +00:00
[Bugfix] Corrupted MLA + linear attention (#43961)
Signed-off-by: Thien Tran <[email protected]>
This commit is contained in:
@@ -237,7 +237,11 @@ class SingleTypeKVCacheManager(ABC):
|
||||
cdiv(num_total_computed_tokens, self.block_size) - len(req_blocks)
|
||||
)
|
||||
req_blocks.extend(allocated_blocks)
|
||||
if type(self.kv_cache_spec) in (FullAttentionSpec, TQFullAttentionSpec):
|
||||
if type(self.kv_cache_spec) in (
|
||||
FullAttentionSpec,
|
||||
TQFullAttentionSpec,
|
||||
MLAAttentionSpec,
|
||||
):
|
||||
self.new_block_ids.extend(b.block_id for b in allocated_blocks)
|
||||
|
||||
def allocate_new_blocks(
|
||||
@@ -265,7 +269,11 @@ class SingleTypeKVCacheManager(ABC):
|
||||
else:
|
||||
new_blocks = self.block_pool.get_new_blocks(num_new_blocks)
|
||||
req_blocks.extend(new_blocks)
|
||||
if type(self.kv_cache_spec) in (FullAttentionSpec, TQFullAttentionSpec):
|
||||
if type(self.kv_cache_spec) in (
|
||||
FullAttentionSpec,
|
||||
TQFullAttentionSpec,
|
||||
MLAAttentionSpec,
|
||||
):
|
||||
self.new_block_ids.extend(b.block_id for b in new_blocks)
|
||||
return new_blocks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user