TheBloke commited on
Commit
debf4a4
1 Parent(s): 8a8a739

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +334 -0
README.md ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: pipizhao/Pandalyst_13B_V1.0
3
+ inference: false
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ license: llama2
8
+ model-index:
9
+ - name: Pandalyst_13B_v1.0
10
+ results:
11
+ - metrics:
12
+ - name: exec@1
13
+ type: exec@1
14
+ value: 0.71
15
+ verified: false
16
+ task:
17
+ type: text-generation
18
+ model_creator: Yanzhao Zheng
19
+ model_name: Pandalyst 13B V1.0
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
+
38
+ <!-- header start -->
39
+ <!-- 200823 -->
40
+ <div style="width: auto; margin-left: auto; margin-right: auto">
41
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
42
+ </div>
43
+ <div style="display: flex; justify-content: space-between; width: 100%;">
44
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
45
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
46
+ </div>
47
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
48
+ <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>
49
+ </div>
50
+ </div>
51
+ <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>
52
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
53
+ <!-- header end -->
54
+
55
+ # Pandalyst 13B V1.0 - AWQ
56
+ - Model creator: [Yanzhao Zheng](https://huggingface.co/pipizhao)
57
+ - Original model: [Pandalyst 13B V1.0](https://huggingface.co/pipizhao/Pandalyst_13B_V1.0)
58
+
59
+ <!-- description start -->
60
+ ## Description
61
+
62
+ This repo contains AWQ model files for [Yanzhao Zheng's Pandalyst 13B V1.0](https://huggingface.co/pipizhao/Pandalyst_13B_V1.0).
63
+
64
+
65
+ ### About AWQ
66
+
67
+ 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.
68
+
69
+ It is also now supported by continuous batching server [vLLM](https://github.com/vllm-project/vllm), allowing use of Llama AWQ models for high-throughput concurrent inference in multi-user server scenarios.
70
+
71
+ As of September 25th 2023, preliminary Llama-only AWQ support has also been added to [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference).
72
+
73
+ Note that, at the time of writing, overall throughput is still lower than running vLLM or TGI with unquantised models, however using AWQ enables using much smaller GPUs which can lead to easier deployment and overall cost savings. For example, a 70B model can be run on 1 x 48GB GPU instead of 2 x 80GB.
74
+ <!-- description end -->
75
+ <!-- repositories-available start -->
76
+ ## Repositories available
77
+
78
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Pandalyst_13B_V1.0-AWQ)
79
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Pandalyst_13B_V1.0-GPTQ)
80
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Pandalyst_13B_V1.0-GGUF)
81
+ * [Yanzhao Zheng's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/pipizhao/Pandalyst_13B_V1.0)
82
+ <!-- repositories-available end -->
83
+
84
+ <!-- prompt-template start -->
85
+ ## Prompt template: Alpaca
86
+
87
+ ```
88
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
89
+
90
+ ### Instruction:
91
+ {prompt}
92
+
93
+ ### Response:
94
+
95
+ ```
96
+
97
+ <!-- prompt-template end -->
98
+
99
+
100
+ <!-- README_AWQ.md-provided-files start -->
101
+ ## Provided files, and AWQ parameters
102
+
103
+ 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.
104
+
105
+ Models are released as sharded safetensors files.
106
+
107
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
108
+ | ------ | ---- | -- | ----------- | ------- | ---- |
109
+ | [main](https://huggingface.co/TheBloke/Pandalyst_13B_V1.0-AWQ/tree/main) | 4 | 128 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 7.25 GB
110
+
111
+ <!-- README_AWQ.md-provided-files end -->
112
+
113
+ <!-- README_AWQ.md-use-from-vllm start -->
114
+ ## Serving this model from vLLM
115
+
116
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
117
+
118
+ Note: at the time of writing, vLLM has not yet done a new release with AWQ support.
119
+
120
+ If you try the vLLM examples below and get an error about `quantization` being unrecognised, or other AWQ-related issues, please install vLLM from Github source.
121
+
122
+ - When using vLLM as a server, pass the `--quantization awq` parameter, for example:
123
+
124
+ ```shell
125
+ python3 python -m vllm.entrypoints.api_server --model TheBloke/Pandalyst_13B_V1.0-AWQ --quantization awq --dtype half
126
+ ```
127
+
128
+ When using vLLM from Python code, pass the `quantization=awq` parameter, for example:
129
+
130
+ ```python
131
+ from vllm import LLM, SamplingParams
132
+
133
+ prompts = [
134
+ "Hello, my name is",
135
+ "The president of the United States is",
136
+ "The capital of France is",
137
+ "The future of AI is",
138
+ ]
139
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
140
+
141
+ llm = LLM(model="TheBloke/Pandalyst_13B_V1.0-AWQ", quantization="awq", dtype="half")
142
+
143
+ outputs = llm.generate(prompts, sampling_params)
144
+
145
+ # Print the outputs.
146
+ for output in outputs:
147
+ prompt = output.prompt
148
+ generated_text = output.outputs[0].text
149
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
150
+ ```
151
+ <!-- README_AWQ.md-use-from-vllm start -->
152
+
153
+ <!-- README_AWQ.md-use-from-python start -->
154
+ ## Serving this model from TGI
155
+
156
+ TGI merged support for AWQ on September 25th, 2023. At the time of writing you need to use the `:latest` Docker container: `ghcr.io/huggingface/text-generation-inference:latest`
157
+
158
+ Add the parameter `--quantize awq` for AWQ support.
159
+
160
+ Example parameters:
161
+ ```shell
162
+ --model-id TheBloke/Pandalyst_13B_V1.0-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
163
+ ```
164
+
165
+ ## How to use this AWQ model from Python code
166
+
167
+ ### Install the necessary packages
168
+
169
+ Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later
170
+
171
+ ```shell
172
+ pip3 install autoawq
173
+ ```
174
+
175
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
176
+
177
+ ```shell
178
+ pip3 uninstall -y autoawq
179
+ git clone https://github.com/casper-hansen/AutoAWQ
180
+ cd AutoAWQ
181
+ pip3 install .
182
+ ```
183
+
184
+ ### You can then try the following example code
185
+
186
+ ```python
187
+ from awq import AutoAWQForCausalLM
188
+ from transformers import AutoTokenizer
189
+
190
+ model_name_or_path = "TheBloke/Pandalyst_13B_V1.0-AWQ"
191
+
192
+ # Load model
193
+ model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
194
+ trust_remote_code=False, safetensors=True)
195
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
196
+
197
+ prompt = "Tell me about AI"
198
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
199
+
200
+ ### Instruction:
201
+ {prompt}
202
+
203
+ ### Response:
204
+
205
+ '''
206
+
207
+ print("\n\n*** Generate:")
208
+
209
+ tokens = tokenizer(
210
+ prompt_template,
211
+ return_tensors='pt'
212
+ ).input_ids.cuda()
213
+
214
+ # Generate output
215
+ generation_output = model.generate(
216
+ tokens,
217
+ do_sample=True,
218
+ temperature=0.7,
219
+ top_p=0.95,
220
+ top_k=40,
221
+ max_new_tokens=512
222
+ )
223
+
224
+ print("Output: ", tokenizer.decode(generation_output[0]))
225
+
226
+ """
227
+ # Inference should be possible with transformers pipeline as well in future
228
+ # But currently this is not yet supported by AutoAWQ (correct as of September 25th 2023)
229
+ from transformers import pipeline
230
+
231
+ print("*** Pipeline:")
232
+ pipe = pipeline(
233
+ "text-generation",
234
+ model=model,
235
+ tokenizer=tokenizer,
236
+ max_new_tokens=512,
237
+ do_sample=True,
238
+ temperature=0.7,
239
+ top_p=0.95,
240
+ top_k=40,
241
+ repetition_penalty=1.1
242
+ )
243
+
244
+ print(pipe(prompt_template)[0]['generated_text'])
245
+ """
246
+ ```
247
+ <!-- README_AWQ.md-use-from-python end -->
248
+
249
+ <!-- README_AWQ.md-compatibility start -->
250
+ ## Compatibility
251
+
252
+ The files provided are tested to work with:
253
+
254
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ)
255
+ - [vLLM](https://github.com/vllm-project/vllm)
256
+ - [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
257
+
258
+ TGI merged AWQ support on September 25th, 2023: [TGI PR #1054](https://github.com/huggingface/text-generation-inference/pull/1054). Use the `:latest` Docker container until the next TGI release is made.
259
+
260
+ <!-- README_AWQ.md-compatibility end -->
261
+
262
+ <!-- footer start -->
263
+ <!-- 200823 -->
264
+ ## Discord
265
+
266
+ For further support, and discussions on these models and AI in general, join us at:
267
+
268
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
269
+
270
+ ## Thanks, and how to contribute
271
+
272
+ Thanks to the [chirper.ai](https://chirper.ai) team!
273
+
274
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
275
+
276
+ 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.
277
+
278
+ 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.
279
+
280
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
281
+
282
+ * Patreon: https://patreon.com/TheBlokeAI
283
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
284
+
285
+ **Special thanks to**: Aemon Algiz.
286
+
287
+ **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
288
+
289
+
290
+ Thank you to all my generous patrons and donaters!
291
+
292
+ And thank you again to a16z for their generous grant.
293
+
294
+ <!-- footer end -->
295
+
296
+ # Original model card: Yanzhao Zheng's Pandalyst 13B V1.0
297
+
298
+
299
+
300
+ ## Pandalyst: A large language model for mastering data analysis using pandas
301
+
302
+ <p align="center">
303
+ <img src="https://raw.githubusercontent.com/zhengyanzhao1997/Pandalyst/master/imgs/pandalyst.png" width="300"/>
304
+ </p>
305
+
306
+ <p align="center">
307
+ 🐱 <a href="https://github.com/zhengyanzhao1997/Pandalyst" target="_blank">Github Repo</a> <br>
308
+ </p>
309
+
310
+ **What is Pandalyst**
311
+ - Pandalyst is a general large language model specifically trained to process and analyze data using the pandas library.
312
+
313
+ **How is Pandalyst**
314
+ - Pandalyst has strong generalization capabilities for data tables in different fields and different data analysis needs.
315
+
316
+ **Why is Pandalyst**
317
+ - Pandalyst is open source and free to use, and its small parameter size (7B/13B) allows us to easily deploy it on local PC.
318
+ - Pandalyst can handle complex data tables (multiple columns and multiple rows), allowing us to enter enough context to describe our table in detail.
319
+ - Pandalyst has very competitive performance, significantly outperforming models of the same size and even outperforming some of the strongest closed-source models.
320
+
321
+
322
+ ## News
323
+ - 🔥[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 **Pandalyst-13B-V1.0**, **WizardCoder-Python-13B-V1.0** and **ChatGPT-3.5 (2023/06/13)**.
324
+ - 🔥[2023/09/28] We released **Pandalyst-13B-V1.0** , which was trained on **WizardCoder-Python-13B-V1.0** and achieves the **70.7 exec@1** in our **PandaTest_V1.0** and surpasses **WizardCoder-Python-13B-V1.0** and **ChatGPT-3.5 (2023/06/13)**.
325
+
326
+
327
+ | Model | Checkpoint | Base Model | PandaTest_V1.0 | EASY | HARD | License |
328
+ |--------------------|---------------------------------------------------------------------------------------------|------------|----------------|---------------------|---------------------| ----- |
329
+ | Pandalyst-13B-V1.0 | 🤗 <a href="https://huggingface.co/pipizhao/Pandalyst_13B_V1.0" target="_blank">HF Link</a> | WizardCoder-Python-13B-V1.0 | 70.7 | 75.6 | 65.9 | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
330
+ | Pandalyst-7B-V1.1 | 🤗 <a href="https://huggingface.co/pipizhao/Pandalyst-7B-V1.1" target="_blank">HF Link</a> | CodeLlama-7b-Python | 76.1 | 85.2 | 67.0 | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
331
+
332
+
333
+ ## Usage and Human evaluation
334
+ Please refer to <a href="https://github.com/zhengyanzhao1997/Pandalyst" target="_blank">Github</a>.