Repository navigation
Add support for Tokamax GMM v2 in MaxText. - #4197
Merged
copybara-service[bot] merged 1 commit intoJun 19, 2026
Merged
Conversation
CaptainO5
requested review from
A9isha,
NicoGrande,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
igorts-git,
jiangjy1982,
khatwanimohit,
michelle-yooh,
richjames0,
shralex,
suexu1025 and
vipannalla
as code owners
June 18, 2026 01:04
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
NuojCheng
reviewed
Jun 18, 2026
NuojCheng
reviewed
Jun 18, 2026
NuojCheng
reviewed
Jun 18, 2026
NuojCheng
reviewed
Jun 18, 2026
gobbleturk
reviewed
Jun 18, 2026
gobbleturk
reviewed
Jun 18, 2026
shuningjin
reviewed
Jun 18, 2026
shuningjin
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for integrating this performant new kernel! I see we are able to use full v2 with bf16 now, which is great.
- Had a question on
transpose_rhs - As mentioned by others, let's move the check to
types.py(foruse_gmm_v2, use_tokamax_gmm, quantization).
NuojCheng
approved these changes
Jun 18, 2026
copybara-service
Bot
merged commit Jun 19, 2026
85690da
into
AI-Hypercomputer:main
29 of 30 checks passed
4 tasks done
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.
Description
This change temporarily forks and integrates a new Pallas Mosaic TPU v2 ragged dot implementation from Tokamax. A new configuration option
use_gmm_v2is added to enable this feature. GMM v2 is currently not supported when used with quantization. The forward and backward passes in the grouped matrix multiplication (GMM) operation are updated to use the new v2 implementation when enabled.BUGS: b/505011787
Tests
I added a unit test in
integration/tokamax_testand also verified that the e2e test ran successfully.Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.