Text Generation
Transformers
GGUF
English
Chinese
llama
Merge
medical
text-generation-inference
TheBloke commited on
Commit
f10f742
1 Parent(s): f3c24e5

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +458 -0
README.md ADDED
@@ -0,0 +1,458 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 - GGUF
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 GGUF format model files for [Sethu Iyer's Dr Samantha 7B](https://huggingface.co/sethuiyer/Dr_Samantha-7b).
62
+
63
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
64
+
65
+ <!-- description end -->
66
+ <!-- README_GGUF.md-about-gguf start -->
67
+ ### About GGUF
68
+
69
+ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
70
+
71
+ Here is an incomplete list of clients and libraries that are known to support GGUF:
72
+
73
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
74
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
75
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
76
+ * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
77
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023.
78
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
79
+ * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
80
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
81
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
82
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models.
83
+
84
+ <!-- README_GGUF.md-about-gguf end -->
85
+ <!-- repositories-available start -->
86
+ ## Repositories available
87
+
88
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Dr_Samantha-7B-AWQ)
89
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Dr_Samantha-7B-GPTQ)
90
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF)
91
+ * [Sethu Iyer's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/sethuiyer/Dr_Samantha-7b)
92
+ <!-- repositories-available end -->
93
+
94
+ <!-- prompt-template start -->
95
+ ## Prompt template: Alpaca
96
+
97
+ ```
98
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
99
+
100
+ ### Instruction:
101
+ {prompt}
102
+
103
+ ### Response:
104
+
105
+ ```
106
+
107
+ <!-- prompt-template end -->
108
+
109
+
110
+ <!-- compatibility_gguf start -->
111
+ ## Compatibility
112
+
113
+ These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
114
+
115
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
116
+
117
+ ## Explanation of quantisation methods
118
+
119
+ <details>
120
+ <summary>Click to see details</summary>
121
+
122
+ The new methods available are:
123
+
124
+ * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
125
+ * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
126
+ * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
127
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
128
+ * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
129
+
130
+ Refer to the Provided Files table below to see what files use which methods, and how.
131
+ </details>
132
+ <!-- compatibility_gguf end -->
133
+
134
+ <!-- README_GGUF.md-provided-files start -->
135
+ ## Provided files
136
+
137
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
138
+ | ---- | ---- | ---- | ---- | ---- | ----- |
139
+ | [dr_samantha-7b.Q2_K.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q2_K.gguf) | Q2_K | 2 | 2.53 GB| 5.03 GB | significant quality loss - not recommended for most purposes |
140
+ | [dr_samantha-7b.Q3_K_S.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q3_K_S.gguf) | Q3_K_S | 3 | 2.95 GB| 5.45 GB | very small, high quality loss |
141
+ | [dr_samantha-7b.Q3_K_M.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q3_K_M.gguf) | Q3_K_M | 3 | 3.30 GB| 5.80 GB | very small, high quality loss |
142
+ | [dr_samantha-7b.Q3_K_L.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q3_K_L.gguf) | Q3_K_L | 3 | 3.60 GB| 6.10 GB | small, substantial quality loss |
143
+ | [dr_samantha-7b.Q4_0.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q4_0.gguf) | Q4_0 | 4 | 3.83 GB| 6.33 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
144
+ | [dr_samantha-7b.Q4_K_S.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q4_K_S.gguf) | Q4_K_S | 4 | 3.86 GB| 6.36 GB | small, greater quality loss |
145
+ | [dr_samantha-7b.Q4_K_M.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q4_K_M.gguf) | Q4_K_M | 4 | 4.08 GB| 6.58 GB | medium, balanced quality - recommended |
146
+ | [dr_samantha-7b.Q5_0.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q5_0.gguf) | Q5_0 | 5 | 4.65 GB| 7.15 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
147
+ | [dr_samantha-7b.Q5_K_S.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q5_K_S.gguf) | Q5_K_S | 5 | 4.65 GB| 7.15 GB | large, low quality loss - recommended |
148
+ | [dr_samantha-7b.Q5_K_M.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q5_K_M.gguf) | Q5_K_M | 5 | 4.78 GB| 7.28 GB | large, very low quality loss - recommended |
149
+ | [dr_samantha-7b.Q6_K.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q6_K.gguf) | Q6_K | 6 | 5.53 GB| 8.03 GB | very large, extremely low quality loss |
150
+ | [dr_samantha-7b.Q8_0.gguf](https://huggingface.co/TheBloke/Dr_Samantha-7B-GGUF/blob/main/dr_samantha-7b.Q8_0.gguf) | Q8_0 | 8 | 7.16 GB| 9.66 GB | very large, extremely low quality loss - not recommended |
151
+
152
+ **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
153
+
154
+
155
+
156
+ <!-- README_GGUF.md-provided-files end -->
157
+
158
+ <!-- README_GGUF.md-how-to-download start -->
159
+ ## How to download GGUF files
160
+
161
+ **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file.
162
+
163
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
164
+
165
+ * LM Studio
166
+ * LoLLMS Web UI
167
+ * Faraday.dev
168
+
169
+ ### In `text-generation-webui`
170
+
171
+ Under Download Model, you can enter the model repo: TheBloke/Dr_Samantha-7B-GGUF and below it, a specific filename to download, such as: dr_samantha-7b.Q4_K_M.gguf.
172
+
173
+ Then click Download.
174
+
175
+ ### On the command line, including multiple files at once
176
+
177
+ I recommend using the `huggingface-hub` Python library:
178
+
179
+ ```shell
180
+ pip3 install huggingface-hub
181
+ ```
182
+
183
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
184
+
185
+ ```shell
186
+ huggingface-cli download TheBloke/Dr_Samantha-7B-GGUF dr_samantha-7b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
187
+ ```
188
+
189
+ <details>
190
+ <summary>More advanced huggingface-cli download usage (click to read)</summary>
191
+
192
+ You can also download multiple files at once with a pattern:
193
+
194
+ ```shell
195
+ huggingface-cli download TheBloke/Dr_Samantha-7B-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
196
+ ```
197
+
198
+ 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).
199
+
200
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
201
+
202
+ ```shell
203
+ pip3 install hf_transfer
204
+ ```
205
+
206
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
207
+
208
+ ```shell
209
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Dr_Samantha-7B-GGUF dr_samantha-7b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
210
+ ```
211
+
212
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
213
+ </details>
214
+ <!-- README_GGUF.md-how-to-download end -->
215
+
216
+ <!-- README_GGUF.md-how-to-run start -->
217
+ ## Example `llama.cpp` command
218
+
219
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
220
+
221
+ ```shell
222
+ ./main -ngl 35 -m dr_samantha-7b.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:"
223
+ ```
224
+
225
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
226
+
227
+ Change `-c 2048` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.
228
+
229
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
230
+
231
+ For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
232
+
233
+ ## How to run in `text-generation-webui`
234
+
235
+ Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp).
236
+
237
+ ## How to run from Python code
238
+
239
+ You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python.
240
+
241
+ ### How to load this model in Python code, using llama-cpp-python
242
+
243
+ For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
244
+
245
+ #### First install the package
246
+
247
+ Run one of the following commands, according to your system:
248
+
249
+ ```shell
250
+ # Base ctransformers with no GPU acceleration
251
+ pip install llama-cpp-python
252
+ # With NVidia CUDA acceleration
253
+ CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
254
+ # Or with OpenBLAS acceleration
255
+ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
256
+ # Or with CLBLast acceleration
257
+ CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
258
+ # Or with AMD ROCm GPU acceleration (Linux only)
259
+ CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
260
+ # Or with Metal GPU acceleration for macOS systems only
261
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
262
+
263
+ # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
264
+ $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
265
+ pip install llama-cpp-python
266
+ ```
267
+
268
+ #### Simple llama-cpp-python example code
269
+
270
+ ```python
271
+ from llama_cpp import Llama
272
+
273
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
274
+ llm = Llama(
275
+ model_path="./dr_samantha-7b.Q4_K_M.gguf", # Download the model file first
276
+ n_ctx=2048, # The max sequence length to use - note that longer sequence lengths require much more resources
277
+ n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
278
+ n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
279
+ )
280
+
281
+ # Simple inference example
282
+ output = llm(
283
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:", # Prompt
284
+ max_tokens=512, # Generate up to 512 tokens
285
+ stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
286
+ echo=True # Whether to echo the prompt
287
+ )
288
+
289
+ # Chat Completion API
290
+
291
+ llm = Llama(model_path="./dr_samantha-7b.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
292
+ llm.create_chat_completion(
293
+ messages = [
294
+ {"role": "system", "content": "You are a story writing assistant."},
295
+ {
296
+ "role": "user",
297
+ "content": "Write a story about llamas."
298
+ }
299
+ ]
300
+ )
301
+ ```
302
+
303
+ ## How to use with LangChain
304
+
305
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
306
+
307
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
308
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
309
+
310
+ <!-- README_GGUF.md-how-to-run end -->
311
+
312
+ <!-- footer start -->
313
+ <!-- 200823 -->
314
+ ## Discord
315
+
316
+ For further support, and discussions on these models and AI in general, join us at:
317
+
318
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
319
+
320
+ ## Thanks, and how to contribute
321
+
322
+ Thanks to the [chirper.ai](https://chirper.ai) team!
323
+
324
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
325
+
326
+ 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.
327
+
328
+ 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.
329
+
330
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
331
+
332
+ * Patreon: https://patreon.com/TheBlokeAI
333
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
334
+
335
+ **Special thanks to**: Aemon Algiz.
336
+
337
+ **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
338
+
339
+
340
+ Thank you to all my generous patrons and donaters!
341
+
342
+ And thank you again to a16z for their generous grant.
343
+
344
+ <!-- footer end -->
345
+
346
+ <!-- original-model-card start -->
347
+ # Original model card: Sethu Iyer's Dr Samantha 7B
348
+
349
+
350
+ # Dr. Samantha
351
+
352
+ <p align="center">
353
+ <img src="https://huggingface.co/sethuiyer/Dr_Samantha-7b/resolve/main/dr_samantha_anime_style_reduced_quality.webp" height="256px" alt="SynthIQ">
354
+ </p>
355
+
356
+ ## Overview
357
+
358
+ 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).
359
+
360
+ 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.
361
+
362
+ As both a medical consultant and personal counselor, Dr.Samantha could effectively support both physical and mental wellbeing - important for whole-person care.
363
+
364
+
365
+ # Yaml Config
366
+
367
+ ```yaml
368
+
369
+ slices:
370
+ - sources:
371
+ - model: Severus27/BeingWell_llama2_7b
372
+ layer_range: [0, 32]
373
+ - model: ParthasarathyShanmugam/llama-2-7b-samantha
374
+ layer_range: [0, 32]
375
+
376
+ merge_method: slerp
377
+ base_model: TinyPixel/Llama-2-7B-bf16-sharded
378
+
379
+ parameters:
380
+ t:
381
+ - filter: self_attn
382
+ value: [0, 0.5, 0.3, 0.7, 1]
383
+ - filter: mlp
384
+ value: [1, 0.5, 0.7, 0.3, 0]
385
+ - value: 0.5 # fallback for rest of tensors
386
+ tokenizer_source: union
387
+
388
+ dtype: bfloat16
389
+
390
+ ```
391
+
392
+ ## Prompt Template
393
+
394
+ ```text
395
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
396
+
397
+ ### Instruction:
398
+ What is your name?
399
+
400
+ ### Response:
401
+ My name is Samantha.
402
+ ```
403
+
404
+ ## OpenLLM Leaderboard Performance
405
+ | T | Model | Average | ARC | Hellaswag | MMLU | TruthfulQA | Winogrande | GSM8K |
406
+ |---|----------------------------------|---------|-------|-----------|-------|------------|------------|-------|
407
+ | 1 | sethuiyer/Dr_Samantha-7b | 52.95 | 53.84 | 77.95 | 47.94 | 45.58 | 73.56 | 18.8 |
408
+ | 2 | togethercomputer/LLaMA-2-7B-32K-Instruct | 50.02 | 51.11 | 78.51 | 46.11 | 44.86 | 73.88 | 5.69 |
409
+ | 3 | togethercomputer/LLaMA-2-7B-32K | 47.07 | 47.53 | 76.14 | 43.33 | 39.23 | 71.9 | 4.32 |
410
+
411
+
412
+ ## Subject-wise Accuracy
413
+
414
+ | Subject | Accuracy (%) |
415
+ |-----------------------|--------------|
416
+ | Clinical Knowledge | 52.83 |
417
+ | Medical Genetics | 49.00 |
418
+ | Human Aging | 58.29 |
419
+ | Human Sexuality | 55.73 |
420
+ | College Medicine | 38.73 |
421
+ | Anatomy | 41.48 |
422
+ | College Biology | 52.08 |
423
+ | College Medicine | 38.73 |
424
+ | High School Biology | 53.23 |
425
+ | Professional Medicine | 38.73 |
426
+ | Nutrition | 50.33 |
427
+ | Professional Psychology | 46.57 |
428
+ | Virology | 41.57 |
429
+ | High School Psychology | 66.60 |
430
+ | Average | 48.85% |
431
+
432
+
433
+ ## Evaluation by GPT-4 across 25 random prompts from ChatDoctor-200k Dataset
434
+
435
+ ### Overall Rating: 83.5/100
436
+
437
+ #### Pros:
438
+
439
+ - Demonstrates extensive medical knowledge through accurate identification of potential causes for various symptoms.
440
+ - Responses consistently emphasize the importance of seeking professional diagnoses and treatments.
441
+ - Advice to consult specialists for certain concerns is well-reasoned.
442
+ - Practical interim measures provided for symptom management in several cases.
443
+ - Consistent display of empathy, support, and reassurance for patients' well-being.
444
+ - Clear and understandable explanations of conditions and treatment options.
445
+ - Prompt responses addressing all aspects of medical inquiries.
446
+
447
+ #### Cons:
448
+
449
+ - Could occasionally place stronger emphasis on urgency when symptoms indicate potential emergencies.
450
+ - Discussion of differential diagnoses could explore a broader range of less common causes.
451
+ - Details around less common symptoms and their implications need more depth at times.
452
+ - Opportunities exist to gather clarifying details on symptom histories through follow-up questions.
453
+ - Consider exploring full medical histories to improve diagnostic context where relevant.
454
+ - Caution levels and risk factors associated with certain conditions could be underscored more.
455
+
456
+
457
+
458
+ <!-- original-model-card end -->