HaileyStorm commited on
Commit
a1d7289
·
verified ·
1 Parent(s): a0fbecc

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +129 -0
README.md ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - meta-llama/Meta-Llama-3-8B-Instruct
4
+ library_name: transformers
5
+ tags:
6
+ - mergekit
7
+ - prune
8
+ - dpo
9
+ - instruct
10
+ datasets:
11
+ - mlabonne/orpo-dpo-mix-40k
12
+ license: llama3
13
+ pipeline_tag: text-generation
14
+
15
+ model-index:
16
+ - name: llama3-5.4b-instruct
17
+ results:
18
+ - task:
19
+ type: text-generation
20
+ dataset:
21
+ name: truthfulqa_mc2
22
+ type: truthfulqa_mc2
23
+ metrics:
24
+ - name: TruthfulQA (0-Shot)
25
+ type: TruthfulQA (0-Shot)
26
+ value: 0.517686926475562
27
+ - task:
28
+ type: text-generation
29
+ dataset:
30
+ name: ai2_arc
31
+ type: ai2_arc
32
+ metrics:
33
+ - name: AI2 Reasoning Challenge (25-Shot)
34
+ type: AI2 Reasoning Challenge (25-Shot)
35
+ value: 0.360068259385666
36
+ - task:
37
+ type: text-generation
38
+ dataset:
39
+ name: hellaswag
40
+ type: hellaswag
41
+ metrics:
42
+ - name: HellaSwag (10-Shot)
43
+ type: HellaSwag (10-Shot)
44
+ value: 0.503485361481777
45
+ - task:
46
+ type: text-generation
47
+ dataset:
48
+ name: winogrande
49
+ type: winogrande
50
+ metrics:
51
+ - name: Winogrande (5-Shot)
52
+ type: Winogrande (5-Shot)
53
+ value: 0.633780584056827
54
+ - task:
55
+ type: text-generation
56
+ dataset:
57
+ name: mmlu
58
+ type: mmlu
59
+ metrics:
60
+ - name: MMLU (5-Shot)
61
+ type: MMLU (5-Shot)
62
+ value: 0.290912975359635
63
+ ---
64
+ # GGUFs
65
+
66
+ Quantized versions of this model are available:
67
+ https://huggingface.co/HaileyStorm/llama3-5.4b-instruct-Q8_0-GGUF
68
+ https://huggingface.co/HaileyStorm/llama3-5.4b-instruct-Q6_K-GGUF
69
+ https://huggingface.co/HaileyStorm/llama3-5.4b-instruct-Q5_K_M-GGUF
70
+ https://huggingface.co/HaileyStorm/llama3-5.4b-instruct-Q4_0-GGUF
71
+
72
+ # Pruned & Tuned
73
+
74
+ This is a "merge" of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
75
+ It is a prune of Meta-Llama-3-8B-Instruct from 32 layers down to 20, or about 5.4B parameter -- it's about 67% the size of the original.
76
+ Mostly, this is a test of (significant) pruning & healing an instruct-tuned model.
77
+
78
+ ## Healing / Finetune
79
+ I healed the model by doing a full weight DPO finetune for 139k samples (3.15 epochs), and then a LoRA with r=128 a=256 for 73k samples (1.67 epochs).
80
+ Prior to healing, the model returned absolute gibberish to any prompt, rarely two real words together. For example, give "2+2=" it might return "Mahmisan Pannpyout Na RMITa CMI TTi GP BP GP RSi TBi DD PS..."
81
+ The results are pretty good! The model has issues, but could have legitimate uses. It carry on a conversation. It's certainly usable, if not useful.
82
+
83
+ Truthfulness and commonsense reasoning suffered the least from the prune / were healed the best. Knowledge and complex reasoning suffered the most.
84
+ This model has 67% the parameters of the original, and has:
85
+ ~100% the TruthfulQA score of the original
86
+ ~60% the ARC Challenge score
87
+ ~65% the Hellaswag score
88
+ ~85% the Winogrande score
89
+ ~45% the the MMLU score
90
+
91
+ ### Benchmarks
92
+ {Benchmark images on their way...}
93
+
94
+ ## Why 5.4B?
95
+ This size should allow for:
96
+ - bf16 inference on 24GB VRAM
97
+ - Q8 or Q6 inference on 6GB VRAM
98
+ - Q5 inference on 4GB VRAM
99
+ - Fine-tuning on ... well, with less VRAM than an 8B model
100
+ And of course, as stated, it was a test of significant pruning, and of pruning&healing an instruct-tuned model. As a test, I think it's definitely successful.
101
+
102
+ ## Mergekit Details
103
+ ### Merge Method
104
+
105
+ This model was merged using the passthrough merge method.
106
+
107
+ ### Models Merged
108
+
109
+ The following models were included in the merge:
110
+ * [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)
111
+
112
+ ### Configuration
113
+
114
+ The following YAML configuration was used to produce this model:
115
+
116
+ ```yaml
117
+ dtype: bfloat16
118
+ merge_method: passthrough
119
+ slices:
120
+ - sources:
121
+ - layer_range: [0, 16]
122
+ model: meta-llama/Meta-Llama-3-8B-Instruct
123
+ - sources:
124
+ - layer_range: [20, 21]
125
+ model: meta-llama/Meta-Llama-3-8B-Instruct
126
+ - sources:
127
+ - layer_range: [29, 32]
128
+ model: meta-llama/Meta-Llama-3-8B-Instruct
129
+ ```