oat icon indicating copy to clipboard operation
oat copied to clipboard

Lora training and gradinet is zero

Open sglucas opened this issue 11 months ago • 3 comments

Hi, thank you for your great work. I try to run the lora training code and also try to increase the BATCH_SIZE_PER_DEVICE from 1 to 2. I find the gradient will be zero, but It can work well when BATCH_SIZE_PER_DEVICE is 1. I try to fix it in the past few days but I find it is a little difficult. It could be better if you could provide some advice.

sglucas avatar Jan 02 '26 18:01 sglucas

Hi, the issue has beed addressed and the main reason is about FusedLinear function and padding tokens. Therefore, I will close it.

sglucas avatar Jan 03 '26 17:01 sglucas

Hi @sglucas , thanks for your update! I actually reproduced the issue yesterday but haven't found time to dig into the root cause. Would you share more and probably contribute a PR to fix that? Thanks!

lkevinzc avatar Jan 04 '26 00:01 lkevinzc

Hi @lkevinzc No problem and I can contribute a PR to fix it.

sglucas avatar Jan 04 '26 12:01 sglucas