Skip to content

feat(repro): add Tier 1 (0-GPU) rollout scheduling replay and GRP offline benchmark - #34

Merged
kaiwenKevinn merged 3 commits into
mainfrom
feat/tier1-cpu-replay
Nov 27, 2026
Merged

kaiwenKevinn merged 3 commits into
mainfrom
feat/tier1-cpu-replay

Conversation

@kaiwenKevinn

@kaiwenKevinn kaiwenKevinn commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Extends Tier 1 (repro/tier1_zero_gpu_replay/) into a dual-pathway benchmark so researchers can both verify Libra's heterogeneous rollout schedulers and Global Resource Planner on 0 GPUs in ~2 seconds and eliminate cost-model circularity using real heterogeneous vLLM servers on physical GPUs as the judge:

  • Pathway 1 (--eval-mode analytic, default, 0 GPUs): Replays all 6 schedulers (round_robin, least_connections, length_aware, la_mlfq, cmlfq, cmlfq_cost) via water-filling continuous-batching RolloutCostModel + GlobalResourcePlanner offline solver on CPU.
  • Pathway 2 (--eval-mode vllm, 8 GPUs): Launches or connects to live heterogeneous vLLM HTTP /v1/completions engines (--launch-vllm or --vllm-endpoints) with Automatic Prefix Caching (--enable-prefix-caching) and session-isolated prompts, completely eliminating RolloutCostModel from makespan evaluation and measuring real wall-clock makespan (wall_makespan_s) and token throughput (tok/s).

Updated Files

  • repro/README.md: Documents Tier 1 Pathway 1 & Pathway 2 overview, reproduction Quick Start commands, and verified experimental setups & results for both pathways.
  • repro/tier1_zero_gpu_replay/README.md: Detailed Pathway 1 & Pathway 2 setup, trace breakdown, CLI flags (--eval-mode, --launch-vllm, --vllm-endpoints, --vllm-model, --vllm-tokenizer, --vllm-concurrency, --vllm-gpus), and metric definitions.
  • repro/tier1_zero_gpu_replay/run_replay.py: Adds VLLMServerCluster, OpenAI-compatible async completions client (_vllm_complete, _run_vllm_batch), token-exact prompt builder (_build_padded_text), shared turn-hook & completion helpers, deferred batch-end finish_request tree updates, and dual-pathway reporting/JSON output (wall_makespan_s, throughput_tok_per_s).
  • repro/tier1_zero_gpu_replay/sample_traces/r2e_agentic_trace.jsonl: 64 deterministic multi-turn agentic traces (24 warmup r2e_task_00..11 + 40 unseen eval r2e_task_12..31, prompt tokens 1050–2230, peak context <= 23,350 <= 32,768, 95,890 eval output tokens across 33 short_clean, 2 short_recover, 3 medium, 1 long_unambig, 1 long_cascading).
  • tests/test_tier1_replay.py: Adds test_live_vllm_replay_pathway_eliminates_simulator verifying live HTTP vLLM replay across 4 mock TP=[1, 1, 2, 4] OpenAI servers with _score_instance_makespan forbidden in vllm mode.

Experiment 1: Pathway 1 — 0-GPU CPU Analytic Replay (--eval-mode analytic)

  • Experimental Setup:
    • Cluster & Cost Model: TP=[1, 1, 2, 4] (8 GPUs, max_batch_per_tp=4), water-filling RolloutCostModel (configs/hardware_config/a800_80g.yaml + configs/model_arch_config/qwen3-14b.yaml), static bounded concurrency=12, KV backend recompute, cmlfq_cost profile r2e_cost_profile.json.
    • Workload: r2e_agentic_trace.jsonl (24 warmup + 40 unseen eval; prompt tokens 1050–2230; output buckets short<=4000 / medium<=10000 / long<=32768). Zero GPUs used.
Policy KV Backend Makespan (s, Analytic) Speedup vs RR Long-Tail Max-TP Rate Final TP Dist (1/2/4) Migrations Mig Cost (s)
round_robin recompute 297.906 1.00x 0.0% 20/10/10 0 0.000
least_connections recompute 261.096 1.14x 0.0% 6/14/20 0 0.000
length_aware recompute 256.550 1.16x 50.0% 4/20/16 0 0.000
la_mlfq recompute 162.009 1.84x 100.0% 35/0/5 5 1.065
cmlfq recompute 120.348 2.48x 100.0% 35/3/2 5 0.540
cmlfq_cost recompute 95.430 3.12x 100.0% 33/3/4 7 0.650
  • GRP Offline Benchmark (32 GPUs, 64 trajectories): Fixed Baseline 16 GPUs (TP=4, DP=4) + [8, 8] (T_train=2.726s, T_rollout=50.486s, T_global=50.486s) → GRP Optimal 4 GPUs (TP=4, DP=1) + [8, 8, 8, 4] (T_train=4.695s, T_rollout=45.984s, T_global=45.984s, 1.10x, -8.9%).

Experiment 2: Pathway 2 — Real-GPU Live vLLM Judge (--eval-mode vllm, 8 × NVIDIA H20-3e 141GB)

  • Experimental Setup:
    • Cluster Hardware: qs-417146-2445617-ai-2084480-master-0 (8 × NVIDIA H20-3e 141GB HBM3e).
    • Serving Pool: 4 live vLLM 0.9.2 instances (TP=[1, 1, 2, 4]) running Qwen/Qwen3-14B (bfloat16, --enable-prefix-caching, --max-model-len 32768, --gpu-memory-utilization 0.85, --no-enable-chunked-prefill).
    • Judgement Protocol: Session-isolated prompt tokens (ignore_eos=True, exact per-turn max_tokens), 95,890 eval generated tokens across 40 unseen trajectories, zero RolloutCostModel simulator in evaluation.
Policy KV Backend Makespan (s, Real-GPU Wall) Speedup vs RR Throughput (tok/s) Long-Tail Max-TP Rate Final TP Dist (1/2/4) Migrations Mig Wall (s) Ctrl Avg/P99 (us)
round_robin recompute 203.266 1.00x 471.8 0.0% 20/10/10 0 0.000 40.9 / 67.4
least_connections recompute 188.620 1.08x 508.4 0.0% 10/15/15 0 0.000 52.0 / 69.9
length_aware recompute 176.131 1.15x 544.4 50.0% 4/20/16 0 0.000 49.0 / 78.4
la_mlfq recompute 138.577 1.47x 692.0 100.0% 35/0/5 5 228.442 29.6 / 71.9
cmlfq recompute 110.835 1.83x (+83.4%) 865.2 100.0% 35/3/2 5 114.337 34.7 / 77.3
cmlfq_cost recompute 98.272 2.07x (+106.8%) 975.8 100.0% 33/3/4 7 129.690 91.3 / 273.9

Verification

  • .venv/bin/python -m pytest -q --strict-markers tests/ → 496 passed, 2 skipped (6 passed in tests/test_tier1_replay.py).
  • .venv/bin/python repro/tier1_zero_gpu_replay/run_replay.py --eval-mode analytic → exited 0.
  • H20-3e live vLLM cluster replay (--eval-mode vllm, TP=[1, 1, 2, 4], Qwen/Qwen3-14B) → exited 0, achieving +83.4% (1.83x) for cmlfq and +106.8% (2.07x) for cmlfq_cost over round_robin.

@kaiwenKevinn
kaiwenKevinn merged commit 410105e into main Nov 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant