Training tranformer models

Introduction

Training Transformer models is computationally expensive. This document explores an adaptive learning rate strategy that adjusts parameter updates dynamically based on the local curvature of the loss landscape, rate recommedation for the adjust parameter

OBJECTS

  • Tư C - Nui

  • H Н - / Нет n

  • N - Nu /

Mathematic-Mnal Formulation

Consider a Transformer model parameterized by ® and an input X. producing an output representation h h:

  • ℏ h bar - Oul

  • 𝑖 i• Ind

  • p p - Pre

6. 6 period

h h= f⁢(x f open paren x: 0 0)

The training objective involves minimizing a loss function

L L(©), typically thevcross-entropy loss for classification tasks: Mike

See all 2⁢p 2 p

((0 0)=-1E1 number 1 E 1-(E6-1 1 Y4c 20 20) )

Where:

  • N is the number of training samples,

  • C is the number of classes,

  • Vic is the ground-truth label for class,

  • P10(X1 X1: 0 0) is the predicted probability.

109 109, • Logarithm - Algebra

liC) • Logarithmic Integral • Number Theory

100 100- crien

#3 3

Y Y - Lorentz Factor - Physics

A • Logical And • Logic

land - 364 364|

7 7 • Logical Not • Logic

10. 10 period

Adaptive Learning Rate Adjustment

We define a dynamic learning rate Ne based on the Hessian matrix H©):

10r・285 285

10. 10 period

∉ is not a member of

nt =

1 1+시H(ㅇ

Where Nt is the initial learning rate and A is a scaling factor. This formulation ensures that step sizes shrink in regions of high curvature, preventing instability. ' 𝒩