-
Notifications
You must be signed in to change notification settings - Fork 225
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
1 parent
0bfc662
commit 0b3f840
Showing
4 changed files
with
59 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Experimental environment: A10 | ||
PYTHONPATH=../../.. \ | ||
CUDA_VISIBLE_DEVICES=0 \ | ||
python llm_infer.py \ | ||
--ckpt_dir "output/yi-6b/vx_xxx/checkpoint-xxx" \ | ||
--load_args_from_ckpt_dir true \ | ||
--eval_human false \ | ||
--max_length 256 \ | ||
--max_new_tokens 256 \ | ||
--temperature 0.9 \ | ||
--top_k 20 \ | ||
--top_p 0.9 \ | ||
--repetition_penalty 1.05 \ | ||
--do_sample true \ | ||
--merge_lora_and_save false \ |
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,36 @@ | ||
# Experimental environment: A10 | ||
# 15GB GPU memory | ||
PYTHONPATH=../../.. \ | ||
CUDA_VISIBLE_DEVICES=0 \ | ||
python llm_sft.py \ | ||
--model_id_or_path 01ai/Yi-6B \ | ||
--model_revision master \ | ||
--sft_type lora \ | ||
--tuner_backend swift \ | ||
--template_type default-generation \ | ||
--dtype bf16 \ | ||
--output_dir output \ | ||
--dataset dureader-robust-zh \ | ||
--train_dataset_sample -1 \ | ||
--num_train_epochs 1 \ | ||
--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.01 \ | ||
--learning_rate 1e-4 \ | ||
--gradient_accumulation_steps 16 \ | ||
--max_grad_norm 0.5 \ | ||
--warmup_ratio 0.03 \ | ||
--eval_steps 100 \ | ||
--save_steps 100 \ | ||
--save_total_limit 2 \ | ||
--logging_steps 10 \ | ||
--push_to_hub false \ | ||
--hub_model_id yi-6b-qlora \ | ||
--hub_private_repo true \ | ||
--hub_token 'your-sdk-token' \ |
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