betaFeedback

WorksComputer Science

Generalized Tensor Parallelism: Powering Trillion-Parameter LLM Training at 10+ EFLOP/s

Abstract

Pretraining state-of-the-art large language models (LLMs) with up to trillions of parameters is memory- and compute-intensive. Existing parallelization schemes compromise on either per-GPU memory or throughput: data parallelism replicates parameters; tensor parallelism and fully sharded data parallelism (FSDP) add communication of activations and parameters, respectively, to every microbatch; and pipeline parallelism leaves GPUs idle while the pipeline fills and drains. We show that, for linear layers, five commonly used parallelisms (data, tensor, sequence, context parallelism and FSDP) are special cases of one framework, generalized tensor parallelism (GTP), in which each layer's parameters and activations are partitioned and either can be re-materialized with an all-gather before use. In GTP, a parameter all-gather is an optional preprocessing step on one input of a matrix multiplication (GEMM), whereas FSDP implementations typically treat it as a step before an entire Transformer block, which can increase memory footprint and delay GEMMs. The GTP view lets us schedule all-gathers per GEMM rather than per block, issuing each early enough to hide its communication but late enough to limit memory. Our implementation is open source at https://github.com/NVIDIA/Megatron-LM; with it, an internal 2T-parameter mixture-of-experts (MoE) model reaches 13.0 model EFLOP/s (exaFLOP/s) on 12,288 GB300 GPUs with 98% weak-scaling efficiency, and runs with 1M-token sequences on 512 GPUs. On 256–1,024 GPUs, our implementation achieves \textbf{1.05–1.55×\times the throughput of Megatron-FSDP} across three MoE models and \textbf{1.27–1.31×\times that of a tuned 3D-parallel recipe with pipeline parallelism} on a DeepSeek-V4-Pro proxy model.

Introduction

Modern large language models (LLMs) have up to trillions of parameters [3, 5, 6, 7, 30, 32]. The parameters, optimizer state, and activations of these models far exceed the memory of a single GPU.1 Training these models on trillions of tokens requires high throughput to keep training time manageable [6, 14, 30]. Efficient distributed pretraining over thousands of GPUs thus has two key requirements. First, per-GPU memory for parameters, optimizer state, and activations should shrink roughly in proportion to GPU count, so that larger models and longer sequences fit in the available memory capacity. Second, GPUs should stay busy: communication should overlap with computation, and per-GPU matrix multiplications (GEMMs) should run efficiently.

Existing parallelization schemes each compromise on at least one of these requirements. Data parallelism (DP) replicates parameters on every GPU, so parameter memory does not shrink as GPUs are added; a distributed optimizer [57] can shard optimizer state. Tensor parallelism (TP) [61] shards parameters and can be combined with sequence parallelism (SP) [24] to additionally shard the activations between tensor-parallel regions. However, TP communicates activations in every layer for every microbatch. This communication is hard to hide and is fast only within an NVLink domain, which bounds the TP degree; large TP degrees also shrink GEMMs, decreasing arithmetic intensity and GPU utilization. Pipeline parallelism (PP) [15, 34, 35] communicates little, but naively retaining activations for multiple in-flight microbatches leads to an activation footprint similar to that of undistributed computation; it also leaves GPUs idle while the pipeline fills and drains and requires compute to be relatively balanced across stages. Fully sharded data parallelism (FSDP) and ZeRO-3 [57, 75] shard parameters, gradients, and optimizer state while keeping GEMMs large (given a large enough batch), but all-gather every parameter for every microbatch in both the forward and backward passes, adding communication. Context parallelism (CP) [20, 27, 29, 68] splits each sequence across GPUs to reduce activation memory. Expert parallelism (EP) [25, 71] distributes the experts of mixture-of-experts (MoE) models across GPUs; both CP and EP compose with the schemes above.

In this paper, we show that, for a linear layer, five commonly used parallelisms (DP, TP, SP, CP, and FSDP) are special cases of a single framework, which we call generalized tensor parallelism (GTP; § 2). In GTP, parameter matrices are partitioned along a hidden dimension, as in TP, and input activations along the token dimension. Token partitions can contain whole sequences (DP) or parts of each sequence (CP). Linear layers process these partitions independently; with CP, attention and state-space layers also exchange their state (e.g., keys and values for attention layers) among the GPUs that hold parts of each sequence. Each linear layer’s GEMM thus has two sharded inputs, parameters and activations, and either can be re-materialized with an all-gather before use: activations for SP, or parameters for FSDP. The partitioning degrees and the number of GPUs across which each input is re-materialized trade communication against memory, and can be chosen separately for dense and expert weights. When both inputs are fully sharded, per-GPU memory for parameters, optimizer state, and activations shrinks in proportion to the number of GPUs.

Parameter re-materialization reduces memory but is not a free lunch: each microbatch all-gathers the parameters in both the forward and backward passes and reduce-scatters their gradients (1.5× the volume of DP’s once-per-step gradient synchronization at equal communication precision; § 2.2). Unlike TP’s activation communication, a parameter all-gather does not depend on the preceding computation, so it can be issued ahead of the layer that consumes it. When to issue each all-gather is thus a choice with consequences: re-materializing too close to the compute that needs the parameters exposes communication time [67, 75], while re-materializing too far ahead increases memory footprint. Existing FSDP implementations schedule re-materialization in configurable units, often Transformer blocks [63] (§ 3.1 and § 7). When the unit is a whole block, its first GEMM waits for all of the block’s parameter all-gathers, and all of the block’s parameters are in memory at once. In GTP, a parameter all-gather is instead the counterpart of SP’s activation all-gather: a preprocessing step on one input of a GEMM. Scheduling parameter re-materialization per GEMM rather than per block lets us tailor when each all-gather is issued, what each GEMM waits for, and which parameters share a collective, based on computation and memory requirements. For MoE layers, we use this flexibility to issue each expert weight’s all-gather a full MoE block ahead of its GEMM (§ 3.3).

To summarize, we make the following contributions:

  • A unified framework. We express DP, TP, SP, CP, and FSDP as special cases of parameter and activation partitioning with optional input re-materialization (§ 2).

  • Per-GEMM re-materialization scheduling. We schedule parameter all-gathers per GEMM through separate prefetch chains (C1), consumer-specific waits (C2), and coalesced expert all-gathers (C3; § 3.3); on two benchmark models using 256 GPUs, our full implementation is 4.6–13.9%, 2.8–18.7%, and 3.5–9.0% faster than variants without C1, C2, and C3, respectively (§ 5.7).

  • An open implementation, evaluated at scale. Our GTP implementation is open source in Megatron-Core (MCore) and supports dense and MoE models with AdamW and Muon; with it, an internal 2T-parameter MoE model (Internal-2T) reaches 13.0 model EFLOP/s at a sequence length of 8K on 12,288 GB300 GPUs, with 98% weak-scaling efficiency from 4,096 to 12,288 GPUs (§ 5.3). GTP also enables the full Internal-2T model to run with sequences up to 1M tokens on 512 GPUs (§ 5.6). Across three MoE models at 256–1,024 GPUs, our implementation achieves 1.05–1.55× the throughput of Megatron-FSDP (MFSDP; § 5.4). On a DeepSeek-V4-Pro (DSV4-Pro) proxy model, it achieves 1.27–1.31× the throughput of a tuned 3D-parallel recipe with pipeline parallelism (§ 5.5). The code is available at https://github.com/NVIDIA/Megatron-LM.

Organization. § 2 describes the GTP framework and analyzes its communication and memory. § 3 explains how we schedule parameter all-gathers per GEMM to hide communication and limit memory. § 4 describes our implementation in MCore and Transformer Engine. § 5 empirically compares GTP with appropriate baselines. § 6 offers practical guidance for configuring GTP, including when to combine it with PP. § 7 reviews related work.

Generalized Tensor Parallelism

Most of an LLM’s parameters are in linear layers: attention projections, MLPs, and the experts of MoE layers. Each linear layer is a GEMM between two inputs: an activation matrix XX, with one row per token, and a parameter matrix WW. Distributing these layers comes down to deciding how to split and store XX and WW across GPUs. In this section, we show that DP, TP, SP, CP, and FSDP each make different choices for XX and WW, and that all five are special cases of a single framework, generalized tensor parallelism (GTP; § 2.1). We then analyze the communication (§ 2.2) and memory (§ 2.3) costs of these choices. PP [15, 34, 35] is orthogonal: it partitions the model’s layers into stages that exchange only activations and their gradients point-to-point. GTP composes with PP; § 6.3 discusses when to combine them.

Other layers need slightly different treatment. Small weight tensors, such as LayerNorm [2] or RMSNorm [72] weights, can be replicated to reduce needless communication. The attention operation itself has no parameters, and its communication under CP is the same with or without GTP.

One Linear Layer, Two Inputs

As a running example, we use an MLP block: an h→h′h \to h' GEMM followed by an h′→hh' \to h GEMM, where hh is the model’s hidden size and h′h' the MLP’s intermediate size (e.g., h′=4hh' = 4h in many dense models); other linear layers behave similarly.

TP [61] partitions the parameters along a hidden dimension across tt GPUs: the h→h′h \to h' GEMM is split by output columns and the h′→hh' \to h GEMM by input rows (column- and row-parallel layers, respectively). Each GPU then computes a slice of every layer, and the GPUs combine their partial outputs with an all-reduce at the end of each tensor-parallel region. The all-reduce depends on the preceding GEMM’s output, so overlapping the two requires splitting the GEMM into smaller GEMMs [65, 66], which further lowers arithmetic intensity.

DP and CP [20, 27, 29] partition the activations along the token dimension across cc GPUs (Figure 1, top). Each GPU computes on its own tokens, and the parameter gradients are all-reduced once per optimizer step, which overlaps with the backward pass when gradients are reduced in buckets [26]. Token partitions that contain whole sequences give DP; partitions that split sequences give CP, which matches DP for linear layers but requires the GPUs that share a sequence to communicate in attention and state-space layers.

Figure 1. Partitioning and re-materialization of a GEMM with t=c=4t=c=4. Top: parameters are partitioned across tt GPUs and activation rows (tokens) across cc GPUs; each shade is one partition. Bottom: each input can optionally be stored as a smaller shard and all-gathered before the GEMM, activations across the tt-group (SP) and parameters across the cc-group (FSDP).

In GTP, these are two independent partitioning axes, so a layer is distributed over n=t⋅cn=t\cdot c GPUs; they compose cleanly because they act on different inputs [35]. Partitioning alone leaves some state replicated: each TP partition is replicated across the cc GPUs that share it, and each GPU in a tt-group holds the same boundary activations, the activations at the input and output of each tensor-parallel region (such as the MLP block’s input XX). Either replication can be removed by further sharding the replicated tensor and re-materializing it with an all-gather just before it is used (Figure 1, bottom). Re-materializing boundary activations across the tt-group is SP [24], which replaces each region’s all-reduce with an all-gather before it and a reduce-scatter after it. Re-materializing parameters across the cc-group is the parameter sharding of FSDP and ZeRO-3 [57, 75]: parameters are all-gathered from their shards before use and freed afterward, in both the forward and backward passes of every microbatch, and gradients are reduce-scattered back to the shards. Unlike activation all-gathers, these parameter all-gathers do not depend on preceding computation, so they can be issued ahead of the GEMMs that consume them.

Re-materialization need not span the whole partitioning group. Parameters can be sharded and re-materialized within a weight re-materialization group (weight group for short) of rr of the cc GPUs: each GPU persistently stores 1/(t⋅r)1/(t\cdot r) of each weight, and the weight group all-gathers its full TP partition (1/t1/t of the weight) just before each GEMM that consumes it. The c/rc/r weight groups hold identical replicas, which synchronize gradients once per optimizer step, as in DP. At t=1t=1, setting r=cr=c gives FSDP, r=1r=1 gives DP, and intermediate values give hybrid sharding (HSDP) [75]; larger tt composes these choices with TP. The per-microbatch all-gathers then stay within the weight group, which can be placed on a fast interconnect such as NVLink [46], while the once-per-step replica synchronization crosses slower links (§ 4.1).

Each weight is thus sharded across pp GPUs, which we call the GTP degree:

p=t⏟TP degree×r⏟re-materialization degree.(1)p = \underbrace{t}_{\text{TP degree}} \times\underbrace{r}_{\text{re-materialization degree}} . \tag*{(1)}

For example, GTP4 with TP2 (t=2t = 2, r=2r = 2) splits each weight into two TP partitions and stores each partition as two shards, which are all-gathered within the weight group before use. With r=1r = 1, GTP reduces to TP with DP; with t=1t = 1, GTP reduces to FSDP or HSDP. Table 1 places the familiar schemes in this space.

SchemettccRe-materialize activationsRe-materialize parameters
DP / CP11nn––
TPnn11––
TP+SPnn11✓–
FSDP / ZeRO-311nn–✓ (r=cr = c)
HSDP11nn–✓ (1<r<c1 < r < c)
GTPttcc✓✓ (r≤cr \le c)

Table 1. Parallelism schemes as choices of partitioning and re-materialization.

Mixture-of-experts layers. MoE models [6, 9, 32, 60] increase model capacity without activating every parameter for each token: an MoE block replaces the MLP with EE expert MLPs and a router that sends each token to kk of them. Expert parallelism (EP) [25, 71] partitions whole experts across GPUs and routes each token to the GPUs holding its experts and back with a pair of all-to-all collectives. In an MoE block, EP’s dispatch and combine all-to-alls take the place of TP+SP’s activation all-gather and reduce-scatter, but exchange only the tokens selected by the routing mask. Expert GTP (EGTP) applies GTP’s parameter sharding and re-materialization to routed expert weights. With EGTP degree rer_e, each GPU in a weight group for expert weights stores 1/re1/r_e of those weights and all-gathers the full weights before each GEMM that consumes them. Dense GTP and EGTP degrees are configured independently. Dense linear layers, including attention projections, use the composition of TP, SP, and GTP described above, while small parameters such as router weights remain replicated.

Long sequences. GTP can split a single long sequence across many GPUs without TP. Linear layers process each token independently, so the GPUs in a weight group can each work on a different part of the same sequence. A sequence can also span several weight groups (Figure 2). Splitting a sequence across GPUs does not change which GPUs store each weight shard (§ 4.1.2). Weight all-gathers stay within each weight group, while attention and state-space layers communicate across the sequence’s CP group.

