Skip to content

fix(lora): sync base weights on the distributed path when the weight checker is armed - #2520

Draft
Arist12 wants to merge 1 commit into
radixark:mainfrom
Arist12:fix/lora-disaggregated-base-weight-check
Draft

fix(lora): sync base weights on the distributed path when the weight checker is armed#2520
Arist12 wants to merge 1 commit into
radixark:mainfrom
Arist12:fix/lora-disaggregated-base-weight-check

Conversation

@Arist12

@Arist12 Arist12 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Problem

DistBucketedWeightUpdateMixin skips base-weight sync for LoRA unconditionally, on the grounds that the rollout engines already loaded the frozen base from --hf-checkpoint.

--check-weight-update-equal works by scrambling the engine's weights and then asserting the sync restored them. With the base skipped, the scrambled values stay in place and every base tensor fails with a mean absolute error around 0.5. update_weight_from_tensor already carries the carve-out for this; the distributed path does not.

Reproduced with examples/lora/run-qwen2.5-3B-megatron-lora-disaggregated.sh plus --ci-test.

Fix

Mirror the colocated sibling, including its skip_base_sync spelling (update_weight_from_tensor.py), so the two updaters read the same.

Test

tests/e2e/lora/test_lora_qwen2.5_0.5B_disaggregated.py — no test covered disaggregated LoRA at all.

One thing worth deciding rather than assuming

This makes the checker path send base weights that production LoRA never sends. The colocated file's own # TODO: implement lora weight checker suggests the real answer is a checker that compares adapters only. This PR restores parity between the two updaters; happy to take the adapter-only checker instead if that is the preferred direction.

…checker is armed

The distributed updater skips base-weight sync for LoRA unconditionally, but the weight
checker scrambles the engine's weights first and then asserts the sync restored them, so the
scrambled values stay in place and every base tensor fails with a mean absolute error around
0.5. update_weight_from_tensor already carries this carve-out; the distributed path does not.

No test covered disaggregated LoRA, so this adds one alongside the colocated case.
@Arist12
Arist12 force-pushed the fix/lora-disaggregated-base-weight-check branch from b0ce3ca to 5a97fd4 Compare August 13, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant