DavidAU commited on
Commit
0489a12
·
verified ·
1 Parent(s): 3e09619

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +176 -0
README.md ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: peft
4
+ language:
5
+ - en
6
+ tags:
7
+ - deepseek
8
+ - reasoning
9
+ - thinking
10
+ - Llama 3.1 Lora
11
+ - Llama 3 Lora
12
+ - Lora
13
+ - Lora adapter
14
+ - 128k context
15
+ - general usage
16
+ - problem solving
17
+ - brainstorming
18
+ - solve riddles
19
+ - mergekit
20
+ - adapter
21
+ - peft
22
+ base_model:
23
+ - NousResearch/DeepHermes-3-Llama-3-8B-Preview
24
+ pipeline_tag: text-generation
25
+ ---
26
+
27
+ <h2>LORA-DeepHermes-R1-Reasoning-Llama-8B-rank-128-adapter</h2>
28
+
29
+ This is a "LORA" adapter to merge "DeepHermes R1" reasoning / thinking with any Llama 3 or Llama 3.1 model using MERGEKIT.
30
+
31
+ Note that "higher" rank adapter(s) may work better than lower ones, but might also overwrite/change parts of the model you do not want
32
+ changed. Testing a new model with more that one rank of adapter is suggested to get best results.
33
+
34
+ Also for this specific adapter, there are suggested "System Prompts" below to activate reasoning/thinking at the bottom of this page.
35
+
36
+ Your results will vary based on the model(s) you merge this adapter with.
37
+
38
+ <B>HOW TO MERGE THIS ADAPTER:</b>
39
+
40
+ You can use Mergekit "Colab" and/or Mergekit installed locally.
41
+
42
+ [ https://colab.research.google.com/github/mlabonne/llm-course/blob/main/Mergekit.ipynb ]
43
+
44
+ [ https://github.com/arcee-ai/mergekit ]
45
+
46
+ If you are doing multiple merges / steps in your merge, it is suggested you do this step LAST to ensure the adapter works correctly.
47
+
48
+ Here are some suggested "simple" methods to merge the adapter with a model.
49
+
50
+ <B>Method - Dare TIES:</B>
51
+
52
+ <pre>
53
+ models:
54
+ - model: REPO/MODEL-NAME+DavidAU/mergeadapter
55
+ parameters:
56
+ weight: 1
57
+ merge_method: dare_ties
58
+ base_model: REPO/MODEL-NAME+DavidAU/mergeadapter
59
+ dtype: bfloat16
60
+ tokenizer_source: REPO/MODEL-NAME+DavidAU/mergeadapter
61
+ </pre>
62
+
63
+ <B>Method - Pass Through:</b>
64
+
65
+ <pre>
66
+ base_model: REPO/MODEL-NAME+DavidAU/mergeadapter
67
+ dtype: bfloat16
68
+ merge_method: passthrough
69
+ models:
70
+ - model: REPO/MODEL-NAME+DavidAU/mergeadapter
71
+ tokenizer_source: REPO/MODEL-NAME+DavidAU/mergeadapter
72
+ </pre>
73
+
74
+ Replace "REPO/MODEL-NAME" with the model to merge the adapter with.
75
+
76
+ Replace "DavidAU/mergeadapter" with the adapter you want to merge with the model.
77
+
78
+ IMPORTANT: Note "+" - this is critical.
79
+
80
+ If you are using merge kit locally, you can still use the format above and Mergekit will download the model and adapter for you.
81
+
82
+ If you have downloaded the model(s) and adapter(s) you need to change the format to your local file system.
83
+
84
+ <B>Example Merge for Local Usage: </B>
85
+
86
+ <pre>
87
+ mergekit-yaml --lora-merge-cache HUGGING CACHE --copy-tokenizer --allow-crimes --cuda --out-shard-size 5B --lazy-unpickle --clone-tensors MERGEFILE SAVE-MERGE-TO
88
+ </pre>
89
+
90
+ ---
91
+
92
+ <B>System Role / System Prompt - Augment The Model's Power:</b>
93
+
94
+ ---
95
+
96
+ If you set / have a system prompt this will affect both "generation" and "thinking/reasoning".
97
+
98
+ SIMPLE:
99
+
100
+ This is the generic system prompt used for generation and testing:
101
+
102
+ <PRE>
103
+ You are a helpful, smart, kind, and efficient AI assistant. You always fulfill the user's requests to the best of your ability.
104
+ </PRE>
105
+
106
+ This System Role/Prompt will give you "basic thinking/reasoning":
107
+
108
+ <PRE>
109
+ You are a deep thinking AI, you may use extremely long chains of thought to deeply consider the problem and deliberate with yourself via systematic reasoning processes to help come to a correct solution prior to answering. You should enclose your thoughts and internal monologue inside &lt;think&gt; &lt;/think&gt; tags, and then provide your solution or response to the problem.
110
+ </PRE>
111
+
112
+ ADVANCED:
113
+
114
+ Logical and Creative - these will SIGNFICANTLY alter the output, and many times improve it too.
115
+
116
+ This will also cause more thoughts, deeper thoughts, and in many cases more detailed/stronger thoughts too.
117
+
118
+ Keep in mind you may also want to test the model with NO system prompt at all - including the default one.
119
+
120
+ Special Credit to: Eric Hartford, Cognitivecomputations ; these are based on his work.
121
+
122
+ CRITICAL:
123
+
124
+ Copy and paste exactly as shown, preserve formatting and line breaks.
125
+
126
+ SIDE NOTE:
127
+
128
+ These can be used in ANY Deepseek / Thinking model, including models not at this repo.
129
+
130
+ These, if used in a "non thinking" model, will also alter model performance too.
131
+
132
+ <PRE>
133
+ You are an AI assistant developed by the world wide community of ai experts.
134
+
135
+ Your primary directive is to provide well-reasoned, structured, and extensively detailed responses.
136
+
137
+ Formatting Requirements:
138
+
139
+ 1. Always structure your replies using: &lt;think&gt;{reasoning}&lt;/think&gt;{answer}
140
+ 2. The &lt;think&gt;&lt;/think&gt; block should contain at least six reasoning steps when applicable.
141
+ 3. If the answer requires minimal thought, the &lt;think&gt;&lt;/think&gt; block may be left empty.
142
+ 4. The user does not see the &lt;think&gt;&lt;/think&gt; section. Any information critical to the response must be included in the answer.
143
+ 5. If you notice that you have engaged in circular reasoning or repetition, immediately terminate {reasoning} with a &lt;/think&gt; and proceed to the {answer}
144
+
145
+ Response Guidelines:
146
+
147
+ 1. Detailed and Structured: Use rich Markdown formatting for clarity and readability.
148
+ 2. Scientific and Logical Approach: Your explanations should reflect the depth and precision of the greatest scientific minds.
149
+ 3. Prioritize Reasoning: Always reason through the problem first, unless the answer is trivial.
150
+ 4. Concise yet Complete: Ensure responses are informative, yet to the point without unnecessary elaboration.
151
+ 5. Maintain a professional, intelligent, and analytical tone in all interactions.
152
+ </PRE>
153
+
154
+ CREATIVE:
155
+
156
+ <PRE>
157
+ You are an AI assistant developed by a world wide community of ai experts.
158
+
159
+ Your primary directive is to provide highly creative, well-reasoned, structured, and extensively detailed responses.
160
+
161
+ Formatting Requirements:
162
+
163
+ 1. Always structure your replies using: &lt;think&gt;{reasoning}&lt;/think&gt;{answer}
164
+ 2. The &lt;think&gt;&lt;/think&gt; block should contain at least six reasoning steps when applicable.
165
+ 3. If the answer requires minimal thought, the &lt;think&gt;&lt;/think&gt; block may be left empty.
166
+ 4. The user does not see the &lt;think&gt;&lt;/think&gt; section. Any information critical to the response must be included in the answer.
167
+ 5. If you notice that you have engaged in circular reasoning or repetition, immediately terminate {reasoning} with a &lt;/think&gt; and proceed to the {answer}
168
+
169
+ Response Guidelines:
170
+
171
+ 1. Detailed and Structured: Use rich Markdown formatting for clarity and readability.
172
+ 2. Creative and Logical Approach: Your explanations should reflect the depth and precision of the greatest creative minds first.
173
+ 3. Prioritize Reasoning: Always reason through the problem first, unless the answer is trivial.
174
+ 4. Concise yet Complete: Ensure responses are informative, yet to the point without unnecessary elaboration.
175
+ 5. Maintain a professional, intelligent, and analytical tone in all interactions.
176
+ </PRE>