The Lion optimizer (short for EvoLved sign momentum) is a first-order optimization algorithm for training neural networks that updates each weight by a fixed-magnitude step whose direction is the sign of an interpolated momentum. In training large models in artificial intelligence, Lion serves as a memory-efficient alternative to AdamW, because it stores only one state tensor per parameter instead of two.
Lion was introduced by researchers at Google in 2023, who did not design it by hand but discovered it through symbolic program search, an evolutionary process that mutated and evaluated thousands of candidate update rules. The resulting algorithm is short enough to write in a few lines, yet it matched or exceeded AdamW on image classification, vision-language contrastive learning, diffusion models and language modeling in the original experiments.
How the Lion update rule works
Lion computes each update in three steps that use two momentum coefficients, conventionally called beta1 and beta2. First, it forms an interpolation between the stored momentum and the current gradient using beta1. Second, it takes the elementwise sign of that interpolation, so every coordinate becomes plus one, minus one or zero, and subtracts the learning rate times this sign plus a decoupled weight decay term. Third, it updates the stored momentum with the gradient using beta2.
The use of two different betas is the distinctive feature. With the default beta1 of 0.9 and beta2 of 0.99, the update direction reacts relatively quickly to the current gradient, while the stored momentum keeps a longer memory of past gradients. This combination lets the optimizer respond to new information without losing the smoothing benefit of long-horizon momentum.
Because the sign operation discards magnitude, every parameter moves by exactly the learning rate in each step, apart from weight decay. The update therefore has a uniform norm, which acts as a form of regularization and often leads to flatter minima in the loss landscape.
The table lists the operations in one Lion step and their purpose.
| Step | Operation | Purpose |
|---|---|---|
| Interpolate | Blend momentum and gradient with beta1 | Choose a responsive direction |
| Sign | Take the elementwise sign | Fix the step size per coordinate |
| Apply | Subtract learning rate times sign plus decay | Move weights and regularize |
| Track | Update momentum with beta2 | Keep a long gradient history |
Lion compared with AdamW and other optimizers
Lion differs from AdamW mainly in what it stores and how it scales updates. AdamW keeps a first moment and a second moment for every parameter and divides by the square root of the second moment, which produces adaptive per-parameter step sizes. Lion keeps only the first moment and replaces adaptive scaling with the sign function, which saves memory and compute.
The comparison below places Lion among the optimizers most often used for large-scale training.
| Optimizer | State per parameter | Step size behavior | Typical use |
|---|---|---|---|
| SGD with momentum | One tensor | Scales with gradient | Convolutional vision models |
| AdamW | Two tensors | Adaptive per coordinate | Default for transformers |
| Adafactor | Factored second moment | Adaptive, low memory | Very large language models |
| Lion | One tensor | Uniform sign step | Memory-constrained large models |
| Muon | One tensor | Orthogonalized matrix step | Hidden layers of transformers |
Lion is also closely related to signSGD with momentum, an earlier family of sign-based methods studied for communication-efficient distributed training. The main innovations in Lion are the dual-beta interpolation and the tuned combination with decoupled weight decay.
Hyperparameters and how to tune them
Lion requires different hyperparameter values from AdamW because its sign-based update has a larger norm per step. The common rule is to use a learning rate 3 to 10 times smaller than for AdamW and a weight decay 3 to 10 times larger, so that the effective decay strength, the product of learning rate and weight decay, stays similar.
The table gives typical starting values; the correct values always depend on model size, batch size and schedule.
| Hyperparameter | Typical value | Effect |
|---|---|---|
| Learning rate | 1e-5 to 3e-4 | Sets the size of every coordinate step |
| Beta1 | 0.9 (0.95 for stability) | Weight of momentum in the update direction |
| Beta2 | 0.99 (0.98 for stability) | Length of the stored gradient memory |
| Weight decay | 0.1 to 1.0 | Pulls weights toward zero each step |
| Batch size | 64 or larger | Reduces noise in the gradient sign |
Learning rate warmup and a cosine learning rate schedule work with Lion as they do with AdamW. Gradient clipping has less effect, because the sign function already bounds each coordinate update.
Strengths and limitations of Lion
The main strength of Lion is lower optimizer memory: removing the second moment cuts optimizer state roughly in half compared with AdamW, which matters when training models with billions of parameters. Each step is also slightly cheaper to compute, since it avoids square roots and divisions.
Lion has clear limitations that experienced practitioners account for. The table summarizes when it tends to help and when it tends to underperform.
| Situation | Expected outcome | Reason |
|---|---|---|
| Large batch, large model | Often matches or beats AdamW | Gradient sign is reliable |
| Small batch training | Often worse than AdamW | Noisy signs cause erratic steps |
| Tight accelerator memory | Clear benefit | Only one state tensor |
| Transferring AdamW settings unchanged | Divergence or poor results | Update norm is much larger |
| Strong data augmentation | Smaller gains | Regularization effects overlap |
Independent studies after the original paper found that the advantage over a well-tuned AdamW is often small and task dependent. The most common mistake is copying AdamW hyperparameters, which usually produces training instability or a loss spike early in the run.
Explained without jargon
Training an AI model means nudging millions of numbers again and again until the model makes fewer mistakes. An optimizer decides how big each nudge is and which way it goes.
Most optimizers vary the size of each nudge. Lion does something simpler. It only asks which direction is downhill, and then takes the same small step for every number. It also remembers recent directions, so it does not zigzag. Because it remembers less than other methods, it needs less computer memory. The trade-off is that it must be set up carefully.
A typical use case
A research team is training a 1.3 billion parameter language model on eight accelerators with 40 GB of memory each. With AdamW, the two optimizer states for every weight force them to use a small per-device batch and frequent gradient checkpointing, which slows training.
They switch to Lion with a learning rate of 1e-4 instead of 6e-4, weight decay raised from 0.1 to 0.6, beta1 of 0.95 and beta2 of 0.98, and keep the same warmup and cosine schedule. The freed optimizer memory lets them raise the per-device batch size and remove some checkpointing.
After a short pilot run confirms stable loss, the full run reaches a validation loss similar to the AdamW baseline while finishing noticeably sooner, which is the outcome teams usually seek when they adopt Lion.