Repository navigation
[Maintenance] Consolidate rollout, checkpoint, topology fixes and colocate docs - #460
Conversation
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
There was a problem hiding this comment.
Code Review
This pull request introduces several enhancements and robustness fixes across the codebase. Key changes include patching Megatron's distributed optimizer to correctly handle native Adam/AdamW state restoration, implementing a robust rollout server-idle completion check with parallel engine probing, and refining NVLink detection to prevent launcher aborts under strict shell options. Additionally, it updates argument validation for colocated memory offloading, improves vLLM generation metadata validation, and adds comprehensive unit and integration tests. Feedback on the changes suggests adding a pytestmark to skip the new CUDA-dependent integration tests when running in CPU-only environments to prevent runtime failures.
| from megatron.core.optimizer.optimizer import param_group_identifier_keys | ||
| from megatron.core.optimizer.optimizer_config import OptimizerConfig | ||
|
|
||
| NUM_GPUS = 1 |
There was a problem hiding this comment.
Since this test file utilizes CUDA devices (device="cuda" on line 22), running it in a CPU-only environment (such as local development machines or standard CPU CI runners) will raise a RuntimeError. To make the test suite more robust and prevent unexpected failures on non-GPU environments, it is highly recommended to add a module-level pytestmark to skip all tests in this file if CUDA is not available.
| NUM_GPUS = 1 | |
| pytestmark = pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA is required for this test") | |
| NUM_GPUS = 1 |
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Purpose
Validate rollout data before Sample mutation, restore Adam state with independent storage, and consolidate topology, request metrics, bounded drain and colocate fixes. Includes local Torch Qwen norm conversion and pageable CPU weight backups on WSL.
Target:
0z5a-branchat3e569314. Maintenance increment: 25 files, +1,709/-521; head9a7cb7ec.Consolidates #426, #427, #438, #439, #440, #444 and #445; #443 remains independent. Collector #454 and TransferQueue #453 are downstream stacks. Existing PRs remain Draft. Private validation scripts, logs, model tensors and coordination records are outside the diff.
Test Plan
Official Qwen3-0.6B (
c1899de2), BF16, RTX 5080 SM120, Torch 2.13+cu132. Three native GRPO updates versus two saved updates plus a fresh-process third update: complete typed model/optimizer/scheduler/RNG state, data cursor, tokens/rewards/gradients and physical serving weights. Each rollout has 16 samples and at most 16 response tokens. Repeat independently with original NVIDIA Apex FusedAdam.Both comparison stacks share scalar Torch AdamW (
foreach=False), FlashDotProductAttention, pageable DCP staging, Qwen norm/WSL compatibility fixes and native full/disk HF publication. The private external frontend bridge invokes original level-2 release and weights/KV resume RPCs, checking actual HTTP sleep/wake. Vendor validation uses original Apex optimizer/kernels with Torch RMSNorm.Three complete AB/BA/AB pairs compare separately built base vLLM
9236159plus its four original patches with candidateced6857plus current patches. Both use native V1 (VLLM_USE_V2_MODEL_RUNNER=0): baseline V2 requires UVA unavailable on WSL. Ordinary/vendor restoration used candidate V2. Measurements cover two complete compatible stacks. Entry time includes private hashing audits; native update/publication spans exclude added hashing. Build time, persistent service startup and imports beforetrain(args)are excluded.Test Result
Observed duration reductions are small (0.11–0.64%); these three pairs establish the measured scope, without a general speedup or VIME-only attribution.
Ordinary gradient norms: 17.4246958549 / 16.9210435940 / 17.6251870003; vendor: 17.4246958549 / 16.9137404343 / 17.6507095151. Across the six speed runs, maximum sample-mean logprob difference is 0.00643478 (threshold 0.03), maximum individual-token difference 0.21428418. Exact BF16 train/inference logprob equality is not established.
Transformer Engine is untested; plain Torch CUDA IPC is unavailable on this WSL host. The PR remains Draft.