Add MoVA training, weight sync, and rollout validation - #87
Draft
akhauriyash wants to merge 8 commits into
Draft
Conversation
Convert gated dense and routed-value attention tensors into the canonical xLLM inference layout. Keep MoVA value experts on attention TP rather than FFN expert parallelism, synchronize router bias buffers, and reject stale cache-preserving updates.
Register the MoVA and xLLM router CLI contract in Miles and select Megatron's MoVA config and heterogeneous block spec whenever value experts are enabled. Fail early on incompatible provider, checkpoint-conversion, and attention settings while preserving the ordinary Transformer provider unchanged.
Add a cheap opt-in acceptance check that queries every rollout engine after each synchronization. Keep the existing random CI sample as the default and avoid full tensor comparisons.
Include the upstream K3 estimator before pinning the acceptance image. Resolve the shared argument-test addition by retaining both MoVA and K3 coverage.
Weight-version metadata must never advance after a failed or timed-out RDMA write. Drain every submitted transfer, clear the queue reliably, and surface aggregate failures to abort the update before rollout resumes.
Training recomputes policy log probabilities by dividing logits by the rollout temperature, so greedy temperature zero creates NaNs only after an expensive rollout. Validate before runtime setup while retaining zero-temperature support for rollout-only generation.
P2P builds a sharded SGLang model locally before transferring weights. Passing only the model path discarded the rollout server dtype, so float32 HF metadata silently resolved auto to fp16 even when live engines explicitly used bf16. Preserve the queried rollout dtype and pin both explicit and auto behavior in regression coverage.
Rollout filters intentionally zero loss masks, but the fail-fast trainer validator could not distinguish those samples from corrupted data. Carry the filter decision through DP sharding, accept only explicitly filtered all-zero masks, and keep unexplained zeros fail-closed.
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
Stack dependencies
This is the Miles side of the internal MoVA RL stack and is reviewed together with:
The validated training recipe must use
--no-rope-fusionfor MoVA. The pinned Megatron fused packed-THD RoPE path does not preserverotary_interleaved=True, causing trainer/rollout policy mismatch. Keep fusion disabled until the permanent Megatron fix passes end-to-end parity.Validation
34460b4fa528a8b8015f252fe2fd738a87e606a0Draft for internal review. No merge requested.