October 23, 2026 /Training
Bubbles? Pipeline Parallelism on Four MacBook Pros
Pipeline parallelism has been our north star.
At WWDC 2026, Apple shared a training video. Apple used data parallelism to LoRA fine-tune Qwen3.5-9B on four M3 Ultra machines. So we did it too. Same job. Same recipe. Same WikiSQL training steps.
TL;DR: Apple did about 600 tokens/s. NukeTorch did 5,358.5 tokens/s.
How it works
There are two parts: speed and pipeline.
First, the speed.
Unfolding
A tensor’s values are fixed. How they are stored and read is a choice. Unfolding is changing that choice.
Memory is one line. Several values share one machine word, and a kernel takes a handful of values at a time. If its handful is spread over many words, it fetches many words to use a few values. If a word holds c values and the kernel makes m draws, the words it must fetch, Φ, obey:
m ≤ Φ ≤ c·m
Unfolding moves the store to the low end, Φ = m. A real case: a public four-bit model packs eight neighbouring codes into each 32-bit word, but each lane of our decode kernel takes every 32nd code. Unfolded, the eight codes a lane needs share one word, and word fetches fall from 256 to 32 per block.
On one matrix, a test kernel that reads the file as it is ran 4.9× faster than our engine’s loop: 516 GB per second, 94% of the 546 GB per second that Apple states for the chip.
The detail is in our paper, Unfolding Tensors: Storage Order and Fetch Cost of Four-Bit Weights.
Shaping neural simulation
A matrix product in it has three axes: rows M, output width N, and reduction length K, the number of products summed into each output value.
We expected the size of a program to set its speed. It did not. The rate was set by one axis, the length of the sum K. Past a knee, doubling K halves the rate. So we cut one long sum into P shorter ones and add the partial sums.
On that layer pair, shaping raised the rate 3.12 to 3.46×, while cutting by output channels left it at 0.99 to 1.00×. With the same change, Whisper large-v3-turbo transcription took 21.5% and 21.9% less time on an M4 Max and an M5 Max.
The full detail is in Input-Dimension Shaping for Matrix Products on Apple Silicon.
Pipeline parallelism
We named ours the Choo-Choo Relay Train. Like a train, it connects machines in a line, with a single Thunderbolt cable between them. You can see our setup in the video on our X.
The usual way to use four machines is data parallel: every machine holds the whole model. Apple’s WWDC26 run was data parallel. In a pipeline, each machine holds only its assigned layers, and together they work as one distributed machine.
- It keeps the speed. Four Macs ran at 93% of four single Macs.
- It uses a fraction of the memory. Spread a model over N machines, and each needs 1/N of the RAM for the weights that data parallelism needs.
- It does not require an optical interconnect. Each Mac connects to the next with a single Thunderbolt cable.
its own layers
its own layers
its own layers
its own layers and the loss
Bubbles
A pipeline is an assembly line. One worker waits for the job from another. It was used forever. Computers adopted it in the 1960s.
GPipe (2018) used it to train a large model across many accelerators. It also named the idle time between stages the bubble with a formula that was widely accepted. Drain and refill the pipeline every step, and use micro-batches to shrink the bubble.
We agreed with the micro-batches, but asked: why drain and refill every step?
NukeTorch pipelines one model across many machines without draining and refilling. With our own model, the machines spent up to 97.4% of their time computing. For Qwen 9B LoRA fine-tuning on four Macs, we followed the exact recipe Apple showed at WWDC26 and completed at 93% efficiency.
We pipelined two Macs on a trainer model and split the layers across them:
At 4 micro-batches, Mac B was busy only 74.6% of the time. Mac B finished its layers first and had to wait for the next batch from Mac A.
That taught us what matters in Pipeline Parallelism. Execution is deterministic, but a machine cannot compute what hasn’t arrived. Our solution: we assigned the layers to machines by the measured compute each layer requires, and used more micro-batches to keep work in flight.
At 32, Mac B stayed busy 97.4% of the time, and the two Macs trained with gradients byte-identical to one Mac.
For Qwen 9B LoRA fine-tuning, we used 4 micro-batches per step (bigger batches than what was used in the study above). On average, our four Macs ran at 93% of four single Macs.
Nothing bubbled up. GPipe’s bubble was idle time beyond its control. We had every control. We gave the machines the micro-batches to stay 94% busy, and they did. When given the micro-batches to stay 97.4% busy, they did exactly that. That is planning and execution, not a limit of pipeline parallelism. On Qwen 9B, our four Macs ran at about 93% of four single Macs consistently, bubble free. Watch our screen recording of the run below.
Results
| NukeTorch | Apple, WWDC26 | |
|---|---|---|
| One machine | 1,440.8 tokens/s One MacBook Pro M5 Max, 48 GB | ~180 tokens/s One M3 Ultra Mac Studio |
| Four machines | 5,358.5 tokens/s Four MacBook Pro M5 Max, 48 GB each | ~600 tokens/s Four M3 Ultra Mac Studios |
| Method on four machines | Pipeline parallel | Data parallel |
| 1,000 steps on four machines | Under 5 minutes | About 40½ minutes at that speed |
* Apple’s figures are the ones spoken in its session. The details are in our one-Mac report and our four-Mac report.
We used different machines. Our Macs were M5 Max with a 40-core GPU and 48 GB each. Apple used Mac Studio M3 Ultra with an 80-core GPU and 512 GB each.
Our four MacBook Pros trained at 5,358.5 tokens/s. Apple’s four Mac Studios trained at about 600 tokens/s. On the same 1,000 WikiSQL steps, we finished in under 5 minutes. Apple’s Macs would take about 40½ minutes.
One MacBook Pro M5 Max trained at 1,440.8 tokens/s. Apple’s figure for one M3 Ultra Mac Studio is about 180 tokens/s.
Our vision
Any organization can have a private AI data center without special power, cooling or interconnects. Host a large model and keep all critical data onsite or in a private cloud.
An AI data center is not required to install a million optical interconnect cables and 50,000 high-speed switches.
Training and inference take fewer resources. Each machine needs only enough RAM for its layers of the model.
NEXT: More Machines
Next, a public demo of 16 to 24 machines pipelined by NukeTorch. Then, 48 to 100 machines.