---
title: "Megatron-LM — paper by Shoeybi et al. (2019)"
description: "How Megatron-LM splits transformer training across GPUs, scales to billions of parameters, and tests the gains and limits of larger networks."
canonical: "https://research.elamur.ai/free/en/papers/shoeybi-2019-megatron-lm-training-multi-billion/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/shoeybi-2019-megatron-lm-training-multi-billion/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2019](https://md.research.elamur.ai/free/en/papers/2019/) / Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism

# Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism

Paper · 2019 · Mohammad Shoeybi, Mostofa Patwary, Raul Puri et al.

**Authors:** [Mohammad Shoeybi](https://md.research.elamur.ai/free/en/authors/mohammad-shoeybi/), [Mostofa Patwary](https://md.research.elamur.ai/free/en/authors/mostofa-patwary/), [Raul Puri](https://md.research.elamur.ai/free/en/authors/raul-puri/), [Patrick LeGresley](https://md.research.elamur.ai/free/en/authors/patrick-legresley/), [Jared Casper](https://md.research.elamur.ai/free/en/authors/jared-casper/) and [Bryan Catanzaro](https://md.research.elamur.ai/free/en/authors/bryan-catanzaro/) · **Year:** 2019 · **Venue:** arXiv:1909.08053 · **Licence:** [arXiv — non-exclusive licence to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**776** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2973727699) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/1909.08053)
- [arXiv 1909.08053](https://arxiv.org/abs/1909.08053)
- [OpenAlex](https://openalex.org/W2973727699)

## Deep dive: Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism

How Megatron-LM splits transformer training across GPUs, scales to billions of parameters, and tests the gains and limits of larger networks. · about 37 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

A larger [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) can learn more from the same training process, but increasing its size creates a practical obstacle: its parameters, intermediate calculations, and optimizer state eventually exceed the memory of a single processor. Megatron-LM addresses that obstacle by dividing the expensive operations inside a [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) layer across GPUs. The central contribution is a carefully chosen arrangement of matrix partitions that lets each device perform substantial work independently, with communication concentrated at a few boundaries. The implementation extends ordinary PyTorch code through communication operations instead of introducing a separate compiler.

The method distributes both the feed-forward network and the attention heads within each transformer layer. Its key insight is that adjacent operations should be partitioned together. A division that looks reasonable for an isolated matrix multiplication can force devices to exchange results immediately afterwards. Megatron-LM instead chooses partitions that carry local results through the next operation before combining them. It also divides the vocabulary embeddings and avoids collecting the entire vocabulary prediction tensor when computing the training loss. These choices make it possible to train larger networks while keeping much of the available computing capacity occupied.

The authors demonstrate the approach with a GPT-2-style network containing 8.3 billion parameters and a BERT-style network containing 3.9 billion parameters. The largest GPT-2 training configuration uses 512 GPUs, combining 8-way model parallelism with 64-way data parallelism. The abstract reports application throughput of 15.1 PetaFLOPs and scaling efficiency of 76%, measured against a single-GPU baseline that sustains 39 TeraFLOPs. The detailed scaling section reports 74% efficiency for its largest combined model-and-data-parallel experiment. These figures belong to different statements in the paper and should be retained with their respective contexts.

The additional capacity improves the evaluated language tasks. On the WikiText103 test set, the largest GPT-2-style network reaches an adjusted perplexity of 10.81; the earlier best result cited by the authors is 15.8. On the LAMBADA test set, its cloze accuracy is 66.51%, compared with the cited earlier best of 63.2%. For BERT, increasing size works reliably only after a change to the relationship between normalization and residual connections. With that change, held-out pretraining perplexity decreases across the tested sizes, and downstream performance improves. The BERT experiments also establish a RACE test accuracy of 90.9% with an ensemble.

The paper therefore connects a systems result to an empirical result about learning. It shows how to make a larger transformer train efficiently, then examines whether the larger network produces better predictions. It does not establish that size alone guarantees improvement, that the method is equally efficient on every machine, or that benchmark gains imply dependable factual generation. Its strongest finding is more specific: communication-aware partitioning makes these large training runs practical, and the tested networks benefit from the resulting capacity when their optimization remains stable.

### Ideas worth borrowing

Partition neighboring operations together. A matrix multiplication is rarely the real unit of work in a neural network. Its output normally passes through an activation function or another projection. Megatron-LM chooses divisions that let these neighboring operations consume each other’s local outputs. This reduces the number of moments at which all devices must wait for a shared result. The general lesson applies to distributed numerical software: optimize the path taken by intermediate values, rather than treating every operation as a separate scheduling problem.

Let nonlinearities determine communication boundaries. The feed-forward example makes the mathematical constraint concrete. If devices hold partial sums for the input to GeLU, those sums must be combined before GeLU is applied. If devices instead hold different output coordinates, each can apply GeLU independently. The useful habit is to ask which operations preserve a partition and which require a globally assembled value. This reasoning can guide parallel implementations of other networks without assuming that every activation or reduction behaves alike.

Repeat inexpensive work when it saves expensive exchange. The authors replicate normalization, residual additions, and some dropout computation across the devices holding a distributed transformer. That duplication keeps the surrounding activations available locally. It is a deliberate trade: spending additional arithmetic can be worthwhile when the alternative is synchronization and communication. The idea applies wherever a small shared calculation sits between large distributed calculations, although the balance depends on the hardware and the size of the duplicated work.

Reduce to the quantity the objective actually needs. A training loss does not always require a fully assembled prediction tensor. Megatron-LM combines the distributed vocabulary projection with cross-entropy computation so that communication concerns loss-sized results rather than every vocabulary score. This is useful beyond language modeling whenever a large intermediate exists mainly to feed a much smaller statistic. The important question is whether the statistic can be computed correctly from distributed pieces before the large intermediate is gathered.

Treat randomness as part of distributed correctness. Some dropout operations must produce identical masks across devices because those devices are carrying duplicate versions of the same activation. Other dropout operations should differ because the devices own separate pieces of the computation. The authors maintain random-number streams that reflect this distinction. This is a reusable engineering principle: matching tensor shapes and synchronizing gradients are insufficient if random operations silently give replicated and partitioned values the wrong relationship.

Investigate failed scaling before rejecting additional capacity. Earlier BERT experiments had found that a larger configuration could perform worse. Megatron-LM revisits the architecture and finds that moving the residual path relative to normalization stabilizes training. The broader lesson is methodological. A disappointing larger network can reveal an optimization problem, a numerical problem, or an architectural interaction. Capacity should be assessed after checking those possibilities, instead of treating an unstable run as a clean test of whether greater size helps.

Keep throughput evidence separate from task evidence. The paper first establishes a strong computing baseline, measures scaling, and then evaluates prediction quality. This makes the contribution easier to assess. A faster training implementation does not automatically learn a better function, and a better benchmark score does not establish an efficient implementation. Reporting both forms of evidence is useful for any project that changes training infrastructure while also changing network size or training conditions.

### How Mova uses it

For Mova, a small transparent language system implemented in Rust, the most immediate value is a way of reasoning about computation. The paper does not document a Mova implementation, and it provides no basis for claiming that Mova already distributes transformer layers across GPUs. Its methods are therefore best understood as possible design guidance. Whether the full training scheme would be useful depends on Mova’s actual architecture, memory requirements, and execution environment.

A concrete application would be to make data dependencies visible in the implementation. If Mova contains a learned component with consecutive matrix projections, its execution plan could distinguish values that are complete on a device from values that represent only a partial contribution. Megatron-LM shows why that distinction matters: applying a nonlinear function to an incomplete sum changes the calculation, whereas applying it to independent output coordinates can preserve the intended result. In a transparent Rust system, representing those states explicitly could make both execution and review easier to follow.

Another possible use concerns the boundary between prediction and scoring. A component that computes a large collection of candidate scores may immediately reduce them to a loss or another compact quantity. The paper suggests examining whether that reduction can happen before the entire score collection is assembled. For Mova, this would be an engineering question tied to a specific component, not a reason to introduce distributed execution on its own. The benefit would have to be demonstrated through memory and runtime measurements.

The handling of randomness is relevant even when the full distributed design is unnecessary. If Mova eventually runs replicated or partitioned learned components, it would need an explicit policy for which random choices are shared and which are independent. Megatron-LM offers a concrete example: duplicated residual-path computation uses matching dropout patterns, while attention work assigned to different devices uses distinct patterns. A Rust implementation could express that policy through separate random-number generators and clearly defined ownership of their state.

The paper also suggests a useful experimental discipline for a small system. Before increasing capacity or adding parallel execution, establish the cost and behavior of the existing implementation. After a change, measure the practical resource benefit separately from the effect on prediction quality. If training becomes unstable, examine the architecture and numerical procedure before drawing conclusions about the value of scale. These are applications Mova could adopt without reproducing the paper’s hardware configuration.

The authors also propose distilling their large pretrained networks into smaller students as future work. That direction is potentially closer to Mova’s small-system setting than training a network across hundreds of GPUs. However, Megatron-LM does not report such a student, a distillation procedure, or a result showing that its gains survive compression. It supplies a research possibility rather than an established recipe for Mova.

### The problem and its context

#### When memory becomes the limiting resource

The paper begins from a trend in [language-model pretraining](https://md.research.elamur.ai/free/en/topics/language-models/): more computation and larger corpora had made it possible to train increasingly capable networks. A pretrained network could then be adapted to a downstream task, allowing the same learned representations to support several applications. The authors cite improvements in activities such as completing articles, answering questions, and recognizing relationships between sentences.

Yet the training process must store considerably more than the final parameter values. It needs intermediate activations for differentiation, gradients, and state maintained by the optimizer. [Adam](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/), the optimizer used in these experiments, maintains additional information associated with the parameters. Increasing parameter count therefore expands several demands on memory at once.

Activation checkpointing addresses part of this pressure. Instead of retaining every intermediate activation from the forward calculation, training can recompute selected activations during the backward calculation. That exchanges additional computation for reduced storage. It does not, however, eliminate the need to store the network’s parameters and associated training state.

Data parallelism also leaves this fundamental limit intact. In an ordinary data-parallel arrangement, each worker carries a complete copy of the network and processes a different part of the training batch. Workers later combine their gradient information. More workers can process more examples, but every worker still needs enough memory for the complete network.

Megatron-LM attacks the remaining obstacle by distributing a single network instance. Each participating GPU owns part of the parameters and performs the corresponding calculations. Once that is possible, adding devices can make room for a larger network rather than only providing more copies of an unchanged one.

This distinction matters to the interpretation of the experiments. The principal systems question is whether the method makes otherwise infeasible training configurations practical. Accelerating a smaller configuration is useful, and the appendix examines that case, but it is not the main reason for introducing the partition.

#### From transferred embeddings to transferred networks

The paper places this systems problem within a progression in language representation learning. Earlier work transferred pretrained [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) into downstream systems. The cited examples include [GloVe](https://md.research.elamur.ai/free/en/papers/pennington-2014-glove-global-vectors-word-representation/) and [Distributed Representations of Words and Phrases](https://md.research.elamur.ai/free/en/papers/mikolov-2013-distributed-representations-words-phrases-their/). Their relevance here is that learning from a broad text collection could improve a later task without learning every word representation from the task’s own data.

Subsequent work transferred contextual representations, in which the representation of a word depends on its surrounding text. [Deep Contextualized Word Representations](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/) is among the cited examples. The object being transferred had become more elaborate than a fixed lookup table.

Another development was end-to-end [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). Instead of treating the pretrained network only as a source of fixed features, a downstream training procedure could update it for a particular objective. The paper discusses [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) and several related approaches in that context.

The consequence for infrastructure is direct. Transferring a whole large network requires the training and adaptation machinery to accommodate that network. A useful representation-learning strategy can become difficult to investigate if its implementation runs out of memory before the scientific question can be tested. Megatron-LM presents its systems work as a way to continue that line of investigation.

#### Why transformers offer a useful structure

The transformer architecture introduced in [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/) combines attention with feed-forward transformations. Megatron-LM studies both the left-to-right setup associated with GPT-2 and the bidirectional masked setup associated with BERT.

These learning objectives differ, but their expensive calculations have a similar structure. A transformer layer contains an attention block followed by a feed-forward block. Both involve large matrix multiplications. Multi-head attention also offers an explicit separation of work: different heads can perform their calculations before their outputs are mixed by a later projection.

That structure creates an opportunity for a targeted implementation. The authors do not seek a general solution that can discover the best partition of an arbitrary computation graph. They identify specific partitions that fit these repeated transformer operations.

This choice narrows the ambition but simplifies the machinery. If a small set of well-understood communication boundaries works throughout the network, the implementation can stay close to the original PyTorch program. The paper’s contribution depends on exploiting this regularity.

#### Alternatives the paper discusses

Within [GPU and parallel computing](https://md.research.elamur.ai/free/en/topics/gpu-parallel-computing/), the authors distinguish distributing whole stages from distributing tensor operations inside a stage.

Pipeline parallelism assigns successive groups of operations to different devices. An activation produced by an earlier stage travels to a later stage, which continues the calculation. The paper discusses approaches that combine pipelines with parameter servers and notes consistency concerns in those arrangements.

GPipe is described as using synchronous gradient updates to address consistency. However, the authors also discuss the scheduling machinery needed to keep pipeline stages busy and the idle periods that can arise. These idle periods are commonly called pipeline bubbles: a device waits because the necessary work has not yet reached its stage.

Distributed tensor computation takes a different route. An individual tensor operation is divided across devices. The paper discusses FlexFlow as a framework for choosing parallelization strategies and Mesh-TensorFlow as a way to describe distributed tensor dimensions and compile suitable communication.

Megatron-LM draws on similar partitioning insights while choosing a more specialized implementation. The authors emphasize that their approach can coexist with pipeline parallelism. Dividing operations inside a layer and assigning different layers to different stages address different parts of the problem.

Parameter sharing is another alternative discussed through [ALBERT](https://md.research.elamur.ai/free/en/papers/lan-2019-albert-lite-bert-self-supervised/). Reusing parameters can reduce storage, whereas distributing parameters allows distinct parameter sets to remain in the network. The paper favors the latter route for its scaling experiments, while also adopting training choices associated with ALBERT in the BERT setup.

### The method, step by step

The method can be understood as an effort to keep large pieces of computation local for as long as their mathematics permits. Every GPU receives the input needed for a distributed block. It computes its assigned part, carries that part through compatible operations, and exchanges information when the next operation requires a complete result.

Training a transformer with Megatron-LM The steps in order.

#### Start with the feed-forward calculation

A transformer’s feed-forward block applies a matrix projection, a nonlinear activation, and another projection. The paper begins its partitioning argument with the first projection and activation:

```
Y = GeLU(XA)
```

Here, X is the input activation matrix, A is a learned weight matrix, and Y is the resulting activation matrix. GeLU is the nonlinear function used after multiplication. The expression XA is a general matrix multiplication, which the paper abbreviates as GEMM.

The location of GeLU is essential. Matrix multiplication can be decomposed in several ways, but a nonlinear function does not generally allow partial sums to be transformed independently and then added.

Consider dividing the input along its feature dimension:

```
X = [X₁, X₂]
```

X₁ and X₂ contain separate groups of columns from X. The brackets indicate that the groups sit next to each other in the complete input matrix.

The compatible division of the weights is:

```
A = [A₁; A₂]
```

A₁ and A₂ are row partitions of A. The semicolon indicates vertical stacking. Each input partition multiplies the matching weight partition, producing a contribution to the same output coordinates.

The activation would then be:

```
Y = GeLU(X₁A₁ + X₂A₂)
```

Each product contributes to the value entering GeLU. Neither product alone is the complete argument of the nonlinear function, so the contributions must be combined first.

The mathematical obstacle is:

```
GeLU(X₁A₁ + X₂A₂) ≠ GeLU(X₁A₁) + GeLU(X₂A₂)
```

Every term has the same meaning as above. The inequality states that applying GeLU separately to the partial products does not, in general, reproduce applying it to their sum. This partition therefore introduces a communication boundary before the activation.

#### Partition output coordinates instead

Megatron-LM chooses a column partition for the first weight matrix:

```
A = [A₁, A₂]
```

Here, A₁ and A₂ hold different output columns of A. Unlike the row partition, they produce different output coordinates rather than contributions to the same coordinates. Each device can multiply the complete input X by its assigned columns.

The resulting activations are:

```
[Y₁, Y₂] = [GeLU(XA₁), GeLU(XA₂)]
```

Y₁ and Y₂ are separate portions of the complete activation Y. Because each device already has the complete value for its own output coordinates, GeLU can be applied locally. No exchange is needed between the projection and the activation.

The second projection is partitioned in the complementary direction. Its weight matrix, called B in the diagrams, is split by rows. Each row partition consumes the corresponding local activation, so Y₁ is used with B₁ and Y₂ with B₂.

Those local products contribute to a shared output and must eventually be added. The crucial saving is that the exchange happens after both projections and the intervening activation have been handled in a coordinated way. The method avoids assembling the large intermediate activation merely to divide it again for the next multiplication.

The completed feed-forward block is represented in the architecture diagram as:

```
Z = Dropout(YB)
```

Z is the block’s output after dropout, Y is the GeLU activation, and B is the second projection’s weight matrix. Dropout randomly suppresses selected activation values during training. In the distributed implementation, the partial products contributing to YB are combined before the replicated dropout and residual processing.

For the feed-forward block, this arrangement needs an all-reduce in the forward calculation and another in the backward calculation. An all-reduce combines values across a group of workers and makes the combined result available to the members of that group.

#### Express communication through differentiation

The authors describe complementary communication operators called f and g. Their behavior depends on whether training is performing the forward calculation or differentiating it.

The f operator passes its input through unchanged during the forward calculation. During the backward calculation, it combines incoming gradient contributions with an all-reduce. This is appropriate at the entrance to a region where different devices compute different contributions from the same input.

The g operator has the reverse arrangement. It performs an all-reduce during the forward calculation, producing a complete output from partial contributions. During the backward calculation, it passes the corresponding gradient through without another reduction at that location.

This is a compact way to encode the distributed computation in PyTorch’s differentiation machinery. The communication is not an unrelated operation added after training. It is part of the definition of how values and gradients cross a partition boundary.

The paper includes a short implementation of f using a custom automatic-differentiation function. Its significance is the small amount of new machinery required for the communication rule. That does not mean the entire distributed training system consists only of that function; it means the core mathematical partition can be connected to the existing program through a small interface.

#### Assign attention heads to devices

The attention block follows the same broad pattern: create locally complete pieces, process them locally, and combine their contributions through a later projection.

The input is projected into queries, keys, and values, denoted Q, K, and V. These are the representations used by attention to determine which positions contribute information to each output position. Multi-head attention carries out this calculation through separate heads.

Megatron-LM partitions the query, key, and value projections by columns so that the work for an attention head remains on a device. That device computes the head’s attention scores, its softmax operation, the associated dropout, and its combination of value representations.

The important boundary is the output projection after attention. Different heads can remain separate until that projection needs to mix their information. The output projection is split by rows, allowing it to consume the locally computed attention outputs directly.

As in the feed-forward block, the local projection results are combined afterward. This arrangement avoids communication between the head calculation and its following projection.

Across the attention and feed-forward blocks, a transformer layer uses two forward all-reduces and two backward all-reduces for these distributed matrix operations. The paper describes 4 communication operations over the complete forward-and-backward traversal of a layer. This count concerns the transformer-layer arrangement; embeddings and data-parallel synchronization introduce their own communication.

#### Divide the vocabulary embeddings

The vocabulary projection can also occupy substantial memory and computation. Its weight dimensions are written as:

```
E ∈ ℝᴴˣᵛ
```

E is the embedding matrix, H is the hidden representation size, and v is the vocabulary size. Each vocabulary item has a learned representation associated with the hidden dimension.

The paper uses shared weights for the input embedding and output vocabulary projection. Partitioning the output weights therefore also requires a compatible input-embedding implementation.

The vocabulary dimension is divided as:

```
E = [E₁, E₂]
```

E₁ and E₂ hold different vocabulary partitions. Each device owns only part of the vocabulary table. The distributed input lookup consequently requires an all-reduce to produce the input embedding values needed by the subsequent transformer computation.

At the output, each partition produces its own vocabulary scores:

```
[Y₁, Y₂] = [XE₁, XE₂]
```

X is now the hidden representation supplied to the output projection. Y₁ and Y₂ contain scores for different vocabulary subsets. These scores are often called logits: they are the values from which the predictive distribution and cross-entropy loss are obtained.

A straightforward implementation would gather all scores:

```
Y = all-gather([Y₁, Y₂])
```

Y is the complete vocabulary-score tensor. The all-gather collects the separate pieces instead of adding contributions to matching coordinates.

The communication size in this approach grows with:

```
b × s × v
```

Here, b is batch size, s is sequence length, and v is vocabulary size. The large vocabulary dimension makes the complete score tensor expensive to exchange.

The authors instead combine the partitioned output projection with cross-entropy computation. The loss-sized result has dimensions:

```
b × s
```

The symbols b and s retain their meanings. Each sequence position needs a loss value, rather than a communicated vector containing every vocabulary score. The paper’s central point is that the loss can be computed without first performing the large all-gather. Its discussion does not enumerate every internal numerical step of that distributed cross-entropy calculation.

#### Replicate the surrounding inexpensive operations

After a distributed block has produced its complete output, every device in the model-parallel group can hold the same activation. Megatron-LM performs normalization, residual additions, and relevant dropout operations on these replicated values.

[Layer normalization](https://md.research.elamur.ai/free/en/papers/ba-2016-layer-normalization/) adjusts activations using statistics within a representation. A residual connection adds a bypassed representation to the output of a transformation. These operations are important to the network, but distributing each small calculation and broadcasting its result would introduce additional exchange.

The implementation instead maintains copies of normalization parameters on the participating devices. Each worker updates the parameters it owns, including parameters whose identical copies are maintained by the computation’s replicated structure. The authors explain that this arrangement avoids a separate exchange of updated parameter values.

Correct replication also requires matching random choices. Dropout before residual additions uses the same random seed across model-parallel workers so that duplicate activations receive the same mask.

Attention dropout inside a partitioned region has a different requirement. Separate devices own different attention work, so their masks should differ. The authors maintain another random-number generator with a distinct seed for each model-parallel worker.

#### Combine parameter partitions with batch partitions

A model-parallel group collectively holds a complete network instance. Data parallelism then creates additional groups holding corresponding copies of that distributed network.

For the 8.3 billion parameter example, a model-parallel group contains 8 GPUs. Training uses 64-way data parallelism, giving a total configuration of 512 GPUs.

Workers occupying the same position in different model-parallel groups hold matching parameter partitions. They form a data-parallel group and combine their weight gradients during back-propagation. Meanwhile, the workers inside each model-parallel group perform the activation-related exchanges required by the distributed layers.

These communication patterns have different purposes. Model-parallel exchange completes calculations within a network instance. Data-parallel exchange reconciles gradient information from different training examples.

The implementation uses Python calls to NCCL through PyTorch. The hardware arrangement places model-parallel workers together within a server, while additional distributed replicas can run on other servers. That placement matters because the method repeatedly exchanges information within each transformer layer.

#### Build the training collection

The authors assemble text from Wikipedia, CC-Stories, RealNews, and OpenWebtext. Their stated goal is a varied collection with material supporting dependencies across longer stretches of text.

They remove Wikipedia articles belonging to the WikiText103 test collection. They also clean newline artifacts in CC-Stories. BooksCorpus is included for BERT training but excluded from GPT-2 training because of its overlap with LAMBADA.

Documents shorter than 128 tokens are discarded. To address duplicate material across sources, the authors use locality-sensitive hashing and remove content with Jaccard similarity greater than 0.7. Jaccard similarity measures overlap between sets; the threshold is part of their duplicate-detection procedure.

The resulting deduplicated collection contains 174 GB of text. This is the scale of the aggregated corpus, not a count of distinct facts, linguistic constructions, or downstream examples.

#### Initialize and optimize the networks

Training uses mixed precision with dynamic loss scaling. Mixed precision allows the implementation to exploit the V100 Tensor Cores, while loss scaling helps manage the numerical behavior of the training calculation.

The initialization is written as:

```
W ∼ N(0, 0.02)
```

W denotes a weight tensor, and N denotes the normal distribution used for initialization. The values inside the parentheses are the distribution parameters as specified by the authors.

Weights immediately preceding residual additions receive an additional scale factor:

```
1 / √(2N)
```

N here denotes the number of transformer layers, with each layer containing attention and feed-forward blocks. This N is the layer-count symbol in the residual scaling rule, instead of the normal-distribution notation in the preceding formula.

The optimizer is Adam with [decoupled weight decay](https://md.research.elamur.ai/free/en/papers/loshchilov-2017-decoupled-weight-decay-regularization/). Its weight-decay setting is:

```
λ = 0.01
```

λ denotes the weight-decay coefficient. The training setup also uses global gradient-norm clipping at 1.0, dropout at 0.1, and activation checkpointing after every transformer layer.

GPT-2 training uses sequences of 1024 sub-word units, a batch size of 512, and 300k iterations. The learning rate reaches 1.5e-4 after a warmup lasting 3k iterations. It then follows cosine decay during the remaining 297k iterations, with a lower limit of 1e-5.

The BERT setup retains the original dictionary of 30,522 entries. It replaces next-sentence prediction with sentence-order prediction, following ALBERT, and uses whole-word n-gram masking associated with [SpanBERT](https://md.research.elamur.ai/free/en/papers/joshi-2019-spanbert-improving-pre-training-representing/).

BERT training uses a batch size of 1024 and a learning rate of 1.0e-4. Warmup lasts 10,000 iterations, followed by linear decay over the stated 2 million iteration schedule. The largest reported BERT run is evaluated before reaching that full duration.

#### Make the BERT residual path stable

The BERT architecture comparison concerns where a residual bypass begins relative to normalization. In the authors’ original arrangement, the bypass carries the representation after normalization around the following transformation. In the revised arrangement, it carries the representation from before normalization around both normalization and the transformation.

This distinction is more precise than simply saying that the paper adds normalization. Both diagrams contain normalization. What changes is which representation is preserved by the bypass and later added to the transformed branch.

The authors find that the revised arrangement avoids instability in the larger comparison and produces lower training loss. They then use that arrangement for the BERT scaling experiments. The architecture change is therefore part of the successful BERT recipe, separate from the decision to distribute the matrix operations.

#### Evaluate comparable probabilities

For WikiText103, the paper reports perplexity, an exponentiated average prediction loss:

```
PPL = exp(−(1 / Tₒ) Σₜ₌₁ᵀ log P(t | 0:t−1))
```

PPL denotes perplexity. T is the number of tokens under the network’s sub-word segmentation, while Tₒ is the token count under WikiText103’s original segmentation. P denotes the probability assigned to a token, and 0:t−1 denotes its preceding context. The sum accumulates log probabilities over the evaluated sub-word tokens, and exp converts the normalized negative log probability into perplexity.

The distinction between T and Tₒ is essential. A different segmentation changes how many prediction events a text contains. To compare with earlier WikiText103 results, the authors normalize using the original token count rather than their own sub-word count.

For the WikiText103 test set, Tₒ is 245,566 and T is 270,329. The original count is taken before invertible detokenization removes punctuation and whitespace artifacts that differ from the training text.

A fixed-context transformer cannot condition on an arbitrarily long prefix. The actual conditioning available is:

```
P(t | t−w:t−1)
```

t identifies the token being predicted, and w is the available context length. The expression t−w:t−1 denotes the preceding context window. In these experiments, w is 1024 tokens.

Computing a separate full window for every prediction would be expensive. The authors use overlapping windows, moving by an overlap parameter o of 32 and scoring the final o tokens in each window. This preserves substantial context while reducing repeated evaluation work.

For LAMBADA, the target is the final word of a short passage. Because a word can contain several sub-word units, an answer counts as correct only if all its required sub-word predictions are correct. The evaluation uses teacher forcing, supplying the correct earlier target units when scoring later ones. This defines a whole-word cloze criterion for a subword-based predictor.

### Experiments and results

#### The computing baseline and scaling conditions

The experimental system uses as many as 32 DGX-2H servers, containing 512 Tesla V100 SXM3 GPUs with 32GB of memory each. Within a server, NVSwitch provides the stated 300 GB/sec bandwidth between GPUs. Across servers, the setup has 100 GB/sec of interconnect bandwidth using 8 InfiniBand adapters per server.

These conditions are part of the result. Megatron-LM’s partitioning repeatedly exchanges activations and gradients, so its efficiency depends on both arithmetic capability and communication performance. The experiments establish practical behavior on this infrastructure instead of a hardware-independent efficiency guarantee.

The scaling baseline is a network with 1.2 billion parameters running on a single GPU. It sustains 39 TeraFLOPs across training, corresponding to 30% of that configured GPU’s theoretical peak. Using an already productive baseline makes the comparison more informative than scaling from an implementation that leaves most computation unused.

For the model-parallel study, the authors hold batch size at 8 while increasing network size and the number of participating GPUs. Hidden size per attention head stays at 96. They vary the number of heads and layers to construct the larger configurations.

The vocabulary is padded for efficient output-projection matrix operations. Its original size is 50,257, while the padded size is 51,200. The divisibility requirement comes from a per-GPU multiple of 128 combined with the largest tested 8-way partition.

For combined model and data parallelism, global batch size remains 512, corresponding to 64-way data parallelism. This lets the study examine the added cost of reconciling gradients across distributed replicas.

The detailed scaling section reports 77% efficiency for the 8.3 billion parameter configuration using 8-way model parallelism. With model and data parallelism together on 512 GPUs, it reports 74%. The abstract and conclusion emphasize throughput reaching 15.1 PetaFLOPs and report scaling efficiency up to 76%.

The paper does not provide a reconciliation that makes these efficiency statements interchangeable. A careful account should preserve the difference: 74% describes the detailed largest combined-scaling case, whereas 76% is the headline efficiency reported elsewhere.

#### GPT-2-style pretraining and zero-shot evaluation

The language-quality experiments compare GPT-2-style configurations labeled 355M, 2.5B, and 8.3B. These are related to, but not identical with, every configuration in the throughput study.

In particular, the 8.3B quality experiment uses 24 attention heads, whereas the corresponding scaling configuration uses 32. The 2.5B configuration is shared between the studies. The smallest quality experiment uses 64 GPUs in spite of being substantially smaller than the scaling baseline.

All of these language-training runs use the stated 300k iteration procedure. The validation curves show that greater size produces lower perplexity throughout the displayed training progression. The largest network reaches validation perplexity of 9.27.

This validation result belongs to the training collection’s held-out evaluation. It should not be confused with the WikiText103 test perplexity, which uses a separate corpus and the adjusted token-count procedure.

The paper describes an epoch as 68,507 iterations. For the 8.3B configuration on 512 GPUs, an epoch takes around two days. That provides a practical indication of the training effort, although it does not constitute a complete accounting of all runs, tuning, or infrastructure costs.

The external evaluations are zero-shot: the pretrained GPT-2-style networks are assessed on WikiText103 and LAMBADA without task-specific fine-tuning. The benchmark results improve with the tested network sizes.

WikiText103 test perplexity against the cited previous best Megatron-LM achieves lower perplexity under the paper's adjusted evaluation.

**The numbers**

| System or setting | perplexity |
| --- | --- |
| Previous best cited by the authors | 15.8 |
| Megatron-LM 8.3B (this paper) | 10.81 |

The WikiText103 comparison depends on the normalization and overlapping-window procedure described in the method. The value measures predictive fit to that test corpus. It is not a direct percentage of correct words or a measure of factual accuracy.

The authors’ earlier-best comparator is associated with nearest-neighbor language modeling in their references. Their result demonstrates a strong pretrained transformer prediction result under the reported evaluation, but the paper does not isolate every architectural and data difference between competing systems.

LAMBADA test cloze accuracy against the cited previous best The largest Megatron-LM configuration predicts the held-out final word more often.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Previous best cited by the authors | 63.2 |
| Megatron-LM 8.3B (this paper) | 66.51 |

LAMBADA tests whether the network can supply the final word from the preceding passage. The all-subwords-correct rule matters because a partial match does not receive credit. The benchmark therefore assesses a particular form of context-sensitive prediction, rather than unconstrained response generation.

The paper’s headline text also presents these results in shorter forms, including 10.8 for WikiText103 perplexity and 66.5% for LAMBADA accuracy. The more detailed results discussion gives 10.81 and 66.51%, which are the values used in the charts.

#### Checking overlap with evaluation text

The authors examine test-set 8-grams that also occur in the training collection. They report at most 10.8% overlap for WikiText103 and at most 1.4% for LAMBADA.

For context, the paper cites 9.09% overlap between the WikiText103 test set and its own training split. The authors interpret the observed overlap as consistent with earlier work and as support for their view that evaluation documents were not accidentally incorporated into their aggregated training collection.

This analysis strengthens the account of data preparation, especially alongside removal of the relevant Wikipedia articles and exclusion of BooksCorpus from GPT-2 training. It remains an overlap analysis, however. Shared short sequences and document identity are related but different questions, so the percentages should not be presented as proof that every possible form of contamination is absent.

#### BERT-style scaling and downstream tasks

The BERT quality experiments use configurations labeled 336M, 1.3B, and 3.9B. The smallest matches BERT-large in size. The 1.3B configuration corresponds to the BERT-xlarge setting that had performed poorly in the ALBERT comparison.

All use the revised residual arrangement. Hidden size per attention head remains 64. The 336M and 1.3B networks receive 2 million pretraining iterations, while the 3.9B network has received 1.5 million and is still undergoing training when reported.

On a held-out portion comprising 3% of the data, pretraining perplexity decreases as capacity increases.

BERT held-out pretraining perplexity on the 3% validation split Larger configurations achieve lower validation perplexity with the revised architecture.

**The numbers**

| System or setting | perplexity |
| --- | --- |
| Megatron-LM BERT 336M | 1.58 |
| Megatron-LM BERT 1.3B | 1.30 |
| Megatron-LM BERT 3.9B (this paper) | 1.16 |

These values support the claim that the revised BERT setup continues to benefit from larger capacity. Because the largest run has a different completed training duration, the comparison is not a perfectly matched experiment in every resource dimension.

The authors then fine-tune on MNLI and QQP from [GLUE](https://md.research.elamur.ai/free/en/papers/wang-2018-glue-multi-task-benchmark-analysis/), and on [SQuAD](https://md.research.elamur.ai/free/en/papers/rajpurkar-2016-squad-100-000-questions-machine/) 1.1 and [SQuAD 2.0](https://md.research.elamur.ai/free/en/papers/rajpurkar-2018-know-what-you-don-t/). RACE provides an additional reading-comprehension test.

Fine-tuning follows the procedure associated with [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/). The authors tune learning rate and batch size, then report median development performance over 5 random initializations.

The reported pattern is consistent across the downstream tasks: performance improves with the tested sizes. The authors describe the 3.9B configuration as the strongest BERT-based system in their development-set comparisons.

RACE is evaluated on its test split. The checkpoint selection procedure uses development results to identify the checkpoint corresponding to the median outcome across 5 seeds, then evaluates that checkpoint on the test set. The authors additionally report a 5-way ensemble.

The ensemble reaches RACE test accuracy of 90.9%, compared with the earlier best cited accuracy of 89.4%. The paper also reports that its individual-network RACE result establishes a new best. The numerical headline of 90.9% should nevertheless be identified as the ensemble result rather than attributed to an individual network.

### What the ablations show

#### The BERT architecture comparison isolates an important failure

The clearest controlled architectural analysis compares the residual arrangements used for BERT. The accompanying training-loss plot includes a 336M network under the original arrangement and a 752M network under each arrangement.

The original arrangement trains successfully at the smaller size. At the larger size, its loss becomes unstable. The revised arrangement trains stably and achieves a lower loss.

This is more informative than simply observing that the largest successful network performs well. It provides a comparison at the same larger size, changing the architecture’s residual relationship while retaining the broader training setting.

The result supports a specific causal interpretation: the residual arrangement is important to stable training in this experiment. It also weakens the interpretation that the earlier failure of BERT-xlarge necessarily demonstrates a lack of value in additional capacity.

The analysis does not establish that the revised arrangement solves every possible source of instability. Numerical precision, initialization, learning-rate schedules, and other architectural details remain part of the surrounding recipe. Nor does the paper derive a general theorem explaining the observed stability.

The architectural diagrams help locate what was changed. The residual branch in the revised version preserves the representation from before normalization. The study therefore concerns the path by which information bypasses a transformation, not merely the presence or absence of a normalization layer.

#### Attention-head count changes execution efficiency

The appendix studies the 8.3 billion parameter configuration with 8-way model parallelism while varying attention-head count from 16 to 32.

Increasing the head count changes the shape of attention’s internal matrix operations. The authors explain that some multiplications become smaller, while the attention softmax involves more elements. They observe a slight reduction in scaling efficiency.

This analysis reveals an interaction between architectural hyper-parameters and hardware execution. A parameter choice can affect computational efficiency even when the overall network size remains the focus of the experiment.

It also explains why attention-head count should be reported alongside parameter count in a systems comparison. The quality-training configuration and scaling configuration do not use identical head counts, so their runtime behavior should not be assumed to match solely because both are labeled 8.3B.

The paper advises balancing speed and accuracy when selecting this hyper-parameter. The analysis establishes the speed concern; it does not supply a complete accuracy-versus-head-count frontier from which a universally preferred choice could be selected.

#### Strong scaling tests a different use case

The main scaling experiments enlarge the network as more GPUs participate. The appendix also asks whether the same technique can accelerate a fixed network without increasing the batch.

For this strong-scaling study, parameter count stays at 1.2 billion and batch size stays at 8. Adding GPUs divides the same total calculation into smaller pieces.

The authors report that using two GPUs makes training 64% faster. With additional devices, the benefits diminish. Their explanation is that each GPU has less arithmetic to perform, while memory-bandwidth demands and communication overhead become more influential.

This supports a practical boundary on the method. Model parallelism can accelerate a network that already fits on one device, but its main strength is enabling a network that otherwise cannot fit. The best reason to add a model-parallel worker may be additional memory capacity rather than proportional speedup.

The strong-scaling result also reinforces the paper’s communication argument. Once local work becomes small, the exchanges that were acceptable alongside large matrix multiplications become a larger share of the operation.

#### Combining parallelism introduces a measurable cost

The comparison between model parallelism alone and combined model-and-data parallelism examines another source of overhead. Distributed replicas must reconcile their weight gradients in addition to the exchanges already needed inside the network.

The detailed results show 77% scaling efficiency for the largest model-parallel configuration and 74% for the largest combined configuration. These belong to different GPU counts and execution settings, so they are not a comparison of identical complete runs.

They nevertheless support the authors’ explanation that additional gradient communication has a cost. They also demonstrate that the combination remains useful: the training setup can distribute both the network and the examples without losing most of the baseline’s computational effectiveness.

#### Size comparisons support the recipe, not every ingredient separately

The GPT-2 and BERT size studies show that larger configurations achieve better validation and downstream results within the tested training recipes. They are valuable empirical analyses of scaling.

They are not separate ablations of deduplication, mixed precision, checkpointing, initialization, or loss fusion. Those ingredients operate together. The paper gives mathematical and engineering reasons for several of them, but it does not report a removal experiment for every choice.

That distinction helps explain the strength of the evidence. The residual-path comparison directly investigates an architectural failure. The size studies demonstrate the behavior of successful complete configurations. The communication analysis explains why the partition is plausible and reports its overall efficiency, without attributing a measured share of the gain to every implementation decision.

### Limitations

#### Limits the authors explicitly identify

The authors present larger-scale pretraining as unfinished work. The reported configurations demonstrate substantial scale, but continuing to enlarge them would place further demands on both hardware and software.

They identify optimizer efficiency and memory use as important constraints. Partitioning parameters does not make optimizer state disappear. As the network grows, the storage and execution costs of optimization remain part of the resource problem.

They also describe a boundary imposed by the server configuration. A network containing more than 16 billion parameters would require more memory than is available within the 16 GPUs of a DGX-2H server. For that setting, they suggest combining intra-layer partitioning with inter-layer partitioning and model parallelism across servers.

This is a proposal for extending the method. The paper’s principal experiments do not establish the performance of that full hybrid arrangement at arbitrary scale.

The authors also propose testing other network families, including [XLNet](https://md.research.elamur.ai/free/en/papers/yang-2019-xlnet-generalized-autoregressive-pretraining-language/) and [T5](https://md.research.elamur.ai/free/en/papers/raffel-2019-exploring-limits-transfer-learning-unified/). Their inclusion as future work marks the scope of the current evidence: successful GPT-2-style and BERT-style training does not automatically establish an identical result for every transformer training objective.

The proposed downstream extensions include generative question answering, summarization, and conversation. The evaluated benchmarks therefore represent a useful but limited set of language behaviors.

Finally, knowledge distillation into smaller students remains prospective. The paper demonstrates the training of large teachers and suggests a route toward smaller systems, but it does not show the quality or efficiency of such students.

#### The hardware result has specific conditions

A careful reader should distinguish the algorithmic idea from the reported efficiency. The partitioning scheme can be described independently of a particular server, but the measured scaling depends on the machines, interconnects, matrix shapes, and placement of workers.

The experiments use fast communication within servers and substantial bandwidth between them. A configuration with different communication costs could spend a different fraction of its time waiting for exchanges.

The attention-head analysis already shows that efficiency changes with computational shape. Strong scaling likewise shows diminishing benefits when each device receives less arithmetic. These are direct reasons to avoid treating the headline efficiency as a constant property of Megatron-LM.

The reported throughput also measures sustained arithmetic activity across the application. It does not by itself state how much wall-clock time another implementation would need to reach the same task quality under a different training recipe.

#### Scaling network size is not a complete allocation study

The experiments show improvement over the tested sizes. They do not establish the best way to allocate a fixed total resource budget among parameter count, corpus size, training duration, and the number of exploratory runs.

The BERT comparison makes the issue visible: the largest network is reported after 1.5 million iterations, while the smaller ones receive 2 million. The result is useful evidence about the trained configurations, but it does not hold every aspect of training effort constant.

Likewise, more parameters alter both capacity and the cost of processing each example. A lower perplexity after the same number of iterations does not, on its own, establish the best quality attainable for a fixed amount of arithmetic or a fixed elapsed time.

These are limits inferred from the experimental design. The authors do not present the study as a comprehensive optimization of every resource tradeoff.

#### Benchmark gains have a defined scope

WikiText103 perplexity measures how well the predictive distribution fits a particular corpus under the stated evaluation. LAMBADA measures final-word recovery under its cloze procedure. RACE evaluates a reading-comprehension task after fine-tuning.

These are meaningful outcomes, but they are not interchangeable. A network can improve on all of them without the paper having tested every property needed for a deployed language system.

The generated samples illustrate possible continuations. They are not a systematic factuality evaluation or a measured study of reliability. Their fluent style should therefore not be treated as additional quantitative evidence about correctness.

The paper also does not report a broad evaluation of bias, safety, or robustness. That observation is a scope limit drawn from the tasks studied, instead of a claim by the authors that those properties are unimportant.

#### Data cleaning reduces uncertainty without eliminating it

Removing known test articles, excluding an overlapping corpus, and deduplicating the aggregate are substantial preparation steps. The 8-gram analysis supplies additional evidence about overlap.

Nonetheless, the analysis does not establish an exhaustive account of every relationship between training text and evaluation material. Similar passages can share short sequences for reasons other than document leakage, and overlap percentages do not describe every possible near-duplicate pattern.

The authors express confidence that test documents were not accidentally included. A cautious reading can accept the reported checks as supporting evidence while keeping the strength of that conclusion distinct from a complete provenance audit.

#### Several comparisons depend on the whole recipe

The BERT experiments combine a revised residual arrangement with sentence-order prediction, whole-word n-gram masking, and the stated optimization procedure. Their success demonstrates a working recipe.

The controlled residual comparison provides evidence for that architectural change. It does not quantify how much of each downstream gain is attributable to normalization placement, training data, masking, or increased size separately.

Similarly, the GPT-2 benchmark comparisons involve a larger network trained on the authors’ aggregated corpus. They do not isolate parameter count from every other difference relative to earlier systems.

The defensible conclusion is that the reported larger configurations improve results under this setup. A stronger claim that parameter count alone explains every gain would require additional controls.

#### The efficiency figures should remain distinct

The paper contains both 76% headline scaling efficiency and 74% in the detailed largest combined-scaling discussion. Replacing either with a reader’s own reconciliation would create precision that the paper does not supply.

The same care applies to individual and ensemble results. The reported RACE accuracy of 90.9% belongs to the ensemble. It should not be used as if it measured an individual network.

Keeping such distinctions visible does not weaken the work. It makes clear which experimental object each number describes and prevents a compact headline from acquiring a broader meaning than its evidence supports.

### What came after

Megatron-LM’s later citation network spans training systems, pretrained language networks, adaptation methods, and surveys. These connections need different levels of interpretation. A citation establishes that later authors referred to the work; it does not, on its own, establish that they used the same partition, retained the same communication operators, or reproduced its efficiency.

The most explicit continuation is [Using DeepSpeed and Megatron to Train Megatron-Turing NLG 530B](https://md.research.elamur.ai/free/en/papers/smith-2022-using-deepspeed-megatron-train-megatron/). Its title directly identifies Megatron as part of the training approach. That makes the connection stronger than a general reference to earlier large-network training: the named system becomes part of a subsequent training effort. The citation information does not establish which individual components of the original implementation were retained or how their costs were divided.

The original paper itself also mentions a subsequent use of Megatron for Turing-NLG, described as a 17 billion parameter GPT-2-style network. The authors report that accuracy improved with that further increase in size. This is the clearest later-use statement made within their own account, although it is not a substitute for a controlled extension of every experiment in Megatron-LM.

[GShard](https://md.research.elamur.ai/free/en/papers/lepikhin-2020-gshard-scaling-giant-models-conditional/) addresses giant networks through conditional computation and automatic sharding. Its connection places Megatron-LM within a broader effort to make partitioned neural computation practical. The approaches are related at that level of systems purpose. The citation alone does not establish that automatic sharding uses Megatron-LM’s manually selected transformer partitions, and those mechanisms should not be treated as identical.

[Scaling Language Models: Methods, Analysis & Insights from Training Gopher](https://md.research.elamur.ai/free/en/papers/rae-2021-scaling-language-models-methods-analysis/) continues the investigation of large-network training as both an engineering and empirical problem. That is the same combination that gives Megatron-LM its significance: infrastructure enables an experiment, while the experiment tests the value of the additional scale. The bibliographic connection supports that place in the research lineage without supplying a component-by-component implementation history.

[FlashAttention-2](https://md.research.elamur.ai/free/en/papers/dao-2023-flashattention-2-faster-attention-better/) takes up faster attention through parallelism and work partitioning. Its subject is relevant to Megatron-LM’s demonstration that the way work is divided can determine whether hardware remains productive. However, attention execution and whole-network distribution are different levels of the system. The relationship should be understood as a continuing concern with efficient attention computation, not as evidence that the later method simply reproduces the original head assignment.

[Language Models are Few-Shot Learners](https://md.research.elamur.ai/free/en/papers/brown-2020-language-models-few-shot-learners/) represents a later investigation of what pretrained language networks can do. Megatron-LM’s contribution to this line of research is the demonstrated feasibility of training a much larger transformer through a relatively direct implementation. The citation establishes its relevance to that development; it does not establish a particular training configuration for the later work.

Several later publications concern accessible pretrained systems, including [OPT](https://md.research.elamur.ai/free/en/papers/zhang-2022-opt-open-pre-trained-transformer/) and [GPT-NeoX-20B](https://md.research.elamur.ai/free/en/papers/black-2022-gpt-neox-20b-open-source/). Their titles identify an emphasis on openly available pretrained or autoregressive language networks. Megatron-LM’s release of its implementation and training and evaluation pipelines is relevant to that broader concern with making large-network research reproducible. A more specific claim about inherited code would require evidence beyond their citation relationship.

[LoRA](https://md.research.elamur.ai/free/en/papers/hu-2021-lora-low-rank-adaptation-large/) addresses low-rank adaptation of large language networks. Its relationship to Megatron-LM is best framed around the resource problem created by scale: once a large pretrained network exists, adapting it becomes another engineering challenge. That is a different stage from the original paper’s pretraining experiments. The later citation does not show that low-rank adaptation changes or replaces Megatron-LM’s intra-layer training arrangement.

The survey [A Survey of Large Language Models](https://md.research.elamur.ai/free/en/papers/zhao-2023-survey-large-language-models/) and the broader discussion [On the Opportunities and Risks of Foundation Models](https://md.research.elamur.ai/free/en/papers/bommasani-2021-opportunities-risks-foundation-models/) place the work within wider accounts of pretrained systems. Their citation links support Megatron-LM’s role as part of the technical background to that field. They do not independently validate its individual benchmark results or extend those results to every application.

Across these later connections, the most durable idea is a specific way of making scale tractable. The paper shows that the structure of repeated transformer operations can guide a small, understandable set of partitions and exchanges. Later research can extend the training scale, change the execution machinery, or study new uses of pretrained networks while still confronting the dependency Megatron-LM made concrete: a larger network becomes scientifically useful only when its computation can be organized, trained stably, and evaluated under conditions that are clear enough to assess.

## Cite

Cite as Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro. 2019. Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism. arXiv:1909.08053.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.1909.08053](https://doi.org/10.48550/arxiv.1909.08053) · [arXiv 1909.08053](https://arxiv.org/abs/1909.08053)

```bibtex
@misc{shoeybi2019megatron,
  title = {{Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism}},
  author = {Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro},
  year = {2019},
  doi = {10.48550/arxiv.1909.08053},
  eprint = {1909.08053},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1909.08053}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
