Scaling FP8 training to trillion-token LLMs
Authors: Maxim Fishman
Brian Chmiel
Ron Banner
Daniel Soudry
Venue: ICLR 2025 Spotlight (2025)
Keywords: quantization
fp8
llms
training
acceleration
compression
Primary area: optimization
TL;DR: Training LLMs up to 2 trillion tokens, for the first time in FP8 precision

Abstract: We train, for the first time, large language models using FP8 precision on datasets up to 2 trillion tokens --- a 20-fold increase over previous limits. Through these extended training runs, we uncover critical instabilities in FP8 training that were not observable in earlier works with shorter durations. We trace these instabilities to outlier amplification by the SwiGLU activation function. Interestingly, we show, both analytically and empirically, that this amplification happens only over prolonged training periods, and link it to a  SwiGLU weight alignment process. To address this newly identified issue, we introduce Smooth-SwiGLU, a novel modification that ensures stable FP8 training without altering function behavior. We also demonstrate, for the first time, FP8 quantization of both Adam optimizer moments. Combining these innovations, we successfully train a 7B parameter model using FP8 precision on 256 Intel Gaudi2 accelerators, achieving on-par results with the BF16 baseline while delivering up to a $\sim$ 34 % throughput improvement. A reference implementation is supplied in https://github.com/Anonymous1252022/Megatron-DeepSpeed

Published as a conference paper at ICLR 2025
SCALING FP8 TRAINING TO TRILLION-TOKEN LLMs
Maxim Fishman 1 Brian Chmiel i+ Ron Banner
Daniel Soudry
Intel, Israel
Department of Electrical and Computer Engineering Technion, Haifa, Israel
maxxim Fishman
ron. banner @intel.com
daniel scudry) @gmail com com
ABSTRACT
We train, for the first time, large language models using FP8 precision on datasets up trillion tokens - a 20-fold increase over previous limits. Through these extended training runs, uncover critical instabilities in FP8 training that were not observable in earlier works with shorter durations. We trace these instabil- ities to outlier amplification by the SwiGLU activation funetion. Interestingly, we show, both analytically and empirically, that this amplification happens only over prolonged training periods, and link it to SwiGLU weight alignment pro- cess. To address this newly identified issue, we introduce Smooth-SwiGLU, novel modification that ensures stable FP8 training without altering function behavior. We also demonstrate, for the first time, FP8 quantization of both Adam optimizer moments. Combining these innovations, we successfully train a 7B parameter model using FP8 precision on 256 Intel Gaudi2 accelerators, achieving on-par results with the BF16 baseline while delivering up to a 34% throughput improvement. A reference implementation is supplied in https: //
INTRODUCTION
Large Language Models (LLMs) have revolutionized natural language processing, demonstrating remarkable capabilities across a wide range of tasks. However, the computational demands of training these models have become increasingly challenging, driving the need for more efficient training methods. Low precision formats, particularly FP8, have emerged as a promising solution to reduce memory usage and accelerate training. Recent work by Peng et al. (2023) has demonstrated the potential of FP8 training for LLMs. However, these studies have been limited to datasets up to 100 billion tokens, leaving open questions about the scalability and stability of FP8 in truly large-scale training scenarios.
In this paper, present advancements in FP8 training for LLMs, successfully scaling to datasets of up to 2 trillion tokens a 20-fold increase over previous limits. This leap in scale has revealed critical instabilities in FP8 training that were not observable in earlier, shorter-duration studies. Through rigorous analysis, we trace these instabilities to a previously unidentified phenomenon: the amplification of outleer by the SwiGLU activation function (Shazeer (2020a)), which becomes pronounced only after extended training periods. The severity of this issue is illustrated in Fig. a)). where we present the training loss of Llama2 7B using FP8 precision. The graph clearly shows dramatic divergence caused by outliers after processing 220B tokens twice the dataset size explored in previous work (Peng al. (2023)).
To address this newly discovered challenge, we introduce the standard SwiGLU activation that effectively mitigates outlier amplification without altering the function's 's behavior. This innovation ensures stable FP8 training across extended durations, enabling the use of FP8 precision large-scale LLM training without compromising model performance.
novel modification to
"Equal contribution.

---

Published as a conference paper at ICLR 2025
Furthermore, push the boundaries of low- now-precision optimization by demonstrating, for the first time, the successful quantization of both Adam optimizer moments to FP8. This advancement reduces memory usage during training, further enhancing the efficiency of large-scale LLM development.
By combining these innovations Smooth-SwiGlae and FP8 quantization of optimizer moments successfully train 7B parameter model using FP8 precision on 256 Intel Gaudi2 accelerators. Our approach achieves results on par with the BF16 baseline while delivering up to 34% throughput improvement, marking significant leap in training efficiency for large-scale language models.
Our paper makes several key contributions:
We demonstrate the first successful FP8 training of LLMs on datasets up to 2 trillion tokens, far surpassing previous limits and revealing critical instabilities in extended training regimes.
We identify the root cause of these instabilities: outlier amplification by the SwiGLU activation function over prolonged training periods.
We link, analytically and empirically, the outlier amplification to a weight alignment hap- pening during training with &2 regularization, in the SwiGLUs with sufficiently large inputs.
We introduce without altering model behavior, enabling efficient large-scale LLM training.
novel activation function that ensures stable FP8 training
We present the first implementation of FP8 quantization for both Adam optimizer moments, further optimizing memory usage in LLM training.
We achieve on-par results with BF16 baselines on downstream tasks while providing throughput improvements on Intel Gaudi2 accelerators, demonstrating the practical viability of our approach for state-of-the-art LLM training.
2 BACKGROUND AND CHALLENGES OF FP8 TRAINING IN LLMS
The computational demands of Large Language Models (LLMs) have driven a shift from traditional FP32 to reduced-precisionn formats. While FP16 and BF16 have become standard in many training tasks (Micikevicius et al. SSao et al. 2022 Smith et al. (022), FP8 represents the next step in this progression towards lower precision. Micikevicius et al. (2022) standardized two FP8 formats for deep learning: E4M3 (4 exponent bits, 3 mantissa bits) optimized for weights and activations, and E5M2 (5 exponent bits, mantissa bits) suitable for gradients.
FP8 shows promise for large-scale training, especially with support from modern hardware like NVIDIA's H100 and Intel's Gaudi2. However, its limited range necessitates careful scaling techniques to maintain numerical stability and model performance.
The primary challenge in FP8 training for LLMs stems from its limited dynamic range. To address this, researchers have developed various scaling techniques. Global loss scaling (Micikevicius et al., (017)) multiplies the entire loss by a constant factor to prevent gradient underflow during backpropagation. Per-tensor scaling (Sun al. (019)) takes more granular approach, scaling each tensor individually based on its specific range of values. These techniques allow for better utilization of the FP8 format's limited range. However, (Lee al. (024) demonstrates that, even with these techniques, FP8 training can lead to significant instabilities, highlighting the ongoing challenges in seduced-precisiige LLM training.
Implementation of these scaling techniques typically follows one of two approaches: just-in-time scaling or delayed scaling. Just-in-time scaling dynamically adjusts scaling factors based on the current data distribution. However, it often proves impractical in FP8 training due to the need for multiple data passes, which can negate the performance benefits of using FP8. Delayed scaling, on the other hand, selects scaling factors based on data distributions from preceding iterations. While more practical, assumes consistent statistical properties across iterations, making it vulnerable to outliers that can disrupt this consistency and potentially destabilize the training process.
Recent work by Peng et al. 2023) demonstrated the first empirical results of training LLMs using FP8 format up to 100 billion tokens, validating the potential of FP8 for large-scale training, but less applicable in real-world scenarios that usually require larger training. Our research extends this work, successfully scaling FP8 training datasets of up trillion tokens. We introduce novel techniques
2

