A modern foundation model handles text, images, audio and more, with separate encoders per modality feeding shared layers, and training it on a GPU cluster with tools built for one uniform model leaves GPUs idle because the pieces differ wildly in size and must wait on each other — Spindle breaks a training step into waves, decides how many GPUs each piece of the model deserves from measured scaling curves, packs the pieces into waves so every GPU is busy, places them to keep traffic inside NVLink islands, and trains up to 71 percent faster than Megatron-LM and DeepSpeed on models with up to ten tasks.
The argument in one glance
-
Problem
One model, many unequal parts, and they wait on each other
A multi-task multi-modal model such as ImageBind, OFASys or Qwen-VL has an encoder per modality (text, vision, audio, depth, thermal, motion) and a shared cross-modal module. Each training task activates a different subset. The parts differ in cost by an order of magnitude and in how well they speed up with more GPUs, and the shared layers cannot start until every encoder feeding them has finished. Training systems built for one uniform model see none of this.
-
What people did
Run tasks sequentially on the whole cluster, or split the cluster by task
Megatron-LM and DeepSpeed give the entire cluster to one task at a time. Task-level schedulers such as an Optimus-style allocator hand each task a fixed share of GPUs by marginal gain. DistMM, built for single-task multi-modal models, sizes each encoder within a task and runs tasks one after another.
-
Why it fell short
Whole-cluster execution starves light parts; task-level splits ignore the parts inside a task
Parallelizing a small audio encoder across 16 GPUs leaves its kernels nearly idle; the paper measures the resulting utilization swinging between tasks and within tasks over a step. Task-level allocation fixes only the between-task half, and as light tasks finish early their GPUs sit idle for the rest of the step. DistMM fixes only the within-task half and still serializes tasks. None reaches a global plan.
-
This paper's idea
Contract the graph, fit scaling curves, solve allocation per level, pack into waves, place for locality
Spindle contracts runs of identical operators into MetaOps and groups them by dependency depth into MetaLevels. It profiles each MetaOp for five minutes and fits a piecewise curve of execution time against GPU count. For each MetaLevel it solves a malleable project scheduling problem whose continuous optimum has every MetaOp start and finish together, found by bisection, then rounds each allocation to two valid integer GPU counts. A wavefront scheduler greedily packs slices of MetaOps into waves that fill all GPUs with aligned durations. A placement step keeps heavy data flows inside NVLink islands and balances memory. On an A800 cluster, Spindle trains Multitask-CLIP, OFASys and a 9.25-billion-parameter Qwen-VAL up to 71 percent faster than Megatron-LM and DeepSpeed, within 7 percent of the theoretical optimum, with plans computed in under three seconds.
Why this problem is worth solving
Meta’s Llama 3 is a multi-modal model with over 400 billion parameters trained on more than 48,000 GPUs. At that scale, every percent of idle GPU time is a large sum of money. The paper’s opening measurement shows how much idleness the model structure itself creates. Figure 1 traces GPU utilization while four tasks of a multi-modal model run one after another on a cluster: throughput swings from over 100 TFLOP/s to near zero within each task, because a task’s vision encoder is heavy and its text encoder is light, and swings again between tasks, because a motion task and a text task have nothing like the same cost.
The cause is workload heterogeneity
Differences in computational cost and in how well cost falls with more GPUs, both between tasks and between the operators inside one task. execution dependency
The requirement that an operator cannot start until every operator whose output it consumes has finished.
What people did before, and where it broke
- Megatron-LM and DeepSpeed. Mature 3D-parallel training for a single model. Applied to a multi-task model, they run each task’s sub-model across the whole cluster in sequence. Where it broke. Light operators are spread over all devices. The paper’s example: DeepSpeed runs a small audio operator on 16 GPUs and leaves the kernels underused, where four would do.
- Task-level allocation (Spindle-Optimus). Adapt Optimus’s marginal-gain rule to give each task a share of GPUs. Where it broke. It sees tasks, not the operators inside them, so a task’s heavy and light parts get the same share, and when short tasks finish their GPUs idle for the rest of the step. Up to 44 percent faster than DeepSpeed, but well short of the optimum.
- DistMM extended to multi-task (DistMM-MT). Allocate resources to the encoders within one task, then run tasks sequentially. Where it broke. Single-task by design; on OFASys, whose text adaptor is light, its intra-task parallelization gains almost nothing, and it never optimizes across tasks. Up to 20 percent faster than the SOTA systems.
- Automatic parallelizers: Alpa, Unity, Galvatron. Search for hybrid parallel plans. Where it broke. They assume a spatial pipeline over a homogeneous model, with every operator of a stage on the same devices.
- Cluster schedulers: Optimus, Pollux, Gandiva. Allocate GPUs across independent jobs by scalability. Where it broke. Jobs are independent; the components of one model are not, and they need operator-level, not job-level, decisions.
- The gap. Nothing jointly decided per-operator parallelism and dependency-respecting schedule for a heterogeneous model on a shared cluster.
Where Spindle sits
The execution planner, run once per workload, and the runtime
-
Graph contraction new
Fuse chains of identical operators into MetaOps; assign each a MetaLevel by breadth-first depth so operators at one level are independent.
-
Scalability estimator new
Profile a few GPU counts per MetaOp and fit a piecewise alpha-beta curve of time against GPUs; about five minutes.
-
Resource allocator new
Per MetaLevel, solve the continuous malleable scheduling problem by bisection, then discretize each allocation into two valid integer GPU counts.
-
Wavefront scheduler new
Greedily pack MetaOp slices into waves that use all devices with equal duration; concatenate levels.
-
Device placement new
Map waves to GPUs preferring NVLink islands for heavy flows and balancing memory, with backtracking on out-of-memory.
-
Runtime engine new
Instantiate MetaOps per device, insert send/receive between waves, build parameter device groups, and train wave by wave.
The idea
The optimization problem. Spindle treats all tasks as one directed acyclic computation graph. Each operator must be given an allocation of n GPUs and a start time s, minimizing the latest completion time, subject to never exceeding N GPUs at any instant and never starting an operator before its predecessors finish. Solving this directly over thousands of operators is hopeless, so Spindle simplifies in three moves.
Contract and level. Consecutive operators with a single edge between them and the same type and input size are the same workload, so they are fused into a MetaOp
A run of consecutive identical operators (for example, twelve stacked Transformer layers on the same input shape) treated as one schedulable unit with one scaling curve. MetaLevel
The dependency depth of a MetaOp; MetaOps at the same level have no data flow between them and can be scheduled without ordering constraints.
Measure how each MetaOp scales. The standard alpha-beta communication model does not fit these workloads, because different kernels get invoked as the per-GPU slice changes. Spindle profiles a handful of GPU counts per MetaOp and fits a piecewise function whose coefficients change between ranges. Figure 4 shows why this matters: a vision MetaOp speeds up almost linearly with GPUs while a text MetaOp barely speeds up at all, so giving them equal shares is wrong in both directions.
Allocate by solving a relaxed problem exactly. Within one level, if GPUs and operators were continuously divisible, the problem is malleable project scheduling
A scheduling problem in which each job's duration depends on how much of a divisible resource it receives, and the resource is shared among jobs running concurrently.
Pack into waves. Discretization breaks the everyone-finishes-together property, so a wave
The smallest scheduling unit: a set of MetaOp slices that run concurrently on disjoint, fixed groups of devices for one aligned time span, with data exchanged only at wave boundaries.
Place for locality and memory. A device island
A set of GPUs joined by high-bandwidth links such as NVLink, typically the eight GPUs in one node.
Run it. Each device instantiates its MetaOps, transmission operators (copy, shard, concat, send, receive) are inserted at wave boundaries for activations and gradients, and every shared parameter is assigned a device group over which its gradient is synchronized after the backward pass. Training proceeds forward wave by wave, then backward wave by wave, then group-wise synchronization.
Tracing the planner on the paper’s three-MetaOp example
Four GPUs, three MetaOps in one MetaLevel (Figure 5a)
MetaOp 1 has 8 operators, MetaOp 2 has 12, MetaOp 3 has 6. Allocations are written as (GPUs, operators). C* is the relaxed optimum. Numbers follow the paper's figure; scaling curves are illustrative.
Step 1 of 6
Fit scaling curves
Profiling gives each MetaOp a curve T(n). Suppose MetaOp 1 scales well, MetaOp 2 moderately, and MetaOp 3 is cheap and scales poorly. These curves, not raw sizes, decide the allocation.
T1(n), T2(n), T3(n) from ~5 minutes of profiling | piecewise alpha-beta fit
Why it works
- Operator granularity exposes the real heterogeneity. Because allocation is decided per MetaOp from its own scaling curve, a light audio encoder gets four GPUs while a heavy vision encoder gets many, whereas task-level schemes give both the same share. The case study shows every device and every MetaOp near full utilization.
- Levels turn one hard problem into several easy ones. Removing dependencies inside a level makes the relaxed problem a classical one with a closed-form optimality condition, so bisection finds the optimum instead of a heuristic guess.
- Bi-point discretization preserves the optimum. Splitting each fractional allocation into two integer tuples with the same total time keeps the relaxed solution’s value; only rounding operator counts adds error, measured at under 7 percent.
- Waves convert a schedule into something a runtime can execute. Fixed device groups and boundary-only communication mean no dynamic migration, and aligning spans removes the idle tails that discretization would otherwise create.
- Placement keeps the extra communication small. Inter-wave send and receive is Spindle’s added cost. With island-aware placement it stays under 6 percent of step time; with naive sequential placement it reaches 27 percent.
- Planning is cheap enough to redo. Under three seconds per plan, so when tasks join or leave, Spindle replans and keeps its advantage on dynamic workloads.
What it costs
- Profiling and a model of the workload. Five minutes of profiling per model, and a fitted curve whose accuracy bounds the plan’s quality. Kernels that change behaviour at untested scales will be mispredicted.
- Inter-wave communication. Activations and gradients cross wave boundaries between device groups; the paper keeps this to 6 percent but it is not zero, and it depends on the cluster’s island structure.
- Rounding losses. Integer operator counts and resource extension in waves push the plan up to 7 percent above the relaxed optimum.
- Parameter synchronization across groups. Shared parameters live on several device groups and are all-reduced after each step; 5 to 15 percent of step time in the breakdown.
- Heuristic placement. Device placement is a constrained-depth recursive search with heuristics and backtracking, not an optimal solver; its time varies with the model.
- Scope. Evaluated on models up to 9.25 billion parameters on 64 GPUs; 30-billion and 70-billion results on 256 GPUs are simulated, not measured. The baselines were tuned by hand because they cannot plan automatically for these models.
The evaluation
An 8-node cluster, each node with eight NVIDIA A800 80 GB GPUs on NVLink, nodes linked by 400 Gbps InfiniBand. Three models: Multitask-CLIP (1.20 billion parameters, 6 modalities, up to 10 contrastive tasks, ImageBind structure), OFASys (0.66 billion, 6 modalities, up to 7 tasks, encoder-decoder LM), and Qwen-VAL (9.25 billion, 3 modalities, 3 tasks, decoder-only LLM). Baselines Megatron-LM and DeepSpeed, hand-tuned per workload, plus Spindle-Optimus and DistMM-MT. Average of 100 iterations.
Iteration-time speedup over DeepSpeed, and where it comes from
| Property | Megatron-LM / DeepSpeed | Spindle-Optimus (task-level) | DistMM-MT (intra-task) | Spindle |
|---|---|---|---|---|
| Best speedup, all workloads | 1.0 | |||
| Multitask-CLIP, 8 / 16 / 32 GPUs | 1.0 | — | — | |
| Scaling 16 to 32 GPUs, 4-task Multitask-CLIP | — | — | ||
| Qwen-VAL 9.25B, 32 / 64 GPUs | 1.0 | — | — | |
| Gap to theoretical optimum | — | — | — | |
| Inter-wave send/receive overhead | none | — | — | |
| Planning time | manual tuning | — | — |
Check yourself
Check your understanding
1. Why does giving an entire cluster to one task at a time, as Megatron-LM and DeepSpeed do, waste GPUs on multi-task multi-modal models?
2. What property does the relaxed allocation problem have that makes it solvable by bisection?
3. Predict what happens if Spindle skipped the wavefront scheduler and simply started every discretized allocation tuple at time zero.
4. Why is device placement a separate step, and what does ignoring it cost?
5. Which result most directly supports the claim that Spindle's advantage grows with model complexity?
Sources
The paper is “Spindle: Efficient Distributed Training of Multi-Task Large Models via Wavefront Scheduling” by Yujie Wang, Shenhan Zhu, Fangcheng Fu, Xupeng Miao, Jie Zhang, Juan Zhu, Fan Hong, Yong Li and Bin Cui, Peking University, Purdue University and Alibaba Group, published at ASPLOS 2025, Volume 2, DOI 10.1145/3676641.3715992. This explainer was written from the full text of the arXiv preprint (2409.03365, version 3, February 2025), including its appendix. Numbers are taken from Figures 1, 4, 5 and 8 to 16 and Tables 1 and 2.