Feat: Integrate Gemma3 weight mappings, vLLM adapter, and E2E pipelines#4068
Open
RexBearIU wants to merge 1 commit into
Open
Feat: Integrate Gemma3 weight mappings, vLLM adapter, and E2E pipelines#4068RexBearIU wants to merge 1 commit into
RexBearIU wants to merge 1 commit into
Conversation
e16648e to
faf1c26
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
4 tasks
faf1c26 to
50963ee
Compare
27fc440 to
eadf862
Compare
NuojCheng
reviewed
Jun 30, 2026
| rollout_vllm_additional_config = { | ||
| "maxtext_config": { | ||
| "model_name": config.model_name, | ||
| "weight_dtype": "bfloat16", |
Collaborator
There was a problem hiding this comment.
is it a good idea hardcoded weight dtype being bf16? waht about config.weight_dtype
NuojCheng
reviewed
Jun 30, 2026
| vllm_hf_overrides='{architectures: ["MaxTextForCausalLM"]}' \ | ||
| hbm_utilization_vllm=0.6 \ | ||
| prompt="Suggest some famous landmarks in London." \ | ||
| use_chat_template=True scan_layers=false |
Collaborator
There was a problem hiding this comment.
new line for sca_layers=false
NuojCheng
reviewed
Jun 30, 2026
|
|
||
| # Step 4: Run inference on the checkpoint generated from the previous run | ||
| python3 -m maxtext.inference.vllm_decode \ | ||
| --use_tunix=True \ |
NuojCheng
approved these changes
Jun 30, 2026
eadf862 to
f93d241
Compare
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
Integrates Gemma3 with the MaxText-vLLM adapter and end-to-end post-training pipelines, adding full weight conversions, logical partition rules, and verification scripts for post-SFT serving.
Note: This PR depends on PR #4066 (Gemma3/4 decoders fixes) and PR #4067 (LoRA restore refactoring) being merged first.
Key Changes:
src/maxtext/integration/tunix/weight_mapping/gemma3.py): Added full weight mappings for attention queries, keys,values, output projections, and gated MLPs.
src/maxtext/integration/vllm/maxtext_vllm_adapter/adapter.py): Integrated context initialization and logicalpartition rules for Gemma3 serving.
tests/end_to_end/tpu/gemma3/4b/test_gemma3_lora.sh): Added end-to-end shell test script validating full-passgeneration correctness, logit matches, and successful decoding post-SFT.
Tests
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.