Skills.MD
# GKE Inference Quickstart (GIQ)
## Purpose
This skill guides the deployment of AI/ML inference workloads on GKE using GIQ. It leverages `gcloud container ai profiles manifests create` to create optimized Kubernetes manifests based on Google's best practices and benchmarks.
## When to Use
- **Goal:** Deploy an AI model (e.g., Llama, Gemma, Mistral) to GKE.
- **Goal:** Generate a Kubernetes manifest for inference.
- **Context:** User asks about "GIQ", "Inference Quickstart", or "AI benchmarks" on GKE.
## Prerequisites
- A GKE cluster (preferably with GPU/TPU node pools, though GIQ can help identify requirements).
- `gcloud` CLI installed and authenticated (for discovery commands).
## Workflow
### 1. Discovery: Find Models and Hardware
Before generating a manifest, you often need to pick a valid combination of Model, Model Server, and Accelerator.
**List all supported models:**
```bash
gcloud container ai profiles models list
```
**Find valid accelerators and servers for a specific model:**
```bash
# Replace <MODEL_NAME> with a model from the list above (e.g., 'gemma-2-9b-it')
gcloud container ai profiles model-and-server-combinations list --model=<MODEL_NAME>
```
**View benchmarks/profiles (optional):**
To see costs and latency targets:
```bash
gcloud container ai profiles list --model=<MODEL_NAME>
```
### 2. Generate Manifest
Use the `gcloud container ai profiles manifests create` command. This ensures you are using the latest supported flags and options directly from the CLI.
**Parameters:**
- `--model`: The model ID (e.g., `gemma-2-9b-it`).
- `--model-server`: The inference server (e.g., `vllm`, `tgi`, `triton`, `tensorrt-llm`).
- `--accelerator-type`: The accelerator type (e.g., `nvidia-l4`, `nvidia-tesla-a100`).
- `--target-ntpot-milliseconds`: (Optional) Target Normalized Time Per Output Token in ms.
**Example Command:**
```bash
gcloud container ai profiles manifests create \
--model=gemma-2-9b-it \
--model-server=vllm \
--accelerator-type=nvidia-l4 \
--target-ntpot-milliseconds=50 > inference-workload.yaml
```
### 3. Review and Deploy
1. **Save:** The example command above saves output to `inference-workload.yaml`. Ensure you have this file.
2. **Review:** Check for any placeholders or specific requirements (like PVCs or secrets).
- _Note: Some models require Hugging Face tokens. Ensure query instructions for secrets are followed._
3. **Deploy:**
```bash
kubectl apply -f inference-workload.yaml
```
## Troubleshooting
- **Invalid Combination:** If the manifest creation fails with an invalid combination error, re-run the discovery commands in Step 1 to verify the tuple (model, server, accelerator).
- **Quota Issues:** Ensure the target region has sufficient quota for the requested accelerator (e.g., `NVIDIA_L4_GPUS`).
## Reference
- **Docs:** [GKE Inference Quickstart Documentation](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/machine-learning/inference/inference-quickstart)
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「gke-inference-quickstart」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次