Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
2bd4a707
Commit
2bd4a707
authored
Nov 07, 2025
by
zhuwenwen
Browse files
add VLLM_USE_PD_SPLIT to split prefill and decode
parent
0eaf8026
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
vllm/envs.py
vllm/envs.py
+5
-1
vllm/v1/core/sched/scheduler.py
vllm/v1/core/sched/scheduler.py
+1
-1
No files found.
vllm/envs.py
View file @
2bd4a707
...
...
@@ -176,6 +176,7 @@ if TYPE_CHECKING:
VLLM_P2P_ASYNC
:
bool
=
False
VLLM_P2P_BUF_TOKENS
:
int
=
30000
VLLM_ENABLE_OUTPUT_PLACEHOLDERS
:
bool
=
False
VLLM_USE_PD_SPLIT
:
bool
=
False
def
get_default_cache_root
():
return
os
.
getenv
(
...
...
@@ -1092,7 +1093,6 @@ environment_variables: dict[str, Callable[[], Any]] = {
"VLLM_USE_FLASH_ATTN_PA"
:
lambda
:
(
os
.
environ
.
get
(
"VLLM_USE_FLASH_ATTN_PA"
,
"True"
).
lower
()
in
(
"true"
,
"1"
)),
# vLLM will use apex for rmsnorm
"VLLM_USE_APEX_RN"
:
lambda
:
(
os
.
environ
.
get
(
"VLLM_USE_APEX_RN"
,
"False"
).
lower
()
in
...
...
@@ -1146,6 +1146,10 @@ environment_variables: dict[str, Callable[[], Any]] = {
# vllm will enable output placeholders
"VLLM_ENABLE_OUTPUT_PLACEHOLDERS"
:
lambda
:
bool
(
int
(
os
.
getenv
(
"VLLM_ENABLE_OUTPUT_PLACEHOLDERS"
,
"0"
))),
# vLLM will split prefill and decode, not mix up
"VLLM_USE_PD_SPLIT"
:
lambda
:
(
os
.
environ
.
get
(
"VLLM_USE_PD_SPLIT"
,
"True"
).
lower
()
in
(
"true"
,
"1"
)),
}
# --8<-- [end:env-vars-definition]
...
...
vllm/v1/core/sched/scheduler.py
View file @
2bd4a707
...
...
@@ -1014,7 +1014,7 @@ class Scheduler(SchedulerInterface):
return
scheduler_output
def
schedule
(
self
)
->
SchedulerOutput
:
if
self
.
num_spec_tokens
>
0
:
if
self
.
num_spec_tokens
>
0
or
envs
.
VLLM_USE_PD_SPLIT
:
return
self
.
schedule_split_pd
()
else
:
return
self
.
schedule_default
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment