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

多卡训练 #13

Open
Isla0628 opened this issue Nov 8, 2023 · 2 comments
Open

多卡训练 #13

Isla0628 opened this issue Nov 8, 2023 · 2 comments

Comments

@Isla0628
Copy link

Isla0628 commented Nov 8, 2023

你好,在摘要提取中,进行多卡训练的时候,出现这样的问题AttributeError: 'DataParallel' object has no attribute 'prepare_decoder_input_ids_from_labels'是模型本身不能进行多卡训练吗?

@jsksxs360
Copy link
Owner

不好意思,目前的代码都没有考虑多卡训练。我也不会[捂脸]。

但是你这应该不是多卡训练的问题。

prepare_decoder_input_ids_from_labels()AutoModelForSeq2SeqLM 模型的函数。你可以检查一下代码,正确的调用应该是类似 model.prepare_decoder_input_ids_from_labels(labels)

@Isla0628
Copy link
Author

Isla0628 commented Nov 8, 2023

不好意思,目前的代码都没有考虑多卡训练。我也不会[捂脸]。

但是你这应该不是多卡训练的问题。

prepare_decoder_input_ids_from_labels()AutoModelForSeq2SeqLM 模型的函数。你可以检查一下代码,正确的调用应该是类似 model.prepare_decoder_input_ids_from_labels(labels)

没事,我也是在学习中,但是我单机单卡训练是没有问题的

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

2 participants