TheBloke commited on
Commit
3562a39
1 Parent(s): 48df67b

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +508 -0
README.md ADDED
@@ -0,0 +1,508 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: sethuiyer/Dr_Samantha-7b
3
+ datasets:
4
+ - GBaker/MedQA-USMLE-4-options
5
+ - cognitivecomputations/samantha-data
6
+ - shibing624/medical
7
+ inference: false
8
+ language:
9
+ - en
10
+ - zh
11
+ library_name: transformers
12
+ license: llama2
13
+ model_creator: Sethu Iyer
14
+ model_name: Dr Samantha 7B
15
+ model_type: llama
16
+ pipeline_tag: text-generation
17
+ prompt_template: 'Below is an instruction that describes a task. Write a response
18
+ that appropriately completes the request.
19
+
20
+
21
+ ### Instruction:
22
+
23
+ {prompt}
24
+
25
+
26
+ ### Response:
27
+
28
+ '
29
+ quantized_by: TheBloke
30
+ tags:
31
+ - llama
32
+ - merge
33
+ - medical
34
+ ---
35
+ <!-- markdownlint-disable MD041 -->
36
+
37
+ <!-- header start -->
38
+ <!-- 200823 -->
39
+ <div style="width: auto; margin-left: auto; margin-right: auto">
40
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
41
+ </div>
42
+ <div style="display: flex; justify-content: space-between; width: 100%;">
43
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
44
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
45
+ </div>
46
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
47
+ <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>
48
+ </div>
49
+ </div>
50
+ <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>
51
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
52
+ <!-- header end -->
53
+
54
+ # Dr Samantha 7B - GPTQ
55
+ - Model creator: [Sethu Iyer](https://huggingface.co/sethuiyer)
56
+ - Original model: [Dr Samantha 7B](https://huggingface.co/sethuiyer/Dr_Samantha-7b)
57
+
58
+ <!-- description start -->
59
+ # Description
60
+
61
+ This repo contains GPTQ model files for [Sethu Iyer's Dr Samantha 7B](https://huggingface.co/sethuiyer/Dr_Samantha-7b).
62
+
63
+ 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.
64
+
65
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
66
+
67
+ <!-- description end -->
68
+ <!-- repositories-available start -->
69
+ ## Repositories available
70
+
71
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Dr_Samantha-7B-AWQ)
72
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Dr_Samantha-7B-GPTQ)
73
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF)
74
+ * [Sethu Iyer's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/sethuiyer/Dr_Samantha-7b)
75
+ <!-- repositories-available end -->
76
+
77
+ <!-- prompt-template start -->
78
+ ## Prompt template: Alpaca
79
+
80
+ ```
81
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
82
+
83
+ ### Instruction:
84
+ {prompt}
85
+
86
+ ### Response:
87
+
88
+ ```
89
+
90
+ <!-- prompt-template end -->
91
+
92
+
93
+
94
+ <!-- README_GPTQ.md-compatible clients start -->
95
+ ## Known compatible clients / servers
96
+
97
+ GPTQ models are currently supported on Linux (NVidia/AMD) and Windows (NVidia only). macOS users: please use GGUF models.
98
+
99
+ These GPTQ models are known to work in the following inference servers/webuis.
100
+
101
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
102
+ - [KoboldAI United](https://github.com/henk717/koboldai)
103
+ - [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui)
104
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
105
+
106
+ This may not be a complete list; if you know of others, please let me know!
107
+ <!-- README_GPTQ.md-compatible clients end -->
108
+
109
+ <!-- README_GPTQ.md-provided-files start -->
110
+ ## Provided files, and GPTQ parameters
111
+
112
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
113
+
114
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
115
+
116
+ Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
117
+
118
+ <details>
119
+ <summary>Explanation of GPTQ parameters</summary>
120
+
121
+ - Bits: The bit size of the quantised model.
122
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
123
+ - 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.
124
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
125
+ - GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration 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).
126
+ - 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.
127
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama and Mistral models in 4-bit.
128
+
129
+ </details>
130
+
131
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
132
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
133
+ | [main](https://huggingface.co/TheBloke/Dr_Samantha-7B-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 2048 | 3.90 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
134
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Dr_Samantha-7B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 2048 | 4.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
135
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Dr_Samantha-7B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 2048 | 7.01 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
136
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Dr_Samantha-7B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 2048 | 7.16 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
137
+ | [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/Dr_Samantha-7B-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 2048 | 7.62 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
138
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Dr_Samantha-7B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 2048 | 4.02 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
139
+
140
+ <!-- README_GPTQ.md-provided-files end -->
141
+
142
+ <!-- README_GPTQ.md-download-from-branches start -->
143
+ ## How to download, including from branches
144
+
145
+ ### In text-generation-webui
146
+
147
+ To download from the `main` branch, enter `TheBloke/Dr_Samantha-7B-GPTQ` in the "Download model" box.
148
+
149
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/Dr_Samantha-7B-GPTQ:gptq-4bit-32g-actorder_True`
150
+
151
+ ### From the command line
152
+
153
+ I recommend using the `huggingface-hub` Python library:
154
+
155
+ ```shell
156
+ pip3 install huggingface-hub
157
+ ```
158
+
159
+ To download the `main` branch to a folder called `Dr_Samantha-7B-GPTQ`:
160
+
161
+ ```shell
162
+ mkdir Dr_Samantha-7B-GPTQ
163
+ huggingface-cli download TheBloke/Dr_Samantha-7B-GPTQ --local-dir Dr_Samantha-7B-GPTQ --local-dir-use-symlinks False
164
+ ```
165
+
166
+ To download from a different branch, add the `--revision` parameter:
167
+
168
+ ```shell
169
+ mkdir Dr_Samantha-7B-GPTQ
170
+ huggingface-cli download TheBloke/Dr_Samantha-7B-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir Dr_Samantha-7B-GPTQ --local-dir-use-symlinks False
171
+ ```
172
+
173
+ <details>
174
+ <summary>More advanced huggingface-cli download usage</summary>
175
+
176
+ If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Hugging Face cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model.
177
+
178
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
179
+
180
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
181
+
182
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
183
+
184
+ ```shell
185
+ pip3 install hf_transfer
186
+ ```
187
+
188
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
189
+
190
+ ```shell
191
+ mkdir Dr_Samantha-7B-GPTQ
192
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Dr_Samantha-7B-GPTQ --local-dir Dr_Samantha-7B-GPTQ --local-dir-use-symlinks False
193
+ ```
194
+
195
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
196
+ </details>
197
+
198
+ ### With `git` (**not** recommended)
199
+
200
+ To clone a specific branch with `git`, use a command like this:
201
+
202
+ ```shell
203
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Dr_Samantha-7B-GPTQ
204
+ ```
205
+
206
+ Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.)
207
+
208
+ <!-- README_GPTQ.md-download-from-branches end -->
209
+ <!-- README_GPTQ.md-text-generation-webui start -->
210
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
211
+
212
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
213
+
214
+ 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.
215
+
216
+ 1. Click the **Model tab**.
217
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Dr_Samantha-7B-GPTQ`.
218
+
219
+ - To download from a specific branch, enter for example `TheBloke/Dr_Samantha-7B-GPTQ:gptq-4bit-32g-actorder_True`
220
+ - see Provided Files above for the list of branches for each option.
221
+
222
+ 3. Click **Download**.
223
+ 4. The model will start downloading. Once it's finished it will say "Done".
224
+ 5. In the top left, click the refresh icon next to **Model**.
225
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Dr_Samantha-7B-GPTQ`
226
+ 7. The model will automatically load, and is now ready for use!
227
+ 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.
228
+
229
+ - Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
230
+
231
+ 9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
232
+
233
+ <!-- README_GPTQ.md-text-generation-webui end -->
234
+
235
+ <!-- README_GPTQ.md-use-from-tgi start -->
236
+ ## Serving this model from Text Generation Inference (TGI)
237
+
238
+ It's recommended to use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
239
+
240
+ Example Docker parameters:
241
+
242
+ ```shell
243
+ --model-id TheBloke/Dr_Samantha-7B-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
244
+ ```
245
+
246
+ Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
247
+
248
+ ```shell
249
+ pip3 install huggingface-hub
250
+ ```
251
+
252
+ ```python
253
+ from huggingface_hub import InferenceClient
254
+
255
+ endpoint_url = "https://your-endpoint-url-here"
256
+
257
+ prompt = "Tell me about AI"
258
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
259
+
260
+ ### Instruction:
261
+ {prompt}
262
+
263
+ ### Response:
264
+ '''
265
+
266
+ client = InferenceClient(endpoint_url)
267
+ response = client.text_generation(
268
+ prompt_template,
269
+ max_new_tokens=128,
270
+ do_sample=True,
271
+ temperature=0.7,
272
+ top_p=0.95,
273
+ top_k=40,
274
+ repetition_penalty=1.1
275
+ )
276
+
277
+ print(f"Model output: {response}")
278
+ ```
279
+ <!-- README_GPTQ.md-use-from-tgi end -->
280
+ <!-- README_GPTQ.md-use-from-python start -->
281
+ ## Python code example: inference from this GPTQ model
282
+
283
+ ### Install the necessary packages
284
+
285
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
286
+
287
+ ```shell
288
+ pip3 install --upgrade transformers optimum
289
+ # If using PyTorch 2.1 + CUDA 12.x:
290
+ pip3 install --upgrade auto-gptq
291
+ # or, if using PyTorch 2.1 + CUDA 11.x:
292
+ pip3 install --upgrade auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/
293
+ ```
294
+
295
+ If you are using PyTorch 2.0, you will need to install AutoGPTQ from source. Likewise if you have problems with the pre-built wheels, you should try building from source:
296
+
297
+ ```shell
298
+ pip3 uninstall -y auto-gptq
299
+ git clone https://github.com/PanQiWei/AutoGPTQ
300
+ cd AutoGPTQ
301
+ git checkout v0.5.1
302
+ pip3 install .
303
+ ```
304
+
305
+ ### Example Python code
306
+
307
+ ```python
308
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
309
+
310
+ model_name_or_path = "TheBloke/Dr_Samantha-7B-GPTQ"
311
+ # To use a different branch, change revision
312
+ # For example: revision="gptq-4bit-32g-actorder_True"
313
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
314
+ device_map="auto",
315
+ trust_remote_code=False,
316
+ revision="main")
317
+
318
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
319
+
320
+ prompt = "Write a story about llamas"
321
+ system_message = "You are a story writing assistant"
322
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
323
+
324
+ ### Instruction:
325
+ {prompt}
326
+
327
+ ### Response:
328
+ '''
329
+
330
+ print("\n\n*** Generate:")
331
+
332
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
333
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
334
+ print(tokenizer.decode(output[0]))
335
+
336
+ # Inference can also be done using transformers' pipeline
337
+
338
+ print("*** Pipeline:")
339
+ pipe = pipeline(
340
+ "text-generation",
341
+ model=model,
342
+ tokenizer=tokenizer,
343
+ max_new_tokens=512,
344
+ do_sample=True,
345
+ temperature=0.7,
346
+ top_p=0.95,
347
+ top_k=40,
348
+ repetition_penalty=1.1
349
+ )
350
+
351
+ print(pipe(prompt_template)[0]['generated_text'])
352
+ ```
353
+ <!-- README_GPTQ.md-use-from-python end -->
354
+
355
+ <!-- README_GPTQ.md-compatibility start -->
356
+ ## Compatibility
357
+
358
+ The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly.
359
+
360
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama architecture models (including Mistral, Yi, DeepSeek, SOLAR, etc) in 4-bit. Please see the Provided Files table above for per-file compatibility.
361
+
362
+ For a list of clients/servers, please see "Known compatible clients / servers", above.
363
+ <!-- README_GPTQ.md-compatibility end -->
364
+
365
+ <!-- footer start -->
366
+ <!-- 200823 -->
367
+ ## Discord
368
+
369
+ For further support, and discussions on these models and AI in general, join us at:
370
+
371
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
372
+
373
+ ## Thanks, and how to contribute
374
+
375
+ Thanks to the [chirper.ai](https://chirper.ai) team!
376
+
377
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
378
+
379
+ 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.
380
+
381
+ 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.
382
+
383
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
384
+
385
+ * Patreon: https://patreon.com/TheBlokeAI
386
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
387
+
388
+ **Special thanks to**: Aemon Algiz.
389
+
390
+ **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
391
+
392
+
393
+ Thank you to all my generous patrons and donaters!
394
+
395
+ And thank you again to a16z for their generous grant.
396
+
397
+ <!-- footer end -->
398
+
399
+ # Original model card: Sethu Iyer's Dr Samantha 7B
400
+
401
+
402
+ # Dr. Samantha
403
+
404
+ <p align="center">
405
+ <img src="https://huggingface.co/sethuiyer/Dr_Samantha-7b/resolve/main/dr_samantha_anime_style_reduced_quality.webp" height="256px" alt="SynthIQ">
406
+ </p>
407
+
408
+ ## Overview
409
+
410
+ Dr. Samantha is a language model made by merging `Severus27/BeingWell_llama2_7b` and `ParthasarathyShanmugam/llama-2-7b-samantha` using [mergekit](https://github.com/cg123/mergekit).
411
+
412
+ Has capabilities of a medical knowledge-focused model (trained on USMLE databases and doctor-patient interactions) with the philosophical, psychological, and relational understanding of the Samantha-7b model.
413
+
414
+ As both a medical consultant and personal counselor, Dr.Samantha could effectively support both physical and mental wellbeing - important for whole-person care.
415
+
416
+
417
+ # Yaml Config
418
+
419
+ ```yaml
420
+
421
+ slices:
422
+ - sources:
423
+ - model: Severus27/BeingWell_llama2_7b
424
+ layer_range: [0, 32]
425
+ - model: ParthasarathyShanmugam/llama-2-7b-samantha
426
+ layer_range: [0, 32]
427
+
428
+ merge_method: slerp
429
+ base_model: TinyPixel/Llama-2-7B-bf16-sharded
430
+
431
+ parameters:
432
+ t:
433
+ - filter: self_attn
434
+ value: [0, 0.5, 0.3, 0.7, 1]
435
+ - filter: mlp
436
+ value: [1, 0.5, 0.7, 0.3, 0]
437
+ - value: 0.5 # fallback for rest of tensors
438
+ tokenizer_source: union
439
+
440
+ dtype: bfloat16
441
+
442
+ ```
443
+
444
+ ## Prompt Template
445
+
446
+ ```text
447
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
448
+
449
+ ### Instruction:
450
+ What is your name?
451
+
452
+ ### Response:
453
+ My name is Samantha.
454
+ ```
455
+
456
+ ## OpenLLM Leaderboard Performance
457
+ | T | Model | Average | ARC | Hellaswag | MMLU | TruthfulQA | Winogrande | GSM8K |
458
+ |---|----------------------------------|---------|-------|-----------|-------|------------|------------|-------|
459
+ | 1 | sethuiyer/Dr_Samantha-7b | 52.95 | 53.84 | 77.95 | 47.94 | 45.58 | 73.56 | 18.8 |
460
+ | 2 | togethercomputer/LLaMA-2-7B-32K-Instruct | 50.02 | 51.11 | 78.51 | 46.11 | 44.86 | 73.88 | 5.69 |
461
+ | 3 | togethercomputer/LLaMA-2-7B-32K | 47.07 | 47.53 | 76.14 | 43.33 | 39.23 | 71.9 | 4.32 |
462
+
463
+
464
+ ## Subject-wise Accuracy
465
+
466
+ | Subject | Accuracy (%) |
467
+ |-----------------------|--------------|
468
+ | Clinical Knowledge | 52.83 |
469
+ | Medical Genetics | 49.00 |
470
+ | Human Aging | 58.29 |
471
+ | Human Sexuality | 55.73 |
472
+ | College Medicine | 38.73 |
473
+ | Anatomy | 41.48 |
474
+ | College Biology | 52.08 |
475
+ | College Medicine | 38.73 |
476
+ | High School Biology | 53.23 |
477
+ | Professional Medicine | 38.73 |
478
+ | Nutrition | 50.33 |
479
+ | Professional Psychology | 46.57 |
480
+ | Virology | 41.57 |
481
+ | High School Psychology | 66.60 |
482
+ | Average | 48.85% |
483
+
484
+
485
+ ## Evaluation by GPT-4 across 25 random prompts from ChatDoctor-200k Dataset
486
+
487
+ ### Overall Rating: 83.5/100
488
+
489
+ #### Pros:
490
+
491
+ - Demonstrates extensive medical knowledge through accurate identification of potential causes for various symptoms.
492
+ - Responses consistently emphasize the importance of seeking professional diagnoses and treatments.
493
+ - Advice to consult specialists for certain concerns is well-reasoned.
494
+ - Practical interim measures provided for symptom management in several cases.
495
+ - Consistent display of empathy, support, and reassurance for patients' well-being.
496
+ - Clear and understandable explanations of conditions and treatment options.
497
+ - Prompt responses addressing all aspects of medical inquiries.
498
+
499
+ #### Cons:
500
+
501
+ - Could occasionally place stronger emphasis on urgency when symptoms indicate potential emergencies.
502
+ - Discussion of differential diagnoses could explore a broader range of less common causes.
503
+ - Details around less common symptoms and their implications need more depth at times.
504
+ - Opportunities exist to gather clarifying details on symptom histories through follow-up questions.
505
+ - Consider exploring full medical histories to improve diagnostic context where relevant.
506
+ - Caution levels and risk factors associated with certain conditions could be underscored more.
507
+
508
+