Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bilp2 语言模型换为 THUDM/chatglm2-6b stage2 无法训练 #244

Closed
yhyang123 opened this issue Oct 24, 2023 · 1 comment
Closed

bilp2 语言模型换为 THUDM/chatglm2-6b stage2 无法训练 #244

yhyang123 opened this issue Oct 24, 2023 · 1 comment

Comments

@yhyang123
Copy link

/root/PaddleMIX/paddlemix/models/blip2/modeling.py 文件中,以下语句报错:
with paddle.amp.auto_cast(level="O2"):
outputs = self.language_model(
inputs_embeds=inputs_embeds,
attention_mask=attention_mask,
return_dict=True,
labels=labels,
)
loss = outputs.loss
报错信息如下:
*** TypeError: ChatGLMv2Model.forward() got an unexpected keyword argument 'labels'

@yhyang123
Copy link
Author

导入模型的时候用language_model = ChatGLMv2ForCausalLM.from_pretrained("THUDM/chatglm2-6b"),不要用 AutoModel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant