Issue with mismatched tensor sizes during training with DeepSpeed

I’m currently training a model using** Hugging Face**’s Trainer with DeepSpeed integration, and I’m encountering an error related to mismatched tensor sizes. Specifically, I am getting the following error:

The size of tensor a (50) must match the size of tensor b (3) at non-singleton dimension2

I hope someone can fix it and share your version please!

my data:

Here is my setup:

I’ve checked that the input_ids and labels have the same shape. I’ve verified the batch size in both the Trainer configuration and the DeepSpeed config. I’ve also ensured that the model is correctly placed on the device (cuda or cpu).

maybe, i’m not sure.

原文链接:Issue with mismatched tensor sizes during training with DeepSpeed

© 版权声明
THE END
喜欢就支持一下吧
点赞6 分享
No matter what label is thrown your way, only you can define your self.
不管你被贴上什么标签,只有你才能定义你自己
评论 抢沙发

请登录后发表评论

    暂无评论内容