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
norm
vllm
Commits
28c3f121
Unverified
Commit
28c3f121
authored
Jan 08, 2024
by
Woosuk Kwon
Committed by
GitHub
Jan 08, 2024
Browse files
[Minor] Remove unused code in attention (#2384)
parent
c8848191
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
vllm/model_executor/layers/attention.py
vllm/model_executor/layers/attention.py
+9
-14
No files found.
vllm/model_executor/layers/attention.py
View file @
28c3f121
...
...
@@ -156,20 +156,15 @@ class PagedAttention(nn.Module):
output
=
out
.
view_as
(
query
)
else
:
# Decoding run.
if
key_cache
is
not
None
and
value_cache
is
not
None
:
output
=
_paged_attention
(
query
,
key_cache
,
value_cache
,
input_metadata
,
self
.
num_kv_heads
,
self
.
scale
,
self
.
alibi_slopes
,
)
else
:
# This happens during the initial memory profiling run for
# CUDA graphs.
output
=
torch
.
zeros_like
(
query
)
output
=
_paged_attention
(
query
,
key_cache
,
value_cache
,
input_metadata
,
self
.
num_kv_heads
,
self
.
scale
,
self
.
alibi_slopes
,
)
# Reshape the output tensor.
return
output
.
view
(
batch_size
,
seq_len
,
hidden_size
)
...
...
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