Update save.py
This commit is contained in:
parent
d40b5aae01
commit
e2f8b79c9d
1 changed files with 25 additions and 11 deletions
|
|
@ -2129,17 +2129,31 @@ def unsloth_generic_save(
|
|||
):
|
||||
if token is None and push_to_hub: token = get_token()
|
||||
|
||||
merge_and_overwrite_lora(
|
||||
get_model_name,
|
||||
create_huggingface_repo,
|
||||
model,
|
||||
save_location = save_directory,
|
||||
push_to_hub = push_to_hub,
|
||||
token = token,
|
||||
upload_location = save_directory if push_to_hub else None,
|
||||
low_disk_space_usage = True,
|
||||
private = private,
|
||||
)
|
||||
import unsloth_zoo
|
||||
if Version(unsloth_zoo.__version__) <= Version("2024.12.1"):
|
||||
merge_and_overwrite_lora(
|
||||
get_model_name,
|
||||
create_huggingface_repo,
|
||||
model,
|
||||
save_location = save_directory,
|
||||
push_to_hub = push_to_hub,
|
||||
token = token,
|
||||
upload_location = save_directory if push_to_hub else None,
|
||||
low_disk_space_usage = True,
|
||||
private = private,
|
||||
)
|
||||
else:
|
||||
merge_and_overwrite_lora(
|
||||
get_model_name,
|
||||
model,
|
||||
save_directory = save_directory,
|
||||
push_to_hub = push_to_hub,
|
||||
private = private,
|
||||
token = token,
|
||||
low_disk_space_usage = False,
|
||||
use_temp_file = False,
|
||||
)
|
||||
pass
|
||||
return
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue