读见

Kubernetes 上的开源 AI 原生技术栈:从开源模型到分布式推理与智能体

原题The open AI-native stack on Kubernetes: From open models to distributed inference and agents

约 10 分钟约 2,325 字原文英文已翻译

推荐理由Google Cloud 统一介绍后训练、缓存路由、编排、智能体基座与沙箱隔离,为平台团队梳理开源 AI 栈各组件职责,作为前十应用案例的基础设施延伸。

读前速览

5 个要点

本文介绍了一套面向 Kubernetes 的全面开源 AI 原生技术栈,借助 OpenRL、llm-d 1.0、KubeRay、Agent Substrate 和 gVisor 等项目,实现可扩展的 RL 后训练、支持前缀缓存感知路由的分布式推理,以及安全的多租户智能体执行。

  1. OpenRL 借助加速器时间切片和增量权重同步,实现 Kubernetes 原生 RL 后训练

    OpenRL 提供由 4 个基本原语组成的 Python 抽象,并将其转换为 Kubernetes 调度工作流,使训练和 rollout 推理能够共享同一批加速器,同时只传输参数增量,避免网络饱和。

  2. llm-d 1.0 为分布式推理提供前缀缓存感知路由和三级 KV 缓存卸载

    控制平面将独立的推理引擎转变为协同工作的服务网络。在多轮智能体工作负载中,KV 缓存命中率从 35% 提高到 70%,中位首个 Token 生成时间缩短了 70-85%。

  3. KubeRay 为分布式 Ray 计算提供企业级生命周期管理和由 Kueue 驱动的调度

    KubeRay 提供声明式集群生命周期管理、支持多租户的原生 Kueue 队列,以及弹性自动扩缩容,从而在 Kubernetes 上管理 Ray 集群的同时避免资源闲置。

  4. Agent Substrate 和 gVisor 为多租户集群中执行不可信的模型生成代码提供强隔离

    gVisor 提供内核级沙箱隔离,能够拦截系统调用,并为 RL rollout 生成和生产环境中的智能体工作流创建亚秒级的临时执行环境。

  5. 这套技术栈在法律领域推理任务中展现实际效果,在法律智能体基准测试中达到 70% 的准确率

    使用 OpenRL 的 RL 循环对 Gemma 4 进行测试后,准确率从标准 SFT 的 50% 提升至 70%;整个流程还能动态共享 GPU 和 TPU 容量,无需手动管理资源分区。

完整摘要

本文介绍了一套统一的开源 AI 原生技术栈,旨在应对在 Kubernetes 上大规模部署 AI 工作负载的挑战。文章详细介绍了六个核心组件:用于 Kubernetes 原生强化学习后训练的 OpenRL、支持缓存感知路由的分布式推理系统 llm-d 1.0、用于分布式 Python 和 ML 编排的 KubeRay、用于管理多轮智能体工作流的 Agent Substrate、用于对不可信智能体代码进行内核级沙箱隔离的 gVisor,以及为 Cloud TPU 提供原生 PyTorch 支持的 TorchTPU。这套技术栈以更低的成本和延迟实现前沿水平的任务表现;实际测试显示,在法律智能体基准测试中,准确率达到 70%,而标准 SFT 为 50%。实际应用场景涵盖企业平台团队、受监管行业、AI 原生开发者和模型即服务提供商。

目录 · 11 节

查看原文

在过去十年里,Kubernetes 已成为编排微服务和容器化应用的标准。如今,我们正见证分布式计算领域的下一次重大架构转变:AI 工作负载正从孤立的研究原型迈向大规模、多租户的生产集群。在这篇文章中,我们将介绍推动这一转变的开源技术栈,并展示一些示例清单,供你在自己的 Kubernetes 集群上试用。你也可以参加 KubeCon + CloudNativeCon North America 2026,通过现场演示和技术讲座了解这些项目的实际应用。Over the past decade, Kubernetes established itself as the standard for orchestrating microservices and containerized applications. Today, we're witnessing the next major architectural shift in distributed computing: AI workloads moving from isolated research prototypes into large-scale, multi-tenant production fleets. In this post, we'll walk through the open-source stack that powers this shift and show you the sample manifests that you can try on your own Kubernetes clusters. You can also join us at KubeCon + CloudNativeCon North America 2026 to see these projects in action through live demos and technical sessions.