Figure 2. Independent weight and data views on eight GPUs (TP=PP=1, microbatch size 1). (a) Each NVLink domain stores a 4-way-sharded replica of WW; weight all-gather (AG) and gradient reduce-scatter (RS) stay within the domain. Dashed links synchronize replicas of the same shard. (b) Samples AA and BB each span four sequence partitions in CP groups {0, 1, 4, 5} and {2, 3, 6, 7}, respectively; attention communication crosses domains. This small layout is only meant for illustrative purposes: in practice, CP groups are best kept within an NVLink domain when possible.

Communication

The choice of tt and cc trades parameter communication, which shrinks as tt grows, against activation communication, which grows with tt.

To quantify this tradeoff, we model the MLP block’s communication volume in tensor elements per GPU, for one microbatch of SS tokens per optimizer step and, when parameters are re-materialized, full parameter sharding (r=cr = c). The coefficients γW\gamma_W and γX\gamma_X scale the parameter and activation volumes relative to TP+CP without re-materialization, for which γW=γX=1\gamma_W = \gamma_X = 1. Without re-materialization, the MLP block uses a gradient all-reduce over the cc-group and two activation all-reduces over the tt-group, one in the forward pass and one in the backward pass. Parameter re-materialization replaces the gradient all-reduce with two parameter all-gathers (one for each pass) and a gradient reduce-scatter, giving γW=1.5\gamma_W = 1.5. Activation re-materialization uses SP’s all-gather and reduce-scatter in each pass, plus an additional all-gather of the inputs to the weight-gradient GEMM, giving γX=1.25\gamma_X = 1.25:

