Manuscript Offprint

arXiv:2608.23840

ShardMeter: Sharded and Geo-Distributed Training Without the Guesswork

Tim Beringer, Patrick Diem, Felix Wolf, Arya Mazaheri

Tim Beringer 1^{1}, Patrick Diem 1^{1}, Felix Wolf 1^{1}, Arya Mazaheri 1,2^{1,2}

1^{1}Technical University of Darmstadt

2^{2}PanocularAI

{tim.beringer, patrick.diem, felix.wolf, arya.mazaheri}@tu-darmstadt.de

arya@panocular.ai

Abstract—Training large-scale AI models often outgrows a single data center, demanding sharded, multi-cluster, and decentralized training. However, the huge space of resource allocations makes exhaustive benchmarking and manual tuning impractical, while performance depends on tightly coupled factors like model size, GPU memory, batch size, bandwidth, and sharding strategy. We introduce ShardMeter, a lightweight analytical performance model that predicts the end-to-end runtime of transformer-based workloads across arbitrary sharded, distributed, and even decentralized training. Given a model's characteristics and a target hardware topology, ShardMeter estimates per-GPU and per-island throughput, training cost, total wall-clock time, and identifies performance bottlenecks. Our analysis reveals diminishing-return regimes as island size increases, quantifies transitions between compute-and communication-bound scaling, evaluates hyperparameter trade-offs, and models cost-throughput for large-scale decentralized training. ShardMeter exposes these insights to quickly explore the configuration space, choose near-optimal deployment plans, and avoid costly trial and error.

Index Terms—Deep neural networks, transformer, large language models, performance modeling, distributed training

I. INTRODUCTION

Recent advancements in large foundation models, which are typically based on transformer architectures [1], have revolutionized numerous AI applications [2], including natural language understanding and generation (e.g., machine translation and summarization) [3], computer vision (e.g., image classification and zero-shot recognition) [4], [5], and multimodal reasoning (e.g., aligning text and images for retrieval and captioning) [5], [6]. However, training such models demands substantial computational resources and energy. Traditionally, data parallelism has been one of the primary approaches in distributed training, but the sheer size of the model—sometimes exceeding hundreds of billions of parameters—necessitates other parallelization schemes, such as partitioning across multiple GPUs using techniques like fully sharded data parallelism (FSDP) [7]. Consequently, FSDP has become the essential strategy among others for training medium- to large-scale transformer models and a number of state-of-the-art frameworks are now based on PyTorch's FSDP implementation [8]–[11].

Even within individual data centers, computational resources may be insufficient, requiring the coordination of multiple facilities through decentralized and federated learning (FL) [12]. Determining an efficient distributed training strategy is challenging because individual workloads scale differently with model architecture, dataset, and hardware, making it difficult to estimate the computational complexity of a training job [13]. Moreover, expanding a distributed-training setup to a sharded, geographically distributed setup adds further layers of complexity, introducing new potential bottlenecks related to network latency, data synchronization, and resource allocation. Therefore, determining an optimal training configuration remains a significant challenge, particularly for large language models (LLMs), which require substantial time and resources and are highly sensitive to suboptimal training parameters.

Within the context of decentralized training, critical choices include selecting appropriate data centers, the number of nodes, the number of GPUs per node, and an appropriate parallelization strategy, including a sharding level based on model size and available GPU memory. The performance of training workloads is shaped by a tightly coupled set of factors: model size, per-GPU memory capacity, batch size, GPU performance, network fabric, and the chosen parallelism scheme. Together, they determine whether the workload is communication-bound or compute-bound, which significantly influences the scalability of individual training workloads.

As a result, developers often rely on ad hoc heuristics, empirical tuning, or costly trial-and-error experimentation to configure large-scale training jobs. These approaches are time-consuming, expensive, and brittle, as optimal configurations can vary substantially across models, datasets, and hardware environments [14]. In the absence of principled guidance, suboptimal choices may lead to severe underutilization of resources, excessive communication overheads, or even infeasible training runs due to memory constraints. This motivates the need for a predictive performance model that can reason about the interplay between computation, communication, and memory at scale, and that can estimate training efficiency and cost across a wide range of distributed and decentralized configurations before execution [15].

However, existing performance models either target single-GPU or conventional data-parallel training, assume homogeneous hardware, and are limited to convolutional or regular distributed-data-parallelism workloads [16]–[20]. Many approaches also require profiling a specific model before they can make any predictions, which prevents them from predicting unknown models [15], [21]. Moreover, existing performance models cannot capture the complex, tightly-coupled interdependencies between communication and computation that arise in the widely-adopted, state-of-the-art FSDP and DiLoCo training for transformer models.

To address these challenges, we introduce ShardMeter, a lightweight analytical model that predicts end-to-end training time, pinpoints bottlenecks, and suggests near-cost-optimal deployment schedules. It quantifies the communication-compute trade-offs of a given configuration and predicts the scalability of training from a single-node, locally sharded setup to large, geographically distributed training workloads.

The main contributions of this paper are as follows:

  • A lightweight analytical runtime-prediction model that captures the intertwined compute-communication dynamics of FSDP and decentralized training, with a median error of <15%<15\%.

  • A systematic bottleneck analysis that reveals diminishing return regimes, quantifies compute-communication scaling transitions, and clarifies the impact of training hyperparameters.

  • An integrated optimizer exhaustively explores heterogeneous GPU deployments, constructs a Pareto frontier of cost versus runtime, and can cut training expenses by up to 21% while preserving near-optimal throughput.

References (30)