luohuan02

Results 3 comments of luohuan02

这边用单个 3090 zero2 off cpu 能跑起来(8 卡可以训练快点,不能提高模型上线,具体原因未知),脚本参考 ``` LR=1e-4 MASTER_PORT=$(shuf -n 1 -i 10000-65535) deepspeed --num_gpus=1 --master_port $MASTER_PORT main.py \ --deepspeed zero2_off_cpu.json \ --do_train \ --train_file AdvertiseGen/train.json \ --test_file AdvertiseGen/dev.json...

推广一个简单 ddp 修改方式 https://zhuanlan.zhihu.com/p/621793987

如果是 model.save_pretrained(training_args.output_dir) 的模型是可以这样的,需要加上可训练参数 PeftModel.from_pretrained(model, "模型保存路径", is_trainable=True),已测试 ok > 代码的model = get_peft_model(model, peft_config)改成model = PeftModel.from_pretrained(model, "xxx")应该就可以了吧