mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-30 23:07:16 +08:00
29 lines
789 B
Python
29 lines
789 B
Python
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
|
|
from dataclasses import dataclass
|
|
|
|
from vllm.attention.backends.abstract import AttentionBackend
|
|
from vllm.v1.attention.backends.mamba_attn import (
|
|
BaseMambaAttentionMetadata,
|
|
BaseMambaAttentionMetadataBuilder,
|
|
)
|
|
|
|
|
|
class Mamba1AttentionBackend(AttentionBackend):
|
|
@staticmethod
|
|
def get_builder_cls() -> type["Mamba1AttentionMetadataBuilder"]:
|
|
return Mamba1AttentionMetadataBuilder
|
|
|
|
|
|
@dataclass
|
|
class Mamba1AttentionMetadata(BaseMambaAttentionMetadata):
|
|
pass
|
|
|
|
|
|
class Mamba1AttentionMetadataBuilder(
|
|
BaseMambaAttentionMetadataBuilder[Mamba1AttentionMetadata]
|
|
):
|
|
metadata_cls = Mamba1AttentionMetadata
|
|
supports_update_block_table: bool = False
|