fix bug where Gemma4 is not working with recompute_granularity = "full" - #5324
Conversation
|
This PR has been automatically converted to draft because all PRs must start as drafts. When you are ready for review, click Ready for Review to begin the review process. This will:
See the contribution guide for more details. |
a95a7b1 to
3d7f6bd
Compare
9315f25 to
c8fd994
Compare
dcda546 to
a7f772e
Compare
|
@warpuv Thanks for the quick fix. I think the checkpoint arg-splitting is the right direction, but I found one correctness issue that should be fixed before merge. The reconstruction in rotary_pos_emb = (
rotary_pos_emb_global
if rotary_pos_emb_local is None
else (rotary_pos_emb_local, rotary_pos_emb_global)
)That changes semantics for a valid asymmetric dual-RoPE tuple like Could we preserve whether the original input was dual RoPE and rebuild the tuple whenever it was originally tuple/list, even if the local element is I’d also strongly suggest adding a focused regression test for |
e457ec9 to
41327aa
Compare
Signed-off-by: Yury Parfenov <4665475+warpuv@users.noreply.github.com>
… None. Lint error fix with te_checkpoint Signed-off-by: Yury Parfenov <4665475+warpuv@users.noreply.github.com>
Signed-off-by: Yury Parfenov <4665475+warpuv@users.noreply.github.com>
41327aa to
f56232b
Compare
|
Dear @guihong-nv, thank you for your review and valuable suggestions. I fixed the code and added test. |
Signed-off-by: Yury Parfenov <4665475+warpuv@users.noreply.github.com>
|
/ok to test 2473b86 |
|
/claude review |
|
@mcore-oncall |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/29596792106 |
What does this PR do ?
fix bug where Gemma4 is not working with recompute_granularity = "full"
Issue tracking
Linked issue: #5323
Contribution process
Pre-checks