Enregistré dans:
Détails bibliographiques
Auteurs principaux: Luo, Cheng, Zhao, Jiawei, Chen, Zhuoming, Chen, Beidi, Anandkumar, Anima
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:https://arxiv.org/abs/2407.15892
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866909381743869952
author Luo, Cheng
Zhao, Jiawei
Chen, Zhuoming
Chen, Beidi
Anandkumar, Anima
author_facet Luo, Cheng
Zhao, Jiawei
Chen, Zhuoming
Chen, Beidi
Anandkumar, Anima
contents We introduce Mini-Sequence Transformer (MsT), a simple and effective methodology for highly efficient and accurate LLM training with extremely long sequences. MsT partitions input sequences and iteratively processes mini-sequences to reduce intermediate memory usage. Integrated with activation recomputation, it enables significant memory savings in both forward and backward passes. In experiments with the Llama3-8B model, with MsT, we measure no degradation in throughput or convergence even with 12x longer sequences than standard implementations. MsT is fully general, implementation-agnostic, and requires minimal code changes to integrate with existing LLM training frameworks. Integrated with the huggingface library, MsT successfully extends the maximum context length of Qwen, Mistral, and Gemma-2 by 12-24x.
format Preprint
id arxiv_https___arxiv_org_abs_2407_15892
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Mini-Sequence Transformer: Optimizing Intermediate Memory for Long Sequences Training
Luo, Cheng
Zhao, Jiawei
Chen, Zhuoming
Chen, Beidi
Anandkumar, Anima
Machine Learning
We introduce Mini-Sequence Transformer (MsT), a simple and effective methodology for highly efficient and accurate LLM training with extremely long sequences. MsT partitions input sequences and iteratively processes mini-sequences to reduce intermediate memory usage. Integrated with activation recomputation, it enables significant memory savings in both forward and backward passes. In experiments with the Llama3-8B model, with MsT, we measure no degradation in throughput or convergence even with 12x longer sequences than standard implementations. MsT is fully general, implementation-agnostic, and requires minimal code changes to integrate with existing LLM training frameworks. Integrated with the huggingface library, MsT successfully extends the maximum context length of Qwen, Mistral, and Gemma-2 by 12-24x.
title Mini-Sequence Transformer: Optimizing Intermediate Memory for Long Sequences Training
topic Machine Learning
url https://arxiv.org/abs/2407.15892