A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 13, 10:45 UTC
[[V0 deprecation]]Remove VLLM_USE_V1 env (#28204)
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
wangxiyuan committed
Nov 12, 2025 at 09:22 UTC
e1710393c44cff20e481b632b86d157a9d694625
8 files changed
+15
-59
.buildkite/scripts/hardware_ci/run-cpu-test.sh
+1
-1
@@ -76,7 +76,7 @@ function cpu_tests() {
76
# Run AWQ test
77
# docker exec cpu-test-"$NUMA_NODE" bash -c "
78
# set -e
79
- # VLLM_USE_V1=0 pytest -x -s -v \
79
+ # pytest -x -s -v \
80
# tests/quantization/test_ipex_quant.py"
81
82
# Run multi-lora tests
examples/offline_inference/mlpspeculator.py
+1
-2
@@ -4,8 +4,7 @@
4
This file demonstrates the usage of text generation with an LLM model,
5
comparing the performance with and without speculative decoding.
6
7
-Note that still not support `v1`:
8
-VLLM_USE_V1=0 python examples/offline_inference/mlpspeculator.py
7
+Note that this example is out of date and not supported in vLLM v1.
8
"""
9
10
import gc
examples/offline_inference/qwen2_5_omni/README.md
-2
@@ -11,12 +11,10 @@ python examples/offline_inference/qwen2_5_omni/only_thinker.py \
11
12
# Read vision and audio inputs from a single video file
13
# NOTE: V1 engine does not support interleaved modalities yet.
14
-VLLM_USE_V1=0 \
14
python examples/offline_inference/qwen2_5_omni/only_thinker.py \
15
-q use_audio_in_video
16
17
# Multiple audios
19
-VLLM_USE_V1=0 \
18
python examples/offline_inference/qwen2_5_omni/only_thinker.py \
19
-q multi_audios
20
```
examples/offline_inference/qwen2_5_omni/only_thinker.py
+1
-6
@@ -7,7 +7,6 @@ with the correct prompt format on Qwen2.5-Omni (thinker only).
7
8
from typing import NamedTuple
9
10
-import vllm.envs as envs
10
from vllm import LLM, SamplingParams
11
from vllm.assets.audio import AudioAsset
12
from vllm.assets.image import ImageAsset
@@ -72,11 +71,7 @@ def get_use_audio_in_video_query() -> QueryResult:
71
)
72
asset = VideoAsset(name="baby_reading", num_frames=16)
73
audio = asset.get_audio(sampling_rate=16000)
75
- assert not envs.VLLM_USE_V1, (
76
- "V1 does not support use_audio_in_video. "
77
- "Please launch this example with "
78
- "`VLLM_USE_V1=0`."
79
- )
74
+
75
return QueryResult(
76
inputs={
77
"prompt": prompt,
examples/others/lmcache/cpu_offload_lmcache.py
+12
-31
@@ -37,7 +37,7 @@ from vllm.config import KVTransferConfig
37
from vllm.engine.arg_utils import EngineArgs
38
39
40
-def setup_environment_variables(vllm_version: str):
40
+def setup_environment_variables():
41
# LMCache-related environment variables
42
# Use experimental features in LMCache
43
os.environ["LMCACHE_USE_EXPERIMENTAL"] = "True"
@@ -47,12 +47,10 @@ def setup_environment_variables(vllm_version: str):
47
os.environ["LMCACHE_LOCAL_CPU"] = "True"
48
# Set local CPU memory limit to 5.0 GB
49
os.environ["LMCACHE_MAX_LOCAL_CPU_SIZE"] = "5.0"
50
- if vllm_version == "v0":
51
- os.environ["VLLM_USE_V1"] = "0"
50
51
52
@contextlib.contextmanager
55
-def build_llm_with_lmcache(lmcache_connector: str, model: str, vllm_version: str):
53
+def build_llm_with_lmcache(lmcache_connector: str, model: str):
54
ktc = KVTransferConfig(
55
kv_connector=lmcache_connector,
56
kv_role="kv_both",
@@ -60,21 +58,12 @@ def build_llm_with_lmcache(lmcache_connector: str, model: str, vllm_version: str
58
# Set GPU memory utilization to 0.8 for an A40 GPU with 40GB
59
# memory. Reduce the value if your GPU has less memory.
60
# Note: LMCache supports chunked prefill (see vLLM#14505, LMCache#392).
63
- if vllm_version == "v0":
64
- llm_args = EngineArgs(
65
- model=model,
66
- kv_transfer_config=ktc,
67
- max_model_len=8000,
68
- gpu_memory_utilization=0.8,
69
- enable_chunked_prefill=True, # Only in v0
70
- )
71
- else:
72
- llm_args = EngineArgs(
73
- model=model,
74
- kv_transfer_config=ktc,
75
- max_model_len=8000,
76
- gpu_memory_utilization=0.8,
77
- )
61
+ llm_args = EngineArgs(
62
+ model=model,
63
+ kv_transfer_config=ktc,
64
+ max_model_len=8000,
65
+ gpu_memory_utilization=0.8,
66
+ )
67
68
llm = LLM(**asdict(llm_args))
69
try:
@@ -116,18 +105,10 @@ def parse_args():
105
106
107
def main():
119
- args = parse_args()
120
-
121
- if args.version == "v0":
122
- lmcache_connector = "LMCacheConnector"
123
- model = "mistralai/Mistral-7B-Instruct-v0.2"
124
- else:
125
- lmcache_connector = "LMCacheConnectorV1"
126
- model = "meta-llama/Meta-Llama-3.1-8B-Instruct"
127
-
128
- setup_environment_variables(args.version)
129
-
130
- with build_llm_with_lmcache(lmcache_connector, model, args.version) as llm:
108
+ lmcache_connector = "LMCacheConnectorV1"
109
+ model = "meta-llama/Meta-Llama-3.1-8B-Instruct"
110
+ setup_environment_variables()
111
+ with build_llm_with_lmcache(lmcache_connector, model) as llm:
112
# This example script runs two requests with a shared prefix.
113
# Define the shared prompt and specific prompts
114
shared_prompt = "Hello, how are you?" * 1000
tests/entrypoints/openai/test_orca_metrics.py
-3
@@ -22,9 +22,6 @@ def monkeypatch_module():
22
23
@pytest.fixture(scope="module", params=[True])
24
def server(request, monkeypatch_module):
25
- use_v1 = request.param
26
- monkeypatch_module.setenv("VLLM_USE_V1", "1" if use_v1 else "0")
27
-
25
args = [
26
"--dtype",
27
"bfloat16",
vllm/envs.py
-13
@@ -100,7 +100,6 @@ if TYPE_CHECKING:
100
VLLM_SKIP_P2P_CHECK: bool = False
101
VLLM_DISABLED_KERNELS: list[str] = []
102
VLLM_DISABLE_PYNCCL: bool = False
103
- VLLM_USE_V1: bool = True
103
VLLM_ROCM_USE_AITER: bool = False
104
VLLM_ROCM_USE_AITER_PAGED_ATTN: bool = False
105
VLLM_ROCM_USE_AITER_LINEAR: bool = True
@@ -884,8 +883,6 @@ environment_variables: dict[str, Callable[[], Any]] = {
883
"VLLM_DISABLE_PYNCCL": lambda: (
884
os.getenv("VLLM_DISABLE_PYNCCL", "False").lower() in ("true", "1")
885
),
887
- # If set, use the V1 code path.
888
- "VLLM_USE_V1": lambda: bool(int(os.getenv("VLLM_USE_V1", "1"))),
886
# Disable aiter ops unless specifically enabled.
887
# Acts as a parent switch to enable the rest of the other operations.
888
"VLLM_ROCM_USE_AITER": lambda: (
@@ -1538,16 +1535,6 @@ def is_set(name: str):
1535
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
1536
1537
1541
-def set_vllm_use_v1(use_v1: bool):
1542
- if is_set("VLLM_USE_V1"):
1543
- raise ValueError(
1544
- "Should not call set_vllm_use_v1() if VLLM_USE_V1 is set "
1545
- "explicitly by the user. Please raise this as a Github "
1546
- "Issue and explicitly set VLLM_USE_V1=0 or 1."
1547
- )
1548
- os.environ["VLLM_USE_V1"] = "1" if use_v1 else "0"
1549
-
1550
-
1538
def compute_hash() -> str:
1539
"""
1540
WARNING: Whenever a new key is added to this environment
vllm/usage/usage_lib.py
-1
@@ -42,7 +42,6 @@ _USAGE_ENV_VARS_TO_COLLECT = [
42
"VLLM_USE_FLASHINFER_SAMPLER",
43
"VLLM_PP_LAYER_PARTITION",
44
"VLLM_USE_TRITON_AWQ",
45
- "VLLM_USE_V1",
45
"VLLM_ENABLE_V1_MULTIPROCESSING",
46
]
47