Conversation
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
kevintli
added this pull request to stack #13
October 2, 2026 22:05
…Miles/Bridge Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
devin/1790903668-expert-lora-compat
branch
from
October 2, 2026 23:45
1b9f474 to
84cc6e6
Compare
…karound The new Bridge has no gpt-oss export override (per-expert LoRA exports as (E, ...) through the generic path) and includes NVIDIA-NeMo/Megatron-Bridge#5376, which keeps grouped-expert SwiGLU gate/up order on checkpoint load. The checkpoint-load restore is still needed because Miles load_slot drops the factory-merged weights. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Bridge 2e09c234 imports megatron.core.transformer.mla_qk_norm_config, which radixark/Megatron-LM added in 8a5dbe5. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…668-expert-lora-compat
…668-expert-lora-compat Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # tests/backends/test_miles_actor.py
devin-ai-integration
Bot
changed the base branch from
devin/1790812059-execute-sample-nonpreemptible
to
devin/1791181625-miles-bridge-pin-bump
October 5, 2026 08:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While trying to get gpt-oss-20b working on Spindle, I noticed a few bugs in Miles and Megatron-Bridge which caused our sampler policy to diverge from the trainer policy over the course of training. This showed up as unusually large KL and worse reward curves compared to the original blog post results. This PR implements a workaround on the Spindle side before we upstream the actual bugfixes to those repos.
Observed bugs
lora/checkpoint.load_slot): Miles unintentionally throws away the result ofdist_checkpointing.load, which means the first training step uses uninitialized weights (untiloptim_stepcopies over the correct ones from the optimizer state), causing a temporary spike in KL / instability.Workaround
This PR implements
miles_runtime/expert_lora_compat.py, which runs only whenEXPERT_LORA_COMPAT=1. That compatibility wrapper does the following:Safety checks:
(E, ...), and logspublish_noopandrestore_noopwhen upstream is already correct.Removal: once upstream fixes both bugs, delete the module and the two
enabled()branches.Validation
Setup: gpt-oss-20b, TP=8 EP=8, sec-search-rl, full 24-update runs
The plots below show
kl_sample_train_v2before and after this bug fix. Notice that without the fix:Tests:
tests/backends/test_expert_lora_compat.pycovers the 4→32 rewrite, the no-op on complete exports, rejection of mismatched or missing tensors, the param copy, and the master refreshpytest(with torch installed) gives 714 passed, 1 skippedLink to Devin session: https://modal.devinenterprise.com/sessions/f53cfabb210146de8f0338fe388d7973
Open in Devin Desktop: https://modal.devinenterprise.com/desktop/session/f53cfabb210146de8f0338fe388d7973?variant=devin
Requested by: @kevintli