[V0 deprecation] Remove VLLM_USE_V1 usage in most modules (#27955)

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
wangxiyuan
2025-11-04 20:51:16 -08:00
committed by GitHub
parent 878fd5a16f
commit 428bc7bf1c
19 changed files with 107 additions and 238 deletions
@@ -5,7 +5,6 @@ from copy import copy
import torch
from vllm import envs
from vllm.attention.backends.abstract import (
AttentionBackend,
AttentionMetadata,
@@ -74,17 +73,11 @@ class EncoderOnlyAttention(Attention):
kv_cache_dtype = "auto"
block_size = 16
if envs.VLLM_USE_V1:
underlying_attn_backend = get_attn_backend(
head_size, dtype, kv_cache_dtype, block_size
)
underlying_attn_backend = get_attn_backend(
head_size, dtype, kv_cache_dtype, block_size
)
attn_backend = create_encoder_only_attention_backend(
underlying_attn_backend
)
else:
# in v0 encoder only attention is handled inside the backends
attn_backend = None
attn_backend = create_encoder_only_attention_backend(underlying_attn_backend)
if attn_type is not None:
assert attn_type == AttentionType.ENCODER_ONLY, (