Skip to content

Commit

Permalink
add ULD lora example
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif committed Nov 27, 2024
1 parent a4f1ab5 commit 049b8b2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/scripts/gkd.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@
--push_to_hub \
--gradient_checkpointing \
--torch_dtype bfloat16
# ULD LoRA:
python examples/scripts/gkd.py \
--model_name_or_path Qwen/Qwen2-0.5B-Instruct \
--teacher_model_name_or_path google/gemma-2-2b-it \
--dataset_name trl-lib/chatbot_arena_completions \
--learning_rate 2e-4 \
--per_device_train_batch_size 4 \
--gradient_accumulation_steps 8 \
--output_dir gkd-model \
--logging_steps 10 \
--num_train_epochs 1 \
--push_to_hub \
--gradient_checkpointing \
--use_peft \
--lora_r 64 \
--lora_alpha 16
"""

from accelerate import PartialState
Expand Down

0 comments on commit 049b8b2

Please sign in to comment.