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
39ff5a5a
Commit
39ff5a5a
authored
Feb 11, 2026
by
zhuwenwen
Browse files
for qwen3 dense,set VLLM_USE_OPT_RESHAPE_AND_CACHE=1
parent
a1abfaf3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
vllm/model_executor/model_loader/utils.py
vllm/model_executor/model_loader/utils.py
+6
-0
vllm/v1/attention/backends/flash_attn.py
vllm/v1/attention/backends/flash_attn.py
+1
-1
No files found.
vllm/model_executor/model_loader/utils.py
View file @
39ff5a5a
...
...
@@ -290,6 +290,9 @@ def get_model_architecture(
os
.
environ
[
'VLLM_USE_OPT_RESHAPE_AND_CACHE'
]
=
'1'
if
not
envs
.
is_set
(
"VLLM_USE_FUSED_RMS_ROPE"
):
os
.
environ
[
'VLLM_USE_FUSED_RMS_ROPE'
]
=
'1'
if
architectures
in
[[
'Qwen3ForCausalLM'
]]:
if
not
envs
.
is_set
(
"VLLM_USE_OPT_RESHAPE_AND_CACHE"
):
os
.
environ
[
'VLLM_USE_OPT_RESHAPE_AND_CACHE'
]
=
'1'
if
architectures
in
[[
'DeepseekV32ForCausalLM'
]]:
if
not
envs
.
is_set
(
"VLLM_USE_V32_ENCODE"
):
...
...
@@ -340,6 +343,9 @@ def get_model_architecture(
os
.
environ
[
'VLLM_USE_OPT_RESHAPE_AND_CACHE'
]
=
'1'
if
not
envs
.
is_set
(
"VLLM_USE_FUSED_RMS_ROPE"
):
os
.
environ
[
'VLLM_USE_FUSED_RMS_ROPE'
]
=
'1'
if
architectures
in
[[
'Qwen3ForCausalLM'
]]:
if
not
envs
.
is_set
(
"VLLM_USE_OPT_RESHAPE_AND_CACHE"
):
os
.
environ
[
'VLLM_USE_OPT_RESHAPE_AND_CACHE'
]
=
'1'
if
architectures
in
[[
'DeepseekV32ForCausalLM'
]]:
if
not
envs
.
is_set
(
"VLLM_USE_V32_ENCODE"
):
...
...
vllm/v1/attention/backends/flash_attn.py
View file @
39ff5a5a
...
...
@@ -577,7 +577,7 @@ class FlashAttentionImpl(AttentionImpl):
layer
.
_v_scale
,
)
else
:
if
envs
.
VLLM_USE_OPT_RESHAPE_AND_CACHE
and
key
.
dtype
==
value
.
dtype
==
torch
.
float16
:
if
envs
.
VLLM_USE_OPT_RESHAPE_AND_CACHE
:
from
lightop
import
reshape_and_cache_cuda
reshape_and_cache_cuda
(
key
,
value
,
...
...
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