TheBloke commited on
Commit
8d8cc0a
1 Parent(s): 9083afb

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +407 -0
README.md ADDED
@@ -0,0 +1,407 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: rombodawg/Everyone-Coder-33b-Base
3
+ inference: false
4
+ license: other
5
+ license_link: https://github.com/deepseek-ai/DeepSeek-Coder/blob/main/LICENSE-MODEL
6
+ license_name: deepseek
7
+ model_creator: rombo dawg
8
+ model_name: Everyone Coder 33B Base
9
+ model_type: deepseek
10
+ prompt_template: '{prompt}
11
+
12
+ '
13
+ quantized_by: TheBloke
14
+ tags:
15
+ - merge
16
+ ---
17
+ <!-- markdownlint-disable MD041 -->
18
+
19
+ <!-- header start -->
20
+ <!-- 200823 -->
21
+ <div style="width: auto; margin-left: auto; margin-right: auto">
22
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
23
+ </div>
24
+ <div style="display: flex; justify-content: space-between; width: 100%;">
25
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
26
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
27
+ </div>
28
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
29
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
30
+ </div>
31
+ </div>
32
+ <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
33
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
34
+ <!-- header end -->
35
+
36
+ # Everyone Coder 33B Base - AWQ
37
+ - Model creator: [rombo dawg](https://huggingface.co/rombodawg)
38
+ - Original model: [Everyone Coder 33B Base](https://huggingface.co/rombodawg/Everyone-Coder-33b-Base)
39
+
40
+ <!-- description start -->
41
+ ## Description
42
+
43
+ This repo contains AWQ model files for [rombo dawg's Everyone Coder 33B Base](https://huggingface.co/rombodawg/Everyone-Coder-33b-Base).
44
+
45
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
46
+
47
+
48
+ ### About AWQ
49
+
50
+ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
51
+
52
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
53
+
54
+ It is supported by:
55
+
56
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
57
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
58
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
59
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
60
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
61
+
62
+ <!-- description end -->
63
+ <!-- repositories-available start -->
64
+ ## Repositories available
65
+
66
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Everyone-Coder-33B-Base-AWQ)
67
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Everyone-Coder-33B-Base-GPTQ)
68
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Everyone-Coder-33B-Base-GGUF)
69
+ * [rombo dawg's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/rombodawg/Everyone-Coder-33b-Base)
70
+ <!-- repositories-available end -->
71
+
72
+ <!-- prompt-template start -->
73
+ ## Prompt template: Unknown
74
+
75
+ ```
76
+ {prompt}
77
+
78
+ ```
79
+
80
+ <!-- prompt-template end -->
81
+
82
+
83
+ <!-- README_AWQ.md-provided-files start -->
84
+ ## Provided files, and AWQ parameters
85
+
86
+ I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
87
+
88
+ Models are released as sharded safetensors files.
89
+
90
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
91
+ | ------ | ---- | -- | ----------- | ------- | ---- |
92
+ | [main](https://huggingface.co/TheBloke/Everyone-Coder-33B-Base-AWQ/tree/main) | 4 | 128 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1/viewer/) | 8192 | 18.01 GB
93
+
94
+ <!-- README_AWQ.md-provided-files end -->
95
+
96
+ <!-- README_AWQ.md-text-generation-webui start -->
97
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
98
+
99
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
100
+
101
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
102
+
103
+ 1. Click the **Model tab**.
104
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Everyone-Coder-33B-Base-AWQ`.
105
+ 3. Click **Download**.
106
+ 4. The model will start downloading. Once it's finished it will say "Done".
107
+ 5. In the top left, click the refresh icon next to **Model**.
108
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Everyone-Coder-33B-Base-AWQ`
109
+ 7. Select **Loader: AutoAWQ**.
110
+ 8. Click Load, and the model will load and is now ready for use.
111
+ 9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
112
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
113
+ <!-- README_AWQ.md-text-generation-webui end -->
114
+
115
+ <!-- README_AWQ.md-use-from-vllm start -->
116
+ ## Multi-user inference server: vLLM
117
+
118
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
119
+
120
+ - Please ensure you are using vLLM version 0.2 or later.
121
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
122
+
123
+ For example:
124
+
125
+ ```shell
126
+ python3 -m vllm.entrypoints.api_server --model TheBloke/Everyone-Coder-33B-Base-AWQ --quantization awq --dtype auto
127
+ ```
128
+
129
+ - When using vLLM from Python code, again set `quantization=awq`.
130
+
131
+ For example:
132
+
133
+ ```python
134
+ from vllm import LLM, SamplingParams
135
+
136
+ prompts = [
137
+ "Tell me about AI",
138
+ "Write a story about llamas",
139
+ "What is 291 - 150?",
140
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
141
+ ]
142
+ prompt_template=f'''{prompt}
143
+ '''
144
+
145
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
146
+
147
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
148
+
149
+ llm = LLM(model="TheBloke/Everyone-Coder-33B-Base-AWQ", quantization="awq", dtype="auto")
150
+
151
+ outputs = llm.generate(prompts, sampling_params)
152
+
153
+ # Print the outputs.
154
+ for output in outputs:
155
+ prompt = output.prompt
156
+ generated_text = output.outputs[0].text
157
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
158
+ ```
159
+ <!-- README_AWQ.md-use-from-vllm start -->
160
+
161
+ <!-- README_AWQ.md-use-from-tgi start -->
162
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
163
+
164
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
165
+
166
+ Example Docker parameters:
167
+
168
+ ```shell
169
+ --model-id TheBloke/Everyone-Coder-33B-Base-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
170
+ ```
171
+
172
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
173
+
174
+ ```shell
175
+ pip3 install huggingface-hub
176
+ ```
177
+
178
+ ```python
179
+ from huggingface_hub import InferenceClient
180
+
181
+ endpoint_url = "https://your-endpoint-url-here"
182
+
183
+ prompt = "Tell me about AI"
184
+ prompt_template=f'''{prompt}
185
+ '''
186
+
187
+ client = InferenceClient(endpoint_url)
188
+ response = client.text_generation(prompt,
189
+ max_new_tokens=128,
190
+ do_sample=True,
191
+ temperature=0.7,
192
+ top_p=0.95,
193
+ top_k=40,
194
+ repetition_penalty=1.1)
195
+
196
+ print(f"Model output: ", response)
197
+ ```
198
+ <!-- README_AWQ.md-use-from-tgi end -->
199
+
200
+ <!-- README_AWQ.md-use-from-python start -->
201
+ ## Inference from Python code using Transformers
202
+
203
+ ### Install the necessary packages
204
+
205
+ - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
206
+ - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
207
+
208
+ ```shell
209
+ pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
210
+ ```
211
+
212
+ Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
213
+
214
+ If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
215
+
216
+ ```shell
217
+ pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
218
+ ```
219
+
220
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
221
+
222
+ ```shell
223
+ pip3 uninstall -y autoawq
224
+ git clone https://github.com/casper-hansen/AutoAWQ
225
+ cd AutoAWQ
226
+ pip3 install .
227
+ ```
228
+
229
+ ### Transformers example code (requires Transformers 4.35.0 and later)
230
+
231
+ ```python
232
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
233
+
234
+ model_name_or_path = "TheBloke/Everyone-Coder-33B-Base-AWQ"
235
+
236
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
237
+ model = AutoModelForCausalLM.from_pretrained(
238
+ model_name_or_path,
239
+ low_cpu_mem_usage=True,
240
+ device_map="cuda:0"
241
+ )
242
+
243
+ # Using the text streamer to stream output one token at a time
244
+ streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
245
+
246
+ prompt = "Tell me about AI"
247
+ prompt_template=f'''{prompt}
248
+ '''
249
+
250
+ # Convert prompt to tokens
251
+ tokens = tokenizer(
252
+ prompt_template,
253
+ return_tensors='pt'
254
+ ).input_ids.cuda()
255
+
256
+ generation_params = {
257
+ "do_sample": True,
258
+ "temperature": 0.7,
259
+ "top_p": 0.95,
260
+ "top_k": 40,
261
+ "max_new_tokens": 512,
262
+ "repetition_penalty": 1.1
263
+ }
264
+
265
+ # Generate streamed output, visible one token at a time
266
+ generation_output = model.generate(
267
+ tokens,
268
+ streamer=streamer,
269
+ **generation_params
270
+ )
271
+
272
+ # Generation without a streamer, which will include the prompt in the output
273
+ generation_output = model.generate(
274
+ tokens,
275
+ **generation_params
276
+ )
277
+
278
+ # Get the tokens from the output, decode them, print them
279
+ token_output = generation_output[0]
280
+ text_output = tokenizer.decode(token_output)
281
+ print("model.generate output: ", text_output)
282
+
283
+ # Inference is also possible via Transformers' pipeline
284
+ from transformers import pipeline
285
+
286
+ pipe = pipeline(
287
+ "text-generation",
288
+ model=model,
289
+ tokenizer=tokenizer,
290
+ **generation_params
291
+ )
292
+
293
+ pipe_output = pipe(prompt_template)[0]['generated_text']
294
+ print("pipeline output: ", pipe_output)
295
+
296
+ ```
297
+ <!-- README_AWQ.md-use-from-python end -->
298
+
299
+ <!-- README_AWQ.md-compatibility start -->
300
+ ## Compatibility
301
+
302
+ The files provided are tested to work with:
303
+
304
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
305
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
306
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
307
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
308
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
309
+
310
+ <!-- README_AWQ.md-compatibility end -->
311
+
312
+ <!-- footer start -->
313
+ <!-- 200823 -->
314
+ ## Discord
315
+
316
+ For further support, and discussions on these models and AI in general, join us at:
317
+
318
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
319
+
320
+ ## Thanks, and how to contribute
321
+
322
+ Thanks to the [chirper.ai](https://chirper.ai) team!
323
+
324
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
325
+
326
+ I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
327
+
328
+ If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
329
+
330
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
331
+
332
+ * Patreon: https://patreon.com/TheBlokeAI
333
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
334
+
335
+ **Special thanks to**: Aemon Algiz.
336
+
337
+ **Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros
338
+
339
+
340
+ Thank you to all my generous patrons and donaters!
341
+
342
+ And thank you again to a16z for their generous grant.
343
+
344
+ <!-- footer end -->
345
+
346
+ # Original model card: rombo dawg's Everyone Coder 33B Base
347
+
348
+ Everyone-Coder-33b-Base
349
+
350
+
351
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/642cc1c253e76b4c2286c58e/ECrHQnZnv8UM9GUCQtlWW.jpeg)
352
+
353
+ EveryoneLLM series of models made by the community, for the community. This is a coding specific model made using fine-tunes of deekseekcoder-33b-base.
354
+
355
+ ______________________________________________________________________________________________________________
356
+ Im having trouble benchmarking this model because I suck at running llm benchmarks, but from hand testing running the model through https://edabit.com/challenge coding challenges vs up to date gpt-4. My model is hands down beating it in coding.
357
+ ______________________________________________________________________________________________________________
358
+ Ive recently noticed this model has trouble with end tokens so I made a custom prompt template for it. Made sure to add (Always end with "<|EOT|>") In addition to your system prompt and (Always end your response with "<|EOT|>") at the end of the User message is the preset. Then add <|EOT|> as a custom stop string in your LM text generating interface.
359
+
360
+ ```
361
+ Always end with "<|EOT|>"
362
+
363
+ {System}
364
+
365
+ <|User|>
366
+
367
+ {User}. Always end your response with "<|EOT|>"
368
+
369
+ <|Assistant|>
370
+
371
+ {Assistant}
372
+ ```
373
+
374
+ The models that were used in this merger were as follow:
375
+
376
+ - https://huggingface.co/deepseek-ai/deepseek-coder-33b-instruct
377
+
378
+ - https://huggingface.co/codefuse-ai/CodeFuse-DeepSeek-33B
379
+
380
+ - https://huggingface.co/WizardLM/WizardCoder-33B-V1.1
381
+
382
+ Thank you to the creators of the above ai models, they have full credit for the EveryoneLLM series of models. Without their hard work we wouldnt be able to achieve the great success we have in the open source community. 💗
383
+
384
+ You can find the write up for merging models here:
385
+
386
+ https://docs.google.com/document/d/1_vOftBnrk9NRk5h10UqrfJ5CDih9KBKL61yvrZtVWPE/edit?usp=sharing
387
+
388
+ Config for the merger can be found bellow:
389
+
390
+ ```yaml
391
+ models:
392
+ - model: WizardLM_WizardCoder-33B-V1.1
393
+ parameters:
394
+ density: 1
395
+ weight: .5
396
+ - model: codefuse-ai_CodeFuse-DeepSeek-33B
397
+ parameters:
398
+ density: 1
399
+ weight: .5
400
+ merge_method: ties
401
+ base_model: deepseek-ai_deepseek-coder-33b-instruct
402
+ parameters:
403
+ normalize: true
404
+ int8_mask: true
405
+ dtype: float16
406
+
407
+ ```