ssbuild / chatglm2_finetuning

chatglm2 6b finetuning and alpaca finetuning
Apache License 2.0
144 stars 17 forks source link

请问如何继续训练? #56

Open sukibean163 opened 1 year ago

sukibean163 commented 1 year ago

如题,我在train.py的pl_model = MyTransformer(**transformer_args)后面尝试加上 from deep_training.nlp.models.petl.lora.petl_model import PetlModel PetlModel.from_pretrained(pl_model.backbone, os.path.join(output_weight_dir, "last")) 报错了。

ssbuild commented 1 year ago

https://github.com/ssbuild/chatglm2_finetuning/blob/bf9d82a5d3d3e029a485becdd266731b1bd77378/training/train_pl.py#L115 看下这里。lora的话, 就填写对应路径.

sukibean163 commented 1 year ago

https://github.com/ssbuild/chatglm2_finetuning/blob/bf9d82a5d3d3e029a485becdd266731b1bd77378/training/train_pl.py#L115

看下这里。lora的话, 就填写对应路径.

@ssbuild 感谢,解决了,用的pl_model.load_sft_weight('./best_ckpt/last',is_trainable=True) //不加adapter_model.bin