TL;DR
Configuring a massive AI training run across hundreds of GPUs currently feels like playing a multi-million-dollar game of Minesweeper: tweak a knob, wait in the cluster queue, hit an out-of-memory crash, and repeat. The authors introduce Primus Projection and the Primus Tuning Agent, a hybrid system that predicts massive multi-node performance using tiny single-node microbenchmarks, then uses an LLM agent to hunt down optimal training configurations in minutes rather than days.
What Problem Does This Paper Address?
Training a 100B+ parameter Large Language Model (LLM) requires choreographing a dizzying number of choices simultaneously: how to slice matrices across GPUs (tensor parallelism), how to stagger layers assembly-line style (pipeline parallelism), how to distribute specialized sub-networks in Mixture-of-Experts (MoE) models, plus batch sizes, precision (FP8 vs. BF16), and activation recomputation.
This creates tens of thousands of valid combinations where the margin for error is razor-thin—miscounting activation memory by just four bytes per element across dozens of layers can flip a high-speed run into an instant out-of-memory (OOM) crash. Purely mathematical ("roofline") models fail here because real GPUs throttle their clocks under sustained load and software libraries behave unpredictably. Full-system simulators are accurate, but require traces from the target cluster itself. Teams are stuck burning expensive multi-node GPU hours on brute-force trial and error.
Methods
The authors live by a pragmatic motto: measure what you can, simulate what you can’t. Their framework couples two components:
- Primus Projection (The Oracle): Instead of renting 1,024 GPUs to see how fast a config runs, the engine uses a downscale $\rightarrow$ measure $\rightarrow$ upscale workflow on as few as 1 to 8 GPUs.
- Downscale: It shrinks parallelism dimensions in a strict fidelity order. Pipeline Parallelism (PP) drops to 1 first because pipeline bubbles follow deterministic math; Expert Parallelism (EP) shrinks next while keeping the experts-per-GPU constant so compute kernels stay identical; Tensor Parallelism (TP) shrinks last.
- Measure: It runs actual compute kernels and intra-node communication for just one representative layer per layer type on real hardware, automatically capturing clock throttling and software-stack quirks. (A pure CPU simulation mode also exists for pre-silicon planning.)
- Upscale: Analytical models restore inter-node communication collectives, pipeline schedules, and memory sharding at the full target scale.
- Primus Tuning Agent (The Searcher): Treating the projection engine as a fast scoring oracle, search happens in two phases. First, a deterministic seed planner sweeps individual knobs one at a time to map out baselines. Next, an LLM investigation loop (built in DSPy using ReAct-style reasoning) reads the ledger of trials and proposes clever cross-axis combinations. Crucially, an analytical memory pre-filter instantly rejects OOM-doomed configs before touching a single GPU.
Datasets
Because this paper measures hardware throughput (tokens/second/GPU) and memory consumption rather than model accuracy or loss convergence, traditional text datasets are not discussed in the paper (for MoE benchmarking, synthetic forced-balanced routing is used alongside validation against a natively trained model's routing statistics). Instead, the system is evaluated across production LLM architectures—dense Llama 3.1 (8B, 70B), Llama 2 (7B), and sparse MoE models including Mixtral 8$\times$22B, Qwen3-235B-A22B, GPT-OSS-120B, and DeepSeek V3 671B—running on AMD Instinct MI300X, MI325X, and MI355X GPUs.
Key Insights and Ideas
- Rank preservation matters more than zero error: Isolated microbenchmarks naturally carry a small calibration offset (~10%) compared to sustained cluster runs. Surprisingly, Mixtral had an optimistic offset while Qwen3 had a pessimistic one—yet both achieved a perfect 1.000 Spearman rank correlation. As long as the oracle orders candidates A > B > C accurately, the agent picks the true winner with 0% regret.
- Activations—not weights—are the silent MoE killer: On Mixtral 8$\times$22B without recomputation, in-flight activation memory hits 198 GB per GPU—more than double the parameters and optimizer states combined (79 GB). That explains why the analytical memory pre-filter is such a massive time-saver.
- LLMs bridge isolated search axes: Simple grid or single-axis sweeps get stuck in local optima because knobs interact nonlinearly (e.g., shrinking micro-batch size frees up memory to turn off recomputation while switching MoE communication backends). The LLM agent spotted this exact three-way synergy on its very first proposal.
Key Results
- High Fidelity Across Scales: Sub-node benchmarks (1 to 8 GPUs) projected 32- and 64-GPU throughput within ~10% of measured hardware across all 16 dense and MoE test cells. At massive production scale, projections landed within 4.7% error on DeepSeek V3 671B (1,024 GPUs) and 1.9% on Qwen3-235B (256 GPUs).
- Automated Speedups in Minutes: On a 4-node Mixtral 8$\times$22B task, the Tuning Agent discovered an FP8/DeepEP recipe delivering +27% measured throughput (4,402 vs. 3,475 tok/s/GPU) over the published AMD BF16 reference—completed in under 30 minutes on a single node, with the pre-filter catching 7 OOM configs at zero GPU cost.
- Beating Analytical Baselines: Primus cut Calculon's average error on Llama-70B from 28.9% down to 6.6%, and beat an exhaustive 530-trial Galvatron-style simulation sweep by +28% projected throughput thanks to real-hardware kernel anchoring.
Limitations and Future Work
- Vendor Validation: While the architecture relies on generic YAML hardware profiles, all empirical validation so far is on AMD Instinct GPUs and ROCm. Porting to NVIDIA GPUs requires a hardware YAML and running the 8-GPU benchmark; Google TPUs would additionally require modeling XLA collectives.
- Unmodeled Network Contention: The analytical upscaler assumes idealized link performance without multi-job network contention. While contention stayed second-order in their tests (since heavy MoE All-to-All traffic stayed intra-node), inter-node EP setups on congested networks could introduce extra error.
- Training Dynamics: ZeRO-2 sharding is currently excluded, and when the agent switches precision (like BF16 to FP8) for speed, humans still need to verify that training loss converges cleanly.
Summary updated