---

Published as a conference paper at ICLR 2025
to address the challenges of FP8's limited dynamic range and the instabilities that emerge in extended training scenarios. Our approach not only overcomes these limitations but also achieves substantial improvements in memory usage and training speed, demonstrating the viability of FP8 training for truly large-scale L.M development.
3
OUTLIER AMPLIFICATION IN LARGE-SCALE FP8 TRAINING
The presence of outliers has been observed in numerous studies Yang et al. 2024 Bondarenko et al. 2023), particularly in the activations during inference. One of the previously solution presented to confront with these outliers for inference, is to apply rotation to the activations (Liu et al. (024). These outliers can significantly impact stability and performance of the model, as they introduce extreme values that are difficult to manage within the limited dynamic range of reduced-precision
formats like FP8. Our work reveals that these outliers become particularly prominent the later stages of training large language models (LLMs) with large-scale datasets.
Rarattona
(a)
(b)
Figure 1: Comparison activation maximum values across different layers during 50 iterations of training: (a) At the beginning of training, showing stable maximum values. (b) After 200B tokens of training. revealing sporadic significant outliers (notice the change the z-axis scale).
As shown Fig. D these outlicrs emerge only after processing approximately 200 billion tokens during training. This phenomenon poses significant challenges maintaining numerical stability and model performance, especially when using methods that assume consistency across iterations. The sudden appearance of these outliers, which are crucial for model performance (Sun al.) 2024), disrupts the statistical assumptions underlying FP8 training techniques, potentially leading to instability divergence the training process.
The emergence of these outliers in the later stages of training is particularly problematic for FP8 formats due to their limited dynamic range. Unlike higher precision formats such as FP32 or even BF16, FP8 has much narrower range of representable values. When outliers exceed this range, they can cause overflow underflow, leading to loss of critical information and potentially destabilizing the entire training process.
Moreover, the sporadic nature these outliers, as evident Fig. Tb makes them challenging to predict and manage. Traditional scaling techniques, which rely consistent statistical properties across iterations, struggle to adapt to these sudden, extreme values. This unpredictabillty further complicates the task of maintaining numerical stability in FP8 training, especially as the scale of the dataset and the duration of training increase.
SWIGLU AND OUTLIER A AMPLIFICATION
While the previous section highlighted the general problem of outlier emergence in large-scale FP8 training, investigation reveals that the SwiGLU (Swish Gated Linear Unit) activation function plays a crucial role in amplifying these outliers. This section explores the structure of SwiGLU and demonstrates how its unique properties contribute the generation and amplification of outliers.
4.1 SWIGLU STRUCTURE
The Transformer architecture Vaswwani et al. 2017). which forms the foundation of modern LLMs, has undergone several modifications to enhance performance and efficiency. One notable example

---

