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
2dd34371
Unverified
Commit
2dd34371
authored
Aug 02, 2024
by
Isotr0py
Committed by
GitHub
Aug 01, 2024
Browse files
[Bugfix] Fix RMSNorm forward in InternViT attention qk_layernorm (#6992)
parent
7e0861bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
vllm/model_executor/models/intern_vit.py
vllm/model_executor/models/intern_vit.py
+4
-4
No files found.
vllm/model_executor/models/intern_vit.py
View file @
2dd34371
...
...
@@ -113,10 +113,10 @@ class InternAttention(nn.Module):
if
self
.
qk_normalization
:
B_
,
H_
,
N_
,
D_
=
q
.
shape
q
=
self
.
q_norm
(
q
.
transpose
(
1
,
2
).
flatten
(
-
2
,
-
1
)).
view
(
B_
,
N_
,
H_
,
D_
).
transpose
(
1
,
2
)
k
=
self
.
k_norm
(
k
.
transpose
(
1
,
2
).
flatten
(
-
2
,
-
1
)).
view
(
B_
,
N_
,
H_
,
D_
).
transpose
(
1
,
2
)
q
=
self
.
q_norm
.
forward_native
(
q
.
transpose
(
1
,
2
).
flatten
(
-
2
,
-
1
)).
view
(
B_
,
N_
,
H_
,
D_
).
transpose
(
1
,
2
)
k
=
self
.
k_norm
.
forward_native
(
k
.
transpose
(
1
,
2
).
flatten
(
-
2
,
-
1
)).
view
(
B_
,
N_
,
H_
,
D_
).
transpose
(
1
,
2
)
x
=
F
.
scaled_dot_product_attention
(
q
,
k
,
v
,
scale
=
self
.
scale
)
x
=
x
.
transpose
(
1
,
2
).
reshape
(
B
,
N
,
C
)
...
...
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