Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
aea98512
"..._static/git@developer.sourcefind.cn:OpenDAS/lmdeploy.git" did not exist on "c238f1cde6d983963f5c2eee572e0cb852f81a44"
Unverified
Commit
aea98512
authored
Apr 11, 2025
by
Qingquan Song
Committed by
GitHub
Apr 11, 2025
Browse files
Fix fa3 window size setup (#5316)
parent
e4155e96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/sglang/srt/layers/attention/flashattention_backend.py
python/sglang/srt/layers/attention/flashattention_backend.py
+2
-2
No files found.
python/sglang/srt/layers/attention/flashattention_backend.py
View file @
aea98512
...
@@ -523,7 +523,7 @@ class FlashAttentionBackend(AttentionBackend):
...
@@ -523,7 +523,7 @@ class FlashAttentionBackend(AttentionBackend):
# here is two side inclusive
# here is two side inclusive
window_size
=
(
window_size
=
(
(
layer
.
sliding_window_size
,
0
)
(
layer
.
sliding_window_size
,
0
)
if
layer
.
sliding_window_size
is
not
None
if
layer
.
sliding_window_size
is
not
None
and
layer
.
sliding_window_size
>
-
1
else
(
-
1
,
-
1
)
else
(
-
1
,
-
1
)
)
)
k_descale
,
v_descale
=
None
,
None
k_descale
,
v_descale
=
None
,
None
...
@@ -664,7 +664,7 @@ class FlashAttentionBackend(AttentionBackend):
...
@@ -664,7 +664,7 @@ class FlashAttentionBackend(AttentionBackend):
# here is two side inclusive
# here is two side inclusive
window_size
=
(
window_size
=
(
(
layer
.
sliding_window_size
,
0
)
(
layer
.
sliding_window_size
,
0
)
if
layer
.
sliding_window_size
is
not
None
if
layer
.
sliding_window_size
is
not
None
and
layer
.
sliding_window_size
>
-
1
else
(
-
1
,
-
1
)
else
(
-
1
,
-
1
)
)
)
causal
=
not
layer
.
is_cross_attention
causal
=
not
layer
.
is_cross_attention
...
...
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