Extending Input Contexts of Language Models through Training on Segmented Sequences

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Karypis, Petros, McAuley, Julian, Karypis, George
Format: Preprint
Publié: 2023
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866916294658359296
author Karypis, Petros
McAuley, Julian
Karypis, George
author_facet Karypis, Petros
McAuley, Julian
Karypis, George
contents Effectively training language models on long inputs poses many technical challenges. As a cost consideration, languages models are pretrained on a fixed sequence length before being adapted to longer sequences. We explore various methods for adapting models to longer inputs by training on segmented sequences and an interpolation-based method for extending absolute positional embeddings. We develop a training procedure to extend the input context size of pretrained models with no architectural changes and no additional memory costs than training on the original input lengths. By sub-sampling segments from long inputs while maintaining their original position the model is able to learn new positional interactions. Our method benefits both models trained with absolute positional embeddings, by extending their input contexts, as well as popular relative positional embedding methods showing a reduced perplexity on sequences longer than they were trained on. We demonstrate our method can extend input contexts by a factor of 4x while improving perplexity.
format Preprint
id arxiv_https___arxiv_org_abs_2310_14633
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Extending Input Contexts of Language Models through Training on Segmented Sequences
Karypis, Petros
McAuley, Julian
Karypis, George
Computation and Language
Machine Learning
Effectively training language models on long inputs poses many technical challenges. As a cost consideration, languages models are pretrained on a fixed sequence length before being adapted to longer sequences. We explore various methods for adapting models to longer inputs by training on segmented sequences and an interpolation-based method for extending absolute positional embeddings. We develop a training procedure to extend the input context size of pretrained models with no architectural changes and no additional memory costs than training on the original input lengths. By sub-sampling segments from long inputs while maintaining their original position the model is able to learn new positional interactions. Our method benefits both models trained with absolute positional embeddings, by extending their input contexts, as well as popular relative positional embedding methods showing a reduced perplexity on sequences longer than they were trained on. We demonstrate our method can extend input contexts by a factor of 4x while improving perplexity.
title Extending Input Contexts of Language Models through Training on Segmented Sequences
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2310.14633