AI workload tutorials overview

AI Hypercomputer tutorials let you run inference, fine-tuning, reinforcement learning (RL), and pre-training workloads on Google Cloud. You can deploy open models such as Gemma, DeepSeek, Llama, and Qwen on NVIDIA GPUs or Cloud TPU accelerators. Each walkthrough uses Google Kubernetes Engine (GKE), Slurm clusters, or Cloud TPU VMs, including clusters provisioned with Cluster Toolkit.

These tutorials are for machine learning (ML) engineers, researchers, platform administrators and operators, and artificial intelligence (AI) specialists. Workloads include prefill-decode (PD) disaggregation, supervised fine-tuning (SFT), and distributed training with PyTorch Fully Sharded Data Parallel (FSDP).

The tutorials assume that you're familiar with ML concepts, Google Cloud services, container orchestration, and cluster management.

Available tutorials

Filter the following table by workload, accelerator, platform, framework, or model family, or enter a keyword in the search field. To reset your menu selections, click Clear all. To sort the table, click a column header.

Tutorial Workload Accelerator Platform Framework Model
Serve DeepSeek-R1 671B on GKE with multi-host vLLM on A4 VMs Inference A4 (NVIDIA B200 GPU) GKE (Standard, Cluster Toolkit) vLLM, Ray DeepSeek-R1 671B
Serve Qwen3.8-2.4T on GKE with multi-host PD disaggregation using Dynamo and SGLang on A4 VMs Inference (PD disaggregation) A4 (NVIDIA B200 GPU) GKE (Standard, Cluster Toolkit) SGLang, NVIDIA Dynamo Qwen3.8-2.4T
Serve Llama 3.1 405B on GKE with PD disaggregation using Dynamo and SGLang on A4 VMs Inference (PD disaggregation) A4 (NVIDIA B200 GPU) GKE (Standard, Cluster Toolkit) SGLang, NVIDIA Dynamo Llama 3.1 405B
Use vLLM on GKE to run inference with DeepSeek-V3.1-Base Inference A4 (NVIDIA B200 GPU) GKE (Autopilot) vLLM DeepSeek-V3.1-Base
Use vLLM on GKE to run inference with DeepSeek-V3.2-Speciale Inference A4 (NVIDIA B200 GPU) GKE (Autopilot) vLLM DeepSeek-V3.2-Speciale
Use vLLM on GKE to run inference with gpt-oss-120b Inference A4 (NVIDIA B200 GPU) GKE (Autopilot) vLLM gpt-oss-120b
Use vLLM on GKE to run inference with Llama 4 Inference A4 (NVIDIA B200 GPU) GKE (Autopilot) vLLM Llama 4 Scout
Use vLLM on GKE to run inference with Qwen3 Inference A4 (NVIDIA B200 GPU) GKE (Autopilot) vLLM Qwen3-235B-A22B
Fine-tune Gemma 4 on an A4 GKE cluster Fine-tuning A4 (NVIDIA B200 GPU) GKE (Autopilot) Hugging Face Accelerate, PyTorch FSDP Gemma 4 31B
Fine-tune Gemma 4 on a multi-host A4 GKE cluster Fine-tuning A4 (NVIDIA B200 GPU) GKE (Autopilot) Hugging Face Accelerate, PyTorch FSDP v2 Gemma 4 31B
Fine-tune Gemma 3 on a multi-host A4 GKE cluster Fine-tuning A4 (NVIDIA B200 GPU) GKE (Autopilot) Hugging Face Accelerate, PyTorch FSDP Gemma 3
Fine-tune Gemma 3 on an A4 Slurm cluster Fine-tuning A4 (NVIDIA B200 GPU) Slurm (Cluster Toolkit) Hugging Face Accelerate, PyTorch FSDP Gemma 3 12B
Use Ray to fine-tune Gemma 3 for vision tasks on GKE Fine-tuning (vision) A4 (NVIDIA B200 GPU) GKE (Autopilot) Ray Gemma 3
Use FSDP to fine-tune Llama 4 on an A4 Slurm cluster Fine-tuning A4 (NVIDIA B200 GPU) Slurm (Cluster Toolkit) PyTorch FSDP, Hugging Face TRL Llama 4 Scout
Use FSDP to fine-tune Mixtral-8x7B on an A4 Slurm cluster Fine-tuning A4 (NVIDIA B200 GPU) Slurm (Cluster Toolkit) PyTorch FSDP, Hugging Face TRL Mixtral-8x7B
Fine-tune and scale reinforcement learning with verl on GKE Reinforcement learning (RL) A4X (NVIDIA GB200), A4 (NVIDIA B200 GPU), A3 Ultra (NVIDIA H200 GPU) GKE (Autopilot, Standard, Cluster Toolkit) Ray, verl Qwen2.5-32B-Instruct
Fine-tune and scale reinforcement learning with NVIDIA NeMo RL on GKE Reinforcement learning (RL) A4 (NVIDIA B200 GPU), A3 Ultra (NVIDIA H200 GPU) GKE (Standard) Ray, NVIDIA NeMo RL Gemma 3 27B
Train Qwen2 on an A4 Slurm cluster Pre-training A4 (NVIDIA B200 GPU) Slurm (Cluster Toolkit) Hugging Face Accelerate, PyTorch FSDP Qwen2 1.5B
Serve Qwen3.5-397B on GKE with vLLM TorchTPU on TPU7x accelerators Inference TPU7x (Ironwood) GKE vLLM TorchTPU Qwen3.5-397B
Serve Qwen3-30B-A3B on GKE with vLLM TorchTPU on TPU v6e Inference TPU v6e (Trillium) GKE vLLM TorchTPU Qwen3-30B-A3B
Serve Gemma 4 26B on GKE with multi-host vLLM TorchTPU on Trillium TPUs Inference TPU v6e (Trillium) GKE vLLM TorchTPU, Ray Gemma 4 26B
Serve Qwen3.5-397B on GKE with multi-host vLLM TorchTPU and PD disaggregation on TPU7x accelerators Inference (PD disaggregation) TPU7x (Ironwood) GKE vLLM TorchTPU, Ray Qwen3.5-397B
Serve Qwen3-30B-A3B on GKE with multi-host vLLM TorchTPU and PD disaggregation on TPU v6e accelerators Inference (PD disaggregation) TPU v6e (Trillium) GKE vLLM TorchTPU, Ray Qwen3-30B-A3B
Serve Qwen3-Coder-480B on GKE with multi-host SGLang TorchTPU and PD disaggregation on TPU7x accelerators Inference (PD disaggregation) TPU7x (Ironwood) GKE SGLang TorchTPU Qwen3-Coder-480B
Serve Qwen3-Coder-30B-A3B on GKE with multi-host SGLang TorchTPU and PD disaggregation on TPU v6e accelerators Inference (PD disaggregation) TPU v6e (Trillium) GKE SGLang TorchTPU Qwen3-Coder-30B-A3B
Run SFT for Gemma 4 31B on multi-host TPU v6e Fine-tuning (SFT) TPU v6e (Trillium) GKE (Cluster Toolkit) MaxText Gemma 4 31B
Run supervised fine-tuning on a TPU VM by using MaxText Fine-tuning (SFT) TPU v6e (Trillium) Cloud TPU VM MaxText Gemma 3 4B
Run reinforcement learning training on a TPU VM by using MaxText Reinforcement learning (RL) TPU v6e (Trillium) Cloud TPU VM MaxText Llama 3.1 8B
Run multi-host reinforcement learning training for Gemma 4 26B on TPU v6e Reinforcement learning (RL) TPU v6e (Trillium) GKE (Cluster Toolkit) MaxText, Pathways Gemma 4 26B
Run multi-host RL training for Qwen3-30B-A3B on TPU v6e Reinforcement learning (RL) TPU v6e (Trillium) GKE (Cluster Toolkit) MaxText, Pathways Qwen3-30B-A3B

