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
ab1091d5
Unverified
Commit
ab1091d5
authored
Feb 25, 2025
by
wangxiyuan
Committed by
GitHub
Feb 25, 2025
Browse files
[Misc][Attention][Quantization] init property earlier (#13733)
Signed-off-by:
wangxiyuan
<
wangxiyuan1007@gmail.com
>
parent
1e15aaef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
vllm/attention/layer.py
vllm/attention/layer.py
+5
-4
No files found.
vllm/attention/layer.py
View file @
ab1091d5
...
@@ -85,6 +85,11 @@ class Attention(nn.Module):
...
@@ -85,6 +85,11 @@ class Attention(nn.Module):
self
.
_k_scale_float
=
1.0
self
.
_k_scale_float
=
1.0
self
.
_v_scale_float
=
1.0
self
.
_v_scale_float
=
1.0
self
.
num_heads
=
num_heads
self
.
head_size
=
head_size
self
.
num_kv_heads
=
num_kv_heads
self
.
sliding_window
=
sliding_window
quant_method
=
quant_config
.
get_quant_method
(
quant_method
=
quant_config
.
get_quant_method
(
self
,
prefix
=
prefix
)
if
quant_config
else
None
self
,
prefix
=
prefix
)
if
quant_config
else
None
if
quant_method
is
not
None
:
if
quant_method
is
not
None
:
...
@@ -116,10 +121,6 @@ class Attention(nn.Module):
...
@@ -116,10 +121,6 @@ class Attention(nn.Module):
alibi_slopes
,
sliding_window
,
kv_cache_dtype
,
alibi_slopes
,
sliding_window
,
kv_cache_dtype
,
blocksparse_params
,
logits_soft_cap
,
attn_type
,
blocksparse_params
,
logits_soft_cap
,
attn_type
,
**
extra_impl_args
)
**
extra_impl_args
)
self
.
num_heads
=
num_heads
self
.
head_size
=
head_size
self
.
num_kv_heads
=
num_kv_heads
self
.
sliding_window
=
sliding_window
self
.
backend
=
backend_name_to_enum
(
attn_backend
.
get_name
())
self
.
backend
=
backend_name_to_enum
(
attn_backend
.
get_name
())
self
.
dtype
=
dtype
self
.
dtype
=
dtype
...
...
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