大模型sft后出现复读机情况

训练脚本如下:

Path

MODEL=/models/Qwen3-8B
OUTPUT_DIR=/sft_output/zhongliu/Qwen3-8B/zhongliu_v5

MASTER_PORT=29500 \
NPROC_PER_NODE=4 \
CUDA_VISIBLE_DEVICES=4,5,6,7 \
swift sft \
--model ${MODEL} \
--train_type full \
--torch_dtype bfloat16 \
--num_train_epochs 3 \
--per_device_train_batch_size 1 \
--per_device_eval_batch_size 1 \
--learning_rate 1e-5 \
--gradient_accumulation_steps 4 \
--save_strategy epoch \
--logging_steps 1 \
--max_length 10240 \
--warmup_ratio 0.05 \
--dataloader_num_workers 8 \
--save_total_limit 5 \
--save_only_model true \
--output_dir ${OUTPUT_DIR} \
--report_to tensorboard \
--deepspeed zero3 \
--gradient_checkpointing true \
--use_liger_kernel \
--attn_impl flash_attn \

测试temperature=0.6,top_p=0.95,还是会出现模型复读的情况,训练数据集是做的中医领域的相关数据集,自我认知以及安全性。

展开
收起
游客wgw62ndjcqwds 2026-01-08 14:21:59 20 分享 版权
0 条回答
写回答
取消 提交回答

阿里云自主研发的通义大模型,凭借万亿级超大规模数据训练和领先的算法框架,实现全模态高效精准的模型服务调用。https://www.aliyun.com/product/tongyi

还有其他疑问?
咨询AI助理