对于现代工程团队而言,生产级 AI 正迅速超越对通用封闭黑盒 API 的依赖。各组织逐渐认识到,长期竞争优势在于领域专业化。平台工程师、机器学习研究人员和 AI 构建者希望能够自主运行高性能开放权重模型(例如 Gemma 系列),并利用强化学习(RL)根据专有企业数据集对其进行调整,同时以可预测的延迟、高吞吐量和最高的硬件效率提供服务。For modern engineering teams, production AI is rapidly moving beyond generic calls to closed, black-box APIs. Organizations are realizing that their long-term competitive advantage lies in domain specialization. Platform engineers, ML researchers, and AI builders want the autonomy to run high-performing open-weight models (such as the Gemma family). They want to adapt them to proprietary enterprise datasets by using reinforcement learning (RL) and serve them with predictable latency, high throughput, and maximum hardware efficiency.

无论是利用声学数据训练领域模型(如 DolphinGemma——一种帮助科学家研究海豚如何交流的大语言模型)的科学项目、评估复杂合同的法律平台,还是开发自主编程智能体的工程团队,目标都相同:以远低于常规水平的服务成本和延迟,实现前沿级别的任务性能。Whether it's scientific initiatives training domain models like DolphinGemma (an LLM helping scientists study how dolphins communicate) on acoustic data, legal platforms evaluating complex contracts, or engineering teams building autonomous coding agents, the objective is the same: achieving frontier-level task performance at a fraction of the serving cost and latency.

然而,在传统容器基础设施上扩展强化学习后训练、有状态分布式推理和自主智能体执行,会带来巨大挑战:Yet, scaling RL post-training, stateful distributed inference, and autonomous agent execution on traditional container infrastructure introduces substantial hurdles:

  • 强化学习中的加速器利用不足:在训练和生成 rollout 之间交替进行时,昂贵的 GPU 和 TPU 在大部分训练过程中都处于闲置状态。

    Accelerator underutilization in RL: When you alternate between training and rollout generation, expensive GPUs and TPUs remain idle for most of the training run.

  • 缓存盲式负载均衡:使用标准的 Kubernetes 轮询和最少连接数路由时,多轮智能体调用会被分散到任意 Pod 上,破坏键值(KV)缓存的局部性。

    Cache-blind load balancing: When you use standard Kubernetes round-robin and least-connections routing, multi-turn agent calls are scattered across arbitrary pods and wipe out key-value (KV) cache locality.

  • 框架碎片化:当你在 Kubernetes 之外运行并行且彼此孤立的计算集群(例如定制的 Ray 或 Slurm 环境)时,计算容量会变得碎片化,维护工作也会成倍增加。

    Framework fragmentation: When you operate parallel, siloed compute clusters (such as bespoke Ray or Slurm setups) alongside Kubernetes, you fragment capacity and multiply maintenance toil.

  • 多租户集群中的智能体安全:在共享环境中执行不可信的模型生成的 shell 命令和脚本时,集群可能会遭受沙箱逃逸和权限提升攻击。

    Agent security in multi-tenant clusters: When you execute untrusted, model-generated shell commands and scripts in shared environments, you expose clusters to sandbox escapes and privilege escalation.

