Neroism8422's picture
Add merge lora configuration file, LlamaFactory can reproduce.
1165b32 verified
# from huggingface_hub import HfApi
# api = HfApi()
# # Create a new model repository (if it doesn't exist)
# repo_id = "Neroism8422/OCSR0_MDG0_FRP0_RT0_RP0_PP60_202505212032"
# api.create_repo(repo_id=repo_id, private=True, exist_ok=True) # Set private=True if you want a private repo
# # Upload all your model files
# api.upload_folder(
# folder_path="./merged_models/OCSR0_MDG0_FRP0_RT0_RP0_PP60_202505212032", # The directory containing your files
# repo_id=repo_id,
# commit_message="This is the Full tuning on Qwen/Qwen2-VL-7B, under setting of only RP task at 60K, for single task performance checking.",
# # ignore_patterns=["checkpoint*", "checkpoint-*"]
# )
from huggingface_hub import HfApi
api = HfApi()
repo_id = "Neroism8422/SwinOCSR_Sub_OCSR10_ExampleInput_20250905165205"
# Create repo if it doesn't exist
api.create_repo(repo_id=repo_id, private=False, exist_ok=True)
# Upload with overwrite behavior
api.upload_folder(
folder_path="./merged_models/SwinOCSR_Sub_OCSR10_ExampleInput_20250905165205",
repo_id=repo_id,
commit_message="This is the LoRA on meta-llama/Meta-Llama-3-8B-Instruct, simple vision version of reproduce Mol-Instruct model, under the same dataset with full size text dataset, this is a text alignment reproduce version.",
# delete_patterns=["*"], # This deletes all existing files before upload
)
api.upload_file(
path_or_fileobj="../examples/train_lora/SwinOCSR_category0_OCSR10/20250905165205/SwinOCSR_Sub_OCSR10_ExampleInput_20250905165205-llava3.yaml", # Update with your actual file path
path_in_repo="tuning_config.yaml", # Name it will have in the repo
repo_id=repo_id,
commit_message="Add tuning configuration file, LlamaFactory can reproduce."
)
api.upload_file(
path_or_fileobj="./merge_lora.yaml", # Update with your actual file path
path_in_repo="merge_lora.yaml", # Name it will have in the repo
repo_id=repo_id,
commit_message="Add merge lora configuration file, LlamaFactory can reproduce."
)
api.upload_file(
path_or_fileobj="./upload_model_hf.py", # Update with your actual file path
path_in_repo="upload_model_hf.py", # Name it will have in the repo
repo_id=repo_id,
commit_message="Add merge lora configuration file, LlamaFactory can reproduce."
)