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
1f6f5155
Unverified
Commit
1f6f5155
authored
Nov 10, 2023
by
Casper
Committed by
GitHub
Nov 10, 2023
Browse files
Make sure to delete dummy model (#180)
parent
37c63440
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
awq/models/base.py
awq/models/base.py
+4
-3
No files found.
awq/models/base.py
View file @
1f6f5155
...
...
@@ -67,9 +67,10 @@ class BaseAWQForCausalLM(nn.Module):
self
.
quant_config
.
save_pretrained
(
save_dir
)
# Remove empty state dict
default_path
=
f
'
{
save_dir
}
/model.safetensors'
if
os
.
path
.
exists
(
default_path
):
os
.
remove
(
default_path
)
default_paths
=
[
f
'
{
save_dir
}
/model.safetensors'
,
f
'
{
save_dir
}
/pytorch_model.bin'
]
for
path
in
default_paths
:
if
os
.
path
.
exists
(
path
):
os
.
remove
(
path
)
# model_name has no extension, add it when saving state_dict
model_name
=
'model.safetensors'
if
safetensors
else
'pytorch_model.bin'
...
...
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