Repository navigation
Make fused QKV projection the default implementation - #4546
Merged
Merged
Conversation
anijain2305
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
September 9, 2026 18:03
anijain2305
marked this pull request as draft
September 9, 2026 18:04
anijain2305
marked this pull request as ready for review
September 9, 2026 18:06
This was referenced Sep 9, 2026
tianyu-l
approved these changes
Sep 9, 2026
| f"set_qkv_linear_sharding requires QKVLinear.Config or " | ||
| f"FusedQKVLinear.Config, got {type(qkv_linear_cfg).__name__}" | ||
| ) | ||
| def set_fused_qkv_linear_sharding(qkv_linear_cfg: FusedQKVLinear.Config) -> None: |
Contributor
There was a problem hiding this comment.
don't need this function any more
|
|
||
|
|
||
| class FusedQKVLinear(BaseQKVLinear): | ||
| class FusedQKVLinear(Module): |
Contributor
There was a problem hiding this comment.
I wonder if we should call it QKVLinear to be consistent with FeedForward. After all, we don't have "unfused" version any more.
Contributor
|
Would be nice to have some motivation (performance or memory improvements) in the PR desc. |
Contributor
Author
Added. |
submartingales
pushed a commit
to botcanlearn/torchtitan-upstream
that referenced
this pull request
Sep 12, 2026
ghstack-source-id: 3aa000c Pull-Request: pytorch/torchtitan#4546
submartingales
pushed a commit
to botcanlearn/torchtitan-upstream
that referenced
this pull request
Sep 13, 2026
ghstack-source-id: 3ce1c40 Pull-Request: pytorch/torchtitan#4546
submartingales
pushed a commit
to botcanlearn/torchtitan-upstream
that referenced
this pull request
Sep 13, 2026
ghstack-source-id: ab3bad7 Pull-Request: pytorch/torchtitan#4546
|
Warning: Unknown label
Please add the new label to .github/pytorch-probot.yml |
This was referenced Sep 13, 2026
submartingales
pushed a commit
to botcanlearn/torchtitan-upstream
that referenced
this pull request
Sep 13, 2026
ghstack-source-id: 99fe9ec Pull-Request: pytorch/torchtitan#4546
anijain2305
added a commit
that referenced
this pull request
Sep 13, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.18.0) (oldest at bottom): * #4543 * #4542 * #4541 * #4623 * #4559 * #4591 * #4592 * #4540 * #4539 * #4643 * #4526 * #4546 * __->__ #4535 Use one physical w13 Linear config and parameter for dense feed-forward gate and up projections. Compose their initialization before module construction, configure activation implementations directly, and translate external gate/up checkpoint keys in model state-dict adapters.
submartingales
pushed a commit
to botcanlearn/torchtitan-upstream
that referenced
this pull request
Sep 13, 2026
ghstack-source-id: 1df9a95 Pull-Request: pytorch/torchtitan#4546
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.
Stack from ghstack (oldest at bottom):