[Bugfix] Avoid import AttentionMetadata explicitly in Mllama (#10593)

Signed-off-by: Isotr0py <2037008807@qq.com>
This commit is contained in:
Isotr0py
2024-11-23 18:12:20 +00:00
committed by GitHub
parent 651f6c31ac
commit 04668ebe7a
5 changed files with 21 additions and 11 deletions
@@ -87,6 +87,11 @@ class BlocksparseParams:
class BlocksparseFlashAttentionBackend(AttentionBackend):
@staticmethod
def get_name() -> str:
# For attention layer compatibility
return "FLASH_ATTN"
@staticmethod
def get_impl_cls() -> Type["BlocksparseFlashAttentionImpl"]:
return BlocksparseFlashAttentionImpl