Open
Conversation
…ore fixes - SGLang backend with dedicated GPU split (inference GPU 0, training GPU 1+) - LoRA hot-reload via SGLang API preserves RadixAttention cache - Two-environment architecture for torchao version isolation - Benchmarks: SGLang vs vLLM comparison suite - Training utils extracted for backend-agnostic use - DeviceConfig with auto-detection - Ruler fix for empty trajectory groups and exception preservation - vLLM compatibility patches
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.
Integrates Unsloth training with the SGLang inference backend using a dedicated GPU split architecture. SGLang runs persistently on inference GPU(s) while Unsloth/GRPO training runs on separate GPU(s), eliminating the sleep/wake overhead of shared-GPU approaches and keeping SGLang's RadixAttention prefix cache warm across training steps.
Weight synchronization happens via SGLang's LoRA hot-reload API, updating the inference model in-place without restarting the server or losing cached KV states. For single-GPU setups, falls back to server restart with cache clearing.
The backend uses a two-environment architecture to resolve dependency conflicts — SGLang (torchao==0.9) runs in an isolated venv from Unsloth (torchao>=0.13), communicating via HTTP only. DeviceConfig auto-detects available GPUs and computes optimal inference/training splits.
Benchmark (Qwen3-30B-A3B, GSM8K, 4×A100)
Throughput difference between Megatron and Unsloth configurations comes from GPU allocation during inference. Megatron shards training across all GPUs via tensor parallelism, so during rollout all GPUs serve inference. Unsloth currently supports DDP only (no TP for training), requiring a permanent GPU split — fewer GPUs available for serving rollouts at any given time.
Changes
src/art/sglang_backend/— SGLangBackend, SGLangConfig, DeviceConfig, SGLangServicesrc/art/unsloth/training_utils.py— backend-agnostic training utilities extracted from servicebenchmarks/sglang_benchmarks/— end-to-end benchmark suite with DDP training, metrics collection, server lifecycle managementscripts/— setup, e2e test, and benchmark runner scriptsdocs/sglang-integration.md— architecture docs, configuration reference, troubleshooting