Repository navigation
[RL] enable GPT-OSS for titan RL loop - #3687
Merged
Merged
Conversation
liangel-02
force-pushed
the
torchtitan-flex
branch
2 times, most recently
from
June 16, 2026 16:32
ac3e39c to
88d09f7
Compare
liangel-02
force-pushed
the
torchtitan-flex
branch
3 times, most recently
from
June 16, 2026 18:16
aa558cb to
af4ad50
Compare
liangel-02
marked this pull request as ready for review
June 16, 2026 18:17
liangel-02
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
June 16, 2026 18:17
liangel-02
force-pushed
the
torchtitan-flex
branch
from
June 16, 2026 18:19
af4ad50 to
4422818
Compare
tianyu-l
reviewed
Jun 16, 2026
liangel-02
marked this pull request as draft
June 17, 2026 03:18
liangel-02
commented
Jun 17, 2026
liangel-02
force-pushed
the
torchtitan-flex
branch
3 times, most recently
from
June 17, 2026 03:28
f9f60fd to
cd1be7b
Compare
tianyu-l
reviewed
Jun 17, 2026
tianyu-l
left a comment
Contributor
There was a problem hiding this comment.
question 1: is Flex support removed for gpt-oss?
question 2: is the implementation mathematically correct for training with document masking?
liangel-02
force-pushed
the
torchtitan-flex
branch
4 times, most recently
from
June 17, 2026 23:52
fa0d345 to
c33a008
Compare
liangel-02
marked this pull request as ready for review
June 17, 2026 23:54
liangel-02
force-pushed
the
torchtitan-flex
branch
from
June 18, 2026 02:19
c33a008 to
70078aa
Compare
tianyu-l
reviewed
Jun 18, 2026
Comment on lines
+125
to
+126
| if isinstance(sinks, DTensor): | ||
| sinks = sinks.to_local(grad_placements=sinks.placements) |
Contributor
There was a problem hiding this comment.
curious why didn't we need this before?
Contributor
Author
There was a problem hiding this comment.
the application now fires in the attention forward which on vllm path would be w/ local tensors
liangel-02
force-pushed
the
torchtitan-flex
branch
2 times, most recently
from
June 18, 2026 15:43
379855f to
9bfe25a
Compare
tianyu-l
approved these changes
Jun 18, 2026
liangel-02
force-pushed
the
torchtitan-flex
branch
from
June 18, 2026 17:31
9bfe25a to
2430c3a
Compare
liangel-02
force-pushed
the
torchtitan-flex
branch
from
June 18, 2026 18:00
2430c3a to
0f4e598
Compare
aditvenk
added a commit
that referenced
this pull request
Jun 25, 2026
…aselines Three independent CI failures in the graph_trainer test suite: 1. gpt_oss trace tests (test_trace_module.py). PR #3687 flipped the gpt_oss Attention.Config.inner_attention default from FlexAttention to VarlenAttention (attn_backend defaults to "varlen"). Request attn_backend="flex" explicitly in all three usages (test_gpt_oss, test_flex_attention_annotations, test_gpt_oss_fsdp). 2. test_eager_self_deterministic (test_bitwise_deterministic.py). A torch numerics update drifted eager results below loss-print precision, so the hardcoded golden model/grad hashes (and Qwen3 MoE loss values) no longer match. Regenerate the baselines via EXPECTTEST_ACCEPT=1 for all six model/attention variants. The determinism machinery is unchanged: the self-comparison tests still pass bitwise. 3. AutoParallel llama3 tests (integration_tests.py, test_numerics.py). PyTorch #186754 (2026-06-24) removed propagate_single_input_strategy in favor of propagate_single_input_single_dim_strategy, but AutoParallel's convert_element_type_rule still imports the old name, so the sharding optimizer fails with ImportError. Disable autoparallel_llama3_fsdp_tp and test_llama3_aot_fx_trace_autoparallel_vs_eager until AutoParallel migrates. See #3699.
aditvenk
added a commit
that referenced
this pull request
Jun 25, 2026
…aselines Three independent CI failures in the graph_trainer test suite: 1. gpt_oss trace tests (test_trace_module.py). PR #3687 flipped the gpt_oss Attention.Config.inner_attention default from FlexAttention to VarlenAttention (attn_backend defaults to "varlen"). Request attn_backend="flex" explicitly in all three usages (test_gpt_oss, test_flex_attention_annotations, test_gpt_oss_fsdp). 2. test_eager_self_deterministic (test_bitwise_deterministic.py). A torch numerics update drifted eager results below loss-print precision, so the hardcoded golden model/grad hashes (and Qwen3 MoE loss values) no longer match. Regenerate the baselines via EXPECTTEST_ACCEPT=1 for all six model/attention variants. The determinism machinery is unchanged: the self-comparison tests still pass bitwise. 3. AutoParallel llama3 tests (integration_tests.py, test_numerics.py). PyTorch #186754 (2026-06-24) removed propagate_single_input_strategy in favor of propagate_single_input_single_dim_strategy, but AutoParallel's convert_element_type_rule still imports the old name, so the sharding optimizer fails with ImportError. Disable autoparallel_llama3_fsdp_tp and test_llama3_aot_fx_trace_autoparallel_vs_eager until AutoParallel migrates. See #3699.
aditvenk
added a commit
that referenced
this pull request
Jun 26, 2026
#3791) …aselines Three independent CI failures in the graph_trainer test suite: 1. gpt_oss trace tests (test_trace_module.py). PR #3687 flipped the gpt_oss Attention.Config.inner_attention default from FlexAttention to VarlenAttention (attn_backend defaults to "varlen"). Request attn_backend="flex" explicitly in all three usages (test_gpt_oss, test_flex_attention_annotations, test_gpt_oss_fsdp). 2. test_eager_self_deterministic (test_bitwise_deterministic.py). A torch numerics update drifted eager results below loss-print precision, so the hardcoded golden model/grad hashes (and Qwen3 MoE loss values) no longer match. Regenerate the baselines via EXPECTTEST_ACCEPT=1 for all six model/attention variants. The determinism machinery is unchanged: the self-comparison tests still pass bitwise. 3. AutoParallel llama3 tests (integration_tests.py, test_numerics.py). PyTorch #186754 (2026-06-24) removed propagate_single_input_strategy in favor of propagate_single_input_single_dim_strategy, but AutoParallel's convert_element_type_rule still imports the old name, so the sharding optimizer fails with ImportError. Disable autoparallel_llama3_fsdp_tp and test_llama3_aot_fx_trace_autoparallel_vs_eager until AutoParallel migrates. See #3699.
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.
as title, using varlen attention first before revisitng flex in a followup
loss stays the same for training between main flex (today), flex after sliding_window semantic changes, and newly added varlen
