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
OpenDAS
AutoAWQ
Commits
cba9a28c
Commit
cba9a28c
authored
Sep 27, 2023
by
Casper Hansen
Browse files
Clean code
parent
707315a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
awq/modules/fused/attn.py
awq/modules/fused/attn.py
+2
-9
No files found.
awq/modules/fused/attn.py
View file @
cba9a28c
...
...
@@ -190,15 +190,8 @@ class QuantAttentionFused(nn.Module):
.
contiguous
()
)
try
:
self
.
cache_v
[:
bsz
,
:,
self
.
start_pos
:
self
.
start_pos
+
seqlen
,
:]
=
values_store
self
.
cache_k
[:
bsz
,
:,
:,
self
.
start_pos
:
self
.
start_pos
+
seqlen
,
:]
=
keys_store
except
Exception
as
ex
:
print
(
seqlen
,
self
.
max_seq_len
)
print
(
self
.
cache_v
.
shape
,
self
.
cache_v
[:
bsz
,
:,
self
.
start_pos
:
self
.
start_pos
+
seqlen
,
:].
shape
,
values_store
.
shape
)
print
(
self
.
cache_k
.
shape
,
self
.
cache_k
[:
bsz
,
:,
:,
self
.
start_pos
:
self
.
start_pos
+
seqlen
,
:].
shape
,
keys_store
.
shape
)
print
(
ex
)
exit
(
0
)
self
.
cache_v
[:
bsz
,
:,
self
.
start_pos
:
self
.
start_pos
+
seqlen
,
:]
=
values_store
self
.
cache_k
[:
bsz
,
:,
:,
self
.
start_pos
:
self
.
start_pos
+
seqlen
,
:]
=
keys_store
if
seqlen
==
1
:
xv
=
self
.
cache_v
[:
bsz
,
:,
:
self
.
start_pos
+
seqlen
,
:].
transpose
(
1
,
2
).
contiguous
()
...
...
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