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
50d1025f
Unverified
Commit
50d1025f
authored
Aug 27, 2023
by
Casper
Committed by
GitHub
Aug 27, 2023
Browse files
Rename to hijacked_inputs
parent
6b1c96c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
awq/models/base.py
awq/models/base.py
+3
-3
No files found.
awq/models/base.py
View file @
50d1025f
...
...
@@ -113,8 +113,8 @@ class BaseAWQForCausalLM(nn.Module):
super
().
__init__
()
self
.
module
=
module
def
forward
(
self
,
hi
dden_state
s
,
**
kwargs
):
inps
.
append
(
hi
dden_state
s
)
def
forward
(
self
,
hi
jacked_input
s
,
**
kwargs
):
inps
.
append
(
hi
jacked_input
s
)
layer_kwargs
.
update
(
kwargs
)
raise
ValueError
# early exit to break later inference
...
...
@@ -358,4 +358,4 @@ class BaseAWQForCausalLM(nn.Module):
# scale activation
scaled_act
=
ScaledActivation
(
scale_dict
[
'scale_layer'
],
scale_like
)
set_op_by_name
(
layer
,
scale_dict
[
'scale_name'
],
scaled_act
)
\ No newline at end of file
set_op_by_name
(
layer
,
scale_dict
[
'scale_name'
],
scaled_act
)
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