Alauda Build of KServe
KServe
Alauda Build of KServe 基于 KServe 构建。 KServe 为在 Kubernetes 上大规模提供 machine learning 模型服务提供了标准化的 cloud-native 接口。 它围绕两种主要场景不断演进:用于传统 ML 推理的 Predictive AI,以及用于基于 LLM 工作负载的 Generative AI。
Generative AI
Generative AI 支持针对 Large Language Model (LLM) 服务进行了优化,并兼容 OpenAI APIs。
- llm-d (Distributed LLM Inference):一个 Kubernetes-native 的分布式推理框架,运行在 KServe control plane 之下。llm-d 使用 Leader/Worker 模式协调多节点 LLM 推理,并基于 KV cache 状态和 GPU 负载做出实时路由决策,从而实现感知 KV-cache 的请求调度、弹性的 tensor/pipeline parallelism,以及表现得像单机一样的集群级推理。这降低了每 token 成本,并最大化了大模型(例如超出单节点内存的 Llama 3.1 405B)的 GPU 利用率。
- LLM Inference & Streaming:原生支持流式响应(SSE / chunked transfer),为聊天和补全工作负载提供实时 token 传递,并提供兼容 OpenAI 的
/chat/completions和/completionsAPIs。 - vLLM Runtime:与 vLLM 的深度集成,将其作为高性能 LLM 服务后端,并支持 continuous batching 和 PagedAttention。
- Gateway Integration:与 Envoy Gateway 和 Gateway API Inference Extension (GIE) 原生集成,为 inference services 提供 AI-aware 流量路由、负载均衡以及按模型的速率限制。
- Autoscaling for LLMs:面向 LLM 吞吐特征的指标驱动 autoscaling 策略,包括 scale-to-zero,以提升成本效率。
Predictive AI
Predictive AI 覆盖了对高吞吐和低延迟有要求的传统 machine learning 模型服务。
- InferenceService:用于部署和管理模型服务端点的核心 CRD。支持金丝雀发布、跨模型版本的流量拆分以及 A/B 测试工作流。
- Model Serving Runtimes:针对常见 ML frameworks 的预集成运行时——TensorFlow Serving、TorchServe、Triton Inference Server、SKLearn、XGBoost 等。也支持通过 ClusterServingRuntime 和 ServingRuntime CRDs 使用自定义运行时。
- Inference Graph:InferenceGraph CRD 支持将多个模型组合成一个 pipeline,包括前处理/后处理节点、路由逻辑和 ensemble 模式。
- Autoscaling:通过 KEDA 或 Kubernetes HPA 提供 scale-to-zero 和 scale-from-zero 支持,策略基于请求速率、队列深度或自定义指标。
KServe 通过 default AmlCluster 中的 kserve 组件由 Alauda AI 安装和管理。有关 KServe 配置,请参阅 Install Alauda AI。
文档
KServe 上游文档和关键依赖项:
- KServe 文档: https://kserve.github.io/website/ — 涵盖概念、模型服务运行时和 API references 的官方文档。
- KServe GitHub: https://github.com/kserve/kserve — 源代码、release notes 和 issues。
- llm-d: https://github.com/llm-d/llm-d — Kubernetes-native 的分布式 LLM inference 框架,支持感知 KV-cache 的调度和弹性并行。
- LeaderWorkerSet (LWS): https://github.com/kubernetes-sigs/lws — Kubernetes SIG workload controller,用于多节点 Leader/Worker 模式,是多节点 LLM inference 的必需组件。
- Envoy Gateway: https://gateway.envoyproxy.io/ — 基于 Envoy Proxy 构建的 Kubernetes-native gateway,为 KServe inference services 提供底层流量管理能力。
- Envoy AI Gateway: https://aigateway.envoyproxy.io/ — 构建在 Envoy Gateway 之上的 AI-specific gateway 能力,包括 AI-aware 路由和按模型策略。
- Gateway API Inference Extension (GIE): https://gateway-api-inference-extension.sigs.k8s.io/ — Kubernetes SIG 项目,为 inference services 提供 AI-aware 路由和负载均衡。