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
dd2a9459
Unverified
Commit
dd2a9459
authored
May 15, 2025
by
inkcherry
Committed by
GitHub
May 14, 2025
Browse files
[Model] Allow the use of sliding window in Qwen2 (#17772)
Signed-off-by:
inkcherry
<
mingzhi.liu@intel.com
>
parent
420caf75
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
vllm/model_executor/models/qwen2.py
vllm/model_executor/models/qwen2.py
+8
-8
No files found.
vllm/model_executor/models/qwen2.py
View file @
dd2a9459
...
...
@@ -291,10 +291,10 @@ class Qwen2Model(nn.Module):
# TODO (@robertgshaw2): see if this can be moved out
if
(
cache_config
.
sliding_window
is
not
None
and
hasattr
(
config
,
"max_window_layers"
)):
raise
ValueError
(
"Sliding window for some but all layers is not "
"supported. This model uses sliding window
"
"
but `max_window_layers` = {}
is less than
"
"
`num_hidden_layers` = {}. Please open an issue "
assert
config
.
max_window_layers
==
config
.
num_hidden_layers
,
(
"Sliding window for some but all layers is not supported.
"
"This model uses sliding window
but `max_window_layers` = {} "
"is less than
`num_hidden_layers` = {}. Please open an issue "
"to discuss this feature."
.
format
(
config
.
max_window_layers
,
config
.
num_hidden_layers
,
...
...
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