RayOrch: Programming and Executing Lineage-Controlled Multi-Grain Dataflows for Foundation-Model Data Preparation
Xiaochen Ma, Zimo Meng, Junzhu Liang, Youhe Jiang, Yue Cheng, Hao Liang, Bohan Zeng, Dengchun Li and 8 others
Peking University · HKUST · University of Cambridge · Tencent Hunyuan · Zhongguancun Academy
Published September 16, 2026 · on the feed September 28, 2026 · ▲ 54 · arXiv 2609.18703
The abstract
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 .
The Brief
2:56A short podcast summary of the paper. Written and voiced by AI.
Transcript
RayOrch. Programming and Executing Lineage-Controlled Multi-Grain Dataflows for Foundation-Model Data Preparation. By Xiaochen Ma and fifteen others, from Peking University, the Hong Kong University of Science and Technology, and three other institutions. Published on the sixteenth of September. Its code repository is worked out: about one hundred and twenty source files, with a readme and a licence.
Training data for foundation models is prepared by pipelines that turn heterogeneous documents and videos into structured records. These pipelines have a characteristic shape. Each parent item expands into an ordered sequence of children, and how many children depends on the input, with counts that can be long tailed. For the GPUs to be used well, children from many different parents should be batched together. Yet the system still has to preserve which parent each child belongs to, the order of the children, whether each one has finished, and where each result should be routed.
Existing systems take one of two unsatisfying positions. Some hide the parallelism behind coarse grained jobs, so the pieces inside a document or video never run side by side. Others expose flat records, which forces the application itself to manage lineage and to regroup results afterwards.
RayOrch is a programming model together with a distributed execution engine, and its organising commitment is that parent child relations are preserved throughout execution. The structure of the data is declared once and then honoured by the system everywhere, rather than rebuilt by the application.
A program declares ordered expansions of variable cardinality, and gathers that match them. The compiler validates each expansion and gather pair. At runtime, RayOrch records child membership, each child's immediate parent, an immutable ordinal, and terminal states. Per Call FIFO Ready Queues batch ready children across parents. When results come back, gathers reconstruct them from the declared membership and the ordinals, not from batch boundaries and not from the order in which things happened to finish.
Two consequences follow. A parent can advance as soon as all of its required children have become terminal, without waiting for anyone else. And failure is scoped. Typed failures belong to a parent, so when one parent fails, its undispatched siblings are suppressed while unrelated parents carry on.
The measurements are on NVIDIA H20 GPUs. Scaling MinerU from four to sixty-four GPUs, RayOrch achieves a fifteen point one four times speedup. Scaling a video pipeline from eight to sixty-four GPUs, it achieves seven point eight two times. Against other engines, it cuts end to end time on MinerU by thirteen point one percent versus Ray Data, and by twenty-nine percent versus Daft. On Docling it cuts end to end time by sixteen percent versus Ray Data.
The design choice underneath all of this is to make lineage something the engine knows rather than something the application reconstructs. Batching across parents is what keeps the GPUs busy, and the recorded membership and ordinals are what let those results find their way home in the right order.
Paper Quest · 7 chapters · about 41 min
Play this paper
Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.
Chapter 1 🧩 · The problem
Full GPUs and tidy bookkeeping seem to want opposite things.
You prepare training data at scale: each document or video splits into a long-tailed number of pages or clips that a GPU model must process.
The road ahead
- 1 · The problem ~7 min Batching small pieces from many documents keeps GPUs busy, but then you must still know where each piece belongs and when each document is done.
- 2 · What came before ~3 min
- 3 · The key idea ~9 min Let the runtime itself record each child's parent, fixed position and finished state, so batches can mix parents and results still rebuild correctly.
- 4 · Choose your own research ~3 min
- 5 · Build the method ~8 min Declare the splits and regroups, check them at compile time, record lineage at runtime, batch ready children in FIFO queues, then rebuild from records.
- 6 · The experiment ~6 min You’ll guess: Scaling the MinerU document pipeline from 4 to 64 NVIDIA H20 GPUs, what speedup did RayOrch achieve?
- 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Free, with Google or an email address. Your stars and progress are kept.