PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Training
Dawei Zhu, Nan Yang, Liang Wang, Yifan Song, Wenhao Wu and, Furu Wei, Sujian Li

TL;DR
PoSE introduces a training method that enables large language models to efficiently extend their context window to handle much longer inputs without extensive fine-tuning, significantly reducing resource costs.
Contribution
PoSE presents a novel training approach that simulates long inputs using fixed context windows, allowing efficient extension of LLMs' context length with minimal performance loss.
Findings
Extended LLaMA to 128k tokens using PoSE
Reduces memory and time overhead compared to full fine-tuning
Compatible with RoPE-based LLMs and position interpolation
Abstract
Large Language Models (LLMs) are trained with a pre-defined context length, restricting their use in scenarios requiring long inputs. Previous efforts for adapting LLMs to a longer length usually requires fine-tuning with this target length (Full-length fine-tuning), suffering intensive training cost. To decouple train length from target length for efficient context window extension, we propose Positional Skip-wisE (PoSE) training that smartly simulates long inputs using a fixed context window. This is achieved by first dividing the original context window into several chunks, then designing distinct skipping bias terms to manipulate the position indices of each chunk. These bias terms and the lengths of each chunk are altered for every training example, allowing the model to adapt to all positions within target length. Experimental results show that PoSE greatly reduces memory and time…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗dwzhu/LLaMA-7B-PoSE-Linear-16kmodel· 4 dl· ♡ 14 dl♡ 1
- 🤗dwzhu/LLaMA-7B-PoSE-YaRN-16kmodel· 3 dl· ♡ 23 dl♡ 2
- 🤗dwzhu/LLaMA-7B-PoSE-NTK-16kmodel· 4 dl· ♡ 14 dl♡ 1
- 🤗dwzhu/LLaMA-7B-PoSE-YaRN-128kmodel· 6 dl· ♡ 36 dl♡ 3
- 🤗dwzhu/LLaMA-7B-PoSE-Linear-96kmodel· 4 dl· ♡ 24 dl♡ 2
- 🤗dwzhu/LLaMA-7B-PoSE-YaRN-96kmodel· 4 dl· ♡ 14 dl♡ 1
- 🤗dwzhu/LLaMA2-7B-PoSE-Linear-16kmodel· 10 dl· ♡ 110 dl♡ 1
- 🤗dwzhu/LLaMA2-7B-PoSE-NTK-16kmodel· 2 dl· ♡ 22 dl♡ 2
- 🤗dwzhu/LLaMA2-7B-PoSE-YaRN-16kmodel· 6 dl· ♡ 56 dl♡ 5
- 🤗dwzhu/Baichuan2-7B-PoSE-Linear-16kmodel· 2 dl· ♡ 12 dl♡ 1
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Speech Recognition and Synthesis
