RayOrch:为基座模型数据准备编程并执行谱系控制的多粒度数据流

·

研究论文 · 2026/09/28

为基座模型准备高质量训练数据,需要可扩展的流水线,将异构文档和视频转换为结构化记录。这类流水线会把每个父项扩展为有序且依赖输入的若干子项,子项数量可能呈长尾分布。GPU 应当跨父项批处理子项,同时保留父子关系、子项顺序、完成状态和结果路由。现有系统要么把并行性隐藏在粗粒度作业之后,要么暴露扁平记录,迫使应用自行管理血缘与重新分组。我们提出 RayOrch,一种编程模型和分布式执行引擎,在整个执行过程中保留父子关系。程序声明有序的可变基数扩展及与之匹配的 gather。编译器验证每一对声明,运行时记录子项成员关系、直接父项、不可变序号和终止状态。按调用 FIFO 的就绪队列跨父项批处理就绪子项。Gather 依据声明的成员关系和序号重建结果,而非依据批次边界或完成顺序。父项一旦所有必需子项进入终止状态即可推进。带类型的父项作用域失败会抑制失败父项尚未调度的兄弟项,同时允许无关父项继续执行。在 NVIDIA H20 GPU 上,RayOrch 将 MinerU 从 4 块 GPU 扩展到 64 块 GPU 时取得 15.14 倍加速,将视频流水线从 8 块 GPU 扩展到 64 块 GPU 时取得 7.82 倍加速。在 MinerU 上,其端到端时间相比 Ray Data 减少 13.1%,相比 Daft 减少 29.0%;在 Docling 上相比 Ray Data 减少 16.0%。代码见 https://github.com/OpenDCAI/RayOrch 。

该工作针对基座模型数据准备中父子血缘、子项顺序与长尾基数难以兼顾的问题,给出了可编程且可验证的执行模型,并在真实 GPU 集群上展示了显著加速与端到端时间下降,对构建大规模数据流水线具有直接参考价值。

Preparing high quality training data for foundation models requires scalable pipelines that transform heterogeneous documents and videos into structured records. Such pipelines expand each parent item into an ordered and input dependent sequence of children, whose counts may be long tailed. GPUs should batch children across parents while preserving parent relationships, child order, completion status, and result routing. Existing systems either hide parallelism behind coarse grained jobs or expose flat records that force applications to manage lineage and regrouping. We present RayOrch, a programming model and distributed execution engine that preserves parent child relations throughout execution. Programs declare ordered variable cardinality expansions and matching gathers. The compiler validates each pair, while the runtime records child membership, immediate parents, immutable ordinals, and terminal states. Per Call FIFO Ready Queues batch ready children across parents. Gathers reconstruct results from declared membership and ordinals rather than batch boundaries or completion order. Parents can advance as soon as all required children become terminal. Typed parent scoped failures suppress undispatched siblings of the failed parent while allowing unrelated parents to continue. On NVIDIA H20 GPUs, RayOrch achieves 15.14 times speedup when scaling MinerU from 4 to 64 GPUs and 7.82 times speedup when scaling a video pipeline from 8 to 64 GPUs. It reduces end to end time by 13.1 percent versus Ray Data and 29.0 percent versus Daft on MinerU, and by 16.0 percent versus Ray Data on Docling. Code available at https://github.com/OpenDCAI/RayOrch .

阅读原文

参与讨论