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
bcfdeb38
Commit
bcfdeb38
authored
Oct 17, 2023
by
twaka
Browse files
add comments
parent
ad45716f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
awq/models/gpt_neox.py
awq/models/gpt_neox.py
+10
-9
No files found.
awq/models/gpt_neox.py
View file @
bcfdeb38
from
.base
import
BaseAWQForCausalLM
from
typing
import
Dict
from
transformers.models.gpt_neox.modeling_gpt_neox
import
GPTNeoXLayer
,
GPTNeoXForCausalLM
class
GPTNeoXAWQForCausalLM
(
BaseAWQForCausalLM
):
...
...
@@ -34,14 +33,16 @@ class GPTNeoXAWQForCausalLM(BaseAWQForCausalLM):
inp
=
input_feat
[
'attention.query_key_value'
],
))
# # attention out
# layers.append(dict(
# prev_op=module.attention.query_key_value,
# layers=[module.attention.dense],
# inp=input_feat['attention.dense'],
# ))
# NOTE: assumes "use_parallel_residual": false
# attention out
# Please refer to https://github.com/mit-han-lab/llm-awq/issues/2#issuecomment-1606297469
"""
layers.append(dict(
prev_op=module.attention.query_key_value,
layers=[module.attention.dense],
inp=input_feat['attention.dense'],
))
"""
# linear 1
layers
.
append
(
dict
(
prev_op
=
module
.
post_attention_layernorm
,
...
...
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