在 2026 年北美 KubeCon + CloudNativeCon 大会上,Google Cloud 正通过推出并扩展一套统一的开源 AI 原生技术栈来应对这些挑战。该技术栈覆盖 Kubernetes 和 Google Kubernetes Engine (GKE),并基于以下组件构建:At KubeCon + CloudNativeCon North America 2026, Google Cloud is addressing these challenges by introducing and expanding a unified, open-source AI-native stack across Kubernetes and Google Kubernetes Engine (GKE) based on these components:

  • OpenRL(CNCF Sandbox):一种 Kubernetes 原生的后训练服务,可简化强化学习后训练流程,并最大限度地提高加速器利用率。

    OpenRL (CNCF Sandbox): A Kubernetes-native post training service that simplifies RL post-training and maximizes accelerator utilization.

  • llm-d 1.0(CNCF Sandbox):一个开源的分布式推理控制平面,提供前缀缓存感知路由、解耦式服务和多层级 KV 缓存管理。

    llm-d 1.0 (CNCF Sandbox): An open distributed inference control plane that provides prefix-cache-aware routing, disaggregated serving, and multi-tier KV cache management.

  • 在 GKE 上使用 KubeRay(CNCF 沙箱)运行 Ray:该框架为分布式 Ray 计算和数据处理提供企业级生命周期管理、弹性自动扩缩容以及由 Kueue 驱动的调度功能。

    Ray on GKE with KubeRay (CNCF Sandbox): A framework that provides enterprise lifecycle management, elastic autoscaling, and Kueue-driven scheduling for distributed Ray compute and data processing.

  • 智能体底座(CNCF Sandbox):一种开放式编排运行时,为多轮 AI 智能体工作流提供生命周期管理和执行目标。

    Agent Substrate (CNCF Sandbox): An open orchestration runtime that provides lifecycle management and execution targets for multi-turn AI agent workflows.

  • gVisor(CNCF 沙箱):一种内核级容器沙箱,可在多租户集群中执行不受信任的代理代码时提供强大的系统调用隔离。

    gVisor (CNCF Sandbox): A kernel-level container sandbox that delivers strong system call isolation when you execute untrusted agent code in multi-tenant clusters.

  • TorchTPU:一个后端,可在上游 vLLM 和 SGLang 中,为 Cloud TPU 和 GPU 提供一流的原生 PyTorch 支持。

    TorchTPU: A backend that provides first-class, native PyTorch support across Cloud TPUs and GPUs inside upstream vLLM and SGLang.

使用 OpenRL 搭建强化学习与 Kubernetes 之间的桥梁Bridge reinforcement learning and Kubernetes with OpenRL

尽管监督微调(SFT)已成为标准做法,但要在特定领域达到卓越水平,尤其是在多步推理、数学证明和自主使用工具方面,仍需要强化学习(RL)。While supervised fine-tuning (SFT) has become standard practice, domain excellence especially in multi-step reasoning, mathematical proofing, and autonomous tool use requires RL.

长期以来,将机器学习实验与生产环境中的 Kubernetes 集群衔接起来一直很困难。机器学习研究人员希望使用标准奖励函数,通过 Python 和 PyTorch 快速迭代,而平台团队则需要多租户治理、配额执行和可预测的调度。Historically, it's been difficult to bridge the world of ML experimentation with production Kubernetes fleets. ML researchers want to iterate rapidly in Python and PyTorch by using standard reward functions, while platform teams need multi-tenant governance, quota enforcement, and predictable scheduling.

为消除这一障碍,Google 创建了 OpenRL,并将其贡献给 CNCF Sandbox。To eliminate this friction, Google created OpenRL and contributed it to the CNCF Sandbox.

OpenRL 的架构亮点Architectural highlights of OpenRL

  • 简洁的四原语 Python 抽象:研究人员编写标准的 Python 训练代码,围绕四个核心原语(forward_backward、optim_step、sample 和 save_state)展开。OpenRL 会将这些原语转换为 Kubernetes 调度工作流,无需开发者学习 Kubernetes 内部机制或管理基础设施代码。

    Clean 4-primitive Python abstraction: Researchers write standard Python training code that's centered around four core primitives (forward_backward, optim_step, sample, and save_state). OpenRL translates these primitives into Kubernetes scheduling workflows without requiring developers to learn Kubernetes internals or manage infrastructure code.

  • 协作式加速器分时:OpenRL 在同一组物理加速器上交替执行训练步骤和 rollout 推理。这种方式无需为计算密集型训练和对延迟敏感的 rollout 生成分别配置独立的静态集群。

    Cooperative accelerator time-slicing: OpenRL interleaves training steps and rollout inferences on the same physical accelerators. This approach avoids the need to dedicate separate, static clusters to compute-bound training and latency-sensitive rollout generation.

  • Delta 权重同步:每次优化步骤后通过集群网络传输数 GB 的完整模型权重,会造成严重的网络拥塞。OpenRL 只向 rollout 工作进程传输参数增量,从而消除 rollout 冷启动。

    Delta-weight synchronization: Shipping full multi-gigabyte model weights over cluster networking after every optimization step creates massive network saturation. OpenRL transmits only parameter deltas to rollout workers, eliminating rollout cold starts.

  • 零配置动态资源分配(DRA):OpenRL 会自动分析模型上下文长度、批次维度,以及 LoRA 与全量微调配置。随后,它利用 Kubernetes 原生 DRA 资源声明,在异构加速器集群中动态进行工作负载装箱。

    Zero-config dynamic resource allocation (DRA): OpenRL automatically profiles model context lengths, batch dimensions, and LoRA versus full fine-tuning configurations. It then dynamically bin-packs workloads across a heterogenous accelerator fleet by using native Kubernetes DRA claims.

