Skip to content

#recipebot Add Qwen3-32B vLLM TorchTPU single-host inference recipe on Trillium (TPU v6e) - #370

Merged
joeywan-google merged 1 commit into
AI-Hypercomputer:mainfrom
syeda-anjum:qwen3-32b-vllm-torchtpu-v6e-single-host
Oct 19, 2026
Merged

joeywan-google merged 1 commit into
AI-Hypercomputer:mainfrom
syeda-anjum:qwen3-32b-vllm-torchtpu-v6e-single-host

Conversation

@syeda-anjum

Copy link
Copy Markdown
Contributor

Adding a vLLM (TorchTPU backend) single-host inference recipe for Qwen/Qwen3-32B on Trillium (TPU v6e) on GKE under inference/trillium/vLLM/vLLM-TorchTPU/Qwen3-32B/single-host.

  • Model: Qwen/Qwen3-32B (BF16 weights + FP8 KV Cache)
  • Topology: Single ct6e-standard-8t node pool (2x4, 8 TPU v6e chips), TP=8
  • Serving: vLLM with TorchTPU plugin, custom attention backend, async scheduling, and FP8 KV Cache.
  • Benchmark Workloads: Validated with the SemiAnalysisAI InferenceX (benchmark_serving.py) client.
  • uBench Run ID: vllm_inference-torchtpu_vllm/qwen3_32b_v6e_single_host_1k_1k-2026-10-19_035034-ca177b03-d73e-43c3-a6f6-dfda2855446b

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the configuration files and documentation required to serve the Qwen3-32B model using vLLM (TorchTPU) on a single-host Trillium TPU v6e node pool in GKE. It includes a step-by-step README guide, benchmark Pod definitions, and the vLLM server deployment manifest. To ensure successful deployment and accurate performance testing, the CPU and memory requests in the server deployment should be reduced slightly to account for GKE system overhead and prevent scheduling failures. Additionally, the benchmarking instructions should be updated to run the benchmark workloads sequentially rather than concurrently to avoid resource contention.

Comment on lines +124 to +131
limits:
cpu: "64"
memory: 256Gi
google.com/tpu: "8"
requests:
cpu: "64"
memory: 256Gi
google.com/tpu: "8"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Requesting 100% of the node's physical CPU (64 cores) and memory (256Gi) will cause the Pod to fail scheduling on GKE. GKE reserves a portion of the node's CPU and memory for system overhead (kubelet, kube-proxy, logging agents, etc.), meaning the allocatable resources are always less than the physical capacity. Lowering these requests/limits slightly (e.g., to 55 CPUs and 210Gi memory) ensures the Pod can be successfully scheduled on a ct6e-standard-8t node.

            limits:
              cpu: "55"
              memory: 210Gi
              google.com/tpu: "8"
            requests:
              cpu: "55"
              memory: 210Gi
              google.com/tpu: "8"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The premise here is incorrect. ct6e-standard-8t has 360 vCPUs and 1,440 GiB host RAM (gcloud compute machine-types describe ct6e-standard-8t), not 64 vCPU / 256 GiB — the 256 GB figure is the TPU HBM, not host memory. The cpu: 64 / memory: 256Gi request is ~18% of node allocatable and schedules fine; this exact manifest was validated end-to-end on a ct6e-standard-8t node pool. No change needed.

Comment on lines +146 to +163
### Workload A: 1K Input / 1K Output (`1k/1k`)

```shell
kubectl apply -f qwen3-32b-benchmarks.yaml
kubectl logs -n vllm-qwen3-32b qwen3-32b-bench-1k1k -f
```

### Workload B: 1K Input / 8K Output (`1k/8k`)

```shell
kubectl logs -n vllm-qwen3-32b qwen3-32b-bench-1k8k -f
```

### Workload C: 8K Input / 1K Output (`8k/1k`)

```shell
kubectl logs -n vllm-qwen3-32b qwen3-32b-bench-8k1k -f
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Applying qwen3-32b-benchmarks.yaml directly as instructed will create and run all three benchmark Pods (1k/1k, 1k/8k, and 8k/1k) concurrently. This will cause severe resource contention on the single-host vLLM server, leading to high queueing latency and inaccurate benchmark results. To obtain reliable performance metrics, the benchmarks should be run sequentially. Consider updating the instructions to run them one at a time (e.g., apply one, wait for completion, delete it, and then apply the next).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — addressed in the latest revision. The separate qwen3-32b-benchmarks.yaml was removed; each workload is now its own inline manifest in the README with an explicit apply → logs → delete sequence (matching the Gemma4-26B recipe), so benchmarks run strictly one at a time.

@syeda-anjum
syeda-anjum force-pushed the qwen3-32b-vllm-torchtpu-v6e-single-host branch from 0750c99 to fdd050f Compare October 19, 2026 19:02
@syeda-anjum
syeda-anjum marked this pull request as ready for review October 19, 2026 19:15
@syeda-anjum

Copy link
Copy Markdown
Contributor Author

@joeywan-google could you please review? This follows the same structure as the Trillium Gemma4-26B vLLM-TorchTPU recipe (README.md + *-server.yaml, benchmark Pods inlined in Step 6). I have replied inline to the Gemini Code Assist comments — the resource-limit and sequencing points are resolved/not applicable.

@joeywan-google
joeywan-google merged commit f4a9336 into AI-Hypercomputer:main Oct 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants