Skip to content

Gemma4-31B-IT with MTP Speculative Decoding on Trillium TPU v6e-4#261

Draft
jawadaminGOOG wants to merge 5 commits into
AI-Hypercomputer:mainfrom
jawadaminGOOG:spec-decode-gemma
Draft

Gemma4-31B-IT with MTP Speculative Decoding on Trillium TPU v6e-4#261
jawadaminGOOG wants to merge 5 commits into
AI-Hypercomputer:mainfrom
jawadaminGOOG:spec-decode-gemma

Conversation

@jawadaminGOOG

Copy link
Copy Markdown

This guide shows how to serve the Gemma 4 IT model (google/gemma-4-31B-it) with vLLM using speculative decoding on Trillium (TPU v6e) VMs. We use the official google/gemma-4-31B-it-assistant companion model as the draft model.

Note: Speculative decoding for Gemma 4 on TPU currently requires specific python package hotpatches and source overrides to run stably without Out-of-Memory (OOM) or shape mismatch crashes. All necessary python files and hotpatch scripts are included in this directory.

Add server startup script, benchmarking scripts, hotpatches, configurations, benchmark performance summaries, and technical hotpatch integration guide to enable speculative decoding stably on TPU v6e.

TAG=agy
CONV=0408a73a-f24b-4400-97f9-706785f355f1
…n scripts

- Patched API server startup to use block size 32 and propose length 5.
- Fixed multimodal benchmarks command to use updated random-mm dataset flags.
- Staged all assistant MTP model attention layer overrides and loaders.

TAG=agy
CONV=0408a73a-f24b-4400-97f9-706785f355f1
TAG=agy
CONV=53a929f7-98b1-4674-bb2b-632a7ce5aa01
@jawadaminGOOG
jawadaminGOOG marked this pull request as draft June 18, 2026 15:50
Replaces the Bare Metal TPU VM serving instructions with GKE configurations. Creates a unified YAML manifest gemma4-mtp-gke.yaml containing the Namespace, StorageClass, PersistentVolumeClaim, Service, and Deployment specs. Modifies README.md to guide nodepool setup, configmap patches installation, and documents verified GKE serving performance metrics.

TAG=agy

CONV=c4055879-301f-4770-a69a-87b9593ce043
…port for Gemma 4 MTP

TAG=agy
CONV=c4055879-301f-4770-a69a-87b9593ce043
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant