Repository navigation
feat(repro): add Tier 2 8-GPU & 4-GPU closed-loop RL, GRP/EHP benchmarks, and Colab quickstart - #35
Open
kaiwenKevinn wants to merge 5 commits into
Open
kaiwenKevinn wants to merge 5 commits into
kaiwenKevinn wants to merge 5 commits into
Conversation
… scheduling benchmark
…move redundant rollout-only benchmark
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
Adds Tier 2 of the Libra reproduction suite (
repro/tier2_four_gpu_closed_loop/) focused on Slurm-free End-to-End Closed-Loop RL, 8-GPU GRP & EHP benchmarks, and Google Colab 1-GPU Co-Located Quickstart:1 Train + 7 Rollout [TP=1, TP=2, TP=4]):repro/tier2_four_gpu_closed_loop/launch_4gpu.py(--mode 8gpu),run_8gpu.sh,config_8gpu_qwen3_4b.yaml, andsample_data/dapo_cost_profile.json: Launches 1 FSDP trainer (GPU 0) and 3 heterogeneous supervised vLLM servers (tp1onGPU 1,tp2onGPUs 2,3,tp4onGPUs 4..7) with CUDA graphs,--enable-prefix-caching, per-instance compile cache isolation, pre-seededCausalPrefixTree(tree.json), and parallel in-place disk weight reload.repro/tier2_four_gpu_closed_loop/benchmark_grp.py&run_grp.sh: Verifies Phase 1PreflightPlanner/TwoLevelNestedOptimizer8-GPU allocation search (1 Train + TP=[4,2,1],15.0 ms) and Phase 2 realvLLM + FSDPexecution comparingfixed_4train_4rollout_tp1(4×TP=1),fixed_2train_6rollout_tp2(3×TP=2), andgrp_optimal_1train_7rollout_hetero(TP=[1,2,4],cmlfq_cost).repro/tier2_four_gpu_closed_loop/benchmark_ehp.py&run_ehp.sh: Verifies Phase 1loan_replica_capacity&bounded_update_time, Phase 2ElasticHybridPoollifecycle +ZERO_SYNCplaceholder guard + loopbackElasticGradientClient/ServerIPC +InterReplicaGradientDomain, and Phase 3 realQwen/Qwen3-4Belastic data-parallel training across 1, 2 (borrow_1), and 4 (borrow_3) H20 GPUs.--mode 4gpu(1 Train + TP=1 + TP=2,config_4gpu_qwen3_4b.yaml) and--mode colab-1gpu --colab-tier auto(T4/L4/A100,colab_quickstart.ipynb,config_colab_1gpu.yaml).infra/execution/batch_dispatcher.py,workflow/dapo_math.py,engine/train_engine.py,scripts/benchmark_scheduler_train.py.Verified Real-GPU Results (
8 × NVIDIA H20-3e,Qwen/Qwen3-4B)1. GRP 8-GPU Resource Partitioning (
benchmark_grp.py, 4 steps × 16 trajectories)4/4 TP=1fixed_4train_4rollout_tp14×TP=1(round_robin + prefix_affinity)222.275 s176.315 / 29.538 / 16.40417.276 rollouts/min(314.06 tok/s)4/41.000xfixed_2train_6rollout_tp23×TP=2(least_connections + prefix_affinity)266.654 s220.797 / 29.535 / 16.30414.401 rollouts/min(262.03 tok/s)3/30.834x(-19.97%)grp_optimal_1train_7rollout_heteroTP=[1,2,4](cmlfq_cost)115.375 s69.981 / 29.353 / 16.02033.283 rollouts/min(607.22 tok/s)3/31.927x(+48.09%)2. EHP Elastic Hybrid Parallelism (
benchmark_ehp.py,Qwen/Qwen3-4B,seq_len=1536, 16 trajs/step)1 GPUgrad_normParitystatic_core_1gpucuda:00.0001 s8.3562 s8.3562 s1.000x60.322 GB1.460938 / 1.46875 / 1.476562ehp_borrow_1gpucuda:0–10.2828 s4.3236 s4.3234 s1.933x60.239 GB1.46875 / 1.46875 / 1.476562ehp_borrow_3gpuscuda:0–30.8206 s3.0834 s2.4020 s(3.48x)2.710x60.195 GB1.46875 / 1.46875 / 1.476562Test Plan
.venv/bin/python -m pytest -q tests/test_tier2_closed_loop.py->15 passed in 17.13stests/suite ->511 passed, 1 skipped in 57.55s8 × NVIDIA H20-3e(qs-417146-2445617-ai-2084480-master-0) runs verified (h20_8gpu_grp,h20_8gpu_ehp), all 8 GPUs released (0 MiB / 0 %).