Instructions to use google/paligemma2-28b-pt-896 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/paligemma2-28b-pt-896 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="google/paligemma2-28b-pt-896")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("google/paligemma2-28b-pt-896") model = AutoModelForMultimodalLM.from_pretrained("google/paligemma2-28b-pt-896", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use google/paligemma2-28b-pt-896 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "google/paligemma2-28b-pt-896" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/paligemma2-28b-pt-896", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/google/paligemma2-28b-pt-896
- SGLang
How to use google/paligemma2-28b-pt-896 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/paligemma2-28b-pt-896" \ --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/paligemma2-28b-pt-896", "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/paligemma2-28b-pt-896" \ --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/paligemma2-28b-pt-896", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use google/paligemma2-28b-pt-896 with Docker Model Runner:
docker model run hf.co/google/paligemma2-28b-pt-896
Gated Repo Access
Hi,
I requested access to the Gemma2 family of models on December 18, but I haven't received access yet. I am mainly intersted in trying out the paligemma2 family of models trained on high-res images as well as the one finetuned on Docci. Can someone from the Gemma team help out with the access request please.
Hi @venkai ,
I reproduced the issue, for now to get instant approval could you please visit the Kaggle page for Gemma and request access to the model weights through Hugging Face. For more reference, please refer to this blog
Thank you.
Hi @GopiUppari ,
I just requested access on kaggle:
On huggingface, it still shows that the access request is pending approval:
@GopiUppari it works now :-) ! It seems there was some trouble linking my HF to kaggle account. Have access now :thumbsup

