Skip to content

[xpu] fix: pi0.5 grad norm nan - #73

Merged
nullnonenilNULL merged 1 commit into
baidu-baige:masterfrom
Dreamspr22:master
May 27, 2026
Merged

[xpu] fix: pi0.5 grad norm nan#73
nullnonenilNULL merged 1 commit into
baidu-baige:masterfrom
Dreamspr22:master

Conversation

@Dreamspr22

Copy link
Copy Markdown
Contributor

before:
image

after fix:
070070cdb6e94accb8b1c9b43082cb1b

Two main issues lead to precision errors: incorrect initialization of GemmaRotaryEmbedding.inv_freq when using init_model_with_meta_device, and dtensor precision problems with the XTE optimizer.

Fixed precision now aligns with GPU percentiles.
image

@nullnonenilNULL
nullnonenilNULL merged commit 1da4fc5 into baidu-baige:master May 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants