MERIT: Maximum-normalized Element-wise Ratio for Language Model Large-batch Training

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Luo, Yang, Zheng, Zangwei, Qin, Ziheng, Zhu, Zirui, Liu, Yong, You, Yang
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909757699260416
author Luo, Yang
Zheng, Zangwei
Qin, Ziheng
Zhu, Zirui
Liu, Yong
You, Yang
author_facet Luo, Yang
Zheng, Zangwei
Qin, Ziheng
Zhu, Zirui
Liu, Yong
You, Yang
contents Large-batch training has become a cornerstone in accelerating the training of deep neural networks, yet it poses challenges in optimization and generalization. Existing optimizers like AdamW present performance degradation during language models' large-batch training, due to the information bottleneck in attention layers caused by the sharp increase of max attention logit. While the LAMB optimizer partially addresses this issue, some attention layers still face this issue. The reason is that $l_2$-norm-based trust ratios in LAMB are less effective in directly influencing the max value of query/key weights. Furthermore, the weight-wise trust ratio in LAMB is error-prone as it overlooks relationships of weight values within rows or columns. Building on these observations, we propose a novel optimizer, MERIT, which leverages the max-norm to calculate the trust ratio to constrain the max attention logit more effectively. Moreover, we further construct element-wise trust ratios to provide more robust update scaling by focusing on local weight structures. Extensive experiments of large-batch training across various sizes of GPT-2 models demonstrate the superior performance of MERIT. Notably, during the training of GPT-2 Medium, MERIT enables a 6k batch size without any performance degradation compared to the standard batch size (480) with 48B training tokens. This work highlights the importance of considering the max attention logit and finer-granularity trust ratio in large-batch training. It successfully improves the training stability and paves the way for larger batch usage, enabling faster development and iteration of large language models. Code is available at https://github.com/NUS-HPC-AI-Lab/MERIT.
format Preprint
id arxiv_https___arxiv_org_abs_2508_20577
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MERIT: Maximum-normalized Element-wise Ratio for Language Model Large-batch Training
Luo, Yang
Zheng, Zangwei
Qin, Ziheng
Zhu, Zirui
Liu, Yong
You, Yang
Machine Learning
Artificial Intelligence
Computation and Language
Large-batch training has become a cornerstone in accelerating the training of deep neural networks, yet it poses challenges in optimization and generalization. Existing optimizers like AdamW present performance degradation during language models' large-batch training, due to the information bottleneck in attention layers caused by the sharp increase of max attention logit. While the LAMB optimizer partially addresses this issue, some attention layers still face this issue. The reason is that $l_2$-norm-based trust ratios in LAMB are less effective in directly influencing the max value of query/key weights. Furthermore, the weight-wise trust ratio in LAMB is error-prone as it overlooks relationships of weight values within rows or columns. Building on these observations, we propose a novel optimizer, MERIT, which leverages the max-norm to calculate the trust ratio to constrain the max attention logit more effectively. Moreover, we further construct element-wise trust ratios to provide more robust update scaling by focusing on local weight structures. Extensive experiments of large-batch training across various sizes of GPT-2 models demonstrate the superior performance of MERIT. Notably, during the training of GPT-2 Medium, MERIT enables a 6k batch size without any performance degradation compared to the standard batch size (480) with 48B training tokens. This work highlights the importance of considering the max attention logit and finer-granularity trust ratio in large-batch training. It successfully improves the training stability and paves the way for larger batch usage, enabling faster development and iteration of large language models. Code is available at https://github.com/NUS-HPC-AI-Lab/MERIT.
title MERIT: Maximum-normalized Element-wise Ratio for Language Model Large-batch Training
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2508.20577