Deploy the model
Follow one tab. Each creates a separate deployment of the same model. Explore supplies a suggested configuration; the CLI and API use the Gemma recipe, so serving settings can differ.- Baseten CLI
- Dashboard
- Management API
Install and sign in
- macOS or Linux
- Windows
Terminal
Terminal
Prepare the configuration
Create a project directory:Terminal
config.yaml from the E2B tab of the Gemma 4 recipe into this directory. It defines the weights, vLLM server, and L4 hardware.Accept the model’s Hugging Face terms. Save a read token with access to its weights in Baseten secrets as hf_access_token, the name used by the recipe.Push the configuration
From the project directory, run:--tail shows logs; --wait waits for Active. Save your model ID and continue to call the model.Wait for the deployment
Open Dedicated Inference in the dashboard, select your model, and wait for Active. The CLI’s--wait flag already waits for this state. If startup fails, check the deployment’s build and runtime logs. For API automation, poll Get deployment with the model and deployment IDs until status is ACTIVE.
Call the model
Use the same OpenAI-compatible request for any deployment path. Find your model ID in the CLI or API output, or select Copy ID beside the model name in the dashboard. Create a personal key in API keys if you don’t have one. Set it in the terminal where you’ll run the client:chat.py and replace {model_id} with your model ID:
chat.py
production environment. The model field matches the serving name in its configuration.
Clean up
Exiting the client script doesn’t stop the deployment. When you’re finished testing, deactivate the deployment to release its replicas and stop its compute charges. Its endpoint stops serving requests; the model and configuration remain available for reactivation.- Open Dedicated Inference in the dashboard and select the model you created.
- Under Deployments, select the deployment you used in this example.
- Select Deactivate deployment, then Yes, deactivate.
- Wait for the deployment’s status to become Inactive.
Next steps
- Configure autoscaling to control replica counts and scale to zero when idle.
- Configure a model server to learn how to write your own Truss configuration.
- Add a deployment to publish another version under the existing model ID.