使用 llm-d 1.0 实现大规模分布式推理Distributed inference at scale with llm-d 1.0

对模型进行后训练后,在交互式、突发式的智能体流量下为其提供服务,会带来一系列新的分布式系统挑战。标准入口控制器将 LLM 流量视为无状态 HTTP 请求,把连续轮次分散到不同副本上,并不断重建 KV 缓存。After you post-train a model, serving it serving it under interactive, bursty agent traffic presents a new set of distributed systems challenges. Standard ingress controllers treat LLM traffic as stateless HTTP requests, scattering sequential turns across different replicas and constantly rebuilding KV cache.

Google Cloud、Red Hat、IBM Research、CoreWeave 和 NVIDIA 共同创立了该项目,并获得了来自 25 多家组织的 500 多名工程师的贡献。如今,llm-d 1.0 是 CNCF Sandbox 分布式推理控制平面,可将独立的推理引擎(如 vLLM 和 SGLang)转变为协调一致、覆盖整个集群的服务架构。Google Cloud, Red Hat, IBM Research, CoreWeave, and NVIDIA co-founded the project, with contributions from over 500 engineers across 25+ organizations. Today, llm-d 1.0 is the CNCF Sandbox distributed inference control plane that transforms standalone inference engines (like vLLM and SGLang) into a coordinated, cluster-wide serving fabric.

apiVersion: inference.networking.x-k8s.io/v1alpha1 kind: InferencePool metadata: name: gemma-serving-pool namespace: ai-serving spec: targetRef: group: apps kind: Deployment name: vllm-gemma-27b scheduling: # Routes multi-turn requests to replicas holding matching KV context strategy: PrefixCacheAware fallback: LeastQueueDepth observability: kvCacheSyncInterval: "50ms"
apiVersion: inference.networking.x-k8s.io/v1alpha1
kind: InferencePool
metadata:
  name: gemma-serving-pool
  namespace: ai-serving
spec:
  targetRef:
    group: apps
    kind: Deployment
    name: vllm-gemma-27b
  scheduling:
    # Routes multi-turn requests to replicas holding matching KV context
    strategy: PrefixCacheAware
    fallback: LeastQueueDepth
  observability:
    kvCacheSyncInterval: "50ms"

