bhenrym14 commited on
Commit
66195ea
·
1 Parent(s): d7d0c01

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -0
README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - jondurbin/airoboros-2.1
4
+ - kmfoda/booksum
5
+ ---
6
+
7
+
8
+
9
+ # Extended Context (via YaRN) Llama-2-13b with airoboros-2.1 (fp16)
10
+
11
+
12
+ ## Overview
13
+
14
+ This is a finetune of [NousResearch/Yarn-Llama-2-13b-64k](https://huggingface.co/NousResearch/Yarn-Llama-2-13b-64k). This starting point is Llama-2-13b with additional pretraining done with YaRN scaling applied to RoPE to extend the useful context length to 64k tokens. Starting with this model, I performed instruction tuning with [Jon Durbin's Airoboros 2.1 dataset](https://huggingface.co/datasets/jondurbin/airoboros-2.1), with same scaling approach applied.
15
+
16
+ **This is a (merged) QLoRA fine-tune (rank 64)**.
17
+
18
+ The finetune was performed with 1x RTX 6000 Ada.
19
+
20
+
21
+ ## How to Use
22
+
23
+ YaRN is not implemented natively in `Transformers`. The YaRN pretrained model [NousResearch/Yarn-Llama-2-13b-64k](https://huggingface.co/NousResearch/Yarn-Llama-2-13b-64k) contains a drop-in llama architecture replacement that interfaces with the included configuration file. **To maximize compatibility, I have included the version that omits flash attention.** To run using `Transformers`, you will therefore need to pass `trust_remote_code=True`.
24
+
25
+ The PNTK method employed in my other model [bhenrym14/airophin-13b-pntk-16k-fp16](https://huggingface.co/bhenrym14/airophin-13b-pntk-16k-fp16), is very similar to YaRN. For GPTQ, I have an exllama patch that I may adapt for YaRN, but the community appears motivated to rapidly implement YaRN natively, so I may not bother.
26
+
27
+ Please comment with any questions and feedback on how this model performs, especially at long context lengths!
28
+
29
+ Ooba use: Be sure to increase the `Truncate the prompt up to this length` parameter to 16384 to utilize the full context capabilities. Again `trust_remote_code=True` is imperative
30
+
31
+ ## Motivation
32
+
33
+ Y
34
+
35
+ ## Relative Performance (wikitext perplexity)
36
+
37
+ | Context (tokens) | **bhenrym14/airoboros-l2-13b-PI-16k-fp16** | bhenrym14/airophin-v2-13b-PI-8k-fp16 | bhenrym14/airophin-13b-pntk-16k-fp16| bhenrym14/airoboros-13b-gpt4-1.4.1-PI-8192-fp16 |bhenrym14/airoboros-33b-gpt4-1.4.1-lxctx-PI-16384-fp16 | jondurbin/airoboros-l2-13b-gpt4-1.4.1 |
38
+ | --- | --- | ---| ----- | -----| ------| --- |
39
+ | 512 | 7.67 | 7.38 | 7.62 | 8.24 | 7.90 | **7.23** |
40
+ | 1024 | 6.15 | 5.99 | 6.20 | 6.71 | 6.17 | **5.85** |
41
+ | 2048 | 5.29 | 5.22 | 5.38 | 5.87 | 5.23 | **5.07** |
42
+ | 4096 | 4.94 | 4.90 | 5.08 | 5.50 | 4.91 | **4.77** |
43
+ | 8192 | **4.71** | **4.71** | 4.90 | 5.32 | Not Tested | 57.1 |
44
+ | 12000 | **4.54** | 55 | 4.82 | 56.1 | Not Tested | Not Tested |
45
+
46
+ - Larger PI scaling factors increase short context performance degradation. If you don't require 16k context, you're better off using a model with a different context extension method, or a smaller (or no) PI scaling factor. Given this, don't expect anything special from this model on the HF leaderboard. Whether or not this is relevant to you will depend on your intended use case.
47
+ - Beyond 8k, this model has lower perplexity than all other models tested here.
48
+ - I'm actively exploring/implementing other context extension methods that may ameliorate the tendency of PI methods to impair the ability of the model to attend to the context space equally.
49
+
50
+ ## Prompting:
51
+
52
+ Prompting differs with the airoboros 2.1 models. See [jondurbin/airoboros-l2-13b-2.1](https://huggingface.co/jondurbin/airoboros-l2-13b-2.1)