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
a9cef34b
Commit
a9cef34b
authored
Sep 15, 2023
by
Casper
Browse files
Actually pass args to calib function
parent
69d31edc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
awq/models/base.py
awq/models/base.py
+5
-2
No files found.
awq/models/base.py
View file @
a9cef34b
...
@@ -108,11 +108,14 @@ class BaseAWQForCausalLM(nn.Module):
...
@@ -108,11 +108,14 @@ class BaseAWQForCausalLM(nn.Module):
gc
.
collect
()
gc
.
collect
()
def
_awq_search
(
self
,
tokenizer
,
quant_config
,
n_samples
=
128
,
seqlen
=
512
,
def
_awq_search
(
self
,
tokenizer
,
quant_config
,
n_samples
=
128
,
seqlen
=
512
,
auto_scale
=
True
,
mse_range
=
True
,
calib_data
:
Union
[
str
,
List
[
str
]]
=
"pileval"
):
auto_scale
=
True
,
mse_range
=
True
,
calib_data
:
Union
[
str
,
List
[
str
]]
=
"pileval"
,
split
=
"train"
,
text_column
=
"text"
):
layers
=
self
.
get_model_layers
(
self
.
model
)
layers
=
self
.
get_model_layers
(
self
.
model
)
samples
=
get_calib_dataset
(
samples
=
get_calib_dataset
(
data
=
calib_data
,
tokenizer
=
tokenizer
,
n_samples
=
n_samples
,
block_size
=
seqlen
)
data
=
calib_data
,
tokenizer
=
tokenizer
,
n_samples
=
n_samples
,
block_size
=
seqlen
,
split
=
split
,
text_column
=
text_column
)
samples
=
torch
.
cat
(
samples
,
dim
=
0
)
samples
=
torch
.
cat
(
samples
,
dim
=
0
)
inps
=
[]
inps
=
[]
...
...
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