llm-d 1.0 的核心能力Core capabilities of llm-d 1.0

  1. 前缀缓存感知路由(端点选择器):端点选择器集成到 Kubernetes Gateway API 推理扩展中,并由 GKE 通过 GKE Inference Gateway 原生管理。端点选择器会实时评估各个工作 Pod 上 KV 缓存的驻留情况。在生产部署中,它将 KV 缓存命中率从 35% 提高到 70%,并使多轮智能体工作负载的首字元时间(TTFT)中位数缩短了 70%–85%。

    Prefix-cache-aware routing (Endpoint Picker): The Endpoint Picker integrates into the Kubernetes Gateway API Inference Extension, and GKE manages it natively through GKE Inference Gateway. The Endpoint Picker evaluates real-time KV cache residency across worker pods. In production deployments, it's doubled KV cache hit rates from 35% to 70% and cut median time-to-first-token (TTFT) by 70-85% on multi-turn agent workloads.

  2. 三级 KV 缓存卸载:在长上下文交互过程中,当加速器高带宽内存(HBM)接近容量上限时,llm-d 会将 KV 缓存块依次从 HBM 卸载到主机 CPU 内存,再卸载到本地 NVMe SSD / Google Cloud Managed Lustre / Cloud Storage。这样可以避免代价高昂的上下文重新计算。

    3-Tier KV cache offload: When accelerator high-bandwidth memory (HBM) nears capacity during long-context interactions, llm-d cascades KV cache blocks from HBM → host CPU RAM → local NVMe SSD / Google Cloud Managed Lustre / Cloud Storage. This offload prevents expensive context recalculations.

  3. 使用 DisaggregatedSet 实现 EPD 拆分:将编码、预填充和解码(EPD)解耦,分别部署在通过高速互连连接的专用硬件池上。DisaggregatedSet 基于 Kubernetes LeaderWorkerSet(LWS)构建,支持独立水平扩缩容以及协调一致的零停机滚动升级。

    EPD Disaggregation with DisaggregatedSet: Decouples Encoding, Prefill, and Decode (EPD) onto specialized hardware pools that are connected by high-speed interconnects. DisaggregatedSet is built built on Kubernetes LeaderWorkerSet (LWS). It enables independent horizontal scaling and coordinated, zero-downtime rolling upgrades.

  4. 原生 TorchTPU 上游支持:通过 TorchTPU,PyTorch 模型可在上游 vLLM 和 SGLang 中原生运行于 Google Cloud TPU 上。开发者无需维护私有分支或重写流水线,即可在 TPU v5e、v6e 和 v7x 上获得与 NVIDIA GPU 同步的首日支持。

    Native TorchTPU upstream support: PyTorch models run natively on Google Cloud TPUs inside upstream vLLM and SGLang through TorchTPU. Developers get day-zero parity across TPU v5e, v6e, and v7x alongside NVIDIA GPUs without the need to maintain private forks or rewrite pipelines.

  5. 容忍延迟的异步处理与流量控制:llm-d-async-processor 组件从 Pub/Sub 或 Redis 拉取后台、可容忍延迟的任务,并利用集群的闲置容量进行处理。它会严格执行流量优先级策略,确保后台处理绝不会影响交互式用户体验。

    Latency-tolerant async processing & flow control: The llm-d-async-processor component pulls background, latency-tolerant tasks from Pub/Sub or Redis into cluster slack capacity. It applies strict traffic prioritization so background processing never degrades interactive user experiences.

  6. 使用 Prism 实现集群可观测性:借助 Prism(llm-d 开源基准测试与性能仪表板),跟踪整个集群的吞吐量、令牌间延迟(ITL)、首令牌时间(TTFT)和缓存命中率。

    Fleet observability with Prism: Track cluster-wide throughput, inter-token latency (ITL), TTFT, and cache hit ratios by using Prism, the llm-d open-source benchmarking and performance dashboard.

使用 KubeRay 编排分布式 Python 和机器学习工作流Distributed Python & ML orchestration with KubeRay

专用运行时负责处理推理和强化学习循环,而分布式数据准备、嵌入生成和分布式 PyTorch 训练则高度依赖 Ray。While specialized runtimes handle inference and RL loops, distributed data preparation, embedding generation, and distributed PyTorch training depend heavily on Ray.

KubeRay 提供了一个开源、原生 Kubernetes 的 Operator,用于在 Kubernetes 上管理 Ray 集群、作业和服务(RayCluster、RayJob 和 RayService 自定义资源)的完整生命周期。KubeRay provides an open-source, Kubernetes-native operator that manages the complete lifecycle of Ray clusters, jobs, and services (RayCluster, RayJob, and RayService custom resources) on Kubernetes.

apiVersion: ray.io/v1 kind: RayJob metadata: name: gemma-fine-tune-job namespace: ai-workloads labels: kueue.x-k8s.io/queue-name: ml-team-queue spec: shutdownAfterJobFinishes: true ttlSecondsAfterFinished: 60 entrypoint: python fine_tune_gemma.py --model-id google/gemma-2-27b-it runtimeEnvYAML: | pip: - datasets==2.18.0 - transformers==4.40.0 - torch==2.2.0 rayClusterSpec: rayVersion: "2.35.0" headGroupSpec: rayStartParams: dashboard-host: "0.0.0.0" template: spec: containers: - name: ray-head image: rayproject/ray-ml:2.35.0 resources: limits: cpu: "4" memory: "16Gi" requests: cpu: "2" memory: "8Gi" workerGroupSpecs: - groupName: gpu-workers replicas: 4 minReplicas: 1 maxReplicas: 8 rayStartParams: {} template: spec: containers: - name: ray-worker image: rayproject/ray-ml:2.35.0 resources: limits: nvidia.com/gpu: "1" cpu: "8" memory: "32Gi" requests: nvidia.com/gpu: "1" cpu: "4" memory: "16Gi"
apiVersion: ray.io/v1
kind: RayJob
metadata:
  name: gemma-fine-tune-job
  namespace: ai-workloads
  labels:
    kueue.x-k8s.io/queue-name: ml-team-queue
