FudanDISC / DISC-LawLLM

[中文法律大模型] DISC-LawLLM: an intelligent legal system powered by large language models (LLMs) to provide a wide range of legal services.
Apache License 2.0
549 stars 61 forks source link

Same output after finetuning #29

Open lichenyigit opened 11 months ago

lichenyigit commented 11 months ago

进行了10000次训练力度,相同的问题最终输出结果一样。请问是哪个步骤出了问题? 数据集: 新闻Q&A.json 训练脚本:

torchrun --nproc_per_node 1 src/train_bash.py \
    --stage sft \
    --model_name_or_path ShengbinYue/DISC-LawLLM \
    --do_train \
    --dataset yiqi5-fun \
    --template baichuan2 \
    --finetuning_type lora \
    --lora_rank 8 \
    --lora_target W_pack \
    --output_dir /home/DISC-output-checkpoint \
    --overwrite_output_dir \
    --overwrite_cache \
    --per_device_train_batch_size 4 \
    --per_device_eval_batch_size 4 \
    --gradient_accumulation_steps 8 \
    --preprocessing_num_workers 16 \
    --lr_scheduler_type cosine \
    --logging_steps 10 \
    --save_steps 100 \
    --eval_steps 100 \
    --learning_rate 1e-5 \
    --max_grad_norm 0.5 \
    --num_train_epochs 10000.0 \
    --evaluation_strategy steps \
    --load_best_model_at_end \
    --plot_loss \
    --fp16 \
    --val_size 0.01

@Charlie-XIAO

Charlie-XIAO commented 11 months ago

@yueshengbin who might be more familiar with these.