Initialization of Large Language Models via Reparameterization to Mitigate Loss Spikes

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Nishida, Kosuke, Nishida, Kyosuke, Saito, Kuniko
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916425381183488
author Nishida, Kosuke
Nishida, Kyosuke
Saito, Kuniko
author_facet Nishida, Kosuke
Nishida, Kyosuke
Saito, Kuniko
contents Loss spikes, a phenomenon in which the loss value diverges suddenly, is a fundamental issue in the pre-training of large language models. This paper supposes that the non-uniformity of the norm of the parameters is one of the causes of loss spikes. Here, in training of neural networks, the scale of the gradients is required to be kept constant throughout the layers to avoid the vanishing and exploding gradients problem. However, to meet these requirements in the Transformer model, the norm of the model parameters must be non-uniform, and thus, parameters whose norm is smaller are more sensitive to the parameter update. To address this issue, we propose a novel technique, weight scaling as reparameterization (WeSaR). WeSaR introduces a gate parameter per parameter matrix and adjusts it to the value satisfying the requirements. Because of the gate parameter, WeSaR sets the norm of the original parameters uniformly, which results in stable training. Experimental results with the Transformer decoders consisting of 130 million, 1.3 billion, and 13 billion parameters showed that WeSaR stabilizes and accelerates training and that it outperformed compared methods including popular initialization methods.
format Preprint
id arxiv_https___arxiv_org_abs_2410_05052
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Initialization of Large Language Models via Reparameterization to Mitigate Loss Spikes
Nishida, Kosuke
Nishida, Kyosuke
Saito, Kuniko
Computation and Language
Loss spikes, a phenomenon in which the loss value diverges suddenly, is a fundamental issue in the pre-training of large language models. This paper supposes that the non-uniformity of the norm of the parameters is one of the causes of loss spikes. Here, in training of neural networks, the scale of the gradients is required to be kept constant throughout the layers to avoid the vanishing and exploding gradients problem. However, to meet these requirements in the Transformer model, the norm of the model parameters must be non-uniform, and thus, parameters whose norm is smaller are more sensitive to the parameter update. To address this issue, we propose a novel technique, weight scaling as reparameterization (WeSaR). WeSaR introduces a gate parameter per parameter matrix and adjusts it to the value satisfying the requirements. Because of the gate parameter, WeSaR sets the norm of the original parameters uniformly, which results in stable training. Experimental results with the Transformer decoders consisting of 130 million, 1.3 billion, and 13 billion parameters showed that WeSaR stabilizes and accelerates training and that it outperformed compared methods including popular initialization methods.
title Initialization of Large Language Models via Reparameterization to Mitigate Loss Spikes
topic Computation and Language
url https://arxiv.org/abs/2410.05052