NousResearch/Yarn-Mistral-7b-64k

Model

53

stars

16

commits

1

repos using this model

1

linked in READMEs

Nov 2, 2023

updated

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

README

Model Card: Nous-Yarn-Mistral-7b-64k

Preprint (arXiv)
GitHub yarn

Model Description

Nous-Yarn-Mistral-7b-64k is a state-of-the-art language model for long context, further pretrained on long context data for 1000 steps using the YaRN extension method. It is an extension of Mistral-7B-v0.1 and supports a 64k token context window.

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

model = AutoModelForCausalLM.from_pretrained("NousResearch/Yarn-Mistral-7b-64k",
  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 Window8k PPL16k PPL32k PPL64k PPL128k PPL
Mistral-7B-v0.18k2.96----
Yarn-Mistral-7b-64k64k3.042.652.442.20-
Yarn-Mistral-7b-128k128k3.082.682.472.242.19

Short context benchmarks showing that quality degradation is minimal:

ModelContext WindowARC-cHellaswagMMLUTruthful QA
Mistral-7B-v0.18k59.9883.3164.1642.15
Yarn-Mistral-7b-64k64k59.3881.2161.3242.50
Yarn-Mistral-7b-128k128k58.8780.5860.6442.46

Collaborators

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

Contributors

emozilla

14 commits

bloc97

1 commits

teknium

1 commits

NousResearch/Yarn-Mistral-7b-64k

Model

53

stars

16

commits

1

repos using this model

1

linked in READMEs

Nov 2, 2023

updated

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

README

Model Card: Nous-Yarn-Mistral-7b-64k

Preprint (arXiv)
GitHub yarn

Model Description

Nous-Yarn-Mistral-7b-64k is a state-of-the-art language model for long context, further pretrained on long context data for 1000 steps using the YaRN extension method. It is an extension of Mistral-7B-v0.1 and supports a 64k token context window.

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

model = AutoModelForCausalLM.from_pretrained("NousResearch/Yarn-Mistral-7b-64k",
  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 Window8k PPL16k PPL32k PPL64k PPL128k PPL
Mistral-7B-v0.18k2.96----
Yarn-Mistral-7b-64k64k3.042.652.442.20-
Yarn-Mistral-7b-128k128k3.082.682.472.242.19

Short context benchmarks showing that quality degradation is minimal:

ModelContext WindowARC-cHellaswagMMLUTruthful QA
Mistral-7B-v0.18k59.9883.3164.1642.15
Yarn-Mistral-7b-64k64k59.3881.2161.3242.50
Yarn-Mistral-7b-128k128k58.8780.5860.6442.46

Collaborators

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

Contributors

emozilla

14 commits

bloc97

1 commits

teknium

1 commits