Repository navigation
feat(awex): add separation AdamW delta weight transfer - #1623
Conversation
22b904f to
3379e51
Compare
| "choices": ["disk", "xccl", "awex"], | ||
| }, | ||
| ) | ||
| weight_update_transfer: str = field( |
There was a problem hiding this comment.
Can the option be described using enable_delta_weight_update(bool), as the current name does not sound understandable of its function?
There was a problem hiding this comment.
Good suggestion. I replaced weight_update_transfer: full|delta with enable_delta_weight_update: bool = False in TrainEngineConfig, and updated the validation, examples, generated CLI docs, and regression tests accordingly. The runtime delta-transfer protocol is unchanged. Addressed in 56145b7.
| raise ValueError("delta weight transfer does not support actor.use_lora=True") | ||
|
|
||
| exported_env = { | ||
| "DTE_SEPARATION_WEIGHT_UPDATE": "1", |
There was a problem hiding this comment.
Can an annotation be added to describe the functions of these environment variables?
There was a problem hiding this comment.
Added inline comments describing the roles of all four environment variables: separation AWEX path selection, sparse delta transfer, periodic full-sync anchors, and streaming pre-step reconstruction. Their names, values, and runtime behavior are unchanged. Addressed in 56145b7.
3379e51 to
56145b7
Compare
56145b7 to
ae34fb6
Compare
Summary
This PR adds an opt-in, AReaL-DTE-backed AdamW delta weight transfer path for AWEX separation mode.
The initial synchronization and periodic anchors use the existing full-weight path. Safe, contiguous intermediate versions use sparse deltas derived from distributed AdamW optimizer state.
The feature is disabled by default and does not change existing full-weight behavior.
PR migration
This PR supersedes #1604.
The implementation has been rebased onto the latest upstream
mainand moved from a fork branch to anareal-project/AReaLrepository branch so the complete protected CI workflow can run.Previous review context and approval:
The cumulative feature scope remains the same as #1604, with additional protocol-safety fixes described below.
Dependency
The required AReaL-DTE support has been merged:
It provides external sparse-delta construction, index remapping, and durable
DeltaTrackercommit tracking used by this integration.Supported configuration
The supported topology is intentionally restricted to the path validated by this PR:
The combined inference and training world size must be a positive power of two, as required by the recursive sparse transport scheduler in AWEX 0.8.0.
Unsupported backends, versions, topologies, LoRA mode, minibatch counts, and world sizes fail fast before worker/process-group initialization.
Changes
AdamW change detection
The training side reconstructs pre-step parameters from distributed AdamW state using:
exp_avgandexp_avg_sq;The reconstructed tensors pass through the same Megatron-to-HF conversion path used by full-weight synchronization.
Missing or ambiguous optimizer state, unsupported precision-aware state, skipped or discontinuous versions, and other unsafe conditions fall back to a full synchronization.
Separation transfer lifecycle
The Megatron and SGLang adapters now support:
A failed transfer does not advance the delta version, anchor counter, or detector watermark.
Protocol safety
This version additionally:
Configuration and documentation
This PR includes:
ppo_n_minibatches=1.Scope
This PR intentionally covers only separation-mode AdamW delta transfer.
It does not add or modify:
Zero-gradient steps continue through normal AdamW inversion and mask calculation because momentum and weight decay may still modify model-visible weights.
Validation
The final branch was rebased onto:
Final post-rebase validation:
The implementation lineage was exercised in a completed 100-step Qwen3-30B-A3B separation AdamW delta run.