"src/libtorchaudio/sox/utils.cpp" did not exist on "e5c4de87a0b530a4fed51aad33578ca4e642f5cb"
Unverified Commit 1f6f5155 authored by Casper's avatar Casper Committed by GitHub
Browse files

Make sure to delete dummy model (#180)

parent 37c63440
...@@ -67,9 +67,10 @@ class BaseAWQForCausalLM(nn.Module): ...@@ -67,9 +67,10 @@ class BaseAWQForCausalLM(nn.Module):
self.quant_config.save_pretrained(save_dir) self.quant_config.save_pretrained(save_dir)
# Remove empty state dict # Remove empty state dict
default_path = f'{save_dir}/model.safetensors' default_paths = [f'{save_dir}/model.safetensors', f'{save_dir}/pytorch_model.bin']
if os.path.exists(default_path): for path in default_paths:
os.remove(default_path) if os.path.exists(path):
os.remove(path)
# model_name has no extension, add it when saving state_dict # model_name has no extension, add it when saving state_dict
model_name = 'model.safetensors' if safetensors else 'pytorch_model.bin' model_name = 'model.safetensors' if safetensors else 'pytorch_model.bin'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment