Strong and weak scaling answer different fixed-work questions
Define the work held constant, normalize against a feasible device-count baseline, and distinguish system throughput from time to a training-quality target.
On this page
The question for today
What you’ll understand
- Calculate strong-scaling speedup and efficiency relative to a multi-device baseline.
- Calculate weak-scaling efficiency while explicitly increasing global work.
- Identify changes in training semantics that require a separate quality comparison.
Doubling device count can mean splitting the same global work more finely or increasing the global work while keeping local work similar. Those are different experiments. A speedup is interpretable only after specifying model, token or sample work, synchronization, and completion boundaries. Large training models may not fit on one device, so a feasible multi-device configuration is often the honest baseline. Scaling efficiency then compares against the increase in devices from that baseline, not an imaginary single-device runtime.
Strong scaling holds the declared global work fixed
For strong scaling, preserve a defined global work unit while increasing resources. In training this can mean the same global effective batch, sequence distribution, model, and valid optimizer update. Local microbatches and accumulation may change to distribute that work, but record those changes because they can alter kernel efficiency and communication timing. Smaller local matrices may use devices less efficiently even when the mathematical work is identical. A global batch reduced along with device time is not a strong-scaling improvement for the original completed work unit.
Choose a feasible baseline with device count D0 and measure completed time for the same W on D devices. The ideal resource-proportional speedup is D/D0. Efficiency divides the measured speedup by that factor. It can occasionally exceed one when memory, cache behavior, or algorithms change favorably, but such an observation needs explanation rather than a universal linear-scaling extrapolation. Preserve hardware topology and placement information; doubling devices within one fast interconnect domain is not necessarily comparable with doubling across another network boundary.
Weak scaling grows work with resources
A weak-scaling experiment increases global work in proportion to device count so a declared per-device work amount remains similar. Ideal completed time stays constant. Specify the work model: holding tokens per device may not preserve arithmetic when sequence lengths, attention shape, routing, or model architecture change. Communication can still grow with participant count or topology. Report the exact global work and observed time instead of calling every fixed-local-batch experiment equivalent regardless of its shapes and synchronization structure.
Increasing global batch changes an optimization trajectory even when one step remains fast. Learning-rate schedules, gradient noise, number of parameter updates per token, and time to a quality threshold can all differ. Weak-scaling efficiency is therefore a system measurement for a defined workload family, not a guarantee that training reaches the same quality sooner. Compare quality and total valid work to a target separately. For model-size scaling, define another explicit family rather than silently combining larger models with a token-based weak-scaling claim.
Explain where scaling stops helping
Measure communication, input readiness, pipeline bubbles, kernel shapes, and rank tails at each scale. A fixed host overhead becomes a larger fraction as useful compute per rank shrinks. Extra ranks can introduce longer collectives or increase the chance of a required slow arrival. Use the dependency path to predict the next limit, then test it rather than fitting one favorable scaling line through two configurations. Include total device-time cost and memory feasibility with wall time; a faster step can consume more resources per valid work unit.
The roofline lab illustrates a bounded resource response rather than device-count scaling. Reset, set both I=8 FLOP/byte and B=50 decimal GB/s, predict 400 GFLOP/s, then Play. Reset and set both I=8 and B=100 for 800. Reset and set both I=8 and B=200 for the fixed 1000 compute cap rather than 1600. The instrument changes a hypothetical memory-bandwidth parameter, not the number of GPUs or work per rank. Use the saturation as a resource-ceiling example; obtain strong and weak scaling from real fixed-work and growing-work experiments.
Work it through
Two eight-device experiments have different meanings
A four-device baseline completes 8192 valid tokens per defined step in 80 ms. First, eight devices complete the same work in 50 ms. Separately, an eight-device weak-scaling run completes 16384 valid tokens in 88 ms. Assume each measurement completes its stated work and uses comparable quality semantics for the system comparison.
For fixed work, speedup is 80/50=1.6 relative to the four-device baseline. Device count doubled, so strong-scaling efficiency is 1.6/2=0.8, or 80%.
Fixed-work throughput changes from 8192/0.080=102400 tokens/s to 8192/0.050=163840 tokens/s. The second value uses the original global work rather than doubling its numerator.
The weak-scaling run doubles global tokens while device count doubles. Its efficiency is 80/88≈90.91%, and throughput is 16384/0.088≈186181.82 tokens/s. This is a different workload from the strong-scaling case.
Both comparisons are useful with their definitions. Neither alone establishes time to the same learned-quality target when the effective global batch or update schedule changes.
The living notebook
Explore the model
Interactive lab · roofline
A resource response can saturate before doubling throughput
Reset, set both I=8 FLOP/byte and B=50 decimal GB/s, predict 400 GFLOP/s, then Play. Separate fresh Reset runs with both I=8,B=100 and I=8,B=200 predict 800 and the fixed 1000 cap. The synthetic formula min(1000,B×I) changes memory bandwidth, not GPU count, per-rank work, batch, or collective topology. It does not measure strong or weak scaling.
- Attainable ceiling
- 640 GFLOP/s
- Ridge intensity
- 12.5 FLOP/byte
- Ceiling regime
- Memory-bound ceiling
Synthetic roofline ceiling min(1000, B·I), in GFLOP/s, with B in decimal GB/s and I in FLOP/byte. Playback traces the roof without changing the selected kernel. This upper-bound model is not a measured throughput prediction, hardware comparison or price model. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forState what work and resources change before interpreting a scaling ratio.
Pause & reason
Check your understanding
Your turn
Try it yourself
A feasible two-device baseline takes 120 ms for fixed work W. Six devices take 50 ms for the same W. Compute speedup, strong-scaling efficiency, and device-time per work unit relative to baseline.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Normalize efficiency by 6/2, then compare device count multiplied by completed duration.
Compare with the solution
Speedup is 120/50=2.4 and efficiency is 2.4/3=0.8, or 80%. Baseline device-time is 2×120=240 device-ms per W; the six-device run uses 6×50=300 device-ms, 25% more. It finishes sooner while using more device-time for that defined work; monetary and energy costs need their own measurements.
Keep the idea
Take it with you
- Strong scaling holds declared global work fixed; weak scaling grows it with resources.
- Use a feasible baseline and normalize efficiency by the actual resource increase.
- System scaling, resource cost, and time to learned quality require separate comparisons.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.