Repository navigation
Conversation
|
/ok to test 3b71b9e |
|
/ok to test 482ab27 |
Signed-off-by: Shuang Yu <[email protected]>
Signed-off-by: Shuang Yu <[email protected]>
482ab27 to
0547792
Compare
|
/ok to test 0547792 |
Signed-off-by: Shuang Yu <[email protected]>
10-step test: reward gate adjusted; saved metrics recheckedPushed Job 20103285 ran all 10/10 steps on 32 nodes / 256 GPUs in 3h33m, with refit code at The job originally exited 1:0 because its final reward check still used the 20-step threshold of -0.2. The earlier successful 20-step run also missed that gate at step 10 (maximum reward -0.5014), only crossing it at step 15. Re-running the metric checker on the saved results with the revised gate passes:
This is a post-run metric re-evaluation, not a newly executed or originally passing Slurm job. The refit code and training configuration are unchanged by this commit. The reward threshold remains provisional pending more 10-step runs. |
|
/ok to test 795a472 |
|
/ok to test 1dc360a |
|
/ok to test 618dfc4 |
|
/ok to test 882c9cb |
|
/ok to test 441a0e4 |
yuki-97
left a comment
There was a problem hiding this comment.
Thanks for tackling the 8 GiB grouped-expert refit OOM on Qwen3.5-397B. Exporting contiguous CUDA tensors directly and releasing the ping-pong pair before an oversized transfer is a clean way to recover the headroom.
Thanks also for posting the 32n8g end-to-end run in the description, which makes it easy to see the fix holds at the target scale.
Scope: stream_weights_via_ipc_zmq_impl in nemo_rl/models/policy/utils.py, its unit tests, and the Qwen3.5-397B recipe and release test.
Checked:
-
Peak GPU memory during an oversized transfer, derived from the code (not measured).
Sis the parameter size andBthe two regular buffers combined (4 GiB withrefit_buffer_size_gb: 4); the last column is for the 8 GiB grouped-expert on 397B:tensor before after 397B (before → after) contiguous CUDA B + 2S(source + copy)S(source only, exported directly)20 → 8 GiB non-contiguous CUDA B + 3S(source + copy +reshape(-1)temporary)3S(copy path unchanged)28 → 24 GiB contiguous / non-contiguous CPU B + S(copy)S(copy)12 → 8 GiB -
Extra cost of the new path, which the before/after code does not pay on the ordinary path:
- After flushing the pending group, the sender now waits for its ACK before releasing the pair, so that wait is no longer overlapped with the oversized copy (only relevant for CPU / non-contiguous tensors, since the direct export has no copy).
- The pair is released with
empty_cacheand re-allocated by the next ordinary parameter. If an oversized tensor appears in every layer, this repeats per layer; consecutive oversized tensors skip the re-allocation.
-
Wire protocol — an oversized parameter is still one group
(handle, [name], aligned_size)and the grouping rule for ordinary parameters is unchanged. The vLLM and TRT-LLM receivers slicebuffer[offset : offset + size_in_bytes]fromstate_dict_infoand only checkoffset == used_bytes, so the smaller exported buffer is fine. -
ACK ordering and buffer lifetime — the pending group is flushed and the outstanding ACK consumed before the regular pair is released, and each oversized send is ACKed before its storage is dropped.
-
Direct IPC export — storage offset and views of a larger storage are carried by
reduce_tensor. -
Lazy re-allocation of the regular pair — small → oversized → small, oversized-first and consecutive oversized streams all behave as intended, including device resolution for CPU-yielded tensors.
-
Test expectations — the allocation lists in the new tests match a hand computation from the code.
-
refit_buffer_size_gb: 4— read as the total (two 2 GiB buffers) on the colocated vLLM path this recipe uses.
LGTM.
Problem
Oversized tensors in streaming CUDA-IPC refit can exhaust GPU memory if both regular ping-pong buffers remain allocated alongside the oversized transfer. Qwen3.5-397B includes an 8 GiB grouped-expert export. Allocating the regular pair before checking each tensor also needlessly recreates it between consecutive oversized exports.
Changes
STEPS_PER_RUNandMAX_STEPSto 10 intests/test_suites/llm/grpo-qwen3.5-397ba17b-32n8g-megatron.v2.shto fit the run within 4 hours. Adjust its provisional reward gate from> -0.2to> -0.7; retain the KL gate< 0.004.r0.8.0at6a521ef5af1ab8e32ab9aaba4511ca52259603c3.Validation of current head
Head:
795a472c95cc41380d4d820f116088ccfd7f0f24(threshold-only update; refit code unchanged from0547792dda3a23251141a4b6795698f52753957a).git diff --checkpassed.20103285completed all 10/10 training steps on 32 nodes / 256 GPUs in 3h33m, using refit-code commit0547792dda3a23251141a4b6795698f52753957a. Fresh run, no checkpoint resume, no async-scheduling override.1:0: KL passed, but the unchanged 20-step reward threshold (> -0.2) failed. It was not an originally passing test job.795a472c95cc41380d4d820f116088ccfd7f0f24changes the provisional 10-step reward gate to> -0.7, retaining KL< 0.004. The earlier successful 20-step run also missed-0.2at step 10 (best reward-0.5014) and first crossed it at step 15.0.0013572548632510006 < 0.004; maximum reward-0.5575790405273438 > -0.7; 10 loss steps and finite loss/KL/reward metrics. Shell syntax, diff checks, and applicable pre-commit checks passed. No new training run was launched for this threshold-only change.rl.r080-pipeline71876279-878d98f2-x86.sqsh, with NIXL 1.4.1 and cuDNN frontend 1.28.0 updates applied in the job containers to match the rebased lockfile.Historical validation (before the latest regression fix/rebase)
19882909).19922621and19933869, using checkpoint/resume andasync_scheduling=falseto work around fix(recipes): disable vLLM async scheduling for GLM-5.1 #4354. That override is not part of this PR.