TheBloke commited on
Commit
d8b1959
1 Parent(s): 77edb04

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +401 -0
README.md ADDED
@@ -0,0 +1,401 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: upstage/SOLAR-10.7B-Instruct-v1.0
3
+ inference: false
4
+ license: apache-2.0
5
+ model_creator: upstage
6
+ model_name: Solar 10.7B Instruct v1.0
7
+ model_type: solar
8
+ prompt_template: '### User:
9
+
10
+ {prompt}
11
+
12
+
13
+ ### Assistant:
14
+
15
+ '
16
+ quantized_by: TheBloke
17
+ ---
18
+ <!-- markdownlint-disable MD041 -->
19
+
20
+ <!-- header start -->
21
+ <!-- 200823 -->
22
+ <div style="width: auto; margin-left: auto; margin-right: auto">
23
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
24
+ </div>
25
+ <div style="display: flex; justify-content: space-between; width: 100%;">
26
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
27
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
28
+ </div>
29
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
30
+ <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>
31
+ </div>
32
+ </div>
33
+ <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>
34
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
35
+ <!-- header end -->
36
+
37
+ # Solar 10.7B Instruct v1.0 - GGUF
38
+ - Model creator: [upstage](https://huggingface.co/upstage)
39
+ - Original model: [Solar 10.7B Instruct v1.0](https://huggingface.co/upstage/SOLAR-10.7B-Instruct-v1.0)
40
+
41
+ <!-- description start -->
42
+ ## Description
43
+
44
+ This repo contains GGUF format model files for [upstage's Solar 10.7B Instruct v1.0](https://huggingface.co/upstage/SOLAR-10.7B-Instruct-v1.0).
45
+
46
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
47
+
48
+ <!-- description end -->
49
+ <!-- README_GGUF.md-about-gguf start -->
50
+ ### About GGUF
51
+
52
+ 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.
53
+
54
+ Here is an incomplete list of clients and libraries that are known to support GGUF:
55
+
56
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
57
+ * [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.
58
+ * [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.
59
+ * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
60
+ * [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.
61
+ * [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.
62
+ * [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.
63
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
64
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
65
+ * [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.
66
+
67
+ <!-- README_GGUF.md-about-gguf end -->
68
+ <!-- repositories-available start -->
69
+ ## Repositories available
70
+
71
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-AWQ)
72
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GPTQ)
73
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF)
74
+ * [upstage's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/upstage/SOLAR-10.7B-Instruct-v1.0)
75
+ <!-- repositories-available end -->
76
+
77
+ <!-- prompt-template start -->
78
+ ## Prompt template: User-Assistant-Newlines
79
+
80
+ ```
81
+ ### User:
82
+ {prompt}
83
+
84
+ ### Assistant:
85
+
86
+ ```
87
+
88
+ <!-- prompt-template end -->
89
+
90
+
91
+ <!-- compatibility_gguf start -->
92
+ ## Compatibility
93
+
94
+ 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)
95
+
96
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
97
+
98
+ ## Explanation of quantisation methods
99
+
100
+ <details>
101
+ <summary>Click to see details</summary>
102
+
103
+ The new methods available are:
104
+
105
+ * 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)
106
+ * 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.
107
+ * 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.
108
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
109
+ * 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
110
+
111
+ Refer to the Provided Files table below to see what files use which methods, and how.
112
+ </details>
113
+ <!-- compatibility_gguf end -->
114
+
115
+ <!-- README_GGUF.md-provided-files start -->
116
+ ## Provided files
117
+
118
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
119
+ | ---- | ---- | ---- | ---- | ---- | ----- |
120
+ | [solar-10.7b-instruct-v1.0.Q2_K.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q2_K.gguf) | Q2_K | 2 | 4.55 GB| 7.05 GB | smallest, significant quality loss - not recommended for most purposes |
121
+ | [solar-10.7b-instruct-v1.0.Q3_K_S.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q3_K_S.gguf) | Q3_K_S | 3 | 4.66 GB| 7.16 GB | very small, high quality loss |
122
+ | [solar-10.7b-instruct-v1.0.Q3_K_M.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q3_K_M.gguf) | Q3_K_M | 3 | 5.19 GB| 7.69 GB | very small, high quality loss |
123
+ | [solar-10.7b-instruct-v1.0.Q3_K_L.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q3_K_L.gguf) | Q3_K_L | 3 | 5.65 GB| 8.15 GB | small, substantial quality loss |
124
+ | [solar-10.7b-instruct-v1.0.Q4_0.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q4_0.gguf) | Q4_0 | 4 | 6.07 GB| 8.57 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
125
+ | [solar-10.7b-instruct-v1.0.Q4_K_S.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q4_K_S.gguf) | Q4_K_S | 4 | 6.10 GB| 8.60 GB | small, greater quality loss |
126
+ | [solar-10.7b-instruct-v1.0.Q4_K_M.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q4_K_M.gguf) | Q4_K_M | 4 | 6.46 GB| 8.96 GB | medium, balanced quality - recommended |
127
+ | [solar-10.7b-instruct-v1.0.Q5_0.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q5_0.gguf) | Q5_0 | 5 | 7.40 GB| 9.90 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
128
+ | [solar-10.7b-instruct-v1.0.Q5_K_S.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q5_K_S.gguf) | Q5_K_S | 5 | 7.40 GB| 9.90 GB | large, low quality loss - recommended |
129
+ | [solar-10.7b-instruct-v1.0.Q5_K_M.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q5_K_M.gguf) | Q5_K_M | 5 | 7.60 GB| 10.10 GB | large, very low quality loss - recommended |
130
+ | [solar-10.7b-instruct-v1.0.Q6_K.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q6_K.gguf) | Q6_K | 6 | 8.81 GB| 11.31 GB | very large, extremely low quality loss |
131
+ | [solar-10.7b-instruct-v1.0.Q8_0.gguf](https://huggingface.co/TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF/blob/main/solar-10.7b-instruct-v1.0.Q8_0.gguf) | Q8_0 | 8 | 11.40 GB| 13.90 GB | very large, extremely low quality loss - not recommended |
132
+
133
+ **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.
134
+
135
+
136
+
137
+ <!-- README_GGUF.md-provided-files end -->
138
+
139
+ <!-- README_GGUF.md-how-to-download start -->
140
+ ## How to download GGUF files
141
+
142
+ **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.
143
+
144
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
145
+
146
+ * LM Studio
147
+ * LoLLMS Web UI
148
+ * Faraday.dev
149
+
150
+ ### In `text-generation-webui`
151
+
152
+ Under Download Model, you can enter the model repo: TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF and below it, a specific filename to download, such as: solar-10.7b-instruct-v1.0.Q4_K_M.gguf.
153
+
154
+ Then click Download.
155
+
156
+ ### On the command line, including multiple files at once
157
+
158
+ I recommend using the `huggingface-hub` Python library:
159
+
160
+ ```shell
161
+ pip3 install huggingface-hub
162
+ ```
163
+
164
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
165
+
166
+ ```shell
167
+ huggingface-cli download TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF solar-10.7b-instruct-v1.0.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
168
+ ```
169
+
170
+ <details>
171
+ <summary>More advanced huggingface-cli download usage (click to read)</summary>
172
+
173
+ You can also download multiple files at once with a pattern:
174
+
175
+ ```shell
176
+ huggingface-cli download TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
177
+ ```
178
+
179
+ 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).
180
+
181
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
182
+
183
+ ```shell
184
+ pip3 install hf_transfer
185
+ ```
186
+
187
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
188
+
189
+ ```shell
190
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF solar-10.7b-instruct-v1.0.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
191
+ ```
192
+
193
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
194
+ </details>
195
+ <!-- README_GGUF.md-how-to-download end -->
196
+
197
+ <!-- README_GGUF.md-how-to-run start -->
198
+ ## Example `llama.cpp` command
199
+
200
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
201
+
202
+ ```shell
203
+ ./main -ngl 35 -m solar-10.7b-instruct-v1.0.Q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### User:\n{prompt}\n\n### Assistant:"
204
+ ```
205
+
206
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
207
+
208
+ Change `-c 4096` 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.
209
+
210
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
211
+
212
+ 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)
213
+
214
+ ## How to run in `text-generation-webui`
215
+
216
+ 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).
217
+
218
+ ## How to run from Python code
219
+
220
+ 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.
221
+
222
+ ### How to load this model in Python code, using llama-cpp-python
223
+
224
+ For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
225
+
226
+ #### First install the package
227
+
228
+ Run one of the following commands, according to your system:
229
+
230
+ ```shell
231
+ # Base ctransformers with no GPU acceleration
232
+ pip install llama-cpp-python
233
+ # With NVidia CUDA acceleration
234
+ CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
235
+ # Or with OpenBLAS acceleration
236
+ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
237
+ # Or with CLBLast acceleration
238
+ CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
239
+ # Or with AMD ROCm GPU acceleration (Linux only)
240
+ CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
241
+ # Or with Metal GPU acceleration for macOS systems only
242
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
243
+
244
+ # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
245
+ $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
246
+ pip install llama-cpp-python
247
+ ```
248
+
249
+ #### Simple llama-cpp-python example code
250
+
251
+ ```python
252
+ from llama_cpp import Llama
253
+
254
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
255
+ llm = Llama(
256
+ model_path="./solar-10.7b-instruct-v1.0.Q4_K_M.gguf", # Download the model file first
257
+ n_ctx=4096, # The max sequence length to use - note that longer sequence lengths require much more resources
258
+ n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
259
+ n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
260
+ )
261
+
262
+ # Simple inference example
263
+ output = llm(
264
+ "### User:\n{prompt}\n\n### Assistant:", # Prompt
265
+ max_tokens=512, # Generate up to 512 tokens
266
+ stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
267
+ echo=True # Whether to echo the prompt
268
+ )
269
+
270
+ # Chat Completion API
271
+
272
+ llm = Llama(model_path="./solar-10.7b-instruct-v1.0.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
273
+ llm.create_chat_completion(
274
+ messages = [
275
+ {"role": "system", "content": "You are a story writing assistant."},
276
+ {
277
+ "role": "user",
278
+ "content": "Write a story about llamas."
279
+ }
280
+ ]
281
+ )
282
+ ```
283
+
284
+ ## How to use with LangChain
285
+
286
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
287
+
288
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
289
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
290
+
291
+ <!-- README_GGUF.md-how-to-run end -->
292
+
293
+ <!-- footer start -->
294
+ <!-- 200823 -->
295
+ ## Discord
296
+
297
+ For further support, and discussions on these models and AI in general, join us at:
298
+
299
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
300
+
301
+ ## Thanks, and how to contribute
302
+
303
+ Thanks to the [chirper.ai](https://chirper.ai) team!
304
+
305
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
306
+
307
+ 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.
308
+
309
+ 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.
310
+
311
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
312
+
313
+ * Patreon: https://patreon.com/TheBlokeAI
314
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
315
+
316
+ **Special thanks to**: Aemon Algiz.
317
+
318
+ **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
319
+
320
+
321
+ Thank you to all my generous patrons and donaters!
322
+
323
+ And thank you again to a16z for their generous grant.
324
+
325
+ <!-- footer end -->
326
+
327
+ <!-- original-model-card start -->
328
+ # Original model card: upstage's Solar 10.7B Instruct v1.0
329
+
330
+
331
+ # **Meet 10.7B Solar: Elevating Performance with Upstage Depth UP Scaling!**
332
+
333
+ **(This model is [upstage/SOLAR-10.7B-v1.0](https://huggingface.co/upstage/SOLAR-10.7B-v1.0) fine-tuned version for single-turn conversation. Detailed description to be added.)**
334
+
335
+
336
+ # **Introduction**
337
+
338
+ We introduce the first 10.7 billion (B) parameter model, SOLAR-10.7B. It's compact, yet remarkably powerful, and demonstrates unparalleled state-of-the-art performance in models with parameters under 30B.
339
+
340
+ We developed the Depth Up-Scaling technique. Built on the Llama2 architecture, SOLAR-10.7B incorporates the innovative Upstage Depth Up-Scaling. We then integrated Mistral 7B weights into the upscaled layers, and finally, continued pre-training for the entire model.
341
+
342
+ Depth-Upscaled SOLAR-10.7B has remarkable performance. It outperforms models with up to 30B parameters, even surpassing the recent Mixtral 8X7B model. For detailed information, please refer to the experimental table ([link to be updated soon]).
343
+ Solar 10.7B is an ideal choice for fine-tuning. SOLAR-10.7B offers robustness and adaptability for your fine-tuning needs. Our simple instruction fine-tuning using the SOLAR-10.7B pre-trained model yields significant performance improvements. [[link to be updated soon]]
344
+
345
+
346
+ # **Usage Instructions**
347
+
348
+ This model has been fine-tuned primarily for single-turn conversation, making it less suitable for multi-turn conversations such as chat.
349
+
350
+ ### **Version**
351
+
352
+ Make sure you have the correct version of the transformers library installed:
353
+
354
+ ```sh
355
+ pip install transformers==4.35.2
356
+ ```
357
+
358
+ ### **Loading the Model**
359
+
360
+ Use the following Python code to load the model:
361
+
362
+ ```python
363
+ import torch
364
+ from transformers import AutoModelForCausalLM, AutoTokenizer
365
+
366
+ tokenizer = AutoTokenizer.from_pretrained("Upstage/SOLAR-10.7B-Instruct-v1.0")
367
+ model = AutoModelForCausalLM.from_pretrained(
368
+ "Upstage/SOLAR-10.7B-Instruct-v1.0",
369
+ device_map="auto",
370
+ torch_dtype=torch.float16,
371
+ )
372
+ ```
373
+
374
+ ### **Conducting Single-Turn Conversation**
375
+
376
+ ```python
377
+ conversation = [ {'role': 'user', 'content': 'Hello?'} ]
378
+
379
+ prompt = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
380
+
381
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
382
+ outputs = model.generate(**inputs, use_cache=True, max_length=4096) output_text = tokenizer.decode(outputs[0])
383
+ print(output_text)
384
+ ```
385
+
386
+ Below is an example of the output.
387
+ ```
388
+ <s> ### User:
389
+ Hello?
390
+
391
+ ### Assistant:
392
+ Hello, how can I assist you today? Please feel free to ask any questions or request help with a specific task.</s>
393
+ ```
394
+
395
+ ### **The Upstage AI Team** ###
396
+ Upstage is creating the best LLM and DocAI. Please find more information at https://upstage.ai
397
+
398
+ ### **Contact Us** ###
399
+ Any questions and suggestions, please use the discussion tab. If you want to contact us directly, drop an email to [contact@upstage.ai](mailto:contact@upstage.ai)
400
+
401
+ <!-- original-model-card end -->