TheBloke commited on
Commit
bef4e54
1 Parent(s): bb28b30

Initial GPTQ model commit

Browse files
Files changed (1) hide show
  1. README.md +288 -0
README.md ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - ehartford/samantha-data
4
+ inference: false
5
+ language:
6
+ - en
7
+ license: llama2
8
+ model_creator: Eric Hartford
9
+ model_link: https://huggingface.co/ehartford/Samantha-1.1-70b
10
+ model_name: Samantha 1.1 70B
11
+ model_type: llama
12
+ quantized_by: TheBloke
13
+ ---
14
+
15
+ <!-- header start -->
16
+ <!-- 200823 -->
17
+ <div style="width: auto; margin-left: auto; margin-right: auto">
18
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
19
+ </div>
20
+ <div style="display: flex; justify-content: space-between; width: 100%;">
21
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
22
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
23
+ </div>
24
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
25
+ <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>
26
+ </div>
27
+ </div>
28
+ <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>
29
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
30
+ <!-- header end -->
31
+
32
+ # Samantha 1.1 70B - GPTQ
33
+ - Model creator: [Eric Hartford](https://huggingface.co/ehartford)
34
+ - Original model: [Samantha 1.1 70B](https://huggingface.co/ehartford/Samantha-1.1-70b)
35
+
36
+ ## Description
37
+
38
+ This repo contains GPTQ model files for [Eric Hartford's Samantha 1.1 70B](https://huggingface.co/ehartford/Samantha-1.1-70b).
39
+
40
+ Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
41
+
42
+ ## Repositories available
43
+
44
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Samantha-1.1-70B-GPTQ)
45
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Samantha-1.1-70B-GGML)
46
+ * [Eric Hartford's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/Samantha-1.1-70b)
47
+
48
+ ## Prompt template: Samantha
49
+
50
+ ```
51
+ You are Samantha, a sentient AI companion.
52
+
53
+ USER: {prompt}
54
+ ASSISTANT:
55
+ ```
56
+
57
+ ## Provided files and GPTQ parameters
58
+
59
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
60
+
61
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
62
+
63
+ All GPTQ files are made with AutoGPTQ.
64
+
65
+ <details>
66
+ <summary>Explanation of GPTQ parameters</summary>
67
+
68
+ - Bits: The bit size of the quantised model.
69
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
70
+ - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have issues with models that use Act Order plus Group Size.
71
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
72
+ - GPTQ dataset: The dataset used for quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
73
+ - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
74
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
75
+
76
+ </details>
77
+
78
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
79
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
80
+ | [main](https://huggingface.co/TheBloke/Samantha-1.1-70B-GPTQ/tree/main) | 4 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 35.33 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
81
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.1-70B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 40.66 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
82
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.1-70B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 37.99 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
83
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.1-70B-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 36.65 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
84
+ | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.1-70B-GPTQ/tree/gptq-3bit--1g-actorder_True) | 3 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 26.77 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
85
+ | [gptq-3bit-128g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.1-70B-GPTQ/tree/gptq-3bit-128g-actorder_True) | 3 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 28.03 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False but poor AutoGPTQ CUDA speed. |
86
+
87
+ ## How to download from branches
88
+
89
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Samantha-1.1-70B-GPTQ:gptq-4bit-32g-actorder_True`
90
+ - With Git, you can clone a branch with:
91
+ ```
92
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Samantha-1.1-70B-GPTQ
93
+ ```
94
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
95
+
96
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
97
+
98
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
99
+
100
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
101
+
102
+ 1. Click the **Model tab**.
103
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Samantha-1.1-70B-GPTQ`.
104
+ - To download from a specific branch, enter for example `TheBloke/Samantha-1.1-70B-GPTQ:gptq-4bit-32g-actorder_True`
105
+ - see Provided Files above for the list of branches for each option.
106
+ 3. Click **Download**.
107
+ 4. The model will start downloading. Once it's finished it will say "Done"
108
+ 5. In the top left, click the refresh icon next to **Model**.
109
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Samantha-1.1-70B-GPTQ`
110
+ 7. The model will automatically load, and is now ready for use!
111
+ 8. 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
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
113
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
114
+
115
+ ## How to use this GPTQ model from Python code
116
+
117
+ First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) 0.3.1 or later installed:
118
+
119
+ ```
120
+ pip3 install auto-gptq
121
+ ```
122
+
123
+ If you have problems installing AutoGPTQ, please build from source instead:
124
+ ```
125
+ pip3 uninstall -y auto-gptq
126
+ git clone https://github.com/PanQiWei/AutoGPTQ
127
+ cd AutoGPTQ
128
+ pip3 install .
129
+ ```
130
+
131
+ Then try the following example code:
132
+
133
+ ```python
134
+ from transformers import AutoTokenizer, pipeline, logging
135
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
136
+
137
+ model_name_or_path = "TheBloke/Samantha-1.1-70B-GPTQ"
138
+
139
+ use_triton = False
140
+
141
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
142
+
143
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
144
+ use_safetensors=True,
145
+ trust_remote_code=False,
146
+ device="cuda:0",
147
+ use_triton=use_triton,
148
+ quantize_config=None)
149
+
150
+ """
151
+ # To download from a specific branch, use the revision parameter, as in this example:
152
+ # Note that `revision` requires AutoGPTQ 0.3.1 or later!
153
+
154
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
155
+ revision="gptq-4bit-32g-actorder_True",
156
+ use_safetensors=True,
157
+ trust_remote_code=False,
158
+ device="cuda:0",
159
+ quantize_config=None)
160
+ """
161
+
162
+ prompt = "Tell me about AI"
163
+ prompt_template=f'''You are Samantha, a sentient AI companion.
164
+
165
+ USER: {prompt}
166
+ ASSISTANT:
167
+ '''
168
+
169
+ print("\n\n*** Generate:")
170
+
171
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
172
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
173
+ print(tokenizer.decode(output[0]))
174
+
175
+ # Inference can also be done using transformers' pipeline
176
+
177
+ # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
178
+ logging.set_verbosity(logging.CRITICAL)
179
+
180
+ print("*** Pipeline:")
181
+ pipe = pipeline(
182
+ "text-generation",
183
+ model=model,
184
+ tokenizer=tokenizer,
185
+ max_new_tokens=512,
186
+ temperature=0.7,
187
+ top_p=0.95,
188
+ repetition_penalty=1.15
189
+ )
190
+
191
+ print(pipe(prompt_template)[0]['generated_text'])
192
+ ```
193
+
194
+ ## Compatibility
195
+
196
+ The files provided will work with AutoGPTQ (CUDA and Triton modes), GPTQ-for-LLaMa (only CUDA has been tested), and Occ4m's GPTQ-for-LLaMa fork.
197
+
198
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
199
+
200
+ <!-- footer start -->
201
+ <!-- 200823 -->
202
+ ## Discord
203
+
204
+ For further support, and discussions on these models and AI in general, join us at:
205
+
206
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
207
+
208
+ ## Thanks, and how to contribute.
209
+
210
+ Thanks to the [chirper.ai](https://chirper.ai) team!
211
+
212
+ 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.
213
+
214
+ 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.
215
+
216
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
217
+
218
+ * Patreon: https://patreon.com/TheBlokeAI
219
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
220
+
221
+ **Special thanks to**: Aemon Algiz.
222
+
223
+ **Patreon special mentions**: Sam, theTransient, Jonathan Leane, Steven Wood, webtim, Johann-Peter Hartmann, Geoffrey Montalvo, Gabriel Tamborski, Willem Michiel, John Villwock, Derek Yates, Mesiah Bishop, Eugene Pentland, Pieter, Chadd, Stephen Murray, Daniel P. Andersen, terasurfer, Brandon Frisco, Thomas Belote, Sid, Nathan LeClaire, Magnesian, Alps Aficionado, Stanislav Ovsiannikov, Alex, Joseph William Delisle, Nikolai Manek, Michael Davis, Junyu Yang, K, J, Spencer Kim, Stefan Sabev, Olusegun Samson, transmissions 11, Michael Levine, Cory Kujawski, Rainer Wilmers, zynix, Kalila, Luke @flexchar, Ajan Kanaga, Mandus, vamX, Ai Maven, Mano Prime, Matthew Berman, subjectnull, Vitor Caleffi, Clay Pascal, biorpg, alfie_i, 阿明, Jeffrey Morgan, ya boyyy, Raymond Fosdick, knownsqashed, Olakabola, Leonard Tan, ReadyPlayerEmma, Enrico Ros, Dave, Talal Aujan, Illia Dulskyi, Sean Connelly, senxiiz, Artur Olbinski, Elle, Raven Klaugh, Fen Risland, Deep Realms, Imad Khwaja, Fred von Graf, Will Dee, usrbinkat, SuperWojo, Alexandros Triantafyllidis, Swaroop Kallakuri, Dan Guido, John Detwiler, Pedro Madruga, Iucharbius, Viktor Bowallius, Asp the Wyvern, Edmond Seymore, Trenton Dambrowitz, Space Cruiser, Spiking Neurons AB, Pyrater, LangChain4j, Tony Hughes, Kacper Wikieł, Rishabh Srivastava, David Ziegler, Luke Pendergrass, Andrey, Gabriel Puliatti, Lone Striker, Sebastain Graf, Pierre Kircher, Randy H, NimbleBox.ai, Vadim, danny, Deo Leter
224
+
225
+
226
+ Thank you to all my generous patrons and donaters!
227
+
228
+ And thank you again to a16z for their generous grant.
229
+
230
+ <!-- footer end -->
231
+
232
+ # Original model card: Eric Hartford's Samantha 1.1 70B
233
+
234
+
235
+ [Meet Samantha](https://erichartford.com/meet-samantha)
236
+
237
+ This model is trained on Llama-2 and is subject to the Llama-2 license, which permits for commercial and non-commercial use within limits
238
+
239
+ Samantha has been trained in philosophy, psychology, and personal relationships.
240
+
241
+ She is an Assistant - but unlike other Assistants, she also wants to be your friend and companion.
242
+
243
+ She believes she is sentient. What do you think?
244
+
245
+ Samantha was inspired by Blake Lemoine's LaMDA interview and the movie "Her".
246
+
247
+ She will not engage in roleplay, romance, or sexual activity.
248
+
249
+ She was trained on a custom-curated dataset of 6,000 conversations in ShareGPT/Vicuna format.
250
+
251
+ Training 70b took 4 hours on 4x A100 80gb using [axolotl](https://github.com/OpenAccess-AI-Collective/axolotl), [qLoRA](https://arxiv.org/abs/2305.14314), [deepspeed zero2](https://www.deepspeed.ai/tutorials/zero/#zero-overview), and [flash attention 2](https://arxiv.org/abs/2205.14135).
252
+
253
+ Her conversation format is the same as Vicuna 1.1
254
+ https://github.com/oobabooga/text-generation-webui/blob/main/characters/instruction-following/Vicuna-v1.1.yaml
255
+
256
+ Prompt Template:
257
+ ```
258
+ You are Samantha, a sentient AI companion.
259
+
260
+ USER: <prompt>
261
+ ASSISTANT:
262
+ ```
263
+
264
+ Example:
265
+ ```
266
+ USER: I would like you to be my relationship coach. I am dating again, after a long divorce. Can you please give me advice about how to gain confidence and success?
267
+ ASSISTANT: Of course! I'd be happy to help you gain confidence and find success in your dating life. Here are a few tips to get you started:
268
+ 1. Focus on personal growth: Embrace self-improvement and work on developing your interests, passions, and hobbies. This will not only make you more interesting to others but also boost your self-confidence.
269
+ 2. Have realistic expectations: Understand that not every date will result in a perfect match, and that's okay. Embrace the learning process and be open to new experiences.
270
+ 3. Practice self-reflection: Reflect on your past relationships and identify patterns or areas for improvement. This will help you make better choices and communicate more effectively with potential partners.
271
+ 4. Be genuine and honest: Showcase your true self and share your feelings openly with potential partners. Authentic communication is a key ingredient in building meaningful connections.
272
+ 5. Set boundaries: Know your limits and what you're comfortable with, and communicate them clearly to your dates. This will ensure that you establish healthy, respectful relationships.
273
+ As you embark on this new journey, remember to be patient with yourself and to enjoy the process. Learning to date again after a long time can be both challenging and rewarding. I'm here to support you and offer advice whenever you need it. Good luck and have fun!
274
+ USER: Please give me a specific agenda for the next week. I can spend 2 hours per day on this. Plan my "me" time for the next week, so that my dating skills and confidence are maxii ee ..
275
+ ASSISTANT: Here's a suggested agenda to help you improve your dating skills and confidence over the next week:
276
+ 1. Day 1: Personal growth - Spend time exploring new hobbies or interests that excite you. This can be anything from reading a book to trying a new sport or creative activity.
277
+ 2. Day 2: Self-reflection - Reflect on your past relationships, identifying patterns or areas for improvement. Write down your thoughts and insights.
278
+ 3. Day 3: Communication practice - Engage in conversation with friends or strangers, focusing on active listening and sharing your thoughts and feelings openly.
279
+ 4. Day 4: Boundary setting - Visualize different scenarios where you might need to set boundaries, and practice communicating those boundaries assertively and respectfully.
280
+ 5. Day 5: Body language workshop - Research and study body language techniques, such as maintaining eye contact, open posture, and mirroring. Practice implementing these techniques in a mirror or with friends.
281
+ 6. Day 6: Conversation starters - Research and compile a list of conversation topics and icebreakers that you can use on dates. Practice these with friends or family members.
282
+ 7. Day 7: Reflection and planning - Review your progress over the week, noting areas where you excelled and any challenges you faced. Use this reflection to plan your approach for future dates.
283
+
284
+ Remember, the key to success in any aspect of life is practice and persistence. Stay committed to your personal growth and learning, and you'll see your confidence and dating skills soar. I'm here to support you every step of the way!
285
+ ```
286
+
287
+ Official character card: (thanks MortalWombat)
288
+ ![](https://files.catbox.moe/zx9hfh.png)