spec:
  shutdownAfterJobFinishes: true
  ttlSecondsAfterFinished: 60
  entrypoint: python fine_tune_gemma.py --model-id google/gemma-2-27b-it
  runtimeEnvYAML: |
    pip:
      - datasets==2.18.0
      - transformers==4.40.0
      - torch==2.2.0
  rayClusterSpec:
    rayVersion: "2.35.0"
    headGroupSpec:
      rayStartParams:
        dashboard-host: "0.0.0.0"
      template:
        spec:
          containers:
            - name: ray-head
              image: rayproject/ray-ml:2.35.0
              resources:
                limits:
                  cpu: "4"
                  memory: "16Gi"
                requests:
                  cpu: "2"
                  memory: "8Gi"
    workerGroupSpecs:
      - groupName: gpu-workers
        replicas: 4
        minReplicas: 1
        maxReplicas: 8
        rayStartParams: {}
        template:
          spec:
            containers:
              - name: ray-worker
                image: rayproject/ray-ml:2.35.0
                resources:
                  limits:
                    nvidia.com/gpu: "1"
                    cpu: "8"
                    memory: "32Gi"
                  requests:
                    nvidia.com/gpu: "1"
                    cpu: "4"
                    memory: "16Gi"

KubeRay 为平台团队带来的价值Why KubeRay matters for platform teams

  • 声明式集群生命周期:平台工程师可以按需启动临时、自我修复的 Ray 集群,用于临时训练任务;也可以运行长期集群来处理批处理流水线。

    Declarative cluster lifecycle: Platform engineers can spin up ephemeral, self-healing Ray clusters on demand for ad-hoc training runs, or run long-lived clusters for batch pipelines.

  • 原生 Kueue 排队与多租户支持:KubeRay 可直接集成 Kueue,实现多租户公平共享、优先级抢占,并管理共享 GPU 和 TPU 容量的配额。

    Native Kueue queueing & multi-tenancy: KubeRay integrates directly with Kueue for multi-tenant fair sharing, priority preemption, and quota management across shared GPU and TPU capacity.

  • 弹性自动扩缩容:KubeRay 根据活跃的 Ray 任务和 actor 的放置情况动态扩缩 worker Pod,避免空闲资源消耗。

    Elastic autoscaling: KubeRay dynamically scales worker pods based on active Ray tasks and actor placement, preventing idle resource consumption.

AI 智能体的强隔离:Agent Substrate 与 gVisorStrong isolation for AI agents: Agent Substrate & gVisor

随着多轮 AI 智能体从对话助手发展为能够生成代码、执行 shell 命令并编排外部 API 的自主系统,在共享集群中运行不可信的模型生成代码会带来严重的安全风险。As multi-turn AI agents advance from conversational assistants to autonomous systems that generate code, execute shell commands, and orchestrate external APIs running untrusted, model-generated code in shared clusters introduces serious security risks.

Google Cloud 正在向 CNCF Sandbox 贡献 Agent Substrate,并继续为 gVisor 提供核心贡献:Google Cloud is contributing Agent Substrate and continuing core contributions to gVisor in the CNCF Sandbox:

  • 内核级沙箱:gVisor 提供一个用户空间内核,用于拦截并虚拟化系统调用,从而帮助确保不受信任的智能体代码无法危害宿主机内核,也无法访问相邻租户的工作负载。

    Kernel-level sandboxing: gVisor provides a user-space kernel that intercepts and virtualizes system calls, which helps ensure that untrusted agent code can't compromise the host kernel or access neighboring tenant workloads.

  • 亚秒级临时执行:沙箱在每个智能体回合中以毫秒级速度启动,为 OpenRL 中的 RL rollout 生成以及生产环境中的实时智能体工作流提供隔离的执行环境。

    Sub-second ephemeral execution: Sandboxes spin up in milliseconds per agent turn, providing isolated execution environments for both RL rollout generation in OpenRL and live production agent workflows.

