THUDM / VisualGLM-6B

Chinese and English multimodal conversational language model | 多模态中英双语对话语言模型
Apache License 2.0
4.07k stars 414 forks source link

调用微调模型报错 #269

Open 2499048212 opened 11 months ago

2499048212 commented 11 months ago

使用finetune微调了模型,运行cli_demo加载微调后的模型时报错ValueError: Missing keys for inference ['transformer.position_embeddings.weight'].If you still want to inference anyway, pass --force_inference to args. 请问该怎么处理。 报错

1049451037 commented 11 months ago

说明你微调的时候没用最新版的sat代码,但是部署的时候又使用了新版sat环境。请保持训练和部署环境一致。

建议使用新版sat代码,权重格式已经发生变化(需要重新下载),两者不兼容,如果混用会发生推理错误。

2499048212 commented 11 months ago

如果我忽略这个问题,继续在SwissArmyTransformer==0.4.0的环境中使用模型,模型的能力会受到影响吗

1049451037 commented 11 months ago

如果你训练的时候用的是0.4.0,并且训练的时候验证过inference没问题,那就没影响。