Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
move merge testing scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouyu5 committed Oct 11, 2023
1 parent dd1c8cf commit aac1c2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/instruction_tuning_pipeline/finetune_clm.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,8 @@ def concatenate_data(dataset, max_seq_length):
os.makedirs(saved_dir, exist_ok=True)
print(f"copy base model config to {saved_dir}")
os.system(f"cp {model_args.model_name_or_path}/* {saved_dir}")
print(f"remove unnecessary file from {model_args.model_name_or_path}")
os.system(f"rm {saved_dir}/*.bin* {saved_dir}/*.safetensors*")
print(f"Save merged model to {saved_dir}")
torch.save(model.state_dict(), os.path.join(saved_dir, "pytorch_model.bin"))
if finetune_args.delta == 'ssf':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ python example/instruction_tuning_pipeline/finetune_clm.py \
--log_level info \
--trust_remote_code True \
--no_cuda \
--bf16 True \
--output_dir $DATA_PATH"/dtuner_test/models/llama2-7b-ssf-denas-bf16-merge/eval_merge" \
--debugs

0 comments on commit aac1c2e

Please sign in to comment.