-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
examples/pytorch/llm/scripts/qwen1half_110b_chat/lora_ddp_ds/infer.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Experimental environment: 4*A100 | ||
CUDA_VISIBLE_DEVICES=0,1,2,3 \ | ||
swift infer \ | ||
--ckpt_dir "output/qwen1half-110b-chat/vx-xxx/checkpoint-xxx" \ | ||
--load_dataset_config true \ | ||
--use_flash_attn true \ | ||
--max_new_tokens 2048 \ | ||
--temperature 0.5 \ | ||
--top_p 0.7 \ | ||
--repetition_penalty 1. \ | ||
--do_sample true \ | ||
--merge_lora false \ |
34 changes: 34 additions & 0 deletions
34
examples/pytorch/llm/scripts/qwen1half_110b_chat/lora_ddp_ds/sft.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Experimental environment: 8*A100 | ||
# 8*60GB GPU memory | ||
nproc_per_node=8 | ||
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \ | ||
NPROC_PER_NODE=$nproc_per_node \ | ||
swift sft \ | ||
--model_type qwen1half-110b-chat \ | ||
--sft_type lora \ | ||
--tuner_backend peft \ | ||
--dtype AUTO \ | ||
--output_dir output \ | ||
--ddp_backend nccl \ | ||
--dataset alpaca-zh \ | ||
--train_dataset_sample -1 \ | ||
--num_train_epochs 2 \ | ||
--max_length 2048 \ | ||
--check_dataset_strategy warning \ | ||
--lora_rank 8 \ | ||
--lora_alpha 32 \ | ||
--lora_dropout_p 0.05 \ | ||
--lora_target_modules ALL \ | ||
--gradient_checkpointing true \ | ||
--batch_size 1 \ | ||
--weight_decay 0.1 \ | ||
--learning_rate 1e-4 \ | ||
--gradient_accumulation_steps $(expr 16 / $nproc_per_node) \ | ||
--max_grad_norm 0.5 \ | ||
--warmup_ratio 0.03 \ | ||
--eval_steps 100 \ | ||
--save_steps 100 \ | ||
--save_total_limit 2 \ | ||
--logging_steps 10 \ | ||
--use_flash_attn true \ | ||
--deepspeed default-zero3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters