atlas

Research map / Optimization / Optimizers

Sophia: A Scalable Stochastic Second-order Optimizer for Language Model Pre-training

ICLR 2024 · Optimization › Optimizers · approach: Memory-efficient LLM optimizers · 28 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Sophia, a light-weight second-order optimizer for LLM pre-training that uses EMA of a stochastic diagonal Hessian (refreshed every 10 steps) with per-coordinate clipping, achieving about 2x speedup over AdamW on GPT-2 and GPT NeoX models.

Problem

Pre-training large language models is extremely costly, and existing second-order optimizers have too much per-step overhead or fail to speed up LLM training in wall-clock time or compute, with Adam still dominant.

Approach

Precondition the EMA of gradients by a cheap EMA of stochastic diagonal Hessian estimates (Hutchinson or Gauss-Newton-Bartlett), refreshed every k=10 steps, and apply per-coordinate clipping of the update so that negative or rapidly changing curvature falls back to sign-momentum-like updates.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use Sophia-H instead of AdamWGPT-2 language-model pre-training · OpenWebText validation, GPT-2 Small (125M)validation loss: 2.921 -> 2.901Helped
use Sophia-G instead of AdamWGPT-2 language-model pre-training · OpenWebText validation, GPT-2 Medium (355M)validation loss: 2.691 -> 2.627Helped
use Sophia-G instead of AdamWGPT-2 language-model pre-training · OpenWebText validation, GPT-2 Large (770M)validation loss: 2.613 -> 2.524Helped
use Sophia-G instead of AdamWGPT NeoX language-model pre-training · Pile validation, GPT NeoX 1.5Bvalidation loss: 2.250 -> 2.218Helped
use Sophia-G instead of AdamWGPT NeoX language-model pre-training · Pile validation, GPT NeoX 6.6Bvalidation loss: 1.992 -> 1.969Helped
update the Hessian estimate every step instead of every 10 steps (ablation)Sophia-G · 30M GPT-2convergence speed per compute: 50%Hurt
update the Hessian estimate every 100 steps instead of every 10 steps (ablation)Sophia-G · 30M GPT-2validation lossHurt
replace the GNB preconditioner with empirical Fisher (ablation)Sophia-G · 30M GPT-2validation lossHurt
replace the Sophia-H Hessian estimator with AdaHessian (ablation)Sophia-H · 30M GPT-2validation lossHurt
add per-coordinate update clipping without a preconditioner (ablation)AdamW · 30M GPT-2validation lossHelped
add the GNB preconditioner to element-wise clipping (ablation)element-wise clipping without a preconditioner · 30M GPT-2validation lossHelped
remove element-wise update clipping (ablation)AdaHessian with k=2 · 30M GPT-2training stability: k=2Hurt

Surprising findings

Limitations

Experimental setup

Datasets: OpenWebText The Pile SuperGLUE

Benchmarks: OpenWebText validation loss The Pile validation loss SuperGLUE (4 subtasks, 2-shot)

Metrics: validation log perplexity / loss steps to reach same loss total compute (TFLOPs) wall-clock time few-shot accuracy

Baselines: AdamW Lion AdaHessian Empirical Fisher with clipping

Builds on: AdamW AdaHessian Lion Hutchinson estimator

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy