Enabling Large Batch Size Training for DNN Models Beyond the Memory Limit While Maintaining Performance

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Piao, XinYu, Synn, DoangJoo, Park, JooYoung, Kim, Jong-Kook
Format: Preprint
Veröffentlicht: 2021
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866909236754120704
author Piao, XinYu
Synn, DoangJoo
Park, JooYoung
Kim, Jong-Kook
author_facet Piao, XinYu
Synn, DoangJoo
Park, JooYoung
Kim, Jong-Kook
contents Recent deep learning models are difficult to train using a large batch size, because commodity machines may not have enough memory to accommodate both the model and a large data batch size. The batch size is one of the hyper-parameters used in the training model, and it is dependent on and is limited by the target machine memory capacity because the batch size can only fit into the remaining memory after the model is uploaded. Moreover, the data item size is also an important factor because if each data item size is larger then the batch size that can fit into the remaining memory becomes smaller. This paper proposes a method called Micro-Batch Processing (MBP) to address this problem. This method helps deep learning models to train by providing a batch processing method that splits a batch into a size that can fit in the remaining memory and processes them sequentially. After processing the small batches individually, a loss normalization algorithm based on the gradient accumulation is used to maintain the performance. The purpose of our method is to allow deep learning models to train using larger batch sizes that exceed the memory capacity of a system without increasing the memory size or using multiple devices (GPUs).
format Preprint
id arxiv_https___arxiv_org_abs_2110_12484
institution arXiv
publishDate 2021
record_format arxiv
spellingShingle Enabling Large Batch Size Training for DNN Models Beyond the Memory Limit While Maintaining Performance
Piao, XinYu
Synn, DoangJoo
Park, JooYoung
Kim, Jong-Kook
Machine Learning
Distributed, Parallel, and Cluster Computing
Recent deep learning models are difficult to train using a large batch size, because commodity machines may not have enough memory to accommodate both the model and a large data batch size. The batch size is one of the hyper-parameters used in the training model, and it is dependent on and is limited by the target machine memory capacity because the batch size can only fit into the remaining memory after the model is uploaded. Moreover, the data item size is also an important factor because if each data item size is larger then the batch size that can fit into the remaining memory becomes smaller. This paper proposes a method called Micro-Batch Processing (MBP) to address this problem. This method helps deep learning models to train by providing a batch processing method that splits a batch into a size that can fit in the remaining memory and processes them sequentially. After processing the small batches individually, a loss normalization algorithm based on the gradient accumulation is used to maintain the performance. The purpose of our method is to allow deep learning models to train using larger batch sizes that exceed the memory capacity of a system without increasing the memory size or using multiple devices (GPUs).
title Enabling Large Batch Size Training for DNN Models Beyond the Memory Limit While Maintaining Performance
topic Machine Learning
Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2110.12484