Refining Packing and Shuffling Strategies for Enhanced Performance in Generative Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Chen, Yanbing, Wang, Ruilin, Yang, Zihao, Jiang, Lavender Yao, Oermann, Eric Karl
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916361388687360
author Chen, Yanbing
Wang, Ruilin
Yang, Zihao
Jiang, Lavender Yao
Oermann, Eric Karl
author_facet Chen, Yanbing
Wang, Ruilin
Yang, Zihao
Jiang, Lavender Yao
Oermann, Eric Karl
contents Packing and shuffling tokens is a common practice in training auto-regressive language models (LMs) to prevent overfitting and improve efficiency. Typically documents are concatenated to chunks of maximum sequence length (MSL) and then shuffled. However setting the atom size, the length for each data chunk accompanied by random shuffling, to MSL may lead to contextual incoherence due to tokens from different documents being packed into the same chunk. An alternative approach is to utilize padding, another common data packing strategy, to avoid contextual incoherence by only including one document in each shuffled chunk. To optimize both packing strategies (concatenation vs padding), we investigated the optimal atom size for shuffling and compared their performance and efficiency. We found that matching atom size to MSL optimizes performance for both packing methods (concatenation and padding), and padding yields lower final perplexity (higher performance) than concatenation at the cost of more training steps and lower compute efficiency. This trade-off informs the choice of packing methods in training language models.
format Preprint
id arxiv_https___arxiv_org_abs_2408_09621
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Refining Packing and Shuffling Strategies for Enhanced Performance in Generative Language Models
Chen, Yanbing
Wang, Ruilin
Yang, Zihao
Jiang, Lavender Yao
Oermann, Eric Karl
Computation and Language
I.2.7
Packing and shuffling tokens is a common practice in training auto-regressive language models (LMs) to prevent overfitting and improve efficiency. Typically documents are concatenated to chunks of maximum sequence length (MSL) and then shuffled. However setting the atom size, the length for each data chunk accompanied by random shuffling, to MSL may lead to contextual incoherence due to tokens from different documents being packed into the same chunk. An alternative approach is to utilize padding, another common data packing strategy, to avoid contextual incoherence by only including one document in each shuffled chunk. To optimize both packing strategies (concatenation vs padding), we investigated the optimal atom size for shuffling and compared their performance and efficiency. We found that matching atom size to MSL optimizes performance for both packing methods (concatenation and padding), and padding yields lower final perplexity (higher performance) than concatenation at the cost of more training steps and lower compute efficiency. This trade-off informs the choice of packing methods in training language models.
title Refining Packing and Shuffling Strategies for Enhanced Performance in Generative Language Models
topic Computation and Language
I.2.7
url https://arxiv.org/abs/2408.09621