comm⁡(t,c)=γW4hh′t(1−1c)+γX4Shc(1−1t).(2)\operatorname{comm}(t,c) = \gamma_W \frac{4hh'}{t}\left(1-\frac{1}{c}\right) + \gamma_X \frac{4Sh}{c}\left(1-\frac{1}{t}\right). \tag*{(2)}

With r<cr < c, the per-microbatch parameter all-gathers and gradient reduce-scatters stay within the weight group of rr GPUs, and the c/rc/r replicas additionally all-reduce gradients once per optimizer step. If collectives use different precisions, each must be weighted by its bytes per element. Under gradient accumulation, parameter all-gathers repeat for each microbatch unless materialized parameters are retained across microbatches at a memory cost [53].

For the single-microbatch model in Equation (2), let s=S/ns = S/n be each GPU’s share of the microbatch’s tokens. With large tt- and cc-groups, the parameter term is approximately 4γWhh′/t4\gamma_W hh'/t and the activation term approximately 4γXsht4\gamma_X sht. Dividing these terms by their respective group bandwidths, BcB_c and BtB_t, gives a bandwidth-only communication-time model when all collectives use the same precision. For γW=1.5\gamma_W = 1.5, γX=1.25\gamma_X = 1.25, and fixed ss, the modeled communication time is minimized at

t∗=1.2⋅(h′/s)⋅(Bt/Bc).(3)t^* = \sqrt{1.2 \cdot(h'/s) \cdot(B_t/B_c)}. \tag*{(3)}

Many tokens per GPU push t∗t^* toward 1 (FSDP); few tokens per GPU favor larger tt within an NVLink domain.

At fixed ss, TP’s activation volume per GPU is proportional to t−1t - 1 (Equation (2)), since each GPU’s GEMMs consume the activations of all s⋅ts \cdot t tokens in its tt-group. In contrast, for MoE models, each token is sent to at most kk GPUs (those hosting the experts the token is routed to), so a GPU’s EP volume is at most kk times its tokens regardless of the EP group size. EP groups can thus be much larger than TP groups.

The communication-time model above ignores two effects: any overlap of communication with computation, and the latency term of each collective (small for the message sizes typical in training). Overlap matters most for parameter all-gathers, which can be issued ahead of the GEMMs that consume them (§ 2.1). We next estimate how much computation is available to hide them.

Hiding all-gathers behind computation. More tokens per expert add computation without increasing weight all-gather volume. Consider one expert GEMM at TP1. Balanced routing across an expert-parallel group of EP GPUs gives each expert se=EP⋅s⋅k/Es_e = \mathrm{EP} \cdot s \cdot k/E tokens. Its weight has hh′hh' elements of bb bytes each, sharded across re>1r_e > 1 GPUs, where h′h' is the expert’s intermediate size. At achieved GEMM throughput FF (FLOP/s) and all-gather bandwidth BreB_r^e (bytes/s), the ratio of one GEMM’s time to one weight all-gather’s time is

tGEMMtAG=2sehh′/Fb(1−1/re)hh′/Bre=2seBreb(1−1/re)F.(4)\frac{t_{\mathrm{GEMM}}}{t_{\mathrm{AG}}} = \frac{2s_ehh'/F}{b(1-1/r_e)hh'/B_r^e} = \frac{2s_eB_r^e}{b(1-1/r_e)F}. \tag*{(4)}

For fixed FF and BreB_r^e, the weight size hh′hh' cancels, so the ratio depends on tokens per expert rather than weight size; in practice, FF also depends on GEMM shape. For dense layers at TP1, each GPU processes ss tokens and all-gathers weights across its rr-GPU weight group; the same analysis applies. A higher ratio offers more opportunity to hide communication; actual overlap also depends on collective startup costs, network contention, and scheduling (§ 3.3).

Memory

Partitioning parameters (TP) shrinks per-GPU parameter memory, and partitioning tokens (DP or CP) shrinks per-GPU activation memory; re-materialization extends both reductions to all nn GPUs. For the MLP block without re-materialization, per-GPU parameter storage is 2hh′/t2hh'/t and boundary-activation storage is Sh/cSh/c, counted in tensor elements and excluding intermediate activations. Re-materializing parameters over rr GPUs reduces the former to 2hh′/(tr)2hh'/(tr), or 2hh′/n2hh'/n when r=cr = c; re-materializing activations reduces the latter to Sh/nSh/n. Gradient sharding follows parameter sharding, and the distributed optimizer partitions optimizer state across all nn GPUs. Peak memory also includes re-materialized parameters and communication buffers, whose sizes depend on how far ahead all-gathers are issued (§ 3).

Per-GEMM Scheduling of Parameter Re-materialization

Section 2 treats parameter re-materialization as a preprocessing step on one input of a GEMM. Building on this view, this section describes how we schedule re-materialization per GEMM, using a consumer interface and policies that coordinate each all-gather with the GEMM that consumes it. A weight’s consumers are the GEMMs that read it, and its view is the re-materialized copy that they read. Each expert is an MLP with two linear layers, FC1 and FC2; with grouped GEMMs, a GPU computes FC1 for all of its local experts in one GEMM (GFC1) and FC2 in another (GFC2).

Scheduling Problem

As discussed in § 2.1, parameter all-gathers, unlike activation all-gathers, can be issued ahead of the GEMMs that consume them. Any such schedule must balance three coupled concerns, especially in MoE models.

P1: Compute-communication overlap. Each all-gather must be issued early enough to finish before its consumer, and the consumer should not wait for unrelated communication. Consumers inside one module can need their parameters at different times: in a fused MoE layer, GFC1 and GFC2 are separate GEMMs, so if both wait for the same set of all-gathers, the GFC1 GEMM is delayed by the all-gather of the GFC2 weights. Expert parameters sharded across NVLink domains need longer prefetch windows because their all-gathers use slower inter-domain InfiniBand [18] or RoCE [19] links.

P2: Memory footprint. Re-materialization shrinks each GPU’s persistent weight memory to one stored shard (1/(t⋅r)1/(t \cdot r) of each weight). However, each view holds the full TP partition (1/t1/t of the weight) regardless of rr. Each full gradient also waits in a buffer until its reduce-scatter has read it. Peak memory therefore depends on how many views and gradient buffers the schedule keeps live: prefetching further ahead adds views, and overlapping gradient reduction holds buffers longer. A schedule should materialize each parameter as late as possible and release it as soon as its last reader finishes.

P3: Collective efficiency. All-gathering parameter tensors separately allows each all-gather to be scheduled independently, but each collective incurs launch overhead and communication startup latency. For small tensors, these fixed costs can dominate data transfer time, making the all-gathers latency-bound. Coalescing combines the all-gathers of several tensors into one collective, paying launch overhead once and amortizing startup costs over a larger transfer. However, combining parameters needed by different consumers can delay early consumers and keep more views live. Grouped GEMMs illustrate this tradeoff: the local expert weights of one grouped GEMM are consumed together and can share a collective, whereas GFC1 and GFC2 need their weights at different times.

Scheduling in existing FSDP implementations. Existing FSDP implementations schedule re-materialization through module hooks, typically on Transformer blocks (§ 7). A hook waits for all of its module’s parameter all-gathers before the module runs. With block-level hooks, a block’s first GEMM therefore waits for every parameter all-gather in the block (P1; Figure 3), and temporary memory and collective grouping follow the block (P2–P3). Hooks on smaller modules are possible, but a module hook cannot reach inside a fused operator: when expert weights are sharded, a fused expert layer’s GFC1 GEMM also waits for GFC2’s weights. We instead schedule re-materialization separately for each consumer. Table 2 compares how PyTorch FSDP2, MFSDP, and GTP schedule parameter all-gathers.

Figure 3. Backward-pass scheduling (schematic): (a) MFSDP waits per unit; (b) GTP waits per consumer. CiC_i, WiW_i, and gig_i denote a consumer, its weight, and its gradient. In both panels, AG and RS share one communicator over the same GPUs and execute sequentially.

PyTorch FSDP2 [51, 54]MFSDP [43]GTP
Scheduling granularityModule wrapped by fully_shard (typically a Transformer block).Transformer block or finer submodule (configurable).Individual GEMM.
When to issue (C1)Next module, in execution order or by explicit target.Next parameter groups in configured order, within a prefetch budget.Per chain: next dense GEMM; next MoE block for experts.
What a GEMM waits for (C2)All all-gathers of its module.All all-gathers of the hooked module (a Transformer block or a smaller submodule).Only its own weights.
Fused MoE layerGFC1 also waits for GFC2’s weights when sharded.GFC1 also waits for GFC2’s weights when sharded.GFC1 and GFC2 each wait for their own weights.

Table 2. How each implementation schedules parameter all-gathers. § 3.3 defines C1, C2, and GTP’s prefetch chains. Hook granularity is configurable in both FSDP implementations; § 5.4.1 describes the evaluated MFSDP configurations.

Consumer Interface

Each GEMM that reads a sharded weight obtains its view through a common consumer interface rather than through module hooks (Figure 4). The forward, activation-recomputation, and input-gradient (dgrad) GEMMs read WW. The weight-gradient (wgrad) GEMM reads only the layer’s input activations and output gradients, so the view can be released before wgrad. The consumer then hands the weight gradient back to be reduce-scattered into the stored shards.

Figure 4. Consumer interface between Megatron-Core (MCore) and Transformer Engine (TE). (a) TE requests weight views for GFC1 and GFC2; MCore waits for each all-gather and prefetches a later consumer’s weight. (b) The forward and dgrad GEMMs consume weight views; wgrad uses XX and dYdY and hands gradients to MCore for reduce-scatter and accumulation. Startup and buffer management are omitted.

# MCore: implements TE's DistributedWeight.
class GTPShardedParam(torch.nn.Parameter):
    def materialize_group_for_forward(self):
        w = self.wait_gather()  # Wait for W
        self.next_w.all_gather_async()  # Prefetch
        return w

# TE: fused grouped expert MLP.
def forward(x, gfc1, gfc2):
    w1 = gfc1.materialize_group_for_forward()
    h = activation(fwd_grouped_gemm(x, w1))
    w2 = gfc2.materialize_group_for_forward()
    return fwd_grouped_gemm(h, w2)

A GEMM waits for its weight’s all-gather to complete, then issues the all-gather for a later GEMM’s weight, and then starts its computation. The scheduling policies in § 3.3 determine the prefetch target and collective grouping. § 4 describes how TE and MCore implement this interface.

Scheduling Policies

Scheduling all-gathers per GEMM involves three decisions: when to issue each all-gather (C1), what each GEMM waits for (C2), and which parameters share a collective (C3). These decisions matter most in MoE layers, where GFC1 and GFC2 run inside one fused module and expert all-gathers can cross NVLink domains.

When to issue collectives (C1). We choose the lookahead to balance communication overlap against the memory occupied by prefetched weights. A prefetch chain specifies which weight to all-gather next when a GEMM consumes the current weight. Chain membership determines the lookahead; § 4.3 describes registration and warmup.

  • Dense weights: hide fast all-gathers with short lookahead. When the weight group for dense weights lies within an NVLink domain, its all-gathers are fast, so a short lookahead suffices and limits the memory held by prefetched views. By default, all dense weights share one chain: consuming WiW_i prefetches Wi+1W_{i+1} in the forward pass and Wi−1W_{i-1} in the backward pass (Figure 5(a,b)). Whether the all-gather of Wi+1W_{i+1} is fully hidden depends on its duration relative to the compute time of the GEMM on WiW_i.

Figure 5. GTP’s three parameter-scheduling policies. (a) C1: next-weight dense and next-block expert prefetching. (b) Backward-pass overlap with serialized AG and RS. (c) C2: per-consumer waits. (d) C3: per-GEMM expert coalescing. D and C denote EP dispatch and combine; dd and ww denote dgrad and wgrad; LiL_i and eje_j denote a layer and an expert weight.

  • Expert weights: hide slower all-gathers with longer lookahead. Cross-domain EGTP all-gathers need a longer overlap window (§ 4.1.3), so GFC1 and GFC2 use separate default chains. GFC1 and GFC2 each prefetch the corresponding weights in the next MoE block, allowing their all-gathers to overlap the rest of the current block, intervening dense layers, and EP token exchange (Figure 5(a)). This longer window provides more computation to hide the slower all-gathers (P1), but keeps prefetched views live longer (P2).

In the backward pass, each layer runs dgrad before wgrad, and wgrad does not read the weight. Issuing the next all-gather before dgrad thus lets it overlap both GEMMs (Figure 5(b)). Once wgrad finishes, its gradient is reduce-scattered, which can overlap the GEMMs of the layers that the backward pass processes next. Each GPU keeps its reduced gradient shards until the optimizer step.

What each GEMM waits for (C2). Our implementation records a completion event after each all-gather, before any later prefetch is queued, and each GEMM waits only on its own event (Figure 5(c)). FSDP2 also records an event per all-gather [51], but its module hooks wait for every all-gather in the configured unit. When GFC1 and GFC2 share a unit, the GFC1 GEMM also waits for GFC2’s weights.

Which parameters share a collective (C3). The local expert weights feeding one grouped GEMM are consumed together, so they are all-gathered in a single coalesced collective, with separate groups for GFC1 and GFC2 (Figure 5(d)). This grouping improves collective efficiency (P3). Per-expert all-gathers require a separate collective for each local expert, while grouping GFC1 and GFC2 together would couple consumers that need their weights at different times. § 5.7 evaluates the throughput benefit of this coalescing policy.

Implementation

This section describes how we implement GTP and the scheduling policies of § 3 in Megatron-Core (MCore) [42] and Transformer Engine (TE) [47]. Figure 6 summarizes the implementation: TE operators consume weight views, while MCore manages sharded storage, communication, prefetch scheduling, and CUDA graph replay. TE defines the consumer interface of § 3.2 as the DistributedWeight protocol, which MCore’s GTPShardedParam implements. TE operators obtain weights and return gradients through functions that accept both distributed weights and ordinary tensors, so the same operator code runs with or without GTP. When MCore constructs a TE linear or grouped-linear operator, it passes the padded row count of the stored shard, so the operator never allocates the full weight.

Figure 6. GTP architecture. TE consumes views through DistributedWeight; MCore manages scheduling (§ 3.3), weights (§ 4.2), buffers (§ 4.2.3), and graph replay (§ 4.4). The runtime builds on PyTorch and uses NCCL for collective communication. Colors distinguish models and infrastructure (gray), computation and interfaces (blue), and the GTP runtime (orange).

GPU Groups and Placement

MCore organizes GPUs into groups, each a set of GPUs that run collectives together. Each GPU belongs to a TP group (GPUs that hold different TP partitions of each weight), a weight group (GPUs that each store a different shard of the same TP partition), a replica group (GPUs that hold the same shard), and a CP group (GPUs that share a sequence).

Weight Groups

GTP splits each TP partition (1/t1/t of a weight) into rr shards (1/(t⋅r)1/(t \cdot r) of the weight), one per GPU in the weight group. Each GPU stores only its shard and all-gathers the full TP partition just before each GEMM that uses it. GTP splits each TP partition along its rows (the output dimension, in the [out, in] layout that PyTorch and TE use for weights). In a column-parallel layer, TP and GTP thus split the same dimension; in a row-parallel layer, TP splits the input dimension and GTP the output dimension. Weight gradients are reduce-scattered within the weight group. MCore’s DistributedDataParallel wrapper (DDP) then synchronizes gradients across replicas of each shard, and MCore’s distributed optimizer partitions optimizer state across these replicas.

Sharding does not pay off for every weight. A small weight saves little memory when sharded, but it still needs an all-gather before each GEMM that uses it. It can also need large padding: DSV4-Pro’s KV projection has only 512 rows, so sharding it across 64 GPUs under MXFP8 [58] would pad it to four times its size (§ 4.2.2 and § 5.10). GTP can instead keep such weights replicated: each GPU then stores the full TP partition, and the weight does not need an all-gather or padding. For example, our DSV4-Pro runs keep the KV projection replicated.

Splitting Sequences Within and Across Weight Groups

A long sequence may need to be split across more GPUs than one weight group contains. Instead of enlarging the weight group, which would push weight all-gathers across NVLink domains, GTP splits the sequence across several weight groups. In a q×mq \times m placement, each sequence is split across qq GPUs in each of mm weight groups, for an effective CP degree of qmqm. We call mm the outer CP degree. Within each weight group of size rr, the remaining factor r/qr/q splits independent sequences along the batch dimension. Figure 2(b) illustrates the 2 × 2 case: each sequence spans two GPUs in each of two weight groups.

For example, the 1M-token configuration in Table 6 uses r=q=64r = q = 64 and m=2m = 2. Each sequence spans two 64-GPU weight groups, one per NVLink domain, giving CP128 with GTP64 and no batch split within a weight group (r/q=1r/q = 1). Weight all-gathers use NVLink, while CP communication crosses domains. Each GPU stores 1/64 of each sharded dense weight, twice the 1/128 it would store with a single 128-GPU weight group.

Expert Weight Sharding Across NVLink Domains

We place each EP group within one NVLink domain (64 of a domain’s 72 GPUs [46]), so EP’s dispatch and combine communication stays on NVLink. Without EGTP, the GPUs at the same position in every EP group hold identical expert weights. EGTP shards these weights across rer_e such GPUs in different domains, reducing each GPU’s expert-weight storage roughly rer_e-fold. The expert all-gathers then cross the slower inter-domain network. The separate GFC1 and GFC2 chains give each of these all-gathers a full MoE block to complete (§ 3.3).

Weight Storage and Communication Buffers

Each GPU stores its weight shards persistently and needs temporary buffers for the TP partitions it all-gathers and the gradients it reduce-scatters. The format and size of these buffers determine both memory use and collective cost.

Low-Precision Weights

GTP can store weight shards in MXFP8 [58] or NVFP4 [37], using TE’s training recipes for these formats. The optimizer quantizes each updated FP32 master shard once per step. All-gathers then transfer the quantized shards and their scales directly, so no microbatch re-quantizes a weight. Each stored shard holds two quantized layouts: row-wise for the forward-pass GEMM and column-wise for the dgrad GEMM. Each all-gather transfers only the layout that its GEMM reads. Low-precision storage thus reduces both persistent weight memory and all-gather traffic. It does not reduce the precision of gradient communication (BF16 or FP32, configured separately), or of the master weights or optimizer state (both in FP32 by default).

Alignment Padding

Each GPU stores one shard of its TP partition of each weight. For a TP partition (1/t1/t of a weight) with dd rows split across a weight group of rr GPUs, each stored shard (1/(t⋅r)1/(t \cdot r) of the weight) nominally holds d/rd/r rows. MXFP8 and NVFP4 require each stored shard’s row count to be a multiple of an alignment aa, which is 32 for MXFP8 and 16 for NVFP4 (a=1a = 1 for BF16). Each GPU quantizes only its own stored shard (§ 4.2.1), so no quantization block may span two stored shards. These alignments keep shard boundaries on quantization-block boundaries, allowing GTP to all-gather quantized weights and their scales directly without dequantizing and re-quantizing them. When d/rd/r is not such a multiple, GTP appends zero rows to the TP partition, so that every stored shard has the same aligned row count. The padded TP partition has d~\tilde{d} rows, of which Δd\Delta d are padding, and each stored shard has dlocald_{\mathrm{local}} rows:

d~=ar⌈dar⌉,Δd=d~−d,dlocal=d~r.(5)\tilde{d} = ar \left\lceil\frac{d}{ar} \right\rceil,\qquad\Delta d = \tilde{d} - d,\qquad d_{\mathrm{local}} = \frac{\tilde{d}}{r}. \tag*{(5)}

An all-gather thus reconstructs a TP partition of d~\tilde{d} rows: the dd logical rows followed by Δd\Delta d padding rows (Figure 7(a)).

Aligned shards and weight lifecycle

Figure 7. (a) MXFP8 alignment of four stored shards (64 rows each). Cases (i–iii) show increasing padding; GPU 3 is fully padded in (iii). (b) Weight lifecycle for (a)(iii), excluding padding from GEMMs and checkpoints.

GEMMs use only the logical rows. Before the forward-pass, dgrad, or recomputation GEMM, GTP trims the padding from the all-gathered TP partition and adjusts its scales without dequantizing it. The wgrad GEMM computes gradients for only the logical rows, and GTP places them in a zero-padded buffer of d~\tilde{d} rows, which is reduce-scattered back into stored shards. Checkpoints also store only the logical rows (Figure 7(b)). Loading a checkpoint recomputes the padding for the target sharding configuration (§ 4.6). Padding thus adds storage and communication but no computation. § 5.10 quantifies this overhead across benchmark models.

FSDP2 also pads its shards when a weight does not divide evenly [52], but not to the alignment that low-precision formats require. In TE’s FSDP2 integration, unsupported MXFP8 splits fall back to high precision [48]. NVFP4 all-gathers there reject shards whose row count is not divisible by 16.

Symmetric User Buffers

As discussed in § 2.2, re-materialization trades off extra communication for reduced memory footprint. One way of reducing communication cost is to use a one-shot algorithm for the reduce-scatter (an all-to-all exchange followed by local accumulation), which allows reduced communication precision over the wire with FP32 accumulation (Figure 8(a)). However, this requires additional receive buffers (one per peer GPU), memory traffic, and streaming-multiprocessor (SM) work. Registering buffers with NCCL as symmetric user buffers (UB) instead enables NVLink SHARP (NVLS) reduce-scatter with in-switch FP32 accumulation, avoiding those receive buffers and the separate local reduction [13, 45] (Figure 8(b)).

Figure 8. Gradient reduction with and without symmetric user buffers. Both paths communicate BF16 gradients and accumulate in FP32. The dashed region shows how NVLS replaces the all-to-all exchange, extra receive buffers, and local FP32 accumulation with a single reduce-scatter.

GTP can register only the gradient reduce-scatter inputs (UB RS), or also the stored weight shards and all-gathered TP partitions (UB AG+RS). Registering the weight buffers lets NCCL’s all-gathers also access peer GPU memory directly, through NVLS or direct memory access (DMA) [13]. § 5.9 compares the two modes’ throughput and memory use. Three mechanisms make symmetric user buffers practical:

  • Buffer registration. GTP allocates symmetric user buffers from one memory pool per weight group, with separate pools for dense and expert weights, and registers each pool with NCCL for its group. Registration is collective: all GPUs in a group register their pools together. GTP registers each pool during model construction, before the first forward pass. When a pool grows, its new memory is registered automatically.

  • Buffer reuse and synchronization. Each reduce-scatter input holds the full TP-partition gradient from a wgrad GEMM, rr times the size of the stored shard. A dedicated registered input buffer for every weight would therefore use as much memory as unsharded gradients. GTP reuses registered buffers through a last-in-first-out (LIFO) free list keyed by element count, dtype, and group. Weights with the same element count can share a buffer even if their shapes differ. On release, the buffer carries a completion event for its reduction. The stream that next allocates the buffer waits on that event before overwriting it, without a device-wide synchronization.

  • Direct gradient writes. Supported TE wgrad GEMMs write their output directly into the registered gradient-input buffer in Figure 8(b), skipping an extra copy. The buffer already includes the necessary padding rows. Other GEMMs, and GEMMs whose output dtype differs from the buffer’s, write to a temporary buffer that GTP then copies into the registered one.

Prefetch-Chain Registration and Initialization

Users assign weights to a chain by calling register_prefetch_chain with a chain name and a list of weights. MCore then assigns every remaining sharded weight to the default chains described in § 3.3; replicated weights belong to no chain. All weights in a chain must share one group, and a grouped-linear operator joins a chain with all of its local experts. Chains on the same group can share a communication stream; GFC1 and GFC2 all-gathers, for example, share the expert stream (Figure 9(a)).

Figure 9. Prefetch-chain setup and warmup. (a) Sharded weights register with separate chains; GFC1 and GFC2 share an expert all-gather stream. (b) Forward-pass consumers record next_w/prev_w links and advance the cursor. (c) Shared-expert (SE) recomputation learns a separate order, illustrated by Nemotron-3 Super layers 8 then 5 (zero-based indices).

During the first forward pass, each chain records each weight’s successor and predecessor (Figure 9(b)). The ordinary backward pass follows the predecessor links; activation recomputation needs a separate order. It reruns forward-pass GEMMs during the backward pass, so it visits layers in reverse but the GEMMs within each layer in forward order, and only for the layers that recompute. In Figure 9(c), Nemotron-3 Super recomputes its shared experts in layer 8 and then layer 5, running FC1 before FC2 in each. The first backward pass records this order separately, and recomputation all-gathers the row-wise layout into its own buffers, apart from the column-wise layout the dgrad GEMM uses. CUDA graph replay requires every training step to visit each chain’s weights in recorded order.

Full-Iteration CUDA Graphs

GTP uses full-iteration CUDA graphs [38] to reduce kernel-launch and host-scheduling overhead. Capturing the forward and backward passes across a training step’s microbatches requires preserving GTP’s parameter schedule and accommodating MoE token counts that vary between training steps (Figure 10).

Figure 10. Full-iteration CUDA graphs with GTP. (a) Capture once; replay GTP dependencies with fixed buffer addresses. (b) Token counts vary across replays while buffer addresses and capacity stay fixed, avoiding host-side resizing; segment widths show token counts for local experts eie_i.

Preserving GTP scheduling during replay. Warmup establishes the prefetch order described in § 4.3 and provisions reusable weight and gradient buffers. Capture records GEMMs, weight all-gathers, gradient reduce-scatters, and accumulation together with their stream and event dependencies. Replay therefore preserves per-GEMM waits and communication overlap (Figure 10(a)). Every buffer keeps its address across replays, and a buffer is reused only after its previous readers finish. With symmetric user buffers, these buffers come from the NCCL-registered pool (§ 4.2.3). At each training step, the new batch is copied into static input buffers before replay. DDP’s communication across replicas is also captured in the graph, as in eager execution: all-gathers of the updated weight shards overlap with the forward pass, and gradient reduce-scatters overlap with the backward pass. The captured dependencies ensure that each updated shard arrives before GTP all-gathers it, and that GTP communication and the reduce-scatters finish before the optimizer runs. The optimizer then runs eagerly or in its own graph.

Capturing dynamic MoE routing. Routing decisions and per-expert token counts can change between training steps, while graph replay requires stable buffer addresses. HybridEP [17] and the fused grouped-expert kernels preallocate a per-GPU token capacity shared across local experts, with saved activations held in paged storage within the same budget [71]. The routing decisions and token counts remain dynamic, but dispatch, expert computation, and activation storage use the provisioned capacity without host-side buffer sizing during replay (Figure 10(b)). This trades capacity padding and storage headroom for graph-compatible execution. If routing exceeds the preallocated token capacity or paged storage, MCore discards the attempt, deletes the graph, and reruns the same batch eagerly, with dropless dispatch and without paged storage; the next training step recaptures the graph. The capacity bound concerns token storage; GTP continues to replay the recorded expert-weight prefetch order.

AdamW and Muon on Sharded Weights

AdamW [31] updates each element independently, so it works directly on the stored shards. Muon [22] computes each update from a whole matrix, which no single GPU stores, so GTP must decide where that computation runs. § 5.8 measures the effect on training throughput.

AdamW

MCore’s distributed optimizer treats each stored shard as an ordinary parameter, and partitions its optimizer state across the c/rc/r GPUs that hold replicas of that shard. Each GPU thus holds 1t⋅r⋅rc=1n\frac{1}{t \cdot r} \cdot\frac{r}{c} = \frac{1}{n} of each weight’s optimizer state, even when r<cr < c and the weights themselves are divided across only t⋅rt \cdot r GPUs (§ 2.3). A replicated weight (§ 4.1.1) has its optimizer state divided across rr times fewer GPUs. The global gradient norm used for clipping counts each element once, excluding duplicates on other replicas and padding rows. After each update, GTP re-quantizes each stored shard to its storage format (§ 4.2.1). § 5.2 compares training and validation losses with and without GTP under AdamW.

Muon

Unlike AdamW, Muon does not update each element independently: it orthogonalizes each weight’s whole momentum matrix, a running average of the weight’s gradients, with a fixed number of Newton–Schulz (NS) iterations. However, under GTP, each weight matrix and its gradient are split across p=t⋅rp = t \cdot r GPUs: tt TP partitions, each split across a weight group of rr GPUs. Running Muon on sharded weights thus requires additional communication and a choice of which GPUs compute each matrix’s update.

MCore’s distributed optimizer shards optimizer state across the c/rc/r replicas of each weight: it assigns each matrix’s update to one replica, the matrix’s assigned replica, whose pp GPUs each keep a 1/p1/p shard of the matrix’s momentum. Gradients are first reduce-scattered within each weight group, leaving each GPU with its shard of every matrix’s gradient, summed over only that weight group’s tokens. Gradient reduction across replicas then sums these partial shards over all replicas. An all-reduce gives every GPU the fully reduced shards of every matrix, although each replica needs only those of the matrices it updates. A reduce-scatter avoids this extra communication by giving each GPU the fully reduced values for only one slice of its gradient buffer. It requires the gradient buffer to be sharded the same way as optimizer state: each GPU’s slice must hold exactly the gradient shards of the matrices its replica updates. The padded layout ensures this by grouping each GPU’s gradient shards by the replica that updates them and padding the groups to equal size, so it can use a reduce-scatter (Figure 11). The compact layout, used in our DSV4-Pro Muon evaluation, omits this padding and uses an all-reduce.

Figure 11. Hierarchical gradient reduction for Muon with the padded layout, which reduce-scatters gradient shards across replicas (16 GPUs, t=1t = 1, r=4r = 4). Each replica forms one weight group of four GPUs, and each of the four weights (W1W_1–W4W_4) has four replicas. Clockwise: (a) transient full local gradients; (b) partial sums sharded within weight groups; (c) fully reduced shards on assigned replicas; (d) updated weights all-gathered across replicas. In (a), bold outlines mark the stored shards. Colors identify weights; gradient values in (a) and (b) differ across replicas. Dashed outlines mark collective groups.

In both layouts, the assigned replica computes the update, and the updated weight shards are then all-gathered across replicas once per optimizer step (Figure 11(c–Figure 11d)). Within the assigned replica, each matrix’s momentum is still split across pp GPUs, but NS operates on the whole matrix. MCore supports three ways to run NS on these shards:

  • Duplicated NS all-gathers the momentum and runs NS on each of these pp GPUs, reproducing unsharded Muon exactly. Increasing pp does not reduce its per-GPU NS work (Figure 12(a)).

  • Distributed NS keeps the momentum sharded and all-reduces a Gram matrix in every NS iteration. Each GPU computes a partial Gram matrix from its shard, and the all-reduce sums them. The Gram matrix is square in the unsharded dimension, so its all-reduce is smallest when that dimension is the smaller one.

  • Layer-sharded NS assigns each matrix an NS home, one of the pp GPUs, using a greedy assignment that balances NS cost [12]. Packed variable-size all-to-alls (A2Av) send the momentum shards to the homes, which compute each update once and return the update shards (Figure 12(b)), similar to owner-based updates in TorchTitan [62] and FlexShard [10].

Figure 12. Layer sharding removes duplicated NS work. Illustrative GTP4 with TP2 (p=4p = 4, t=2t = 2, r=2r = 2): (a) per-matrix all-gathers let every GPU compute all six updates (32 units/GPU); (b) packed variable-size all-to-all (A2Av) routes inputs to greedily balanced homes, where each update runs once (8 units/GPU), then returns update shards. Tensor widths follow the illustrative NS-cost scale; shaded quarters show GPU 0’s input shards.

These three approaches trade off redundant computation (duplicated), communication in every NS iteration (distributed), and temporary memory and load balance (layer-sharded): each home holds whole matrices, and a matrix cannot be split across homes. Duplicated NS serves as the numerical reference; distributed NS differs from it only by floating-point rounding, and layer-sharded NS matches it bitwise in our tests with default kernels.

In our runs, we choose how to run NS separately for dense and expert weights (hybrid Muon; Figure 13). Each replica is assigned only a few large dense matrices, which layer sharding cannot balance well across its pp GPUs, so MCore chooses between duplicated and distributed NS for each dense matrix with a cost model based on the matrix’s shape, peak compute, and NVLink bandwidth. Each replica is assigned many expert matrices of the same shape, which balance well, so expert weights use layer-sharded NS. A few packed all-to-alls per optimizer step then replace the Gram all-reduces in every NS iteration, which would cross slower inter-domain links.

Hybrid Muon policies

Figure 13. Hybrid Muon policies. (a) Distributed NS for a dense matrix, when the cost model selects it; steps 1–3 repeat in every NS iteration. (b) Layer-sharded experts at TP1.

Checkpointing

GTP saves model and optimizer state through MCore’s distributed checkpointing, which builds on PyTorch’s distributed checkpoint (DCP) library [50]. Each saved shard records its offset within the full weight, so a checkpoint can be loaded with different TP, GTP, EGTP, and data-parallel degrees. Low-precision weights are saved in BF16. Loading pads the logical rows for the new configuration (§ 4.2.2); a GPU whose stored shard falls entirely in the padding receives only zeros.

Evaluation

We seek to answer the following main questions about GTP in this section:

  • Does GTP match the loss curves of baseline training runs (§ 5.2)?

  • How well does GTP scale to 12,288 GPUs (§ 5.3)?

  • How does GTP compare with FSDP and 3D parallelism on throughput and memory at up to 1,024 GPUs (§ 5.4–§ 5.5)?

  • How do the design and implementation choices in § 3 and § 4 affect throughput and memory (§ 5.6–§ 5.10)?

Experimental Setup

Hardware. We use NVIDIA GB300 GPUs, four per node, each with approximately 298 GB of high-bandwidth memory (HBM). The GPUs are organized into 72-GPU NVLink domains [46] with 900 GB/s of NVLink bandwidth per GPU, and nominal inter-domain network bandwidth of 100 GB/s per GPU.

Implementation and software. GTP is integrated into MCore and TE (§ 4). We use PyTorch 2.13, a TE 2.19 development build, CUDA 13.3, and NCCL 2.31.2. We use Emerging Optimizers 0.3.1 [23, 39] for an implementation of Muon.

Baselines. We compare GTP with MFSDP [43] and PyTorch FSDP2 in TorchTitan [51, 54]. Both shard training state and re-materialize parameters around each module’s execution. We also compare with 3D parallelism (TP, PP, and DP, combined with EP for MoE layers) using a recipe adapted from Megatron Bridge [40]. Each throughput comparison matches the model configuration, GPU count, sequence length, global batch size, compute precision, and activation offloading and recomputation policy. VPP denotes virtual (interleaved) pipeline parallelism [35]. A suffix gives a parallelism’s degree; for example, GTP64 denotes 64-way dense parameter sharding and EGTP4 four-way expert parameter sharding. Unspecified degrees are one. MBS and GBS denote the microbatch and global batch sizes in sequences, and GA the number of gradient-accumulation microbatches per training step. Unless otherwise specified, performance benchmarks use random initialization, AdamW, MXFP8 precision, and forced MoE load balancing.

Workloads. We evaluate GTP on DeepSeek-V3 (DSV3) [6], DeepSeek-V4-Pro (DSV4-Pro) [7], and Internal-2T, an internal 2T-parameter model. Table 3 summarizes full-model configurations and proxy depths. We abbreviate token and batch counts with K=210K = 2^{10} and M=220M = 2^{20}; for example, 8K denotes 8,192 tokens. To fit on fewer GPUs, some comparisons use proxy models with fewer layers but unchanged layer dimensions. We check correctness on Nemotron-3-Nano (NT3-Nano) [36].

ModelTotal parametersActive parametersLayers (full / proxy)Experts / top-kkhh / h′h'Sequence length
NT3-Nano [36]31.6B3.2B52 / –128 / 62688 / 18568192
DSV3 [6]671B37B61 / 30256 / 87168 / 20484096
DSV4-Pro [7]1.6T49B61 / 30384 / 67168 / 30724096
Internal-2T2T130B164 / 55512 / 103072 / 102408192; 2162^{16}–2202^{20}

Table 3. Benchmark model configurations. Parameter counts are for the full model; active parameters are those used per token. The hidden size is hh, and each expert’s intermediate size is h′h' (§ 2.1). Proxies retain layer dimensions; – denotes no proxy. Layers exclude multi-token prediction (MTP) layers [6]: DSV3 and DSV4-Pro have one MTP layer; Internal-2T has two in the scale-out experiments and none in the proxy and long-context experiments. Sequence lengths are in tokens.

Performance metrics. We report Tokens/s/GPU and Model TFLOP/s/GPU [41], which counts forward- and backward-pass FLOPs, excluding recomputation. For comparisons across Megatron and TorchTitan, we use tokens/s/GPU because their native model-FLOP estimators differ, including causal-attention accounting [44, 55]. Throughput is averaged over training steps after a warmup period. Per-GPU memory denotes total device memory usage, including memory reserved by PyTorch’s caching allocator but not currently allocated, in decimal GB; we report the maximum observed usage across the sampled GPUs.

Profiling metrics. Exposed communication is the total time during which at least one communication kernel runs and no compute kernel runs on the profiled GPU. We report it as a fraction of step time, except for backward-pass all-gathers, which we report as a fraction of the time during which any backward-pass all-gather runs. Communication categories can overlap, so their exposed fractions do not sum to the total.

Loss Curves

Figure 14 compares Nemotron-3-Nano training and validation losses with and without GTP. The GTP AdamW run applies AdamW directly to the stored shards, as described in § 4.5.1. On Nemotron-3-Nano, trained for 158,900 training steps (roughly 1T tokens), GTP’s mean absolute validation-loss difference from the baseline is 0.0022 nats, with a mean absolute relative difference of 0.16%, over 158 matched validation checkpoints. Both AdamW runs use MXFP8; the baseline uses TP2 and EP32 on 768 GPUs, and GTP uses GTP8 and EP8 on 256 GPUs. The figure also includes GTP with Muon to demonstrate optimizer support; it has no matched 3D-parallelism baseline, so its lower loss should not be attributed to GTP. We also obtained matching loss curves with EGTP on 100B- and 500B-parameter internal models.

Figure 14. Nemotron-3-Nano loss curves over 1T tokens (8K sequences, GBS768). The AdamW runs compare 3D parallelism on 768 GPUs with GTP on 256 GPUs. Training loss is smoothed with an exponential moving average; validation loss is evaluated every 1,000 training steps. GTP uses dense parameter sharding (GTP8) without expert parameter sharding. The additional GTP–Muon curve uses a different optimizer and has no matched 3D-parallelism baseline.

Throughput at Scale

With GTP, Internal-2T training reaches 13.0 model EFLOP/s (1,060 TFLOP/s/GPU) on 12,288 GPUs with PP1, MBS1, and 8K sequences without forced load balancing (Table 4). These full-model runs use Muon (momentum 0.9, 16 NS iterations with Polar Express coefficients [1]) and eager execution. Scale-out increases the number of data-parallel replicas while keeping GTP64, EGTP8, and EP64 fixed. With one sequence per GPU (GA1), weak-scaling efficiency from 4,096 to 12,288 GPUs is 98.2%. At a fixed GBS of 12,288 sequences, halving the GPU count from 12,288 to 6,144 (doubling GA to 2) increases per-GPU throughput by 9%.

(a) Weak scaling
One sequence per GPU
GPUsGBSTFLOP/s per GPUAggregate (EFLOP/s)Scaling efficiency
4,0964,0961,0794.42–
8,1928,1921,0848.88100.5%
12,28812,2881,06013.0398.2%
(b) Strong scaling
Fixed GBS of 12,288 sequences
GPUsGBSTFLOP/s per GPUAggregate (EFLOP/s)Scaling efficiency
6,14412,2881,1567.10–
12,28812,2881,06013.0391.7%

Table 4. Internal-2T training throughput at scale. GBS counts sequences. Per-GPU throughput is the median, over a run’s logging intervals, of each 10-step interval’s mean throughput. Aggregate throughput is per-GPU throughput times GPU count, in model EFLOP/s.

Comparison with FSDP Implementations

We compare GTP with two FSDP implementations: MFSDP, weak-scaled from 256 to 1,024 GPUs on three models, and PyTorch FSDP2 in TorchTitan, in a matched comparison on the DSV3 proxy at 256 GPUs. GTP achieves 1.051.05–1.55×1.55\times MFSDP’s throughput with 4–16% lower per-GPU memory, and achieves 1.04×1.04\times FSDP2’s throughput with 16% lower per-GPU memory.

Weak Scaling against MFSDP

We weak-scale GTP and MFSDP from 256 to 1,024 GPUs on full DSV3 and the DSV4-Pro and Internal-2T proxies (Figure 15(a–Figure 15c)). DSV3 and DSV4-Pro use MBS2 and full-iteration CUDA graphs; the Internal-2T proxy uses MBS1 and eager execution. All comparisons use EP64. GTP shards dense weights across 64 GPUs within an NVLink domain; MFSDP shards parameters and gradients across 64 GPUs, and shards optimizer state across all GPUs. GTP also uses EGTP4, whereas MFSDP does not shard expert weights beyond EP.

Figure 15. Weak-scaling throughput and memory for GTP vs. MFSDP (GA1): (a) full DSV3, (b) DSV4-Pro proxy, and (c) Internal-2T proxy. Throughput is in model TFLOP/s/GPU; labels show GTP’s speedup over MFSDP at the same GPU count. Dashed lines connect each method’s points in GPU-count order to show weak-scaling trends. MFSDP baselines are based on MCore 0.20.0 development code [43], with model-specific extensions and fixes.

At 256 GPUs, GTP achieves 1.05×1.05\times, 1.25×1.25\times, and 1.21×1.21\times MFSDP’s throughput on full DSV3, the DSV4-Pro proxy, and the Internal-2T proxy, respectively (Figure 15(a–Figure 15c)). Across 256–1,024 GPUs, GTP’s per-GPU memory is 4–13%, 13–16%, and 7–11% lower than MFSDP’s, respectively.

GTP’s advantage over MFSDP. In the evaluated MFSDP configurations, backward hooks wait for all parameter all-gathers of a Transformer block (DSV3 and DSV4-Pro) or, for Internal-2T, of a pair of consecutive layers (a linear attention layer or a global softmax attention layer, and the MoE layer after it) before starting that block’s backward computation. Each GTP GEMM instead waits only for its own weights (§ 3.1). These MFSDP configurations do not shard expert weights beyond EP, so they never all-gather expert weights, and GFC1 never waits for GFC2’s weights. On DSV4-Pro at 256 GPUs, profiles show that 20% of GTP’s backward-pass all-gather time is exposed, versus 80% for MFSDP, and that GTP’s backward pass is 18.3% shorter. Gains are smaller on DSV3, which has more tokens per expert per microbatch under balanced routing than DSV4-Pro and Internal-2T (16,384, versus 8,192 and 10,240). More tokens per expert provide more computation per all-gathered byte (Equation (4)), which leaves less room for GTP’s scheduling to improve overlap.

GTP’s advantage grows with scale. From 256 to 1,024 GPUs, GTP’s weak-scaling efficiency is 98.0%, 98.2%, and 98.7% on DSV3, DSV4-Pro, and Internal-2T, respectively. MFSDP’s is only 79.3% on DSV4-Pro and 86.7% on Internal-2T, so at 1,024 GPUs GTP achieves 1.55×1.55 \times and 1.38×1.38 \times MFSDP’s throughput on these models. On DSV4-Pro, both methods’ compute time changes by less than 2% from 256 to 1,024 GPUs, so MFSDP’s step time grows from increased exposed communication time, mostly in the backward pass. MFSDP’s exposed backward-pass all-gather time is much larger at 1,024 GPUs than at 256 GPUs (1.26 vs. 0.34 s in profiled steps) and varies widely across training steps. At 512 GPUs, this time ranges from 390 to 932 ms across steps, and nearly all of the difference is spent waiting for the last GPU in each group to start each all-gather. GTP’s exposed backward-pass all-gather time stays nearly flat from 256 to 1,024 GPUs.

Matched Comparison with PyTorch FSDP2

We compare GTP with PyTorch FSDP2 in TorchTitan [51, 54] on the DSV3 proxy at 256 GPUs, because full DSV3 does not fit in the evaluated FSDP2 configuration. Both use MBS2, GBS512, GA1, EP64, and 64-way dense sharding. We use EGTP4 for GTP, and TorchTitan (with a local dense-mesh adapter) likewise shards expert weights four ways. GTP and TorchTitan keep multi-head latent attention (MLA) down-projections replicated. TorchTitan falls back to BF16 all-gathers for dense weights whose shards do not meet MXFP8 alignment; its expert all-gathers use MXFP8.

Higher throughput and lower memory than FSDP2. GTP achieves 1.04×1.04 \times FSDP2’s throughput (Table 5). Full-step profiles show less time in dense GEMMs and exposed communication, but more in expert GEMMs and standalone quantization (Figure 16). The quantization difference (48 vs. 22 ms) partly reflects fusion boundaries: TorchTitan’s Dist-MoE backend [33] includes EP exchange and input quantization inside expert GEMMs, whereas GTP executes HybridEP kernels [17] and quantizers separately. Normalization takes 15 vs. 10 ms, and the remaining elementwise work takes about 71 ms in both methods.

MethodTokens/s per GPURelative rateMemory (GB/GPU)
PyTorch FSDP2 (TorchTitan)8,5031.00×219
GTP8,8621.04×183

Table 5. Throughput and memory for the DSV3 proxy on 256 GPUs. Relative rates are normalized to FSDP2.

Step-time breakdown for the DSV3 proxy on 256 GPUs

Figure 16. Step-time breakdown for the DSV3 proxy on 256 GPUs. Each interval of the step is assigned to one category, so the segments sum to the step time. Quantization counts standalone kernels; FSDP2’s expert GEMMs also include fused EP token exchange and quantization. Elementwise covers the remaining pointwise and reduction kernels. Other includes attention, optimizer work, copies, and idle time.

GTP uses 16% less GPU memory than FSDP2 (183 vs. 219 GB per GPU). GTP limits temporary storage through MXFP8 weight all-gathers and release of all-gather and reduce-scatter buffers after their last use; TorchTitan’s BF16 all-gathers for unaligned dense shards need larger buffers.

Comparison with 3D Parallelism

We compare GTP and 3D parallelism on the DSV4-Pro proxy at 256–1,024 GB300 GPUs. For weak scaling, we hold the work per GPU at four 4K sequences per training step, giving GBS1K at 256 GPUs. 3D parallelism uses TP1, PP4, VPP4, and EP64, with 8, 8, 7, and 7 layers per stage; GTP uses GTP64, EGTP4, and EP64. Both use full-iteration CUDA graphs, offload core-attention activations to host memory, and selectively recompute MLA up-projections and manifold-constrained hyper-connections (mHC) [69].

GTP and PP face different microbatch tradeoffs. We tune each method’s MBS for throughput under the same hardware memory constraints. Larger microbatches can improve GEMM efficiency for both methods and help GTP hide weight all-gathers. At fixed GBS, however, they leave PP with fewer microbatches to fill the pipeline and increase activation memory. At 256 GPUs and GBS1K:

  • GTP saves memory at matched MBS. GTP uses 11% and 13% less memory than 3D parallelism at MBS1 and MBS2, respectively (169 vs. 191 and 247 vs. 285 GB/GPU). GTP does not retain activations for multiple in-flight microbatches, and it shards dense weights more finely than TP1 with PP4 does.

  • GTP trades higher memory use for higher throughput. Increasing MBS from one to two raises GTP’s throughput from 601 to 944 model TFLOP/s/GPU and memory from 169 to 247 GB/GPU. For 3D parallelism, the same change reduces throughput from 743 to 698 model TFLOP/s/GPU while raising memory from 191 to 285 GB/GPU.

For the scaling comparison, we use MBS2 for GTP and MBS1 for 3D parallelism, giving two microbatches per training step for GTP and 16 per pipeline for 3D parallelism. With these choices, GTP achieves 1.271.27–1.31×1.31\times the throughput of 3D parallelism across 256–1,024 GPUs while using 29–48% more memory (Figure 17(a)).

Figure 17. GTP vs. 3D parallelism on the DSV4-Pro proxy (GTP with MBS2; 3D parallelism with MBS1). (a) Weak scaling at 256–1,024 GPUs; labels show GTP’s speedup. (b–c) Profiles from separate 256-GPU runs at GBS1K: (b) step time normalized to 3D stage 0; (c) exposed communication as a fraction of each method’s step (GPU 0 for GTP; stage 0 for 3D parallelism). Other: copies and idle time in (b); DP communication and remaining synchronization in (c); PP includes peer waiting.

Stage imbalance slows 3D parallelism. To examine this advantage, we use profiles of both methods at 256 GPUs and GBS1K (Figure 17(b–Figure 17c)). Per-GPU compute time is similar: about 2.3 s per step for GTP, versus a mean of 2.1 s across the pipeline stages in the 3D-parallelism baseline. These stages are imbalanced, however: the last stage’s compute time exceeds the stage mean by 20%, and the pipeline runs at the speed of its slowest stage. The other stages spend the difference waiting, which appears as PP transfers and peer waiting: 29% of stage 0’s step, compared with an ideal balanced-stage bubble of 4.5% [35]. GTP has no stages to balance, so its step is 20% shorter, even though its weight all-gathers and gradient reduce-scatters expose 8% and 5% of the step.

Larger global batches narrow GTP’s throughput advantage. On 256 GPUs with 4K sequences, increasing GBS from 1K to 8K improves the best throughput of 3D parallelism (across MBS1 and MBS2) by 13%, versus 3% for GTP, since larger batches amortize pipeline fill and drain over more microbatches (Figure 18). GTP’s advantage narrows from 26% to 16%, but it remains faster at every measured GBS. The remaining gap reflects the stage imbalance described above. Changing the MBS does not change this: with MBS2, 3D parallelism ranges from 5% slower to 1% faster than with MBS1 across GBS, and uses about 90 GB more memory per GPU. These are separate runs from Figure 17, so absolute numbers differ slightly.

Figure 18. Throughput of the DSV4-Pro proxy on 256 GB300 GPUs with 4K sequences as GBS varies, for GTP with MBS2 and 3D parallelism with MBS1 and MBS2.

Long-Context Training

To evaluate long-context training, we vary the sequence length of full Internal-2T from 8K to 1M tokens on 512 GPUs, keeping 4M tokens per training step (Table 6). As sequence length grows, we increase the CP degree from 1 to 128 so that each GPU continues to process 8K tokens. All configurations in the sweep use AdamW, GTP64, EGTP8, EP64, MBS1, and the same activation recomputation and offloading policy.

With CP128, full Internal-2T runs training steps with 1M-token sequences at 283 GB per GPU. From 8K to 1M, model throughput falls 30%, from 1,258 to 883 TFLOP/s/GPU, while step time rises from 5.1 to 35.8 s (Table 6).

Sequence lengthCPGBSStep time (s)Memory (GB/GPU)Model TFLOP/s/GPU
8K15125.12721,258
64K8647.02801,127
256K321612.42901,018
1M128435.8283883

Table 6 | Long-context results at fixed 4M tokens per step on 512 GPUs, with forced balanced routing and eager execution. GBS counts sequences per step.

Softmax attention drives the growth in computation. At fixed TT tokens per step, softmax attention requires O(TL)O(TL) work for sequence length LL. Softmax attention duration grows 15.3× from 64K to 1M for a 16× increase in sequence length (Figure 19). Across the sweep, GEMM duration varies by less than 5%, while softmax attention, which runs in BF16, grows from 3% to 64% of summed GPU activity, reducing the share spent on faster MXFP8 GEMMs.

Figure 19. GPU-duration breakdown of the Internal-2T long-context sweep on 512 GPUs, without subtracting overlap. Widths sum kernel and copy durations; totals are not elapsed step times. Numeric labels show each component’s normalized duration relative to its 8K value, except CP, which uses 64K as its baseline since 8K has no CP communication. Other computation groups computation outside GEMMs and attention; other activity groups HybridEP, gradient synchronization across replicas, remaining collectives, and copies.

Outer CP adds inter-domain traffic. At 256K, each CP32 group fits within one NVLink domain. At 1M, each sequence spans two 64-GPU weight groups, giving CP128 across two NVLink domains while dense GTP64 stays within each domain (§ 4.1.2).

  • CP communication grows and rarely overlaps computation at 1M. From 64K with CP8 to 1M with CP128, summed CP duration grows 12.5× (Figure 19), as exchanges of softmax-attention key-value pairs and of recurrent states from linear attention layers span more sequence partitions and cross the slower InfiniBand (IB) links between domains. At 1M, 99.8% of CP time has no concurrent computation, although 47.6% overlaps other communication.

  • Weight all-gathers take longer at 1M, partly from waiting on other GPUs. At 1M, summed dense GTP and EGTP durations reach 1.3× and 1.7× their 8K values (Figure 19), even though weight payloads and collective counts are unchanged. Each EP64 group fills one NVLink domain, so each EGTP8 group spans all eight domains and therefore four CP128 groups; its all-gathers wait for the slowest of those groups and share IB links with CP. The added EGTP time with no concurrent computation is about 1 s of the 35.8 s step.

Per-GEMM Scheduling Ablations

We remove separate expert prefetch chains (C1), consumer-specific waits (C2), and expert-weight coalescing (C3), individually and cumulatively, on two benchmark models, holding all other settings fixed (Figure 20(a–b)). Both use GTP64, EGTP4, EP64, and GA1; DSV4-Pro uses MBS2 and GBS512, and Internal-2T uses MBS1 and GBS256. DSV4-Pro uses full-iteration CUDA graphs; Internal-2T uses eager execution.

Figure 20. Scheduling ablations on (a) DSV4-Pro proxy and (b) Internal-2T proxy, both on 256 GPUs and normalized to each model’s full GTP (100%). Points show full GTP, independent removals of C1, C2, and C3, and cumulative removals of C1 and C2 and of all three.

Without C1, GFC1 and GFC2 share one expert prefetch chain. Without C2, a GEMM that consumes a prefetched weight also waits for all work already queued on that weight’s all-gather stream, including prefetches for other GEMMs. Without C3, each local expert weight is all-gathered separately rather than coalesced with the other weights feeding the same grouped GEMM.

Each mechanism improves throughput in both workloads. Independently removing C1, C2, and C3 reduces throughput by 12.2%, 15.7%, and 8.3% on DSV4-Pro and 4.4%, 2.7%, and 3.4% on Internal-2T, respectively; the largest individual loss comes from C2 on DSV4-Pro and C1 on Internal-2T.

Gains are larger on DSV4-Pro. Removing all three mechanisms reduces throughput by 19.8% on DSV4-Pro and 5.9% on Internal-2T. Under balanced routing, Internal-2T processes 25% more tokens per expert per microbatch (10,240 versus 8,192), providing more arithmetic per all-gathered weight (Equation (4)). Its smaller scheduling loss is consistent with more computation covering communication, although the models and execution modes both differ.

Gains are not additive. Individual losses sum to 36.2% on DSV4-Pro and 10.5% on Internal-2T, but removing all three costs only 19.8% and 5.9%, respectively. Once C1 and C2 are removed, also removing C3 lowers throughput from 80.3% to 80.2% of full GTP on DSV4-Pro, a difference too small to resolve without repeated runs, and from 95.7% to 94.1% on Internal-2T.

Muon on Sharded Weights

We compare hybrid Muon (§ 4.5.2) with duplicated NS on the DSV4-Pro proxy at 256, 512, and 1,024 GPUs (Figure 21). All three scales use 8K sequences, GTP64, EGTP4, EP64, MBS1, and GA1.

Figure 21. Duplicated and hybrid Muon on the DSV4-Pro proxy (8K; GBS equals GPU count; one run per point). (a) Model throughput, with hybrid token-throughput speedups labeled. (b) Peak per-GPU memory.

Both Muon modes use momentum 0.95 and ten NS iterations with DeepSeek-V4’s coefficients [7]. CUDA graphs are disabled.

Hybrid Muon improves throughput at every scale, with diminishing gains. Hybrid Muon improves token throughput by 1.55×1.55 \times at 256 GPUs, 1.34×1.34 \times at 512 GPUs, and 1.15×1.15 \times at 1,024 GPUs as GPU count and GBS scale together (Figure 21(a)). These runs measure the combined configuration and do not separate the dense and expert contributions.

More replicas reduce per-GPU NS work. At 256, 512, and 1,024 GPUs, each dense weight has 4, 8, and 16 replicas, and each expert weight has 1, 2, and 4, while tokens per GPU and sharding degrees stay fixed. Each replica updates a smaller share of the matrices (§ 4.5.2), so each GPU performs fewer NS updates in both modes. Less optimizer work shortens the step while forward-and backward-pass work stays roughly unchanged, so per-GPU throughput rises. Less NS work per GPU also narrows hybrid Muon’s relative advantage (Figure 21(a)).

Layer sharding’s extra memory shrinks with scale. At 256 GPUs, hybrid Muon uses about 23 GB more device memory than duplicated NS (Figure 21(b)). Each NS home temporarily holds whole FP32 matrices and exchange buffers (§ 4.5.2). As GPU count grows, the expert matrices assigned to each four-GPU weight group for expert weights fall from 372 to 186 to 93, shrinking these buffers. At 512 and 1,024 GPUs, device memory is comparable across the two modes.

Symmetric User Buffers

We compare dense GTP with UB off, UB RS, and UB AG+RS (§ 4.2.3) on the Internal-2T proxy at 256 and 512 GPUs (Figure 22). Expert-weight reduce-scatters keep the all-to-all path, and DDP’s gradient collectives do not use UB. All other settings, including eager execution, are fixed across modes.

Figure 22. Dense user-buffer modes on the Internal-2T proxy at 256 and 512 GPUs: (a) throughput normalized to UB off at each GPU count; (b) per-GPU memory (GB).

Higher throughput with lower memory use. At 256 GPUs, UB RS and UB AG+RS improve throughput over UB off by 4.0% and 4.4% and reduce per-GPU memory by 20% and 21%, respectively. At 512 GPUs, both modes improve throughput by about 5% and reduce per-GPU memory by about 24%. UB RS captures most of the benefit at both scales, with little additional gain from registering all-gather buffers. The memory savings come from avoiding the all-to-all path’s receive buffers (§ 4.2.3).

Sharding Granularity and Padding Tradeoffs

Sharding a weight more finely shrinks each GPU’s stored shard, but MXFP8 and NVFP4 require each shard’s row count to be a multiple of their block size, so the added padding can shrink or even eliminate these savings (§ 4.2.2). Table 7 quantifies the added weight elements relative to each GEMM’s logical size at TP1. These percentages describe weight storage and collective payloads, excluding scales, optimizer state, and temporary buffers.

GEMMLogical shapeMXFP8NVFP4
GTP32GTP64GTP128GTP64GTP128
DSV3
Attention output projection7,168×16,3847{,}168 \times16{,}3840.0%14.3%14.3%0.0%14.3%
Shared-expert FC27,168×2,0487{,}168 \times2{,}0480.0%14.3%14.3%0.0%14.3%
Q down-projection (if sharded)1,536×7,1681{,}536 \times7{,}16833.3%33.3%166.7%33.3%33.3%
DSV4-Pro
Attention output projection7,168×16,3847{,}168 \times16{,}3840.0%14.3%14.3%0.0%14.3%
Shared-expert FC27,168×3,0727{,}168 \times3{,}0720.0%14.3%14.3%0.0%14.3%
KV projection (if sharded)512×7,168512 \times7{,}168100.0%300.0%700.0%100.0%300.0%

Table 7. Calculated padding overhead for DSV3 and DSV4-Pro weights at TP1. Shared experts use dense GTP. Our GTP benchmarks keep DSV3’s MLA down-projections and DSV4-Pro’s KV weight replicated; rows marked “if sharded” show counterfactual costs. We do not run GTP128 or NVFP4.

Selective sharding avoids disproportionate padding. With MXFP8 and GTP64, attention output and shared-expert FC2 GEMMs incur 14.3% padding in both models. Sharding DSV3’s Q down-projection and DSV4-Pro’s KV projection would incur 33.3% and 300% padding, respectively. Whether to shard a weight should depend on its shape.

Padding can eliminate further memory savings for individual weights. Under MXFP8, moving either model’s attention output projection from GTP32 to GTP64 reduces stored elements per GPU by 43%, while increasing the padded payload by 14.3%. If DSV3’s Q down-projection were sharded, GTP64 and GTP128 would both store 32 aligned rows per GPU: padding would rise from 33.3% to 166.7%, doubling the collective payload without further storage savings. NVFP4 would eliminate padding for the attention output projections at GTP64, but would leave 33.3% for the Q down-projection if sharded.

Padding increases storage and communication costs. GTP removes padded rows before GEMMs, so GEMM shapes and FLOPs are unchanged. Padding enlarges stored shards and collective payloads; its throughput impact can depend on memory pressure and communication contention as well as exposed transfers.

Smaller expert sharding degrees avoid row padding. At TP1, routed FC1 and FC2 weights in DSV3 and DSV4-Pro require zero MXFP8 row padding at EGTP2, EGTP4, and EGTP8: their output dimensions are divisible by 32×8=25632 \times8 = 256 rows. Configuring dense GTP and EGTP independently permits wide dense sharding without imposing the same alignment cost on experts.

Lessons for Configuring GTP

GTP’s generality comes with many configuration choices, and the best choice depends on the model, training hyperparameters such as batch size, and the cluster. This section briefly discusses how these choices should be made.

Hiding Parameter All-Gathers

Parameter sharding trades stored-weight memory for all-gather traffic. Overlapping the all-gathers with computation can partially hide this cost. The freed memory also allows larger microbatches, which provide more computation to hide the all-gathers.

Tokens per expert set the overlap budget. Equation (4) explains why tokens per expert matter when configuring GTP: more tokens provide more computation to cover each weight all-gather. Under balanced routing, tokens per expert per microbatch range from 8,192 for DSV4-Pro to 16,384 for DSV3; § 5.4.1 relates these differences to the observed scheduling gains. Larger microbatches, longer local sequences, and larger EP degrees raise ses_e; gradient accumulation does not, because it repeats both the computation and the all-gathers. Raising the EGTP degree rer_e moves the all-gathered fraction 1−1/re1 - 1/r_e only slowly toward 1; the main cost of a larger rer_e is that all-gathers spanning NVLink domains see a much lower BeB_e. For dense weights, our within-domain placement keeps all-gathers on NVLink (§ 4.1), reducing all-gather time relative to cross-domain placement.

Scheduling limits overlap. A high ratio in Equation (4) is an opportunity, not a guarantee: the schedule must deliver each weight before its consumer runs. GFC1 and GFC2 need their weights at different times; with consumer-specific waits (C2), a GEMM stalls only if its own weights are not ready when its other inputs are (§ 3.3). On DSV4-Pro, disabling consumer-specific waits (C2) alone reduces throughput to 84.3% of full GTP at unchanged token count and all-gather volume (§ 5.7).

Memory limits how far ss can grow. Increasing ss raises activation memory. Increasing EP can raise tokens per expert without increasing input tokens per GPU, but changes dispatch buffers and local-expert counts; keeping EP within an NVLink domain also caps its degree at the domain size. Prefetched weights also occupy memory, limiting the lookahead (§ 3.1). Recomputation or offloading frees memory at added computation or transfer cost.

Choosing Parallelism Degrees and Placement

Configuring GTP means choosing the TP, re-materialization (rr for dense weights, rer_e for expert weights), and CP degrees, and placing each group of GPUs relative to NVLink domains. Each choice trades communication against memory; the balance depends on tokens per GPU and layer shapes.

TP degree. TP’s activation communication grows with tt, whereas parameter communication shrinks; (3) gives the TP degree that minimizes the combined communication time assuming a bandwidth-only model. Small TP degrees suit many tokens per GPU, and larger degrees suit few tokens, wide layers, or fast TP links; for MoEs, h′h' is each expert’s intermediate size, not the number of experts.

Re-materialization degrees. Larger re-materialization degrees shrink each GPU’s stored weights and gradients to 1/(t⋅r)1/(t \cdot r) of each dense weight and 1/re1/r_e of each expert weight, but each all-gather then spans more GPUs. The t⋅rt \cdot r GPUs that together hold one replica of each dense weight should stay within an NVLink domain, which keeps per-microbatch weight all-gathers on fast links. Expert weights can instead use a larger rer_e that spans domains (§ 4.1.3): their all-gathers are prefetched on separate chains (C1) and do not grow with tokens, provided the ratio in Equation 4 stays high at the lower cross-domain bandwidth. Small weights can remain replicated when sharding saves little memory or introduces disproportionate padding (§ 4.1.1 and § 5.10).

CP degree. At fixed sequence length and MBS, increasing CP reduces tokens per GPU and their activation storage. With GPU count and TP and PP degrees also fixed, it leaves fewer independent batch partitions. Keeping GBS fixed then requires more gradient-accumulation microbatches. These extra microbatches repeat weight all-gathers, while fewer tokens per GEMM can reduce compute efficiency. The attention backend must also communicate over a larger CP group. For long sequences, increasing CP in proportion to sequence length keeps tokens per GPU and the number of microbatches fixed, as in our long-context experiments (§ 5.6).

EP and CP placement. EP should stay within an NVLink domain (e.g., EP64 in a 72-GPU domain [46]), because dispatch and combine feed dependent computation and grow with local tokens. CP should also stay within an NVLink domain when activation memory permits. When CP must span domains, each weight group for dense weights should still stay within an NVLink domain (§ 4.1.2), and CP then shares the inter-domain network with EGTP (§ 5.6).

Tradeoffs with Pipeline Parallelism

Memory. PP and GTP both reduce each GPU’s parameter and optimizer-state footprint in proportion to their degrees. In MoE models, most parameters are expert weights, so the relevant comparison is between the PP and EGTP degrees. GTP also reduces activation memory in proportion to the number of GPUs it spans, but it adds a fixed buffer overhead for re-materialized weights and their gradients. PP introduces a memory asymmetry: although each stage stores activations only for its own layers, the first stage retains them for as many in-flight microbatches as there are stages, so its activation memory does not shrink.

Throughput. PP’s main throughput overhead is pipeline fill and drain, which is amortized over the microbatches in a training step and therefore shrinks as the number of microbatches grows. Virtual pipelining shortens fill and drain by assigning each GPU several smaller model chunks, at the cost of more point-to-point communication [35]. PP also needs computation balanced across stages, which is harder for hybrid models whose layer types differ in cost, and harder still with virtual pipelining, since each chunk contains fewer layers to balance. GTP’s main throughput overhead is its weight all-gathers, which are expensive but can be hidden when each microbatch has enough computation and communication is carefully scheduled (Equation (4)). In our measurements, larger global batches narrowed GTP’s advantage over 3D parallelism as fill and drain were amortized, but stage imbalance kept 3D parallelism slower at every measured batch size (§ 5.5).

Choosing between GTP and PP. GTP alone is preferable when activation memory dominates or when each microbatch has enough computation to hide its all-gathers. Adding PP helps when the global batch is large enough to amortize fill and drain and the stages can be balanced, or when GTP’s all-gathers cannot be hidden.

Related Work

Unified sharding abstractions. GSPMD [70] and Mesh-TensorFlow [59] express data, tensor, and other forms of parallelism as sharding annotations on tensor dimensions over a device mesh, and GSPMD’s compiler propagates these annotations to every operator. Alpa [76] searches over such intra-operator plans jointly with pipeline stages. GTP’s view of DP, TP, SP, CP, and FSDP as partitioning and re-materialization choices is in the same spirit. We focus on what this view implies for communication scheduling: we treat parameter re-materialization as a preprocessing step on one input of a GEMM, including GEMMs inside fused operators, and make it efficient at scale in an eager framework.

FSDP implementations. ZeRO-3 [57] and PyTorch FSDP [75] shard parameters, gradients, and optimizer state, and re-materialize parameters per module. MFSDP [43], PyTorch FSDP2 [53], veScale-FSDP [67], and FlexShard [10] expose controls for prefetching, bucketing, and grouping parameters, and DeepSpeed ZeRO-3 prefetches parameters in the module order recorded during a traced training step [8]. These systems grew out of data parallelism and share a unit-based scheduling model. They differ in how units are formed and in the prefetching, bucketing, and retention controls they expose. § 3.1 discusses the costs of this model for fused MoE layers. Finer units, such as separate MFSDP units for FC1 and FC2, can address some of these costs but must be configured per model. We evaluate GTP against MFSDP and PyTorch FSDP2 in § 5.4.

veScale-FSDP and FlexShard are two other recent FSDP implementations, which focus on how parameters are distributed across GPUs. veScale-FSDP uses RaggedShard layout planning and DBuffer views to group communication, align storage, and reduce copies [67]. FlexShard aligns storage with optimizer ownership to avoid redistribution for Muon updates, and supports block-aligned FP8 layouts and configurable communication groups [10]. Its owner assignment balances whole matrices by parameter count, whereas GTP’s layer-sharded NS balances them by NS cost.

MiCS [74], ZeRO++ [64], and HSDP [75] confine parameter all-gathers to subgroups on fast links. GTP’s weight groups similarly keep weight all-gathers on fast links. GTP also partitions data independently of the weight groups, so weight all-gathers do not need to be performed over full CP groups, and a long sequence can span several weight groups (§ 4.1).

3D parallelism. 3D parallelism, which combines TP, PP, and DP, has been widely used to train large models [15, 34, 35], but its PP component has three weaknesses. Pipeline fill and drain leave GPUs idle unless each training step has many microbatches. Stages must be balanced, or faster stages wait for slower ones. Each stage also holds activations for several in-flight microbatches. Prior work reduces these costs: PipeDream uses profile-guided partitioning to balance pipeline stages [34 Section 3.1], and Alpa jointly searches stage partitions and device assignments for heterogeneous layers [76 Sections 5 and 8.1]. Megatron-LM’s virtual pipeline parallelism interleaves model chunks to reduce ideal pipeline bubbles at the cost of increased inter-stage communication [35 Section 2.2.2]. GTP composes with PP; configurations without PP avoid stage imbalance and pipeline bubbles, but need enough memory to hold re-materialized weights and enough computation to hide the communication cost of re-materialization (§ 6.3).

Overlapping TP communication. The activations communicated in TP are the output of the preceding computation, so overlapping this communication requires splitting the GEMM and the communication into smaller pieces (§ 2.1). Wang et al. decompose collectives together with their dependent computation [66], T3 triggers communication from the producing GEMM with hardware support [49], FLUX fuses tiled communication into GEMM kernels [4], and Domino slices inputs and weights into independent pieces [65]. GTP’s parameter all-gathers, in contrast, do not depend on preceding computation, so they can be issued ahead of the GEMMs that consume them without splitting any computation; these techniques still apply to GTP’s activation communication when t>1t > 1.

Parallelizing MoE layers. GShard [25], DeepSpeed-MoE [56], Tutel [16], and MegaBlocks [11] accelerate MoE layers with techniques such as expert parallelism, runtime adaptation to changing expert workloads, and specialized kernels. Our implementation builds on MoE Parallel Folding in MCore, which decouples the parallelism mappings of attention and MoE layers [28]; GTP extends it by letting dense and expert weights use different re-materialization degrees (GTP and EGTP). MegaScale-MoE customizes parallelism per module and overlaps MoE communication in production [21], and COMET overlaps EP communication with expert computation at fine granularity [73]. These systems make token exchange and expert computation more efficient; GTP composes with EP and with these optimizations.

Conclusion

In this paper, we showed that, for linear layers, five commonly used parallelisms (DP, TP, SP, CP, and FSDP) are special cases of a new framework we call generalized tensor parallelism (GTP), in which parameters and activations are partitioned and either can be re-materialized. Treating parameter re-materialization as a preprocessing step on one input of a GEMM, rather than a step before an entire Transformer block, lets us schedule all-gathers per GEMM. With our implementation in MCore and TE, an internal 2T-parameter MoE model reaches 13.0 model EFLOP/s on 12,288 GB300 GPUs. On 256–1,024 GPUs, our implementation achieves 1.051.05–1.55×1.55\times MFSDP’s throughput. across three MoE models and 1.27–1.31×\times the throughput of a tuned 3D-parallel recipe on the DSV4-Pro proxy.

Acknowledgments

We thank Xiaowei Ren, Yashaswi Karnati, Peter Dykas, Zhongbo Zhu, Zhengyang Wang, Hongxiao Bai, Yuzhong Wang, Sangkug Lym, and Michael Andersch for their contributions to this work. We also thank colleagues not listed individually, and the open-source community for co-developed features, feedback, and continued engagement.

References

  1. [1]Noah Amsel, David Persson, Christopher Musco, and Robert M. Gower. The Polar Express: Optimal Matrix Sign Methods and Their Application to the Muon Algorithm. arXiv preprint arXiv:2505.16932, 2025.arxiv.org/abs/2505.16932
  2. [2]Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer Normalization. arXiv preprint arXiv:1607.06450, 2016.arxiv.org/abs/1607.06450
  3. [3]Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language Models are Few-Shot Learners. In Advances in Neural Information Processing Systems (NeurIPS), 2020.arxiv.org/abs/2005.14165
  4. [4]Li-Wen Chang, Wenlei Bao, Qi Hou, Chengquan Jiang, Ningxin Zheng, Yinmin Zhong, Xuanrun Zhang, Zuquan Song, Chengji Yao, Ziheng Jiang, Haibin Lin, Xin Jin, and Xin Liu. FLUX: Fast Software-based Communication Overlap on GPUs Through Kernel Fusion. arXiv preprint arXiv:2406.06858, 2024.arxiv.org/abs/2406.06858
  5. [5]Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, Parker Schuh, Kensen Shi, Sasha Tsvyashchenko, Joshua Maynez, Abhishek Rao, Parker Barnes, Yi Tay, Noam Shazeer, Vinodkumar Prabhakaran, Emily Reif, Nan Du, Ben Hutchinson, Reiner Pope, James Bradbury, Jacob Austin, Michael Isard, Guy Gur-Ari, Pengcheng Yin, Toju Duke, Anselm Levskaya, Sanjay Ghemawat, Sunipa Dev, Henryk Michałewski, Xavier Garcia, Vedant Misra, Kevin Robinson, Liam Fedus, Denny Zhou, Daphne Ippolito, David Luan, Hyeontaek Lim, Barret Zoph, Alexander Spiridonov, Ryan Sepassi, David Dohan, Shivani Agrawal, Mark Omernick, Andrew M. Dai, Thanumalayan Sankaranarayana Pillai, Marie Pellat, Aitor Lewkowycz, Erica Moreira, Rewon Child, Oleksandr Polozov, Katherine Lee, Zongwei Zhou, Xuezhi Wang, Brennan Saeta, Mark Diaz, Orhan Firat, Michele Catasta, Jason Wei, Kathy Meier-Hellstern, Douglas Eck, Jeff Dean, Slav Petrov, and Noah Fiedel. PaLM: Scaling Language Modeling with Pathways. Journal of Machine Learning Research, 24(240):1–113, 2023.arxiv.org/abs/2204.02311
  6. [6]DeepSeek-AI. DeepSeek-V3 Technical Report. arXiv preprint arXiv:2412.19437, 2024.arxiv.org/abs/2412.19437
  7. [7]DeepSeek-AI. DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence. arXiv preprint arXiv:2606.19348, 2026.arxiv.org/abs/2606.19348
  8. [8]DeepSpeed Contributors. DeepSpeed ZeRO-3 Parameter Coordinator and Configuration. https://github.com/deepspeedai/DeepSpeed/tree/ff34be65ee1656dcca9a4b31fda3e817bbb34313/deepspeed/runtime/zero, 2026. Revision ff34be65ee16.
  9. [9]William Fedus, Barret Zoph, and Noam Shazeer. Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity. Journal of Machine Learning Research, 23(120):1–39, 2022.arxiv.org/abs/2101.03961
  10. [10]FlexShard Contributors. FlexShard: Pluggable Parameter Sharding and Optimizer Layouts. https://github.com/meta-pytorch/flex_shard/tree/233e90691a55, 2026. Revision 233e90691a55.
  11. [11]Trevor Gale, Deepak Narayanan, Cliff Young, and Matei Zaharia. MegaBlocks: Efficient Sparse Training with Mixture-of-Experts. In Proceedings of Machine Learning and Systems, volume 5, 2023.arxiv.org/abs/2211.15841
  12. [12]Ronald L. Graham. Bounds on Multiprocessing Timing Anomalies. SIAM Journal on Applied Mathematics, 17(2):416–429, 1969.DOI
  13. [13]Khaled Hamidouche, John Bachan, Pak Markthub, Peter-Jan Gootzen, Elena Agostini, Sylvain Jeaugey, Aamir Shafi, Georgios Theodorakis, and Manjunath Gorentla Venkata. GPU-initiated networking for NCCL. arXiv preprint arXiv:2511.15076, 2025.arxiv.org/abs/2511.15076
  14. [14]Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Thomas Hennigan, Eric Noland, Katherine Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karén Simonyan, Erich Elsen, Oriol Vinyals, Jack Rae, and Laurent Sifre. An empirical analysis of compute-optimal large language model training. In Advances in Neural Information Processing Systems, volume 35, pages 30016–30030. Curran Associates, Inc., 2022.
  15. [15]Yanping Huang, Youlong Cheng, Ankur Bapna, Orhan Firat, Mia Xu Chen, Dehao Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V. Le, Yonghui Wu, and Zhifeng Chen. GPipe: Efficient Training of Giant Neural Networks Using Pipeline Parallelism. In Advances in Neural Information Processing Systems (NeurIPS), 2019.arxiv.org/abs/1811.06965
  16. [16]Changho Hwang, Wei Cui, Yifan Xiong, Ziyue Yang, Ze Liu, Han Hu, Zilong Wang, Rafael Salas, Jithin Jose, Prabhat Ram, Joe Chau, Peng Cheng, Fan Yang, Mao Yang, and Yongqiang Xiong. Tutel: Adaptive Mixture-of-Experts at Scale. In Proceedings of Machine Learning and Systems, volume 5, 2023.arxiv.org/abs/2206.03382
  17. [17]HybridEP Contributors. HybridEP: Hybrid Expert-Parallel Communication Backend. https://github.com/deepseek-ai/DeepEP/tree/hybrid-ep, 2026. HybridEP branch of DeepEP; accessed October 2026.
  18. [18]InfiniBand Trade Association. About InfiniBand. https://www.infinibandta.org/about-infiniband/, 2026. Accessed October 2026.
  19. [19]InfiniBand Trade Association. The RoCE Initiative. https://www.infinibandta.org/roce-initiative/, 2026. Accessed October 2026.
  20. [20]Sam Ade Jacobs, Masahiro Tanaka, Chengming Zhang, Minjia Zhang, Shua iwen Leon Song, Samyam Rajbhandari, and Yuxiong He. DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Models. arXiv preprint arXiv:2309.14509, 2023.arxiv.org/abs/2309.14509
  21. [21]Chao Jin, Ziheng Jiang, Zihao Bai, Zheng Zhong, Juncai Liu, Xiang Li, Ningxin Zheng, Xi Wang, Cong Xie, Qi Huang, Wen Heng, Yiyuan Ma, Wenlei Bao, Size Zheng, Yanghua Peng, Haibin Lin, Xuanzhe Liu, Xin Jin, and Xin Liu. MegaScale-MoE: Large-Scale Communication-Efficient Training of Mixture-of-Experts Models in Production. arXiv preprint arXiv:2505.11432, 2025.arxiv.org/abs/2505.11432
  22. [22]Keller Jordan, Yuchen Jin, Vlado Boza, Jiacheng You, Franz Cesista, Laker Newhouse, and Jeremy Bernstein. Muon: An Optimizer for Hidden Layers in Neural Networks. https://kellerjordan.github.io/posts/muon/, 2024.
  23. [23]Mikail Khona, Aditya Vavre, Boxiang Wang, Deyu Fu, Hao Wu, Mike Chrzanowski, Bryan Catanzaro, Dheevatsa Mudigere, Jeff Pool, Michael Lightstone, Mohammad Shoeybi, Mostofa Patwary, Nima Tajbakhsh, and Tijmen Blankevoort. SOAP, Muon, and Beyond: Pushing LLM Pretraining Scales. arXiv preprint arXiv:2607.20548, 2026.arxiv.org/abs/2607.20548
  24. [24]Vijay Anand Korthikanti, Jared Casper, Sangkug Lym, Lawrence McAfee, Michael Andersch, Mohammad Shoeybi, and Bryan Catanzaro. Reducing Activation Recomputation in Large Transformer Models. In Proceedings of Machine Learning and Systems, volume 5, pages 341–353, 2023.arxiv.org/abs/2205.05198
  25. [25]Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang, Maxim Krikun, Noam Shazeer, and Zhifeng Chen. GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding. In International Conference on Learning Representations (ICLR), 2021.
  26. [26]Shen Li, Yanli Zhao, Rohan Varma, Omkar Salpekar, Pieter Noordhuis, Teng Li, Adam Paszke, Jeff Smith, Brian Vaughan, Pritam Damania, and Soumith Chintala. PyTorch Distributed: Experiences on Accelerating Data Parallel Training. Proceedings of the VLDB Endowment, 13(12):3005–3018, 2020.arxiv.org/abs/2006.15704
  27. [27]Shenggui Li, Fuzhao Xue, Chaitanya Baranwal, Yongbin Li, and Yang You. Sequence Parallelism: Long Sequence Training from System Perspective. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (ACL), pages 2391–2404, 2023.
  28. [28]Dennis Liu, Zijie Yan, Xin Yao, Tong Liu, Vijay Korthikanti, Evan Wu, Shiqing Fan, Gao Deng, Hongxiao Bai, Jianbin Chang, Ashwath Aithal, Michael Andersch, Mohammad Shoeybi, Jiajie Yao, Chandler Zhou, David Wu, Xipeng Li, and June Yang. MoE Parallel Folding: Heterogeneous Parallelism Mappings for Efficient Large-Scale MoE Model Training with Megatron Core. arXiv preprint arXiv:2504.14960, 2025.arxiv.org/abs/2504.14960
  29. [29]Hao Liu, Matei Zaharia, and Pieter Abbeel. Ring Attention with Blockwise Transformers for Near-Infinite Context. In International Conference on Learning Representations (ICLR), 2024.arxiv.org/abs/2310.01889
  30. [30]Llama Team, AI @ Meta. The Llama 3 Herd of Models. arXiv preprint arXiv:2407.21783, 2024.
  31. [31]Ilya Loshchilov and Frank Hutter. Decoupled Weight Decay Regularization. In International Conference on Learning Representations (ICLR), 2019.
  32. [32]Meta AI. The Llama 4 Herd: The Beginning of a New Era of Natively Multimodal AI Innovation. https://ai.meta.com/blog/llama-4-multimodal-intelligence/, 2025.
  33. [33]Meta PyTorch Contributors. Dist-MoE: Distributed Mixture-of-Experts Kernels. https://github.com/meta-pytorch/dist_moe, 2026. Accessed October 2026.
  34. [34]Deepak Narayanan, Aaron Harlap, Amar Phanishayee, Vivek Seshadri, Nikhil R. Devanur, Gregory R. Ganger, Phillip B. Gibbons, and Matei Zaharia. PipeDream: Generalized Pipeline Parallelism for DNN Training. In Proceedings of the 27th ACM Symposium on Operating Systems Principles (SOSP), 2019.
  35. [35]Deepak Narayanan, Mohammad Shoeybi, Jared Casper, Patrick LeGresley, Mostofa Patwary, Vijay Korthikanti, Dmitri Vainbrand, Prethvi Kashinkunti, Julie Bernauer, Bryan Catanzaro, Amar Phanishayee, and Matei Zaharia. Efficient Large-Scale Language Model Training on GPU Clusters Using Megatron-LM. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC), 2021.arxiv.org/abs/2104.04473
  36. [36]NVIDIA. Nemotron 3 Nano: Open, Efficient Mixture-of-Experts Hybrid Mamba-Transformer Model for Agentic Reasoning. https://research.nvidia.com/labs/nemotron/files/NVIDIA-Nemotron-3-Nano-Technical-Report.pdf, 2025. Technical report.arxiv.org/abs/2512.20848
  37. [37]NVIDIA. Pretraining Large Language Models with NVFP4. arXiv preprint arXiv:2509.25149, 2025.arxiv.org/abs/2509.25149
  38. [38]NVIDIA. CUDA Programming Guide: CUDA Graphs. https://docs.nvidia.com/cuda/cuda-programming-guide/04-special-topics/cuda-graphs.html, 2026. Accessed November 12, 2026.
  39. [39]NVIDIA. Emerging Optimizers. https://github.com/NVIDIA-NeMo/Emerging-Optimizers, 2026. Version 0.3.1.
  40. [40]NVIDIA. Megatron Bridge: DeepSeek-V4-Pro GB300 Performance Recipe. https://github.com/NVIDIA-NeMo/Megatron-Bridge/blob/c36bd9a02e54538a0aa9b8be7ac2145a5d1f2ca4/src/megatron/bridge/perf_recipes/deepseek/gb300/deepseek_v4.py, 2026. Revision c36bd9a02e54.
  41. [41]NVIDIA. Megatron Bridge: Performance Summary. https://docs.nvidia.com/nemo/megatron-bridge/latest/performance-summary.html#performance-metrics, 2026. Accessed October 2026.
  42. [42]NVIDIA. Megatron-Core Generalized Tensor Parallelism Implementation. https://github.com/NVIDIA/Megatron-LM, 2026. Accessed November 17, 2026.
  43. [43]NVIDIA. Megatron-Core MFSDP: Implementation and Upstream Base for the Evaluated Baselines. https://github.com/NVIDIA/Megatron-LM/commit/725949abbfa0878b2d8497a07cc7d959ee55624, 2026. MCore 0.20.0 development base on main; commit 725949abbfa0878b2d84997a07cc7d959ee55624. Evaluated checkouts include model-specific extensions and fixes.
  44. [44]NVIDIA. Megatron-LM: DeepSeek MLA Model-FLOP Estimator. https://github.com/NVIDIA/Megatron-LM/blob/92641a421f40eeb40fc883f313ec83ca652c8b13/megatron/training/training.py#L1160-L1171, 2026. Revision 92641a421f40.
  45. [45]NVIDIA. NCCL User Guide: User Buffer Registration. https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/usage/bufferreg.html, 2026. Accessed October 2026.
  46. [46]NVIDIA. NVIDIA GB300 NVL72. https://www.nvidia.com/en-us/data-center/gb300-nvl72/, 2026. Accessed October 2026.
  47. [47]NVIDIA. Transformer Engine. https://github.com/NVIDIA/TransformerEngine, 2026. Accessed October 2026.
  48. [48]NVIDIA TransformerEngine Contributors. TransformerEngine FSDP2 Quantized Weight All-Gather Implementation and Tests. https://github.com/NVIDIA/TransformerEngine/tree/2e959f352c8e2d4b2709e6775867f2c749465613, 2026. Revision 2e959f352c8e.
  49. [49]Suchita Pati, Shaizeen Aga, Mahzabeen Islam, Nuwan Jayasena, and Matthew D. Sinclair. T3: Transparent Tracking & Triggering for Fine-grained Overlap of Compute & Collectives. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2024.arxiv.org/abs/2401.16677
  50. [50]PyTorch. Distributed Checkpoint – torch.distributed.checkpoint. https://docs.pytorch.org/docs/stable/distributed.checkpoint.html, 2026. Accessed November 17, 2026.
  51. [51]PyTorch Contributors. FSDP2 Prefetch and Collective Completion Implementation. https://github.com/pytorch/pytorch/tree/ad8c2fc386e4f18c835e097980671a4dbb15c26/torch/distributed/fsdp/_fully_shard, 2026. Revision ad8c2fc386e4 (PyTorch 2.16.0.dev20261022).
  52. [52]PyTorch Contributors. PyTorch FSDP2 Parameter Sharding Implementation. https://github.com/pytorch/pytorch/blob/be90fe2665c2/torch/distributed/fsdp/_fully_shard/_fsdp_param.py, 2026. _fsdp_param.py, revision be90fe2665c2; uneven-shard padding implementation inspected October 12, 2026.
  53. [53]PyTorch Contributors. torch.distributed.fsdp.fully_shard. https://docs.pytorch.org/docs/2.14/distributed.fsdp.fully_shard.html, 2026. PyTorch 2.14 API documentation.
  54. [54]PyTorch Contributors. TorchTitan FSDP Grouping and Explicit Prefetch Configuration. https://github.com/pytorch/torchtitan/blob/6cdda6cacb4ce25d609aa6f38947dfc69c674bcc/torchtitan/distributed/fsdp.py, 2026. TorchTitan 0.2.2; revision 6cdda6cacb4c.
  55. [55]PyTorch Contributors. TorchTitan: Quadratic Attention FLOPs per Token. https://github.com/pytorch/torchtitan/blob/6cdda6cacb4ce25d609aa6f38947dfc69c674bcc/torchtitan/models/common/flops.py#L20-L51, 2026. Revision 6cdda6cacb4c.
  56. [56]Samyam Rajbhandari, Conglong Li, Zhewei Yao, Minjia Zhang, Reza Yazdani Aminabadi, Ammar Ahmad Awan, Jeff Rasley, and Yuxiong He. DeepSpeed-MoE: Advancing Mixture-of-Experts Inference and Training to Power Next-Generation AI Scale. In Proceedings of the 39th International Conference on Machine Learning (ICML), volume 162 of PMLR, pages 18332–18346, 2022.arxiv.org/abs/2201.05596
  57. [57]Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, and Yuxiong He. ZeRO: Memory Optimizations Toward Training Trillion Parameter Models. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC), pages 1–16, 2020.arxiv.org/abs/1910.02054
  58. [58]Bita Darvish Rouhani, Ritchie Zhao, Ankit More, Mathew Hall, Alireza Khodamoradi, Summer Deng, Dhruv Choudhary, Marius Cornea, Eric Dellinger, Kristof Denolf, Dusan Stosic, Venmugil Elango, Maximilian Golub, Alexander Heinecke, Phil James-Roxby, Dharmesh Jani, Gaurav Kolhe, Martin Langhammer, Ada Li, Levi Melnick, Maral Mesmakhosroshahi, Andres Rodriguez, Michael Schulte, Rasoul Shafipour, Lei Shao, Michael Siu, Pradeep Dubey, Paulius Micikevicius, Maxim Naumov, Colin Verrilli, Ralph Wittig, Doug Burger, and Eric Chung. Microscaling Data Formats for Deep Learning. arXiv preprint arXiv:2310.10537, 2023.arxiv.org/abs/2310.10537
  59. [59]Noam Shazeer, Youlong Cheng, Niki Parmar, Dustin Tran, Ashish Vaswani, Penporn Koanantakool, Peter Hawkins, HyoukJoong Lee, Mingsheng Hong, Clif Young, Ryan Sepassi, and Blake Hechtman. Mesh-TensorFlow: Deep Learning for Supercomputers. In Advances in Neural Information Processing Systems (NeurIPS), 2018.arxiv.org/abs/1811.02084
  60. [60]Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer. In International Conference on Learning Representations (ICLR), 2017.arxiv.org/abs/1701.06538
  61. [61]Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism. arXiv preprint arXiv:1909.08053, 2019.arxiv.org/abs/1909.08053
  62. [62]TorchTitan Contributors. TorchTitan Distributed Muon Implementation. https://github.com/pytorch/torchtitan/blob/cc0ad1f/torchtitan/distributed/flex_shard/dist_muon.py, 2026. dist_muon.py, revision cc0ad1f149cc, inspected October 12, 2026.
  63. [63]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention Is All You Need. In Advances in Neural Information Processing Systems (NeurIPS), 2017.arxiv.org/abs/1706.03762
  64. [64]Guanhua Wang, Heyang Qin, Sam Ade Jacobs, Xiaoxia Wu, Connor Holmes, Zhewei Yao, Samyam Rajbhandari, Olatunji Ruwase, Feng Yan, Lei Yang, and Yuxiong He. ZeRO++: Extremely Efficient Collective Communication for Large Model Training. In International Conference on Learning Representations (ICLR), 2024.arxiv.org/abs/2306.10209
  65. [65]Guanhua Wang, Chengming Zhang, Zheyu Shen, Ang Li, and Olatunji Ruwase. Domino: Eliminating Communication in LLM Training via Generic Tensor Slicing and Overlapping. arXiv preprint arXiv:2409.15241, 2024.arxiv.org/abs/2409.15241
  66. [66]Shibo Wang, Jinliang Wei, Amit Sabne, Andy Davis, Berkin Ilbeyi, Blake Hechtman, Dehao Chen, Karthik Srinivasa Murthy, Marcello Maggioni, Qiao Zhang, Sameer Kumar, Tongfei Guo, Yuanzhong Xu, and Zongwei Zhou. Overlap Communication with Dependent Computation via Decomposition in Large Deep Learning Models. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 93–106, 2023.DOI
  67. [67]Zezhou Wang, Youjie Li, Zhiqi Lin, Jiacheng Yang, Cong Xie, Guanyu Feng, Zheng Zhong, Ziyue Huang, Hongyu Zhu, Zhi Zhang, Yanghua Peng, and Xin Liu. veScale-FSDP: Flexible and high-performance FSDP at scale. In Proceedings of Machine Learning and Systems, volume 8, pages 763–776. MLSys, 2026.arxiv.org/abs/2602.22437
  68. [68]Xilun Wu, Chien-Chin Huang, Less Wright, Tianyu Liu, Will Constable, and Gokul Nadathur. Breaking Barriers: Training Long Context LLMs with 1M Sequence Length in PyTorch Using Context Parallel. https://discuss.pytorch.org/t/215082, January 2025. PyTorch Forums.
  69. [69]Zhenda Xie, Yixuan Wei, Huangji Cao, Chenggang Zhao, Chengqi Deng, Jiashi Li, Damai Dai, Huazuo Gao, Jiang Chang, Kuai Yu, Liang Zhao, Shangyan Zhou, Zhean Xu, Zhengyan Zhang, Wangding Zeng, Shengding Hu, Yuqing Wang, Jingyang Yuan, Lean Wang, and Wenfeng Liang. mHC: Manifold-Constrained Hyper-Connections. arXiv preprint arXiv:2512.24880, 2025.arxiv.org/abs/2512.24880
  70. [70]Yuanzhong Xu, HyoukJoong Lee, Dehao Chen, Blake Hechtman, Yanping Huang, Rahul Joshi, Maxim Krikun, Dmitry Lepikhin, Andy Ly, Marcello Maggioni, Ruoming Pang, Noam Shazeer, Shibo Wang, Tao Wang, Yonghui Wu, and Zhifeng Chen. GSPMD: General and Scalable Parallelization for ML Computation Graphs. arXiv preprint arXiv:2105.04663, 2021.
  71. [71]Zijie Yan, Hongxiao Bai, Xin Yao, Dennis Liu, Tong Liu, Hongbin Liu, Pingtian Li, Evan Wu, Shiqing Fan, Li Tao, Robin Zhang, Yuzhong Wang, Shifang Xu, Jack Chang, Xuwen Chen, Kunlun Li, Yan Bai, Gao Deng, Nan Zheng, Vijay Anand Korthikanti, Abhinav Khattar, Ethan He, Soham Govande, Sangkug Lym, Zhongbo Zhu, Qi Zhang, Haochen Yuan, Xiaowei Ren, Deyu Fu, Tailai Ma, Shunkang Zhang, Jiang Shao, Ray Wang, Vasudevan Rengasamy, Rachit Garg, Santosh Bhavani, Xipeng Li, Chandler Zhou, David Wu, Yingcan Wei, Ashwath Aithal, Michael Andersch, Mohammad Shoeybi, Jiajie Yao, and June Yang. Scalable Training of Mixture-of-Experts Models with Megatron Core. Technical Report arXiv:2603.07685, NVIDIA, 2026. Version 2.arxiv.org/abs/2603.07685
  72. [72]Biao Zhang and Rico Sennrich. Root Mean Square Layer Normalization. In Advances in Neural Information Processing Systems (NeurIPS), volume 32, 2019.arxiv.org/abs/1910.07467
  73. [73]Shulai Zhang, Ningxin Zheng, Haibin Lin, Ziheng Jiang, Wenlei Bao, Chengquan Jiang, Qi Hou, Weihao Cui, Size Zheng, Li-Wen Chang, Quan Chen, and Xin Liu. COMET: Fine-grained Computation-communication Overlapping for Mixture-of-Experts. In Proceedings of Machine Learning and Systems, 2025.arxiv.org/abs/2502.19811
  74. [74]Zhen Zhang, Shuai Zheng, Yida Wang, Justin Chiu, George Karypis, Trishul Chilimbi, Mu Li, and Xin Jin. MiCS: Near-Linear Scaling for Training Gigantic Model on Public Cloud. Proceedings of the VLDB Endowment, 16(1):37–50, 2022.
  75. [75]Yanli Zhao, Andrew Gu, Rohan Varma, Liang Luo, Chien-Chin Huang, Min Xu, Less Wright, Hamid Shojanazeri, Myle Ott, Sam Shleifer, Alban Desmaison, Can Balioglu, Pritam Damania, Bernard Nguyen, Geeta Chauhan, Yuchen Hao, Ajit Mathews, and Shen Li. PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallel. Proceedings of the VLDB Endowment, 16(12):3848–3860, 2023.arxiv.org/abs/2304.11277
  76. [76]Lianmin Zheng, Zhuohan Li, Hao Zhang, Yonghao Zhuang, Zhifeng Chen, Yanping Huang, Yida Wang, Yuanzhong Xu, Danyang Zhuo, Eric P. Xing, Joseph E. Gonzalez, and Ion Stoica. Alpa: Automating Inter- and Intra-Operator Parallelism for Distributed Deep Learning. In 16th USENIX Symposium on Operating Systems Design and Implementation (OSDI 22), pages 559–578. USENIX Association, 2022.arxiv.org/abs/2201.12023

Paper details

vlnc:W_eb5yq8p9
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents