princeton-nlp/FullAttention-2.7b-4k

Model

license: apache-2.0

0

4 commits

2 linked in READMEs

updated Oct 27, 2023

See the code

README

license: apache-2.0

Paper: Adapting Language Models to Compress Contexts

Code: https://github.com/princeton-nlp/AutoCompressors

Models:


FullAttention-2.7b-4k is a model fine-tuned from facebook/opt-2.7b following the context window extension method described in Adapting Language Models to Compress Contexts. The 2,048 positional embeddings of the pre-trained OPT-2.7b are duplicated and the model is fine-tuned on sequences of 4,096 tokens from 2B tokens from The Pile.

To get started, download the AutoCompressor repository and load the model as follows:

from auto_compressor import AutoCompressorModel

model = AutoCompressorModel.from_pretrained("princeton-nlp/FullAttention-2.7b-4k")

Evaluation

We record the perplexity achieved by our OPT-2.7b models on segments of 2,048 tokens, conditioned on different amounts of context. FullAttention-2.7-4k uses full uncompressed contexts whereas AutoCompressor-2.7b-6k and RMT-2.7b-8k compress segments of 2,048 tokens into 50 summary vectors.

In-domain Evaluation

Context Tokens0512204840966144
FullAttention-2.7b-4k6.576.155.94--
RMT-2.7b-8k6.346.196.026.026.01
AutoCompressor-2.7b-6k6.316.045.985.945.93

Out-of-domain Evaluation

Context Tokens0512204840966144
FullAttention-2.7b-4k8.948.287.93--
RMT-2.7b-8k8.628.448.218.208.20
AutoCompressor-2.7b-6k8.608.268.178.128.10

Bibtex

@misc{chevalier2023adapting,
      title={Adapting Language Models to Compress Contexts}, 
      author={Alexis Chevalier and Alexander Wettig and Anirudh Ajith and Danqi Chen},
      year={2023},
      eprint={2305.14788},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
endpoints_compatible
pytorch
text-generation-inference
transformers

princeton-nlp/FullAttention-2.7b-4k

Model

license: apache-2.0

0

4 commits

2 linked in READMEs

updated Oct 27, 2023

See the code

README

license: apache-2.0

Paper: Adapting Language Models to Compress Contexts

Code: https://github.com/princeton-nlp/AutoCompressors

Models:


FullAttention-2.7b-4k is a model fine-tuned from facebook/opt-2.7b following the context window extension method described in Adapting Language Models to Compress Contexts. The 2,048 positional embeddings of the pre-trained OPT-2.7b are duplicated and the model is fine-tuned on sequences of 4,096 tokens from 2B tokens from The Pile.

To get started, download the AutoCompressor repository and load the model as follows:

from auto_compressor import AutoCompressorModel

model = AutoCompressorModel.from_pretrained("princeton-nlp/FullAttention-2.7b-4k")

Evaluation

We record the perplexity achieved by our OPT-2.7b models on segments of 2,048 tokens, conditioned on different amounts of context. FullAttention-2.7-4k uses full uncompressed contexts whereas AutoCompressor-2.7b-6k and RMT-2.7b-8k compress segments of 2,048 tokens into 50 summary vectors.

In-domain Evaluation

Context Tokens0512204840966144
FullAttention-2.7b-4k6.576.155.94--
RMT-2.7b-8k6.346.196.026.026.01
AutoCompressor-2.7b-6k6.316.045.985.945.93

Out-of-domain Evaluation

Context Tokens0512204840966144
FullAttention-2.7b-4k8.948.287.93--
RMT-2.7b-8k8.628.448.218.208.20
AutoCompressor-2.7b-6k8.608.268.178.128.10

Bibtex

@misc{chevalier2023adapting,
      title={Adapting Language Models to Compress Contexts}, 
      author={Alexis Chevalier and Alexander Wettig and Anirudh Ajith and Danqi Chen},
      year={2023},
      eprint={2305.14788},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
endpoints_compatible
pytorch
text-generation-inference
transformers