Conversation
CjhHa1
force-pushed
the
build/sglang-0.5.19-migration
branch
from
September 17, 2026 17:03
dca2fe7 to
d1406b8
Compare
CjhHa1
marked this pull request as ready for review
September 17, 2026 17:03
CjhHa1
requested review from
celve,
haonan3,
leviking98z-rgb and
zzhuoxin1508
as code owners
September 17, 2026 17:03
CjhHa1
force-pushed
the
build/sglang-0.5.19-migration
branch
2 times, most recently
from
September 18, 2026 08:31
0f62e2e to
7d78c57
Compare
2 tasks
CjhHa1
force-pushed
the
build/sglang-0.5.19-migration
branch
from
September 20, 2026 04:27
1762896 to
1667f19
Compare
CjhHa1
force-pushed
the
build/sglang-0.5.19-migration
branch
from
September 20, 2026 04:28
1667f19 to
4678364
Compare
CjhHa1
marked this pull request as draft
September 20, 2026 05:44
CjhHa1
marked this pull request as ready for review
September 20, 2026 14:23
Jayce-Ping
approved these changes
Sep 22, 2026
Jayce-Ping
left a comment
Collaborator
There was a problem hiding this comment.
Most changes are configs/docs only. Code changes are about SGLang migration. Since the real GPU tests have passed, I think it can be merged.
celve
reviewed
Sep 22, 2026
| lora_nickname: str, | ||
| lora_tensors: Dict[str, Any], | ||
| target: str = "all", | ||
| strength: float = 1.0, |
Collaborator
There was a problem hiding this comment.
Double check this, is this intentional?
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
Migrate UniRL from SGLang 0.5.12.post1 to 0.5.19 and narrow the integration to contracts that are still missing upstream:
ServerArgsnamesmodel_config.lora_target_modulesfor ServerArgs leaf targets and adapters for pipeline componentsRelated Issue
N/A
Test Plan
uv pip compile pyproject.toml --extra sglang --extra train --extra infer --python-version 3.12 --prerelease allow --no-header --no-annotate— passed during migration validationuv pip compile pyproject.toml --extra vllm --extra train --extra infer --python-version 3.12 --prerelease allow --no-header --no-annotate— passed during migration validationSKIP=no-commit-to-branch uvx pre-commit run --all-files --show-diff-on-failure— passed after rebase and final simplificationDATA_PATH=/tmp/data)Checkpoint-backed Validation Summary
All GPU gates used real, complete pretrained checkpoints rather than random, tiny, or layer-truncated models. Here, "full checkpoint" describes the loaded model; it does not mean that every gate performed full-parameter training.
rl_on_policy_target=fsdp+ fused MoE KV combination was intentionally excluded because production does not use it.use_lora=false. It covered grouped rollout, shared initial noise, per-output trajectory separation, replay drift, and signed backward. Training-side replay skipped VAE loading because image decoding is not part of the policy/replay comparison.Prior H20 validation remains applicable to the retained runtime paths:
unirl-sglang-0519-smoke-0917-v5unirl-sglang-0519-align-ar-gz-0917-v2unirl-sglang-0519-align-ar-prod-oracle-gz-0918unirl-sglang-0519-tp2-sync-gz-0918-v4unirl-sglang-0519-qwen30b-ep2-gz-0918-v6unirl-sglang-0519-align-sd3-gz-0918-v3,unirl-sglang-0519-sd3-sync-gz-0918-v4unirl-sglang-0519-native-sleep-gz-0920, instance8b1d805da0af10b001a0bd3474a915a6; sleep→wake rollout bitwise exact, rollout/replay absdiff mean1.2930483e-04, max5.2893162e-04, signed backward grad norm0.2479593; exit code 0unirl-sglang-0519-blocker-regression-gz-0920, instance8b1d810aa0af112801a0bd6669c2153c; batch shape[4,5,16,32,32], sleep→wake bitwise exact, distinct grouped trajectories, rollout/replay absdiff mean7.8734010e-05, max4.3755770e-04, signed backward grad norm0.1263615; exit code 0unirl-sglang-final-on-occupy-bj-0920onqwen38-bt-invariance-occupy-8x8-bj-0920launcherts-8b1d810aa0af112801a0be34c11116fd-launcher; seeded grouped repeat, unchanged full-weight sync, and zero-LoRA sync bitwise exact; full-weight and LoRA mutations changed output; post-LoRA native sleep→wake bitwise exact; exit code 0unirl-sglang-sd3-lora-scale-bj-0921on the same Beijing H20 launcher; the production attention adapter mapped all 191 layers withskipped=0; an isolated terminal-layer probe used the production rank/alpha (rank=32,alpha=64, expected scale2.0) and measured a2.1025xLoRA-effect L2 ratio versusalpha=32, while the production-alpha trajectory was closer to the bf16 merged-weight reference (mean absdiff7.8393e-04vs8.8442e-04); exit code 0The repository intentionally keeps no committed top-level test tree, so focused migration harnesses were removed after recording the reproducible assertions and GPU task identifiers above.
Compatibility / Risk
MemoryOccupationController. UniRL patches the pinned implementation so rollback includes the current module, nested unregistered tensors follow residency changes, and TP/SP/CFG/DP failures propagate to the caller. The removed tagged CUDA-VM layer could not be enabled on 0.5.19 because diffusionServerArgshas noenable_memory_saverfield.cuda_graph_max_bs_decode; the retired alias is removed so stale configs fail through the existing unknown-argument path.model_config); weight-sync pipeline components remain adapter-owned (transformer, plustransformer_2for WAN2.2).use_lora=truepermits adapter sync only; full-weight sync requiresuse_lora=falseand a trainer-side merged adapter.model.safetensorsandmodel.fp16.safetensors. SGLang 0.5.19's customized CLIP loader refuses that layout and falls back to nativeCLIPTextModel, droppingtext_projection. This is an upstream 0.5.19 gap; the same filter already exists for transformers and shipped for text encoders in SGLang 0.5.20 (sgl-project/sglang#37616). The Beijing mutation/sleep gates passed on that fallback path.The production Qwen gate passes its mean
<0.05/ max<0.5limits. Its remaining mean rollout/replay difference (0.03673) is attributable to bf16 head/log-softmax precision plus incremental Triton KV-cache decode versus full-sequence flex-attention teacher forcing, with partial cancellation.Reviewer Notes
Rebased onto current
upstream/main. The final diff removes more code than it adds and has been re-reviewed againstPR_REVIEW_REDUNDANCY_CHECKLIST.md. Review the exact-version AR control calls, native diffusion rollback/rank aggregation, multi-prompt driver routing, and grouped trajectory invariants first.AI-assisted implementation; the submitter reviewed the final diff. No agent was added as a commit co-author.
Checklist