[Misc] Minor type annotation fix (#3716)
This commit is contained in:
parent
26422e477b
commit
395aa823ea
@ -1,4 +1,5 @@
|
|||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
from typing import Type
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
@ -10,7 +11,7 @@ logger = init_logger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
@lru_cache(maxsize=None)
|
@lru_cache(maxsize=None)
|
||||||
def get_attn_backend(dtype: torch.dtype) -> AttentionBackend:
|
def get_attn_backend(dtype: torch.dtype) -> Type[AttentionBackend]:
|
||||||
if _can_use_flash_attn(dtype):
|
if _can_use_flash_attn(dtype):
|
||||||
logger.info("Using FlashAttention backend.")
|
logger.info("Using FlashAttention backend.")
|
||||||
from vllm.attention.backends.flash_attn import ( # noqa: F401
|
from vllm.attention.backends.flash_attn import ( # noqa: F401
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user