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
e197a733
Commit
e197a733
authored
Sep 08, 2023
by
Casper Hansen
Browse files
Fix variables and no contiguous memory for GEMV
parent
331ff953
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
awq/models/base.py
awq/models/base.py
+4
-4
No files found.
awq/models/base.py
View file @
e197a733
...
@@ -77,13 +77,13 @@ class BaseAWQForCausalLM(nn.Module):
...
@@ -77,13 +77,13 @@ class BaseAWQForCausalLM(nn.Module):
module
.
weight
.
data
,
scales
,
zeros
=
pseudo_quantize_tensor
(
module
.
weight
.
data
,
scales
,
zeros
=
pseudo_quantize_tensor
(
module
.
weight
.
data
,
module
.
weight
.
data
,
get_scale_zp
=
True
,
get_scale_zp
=
True
,
**
self
.
quant_config
w_bit
=
self
.
quant_config
[
"w_bit"
],
q_group_size
=
self
.
quant_config
[
"q_group_size"
]
)
)
if
self
.
quant_config
[
"version"
]
==
'GEMM'
:
scales
=
scales
.
t
().
contiguous
()
scales
=
scales
.
t
().
contiguous
()
zeros
=
zeros
.
t
().
contiguous
()
zeros
=
zeros
.
t
().
contiguous
()
if
self
.
quant_config
[
"version"
]
==
'GEMM'
:
q_linear_module
=
WQLinear_GEMM
q_linear_module
=
WQLinear_GEMM
elif
self
.
quant_config
[
"version"
]
==
'GEMV'
:
elif
self
.
quant_config
[
"version"
]
==
'GEMV'
:
q_linear_module
=
WQLinear_GEMV
q_linear_module
=
WQLinear_GEMV
...
...
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