Go to file
hiyouga 0c9fda01e3 use fp16 model, add logcallback 2023-05-28 21:30:28 +08:00
data Initial commit 2023-05-28 18:09:04 +08:00
src use fp16 model, add logcallback 2023-05-28 21:30:28 +08:00
.gitattributes Initial commit 2023-05-28 18:09:04 +08:00
LICENSE Initial commit 2023-05-28 18:09:04 +08:00
README.md Initial commit 2023-05-28 18:09:04 +08:00

README.md

LLaMA Efficient Tuning

  1. Download the weights of the LLaMA models.
  2. Convert them to HF format using this script
python convert_llama_weights_to_hf.py \
    --input_dir path_to_llama_weights --model_size 7B --output_dir llama_7b
  1. Fine-tune the LLaMA models.
CUDA_VISIBLE_DEVICES=0 python src/train_sft.py \
    --model_name_or_path llama_7b \
    --do_train \
    --dataset alpaca_gpt4_zh \
    --finetuning_type lora \
    --output_dir path_to_sft_checkpoint \
    --overwrite_cache \
    --per_device_train_batch_size 2 \
    --gradient_accumulation_steps 2 \
    --lr_scheduler_type cosine \
    --logging_steps 10 \
    --save_steps 100 \
    --learning_rate 1e-5 \
    --num_train_epochs 1.0 \
    --fp16