Manuscript Offprint

arXiv:2610.19423

Beyond the Trial-and-Error Loop: Hybrid Projection and Automated Tuning for Distributed Training

Anshu Raina, Peyman Razaghi, Yuankai Chen, Cheng Yao, Yao Fu, Vidushi Goyal, Devang Patel, Wen Xie, Zhenyu Gu, Emad Barsoum

Abstract

Configuring distributed LLM training across hundreds of GPUs requires jointly optimizing tensor, pipeline, expert, context, and data parallelism alongside micro-batch size, recomputation, sharding, and overlap, a combinatorial space where the boundary between memory-legal and OOM can hinge on a single byte of per-element activation accounting. Today, teams navigate it through expensive multi-node trial and error, burning GPU-hours on crashes and suboptimal recipes. We present Primus Projection, which closes this loop with two coupled components. First, a hybrid projection engine that measures what it can and simulates what it cannot: GPU microbenchmarks on as few as a single device capture compute kernels and any in-scope communication; a sub-node downscale-measure-upscale workflow analytically restores out-of-scope collectives, FSDP overlap, and the full pipeline schedule at the multi-node target. A pure simulation mode runs entirely on CPU, enabling pre-silicon planning without any GPU. Second, the Primus Tuning Agent treats the projection engine as a fast scoring oracle (seconds per candidate instead of tens of minutes) and uses it to drive an intelligent search over the configuration space. A deterministic seed planner sweeps single axes; an LLM investigation loop proposes cross-axis combinations the planner cannot reach, with an analytic memory pre-filter that rejects infeasible candidates before any GPU time is spent. Validated on Llama 3.1 (dense) and Mixtral 8×22B (MoE) across two GPU generations, all projections stay within ~10% of measured multi-node throughput, and fidelity holds at production scale: 4.7% error on DeepSeek V3 671B at 1,024 GPUs and 1.9% on Qwen3-235B-A22B at 256 GPUs. In a Mixtral 8×22B case study, the Primus Tuning Agent discovers a configuration delivering +27% throughput over the published 4-node BF16 reference at the same scale, in under 30 minutes of single-node exploration, with no hand-written configs and no full-cluster profiling pass.

1 Introduction

The rapid growth in large language model (LLM) scale, from billions to trillions of parameters, has made distributed training configuration a first-class engineering challenge. A single 100B+ run jointly selects five interacting parallelism dimensions (TP, PP, EP, CP, DP) plus micro-batch size, sequence length, gradient accumulation, recomputation, FSDP sharding, and overlap flags; each combination trades memory, compute utilization, and communication overhead differently, and the combinatorial space of valid configurations grows rapidly with model size and cluster scale, making exhaustive trial-and-error infeasible. In practice, teams launch full multi-node runs, observe OOMs or suboptimal throughput, adjust, and repeat—each iteration consuming hours of expensive cluster time and delaying model development.

Existing tools fall short of closing this loop. Analytical cost models (e.g. Calculon [10], Galvatron [18]) predict training time from hardware specifications or single-device layer profiles with nominal-bandwidth communication, but miss GPU frequency throttling under sustained

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

load, software-stack variation, and grouped-GEMM behavior in Mixture-of-Experts (MoE) models [6, 8, 14]. Full-system simulators (e.g. ASTRA-sim [25], Echo/Moye [7]) achieve higher fidelity but require target-hardware traces or extensive calibration, and do not scale to the configuration sweeps needed for planning.

We present Primus Projection: compute kernels are benchmarked on as few as a single GPU; out-of-scope communication, FSDP overlap, and the full pipeline schedule are reconstructed analytically at the target scale. A pure simulation mode runs entirely on CPU for pre-silicon planning. The Primus Tuning Agent treats the projection oracle as a fast surrogate to search the full configuration space end-to-end—parallelism, schedule, recomputation, MoE backend, and precision—replacing days of manual profiling with minutes of single-node exploration.

We validate Primus Projection against published multi-node training results [2] on AMD Instinct MI325X and MI355X GPUs across dense (Llama 3.1 [9]) and MoE (Mixtral 8×22B [12]) models, keeping all projections within ~10% of measured throughput, and at production scale on DeepSeek V3 671B [4] (1,024 GPUs, 4.7% error) and Qwen3-235B-A22B [33] (256 GPUs, 1.9%). Projection also preserves configuration rankings (Spearman ρ≥0.93\rho \geq 0.93) on Mixtral, Qwen3-235B-A22B, and GPT-OSS-120B [21], always selecting the measured-best configuration. In a Mixtral tuning case study, the agent delivers +27% throughput over AMD's published 4-node BF16 reference at the same scale in under 30 minutes.

References (33)

  • Vidur: A large-scale simulation framework for LLM inference
  • Algorithms for hyper-parameter optimization
  • DeepSeek-V3 Technical Report
  • Proteus: Simulating the performance of distributed DNN training
  • Switch Transformers: Scaling to trillion parameter models with simple and efficient sparsity
  • Scalable and efficient simulation of LLM training
  • MegaBlocks: Efficient sparse training with mixture-of-experts
  • The Llama 3 Herd of Models
  • Calculon: A methodology and tool for high-level codesign of systems and large language models
  • Beyond data and model parallelism for deep neural networks
  • Mixtral of Experts
  • DSPy: Compiling declarative language model calls into state-of-the-art pipelines
  • GShard: Scaling giant models with conditional computation and automatic sharding
  • Lumos: Efficient performance modeling and estimation for large-scale LLM training
  • AgentHPO: Large language model agent for hyper-parameter optimization
  • Large language models to enhance Bayesian optimization
  • Galvatron: Efficient transformer training over multiple GPUs using automatic parallelism
  • gpt-oss-120b & gpt-oss-20b Model Card
  • Bandwidth optimal all-reduce algorithms for clusters of workstations
  • Optimus: An efficient dynamic resource scheduler for deep learning clusters
  • Zero bubble (almost) pipeline parallelism
  • ASTRA-SIM: Enabling SW/HW co-design exploration for distributed DL training platforms
  • FlashAttention-3: Fast and accurate attention with asynchrony and low-precision
  • Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism
  • Practical Bayesian optimization of machine learning algorithms
  • tritonBLAS: Triton-based analytical approach for GEMM kernel parameter selection, 2025 (opens arXiv in a new tab)
  • Improving automatic parallel training via balanced memory workload optimization
  • Roofline: An insightful visual performance model for multicore architectures
  • Qwen3 Technical Report
  • ProTrain: Efficient LLM training via automatic memory management
  • ReAct: Synergizing reasoning and acting in language models
  • Recursive language models, 2025 (opens arXiv in a new tab)
  • Automating inter- and intra-operator parallelism for distributed deep learning