hiyouga/LLaMA-Factory

偏好数据集 Supervised Fine-Tuning 有问题

Closed this issue · 0 comments

Reminder

  • I have read the README and searched the existing issues.

Reproduction

CUDA_VISIBLE_DEVICES=0 llamafactory-cli train
--stage sft
--do_train True
--model_name_or_path LangModel/models/meta-lama/Meta-Llama-3-8B-Instruct
--finetuning_type lora
--template llama3
--flash_attn auto
--dataset_dir data
--dataset comparison_gpt4_zh
--cutoff_len 1024
--learning_rate 5e-05
--num_train_epochs 3.0
--max_samples 100000
--per_device_train_batch_size 2
--gradient_accumulation_steps 8
--lr_scheduler_type cosine
--max_grad_norm 1.0
--logging_steps 5
--save_steps 100
--warmup_steps 0
--optim adamw_torch
--packing False
--report_to none
--output_dir saves/LLaMA3-8B-Chat/lora/train_2024-05-17-07-46-47
--fp16 True
--lora_rank 8
--lora_alpha 16
--lora_dropout 0
--lora_target q_proj,v_proj
--plot_loss True

[WARNING|logging.py:314] 2024-05-17 07:47:37,780 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.

05/17/2024 07:47:37 - INFO - llmtuner.data.template - Replace eos token: <|eot_id|>
05/17/2024 07:47:37 - INFO - llmtuner.data.template - Add pad token: <|eot_id|>
Traceback (most recent call last):
File "/workspace/longze/miniconda3/envs/llama3/bin/llamafactory-cli", line 8, in
sys.exit(main())
^^^^^^
File "/workspace/longze/LangModel/LLaMA-Factory/src/llmtuner/cli.py", line 49, in main
run_exp()
File "/workspace/longze/LangModel/LLaMA-Factory/src/llmtuner/train/tuner.py", line 33, in run_exp
run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
File "/workspace/longze/LangModel/LLaMA-Factory/src/llmtuner/train/sft/workflow.py", line 33, in run_sft
dataset = get_dataset(model_args, data_args, training_args, stage="sft", **tokenizer_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/longze/LangModel/LLaMA-Factory/src/llmtuner/data/loader.py", line 144, in get_dataset
raise ValueError("The dataset is not applicable in the current training stage.")
ValueError: The dataset is not applicable in the current training stage.

Expected behavior

No response

System Info

No response

Others

No response