ChatGLM-Tuning
ChatGLM-Tuning copied to clipboard
怎么基于之前训练过的checkpoint继续训练
能否基于之前的checkpoint继续训练?每次都需要重新开始会造成较多的时间浪费。
代码的model = get_peft_model(model, peft_config)改成model = PeftModel.from_pretrained(model, "xxx")应该就可以了吧
如果是 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")应该就可以了吧