This tutorial shows you how to deploy and serve
Qwen3.8-2.4T (nvidia/Qwen3.8-2.4T-A95B-NVFP4),
a 2.4 trillion-parameter Mixture-of-Experts model with 95 billion
active parameters quantized to NVFP4, on Google Kubernetes Engine (GKE) on
Google Cloud. The deployment uses Cluster Toolkit, four multi-host
A4 (a4-highgpu-8g)
virtual machine (VM) instances with a total of 32 NVIDIA B200 GPUs,
NVIDIA Dynamo, and the
SGLang serving framework with
prefill-decode (PD) disaggregation.
In the deployment configuration that's described in this tutorial, you use
Cluster Toolkit to provision a GKE cluster in
Standard mode. The cluster contains four a4-highgpu-8g nodes
connected over GPUDirect Remote Direct Memory Access (RDMA) networking. You then
install the KAI Scheduler and NVIDIA Dynamo platform with Grove gang scheduling,
and stage the model weights in Cloud Storage. Next, you deploy a
DynamoGraphDeployment custom resource that mounts the bucket with
Cloud Storage FUSE and separates prefill and decode across two 16-GPU
multi-host worker pools with tensor parallelism, expert parallelism, and an FP8
KV cache.
Objectives
- Install Cluster Toolkit and provision a multi-host A4 GKE cluster in Standard mode.
- Install the KAI Scheduler and NVIDIA Dynamo platform with Grove gang scheduling on your cluster.
- Stage the Qwen3.8-2.4T model weights in a Cloud Storage bucket.
- Deploy a multi-host, PD-disaggregated SGLang inference server across four A4 nodes, with a total of 32 NVIDIA B200 GPUs.
- Send a chat completion request to the Dynamo frontend router.
- Run a serving benchmark workload.
- Clean up the deployed resources.
Costs
In this document, you use the following billable components of Google Cloud:
To generate a cost estimate based on your projected usage, use the pricing calculator.
Before you begin
Set up your environment for the tutorial:
- Install and initialize the
Google Cloud CLI, and install
kubectland Helm (version 3.10 or later). If you use Cloud Shell, these tools are preinstalled. - If you're running this tutorial from a Linux or macOS workstation rather than Cloud Shell, install the required Cluster Toolkit dependencies, such as Terraform and Git.
Enable the Kubernetes Engine API, Compute Engine API, Cloud Storage API, Identity and Access Management API, Cloud Resource Manager API, and Service Usage API in your Google Cloud project:
Get a Hugging Face access token
You need a Hugging Face access token to use this tutorial. You can sign up for a free account at Hugging Face. After you have an account, generate an access token:
- On the Welcome to Hugging Face page, click your account avatar and select Access tokens.
- On the Access tokens page, click Create new token.
- Select the Read token type and enter a name for your token.
- Your access token is displayed. Save the token in a safe place.
Required roles
To get the permissions that you need to complete this tutorial, ask your administrator to grant you the following IAM roles on your project:
- Kubernetes Engine Admin (
roles/container.admin) - Compute Admin (
roles/compute.admin) - Storage Admin (
roles/storage.admin) - Project IAM Admin (
roles/resourcemanager.projectIamAdmin) - Service Account Admin (
roles/iam.serviceAccountAdmin) - Service Account User (
roles/iam.serviceAccountUser) - Service Usage Consumer (
roles/serviceusage.serviceUsageConsumer)
For more information about granting roles, see Manage access to projects, folders, and organizations.
You might also be able to get the required permissions through custom roles or other predefined roles.
Set up your environment variables
Export the environment variables that you use throughout this tutorial:
Replace the following:
YOUR_PROJECT_ID: the ID of your Google Cloud project.YOUR_REGION: the region where your A4 capacity is located and where you want to deploy your cluster, such asus-central1.YOUR_ZONE: the zone where your A4 capacity is located, such asus-central1-b.YOUR_CLUSTER_NAME: the name for your GKE cluster and Cluster Toolkit deployment. Use a name of 20 characters or fewer so that the generated node pool service account ID (YOUR_CLUSTER_NAME-gke-np-sa) stays within the 30-character Identity and Access Management (IAM) limit.YOUR_RESERVATION_NAME: the name of your A4 reservation, or the extended reservation block path in the formatRESERVATION_NAME/reservationBlocks/RESERVATION_BLOCK_NAME.YOUR_BUCKET_NAME: a globally unique name for the Cloud Storage bucket that stores the Terraform state for Cluster Toolkit and the staged Qwen3.8-2.4T model weights.YOUR_HF_TOKEN: your Hugging Face access token.
Create the GKE cluster
Download Cluster Toolkit and provision a GKE cluster in
Standard mode with four a4-highgpu-8g nodes, GPUDirect RDMA
networking, and DRA support:
Sign in to the Google Cloud CLI and generate Application Default Credentials for Terraform:
Download and extract the prebuilt Cluster Toolkit bundle for the version specified in
CLUSTER_TOOLKIT_VERSION(v1.104.0):If you run this command on macOS or on an
arm64workstation, setOS="mac"orARCH="arm64"to match your platform.To store the Terraform state for your Cluster Toolkit deployment and the staged model weights, create a Cloud Storage bucket in the same region as your A4 reservation with uniform bucket-level access and object versioning enabled:
Create the
cluster-toolkit/examples/gke-a4/gke-a4-deployment.yamldeployment configuration file for foura4-highgpu-8gnodes:By default, the deployment file is configured to consume a specific reservation. If you don't have a specific reservation, then before you deploy the cluster, you can update
cluster-toolkit/examples/gke-a4/gke-a4-deployment.yamlto use an alternative consumption option, such as Spot VMs or Flex-start VMs. For configuration instructions, see GKE consumption options.Change to the
cluster-toolkitdirectory, deploy the GKE cluster by using thegcluster deploycommand, and then return to your working directory:Cluster creation takes approximately 20 to 30 minutes. If you run
./gcluster deploywithout the--auto-approveflag, then to apply the proposed changes, enterawhen you're prompted to.Configure
kubectlcredentials to communicate with your cluster:
Install KAI Scheduler and NVIDIA Dynamo
Prepare your cluster by creating a Hugging Face Secret and installing the KAI Scheduler and NVIDIA Dynamo platform with Grove gang scheduling:
Create a Kubernetes Secret named
hf-secretto store your Hugging Face access token:Download the NVIDIA Dynamo platform Helm chart (
v1.5.0), install the KAI Scheduler, and install the Dynamo platform with Grove enabled:
Stage the model weights in Cloud Storage
Stage the nvidia/Qwen3.8-2.4T-A95B-NVFP4 checkpoint in your in-region
Cloud Storage bucket (gs://${GCS_BUCKET}) so that the inference
worker Pods can mount the weights with Cloud Storage FUSE instead of
downloading them from Hugging Face on every cold start:
Grant the Storage Object User role (
roles/storage.objectUser) on thegs://${GCS_BUCKET}bucket that you created in Create the GKE cluster to the Google service account bound to theworkload-identity-k8s-saKubernetes service account:Download the
qwen3.8-2.4t-nvfp4-stage-weights-job.yamlandqwen3.8-2.4t-nvfp4-multihost-a4-gcsfuse.yamlmanifests:Alternatively, create a file named
qwen3.8-2.4t-nvfp4-stage-weights-job.yamlwith the following content. This Indexed Job runs four parallel Pods across your four A4 nodes. Each Pod downloads a size-balanced slice of thenvidia/Qwen3.8-2.4T-A95B-NVFP4checkpoint to the node's Local NVMe SSD and uploads it togs://${GCS_BUCKET}/hf_models/models--nvidia--qwen3_8-2_4t-a95b-nvfp4by usinggcloud storage rsync:Substitute your Cloud Storage bucket name into
qwen3.8-2.4t-nvfp4-stage-weights-job.yaml, start the staging Job, wait for all four Pods to finish uploading the weights, and then delete the completed Job:Downloading the model weights to Local NVMe SSD and uploading them to Cloud Storage takes approximately 25 minutes.
Optional: While the staging Job is running, stream the logs of a staging Pod in a second terminal session to monitor the download progress:
Replace
YOUR_POD_NAMEwith the name of one of theqwen3-8-2-4t-stage-weightsPods fromkubectl get pods.
Deploy the multi-host disaggregated SGLang server
The workload manifest (qwen3.8-2.4t-nvfp4-multihost-a4-gcsfuse.yaml) defines a
Kubernetes ResourceClaimTemplate (all-mrdma), which allocates the node's
multi-NIC RDMA devices (mrdma.google.com) through DRA, Role and RoleBinding
resources for the workload-identity-k8s-sa service account, and an NVIDIA
Dynamo DynamoGraphDeployment (qwen3-8-2-4t-a4-disagg) with Grove gang
scheduling enabled. The deployment consists of the following:
Frontend (
Frontend): runs one router replica that accepts client requests, discovers registered prefill and decode workers, and coordinates disaggregated request routing.Prefill worker (
Prefill): runs a two-node worker pool across twoa4-highgpu-8gnodes with a total of 16 NVIDIA B200 GPUs. Each Pod mounts the stagednvidia/Qwen3.8-2.4T-A95B-NVFP4weights from your Cloud Storage bucket at/model-weightsby using the Cloud Storage FUSE CSI driver (gcsfuse.csi.storage.gke.io) with Local NVMe SSD file caching, sources the NCCL/gIB environment, and launchespython3 -m dynamo.sglangin--disaggregation-mode prefillwith the following flags:--served-model-name "nvidia/Qwen3.8-2.4T-A95B-NVFP4"--tensor-parallel-size 16--ep-size 16--nnodes 2--moe-runner-backend flashinfer_trtllm--attention-backend triton--kv-cache-dtype fp8_e4m3--disable-flashinfer-autotune
Decode worker (
Decode): runs a two-node worker pool across the remaining twoa4-highgpu-8gnodes, with a total of 16 NVIDIA B200 GPUs. Each Pod mounts the staged model weights from Cloud Storage at/model-weightsthrough the Cloud Storage FUSE CSI driver and launchespython3 -m dynamo.sglangin--disaggregation-mode decodewith the following flags:--served-model-name "nvidia/Qwen3.8-2.4T-A95B-NVFP4"--tensor-parallel-size 16--ep-size 16--nnodes 2--moe-runner-backend flashinfer_trtllm--attention-backend triton--kv-cache-dtype fp8_e4m3
Deploy and monitor the disaggregated inference server:
Review the
qwen3.8-2.4t-nvfp4-multihost-a4-gcsfuse.yamlworkload manifest that you downloaded earlier, or create a file namedqwen3.8-2.4t-nvfp4-multihost-a4-gcsfuse.yamlwith the following content:Substitute your Cloud Storage bucket name into
qwen3.8-2.4t-nvfp4-multihost-a4-gcsfuse.yamland apply the workload manifest to your cluster:To monitor weight loading and server initialization, list the Pods in your cluster, and stream the logs of the prefill leader Pod and decode leader Pod:
Replace
YOUR_POD_NAMEwith the name of the prefill leader Pod or decode leader Pod from thekubectl get podsoutput.On a cold start, it takes approximately 4 to 5 minutes to stream the 2,400,000,000,000 NVFP4 model weights (~1.44 TB across 200 shards) from Cloud Storage through Cloud Storage FUSE and initialize the multi-host SGLang servers. Before you send any requests, wait until the frontend Pods show
1/1and the prefill and decode Pods show2/2in theREADYcolumn ofkubectl get pods:NAME READY STATUS RESTARTS AGE qwen3-8-2-4t-a4-disagg-0-decode-0-decode-ldr-wz92h 2/2 Running 0 5m qwen3-8-2-4t-a4-disagg-0-decode-0-decode-wkr-fb8g6 2/2 Running 0 5m qwen3-8-2-4t-a4-disagg-0-frontend-jrx4s 1/1 Running 0 5m qwen3-8-2-4t-a4-disagg-0-prefill-0-prefill-ldr-7nz25 2/2 Running 0 5m qwen3-8-2-4t-a4-disagg-0-prefill-0-prefill-wkr-7d5cw 2/2 Running 0 5m
Send inference requests
Send a chat completion request to the deployed Qwen3.8-2.4T service:
Forward local port
8000to theqwen3-8-2-4t-a4-disagg-frontendservice:Leave port forwarding running in this terminal session, or run the command in the background.
In a second terminal session, send a chat completion request to the
/v1/chat/completionsendpoint:
Run a benchmark workload
Benchmark the deployed Qwen3.8-2.4T server from the Dynamo frontend Pod by using
sglang.bench_serving with a configuration of 1,024 input tokens, 1,024 output
tokens (1k/1k), 256 prompts, and a maximum concurrency of 128:
After the benchmark completes, look for output that contains metrics such as the following:
Output token throughputTotal Token throughputTTFTTPOT
Clean up
To avoid incurring additional ongoing charges to your Google Cloud account for the resources used in this tutorial, delete the Kubernetes workloads, the GKE cluster, and your Cloud Storage bucket:
Delete the DynamoGraphDeployment and ResourceClaimTemplate resources:
Uninstall the NVIDIA Dynamo platform and KAI Scheduler Helm releases:
Delete the Hugging Face Kubernetes Secret:
From the
cluster-toolkitdirectory, destroy the GKE cluster and its associated infrastructure by using thegcluster destroycommand:Delete the Cloud Storage bucket that stores the staged model weights and the Terraform state:
gcloud storage rm --recursive "gs://${GCS_BUCKET}"
What's next
- Learn more about NVIDIA Dynamo.
- Learn more about SGLang.
- Learn more about A4 VMs with NVIDIA B200 GPUs.
- Learn more about Cluster Toolkit.
- Learn more about managing AI-optimized GKE clusters.