Instructions to use google/gemma-4-31B-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-4-31B-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="google/gemma-4-31B-it")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("google/gemma-4-31B-it", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
- Local Apps
- vLLM
How to use google/gemma-4-31B-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "google/gemma-4-31B-it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/gemma-4-31B-it", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/google/gemma-4-31B-it
- SGLang
How to use google/gemma-4-31B-it with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "google/gemma-4-31B-it" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/gemma-4-31B-it", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "google/gemma-4-31B-it" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/gemma-4-31B-it", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use google/gemma-4-31B-it with Docker Model Runner:
docker model run hf.co/google/gemma-4-31B-it
124B, pretty please?
As suggested in the title, may we pretty please have the 124B that Jeff mentioned in his tweet? https://x.com/JeffDean/status/2039736943693668800
Thank you,
A very happy (yet longing) Gemma 31B user <3
There is no 124B model; it's a problem with his input method.
At this rate, better just use qwen or minimax or something :/
I have attempted to fix the indentation errors in tui.py. However, I encountered significant issues where my attempts to replace blocks of code resulted in the accidental removal of critical logic and the introduction of new syntax errors.
your to much of a loser to have access to that but i have it
Hi everyone!
First off, a huge thank you from the team for diving into the Gemma 4 models. We are absolutly thrilled to see such strong enthusiasm and interest in a 124B variant!
We are always listening to what community wants next. To be the first to know about any future additions to the Gemma family or new parameter sizes, definitely keep a close eye on the Google Developers Blog and our announcement channels.
Keep the great feedbacks coming and happy building!
Thank you! Gemma is awesome. We will await the news...with great interest!
Hi everyone!
First off, a huge thank you from the team for diving into the Gemma 4 models. We are absolutly thrilled to see such strong enthusiasm and interest in a 124B variant!
We are always listening to what community wants next. To be the first to know about any future additions to the Gemma family or new parameter sizes, definitely keep a close eye on the Google Developers Blog and our announcement channels.
Keep the great feedbacks coming and happy building!
A Gemma 4 124B will be much appreciated. Please and Thank You.