TheBloke commited on
Commit
39e7328
1 Parent(s): b5d274c

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +413 -0
README.md ADDED
@@ -0,0 +1,413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: TriadParty/deepmoney-34b-200k-chat-evaluator
3
+ datasets:
4
+ - TriadParty/deepmoney-sft
5
+ inference: false
6
+ language:
7
+ - zh
8
+ - en
9
+ license: apache-2.0
10
+ model_creator: triad party
11
+ model_name: Deepmoney 34B 200K Chat Evaluator
12
+ model_type: yi
13
+ prompt_template: '{system_message}
14
+
15
+
16
+ ### Instruction:
17
+
18
+ {prompt}
19
+
20
+
21
+ ### Response:
22
+
23
+ '
24
+ quantized_by: TheBloke
25
+ tags:
26
+ - finance
27
+ ---
28
+ <!-- markdownlint-disable MD041 -->
29
+
30
+ <!-- header start -->
31
+ <!-- 200823 -->
32
+ <div style="width: auto; margin-left: auto; margin-right: auto">
33
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
34
+ </div>
35
+ <div style="display: flex; justify-content: space-between; width: 100%;">
36
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
37
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
38
+ </div>
39
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
40
+ <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>
41
+ </div>
42
+ </div>
43
+ <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>
44
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
45
+ <!-- header end -->
46
+
47
+ # Deepmoney 34B 200K Chat Evaluator - AWQ
48
+ - Model creator: [triad party](https://huggingface.co/TriadParty)
49
+ - Original model: [Deepmoney 34B 200K Chat Evaluator](https://huggingface.co/TriadParty/deepmoney-34b-200k-chat-evaluator)
50
+
51
+ <!-- description start -->
52
+ ## Description
53
+
54
+ This repo contains AWQ model files for [triad party's Deepmoney 34B 200K Chat Evaluator](https://huggingface.co/TriadParty/deepmoney-34b-200k-chat-evaluator).
55
+
56
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
57
+
58
+
59
+ ### About AWQ
60
+
61
+ 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.
62
+
63
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
64
+
65
+ It is supported by:
66
+
67
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
68
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
69
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
70
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
71
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
72
+
73
+ <!-- description end -->
74
+ <!-- repositories-available start -->
75
+ ## Repositories available
76
+
77
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/deepmoney-34b-200k-chat-evaluator-AWQ)
78
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/deepmoney-34b-200k-chat-evaluator-GPTQ)
79
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/deepmoney-34b-200k-chat-evaluator-GGUF)
80
+ * [triad party's original LoRA adapter, which can be merged on to the base model.](https://huggingface.co/TriadParty/deepmoney-34b-200k-chat-evaluator)
81
+ <!-- repositories-available end -->
82
+
83
+ <!-- prompt-template start -->
84
+ ## Prompt template: Alpaca-System
85
+
86
+ ```
87
+ {system_message}
88
+
89
+ ### Instruction:
90
+ {prompt}
91
+
92
+ ### Response:
93
+
94
+ ```
95
+
96
+ <!-- prompt-template end -->
97
+
98
+
99
+ <!-- README_AWQ.md-provided-files start -->
100
+ ## Provided files, and AWQ parameters
101
+
102
+ I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
103
+
104
+ Models are released as sharded safetensors files.
105
+
106
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
107
+ | ------ | ---- | -- | ----------- | ------- | ---- |
108
+ | [main](https://huggingface.co/TheBloke/deepmoney-34b-200k-chat-evaluator-AWQ/tree/main) | 4 | 128 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 2048 | 19.23 GB
109
+
110
+ <!-- README_AWQ.md-provided-files end -->
111
+
112
+ <!-- README_AWQ.md-text-generation-webui start -->
113
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
114
+
115
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
116
+
117
+ 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.
118
+
119
+ 1. Click the **Model tab**.
120
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/deepmoney-34b-200k-chat-evaluator-AWQ`.
121
+ 3. Click **Download**.
122
+ 4. The model will start downloading. Once it's finished it will say "Done".
123
+ 5. In the top left, click the refresh icon next to **Model**.
124
+ 6. In the **Model** dropdown, choose the model you just downloaded: `deepmoney-34b-200k-chat-evaluator-AWQ`
125
+ 7. Select **Loader: AutoAWQ**.
126
+ 8. Click Load, and the model will load and is now ready for use.
127
+ 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.
128
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
129
+ <!-- README_AWQ.md-text-generation-webui end -->
130
+
131
+ <!-- README_AWQ.md-use-from-vllm start -->
132
+ ## Multi-user inference server: vLLM
133
+
134
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
135
+
136
+ - Please ensure you are using vLLM version 0.2 or later.
137
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
138
+
139
+ For example:
140
+
141
+ ```shell
142
+ python3 -m vllm.entrypoints.api_server --model TheBloke/deepmoney-34b-200k-chat-evaluator-AWQ --quantization awq --dtype auto
143
+ ```
144
+
145
+ - When using vLLM from Python code, again set `quantization=awq`.
146
+
147
+ For example:
148
+
149
+ ```python
150
+ from vllm import LLM, SamplingParams
151
+
152
+ prompts = [
153
+ "Tell me about AI",
154
+ "Write a story about llamas",
155
+ "What is 291 - 150?",
156
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
157
+ ]
158
+ prompt_template=f'''{system_message}
159
+
160
+ ### Instruction:
161
+ {prompt}
162
+
163
+ ### Response:
164
+ '''
165
+
166
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
167
+
168
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
169
+
170
+ llm = LLM(model="TheBloke/deepmoney-34b-200k-chat-evaluator-AWQ", quantization="awq", dtype="auto")
171
+
172
+ outputs = llm.generate(prompts, sampling_params)
173
+
174
+ # Print the outputs.
175
+ for output in outputs:
176
+ prompt = output.prompt
177
+ generated_text = output.outputs[0].text
178
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
179
+ ```
180
+ <!-- README_AWQ.md-use-from-vllm start -->
181
+
182
+ <!-- README_AWQ.md-use-from-tgi start -->
183
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
184
+
185
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
186
+
187
+ Example Docker parameters:
188
+
189
+ ```shell
190
+ --model-id TheBloke/deepmoney-34b-200k-chat-evaluator-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
191
+ ```
192
+
193
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
194
+
195
+ ```shell
196
+ pip3 install huggingface-hub
197
+ ```
198
+
199
+ ```python
200
+ from huggingface_hub import InferenceClient
201
+
202
+ endpoint_url = "https://your-endpoint-url-here"
203
+
204
+ prompt = "Tell me about AI"
205
+ prompt_template=f'''{system_message}
206
+
207
+ ### Instruction:
208
+ {prompt}
209
+
210
+ ### Response:
211
+ '''
212
+
213
+ client = InferenceClient(endpoint_url)
214
+ response = client.text_generation(prompt,
215
+ max_new_tokens=128,
216
+ do_sample=True,
217
+ temperature=0.7,
218
+ top_p=0.95,
219
+ top_k=40,
220
+ repetition_penalty=1.1)
221
+
222
+ print(f"Model output: ", response)
223
+ ```
224
+ <!-- README_AWQ.md-use-from-tgi end -->
225
+
226
+ <!-- README_AWQ.md-use-from-python start -->
227
+ ## Inference from Python code using Transformers
228
+
229
+ ### Install the necessary packages
230
+
231
+ - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
232
+ - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
233
+
234
+ ```shell
235
+ pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
236
+ ```
237
+
238
+ Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
239
+
240
+ If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
241
+
242
+ ```shell
243
+ pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
244
+ ```
245
+
246
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
247
+
248
+ ```shell
249
+ pip3 uninstall -y autoawq
250
+ git clone https://github.com/casper-hansen/AutoAWQ
251
+ cd AutoAWQ
252
+ pip3 install .
253
+ ```
254
+
255
+ ### Transformers example code (requires Transformers 4.35.0 and later)
256
+
257
+ ```python
258
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
259
+
260
+ model_name_or_path = "TheBloke/deepmoney-34b-200k-chat-evaluator-AWQ"
261
+
262
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
263
+ model = AutoModelForCausalLM.from_pretrained(
264
+ model_name_or_path,
265
+ low_cpu_mem_usage=True,
266
+ device_map="cuda:0"
267
+ )
268
+
269
+ # Using the text streamer to stream output one token at a time
270
+ streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
271
+
272
+ prompt = "Tell me about AI"
273
+ prompt_template=f'''{system_message}
274
+
275
+ ### Instruction:
276
+ {prompt}
277
+
278
+ ### Response:
279
+ '''
280
+
281
+ # Convert prompt to tokens
282
+ tokens = tokenizer(
283
+ prompt_template,
284
+ return_tensors='pt'
285
+ ).input_ids.cuda()
286
+
287
+ generation_params = {
288
+ "do_sample": True,
289
+ "temperature": 0.7,
290
+ "top_p": 0.95,
291
+ "top_k": 40,
292
+ "max_new_tokens": 512,
293
+ "repetition_penalty": 1.1
294
+ }
295
+
296
+ # Generate streamed output, visible one token at a time
297
+ generation_output = model.generate(
298
+ tokens,
299
+ streamer=streamer,
300
+ **generation_params
301
+ )
302
+
303
+ # Generation without a streamer, which will include the prompt in the output
304
+ generation_output = model.generate(
305
+ tokens,
306
+ **generation_params
307
+ )
308
+
309
+ # Get the tokens from the output, decode them, print them
310
+ token_output = generation_output[0]
311
+ text_output = tokenizer.decode(token_output)
312
+ print("model.generate output: ", text_output)
313
+
314
+ # Inference is also possible via Transformers' pipeline
315
+ from transformers import pipeline
316
+
317
+ pipe = pipeline(
318
+ "text-generation",
319
+ model=model,
320
+ tokenizer=tokenizer,
321
+ **generation_params
322
+ )
323
+
324
+ pipe_output = pipe(prompt_template)[0]['generated_text']
325
+ print("pipeline output: ", pipe_output)
326
+
327
+ ```
328
+ <!-- README_AWQ.md-use-from-python end -->
329
+
330
+ <!-- README_AWQ.md-compatibility start -->
331
+ ## Compatibility
332
+
333
+ The files provided are tested to work with:
334
+
335
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
336
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
337
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
338
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
339
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
340
+
341
+ <!-- README_AWQ.md-compatibility end -->
342
+
343
+ <!-- footer start -->
344
+ <!-- 200823 -->
345
+ ## Discord
346
+
347
+ For further support, and discussions on these models and AI in general, join us at:
348
+
349
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
350
+
351
+ ## Thanks, and how to contribute
352
+
353
+ Thanks to the [chirper.ai](https://chirper.ai) team!
354
+
355
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
356
+
357
+ 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.
358
+
359
+ 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.
360
+
361
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
362
+
363
+ * Patreon: https://patreon.com/TheBlokeAI
364
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
365
+
366
+ **Special thanks to**: Aemon Algiz.
367
+
368
+ **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
369
+
370
+
371
+ Thank you to all my generous patrons and donaters!
372
+
373
+ And thank you again to a16z for their generous grant.
374
+
375
+ <!-- footer end -->
376
+
377
+ # Original model card: triad party's Deepmoney 34B 200K Chat Evaluator
378
+
379
+ # **Deepmoney**
380
+
381
+ Introducing **Greed** in the Seven Deadly Sins series of models.
382
+
383
+ ### 1. Usage
384
+
385
+ This model is based on the analyst model trained on deepmoney-34b. Using alpaca format, the following is a demonstration:
386
+
387
+ ```
388
+ You are a senior investment expert. Please make your research and judgment on the following targets.
389
+
390
+ ### Instruction:
391
+ Regeneron CEO Leonard Schleifer detailed the biotech company's newest ventures in the pharmaceutical industry.
392
+ Based on the news above, what are some challenges that the pharmaceutical industry may face, and how can companies effectively address these challenges to ensure continued growth?
393
+
394
+ ### Response:
395
+
396
+ ```
397
+
398
+ I will share the sft dataset later so you can train in other formats if you are interested:)
399
+
400
+ ### 2. About the data
401
+
402
+ An approach similar to https://www.reddit.com/r/LocalLLaMA/comments/18xz9it/augmentoolkit_easily_generate_quality_multiturn/ was adopted. First, split a research report into several parts according to chapters, use them as context, and let goliath0-120b ask questions about the contents of the research report. Then use Nous-Capybara-34B to answer the questions and corresponding research report fragments. The reason why the questioner and the respondent are separated is to prevent the model from "asking and answering itself" and not answering according to the research report but entraining its own output. In this way, the knowledge and methods in the research report can be extracted. In addition, I used gpt4 to extract the underlying assets (if any) from the research report and placed them in the Instruction. In my envisioned use, I want to give the target in the Instruction and the news sources crawled by the crawler in real time, combined with an agent that automatically asks questions, so that the model can make inferences.
403
+ ### 3. Examples
404
+
405
+ ![image.png](https://cdn-uploads.huggingface.co/production/uploads/630c1adea20a5367812196f6/7k5PAnXpxwMytBAirFOoR.png)
406
+
407
+ ![image.png](https://cdn-uploads.huggingface.co/production/uploads/630c1adea20a5367812196f6/wsPHaOfzmn6UYFjLCs0GO.png)
408
+
409
+ ![image.png](https://cdn-uploads.huggingface.co/production/uploads/630c1adea20a5367812196f6/zqY95BasoUZlw7k8Fmq67.png)
410
+
411
+ ![image.png](https://cdn-uploads.huggingface.co/production/uploads/630c1adea20a5367812196f6/pJ3k2fndkIHU6amHBq2Zx.png)
412
+
413
+ ![image.png](https://cdn-uploads.huggingface.co/production/uploads/630c1adea20a5367812196f6/awhVJZZDZpWeXNBklUqYs.png)