Tutorial categories

You can browse AI Hypercomputer tutorials across the following workload categories:

  • Inference and serving: deploy and serve large language models (LLMs) on NVIDIA GPUs and Cloud TPU accelerators across single-host, multi-host, and PD disaggregation setups.
  • Fine-tuning and reinforcement learning: adapt pre-trained models for text, vision, and reasoning tasks on GKE, Slurm, and Cloud TPU VMs.
  • Pre-training: pre-train LLMs from scratch on multi-node, multi-GPU Slurm clusters provisioned with Cluster Toolkit.

Inference and serving

These tutorials guide you through deploying and serving LLMs on GKE across GPU and Cloud TPU accelerators.

For GPU serving, you deploy models on A4 VM instances with NVIDIA B200 GPUs. You can run single-host inference with vLLM on GKE Autopilot clusters. For multi-host serving and PD disaggregation, you provision GKE Standard clusters with Cluster Toolkit and deploy either vLLM or SGLang with NVIDIA Dynamo.

For Cloud TPU serving, you deploy models on TPU v6e (Trillium) and TPU7x (Ironwood) accelerators on GKE by using vLLM TorchTPU and SGLang TorchTPU. Multi-host serving tutorials use Ray, Kubernetes JobSet, or LeaderWorkerSet to coordinate workers across hosts. The inference tutorials cover models from the DeepSeek, Gemma, gpt-oss, Llama, and Qwen families.

Fine-tuning and reinforcement learning

These tutorials guide you through adapting pre-trained models for specialized text, vision, and reasoning tasks on GPUs and Cloud TPU accelerators.

For GPU fine-tuning and RL, you run workloads on A4X, A4, and A3 Ultra instances across GKE (Autopilot and Standard) and Slurm clusters. The GKE tutorials cover single-host and multi-host setups, and the Slurm tutorials use multi-node clusters provisioned with Cluster Toolkit. You use Hugging Face Accelerate, PyTorch FSDP (including FSDP v2), and Hugging Face TRL for text fine-tuning, Ray for multimodal vision tasks, and Ray with verl or NVIDIA NeMo RL for Group Relative Policy Optimization (GRPO) RL workloads. The GPU fine-tuning and RL tutorials cover Gemma 3, Gemma 4, Llama 4, Mixtral-8x7B, and Qwen2.5.

For Cloud TPU post-training, you use the JAX-based MaxText framework to run SFT workloads and GRPO RL workloads, with Pathways for multi-host RL. You can start on a single-host v6e-8 Cloud TPU VM or scale to multi-host v6e-32 GKE clusters provisioned with Cluster Toolkit. The Cloud TPU post-training tutorials cover Gemma 3, Gemma 4, Llama 3.1, and Qwen3.

Pre-training

You can pre-train LLMs, such as Qwen2 1.5B, on multi-node, multi-GPU Slurm clusters that use A4 VM instances. You deploy the Slurm cluster with Cluster Toolkit, build custom OS images, configure shared Filestore instances, and set up GPUDirect RDMA networking. You then run distributed pre-training jobs by using Hugging Face Accelerate and PyTorch FSDP.

What's next