实践验证:掌握领域推理Proven in practice: Mastering domain reasoning

为了在严格的企业级工作负载下评估这套完整的开源技术栈,我们使用 Harvey.ai 开发的开源法律智能体基准测试(LAB)对 Gemma 4 进行了测试。该基准测试涵盖 24 个复杂的法律实务领域,从并购(M&A)M&A 尽职调查到合同纠纷分析。评估结果如下:To evaluate this complete open-source stack on a rigorous enterprise workload, we tested Gemma 4 against the open-source Legal Agent Benchmark (LAB) developed by Harvey.ai. This benchmark spans 24 complex legal practice areas from mergers and acquisitions (M&A)M&A due diligence to contract dispute analysis. The evaluation produced these results:

  • 基准测试结果:标准 SFT 在多步推理评分标准上的准确率徘徊在 50% 左右,而通过 OpenRL 实施可复现的 RL 循环后,我们将模型准确率提升到了 70%。

    Benchmark results: While standard SFT plateaued around 50% accuracy on multi-step reasoning rubrics, when we applied reproducible RL loops with OpenRL, we lifted model accuracy to 70%.

  • 运营效率:整个训练流水线在 GKE 上与并发运行的 LoRA 和推理任务动态共享 GPU 和 TPU 算力,无需手动管理分区。

    Operational efficiency: The entire training pipeline dynamically shared GPU and TPU capacity with concurrent LoRA and inference jobs on GKE without manual partition management.

团队如何采用这一技术栈How teams are adopting this stack

Organization persona

Core challenge

Architecture with OpenRL + llm-d + KubeRay + Gemma

Enterprise platform teams

Manage multiple internal ML squads without fragmented Slurm/Ray clusters or runaway hardware bills.

Transform existing GKE clusters into self-hosted Reinforcement Learning-as-a-Service (RLaaS) by using DRA, Kueue, and accelerator time-slicing.

Regulated enterprises (finance, healthcare, legal)

Intellectual property (IP), compliance, and privacy mandates prohibit sending proprietary data to third-party public APIs.

Post-train and serve 1B-30B Gemma models completely inside a private Virtual Private Cloud (VPC) with domain-specific reward functions for superior task accuracy and lower total cost of ownership (TCO).

AI-native builders & agent developers

High serving costs and latency bottlenecks on long-context, multi-turn agent interactions.

Deploy llm-d prefix-cache routing that's paired with gVisor-isolated Agent Sandbox execution targets.

Model-as-a-Service & neocloud providers

Deliver high-margin, multi-tenant post-training and inference across diverse hardware fleets.

Expose OpenRL’s multi-tenant APIs and llm-d’s multi-accelerator control plane across mixed GPU and TPU clusters.

在 2026 年北美 KubeCon 大会上与我们交流Connect with us at KubeCon North America 2026

