Closed waltonfuture closed 3 months ago
我们建议训练 base 模型使用 default template
如果你使用 qwen template,则需要在 lora 训练时同时加入 embedding 层,即 --additional_target embed_tokens,lm_head
@hiyouga 请问使用default template训练base模型的话,推理的template也得用default而不是qwen是吗?
训练推理必须一致
我们建议训练 base 模型使用 default template 如果你使用 qwen template,则需要在 lora 训练时同时加入 embedding 层,即
--additional_target embed_tokens,lm_head
您好,我想请教下,我基于Qwen1.5 base做全量sft训练,您说模版建议用base有什么特别的知识吗?
@codemaster17611 全量训练的话用什么模板都行,记得加 --resize_vocab
您好!请问您能正常合并base微调之后的adpter和base模型吗。我在合并模型的时候提示 TypeError: LoraConfig.init() got an unexpected keyword argument 'layer_replication' 我需要手动去微调得到的adpter_config.json文件中删去'layer_replication'项,不知道这是否正常?
您好!请问您能正常合并base微调之后的adpter和base模型吗。我在合并模型的时候提示 TypeError: LoraConfig.init() got an unexpected keyword argument 'layer_replication' 我需要手动去微调得到的adpter_config.json文件中删去'layer_replication'项,不知道这是否正常?
我可以正常合并。可能要检查一下训练用的lora target?
您好!请问您能正常合并base微调之后的adpter和base模型吗。我在合并模型的时候提示 TypeError: LoraConfig.init() got an unexpected keyword argument 'layer_replication' 我需要手动去微调得到的adpter_config.json文件中删去'layer_replication'项,不知道这是否正常?
我可以正常合并。可能要检查一下训练用的lora target?
不好意思,由于我的粗心,这个存在的问题是我合并和微调使用的是两台不同的服务器,安装peft时版本不一致导致的。感谢您抽空回答!
Reminder
Reproduction
作者您好! base模型的微调脚本:
微调后合并lora脚本:
使用合并lora后的模型推理
模型输出:
我使用Qwen1.5-7B-Chat微调,模型就不会出现这种情况。我的微调和推理都用了qwen模板。请问是什么原因导致base模型微调失败呢?谢谢解答!
Expected behavior
希望微调base模型后,模型可以正常回答,而不是持续输出无意义内容
System Info
No response
Others
No response