Published as a conference paper at ICLR 2025
is the inclusion of the SwiGLU (Swish Gated Linear Unit) (Shazeer 2020b activation function in models like LLaMA TTourron et al. 2023) and PaLM (Chowdhery et al. 2022).
Let Fd be the imput vector from the previous layer. For two weight vectors W1, W2 Rd, the SwiGLU neuron is defined as follows
SwiGLUw, w2 (x) (x wi)Swish(x T w2) 2 (x' "w))xx w22) w2),
e)*) ) the sigmoid function. where (=) e 1/(1
While other standard neuron types, such ReLU, GeLU, and Swish at most linear at large input magnitudes (i.e., lom [f(u/uul S 1), the SwiGLU activation is quadratic and can reach much larger values (and cause very strong outliers) if wi and W2 are sufficiently aligned (e-g., if wi and w x = then lim,-+s SwiGLUw1,ww (cx)/c² = 1). As we show next, precisely such alignment happens during training for neurons with sufficiently large inputs.
4.2 THEORETICAL ANALYSIS OF WEIGHT CORRELATION SWIGLU
Next, we analyze the behavior of the SwiGLU neuron during training and show its weight vectors tend to align perfectly the magnitude of its imput increases above some threshold. This causes the SwiGLU output magnitude to increase significantly during training, potentially resulting in outliers.
To show this, assume the SwiGLU neuron is embedded neural network with k parameters. The rest of the parameters in the network are denoted by E k-2d We train the neural network with some &g regularization
min WI.Wa.
Σ en (SwiGLUw.,w (xn (0))
[|w1l| [[wel 112
[10113)
where j is regularization strength, N is the number of training samples, and la (u,, 0) is the per-sample loss as a function of the SwiGLU output and the rest of the neural network parameters. We find that
Theorem 1. Suppose we converge to a stationary point (W1, W2, 0) of the loss function, and for all samples n, o' (x, (0) W2) 0. Then, this stationary point, W1 W2 or W1 W2-
Proof. At stationary point (W1, W2, 0) we have Vi E {1,
(SwiGLU W1.wa (x, (0)), + uw; 0.
Using the chain rule we obtain the following two equations
Σ X Woo (w. )6, + pw1
Σ x W1 (o x..) + (x,, w2)o' (xx,, wz)) 6n + 1W22,
72
where we defined (w1, W2, 0)
(vn.0)
SWiGT (x..(( and with a slight abuse of
Jun
notation, we suppressed the dependence of (W1, W2, 0) and x,, (0) on Given the assumption
Vn (xx] w2) (x]
+0
this limit obtain
= Σ X W xx )6n jwi
0=
Σ X X=xxxxxwooom wix + pw2.
12
Now, defining An =- -101-0 Xn., the above equations become
W = Σ AnXxx, = Aw2
W2 = Σ An XnXxx,, = Aw

---

Published as a conference paper at ICLR 2025
where A En Xn is symmetric matrix. This implies
Wi Aw2 - A?w W2 = Aw A
(2)
Since A is symmetric this implies that both and are eigenvectors of A with the same eigenvalue: 1 or -1 Plugging this into equation we obtain W1 = W2 or W1 = W2
Note this result holds also if replace the swish activation in SwiGLU with other GLU variants (Shazeer 2020a), since we did not use any specific properties of the Swish. Thus, practically, with regularization and sufficient training, the weight vectors W1 and W2 must converge to either identical or opposite directions, i.e., W1 = W2 or W1 ~ W2 - if o (x,, (0) w2) is typically small. Since o' d2) decays exponentially fast as |z] increases, this simply means that the neuron inputs are typically not too small. This can happen in the case in which w2/l sufficiently large, and typically W Xn (0) > 0. One should expect the latter condition to be the generic case when we fit neural network a large dataset of size N, where N > k (i.e.,
in ander-parameterized regime) and zero loss is not reachable- since then the neural network does not have spare capacity to set specific neuron inputs in the Appendix) that after training [w X > for ~ 99% of the tokens, in the outlier neuron. if it is very weak. In
(in addition to fitting the data). And indeed, observe (Fig.
Interestingly, this alignment phenomenon occurs due l regularization, fact, weak regularization will lead to larger weight norms, strengthening this effect.
4.3
OBSERVING WEIGHT CORRELATION GROWTH AND TRAINING INSTABILITY
3.2
(a)
(c)
2.8
0.1
0.0
2.4
0.2
2.0
-0.3
0.4
BF16
End Start
1.6
FP8
005
S0
100
150
200
250
300
-0.4
-0.2
0.0
0.2
Processed Tokens (B)
w1
12
(b)
1.0
(d)
35
Start
30
10
0.8
Correlation Coefficient
0.6
20
Weight
0.4
15
10
w1
0.2
w2 norm
2-
Correlation
0.0
50
100
150
200
250
300
-0.4
-0.2
0.0
0.2
Processed Tokens (B)
Values
Figure 2: (a): Training loss of LlaMA2-76 with BF16 and FP8 precision, where a significant loss divergence is seen for FP8 after step ~ 200B tokens. (b): Dynamics of the and wa norms, and their correlation during training, for specific channel that generates outliers. A drastic increase in correlation and norm is observed at the same point where we start to see loss degradation in (a). (c): Scatter plot an outlier channel elements in W₁ and W2, at an early training stage (8B tokens) and late training stage (330B tokens), demonstrating minimal correlation at start of the training and high correlation in the later stage. (d): Histogram of an outlier channel of Wi at an early training stage (8B tokens) and late training stage (330B tokens).

---

Published as a conference paper at ICLR 2025
In our experiments, observed clear relationship between the increasing correlation of the weight matrices W1 and W2 and the eventual divergence in FP8 training loss.
In Fig. we the process of weight alignment and its impact FP8 training develops precisely as our theory predicts. As training progresses, ||wa| in the outlier channel grows, eventually exceeding critical threshold satisfying our Theorem's assumption. Thus, the weight vectors W1 and W2 in these channels begin to align rapidly-iia the correlation between W and W2 is initially low, but then increases drastically between 125B and 210B tokens. Interestingly, seems this alignment happens simultaneously with further norm growth. This combination of high correlation and increased weight norm creates ideal conditions for generating extreme activation values, "spikes."
These activation spikes, in turn, lead to the divergence of FP8 training. as shown in Fig. 2a. Im- portantly, while we primarily observe strong positive correlations in this example, our theory also predicts the possibility of strong negative correlations. We also observe these, can be seen in Fig. the Appendix.
This phenomenon highlights the unique challenges posed by SwiGLU in FP8 training of large language models. The gradual alignment of weights, combined with norm growth, creates a sce- nario where outliers become increasingly likely and severe training progresses. Consequently, instabilities may not be apparent shorter training runs but emerge as critical issues in large-scale, long-duration training scenarios. This explains why such problems have not been observed in previous, smaller-scake studies of FP8 training.
4.4 SMOOTH-SWIGLA
As demonstrated earlier. the SwiGLU activation function can lead to outliers in the input of the last linear layer of the MLP component. These outliers pose a significant challenge when using FPS precision with delayed scaling, which relies on the assumption that statistical properties remain consistent across layers. The sudden spike in value caused by SwiGLU disrupts this continuity, leading to instability the training process. Fig. 3 we demonstrate that disabling the quantization of the last linear layer in the MLP component (output of SwiGLU) allows Llama2 FP8 to successfully converge with large datasets, addressing the previously observed divergence issues. This shows that other components in Llama architecture, such RMS Norn or MHA are not the cause of instability in FP8 training.
BF16
2.4
FP8
FP8 SwiGLU output BF16
1055
2.0
1.8
250
500
750
1000
1250
1500
1750
2000
Processed Tokens (Billions)
Figure 3: Training loss of Llama2 FP8 with and without quantization of SwiGLU output. As can be seen the cause of the divergence of standard FP8 is the amplification of the SwiGLU (input to w3).
While disabling quantization of the SwiGLU output effectively prevents divergence, it reduces the potential acceleration benefits of FP8. To maintain full FP8 acceleration while addressing the outlier problem, propose a novel modification called Smooth-SwiGLU. Figure illustratess the key idea

---

Published as a conference paper at ICLR 2025
behind Smnooth-SwiGLae applying scaling factor the linear branch of the SwiGLU function and rescaling it back after the last linear layer. This approach prevents outliers the quantization of the imput to the last linear layer while preserving the overall function of the SwiGLU activation, enabling us to fully leverage FP8 precision throughout the network.
Swish
W2
Swish
W1
(b)
Figure 4: A standard quantized MLP component containing the original quantized SwiGLU (a) and the proposed quantized Amooth-SSiGi.. (b), which improves the stability under FP8 training. Here, is the scaling factor, W1.w2 and W3 are the quantized weights, and Q is the quantization function.
Mathematically, we express the quantized Smooth-SwiGLU function for each channel as:
Smooth-SwiGLUe...e #2. (x) s; (s:
(3)
where is the per-channel scaling factor, w ((w) denotes the quantized version of weight vector w, and Q is quantization function (in a slight abuse of notation, we suppress the dependence of Q on the tensor).
To minimize computational overhead, we compute scaling factors 8; using an efficient parallel approach:
1. Split the tensor into chunks, where each chunk corresponds to a channel.
2. For each chunk (channel), compute its maximum value in parallel.
3. Use these per-channel maximum values determine the individual scaling factors s; for each channel.
This method allows for efficient per-channel scaling, as each channel's 's scaling factor computed independently and in parallel. The computational cost of this approach is moderate compared to the matrix multiplications in the linear layers, especially given the parallelization, even with our non optimized implementation. During inference, the scaling factors be merged into the weights of the first and third linear layers in the MLP layer that includes the SwiGLU layer followed by linear layer (see Figure i.c.
Σ Ws,,Smooth-SwiGLU i1 (x)
ES¹ -s. (VT.
So we can absorb the scalar by re-defining Wi.; Q(s: w1.)) and Wa,i A Q(+ W3.).. Thus, this procedure results in zero additional cost at inference.
5 FP8 OPTIMIZER
The Adam optimizer and its variants are widely used in deep learning due to their effectiveness in handling various training challenges. key characteristic of the Adam optimizer is its storage of two moments, traditionally in high precision (FP32). This significantly increases memory usage, particularly for large-scale models. While previous research Peng et al. (023) has shown the feasibility of reducing the first moment to FP8 precision, they retained the second moment in FP16. Our work pushes the boundaries further by successfully quantizing both moments to FP8, significantly improving the optimizer efficiency for large language models.
7

---

Published as a conference paper at ICLR 2025
5.1 CHALLENGES
The Adam optimizer uses two moments to adapt learning rates for each parameter:
1. The first moment is an estimate of the mean of the gradients.
2. The second moment is an estimate of the uncentered variance of the gradients.
critical aspect of the Adam optimizer the use the inverse square root of the second moment in the parameter update step. This operation has important implications for precision requirements.
Due to this inverse square root operation, the smallest values in the second moment become the most significant in determining parameter updates. This characteristic creates unique challenge when considering precision reduction for the second moment.
5.2 METHODOLOGY
We conducted extensive experiments determine the optimal FP8 formats for both moments. Our investigation revealed that different precision requirements exist for each moment:
1. First Moment:
The E4M3 format (4 exponent bits, 3 mantissa bits) provides sufficient precision. This format offers good balance between range and accuracy for representing the mean of the gradients.
2. Second Moment:
The E5M2 format (5 exponent bits, mantissa bits) is necessary. This format provides higher dynamic range, crucial for preserving information about the smallest values in the second moment. The additional exponent bit ensures that we can accurately represent both very small and moderately large values, which is critical given the inverse square root operation applied to this moment.
In our experiments, presented in Fig. we show that while the first moment is able to converge with E4M3, the second moment, which estimates the square of the gradients, requires a wider dynamic range and is able to converge only with E5M2 format. In Table we compare the proposed quantization scheme for the optimizer moments with the one presented in Peng et al. (202)) Our scheme shows, for the first time, the ability to quantize both moments with standard FP8 formats.
10
BF16
ESM2.Mom2
ESM2,Mom2
8
E4M3,Mom2
Mom1
loss
2.5
7.5
10.0
12.5
15.0
20.0
Processed Tokens (Billions)
Figure 5: All combinations for quantization the Adam moments with standard FP8 formats Llama2 100m. The only combination that is able to converge to baseline is first moment E4M3 format and second moment E5M2 format.
EXPERIMENTS
We conducted extensive experiments to evaluate the effectiveness of our proposed FP8 training method for Large Language Models (LLMMs) across various scales.
8

---

Published as a conference paper at ICLR 2025
Table Comparison of the different datatypes for the two Adam optimizer moments.
Model BF16 (Baseline)
Mom
Mom 2
FP32
FP32
FP8 (Peng al.
2023)
FP8
FP16
FP8 (Ours)
FP8
FP8
6.1 EXPERIMENTAL SETUP
Model and Dataset. We used the Llama2 model (Touvron et al. 2023) baseline. This model
is a decoder-only Transformer (Brown et al. 2020) with pre-normalization RMSNorm (Zhang & 2019). SwiGLU activation function (Shazeer 2020b), and rotary positional embeddings (Su et al. 2024). We trained the models on the open-source Red Pajama dataset (Computer 2023) for
Sennrich
2 trillion tokens, maintaining hyperparameters consistent with Touvron et al. (2023).
Hardware. All training was conducted on 256 Intel Gaudi2 devices.
6.2 RESULTS
Training Stability, In Fig. we show the training loss of Llama2 with the proposed scheme, which includes the use of Smooth SwiGLU (Section FP8 quantization of both Adam moments (Section [5. Notice we can overcome the divergence point of standard FP8 training. The FP8 model trained using the standard format (Micikevicius et al.] (022) which includes saving high precision weight matrix and quantization to E4M3 for the forward phase and E5M2 for the backward phase with delayed scaling, similar to Nvidia's transformer Engine. The model was trained on 256 Intel Gaudi2 over 15 days.
BF16
2.4
FP8
FP8 Smooth
SwiGLU SwiLL FP8 Optimizer
2.2
08 2.0
1.6
600
1000
1200
1400
1600
1800
Processed Takens (Billions)
Figure 6: Training loss of Llama2 7B using the proposed Smooth SwiGLU as the activation function (Section 4.4) and with FP8 quantization of both moments of Adam optimizer (Section 55) As can be seen, the proposed scheme converge similarly to the BF16 baseline while standard FP8 with SwiGLU and FP32 Adam moments diverge after 200B tokens.
Zero-shot Performance. Table compares the gero-shot performance (accuracy and perplexity) on downstream tasks between the BF16 baseline and our FP8 model. The results demonstrate that our FP8 approach achieves on-par performance with the BF16 baseline across all tested metrics.
Performance gains. Table presents the performance of different configurations on Intel Gaudi2 hardware. While full FP8 quantization achieves the highest acceleration (~377%), it leads to training divergence (as shown in Figure 24.) Disabling quantization for the wa layer enables convergence (Figure with ~27% % speedup. Our proposed Smooth-SwiCH scheme not only converges with results par with the BF16 baseline (Figure but also delivers substantial <44% acceleration.

---

Published as a conference paper at ICLR 2025
Table 2: Zero shot accuracy and perplexity comparison between the BFI6 baseline and the proposed FP8. Notice both models achieve on-par results across all tests. FP8(1) refers to FP8 SwiGLU output BF16 while FP8(2) refers to FP8 + Smooth SwiGLU FP8 optimizer.
Accuracy
Perplexity +
Precision
Lambada
HellaSwag
Winogrande
Arc-C
Wikitext
Lambada
BF16
61.98
68.3
64.25
37.37
5.59
5.75
FP8 (1)
61.73
68.03
64.4
37.2
5.56
5.89
FP8 (2)
62.1
68.37
65.43
37.8
5.55
5.9
Table 3: Performance acceleration with different configurations our non optimized implementation in Llama2 7B model. The measurement were done on Intel Gaudi2 devices.
Configuration
Micro BS
Status
Throughput (Samples/sec)
TFLOPS
BF16
12.65
311
FP8 SwiGLU output in BF16 FP8 + Smooth SwiGLU
Converge
16.07 (+ 27.04 %)
396
1
Converge
16.89 (+33.52 %)
417
FP8
Diverge
17.34 (+37.08 %)
428
Memory reduction. Table we present the memory reduction achieved by changing the optimizer moments from standard FP32 to FP8. Moreover, we reduce the master weight to FP16, as shown Peng et al. (2023). As can be seen, we can reduce the memory consumption by ~ 30%,
Table Memory reduction when applying proposed FP8 optimizer (Section 5). The measure- ments were done 8 Intel Gaudi2 devices, using Deepspeed Zero-1.
Configuration
Status
Memory (GB/HPU)
FP8 Optimizer
BF16
63.25
X
FP8 SwiGLU output in BF16
Converge
63,26
X
FP8 Smooth SwiGLU
Converge
63.26
X
FP8
Diverge
63.24
X
FP8 SwiGLU output in BF16
Converge
44.08
FP8 Smooth SwiGLU
Converge
44.08
FP8
Diverge
44.09
/
CONCLUSIONS
In this paper, we successfully demonstrated FP8 training on datasets up to 2 trillion tokens, signif- icantly exceeding the previous limit of 100 billion tokens Peng al. (2023), with on-par results with the BF16 baseline. Importantly, we discovered that earlier FP8 training attempts were not long enough reveal critical instabilities caused by outliers. Through both analytical methods and simulations, we showed that these outliers emerge over time, particularly in extended training runs. Our investigation revealed that the SwiGLU activation function amplifies these outliers, destabilizing FP8 training in large-scale scenarios.
To address this issue, we applied per-channel quantization to the SwiGLU activation function, technique we refer to as -wwoot. Although identical to SwiGL.U in function, this method effectively reduces outlier amplification, ensuring stable FPS training with a moderate effect on model performance during training, and without any effeet the inference. Additionally, introduced the first implementation FP8 quantization for both Adam optimizer moments, further optimizing memory usage.
Our proposed method, combining Smooth-Swe Smooth-SwiGLU and FP8 optimizer moments, achieved compa- rable performance BF16 baselines downstream tasks while providing significant throughput improvements. This approach successfully overcome the divergence challenges typically encountered in standard FPS training large datasets.
10

---

Published as a conference paper at ICLR 2025
Reproducibility
The abstract of the paper provides link to anonymous GitHub reposi- tory (https:// com/ http//nnnnmousssmmem rore MMngatoontooo-oooooeea ro- containing all the code and necessary details for reproducing the experiments.
Ethics LLMs require immense computational resources during training, which contributes signifi- cantly carbon emissions. This environmental cost has become growing concern in the field of AI. The use of low-precision formats like FP8 offers a promising solution, as it significantly reduces the computational overhead without sacrificing model accuracy. By adopting FP8 for training, only can we enhance training efficiency. but we can also mitigate the carbon footprint associated with large-scale LLM training, paving the way for more sustainable Al development.
ACKNOWLEDGEMENTS
The research of DS was Funded by the European Union (ERC, A-B-C-Deep, 101039436). Views and opinions expressed are however those of the author only and do not necessarily reflect those of the European Union the European Research Council Executive Agency (ERCEA). Neither the European Union nor the granting authority can be held responsible for them. DS also acknowledges the support of the Schmidt Career Advancement Chair Al.
REFERENCES
Yelysei Bondarenko, Markus Nagel, and Tijmen Blankevoort, Quantizable transformers: Removing outliers by helping attention heads do nothing. ArXiv, abs/2306. 12929, 2023. URL https
7/api. www.seettnniicollaeeeee. otg/ Corpus ID: :
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D) Kaplan, Prafulla Dhari- wal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agar- wal, Ariel Herbert- Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Ma- teusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCan- dlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), Ad- vances in Neural Information Processing Systems, volume 33, pp. 1877-1901. Curran Asso- ciates, Inc., 2020. URL 4
neuri is. ww/paper.......e.ee Files/papes w2teaaccc2ff6666 42
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 M. 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 Michalewski, Xavier García, Vedant Misra, Kevin Robinson, Liam Fedus, Denny Zhou, Daphne Ippolito, David Luan, Hyeon- taek 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 Díaz, Orhan Firat, Michele Catasta, Jason Wei, Kath- leen Meier-Hellstern, Douglas Eck, Jeff Dean, Slav Petrov, and Noah Fiedel. Palm: Scal- ing language modeling with pathways. J. Mach. Learn. Res., 24:240:1-240:113 2022. URL httpps://apl wtt.api..seannnsschhhssseee http://a.aaaaaaaaaaaaaaa....aaaa
Together Computer. Redpajama: an open dataset for training large language models, 2023. URL com http://hhhhbb.coooooooogeeerrrre
jama -
Joonhyung Lee, Jeongin Bac, Byeongwook Kim, Se Jung Kwon, and Dongsoo Lee. To fp8 and back again: Quantifying the effects of reducing precision Ilm training stability. arXiv preprint 0rXiv:2405.187100 2024.
Zechun Liu, Changsheng Zhao, Igor Fedorov, Bilge Soran, Dhruy Choudhary, Raghuraman Kr- ishnamoorthi, Vikas Chandra, Yuandong Tian, and Tijmen Blankevoort. Spinquant: Llm
11

---

Published as a conference paper at ICLR 2025
quantization with learned rotations. ArXiv, 21022405116400, 2024. URL hetps://api Semanticschoie htt.://aa....eeooooooooaa2.20000
Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Frederick Diamos, Erich Elsen, David Gareía, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, and Hao Wu. Mixed precision training. ArXiv, abs/1710.03740, 2017. URL https://api
semant remanticscholar: wwt.://woaaa.....oooooooeeeeeg org/CorpusII. 3297437
Paulius Micikevicius, Dusan Stosic, Neil Burgess, Marius Cornea, Pradeep K. Dubey, Richard Grisenthwaite, Sangwon Ha, Alexander Heinecke, Patrick Judd, John Kamalu, Naveen Mellempudi, Stuart F. Oberman, Mohammad Shocybi, Michael Siu, and Hao Wu. Fp8 formats for deep learning. ArXiv, abs//209.05444 005433, 2022. URL htt.httpp///aap. seratteennttsss wes.ooccccclarrr org.org//ooo /o rpus rrg//orpusTTTTCC 252198916
Houwen Peng, Kan Wu, Yixuan Wei, Guoshuai Zhao, Yuxiang Yang. Ze Liu, Yifan Xiong, Ziyue Yang. Bolin Ni, Jingcheng Hu, Ruihang Li, Miaosen Zhang, Chen Li, Jia Ning, Ruizhe Wang, Zheng Zhang, Shuguang Liu, Joe Chau, Han Hu, and Peng Cheng. Fp8-Im: Training fp8 large language models. ArXiv, abs/2310.188133 2023. URL htLhttts::/ //api swwanticschol....
org/CorpusID: 264555252
Teven Le Scao, Angela Fan, Christopher Akiki, Ellie Pavlick, Suzana lli' Daniel Hesslow, Roman Castagn's e, Alexandra Sasha Luccioni, François Yvon, Matthias Gallé, Jonathan Tow, Alexander M. Rush, Stella Biderman, Albert Webson, Pawan Sasanka Ammanamanchi, Thomas Wang, Benoît Sagot, Niklas Muennighoff, Albert Villanova del Moral, Olatunji Ruwase, Rachel Bawden, Stas Bekman, Angelina McMillan MMjjor,, Iz Beltagy, Huu Nguyen, Lucile Saulnier, Samson Tan, Pe- dro Ortiz Suarez, Victor Sanh, Hugo Laurenccon, Yacine Jernite, Julien Launay, Margaret Mitchell, Colin Raffel, Aaron Gokaslan, Adi Simhi, Aitor Soroa Etxabe, Alham Fikri Aji, Amit Alfassy, Anna Rogers, Ariel Kreisherg Nitzav, Canwen Xu, Chenghao Mou, Chris C. Emezue, Christo- pher Klamm, Colin Leong. Daniel Alexander van Strien, David Ifeoluwa Adelani, Dragomir Radev, Eduardo Gonz' alez Ponferrada, Efrat Levkovizh, Ethan Kim. Eyal Natan, Francesco De Toni, Gérard Dupont, Germán Kruszewski, Giada Pistilli, Hady ElSahar, Hamza Benyamina, Hieu Trung Tran, Ian Yu, Idris Abdulmumin, Isaac Johnson, Itziar Gonzalez-Dios, Javier de la Rosa, Jenny Chim, Jesse Dodge, Jian Zhu, Jonathan Chang, Jorg Frohberg, Josephine Tobing, Joydeep Bhattacharjee, Khalid Almubarak, Kimbo Chen, Kyle Lo. Leandro Werra, Leon Weber, Long Phan, Loubna Ben Allal, Ludovic Tanguy, Manan Dey, Manuel Romero Muñoz, Maraim Masoud, Mar'ia Grandury, Mario vSavsko, Max Huang, Maximin Coavoux, Mayank Singh, Mike Tian-Jian Jiang, Minh Chien Vu, Mohammad A. Jauhar. Mustafa Ghaleb, Nishant Subramani, Nora Kassner, Nurulaqilla Khamis, Olivier Nguyen, Omar Espejel, Ona de Gibert, Paulo Villegas, Peter Henderson, Pierre Colombo, Priscilla Amuok, Quentin Lhoest, Rheza Harli- man, Rishi Bommasani, Roberto L'opez, Rui Ribeiro, Salomey Osei, Sampo Pyysalo, Sebastian Nagel, Shamik Bose, Shamsuddeen Hassan Muhammad, Shanya Sharma, S. Longpre, Somaieh Nikpoor, Silberberg, Suhas Pai, Sydney Zink, Tiago Timponi Torrent, Timo Schick, Tristan Thrush, Valentin Danchev, Vassilina Nikoulina, Veronika Laippala, Violette I Lepercq. Vrinda Prabhu, Zaid Alyafeai, Zeerak Talat, Arun Raja, Benjamin Heinzerling, Chenglei Si, Elizabeth Salesky, Sabrina J. Mielke, Wilson Y. Lee, Abheesht Sharma, Andrea Santilli, Antoine Chaf- fin, Arnaud Stiegler, Debajyoti Datta, Eliza Szczechla, Gunjan Chhablani, Han Wang. Harshit Pandey, Hendrik Strobelt, Jason Alan Fries, Jos Rozen, Leo Gao, Lintang Sutawika, M Saiful Bari, Maged S. Al-Shaibani, Matteo Manica, Nihal V. Nayak, Ryan Teehan, Samuel Albanie, Sheng Shen, Srulik Ben-David, Stephen H. Bach, Taewoon Kim, Tali Bers, Thibault Févry, Trishala Neeraj, Urmish Thakker, Vikas Raunak, Xiang Tang, Zheng-Xin Yong. Zhiqing Sun, Shaked Brody, Y Uri, Hadar Tojarich, Adam Roberts, Hyung Won Chung, Jaesung Tae, Jason Phang, Ofir Press, Conglong Li. Deepak Narayanan, Hatim Bourfoune, Jared Casper, Jeff Rasley, Max Ryabinin, Mayank Mishra, Minjia Zhang, Mohammad Shoeybi, Myriam Peyrounette, Nicolas Patry. Nouamane Tazi, Omar Sanseviero, Patrick von Platen, Pierre Cornette, Pierre Franccois Lavall'ee, ee, Rémi Lacroix, Samyam Rajbhandari, Sanchit Gandhi, Shaden Smith, Stéphane Requena, Suraj Patil, Tim Dettmers, Ahmed Baruwa, Amanpreet Singh, Anastasia Cheveleva, Anne-Laure Ligozat, Arjun Subramonian, Aur' elie N'ev' col, Charles Lovering, Daniel H Garrette, Deepak R. Tunuguntla, Ehud Reiter, Ekaterina Taktasheva, Ekaterina Voloshina, Eli Bogdanov, Genta Indra Winata, Hailey Schoelkopf, Jan- Christoph Kalo, Jekaterina Novikova, Jessica Zosa Forde, Xiangru Tang, Jungo Kasai, Ken Kawamura, Liam Hazan, Marine Carpuat, Miruna Clinciu, Najoung Kim,
12

---

Published as a conference paper at ICLR 2025
Newton Cheng. Oleg Serikov, Omer Antverg, Oskar van der Wal, Rui Zhang, Ruochen Zhang, Sebastian Gehrmann, Shachar Mirkin, S. Osher Pais, Tatiana Shavrina, Thomas Scialom, Tian Yun, Tomasz Limisiewicz. Verena Rieser, Vitaly Protasov, Vladislav Mikhailov, Yada Pruksachatkun, Yonatan Belinkov, Zachary Bamberger, Zdenvek Kasner, Zdeněk Kasner, Amanda Pestana, Amir Feizpour, Ammar Khan, Amy Faranak, Ananda Santa Rosa Santos, Anthony Hevia, Antigona Unldreaj, Arash Aghagol, Arezoo Abdollahi, Aycha Tammour, Azadeh HajiHosseini, Bahareh Behroozi, Benjamin Ayoade Ajibade, Bharat Kumar Saxena, Carlos Muñoz Ferrandis, Danish Contractor, David M. Lansky, Davis David, Douwe Kiela, Duong Anh Nguyen, Edward Tan, Emi Baylor, Ezinwanne Ozoani, Fatim Tahirah Mirza, Frankline Ononiwu, Habib Rezanejad, H.A. Jones, Indrani Bhattacharya, Irene Solaiman, Irina Sedenko, Isar Nejadgholi, Jan Passmore, Joshua Seltzer, Julio Bonis Sanz, Karen Fort, Lívia Dutra, Mairon Samagaio, Maraim Elbadri, Margot Mieskes, Marissa Gerchick, Martha Akinlolu, Michael McKenna, Mike Qiu, Muhammed Ghauri, Mykola Burynok, Nañis Abrar, Nazneen Rajani, Nour Elkott, Nourhan Fahmy, Olanrewaju Samuel, Ran An, R. P. Kromann, Ryan Hao, Samira Alizadeh, Sarmad Shubber, Silas L. Wang. Sourav Roy, Sylvain Viguier, Thanh-Cong Le, Tobi Oyebade, Trieu Nguyen Hai Le, Yoyo Yang. Zach Nguyen, Abhinav Ramesh Kashyap, Alfredo Palasciano, Alison Callahan, Anima Shukla, Antonio Miranda-Esccllda, Ayush Kumar Singh, Benjamin Beilharz, Bo Wang, Caio Matheus Fonseca de Brito, Chenxi Zhou, Chirag Jain, Chuxin Xu, Clémentine Fourrier, Daniel Le'on on Perin' an, Daniel Molano, Dian Yu, Enrique Manjavacas, Fabio Barth, Florian Fuhrimann, Gabriel Altay, Giyaseddin Bayrak, Gully Burns, Helena U. Vrabec, Iman I.B. Bello, Isha Dash, Soo Kang, John Giorgi, Jonas Golde, Jose David Posada, Karthi Sivaraman, Lokesh Bulchandani, Lu Liu. Luisa Shinzato, Madeleine Hahn de Bykhovetz, Maiko Takeuchi, Mare Pàmies, María Andrea Castillo, Marianna Nezhurina, Mario Sanger, Matthias Samwald, Michael Cullan, Michael Weinberg, M Wolf, Mina Mihaljeic, Minna Liu, Moritz Freidank, Myungsun Kang. Natasha Seelam, Nathan Dahlberg, Nicholas Michio Broad, Nikolaus Muellner, Pascale Fung. Patricia Haller, Patrick Haller, Renata Eisenberg, Robert Martin, Rodrigo Canalli, Rosaline Su, Ruisi Su, Samuel Cahyawijaya, Samuele Garda, Shlok S Deshmukh. Shubhanshu Mishra, Sid Kiblawi, Simon Ott, Sinee Sang- aroonsiri, Srishti Kumar, Stefan Schweter, Sushil Pratap Bharati, Tanmay Laud, Théo Gigant, Tomoya Kainuma, Wojeiech Kusa, Yanis Labrak, Yashasvi Bajaj. Y. Venkatraman, Yifan Xu, Ying Xu, Yu Xu, Zhee Xao Tan, Zhongli Xie, Zifan Ye, Mathilde Bras, Younes Belkada, and Thomas Wolf. Bloom: A 176b-parameter open-access- multilingual language model. ArXiv, abs/221 1.05100, 2022. ottp://tt./.......aaaaaaa..oaara
Noam M. Shazeer. Glu variants inprovee ArXiv, Arwiii.ab//2002205022222 2020a. URL https
Noam M. Shazeer. Glu variants improve transformer. ArXiv, abs/2002.005222, 20200, 2020b. URL https
// 7/api. www.nt htt.s//.w....aaoooo.ooooaaaaaaaa
Shaden Smith, Mostofa Patwary, Brandon Norick, Patrick LeGresley, Samyam Rajbhandari, Jared Casper, Zhun Liu, Shrimai Prabhumoye, George Zerveas, Vijay Anand Korthikanti, Elton Zhang, Rewon Child, Reza Yazdani Aminabadi, Julie Bernauer, Xia Song, Mohammad Shoeybi, Yuxiong He, Michael Houston, Saurabh Tiwary, and Bryan Catanzaro. Using deepspeed and megatron to train megatron-turing nlg 530b, a large-scale generative language model. Arxiv, abs/2201. 11990, 2022. URL (tttsttts: //ai semant nt. cachola ar. wetellarrrrrg///// wwwp/r////rooooooooo 24:4411135::444413333
Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. Roformer: Enhanced transformer with rotary position embedding. Neurocomput, 568(C), mar 2024. ISSN 0925-2312. doi: 10. 1...011/..eucom.2000 127063. URL neucom. 2023 127063
Mingjie Sun, Xinlei Chen, J. Zico Kolter, and Zhuang Liu. Massive activations in large language models. ArXiv, abs/2402. 17762, 2024. URL
CorpusID:2260442220
Xiao Sun, Jungwook Choi, Chia- Yu Chen, Naigang Wang, Swagath Venkataramani, Vijayalakshmi Srinivasan, Xiaodong Cui, Wei Zhang, and K. Gopalakrishnan. Hybrid b-bit floating point (hfp8) training and inference for deep neural networks. In Neural Information Processing Systems, 2019.
URL httppt:::: //api semanticschhen ar wwt.sacchh.....oooooooooososoees oTt.oo//ooppssSS:2227735555
13

---

Published as a conference paper at ICLR 2025
Hugo Touvron, Louis Martin, Kevin R. Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Daniel M. Bikel, Lukas Blecher, Cristian Cantón Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony S. Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel M. Kloumann, A. V. Korenev, Punit Singh Koura, Marie-Ann Anne Lachaux. Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, R. Subramanian, Xia Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zhengxu Yan, lliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Ilama 2: Open foundation and fine-tuned chat models. ArXiv, 0e4423070092883 2023. URL htt.h:tp///// pattpss//app.... www.stetattttteeee sew.ceeccccccc.................. www.:ioggooooo.ooooooooo 259950998
Ashish Vaswani, Noam M. Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention all you need. In Neural Information Processing Systems, 2017. URL https::/ /api. www.eminniiccoleeeo wttp://oo/oooo010111155555550000
Jaewoo Yang. Hayun Kim, and Younghoon Kim. Mitigating quantization emrors due to ac- tivation spikes in glu-based llms. ArXiv, abs/2405. 144288 2024. URL https://api
iesaantcccccoooo ar. wwwa..rgg/ooouu.eeeee : :D: 2699833222
Biao Zhang and Rico Sennrich. Root mean square layer normalization. In H. Wal- lach, H. Larochelle, A. Beygelzimer, F. d'Alché Buc, E. Fox, and R. Garnett (eds.), Ad- vances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL / Eile/228c22222222333333666633333
cc/ cc/paper wwr_fflesppparr mts/paper/2011 pdf
14


Reviews:
[{"review_id": "3JogXSWYQe", "reviewer": "Reviewer_8YGg", "summary": "The paper presents new findings and addresses key challenges in large-scale FP8 training for LLMs on modern hardware that supports FP8 operations. The authors identified that one major challenge in scaling FP8 training is the occurrence of sporadic, high-magnitude activations. They pinpoint SwiGLU as the main source of these extreme outliers, providing the novel insight that a weight alignment process during training leads to substantial SwiGLU activations (as discussed in Section 4.1). To address this issue and stabilize large-scale FP8 training, the authors propose a smooth-SwiGLU activation function. This approach prevents outliers in the quantization of inputs to the last linear layer with an efficient per-channel scaling for better parallelism.", "questions": "I would like to ask the authors for several clarifications:\n\n1. If I understand correctly, smooth-SwiGLU does not directly address the weight alignment problem. Rather, it is an alternative implementation specifically designed for FP8 training, which circumvents the overflow issue by preventing outliers in the inputs to the last linear layer. Is this accurate?\n\n2. Figure 2 (b) on the dynamics of $\\mathbf w_1$ and $\\mathbf w_2$ norm correlation is insightful and interesting. Is the dynamics based on llama2's trianing hypermaraters? Do the authors have additional empirical results on how these dynamics change with different training hyperparameters?", "limitations": "", "rating": 8, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. The paper demonstrates opportunities and challenges in scaling FP8 training to trillion-token scale using LLaMA2 architecture. In particular, the authors identify that with SwiGLU (which is an important to contemporary LLMs), weight alignment issues can induce large-magnitude outliers and result in training stability issue that poses significant challenge for FP8's limited dynamic range.\n\n2. Extensive experiment results are provided, showing the proopsed Smooth-SwiGLU training with FP8 optimizer (moment 1: E4M3,moment 2: E4M3) is able to converge to baseline FP16 training. \n\n3. Experiments show around 30% improvement in training throughput, which provides significant energy saving for large-scale training.\n\n4. Paper writing and presentation are clear with well identified bottleneck and detailed solutions.", "weaknesses": "1. The paper has an extensive discussion about how feedforward SwiGLU affect FP8 training stability. However, there is no mention about how other model components like RMSNorm, MHA/GQA affect training stability. Could the authors also discuss whether each of the other model components affect FP8 training stability and provide quantitative results? \n\n2. It seems the SwiGLU weight alignment issue explains the occurrence of huge-magnitude outliers. However, can the authors comment more on the sporadic nature of these outliers? Is SwiGLU held accountable for that as well?", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "n0t5wiTbMr", "reviewer": "Reviewer_p6vg", "summary": "The paper presents a novel approach to training large language models (LLMs) using FP8 precision on datasets of up to 2 trillion tokens, revealing critical instabilities associated with FP8 training that were not observable in prior studies. It identifies that the SwiGLU activation function amplifies outliers over prolonged training, leading to instability. To mitigate this, the authors propose Smooth-SwiGLU, a modified activation function that maintains stability without altering performance. The paper also introduces FP8 quantization for both Adam optimizer moments, significantly improving memory usage and training throughput.", "questions": "How do the results generalize to other activation functions beyond SwiGLU?", "limitations": "", "rating": 8, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "Very interesting findings!\n\nThe introduction of Smooth-SwiGLU and the quantization of Adam optimizer moments are significant advancements in the FP8 training methodology.\n\nThe paper provides thorough experimental results demonstrating the effectiveness of the proposed techniques, achieving comparable performance to BF16 with improved training throughput.\n\nSuccessfully training models on datasets up to 2 trillion tokens sets a new benchmark for FP8 training, addressing scalability issues in LLMs.", "weaknesses": "While the findings are significant, their applicability to other model architectures beyond those tested (like LLaMA2) could be explored further.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "iviS5BTOqs", "reviewer": "Reviewer_1QzP", "summary": "This paper proposed a practical solution for quantized (FP8) training over trillion tokens.\n\nThe paper conduct LLM training over a real big 2 trillion dataset and found swiglu is the main cause of instability when training using FP8, thus proposed a optimized and smoothed method called smooth-swiglu.\n\nSmooth-swiglu in together with FP8, the authors achieve good model convergence on 2 trillion token dataset for llm training", "questions": "How does this paper compare with nvidia transformer-engine's fp8 training with automatic mixed precision?\n\nIn table 3, why micro batch is 1? The reason for doing quantization is to support larger batch training (higher throughput), if limiting to micro-batch as 1, it is almost impossible to get good throughput/token per sec numbers.\n\nIn table 4, deepspeed zero-1 itself would reducing some GPU memory footprint compared with pure pytorch DDP. Why use zero1 not 2 or 3?\n\nIn figure 6, why bf16 loss curve has more spikes compared with FP8 + Smooth-SwiGLU + FP8 Optimizer? to me, I think bf16 should have better and more smooth loss curve compared with any FP8 methods?", "limitations": "", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "Training LLM on trillion-token big dataset makes the paper result solid.\n\nAdopting a pure FP8 adam optimizer (both two momentum are fp8) and make training converge is good contribution. \n\nIdentify swiglu cause model training instability and optimized as a smooth-swiglu is another contribution.", "weaknesses": "1 ) Paper novelty is limited. The only thing new is adding a scaling factor on top of swiglu may not be a big novelty. Previous work already study similar smooth method on activation functions. e.g., Swish, SMU as smooth function for relu.\n\n[1] swish: https://arxiv.org/pdf/1710.05941\n\n[2] SMU: https://arxiv.org/pdf/2111.04682\n\n2 ) FP8 optimizer contribution is just extending previous 1 momentum using FP8 to both momentum using FP8 may lack a bit novelty here. For example, Figure 5 shows empirical study for both FP8 momentum on llama2 100m, it shows second momentum using E5M2 format achieve similar model loss curve as bf16. But how does it generalize to bigger models (more practical models like llama 8b 70b)? Is second momentum always need larger dynamic range rather than higher precision?\n\n3 ) The only baseline is from this paper[3], how does this approach compared with nvidia transformer engine fp8. There is no comparison in either design or evaluation results. Please include a comparison with NVIDIA's Transformer Engine FP8 implementation, both in terms of methodology and empirical results. This comparison would provide valuable context for the paper's contributions.\n\n[3]FP8-LM: Training FP8 Large Language Models\n\n4 ) Billion level token training is almost sufficient for most LLM downstream tasks (e.g. Apple [4]). This trillion-token improvement may not have wide application scenarios. Please discuss more on potential use cases where trillion-token training might be beneficial, and how this paper's method scales compared to existing approaches at different dataset sizes.\n\n[4] Apple Intelligence Foundation Language Models https://arxiv.org/pdf/2407.21075", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "g3jtJcK2p9", "reviewer": "Reviewer_KJr6", "summary": "This paper 1) identifies instability issues in FP8 training for large language models (LLMs) on trillion-token-scale datasets, 2) links the root cause to the alignment of two weight matrices of the SwiGLU neuron, and 3) proposes Smooth SwiGLU to mitigate outliers in the activations. Smooth SwiGLU achieves this by applying scaling factors before and after the last linear layer of the MLP components. Furthermore, they compared different FP8 formats to obtain the best configuration for the FP8 optimizer. The method successfully stabilizes FP8 LLM training on trillion-token-scale datasets and delivers a 5.1% throughput improvement over the baseline on 256 Intel Gaudi2 accelerators.", "questions": "When training larger models, do similar issues arise earlier or later?", "limitations": "", "rating": 8, "confidence": 2, "soundness": 3, "presentation": 4, "contribution": 3, "strengths": "1. The paper uses comprehensive experiments and analysis to link the instabilities in FP8 training to SwiGLU weight alignment.\n2. The paper provides an efficient implementation of Smooth-SwiGLU.\n3. The paper is well-written.", "weaknesses": "1. The motivation of Smooth SwiGLU is that \"While disabling quantization of the SwiGLU output effectively prevents divergence, it reduces the potential acceleration benefits of FP8\". However, \"FP8 + Smooth SwiGLU\" is only 5.1% faster than the \"FP8 + SwiGLU output BF16\". Given that the performance gap is relatively small and the experiments were conducted only on Intel Gaudi2, it would be helpful to compare the two variants on more hardware configurations (i.e., NVIDIA and AMD GPUs) to verify whether the performance gap persists. \n2. Table 2 currently only compares the accuracy and perplexity between the proposed FP8 and the standard BF16 configurations. To provide a more comprehensive evaluation, it would be beneficial to include additional comparisons, such as 'FP8 + Smooth SwiGLU,' 'FP8 + SwiGLU output BF16,' and 'FP8 + SwiGLU output BF16 + FP8 Optimizer'. If evaluating these variants is challenging or unnecessary, please provide the corresponding discussion.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Spotlight)