From b0249a32d8c2ef4a418c536126a7018d17e7afab Mon Sep 17 00:00:00 2001 From: Lynn Liu Date: Tue, 25 Feb 2025 10:23:48 -0800 Subject: [PATCH] add LoRA training config --- .../LLaMA-Factory/data/dataset_info.json | 12 +++++- .../train_lora/qwen2_lora_config.yaml | 37 +++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 skythought/train/LLaMA-Factory/examples/train_lora/qwen2_lora_config.yaml diff --git a/skythought/train/LLaMA-Factory/data/dataset_info.json b/skythought/train/LLaMA-Factory/data/dataset_info.json index dc4d06a..6612543 100644 --- a/skythought/train/LLaMA-Factory/data/dataset_info.json +++ b/skythought/train/LLaMA-Factory/data/dataset_info.json @@ -656,5 +656,15 @@ "chosen": "chosen", "rejected": "rejected" } - } + }, + "Sky-T1-Lora": { + "file_name": "your data path here", + "ranking": true, + "formatting": "sharegpt", + "columns": { + "messages": "conversations", + "chosen": "chosen", + "rejected": "rejected" + } + }, } diff --git a/skythought/train/LLaMA-Factory/examples/train_lora/qwen2_lora_config.yaml b/skythought/train/LLaMA-Factory/examples/train_lora/qwen2_lora_config.yaml new file mode 100644 index 0000000..f1b2d9a --- /dev/null +++ b/skythought/train/LLaMA-Factory/examples/train_lora/qwen2_lora_config.yaml @@ -0,0 +1,37 @@ +### model +model_name_or_path: Qwen/Qwen2.5-32B-Instruct + +### method +stage: sft +do_train: true +finetuning_type: lora +lora_target: all +lora_rank: 64 +deepspeed: examples/deepspeed/ds_z3_offload_config.json # choices: [ds_z0_config.json, ds_z2_config.json, ds_z3_config.json] + +### dataset +dataset: Sky-T1-Lora +template: qwen25 +cutoff_len: 16384 +max_samples: 1000000 +overwrite_cache: true +preprocessing_num_workers: 16 + +### output +output_dir: saves/Sky-T1-Lora/full/original +logging_steps: 1 +save_steps: 100 +plot_loss: true + +### train +per_device_train_batch_size: 1 +gradient_accumulation_steps: 12 +learning_rate: 1.0e-4 +num_train_epochs: 3.0 +lr_scheduler_type: cosine +warmup_ratio: 0.1 +bf16: true +ddp_timeout: 180000000 + +report_to: wandb +run_name: Sky-T1-Lora \ No newline at end of file