Deploy Inference for Gemma
Deploy a model endpoint for Gemma with support for 4 variants: 2B, 2B-it, 7B, and 7B-it. This guide uses the 2B-it variant. The same steps work for other variants.
Overview
- Model endpoint creation using prebuilt Gemma 2B-it container
- Reference for supported generation parameters
Step 1: Create a Model Endpoint
- Go to the AI Platform and select your project
- Navigate to Model Endpoints
- Click Create Endpoint
- Select the Gemma 2B-IT model card
- Choose your GPU plan and set desired replicas
Environment Variables
Required
Gemma is a gated model — checkpoint is downloaded from Kaggle.
To gain access:
-
Visit the Gemma model page on Kaggle
-
Request access and wait for approval
-
Generate a Kaggle API token (Account Settings → API)
-
Configure:
KAGGLE_KEY: Your API token keyKAGGLE_USERNAME: Your Kaggle username
Advanced (Optional)
Used by TensorRT-LLM. Modify only if needed.
| Variable | Purpose |
|---|---|
MAX_BATCH_SIZE | Maximum concurrent input sequences processed per batch |
MAX_INPUT_LEN | Maximum input sequence length in tokens |
MAX_OUTPUT_LEN | Maximum output sequence length |
After configuration, complete endpoint creation and monitor logs until deployment finishes.