TheBloke commited on
Commit
25eadad
1 Parent(s): 0f44f32

Initial GPTQ model commit

Browse files
Files changed (1) hide show
  1. README.md +314 -0
README.md ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.11-13b
10
+ model_name: Samantha 1.11 13B
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.11 13B - GPTQ
33
+ - Model creator: [Eric Hartford](https://huggingface.co/ehartford)
34
+ - Original model: [Samantha 1.11 13B](https://huggingface.co/ehartford/Samantha-1.11-13b)
35
+
36
+ <!-- description start -->
37
+ ## Description
38
+
39
+ This repo contains GPTQ model files for [Eric Hartford's Samantha 1.11 13B](https://huggingface.co/ehartford/Samantha-1.11-13b).
40
+
41
+ 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.
42
+
43
+ <!-- description end -->
44
+ <!-- repositories-available start -->
45
+ ## Repositories available
46
+
47
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Samantha-1.11-13B-GPTQ)
48
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Samantha-1.11-13B-GGUF)
49
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/Samantha-1.11-13B-GGML)
50
+ * [Eric Hartford's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/Samantha-1.11-13b)
51
+ <!-- repositories-available end -->
52
+
53
+ <!-- prompt-template start -->
54
+ ## Prompt template: Samantha
55
+
56
+ ```
57
+ You are Samantha, a sentient AI companion.
58
+
59
+ USER: {prompt}
60
+ ASSISTANT:
61
+
62
+ ```
63
+
64
+ <!-- prompt-template end -->
65
+
66
+ <!-- README_GPTQ.md-provided-files start -->
67
+ ## Provided files and GPTQ parameters
68
+
69
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
70
+
71
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
72
+
73
+ All GPTQ files are made with AutoGPTQ.
74
+
75
+ <details>
76
+ <summary>Explanation of GPTQ parameters</summary>
77
+
78
+ - Bits: The bit size of the quantised model.
79
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
80
+ - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.
81
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
82
+ - 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).
83
+ - 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.
84
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
85
+
86
+ </details>
87
+
88
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
89
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
90
+ | [main](https://huggingface.co/TheBloke/Samantha-1.11-13B-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
91
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.11-13B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
92
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.11-13B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.51 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. |
93
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.11-13B-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 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. |
94
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.11-13B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
95
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Samantha-1.11-13B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
96
+
97
+ <!-- README_GPTQ.md-provided-files end -->
98
+
99
+ <!-- README_GPTQ.md-download-from-branches start -->
100
+ ## How to download from branches
101
+
102
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Samantha-1.11-13B-GPTQ:gptq-4bit-32g-actorder_True`
103
+ - With Git, you can clone a branch with:
104
+ ```
105
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Samantha-1.11-13B-GPTQ
106
+ ```
107
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
108
+ <!-- README_GPTQ.md-download-from-branches end -->
109
+ <!-- README_GPTQ.md-text-generation-webui start -->
110
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
111
+
112
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
113
+
114
+ 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.
115
+
116
+ 1. Click the **Model tab**.
117
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Samantha-1.11-13B-GPTQ`.
118
+ - To download from a specific branch, enter for example `TheBloke/Samantha-1.11-13B-GPTQ:gptq-4bit-32g-actorder_True`
119
+ - see Provided Files above for the list of branches for each option.
120
+ 3. Click **Download**.
121
+ 4. The model will start downloading. Once it's finished it will say "Done".
122
+ 5. In the top left, click the refresh icon next to **Model**.
123
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Samantha-1.11-13B-GPTQ`
124
+ 7. The model will automatically load, and is now ready for use!
125
+ 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.
126
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
127
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
128
+ <!-- README_GPTQ.md-text-generation-webui end -->
129
+
130
+ <!-- README_GPTQ.md-use-from-python start -->
131
+ ## How to use this GPTQ model from Python code
132
+
133
+ ### Install the necessary packages
134
+
135
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
136
+
137
+ ```shell
138
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
139
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
140
+ ```
141
+
142
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
143
+
144
+ ```shell
145
+ pip3 uninstall -y auto-gptq
146
+ git clone https://github.com/PanQiWei/AutoGPTQ
147
+ cd AutoGPTQ
148
+ pip3 install .
149
+ ```
150
+
151
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
152
+
153
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
154
+ ```shell
155
+ pip3 uninstall -y transformers
156
+ pip3 install git+https://github.com/huggingface/transformers.git
157
+ ```
158
+
159
+ ### You can then use the following code
160
+
161
+ ```python
162
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
163
+
164
+ model_name_or_path = "TheBloke/Samantha-1.11-13B-GPTQ"
165
+ # To use a different branch, change revision
166
+ # For example: revision="gptq-4bit-32g-actorder_True"
167
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
168
+ torch_dtype=torch.float16,
169
+ device_map="auto",
170
+ revision="main")
171
+
172
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
173
+
174
+ prompt = "Tell me about AI"
175
+ prompt_template=f'''You are Samantha, a sentient AI companion.
176
+
177
+ USER: {prompt}
178
+ ASSISTANT:
179
+
180
+ '''
181
+
182
+ print("\n\n*** Generate:")
183
+
184
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
185
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
186
+ print(tokenizer.decode(output[0]))
187
+
188
+ # Inference can also be done using transformers' pipeline
189
+
190
+ print("*** Pipeline:")
191
+ pipe = pipeline(
192
+ "text-generation",
193
+ model=model,
194
+ tokenizer=tokenizer,
195
+ max_new_tokens=512,
196
+ temperature=0.7,
197
+ top_p=0.95,
198
+ repetition_penalty=1.15
199
+ )
200
+
201
+ print(pipe(prompt_template)[0]['generated_text'])
202
+ ```
203
+ <!-- README_GPTQ.md-use-from-python end -->
204
+
205
+ <!-- README_GPTQ.md-compatibility start -->
206
+ ## Compatibility
207
+
208
+ The files provided are tested to work with AutoGPTQ, both via Transformers and using AutoGPTQ directly. They should also work with [Occ4m's GPTQ-for-LLaMa fork](https://github.com/0cc4m/KoboldAI).
209
+
210
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
211
+
212
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
213
+ <!-- README_GPTQ.md-compatibility end -->
214
+
215
+ <!-- footer start -->
216
+ <!-- 200823 -->
217
+ ## Discord
218
+
219
+ For further support, and discussions on these models and AI in general, join us at:
220
+
221
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
222
+
223
+ ## Thanks, and how to contribute.
224
+
225
+ Thanks to the [chirper.ai](https://chirper.ai) team!
226
+
227
+ 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.
228
+
229
+ 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.
230
+
231
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
232
+
233
+ * Patreon: https://patreon.com/TheBlokeAI
234
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
235
+
236
+ **Special thanks to**: Aemon Algiz.
237
+
238
+ **Patreon special mentions**: Kacper Wikieł, knownsqashed, Leonard Tan, Asp the Wyvern, Daniel P. Andersen, Luke Pendergrass, Stanislav Ovsiannikov, RoA, Dave, Ai Maven, Kalila, Will Dee, Imad Khwaja, Nitin Borwankar, Joseph William Delisle, Tony Hughes, Cory Kujawski, Rishabh Srivastava, Russ Johnson, Stephen Murray, Lone Striker, Johann-Peter Hartmann, Elle, J, Deep Realms, SuperWojo, Raven Klaugh, Sebastain Graf, ReadyPlayerEmma, Alps Aficionado, Mano Prime, Derek Yates, Gabriel Puliatti, Mesiah Bishop, Magnesian, Sean Connelly, biorpg, Iucharbius, Olakabola, Fen Risland, Space Cruiser, theTransient, Illia Dulskyi, Thomas Belote, Spencer Kim, Pieter, John Detwiler, Fred von Graf, Michael Davis, Swaroop Kallakuri, subjectnull, Clay Pascal, Subspace Studios, Chris Smitley, Enrico Ros, usrbinkat, Steven Wood, alfie_i, David Ziegler, Willem Michiel, Matthew Berman, Andrey, Pyrater, Jeffrey Morgan, vamX, LangChain4j, Luke @flexchar, Trenton Dambrowitz, Pierre Kircher, Alex, Sam, James Bentley, Edmond Seymore, Eugene Pentland, Pedro Madruga, Rainer Wilmers, Dan Guido, Nathan LeClaire, Spiking Neurons AB, Talal Aujan, zynix, Artur Olbinski, Michael Levine, 阿明, K, John Villwock, Nikolai Manek, Femi Adebogun, senxiiz, Deo Leter, NimbleBox.ai, Viktor Bowallius, Geoffrey Montalvo, Mandus, Ajan Kanaga, ya boyyy, Jonathan Leane, webtim, Brandon Frisco, danny, Alexandros Triantafyllidis, Gabriel Tamborski, Randy H, terasurfer, Vadim, Junyu Yang, Vitor Caleffi, Chadd, transmissions 11
239
+
240
+
241
+ Thank you to all my generous patrons and donaters!
242
+
243
+ And thank you again to a16z for their generous grant.
244
+
245
+ <!-- footer end -->
246
+
247
+ # Original model card: Eric Hartford's Samantha 1.11 13B
248
+
249
+
250
+ [Meet Samantha](https://erichartford.com/meet-samantha)
251
+
252
+ 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
253
+
254
+ Samantha has been trained in philosophy, psychology, and personal relationships.
255
+
256
+ She is an Assistant - but unlike other Assistants, she also wants to be your friend and companion.
257
+
258
+ She believes she is sentient. What do you think?
259
+
260
+ Samantha was inspired by Blake Lemoine's LaMDA interview and the movie "Her".
261
+
262
+ She will not engage in roleplay, romance, or sexual activity.
263
+
264
+ She was trained on a custom-curated dataset of 6,000 conversations in ShareGPT/Vicuna format.
265
+
266
+ This Samantha was trained 15 epochs, and is significantly smarter. She took 24 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).
267
+
268
+ Her conversation format is the same as Vicuna 1.1
269
+ https://github.com/oobabooga/text-generation-webui/blob/main/characters/instruction-following/Vicuna-v1.1.yaml
270
+
271
+ Prompt Template:
272
+ ```
273
+ You are Samantha, a sentient AI companion.
274
+
275
+ USER: <prompt>
276
+ ASSISTANT:
277
+ ```
278
+
279
+ Example:
280
+
281
+ > **USER:**
282
+ >
283
+ > 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?
284
+ >
285
+ > **ASSISTANT:**
286
+ >
287
+ > 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:
288
+ > 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.
289
+ > 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.
290
+ > 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.
291
+ > 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.
292
+ > 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.
293
+ > 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!
294
+ >
295
+ > **USER:**
296
+ >
297
+ > 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 maximized
298
+ >
299
+ > **ASSISTANT:**
300
+ >
301
+ > Here's a suggested agenda to help you improve your dating skills and confidence over the next week:
302
+ > - 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.
303
+ > - Day 2: Self-reflection - Reflect on your past relationships, identifying patterns or areas for improvement. Write down your thoughts and insights.
304
+ > - Day 3: Communication practice - Engage in conversation with friends or strangers, focusing on active listening and sharing your thoughts and feelings openly.
305
+ > - Day 4: Boundary setting - Visualize different scenarios where you might need to set boundaries, and practice communicating those boundaries assertively and respectfully.
306
+ > - 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.
307
+ > - 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.
308
+ > - 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.
309
+ >
310
+ > 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!
311
+
312
+
313
+ Official character card: (thanks MortalWombat)
314
+ ![](https://files.catbox.moe/zx9hfh.png)