NousResearch/Yarn-Llama-2-70b-32k

Model

38

stars

8

commits

1

repos using this model

1

linked in READMEs

Nov 20, 2023

updated

custom_code
endpoints_compatible
llama
pytorch
text-generation
text-generation-inference
transformers
Browse cluster: Large Language Model Context Extension

README

Model Card: Yarn-Llama-2-70b-32k

Preprint (arXiv)
GitHub yarn

The authors would like to thank LAION AI for their support of compute for this model. It was trained on the JUWELS supercomputer.

Model Description

Nous-Yarn-Llama-2-70b-32k is a state-of-the-art language model for long context, further pretrained on long context data for 400 steps using the YaRN extension method. It is an extension of Llama-2-70b-hf and supports a 32k token context window.

To use, pass trust_remote_code=True when loading the model, for example

model = AutoModelForCausalLM.from_pretrained("NousResearch/Yarn-Llama-2-70b-32k",
  use_flash_attention_2=True,
  torch_dtype=torch.bfloat16,
  device_map="auto",
  trust_remote_code=True)

In addition you will need to use the latest version of transformers (until 4.35 comes out)

pip install git+https://github.com/huggingface/transformers

Benchmarks

Long context benchmarks:

ModelContext Window1k PPL2k PPL4k PPL8k PPL16k PPL32k PPL
Llama-2-70b-hf4k3.713.272.96---
Yarn-Llama-2-70b-32k32k3.613.222.912.822.452.23

Short context benchmarks showing that quality degradation is minimal:

ModelContext WindowARC-cMMLUTruthful QA
Llama-2-70b-hf4k67.3269.8344.92
Yarn-Llama-2-70b-32k32k67.4168.8446.14

Collaborators

Contributors

emozilla

8 commits

NousResearch/Yarn-Llama-2-70b-32k

Model

38

stars

8

commits

1

repos using this model

1

linked in READMEs

Nov 20, 2023

updated

custom_code
endpoints_compatible
llama
pytorch
text-generation
text-generation-inference
transformers
Browse cluster: Large Language Model Context Extension

README

Model Card: Yarn-Llama-2-70b-32k

Preprint (arXiv)
GitHub yarn

The authors would like to thank LAION AI for their support of compute for this model. It was trained on the JUWELS supercomputer.

Model Description

Nous-Yarn-Llama-2-70b-32k is a state-of-the-art language model for long context, further pretrained on long context data for 400 steps using the YaRN extension method. It is an extension of Llama-2-70b-hf and supports a 32k token context window.

To use, pass trust_remote_code=True when loading the model, for example

model = AutoModelForCausalLM.from_pretrained("NousResearch/Yarn-Llama-2-70b-32k",
  use_flash_attention_2=True,
  torch_dtype=torch.bfloat16,
  device_map="auto",
  trust_remote_code=True)

In addition you will need to use the latest version of transformers (until 4.35 comes out)

pip install git+https://github.com/huggingface/transformers

Benchmarks

Long context benchmarks:

ModelContext Window1k PPL2k PPL4k PPL8k PPL16k PPL32k PPL
Llama-2-70b-hf4k3.713.272.96---
Yarn-Llama-2-70b-32k32k3.613.222.912.822.452.23

Short context benchmarks showing that quality degradation is minimal:

ModelContext WindowARC-cMMLUTruthful QA
Llama-2-70b-hf4k67.3269.8344.92
Yarn-Llama-2-70b-32k32k67.4168.8446.14

Collaborators

Contributors

emozilla

8 commits