-
Notifications
You must be signed in to change notification settings - Fork 577
Support quantization for tokamax gmm v2 #4451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shuningjin
wants to merge
31
commits into
main
Choose a base branch
from
gmm2_quantize
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
f814413
Support quantization for tokamax gmm v2
shuningjin 2cec661
format
shuningjin b135e8e
clean test
shuningjin f9f37b8
fix
shuningjin 22bd5bc
format
shuningjin 159ea30
Merge branch 'main' of github.com:AI-Hypercomputer/maxtext into gmm2_…
shuningjin 0db4e43
Merge branch 'main' of github.com:AI-Hypercomputer/maxtext into gmm2_…
shuningjin 5073aef
Merge branch 'main' of github.com:AI-Hypercomputer/maxtext into gmm2_…
shuningjin f201c4a
Merge branch 'main' of github.com:AI-Hypercomputer/maxtext into gmm2_…
shuningjin a251753
refactor1
shuningjin f4553b6
refactor2
shuningjin fc5ac54
refactor3, finish major refactor
shuningjin fced014
refactor flag: `use_gmm_v2` as bool or tuple
shuningjin 2ae50ca
refactor: change order
shuningjin 61e72b2
doc: add use_gmm_v2 to moe_configuration
shuningjin 16ac8aa
refactor: moe condition and format
shuningjin 7b84920
Merge branch 'main' of github.com:AI-Hypercomputer/maxtext into gmm2_…
shuningjin 51376c1
Merge branch 'main' of github.com:AI-Hypercomputer/maxtext into gmm2_…
shuningjin ded3f1b
refactor: gmm flag
shuningjin 5334a53
refactor: qwix condition
shuningjin 4d8578b
nit
shuningjin 6225e47
quantize lhs in fwd to correct bwd
shuningjin 201a8fc
revert quantize lhs
shuningjin 38bd713
Merge branch 'main' of github.com:AI-Hypercomputer/maxtext into gmm2_…
shuningjin 608305d
quantize lhs for bwd
shuningjin 1ad5e94
refactor: pure v2 only
shuningjin 87b2c8e
let test pass
shuningjin a5aac8c
let test pass
shuningjin 9b67772
let test pass
shuningjin a911746
let test pass
shuningjin 86d3272
nit
shuningjin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we still have this config that sets all fwd, dlhs and drhs to true in types.py when true?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have refactored the flag. Instead of three flags, we now use the original single flag
use_gmm_v2, which is bool (e.g.,use_gmm_v2=true) or tuple (e.g.,use_gmm_v2=[true, false, true]).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep
use_gmm_v2=truemode only, remove[true, false, true]for simplicity as we don't see clear benefits