Repository navigation
[RL] Name the varlen attention backend after TorchTitan - #4786
Merged
Merged
Conversation
drisspg
marked this pull request as ready for review
September 18, 2026 19:29
drisspg
requested review from
felipemello1,
pzhan9,
tianyu-l and
wwwjn
as code owners
September 18, 2026 19:29
tianyu-l
approved these changes
Sep 18, 2026
drisspg
force-pushed
the
drisspg/rl-attention-backend-name
branch
from
September 18, 2026 21:52
2a3bf6f to
f253f8f
Compare
drisspg
force-pushed
the
drisspg/rl-attention-backend-name
branch
from
September 21, 2026 23:27
f253f8f to
872fbb2
Compare
drisspg
added a commit
that referenced
this pull request
Sep 22, 2026
## Summary Restore the declared model sharding after Hugging Face format conversion, before extracting plain local tensors. Qwen3.5's QKV fuse/split operations can change DTensor placements: a TP2 projection expected as `Shard(0)` became `Shard(1)`, producing local `[2048, 512]` instead of `[1024, 1024]`. Convolution and vision weights were affected too. The RL checkpoint adapter now redistributes to each parameter's existing layout before `to_local()`; it does not reshape incorrect shards or change CUDA-graph behavior. Adds a two-rank CPU/Gloo regression with independent expected local slices and runs it in RL CI. Naming-only follow-up #4786 is the lower stack layer. ## Validation - New regression reproduces the original failure on both ranks and passes with the fix. - Six focused wrapper/GDN metadata tests passed on this stack; scoped pre-commit passed. Scoped Pyrefly retains five verified preexisting errors in unchanged all-reduce code; no new errors. - Before stacking, the same adapter fix passed regular Qwen3.5-0.8B TP2 eager/FULL inference on two GB200s: exact rank-local weights, 96 tokens/logprobs, 44 state records, and 43 native FULL replays per rank. - **GPU-run caveat:** both runs completed inference artifacts but hit the 60-second deadline during shutdown. Clean shutdown and batch-invariant TP2 remain unvalidated. Runtime used Torch/vLLM Sep13 nightlies, FA4 b31, and Gym commit `4ac49088a`, not a clean release-pin install. ```sh .venv/bin/python -m pytest -v -ra tests/unit_tests/rl/test_vllm_wrapper.py tests/unit_tests/rl/test_gdn_graph_metadata.py ```
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
Rename
PyTorchVarlenInnerAttentionBackendtoTorchTitanVarlenInnerAttentionBackend, following the naming feedback on #4738. This is a class-name-only change; vLLM'sCUSTOMregistration and implementation remain unchanged.Validation
AttentionBackendEnum.CUSTOM.get_class()resolves to the renamed class and its registry name remainsCUSTOM.