RAY_RESOURCES='{' if [[ -n "$CLUSTER_UUID" ]]; then RAY_RESOURCES+="\"nvlink_domain_${CLUSTER_UUID}\": 1" [[ -n "$TOPO_RANK" ]] && RAY_RESOURCES+=", " fi if [[ -n "$TOPO_RANK" ]]; then RAY_RESOURCES+="\"topo_rank\": $TOPO_RANK" fi RAY_RESOURCES+='}'
# Per-logical-node extra Ray resource requirements. # Each dict is merged into every bundle spec for that node, # pinning it to a physical domain. # Example: [{"nvlink_domain_<uuid>": 0.001}] * 16 # pins 16 nodes to a single NVLink domain.
创建 placement group bundle 时:
1 2 3 4 5
def_make_bundle(node_idx: int) -> dict: bundle = {"CPU": num_cpus_per_bundle, "GPU": num_gpus_per_bundle} if self.node_resource_constraints and self.node_resource_constraints[node_idx]: bundle.update(self.node_resource_constraints[node_idx]) return bundle
这时 nvlink_domain_* 不只是“排序信息”,而是可以进入 Ray placement group 的 resource request,变成调度约束:
这个差异也解释了为什么 main 的 infra 注释里已经写着“Registers nvlink_domain_<UUID> and topo_rank so virtual_cluster.py can do segment-aware rank assignment”,但实际 main 代码里搜不到消费路径:看起来 Python 侧实现还停在特性分支/PR 上,没有合入主线。
这个 checkpoint 优化有两层含义。第一层是减少训练停顿:把参数拷到 CPU 后后台落盘,让 GPU 训练尽快继续。第二层是把 checkpoint 的分布式协议开销从 hot path 移出去:finalization、save plan 计算、worker 进程创建都不能每次阻塞训练主循环。
因此,如果“并行策略”只指 tp_size、pp_size、dp_size,它还不能唯一决定 global rank id。如果框架同时确定了 rank layout,并且 launcher / rendezvous 已经给进程分配 global rank,具体 rank id group 就是确定的。
YOLO 是 Microsoft AI 自研的大规模训练框架,基于 PyTorch,覆盖 pre-training、mid-training、SFT 和 RL training。它实现了 model definition、sharding、optimizer、dataloader、checkpointing 等核心训练循环。
Appendix K 里有一句关键描述:每个 site 会被切分成多个 Kubernetes clusters,通常是一栋 datacenter building 对应一个 Kubernetes cluster。
可以理解为:
1 2 3 4
physical site / datacenter campus datacenter building A -> Kubernetes cluster A datacenter building B -> Kubernetes cluster B datacenter building C -> Kubernetes cluster C
这种切分不是说一个训练任务只能在一栋楼里运行,而是把物理基础设施按 building 边界组织成多个 Kubernetes 管理单元。报告同时提到 large jobs 在需要时可以跨越单个 Kubernetes cluster 的边界:nodes are universally routable across the compute environment,workload pods use host networking,以减少 overlay network overhead。
这里的几个层次可以分开看:
层次
含义
site
一个物理数据中心站点或数据中心园区
datacenter building
site 内的一栋数据中心楼,通常有自己的电力、冷却、网络和 rack 布局
Kubernetes cluster
软件层面的资源管理单元,通常按 building 切分
logical cluster
面向训练和调度暴露的逻辑资源池,包含 GPU nodes 和 CPU support nodes
fleet-wide view
跨 cluster / scheduler backend 的统一可见性和运维视图
报告称主训练放在一个 single logical cluster、one site 上,目标是降低实验方差:同一代 accelerator、稳定 rack health、稳定 scheduler 行为、可预测 storage path。这里的 logical cluster 不应直接等同于单个 Kubernetes cluster;Appendix K 同时说明一个 site 通常会按 datacenter building 切分为多个 Kubernetes clusters。因此,8K GB200 是否全部位于同一个 Kubernetes cluster 内,报告没有明确披露。
Ray 是 admitted job 内部的 distributed runtime。这里的 admitted job 指已经通过集群准入 / 调度流程,并获得相应计算资源的训练作业。Kueue 完成 admission 和 placement 后,MAI drivers 会把得到的 topology 转成 Ray actor placement、communication groups 和 NCCL clique configuration。
不同类型任务的 actor 需求不同:
pre-training jobs 主要要求 strict learner availability;
RL jobs 会包含 learners、inference servers、rollout workers、routers 等多种 actor;
MAI drivers 负责监控 actor liveness、协调训练循环,并维护异步组件之间的 checkpoint consistency。
这部分和 RL training 尤其相关。RL 不是单一同步训练循环,而是 learner、推理服务、rollout、reward / grader 等多类组件共同工作。报告把 Ray 放在 admitted jobs 内部;按该描述,Ray 的作用范围主要在作业内,用于 actor 编排和运行时管理,集群级排队、准入和资源分配仍由 Kubernetes、Kueue 以及 MAI control plane 等组件承担。
sequenceDiagram
participant T as Task Queue
participant A as Agent Runner
participant E as Tool / Env Servers
participant G as Gateway Server
participant R as Rollout Engine
participant D as Data Pool
participant Tr as Train Engine
T->>A: task / env spec
loop agent rollout
A->>G: completion request<br/>state + tools + metadata
G->>R: normalized request<br/>model version attached
R-->>G: completion<br/>tokens + logprobs
G-->>A: action / tool call
A->>E: execute tool call
E-->>A: observation / artifact
A->>D: state / action / observation
E->>D: verification / reward signal
R->>D: model version / logprobs
end
D->>D: Windowed FIFO<br/>filtering / batching
D->>Tr: training batch
Tr->>Tr: prefix tree merging<br/>CISPO update
Tr-->>R: updated weights
图里的关键边界是 Gateway:Agent Side 可以保持 scaffold 差异,Training / Inference Side 则通过统一的 completion 接口接收请求、记录元数据,并把 rollout 数据回流到 Data Pool。
Prefix tree merging 可以单独画成下面这个形态:
flowchart LR
b1["before: ctx + a"]
b2["before: ctx + b"]
b3["before: ctx + c"]
ctx["after: shared ctx"]
a["branch a"]
b["branch b"]
c["branch c"]
b1 -. same prefix .-> ctx
b2 -. same prefix .-> ctx
b3 -. same prefix .-> ctx
ctx --> a
ctx --> b
ctx --> c
low-activation MoE backbone -> long-context full attention -> MTP for training signal and speculative decoding -> verifiable agent trajectory data -> interleaved thinking SFT -> Forge agent-native RL -> rollout / training / serving co-optimization