MiLe Loss: a New Entropy-Weighed Loss for Mitigating the Bias of Learning Difficulties in Large Language Models

Zhenpeng Su, Xing Wu, Xue Bai, Zijia Lin, Hui Chen +3 more
10/30/2023
7 citations
cs.CL

No official code found. Best implementation: suu990901/LLaMA-MiLe-Loss (70 stars, Python, last commit 2025-02-18).

Abstract

Generative language models are usually pretrained on large text corpus via predicting the next token (i.e., sub-word/word/phrase) given the previous ones. Recent works have demonstrated the impressive performance of large generative language models on downstream tasks.

Show full abstract

However, existing generative language models generally neglect an inherent challenge in text corpus during training, i.e., the imbalance between frequent tokens and infrequent ones. It can lead a language model to be dominated by common and easy-to-learn tokens, thereby overlooking the infrequent and difficult-to-learn ones. To alleviate that, we propose a MiLe Loss function for mitigating the bias of learning difficulties with tokens. During training, it can dynamically assess the learning difficulty of a to-be-learned token, according to the information entropy of the corresponding predicted probability distribution over the vocabulary. Then it scales the training loss adaptively, trying to lead the model to focus more on the difficult-to-learn tokens. On the Pile dataset, we train generative language models at different scales of 468M, 1.2B, and 6.7B parameters. Experiments reveal that models incorporating the proposed MiLe Loss can gain consistent performance improvement on downstream benchmarks.

View on arXivView PDF

Code Implementations(1)

Code for a New Loss for Mitigating the Bias of Learning Difficulties in Generative Language Models

706Python, CudaNov 4, 20231 years ago

Similar Papers

Cite this paper

@article{su2023mile,
  title  = {MiLe Loss: a New Entropy-Weighed Loss for Mitigating the Bias of Learning Difficulties in Large Language Models},
  author = {Zhenpeng Su and Xing Wu and Xue Bai and Zijia Lin and Hui Chen and Guiguang Ding and Wei Zhou and Songlin Hu},
  year   = {2023},
  eprint = {2310.19531},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.19531v8}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.19531.svg)](https://codeofpaper.com/paper/2310.19531)

Discussion