文章预览
【#】SFT 训练 项目地址:https://llamafactory.readthedocs.io/zh-cn/latest/getting_started/sft.html 可以使用以下命令进行微调: llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml examples/train_lora/llama3_lora_sft.yaml 提供了微调时的配置示例。该配置指定了模型参数、微调方法参数、数据集参数以及评估参数等。您需要根据自身需求自行配置。 ### examples/train_lora/llama3_lora_sft.yaml model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct stage: sft do_train: true finetuning_type: lora lora_target: all dataset: identity,alpaca_en_demo template: llama3 cutoff_len: 1024 max_samples: 1000 overwrite_cache: true preprocessing_num_workers: 16 output_dir: saves/llama3-8b/lora/sft logging_steps: 10 save_steps: 500 plot_loss: true overwrite_output_dir: true per_device_train_batch_size: 1 gradient_accumulation_steps: 8 learning_rate: 1.0e-4 num_train_epochs: 3.0 lr_scheduler_type: cosi
………………………………