maxtext icon indicating copy to clipboard operation
maxtext copied to clipboard

[Bug] adam_pax has reuse donated buffer warning

Open LeoXinhaoLee opened this issue 2 years ago • 5 comments

Hi, I noticed that when using adam_pax instead of adamw as optimizer, it will give reuse donated buffer warning. I am wondering if this is expected, and why the code uses adam_pax instead of the standard optax.adam as it does for adamw.

Thank you very for your help! @rwitten

LeoXinhaoLee avatar Mar 06 '24 02:03 LeoXinhaoLee

I'd recommend not using this optimizer -- it is only for MLPerf.

@ZhiyuLi-goog -- can you look at the (quite scary) warning?

rwitten avatar Mar 07 '24 20:03 rwitten

Thank you @LeoXinhaoLee for heads up.

The warning message looks new to me. I'm not sure how to reproduce this warning message. Would you have any sample code for reproduction? This would help me troubleshoot the issue.

ZhiyuLi-goog avatar Mar 07 '24 21:03 ZhiyuLi-goog

Hi, I remember running a llama-7b model with Adam Optimizer will give this warning at the beginning. I think for other models this warning could still occur, seems like an orthogonal problem to model.

LeoXinhaoLee avatar Mar 08 '24 20:03 LeoXinhaoLee

My device is a v3-512 pod. Meanwhile, would you mind helping me with another issue posted by me regarding data loading pipeline? Thank you so much!

LeoXinhaoLee avatar Mar 08 '24 20:03 LeoXinhaoLee

Hi @LeoXinhaoLee

Many thanks for finding the bug. Have filed a fix. Feel free to let me know if you have new questions.

ZhiyuLi-goog avatar Mar 09 '24 00:03 ZhiyuLi-goog

The fix was merged in and marked it as fixed.

ZhiyuLi-goog avatar Mar 13 '24 23:03 ZhiyuLi-goog

Closed it with a fix.

ZhiyuLi-goog avatar Mar 13 '24 23:03 ZhiyuLi-goog