LLaMA-Factory
LLaMA-Factory copied to clipboard
column names don't match, An error occurred while generating the dataset
May I have some hint about how to solve this question pls:
The detail:I want to use the dataset format like this in json file:
Then I just add the dataset info in the dataset_info.json like this:
My file are set like this:
-baichuan
--baichuan-7B
---baichuan-7B
--LLaMA-Efficient-Tuning
---data
----alpaca4zh.json
The training command:
CUDA_VISIBLE_DEVICES=0 python src/train_sft.py
--model_name_or_path /root/baichuan/baichuan-7B/baichuan-7B
--do_train
--dataset alpaca4zh
--finetuning_type lora
--lora_rank 8
--lora_target W_pack
--output_dir alpaca_baichuan
--per_device_train_batch_size 4
--per_device_eval_batch_size 4
--gradient_accumulation_steps 8
--lr_scheduler_type cosine
--logging_steps 10
--save_steps 100
--eval_steps 100
--learning_rate 5e-5
--max_grad_norm 0.5
--num_train_epochs 3.0
--dev_ratio 0.01
--evaluation_strategy steps
--load_best_model_at_end
--plot_loss
--fp16
The bug:
数据集定义方式不对,请仔细阅读源码和 data 文件夹下的 readme。另外,本项目自带了 alpaca4zh 数据集,请使用 --dataset alpaca_gpt4_zh
参数。
不好意思,麻烦问下是因为我的数据格式里没有history么?默认不是none么呜呜呜。我直接填写了script_url, 然后试了不太行就也加上了file_name的
你的用法完全不正确,请仔细看说明。
我感觉数据集定义好像也没么问题,难道要重新定义columns么,用的都是缺省参数。
难道还要仿写个.py文件吗?
@dsp6414 参考项目中已有的数据集定义,默认没有 history column,如果文件有则需要另外指定。
是题主script_url那一行不要吗?我感觉它和代码提供的数据集是一样的。
@dsp6414 是的,只是提供文件的话定义 file_name 就足够了。