要参加在盐湖城举办的北美 KubeCon 吗?欢迎来现场看看这些开源技术的实际应用:Attending KubeCon NA in Salt Lake City? Come see these open-source technologies in action:

  • 加入 Google Cloud,参加 2026 年北美 KubeCon + CloudNativeCon:

    Join Google Cloud at KubeCon + CloudNativeCon North America 2026:

    • 欢迎到 B 馆 122 号展位来和我们打个招呼。

      Come say hi to us at booth #122 in Hall B.

    • 在我们的 Google Cloud KubeCon North America 2026 活动网站上,了解 Google 员工的演讲。

      Discover Googlers talks on our Google Cloud at KubeCon North America 2026 event site.

  • 参加精选会议和主题演讲:

    Attend featured sessions & keynotes:

    • 坚定拥抱 Kubernetes:定制化如何塑造 OSS AI 生态系统的未来——盐宫 | 1层 | DE厅。

      Kubernetes with Conviction: How Customization is Shaping the OSS AI Ecosystem's Future - Salt Palace | Level 1 | Hall DE.

    • GPU、TPU、NIC 及其他设备支持的最新进展(WG 设备管理)- Salt Palace | 2层 | 250 D-F

      The Latest in GPU, TPU, NIC and Other Device Support (WG Device Management) - Salt Palace | Level 2 | 250 D-F

    • 针对智能体型问题的 Kubernetes 解决方案 - Salt Palace | 1 层 | DE 展厅

      Kubernetes Solutions for Agent-Shaped Problems - Salt Palace | Level 1 | Hall DE

    • Anthropic 如何险些让 GKE 熔毁(以及拯救它的 PR)——盐宫 | 1 层 | H 宴会厅

      How Anthropic Almost Melted GKE (And the PRs That Saved It) - Salt Palace | Level 1 | Ballroom H

    • Gateway API 项目更新:构建流量的未来 - 盐宫 | 2层 | 250 D-F

      Gateway API Project Update: Building the Future of Traffic - Salt Palace | Level 2 | 250 D-F

  • 在 Google Cloud 展位观看现场演示:

    Watch live demos at the Google Cloud booth:

    • 演示 | 在 GKE 上使用 ARM 处理器进行推理(周二下午 1:30–4:30,MST)

      Demo | Inferencing with ARM processors on GKE (Tue 1:30-4:30PM MST)

    • 使用 gVisor 隔离你的智能体工作流(周二下午 4:30–7:30,山地标准时间)

      Sandbox your agent workflows with gVisor (Tue 4:30-7:30PM MST)

    • 使用 OpenShell 安全地运行代理集群(周三上午 10:30 至下午 1:30,山地标准时间)

      Securely running fleets of agents with OpenShell (Wed 10:30-1:30PM MST)

    • 通过 GKE Spot 节点和节点自动配置优化成本(周三 MST 时间中午 12:30 至下午 2:30)

      Cost optimization via GKE spot nodes & node auto-provisioning (Wed 12:30-2:30PM MST)

    • 从推理到行动:利用 GKE Agent Sandbox 和 Axion 构建 Arm 驱动的编码智能体(周四上午 10:30–下午 1:30,MST)

      From Reasoning to Action: Arm-Powered Coding Agents with GKE Agent Sandbox and Axion (Thu 10:30-1:30PM MST)

开始使用Get started

  1. 探索 OpenRL:访问 openrl.dev,并查看 OpenRL GitHub 仓库,了解面向 Kubernetes 的原生强化学习微调方案。

    Explore OpenRL: Visit openrl.dev and check out the OpenRL GitHub repository for Kubernetes-native RL fine-tuning recipes.

  2. 部署 llm-d 1.0:访问 llm-d.ai,测试 Gateway API Inference 扩展,并在集群上部署前缀感知型推理池。

    Deploy llm-d 1.0: Head to llm-d.ai to test Gateway API Inference extensions and deploy prefix-aware inference pools on your clusters.

  3. 运行 KubeRay:按照 KubeRay 文档的说明,与 Kueue 一起管理分布式 Ray 工作负载。

    Run KubeRay: Follow the KubeRay documentation to manage distributed Ray workloads alongside Kueue.

  4. 在 GKE 上部署 Gemma:在 Google Kubernetes Engine 文档中查阅分步指南,了解如何在 TPU 和 GPU 上部署 Gemma 模型。

    Deploy Gemma on GKE: Explore step-by-step guides for deploying Gemma models on TPUs and GPUs in the Google Kubernetes Engine documentation.

值得记下

  1. 各组织正逐渐意识到,长期竞争优势在于领域专业化。
  2. 与加密劫持逐步消耗资源不同,LLMJacking 能在短短几小时内造成云服务费用欺诈的大幅飙升。
  3. Endpoint Picker 会实时评估各工作节点 Pod 上 KV 缓存的驻留情况。在生产部署中,它将 KV 缓存命中率从 35% 提高到 70%,并使多轮智能体工作负载的中位首个 Token 生成时间(TTFT)缩短了 70-85%。
  4. 标准 SFT 在多步推理评分标准上的准确率徘徊在 50% 左右;应用可复现的 OpenRL 强化学习循环后,我们将模型准确率提升到了 70%。
  5. 整个训练流程在 GKE 上动态共享 GPU 和 TPU 容量,并与并发运行的 LoRA 和推理任务协同工作,无需手动管理资源分区。

← 回到本期 · 第 13 条