TheBloke commited on
Commit
98b7b11
1 Parent(s): 8e1ea91

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +401 -0
README.md ADDED
@@ -0,0 +1,401 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: pipizhao/Pandalyst-7B-V1.2
3
+ inference: false
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ license: llama2
8
+ model-index:
9
+ - name: Pandalyst-7B-V1.2
10
+ results:
11
+ - metrics:
12
+ - name: acc@1
13
+ type: acc@1
14
+ value: 0.0
15
+ verified: false
16
+ task:
17
+ type: text-generation
18
+ model_creator: pipizhao
19
+ model_name: Pandalyst 7B v1.2
20
+ model_type: llama
21
+ prompt_template: 'Below is an instruction that describes a task. Write a response
22
+ that appropriately completes the request.
23
+
24
+
25
+ ### Instruction:
26
+
27
+ {prompt}
28
+
29
+
30
+ ### Response:
31
+
32
+ '
33
+ quantized_by: TheBloke
34
+ tags:
35
+ - code
36
+ ---
37
+ <!-- markdownlint-disable MD041 -->
38
+
39
+ <!-- header start -->
40
+ <!-- 200823 -->
41
+ <div style="width: auto; margin-left: auto; margin-right: auto">
42
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
43
+ </div>
44
+ <div style="display: flex; justify-content: space-between; width: 100%;">
45
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
46
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
47
+ </div>
48
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
49
+ <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>
50
+ </div>
51
+ </div>
52
+ <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>
53
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
54
+ <!-- header end -->
55
+
56
+ # Pandalyst 7B v1.2 - AWQ
57
+ - Model creator: [pipizhao](https://huggingface.co/pipizhao)
58
+ - Original model: [Pandalyst 7B v1.2](https://huggingface.co/pipizhao/Pandalyst-7B-V1.2)
59
+
60
+ <!-- description start -->
61
+ ## Description
62
+
63
+ This repo contains AWQ model files for [pipizhao's Pandalyst 7B v1.2](https://huggingface.co/pipizhao/Pandalyst-7B-V1.2).
64
+
65
+
66
+ ### About AWQ
67
+
68
+ 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.
69
+
70
+ It is supported by:
71
+
72
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
73
+ - [vLLM](https://github.com/vllm-project/vllm) - Llama and Mistral models only
74
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
75
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
76
+
77
+ <!-- description end -->
78
+ <!-- repositories-available start -->
79
+ ## Repositories available
80
+
81
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Pandalyst-7B-v1.2-AWQ)
82
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Pandalyst-7B-v1.2-GPTQ)
83
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Pandalyst-7B-v1.2-GGUF)
84
+ * [pipizhao's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/pipizhao/Pandalyst-7B-V1.2)
85
+ <!-- repositories-available end -->
86
+
87
+ <!-- prompt-template start -->
88
+ ## Prompt template: Alpaca
89
+
90
+ ```
91
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
92
+
93
+ ### Instruction:
94
+ {prompt}
95
+
96
+ ### Response:
97
+
98
+ ```
99
+
100
+ <!-- prompt-template end -->
101
+
102
+
103
+ <!-- README_AWQ.md-provided-files start -->
104
+ ## Provided files, and AWQ parameters
105
+
106
+ For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM.
107
+
108
+ Models are released as sharded safetensors files.
109
+
110
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
111
+ | ------ | ---- | -- | ----------- | ------- | ---- |
112
+ | [main](https://huggingface.co/TheBloke/Pandalyst-7B-v1.2-AWQ/tree/main) | 4 | 128 | [c4](https://huggingface.co/datasets/allenai/c4) | 4096 | 3.89 GB
113
+
114
+ <!-- README_AWQ.md-provided-files end -->
115
+
116
+ <!-- README_AWQ.md-text-generation-webui start -->
117
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
118
+
119
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
120
+
121
+ 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.
122
+
123
+ 1. Click the **Model tab**.
124
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Pandalyst-7B-v1.2-AWQ`.
125
+ 3. Click **Download**.
126
+ 4. The model will start downloading. Once it's finished it will say "Done".
127
+ 5. In the top left, click the refresh icon next to **Model**.
128
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Pandalyst-7B-v1.2-AWQ`
129
+ 7. Select **Loader: AutoAWQ**.
130
+ 8. Click Load, and the model will load and is now ready for use.
131
+ 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.
132
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
133
+ <!-- README_AWQ.md-text-generation-webui end -->
134
+
135
+ <!-- README_AWQ.md-use-from-vllm start -->
136
+ ## Multi-user inference server: vLLM
137
+
138
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
139
+
140
+ - Please ensure you are using vLLM version 0.2 or later.
141
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
142
+
143
+ For example:
144
+
145
+ ```shell
146
+ python3 python -m vllm.entrypoints.api_server --model TheBloke/Pandalyst-7B-v1.2-AWQ --quantization awq
147
+ ```
148
+
149
+ - When using vLLM from Python code, again set `quantization=awq`.
150
+
151
+ For example:
152
+
153
+ ```python
154
+ from vllm import LLM, SamplingParams
155
+
156
+ prompts = [
157
+ "Tell me about AI",
158
+ "Write a story about llamas",
159
+ "What is 291 - 150?",
160
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
161
+ ]
162
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
163
+
164
+ ### Instruction:
165
+ {prompt}
166
+
167
+ ### Response:
168
+ '''
169
+
170
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
171
+
172
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
173
+
174
+ llm = LLM(model="TheBloke/Pandalyst-7B-v1.2-AWQ", quantization="awq", dtype="auto")
175
+
176
+ outputs = llm.generate(prompts, sampling_params)
177
+
178
+ # Print the outputs.
179
+ for output in outputs:
180
+ prompt = output.prompt
181
+ generated_text = output.outputs[0].text
182
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
183
+ ```
184
+ <!-- README_AWQ.md-use-from-vllm start -->
185
+
186
+ <!-- README_AWQ.md-use-from-tgi start -->
187
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
188
+
189
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
190
+
191
+ Example Docker parameters:
192
+
193
+ ```shell
194
+ --model-id TheBloke/Pandalyst-7B-v1.2-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
195
+ ```
196
+
197
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
198
+
199
+ ```shell
200
+ pip3 install huggingface-hub
201
+ ```
202
+
203
+ ```python
204
+ from huggingface_hub import InferenceClient
205
+
206
+ endpoint_url = "https://your-endpoint-url-here"
207
+
208
+ prompt = "Tell me about AI"
209
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
210
+
211
+ ### Instruction:
212
+ {prompt}
213
+
214
+ ### Response:
215
+ '''
216
+
217
+ client = InferenceClient(endpoint_url)
218
+ response = client.text_generation(prompt,
219
+ max_new_tokens=128,
220
+ do_sample=True,
221
+ temperature=0.7,
222
+ top_p=0.95,
223
+ top_k=40,
224
+ repetition_penalty=1.1)
225
+
226
+ print(f"Model output: ", response)
227
+ ```
228
+ <!-- README_AWQ.md-use-from-tgi end -->
229
+
230
+ <!-- README_AWQ.md-use-from-python start -->
231
+ ## Inference from Python code using AutoAWQ
232
+
233
+ ### Install the AutoAWQ package
234
+
235
+ Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.1 or later.
236
+
237
+ ```shell
238
+ pip3 install autoawq
239
+ ```
240
+
241
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
242
+
243
+ ```shell
244
+ pip3 uninstall -y autoawq
245
+ git clone https://github.com/casper-hansen/AutoAWQ
246
+ cd AutoAWQ
247
+ pip3 install .
248
+ ```
249
+
250
+ ### AutoAWQ example code
251
+
252
+ ```python
253
+ from awq import AutoAWQForCausalLM
254
+ from transformers import AutoTokenizer
255
+
256
+ model_name_or_path = "TheBloke/Pandalyst-7B-v1.2-AWQ"
257
+
258
+ # Load tokenizer
259
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
260
+ # Load model
261
+ model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
262
+ trust_remote_code=False, safetensors=True)
263
+
264
+ prompt = "Tell me about AI"
265
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
266
+
267
+ ### Instruction:
268
+ {prompt}
269
+
270
+ ### Response:
271
+ '''
272
+
273
+ print("*** Running model.generate:")
274
+
275
+ token_input = tokenizer(
276
+ prompt_template,
277
+ return_tensors='pt'
278
+ ).input_ids.cuda()
279
+
280
+ # Generate output
281
+ generation_output = model.generate(
282
+ token_input,
283
+ do_sample=True,
284
+ temperature=0.7,
285
+ top_p=0.95,
286
+ top_k=40,
287
+ max_new_tokens=512
288
+ )
289
+
290
+ # Get the tokens from the output, decode them, print them
291
+ token_output = generation_output[0]
292
+ text_output = tokenizer.decode(token_output)
293
+ print("LLM output: ", text_output)
294
+
295
+ """
296
+ # Inference should be possible with transformers pipeline as well in future
297
+ # But currently this is not yet supported by AutoAWQ (correct as of September 25th 2023)
298
+ from transformers import pipeline
299
+
300
+ print("*** Pipeline:")
301
+ pipe = pipeline(
302
+ "text-generation",
303
+ model=model,
304
+ tokenizer=tokenizer,
305
+ max_new_tokens=512,
306
+ do_sample=True,
307
+ temperature=0.7,
308
+ top_p=0.95,
309
+ top_k=40,
310
+ repetition_penalty=1.1
311
+ )
312
+
313
+ print(pipe(prompt_template)[0]['generated_text'])
314
+ """
315
+ ```
316
+ <!-- README_AWQ.md-use-from-python end -->
317
+
318
+ <!-- README_AWQ.md-compatibility start -->
319
+ ## Compatibility
320
+
321
+ The files provided are tested to work with:
322
+
323
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
324
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
325
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
326
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
327
+
328
+ <!-- README_AWQ.md-compatibility end -->
329
+
330
+ <!-- footer start -->
331
+ <!-- 200823 -->
332
+ ## Discord
333
+
334
+ For further support, and discussions on these models and AI in general, join us at:
335
+
336
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
337
+
338
+ ## Thanks, and how to contribute
339
+
340
+ Thanks to the [chirper.ai](https://chirper.ai) team!
341
+
342
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
343
+
344
+ 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.
345
+
346
+ 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.
347
+
348
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
349
+
350
+ * Patreon: https://patreon.com/TheBlokeAI
351
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
352
+
353
+ **Special thanks to**: Aemon Algiz.
354
+
355
+ **Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski
356
+
357
+
358
+ Thank you to all my generous patrons and donaters!
359
+
360
+ And thank you again to a16z for their generous grant.
361
+
362
+ <!-- footer end -->
363
+
364
+ # Original model card: pipizhao's Pandalyst 7B v1.2
365
+
366
+
367
+
368
+ ## Pandalyst: A large language model for mastering data analysis using pandas
369
+
370
+ <p align="center">
371
+ <img src="https://raw.githubusercontent.com/pipizhaoa/Pandalyst/master/imgs/pandalyst.png" width="300"/>
372
+ </p>
373
+
374
+ <p align="center">
375
+ 🐱 <a href="https://github.com/pipizhaoa/Pandalyst" target="_blank">Github Repo</a> <br>
376
+ </p>
377
+
378
+ **What is Pandalyst**
379
+ - Pandalyst is a general large language model specifically trained to process and analyze data using the pandas library.
380
+
381
+ **How is Pandalyst**
382
+ - Pandalyst has strong generalization capabilities for data tables in different fields and different data analysis needs.
383
+
384
+ **Why is Pandalyst**
385
+ - Pandalyst is open source and free to use, and its small parameter size (7B/13B) allows us to easily deploy it on local PC.
386
+ - Pandalyst can handle complex data tables (multiple columns and multiple rows), allowing us to enter enough context to describe our table in detail.
387
+ - Pandalyst has very competitive performance, significantly outperforming models of the same size and even outperforming some of the strongest closed-source models.
388
+
389
+
390
+ ## News
391
+ - 🔥[2023/10/15] Now we can **plot** 📈! and much more powerful! We released **Pandalyst-7B-V1.2**, which was trained on **CodeLlama-7b-Python** and it surpasses **ChatGPT-3.5 (2023/06/13)**, **Pandalyst-7B-V1.1** and **WizardCoder-Python-13B-V1.0** in our **PandaTest_V1.0**.
392
+ - 🤖️[2023/09/30] We released **Pandalyst-7B-V1.1** , which was trained on **CodeLlama-7b-Python** and achieves the **76.1 exec@1** in our **PandaTest_V1.0** and surpasses **WizardCoder-Python-13B-V1.0** and **ChatGPT-3.5 (2023/06/13)**.
393
+
394
+ | Model | Checkpoint | Support plot | License |
395
+ |---------------------|--------------------------------------------------------------------------------------------|--------------| ----- |
396
+ | 🔥Pandalyst-7B-V1.2 | 🤗 <a href="https://huggingface.co/pipizhao/Pandalyst-7B-V1.2" target="_blank">HF Link</a> | ✅ | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
397
+ | Pandalyst-7B-V1.1 | 🤗 <a href="https://huggingface.co/pipizhao/Pandalyst-7B-V1.1" target="_blank">HF Link</a> | ❌ | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
398
+
399
+
400
+ ## Usage and Human evaluation
401
+ Please refer to <a href="https://github.com/pipizhaoa/Pandalyst" target="_blank">Github</a>.