DavidAU commited on
Commit
b7bd6c1
·
verified ·
1 Parent(s): 8fb3ec3

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +300 -0
README.md ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - ValiantLabs/Qwen3-4B-Esper3
5
+ language:
6
+ - en
7
+ pipeline_tag: text-generation
8
+ tags:
9
+ - merge
10
+ - programming
11
+ - code generation
12
+ - code
13
+ - coding
14
+ - coder
15
+ - chat
16
+ - code
17
+ - chat
18
+ - brainstorm
19
+ - qwen
20
+ - qwen3
21
+ - qwencoder
22
+ - brainstorm20x
23
+ - esper
24
+ - esper-3
25
+ - valiant
26
+ - valiant-labs
27
+ - qwen
28
+ - qwen-3
29
+ - qwen-3-4b
30
+ - 4b
31
+ - reasoning
32
+ - code
33
+ - code-instruct
34
+ - python
35
+ - javascript
36
+ - dev-ops
37
+ - jenkins
38
+ - terraform
39
+ - scripting
40
+ - powershell
41
+ - azure
42
+ - aws
43
+ - gcp
44
+ - cloud
45
+ - problem-solving
46
+ - architect
47
+ - engineer
48
+ - developer
49
+ - creative
50
+ - analytical
51
+ - expert
52
+ - rationality
53
+ - conversational
54
+ - chat
55
+ - instruct
56
+ - float32
57
+ datasets:
58
+ - sequelbox/Titanium2.1-DeepSeek-R1
59
+ - sequelbox/Tachibana2-DeepSeek-R1
60
+ - sequelbox/Raiden-DeepSeek-R1
61
+ library_name: transformers
62
+ ---
63
+
64
+ <h2>Qwen3-Esper3-Reasoning-Instruct-6B-Brainstorm20x-Enhanced-E32</h2>
65
+
66
+ This repo contains the full precision source code, in "safe tensors" format to generate GGUFs, GPTQ, EXL2, AWQ, HQQ and other formats.
67
+ The source code can also be used directly.
68
+
69
+ This source code is in float32, which mirrors the quality of the original model's source.
70
+
71
+ This model contains Brainstorm 20x, combined with ValiantLabs's 4B General / Coder (instruct model):
72
+
73
+ https://huggingface.co/ValiantLabs/Qwen3-4B-Esper3
74
+
75
+ Information on the 4B model below, followed by Brainstorm 20x adapter (by DavidAU) and then a complete help
76
+ section for running LLM / AI models.
77
+
78
+ The Brainstorm adapter improves code generation, and unique code solving abilities.
79
+
80
+ This model requires:
81
+ - Jinja (embedded) or CHATML template
82
+ - Max context of 40k.
83
+
84
+ Settings used for testing (suggested):
85
+ - Temp .3 to .7
86
+ - Rep pen 1.05 to 1.1
87
+ - Topp .8 , minp .05
88
+ - Topk 20
89
+ - No system prompt.
90
+
91
+ FOR CODING:
92
+
93
+ Higher temps: .6 to .9 (even over 1) work better for more complex coding / especially with more restrictions.
94
+
95
+ Also, temp .9 with rep pen of 1.05 worked very well with this specific model.
96
+
97
+ This model will respond well to both detailed instructions and step by step refinement and additions to code.
98
+
99
+ As this is an instruct model, it will also benefit from a detailed system prompt too.
100
+
101
+ For simpler coding problems, lower quants will work well; but for complex/multi-step problem solving suggest Q6 or Q8.
102
+
103
+ ---
104
+
105
+ **[Support our open-source dataset and model releases!](https://huggingface.co/spaces/sequelbox/SupportOpenSource)**
106
+
107
+
108
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/64f267a8a4f79a118e0fcc89/qdicXwrO_XOKRTjOu2yBF.jpeg)
109
+
110
+ Esper 3: [Qwen3-4B](https://huggingface.co/ValiantLabs/Qwen3-4B-Esper3), [Qwen3-8B](https://huggingface.co/ValiantLabs/Qwen3-8B-Esper3), [Qwen3-14B](https://huggingface.co/ValiantLabs/Qwen3-14B-Esper3)
111
+
112
+
113
+ Esper 3 is a coding, architecture, and DevOps reasoning specialist built on Qwen 3.
114
+ - Finetuned on our [DevOps and architecture reasoning](https://huggingface.co/datasets/sequelbox/Titanium2.1-DeepSeek-R1) and [code reasoning](https://huggingface.co/datasets/sequelbox/Tachibana2-DeepSeek-R1) data generated with Deepseek R1!
115
+ - Improved [general and creative reasoning](https://huggingface.co/datasets/sequelbox/Raiden-DeepSeek-R1) to supplement problem-solving and general chat performance.
116
+ - Small model sizes allow running on local desktop and mobile, plus super-fast server inference!
117
+
118
+
119
+ ## Prompting Guide
120
+ Esper 3 uses the [Qwen 3](https://huggingface.co/Qwen/Qwen3-4B) prompt format.
121
+
122
+ Esper 3 is a reasoning finetune; we recommend enable_thinking=True for all chats.
123
+
124
+ Example inference script to get started:
125
+
126
+ ```python
127
+ from transformers import AutoModelForCausalLM, AutoTokenizer
128
+
129
+ model_name = "ValiantLabs/Qwen3-4B-Esper3"
130
+
131
+ # load the tokenizer and the model
132
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
133
+ model = AutoModelForCausalLM.from_pretrained(
134
+ model_name,
135
+ torch_dtype="auto",
136
+ device_map="auto"
137
+ )
138
+
139
+ # prepare the model input
140
+ prompt = "Write a Terraform configuration that uses the `aws_ami` data source to find the latest Amazon Linux 2 AMI. Then, provision an EC2 instance using this dynamically determined AMI ID."
141
+ messages = [
142
+ {"role": "user", "content": prompt}
143
+ ]
144
+ text = tokenizer.apply_chat_template(
145
+ messages,
146
+ tokenize=False,
147
+ add_generation_prompt=True,
148
+ enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
149
+ )
150
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
151
+
152
+ # conduct text completion
153
+ generated_ids = model.generate(
154
+ **model_inputs,
155
+ max_new_tokens=32768
156
+ )
157
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
158
+
159
+ # parsing thinking content
160
+ try:
161
+ # rindex finding 151668 (</think>)
162
+ index = len(output_ids) - output_ids[::-1].index(151668)
163
+ except ValueError:
164
+ index = 0
165
+
166
+ thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
167
+ content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
168
+
169
+ print("thinking content:", thinking_content)
170
+ print("content:", content)
171
+ ```
172
+
173
+
174
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/63444f2687964b331809eb55/VCJ8Fmefd8cdVhXSSxJiD.jpeg)
175
+
176
+
177
+ Esper 3 is created by [Valiant Labs.](http://valiantlabs.ca/)
178
+
179
+ [Check out our HuggingFace page to see all of our models!](https://huggingface.co/ValiantLabs)
180
+
181
+ We care about open source. For everyone to use.
182
+
183
+ See more here:
184
+
185
+ https://huggingface.co/ValiantLabs/Qwen3-4B-Esper3
186
+
187
+ ---
188
+
189
+ <H2>What is Brainstorm?</H2>
190
+
191
+ ---
192
+
193
+ <B>Brainstorm 20x</B>
194
+
195
+ The BRAINSTORM process was developed by David_AU.
196
+
197
+ Some of the core principals behind this process are discussed in this <a href="https://arxiv.org/pdf/2401.02415">
198
+ scientific paper : Progressive LLaMA with Block Expansion </a>.
199
+
200
+ However I went in a completely different direction from what was outlined in this paper.
201
+
202
+ What is "Brainstorm" ?
203
+
204
+ The reasoning center of an LLM is taken apart, reassembled, and expanded.
205
+
206
+ In this case for this model: 20 times
207
+
208
+ Then these centers are individually calibrated. These "centers" also interact with each other.
209
+ This introduces subtle changes into the reasoning process.
210
+ The calibrations further adjust - dial up or down - these "changes" further.
211
+ The number of centers (5x,10x etc) allow more "tuning points" to further customize how the model reasons so to speak.
212
+
213
+ The core aim of this process is to increase the model's detail, concept and connection to the "world",
214
+ general concept connections, prose quality and prose length without affecting instruction following.
215
+
216
+ This will also enhance any creative use case(s) of any kind, including "brainstorming", creative art form(s) and like case uses.
217
+
218
+ Here are some of the enhancements this process brings to the model's performance:
219
+
220
+ - Prose generation seems more focused on the moment to moment.
221
+ - Sometimes there will be "preamble" and/or foreshadowing present.
222
+ - Fewer or no "cliches"
223
+ - Better overall prose and/or more complex / nuanced prose.
224
+ - A greater sense of nuance on all levels.
225
+ - Coherence is stronger.
226
+ - Description is more detailed, and connected closer to the content.
227
+ - Simile and Metaphors are stronger and better connected to the prose, story, and character.
228
+ - Sense of "there" / in the moment is enhanced.
229
+ - Details are more vivid, and there are more of them.
230
+ - Prose generation length can be long to extreme.
231
+ - Emotional engagement is stronger.
232
+ - The model will take FEWER liberties vs a normal model: It will follow directives more closely but will "guess" less.
233
+ - The MORE instructions and/or details you provide the more strongly the model will respond.
234
+ - Depending on the model "voice" may be more "human" vs original model's "voice".
235
+
236
+ Other "lab" observations:
237
+
238
+ - This process does not, in my opinion, make the model 5x or 10x "smarter" - if only that was true!
239
+ - However, a change in "IQ" was not an issue / a priority, and was not tested or calibrated for so to speak.
240
+ - From lab testing it seems to ponder, and consider more carefully roughly speaking.
241
+ - You could say this process sharpens the model's focus on it's task(s) at a deeper level.
242
+
243
+ The process to modify the model occurs at the root level - source files level. The model can quanted as a GGUF, EXL2, AWQ etc etc.
244
+
245
+ ---
246
+
247
+ For more information / other Qwen/Mistral Coders / additional settings see:
248
+
249
+ [ https://huggingface.co/DavidAU/Qwen2.5-MOE-2x-4x-6x-8x__7B__Power-CODER__19B-30B-42B-53B-gguf ]
250
+
251
+ ---
252
+
253
+ <H2>Help, Adjustments, Samplers, Parameters and More</H2>
254
+
255
+ ---
256
+
257
+ <B>CHANGE THE NUMBER OF ACTIVE EXPERTS:</B>
258
+
259
+ See this document:
260
+
261
+ https://huggingface.co/DavidAU/How-To-Set-and-Manage-MOE-Mix-of-Experts-Model-Activation-of-Experts
262
+
263
+ <B>Settings: CHAT / ROLEPLAY and/or SMOOTHER operation of this model:</B>
264
+
265
+ In "KoboldCpp" or "oobabooga/text-generation-webui" or "Silly Tavern" ;
266
+
267
+ Set the "Smoothing_factor" to 1.5
268
+
269
+ : in KoboldCpp -> Settings->Samplers->Advanced-> "Smooth_F"
270
+
271
+ : in text-generation-webui -> parameters -> lower right.
272
+
273
+ : In Silly Tavern this is called: "Smoothing"
274
+
275
+
276
+ NOTE: For "text-generation-webui"
277
+
278
+ -> if using GGUFs you need to use "llama_HF" (which involves downloading some config files from the SOURCE version of this model)
279
+
280
+ Source versions (and config files) of my models are here:
281
+
282
+ https://huggingface.co/collections/DavidAU/d-au-source-files-for-gguf-exl2-awq-gptq-hqq-etc-etc-66b55cb8ba25f914cbf210be
283
+
284
+ OTHER OPTIONS:
285
+
286
+ - Increase rep pen to 1.1 to 1.15 (you don't need to do this if you use "smoothing_factor")
287
+
288
+ - If the interface/program you are using to run AI MODELS supports "Quadratic Sampling" ("smoothing") just make the adjustment as noted.
289
+
290
+ <B>Highest Quality Settings / Optimal Operation Guide / Parameters and Samplers</B>
291
+
292
+ This a "Class 1" model:
293
+
294
+ For all settings used for this model (including specifics for its "class"), including example generation(s) and for advanced settings guide (which many times addresses any model issue(s)), including methods to improve model performance for all use case(s) as well as chat, roleplay and other use case(s) please see:
295
+
296
+ [ https://huggingface.co/DavidAU/Maximizing-Model-Performance-All-Quants-Types-And-Full-Precision-by-Samplers_Parameters ]
297
+
298
+ You can see all parameters used for generation, in addition to advanced parameters and samplers to get the most out of this model here:
299
+
300
+ [ https://huggingface.co/DavidAU/Maximizing-Model-Performance-All-Quants-Types-And-Full-Precision-by-Samplers_Parameters ]