SGLang + Megatron: verl-style hybrid engine for ART RL training pipeline#552
Open
pmukeshreddy wants to merge 3 commits intoOpenPipe:mainfrom
Open
SGLang + Megatron: verl-style hybrid engine for ART RL training pipeline#552pmukeshreddy wants to merge 3 commits intoOpenPipe:mainfrom
pmukeshreddy wants to merge 3 commits intoOpenPipe:mainfrom
Conversation
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
benchmarks/sglang_vs_vllm/) that compares SGLang + Megatron vs vLLM + Megatron under identical conditions (same model, same prompts, same Megatron training loop)Motivation
ART's current vLLM backend runs in-process, sharing a CUDA context with Megatron. After the first sleep/wake cycle, vLLM permanently loses ~53 GB of GPU memory because Megatron's subprocess stays alive during wake (vLLM RFC #15254). This causes a 29% throughput degradation from step 1 → step 2 onward.
The SGLang backend avoids this by running as a separate process with its own CUDA context. Memory release via HTTP
/release_memory_occupationis a clean OS-level free, giving Megatron the full GPU during training and SGLang full recovery on wake.Architecture
do_sleep(level=2)/do_wake_up()/release_memory_occupation//resume_memory_occupationadd_lora()/load_lora_adapter(<2s)What's Added
No existing ART source files were modified — this is purely additive.
Benchmark Results
Setup: Qwen3-30B-A3B-Instruct-2507 | GSM8K | TP=2 | 4×A100 | 10 RL steps
How to Reproduce
References