Repository navigation
[graph_trainer] Update bitwise deterministic hashes after fused QKV - #3031
Merged
Merged
Conversation
…hange The fused QKV GQAttention implementation (#2878) changed the parameter layout from separate wq/wk/wv to a single wqkv linear, which changed model and gradient hashes. Loss values are unchanged.
SherlockNoMad
requested review from
aditvenk,
tianyu-l,
xmfan and
yiming0416
as code owners
April 20, 2026 19:43
yiming0416
approved these changes
Apr 20, 2026
wwwjn
approved these changes
Apr 20, 2026
This was referenced Apr 20, 2026
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
test_bitwise_deterministic.pyforTestLlama3BitwiseDeterministicandTestLlama3FlexAttnBitwiseDeterministicRoot Cause
git bisectidentified #2878 (ad7a8653— "Fused QKV GQAttention implementation") as the commit that broke these tests. That PR replaced separatewq/wk/wvprojections with a single fusedwqkvlinear inGQAttention, which changed the parameter layout and therefore the deterministic model/gradient hashes.Verified:
aa0214b8(before Fused QKV GQAttention implementation #2878): both tests passad7a8653(the PR itself): both tests failLoss values are unchanged — only the model and gradient hashes differ, confirming the fused QKV change altered parameter layout but not numerics.
Test plan
pytest torchtitan/experiments/graph_trainer/tests/test_bitwise_deterministic.py::TestLlama3BitwiseDeterministic::test_eager_self_deterministicpassespytest torchtitan/experiments/graph_trainer/tests/test_bitwise_deterministic.py::TestLlama3FlexAttnBitwiseDeterministic::test_eager_self_deterministicpasses