MaziyarPanahi commited on
Commit
13ef511
1 Parent(s): de2e159

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,13 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
45
+ Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q2_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6fc0a65064c8bdc337d9954dbb035e8860a26bedc6b488d40e70aeaa9c2e3aaa
3
+ size 17307429664
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q3_K_L.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6863fa9007a6538ba32db4b099ead6732732c1741cfd7b432bca48b72d905580
3
+ size 24165953120
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q3_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a43186d5de762ed2c843d897857abeb54708c153733446ad73cf174291a784d2
3
+ size 22542757472
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q3_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b1cf0a4c1983141a8f39c31948b392fee1391d44dc0a8d66a0bbe322a26dbe7
3
+ size 20428828256
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f5440fb48994ec778bd49d797914e2a01ac98159c56829e83e4f77d6a8d0fe3
3
+ size 28444914336
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q4_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a84a490b9bbd08af805dbdb80dbca58afdbe8d37ab8829f774c888015ed472f6
3
+ size 26742026912
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89434e1faaac011d7cecf591f43983d855c8570c4091ad217914a12cda37d337
3
+ size 33226159776
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q5_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:32b993215fd659810317fb76aec4cbf2c4d2c0a91ef5db185bb3d5cd82357fa1
3
+ size 32227915424
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7de0df16e86b54809006b08789e05f03816405ff27e16bdfa075cc07e16f3a64
3
+ size 38377536224
Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow.Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:987cfd93fb4b7f49fa5dade075d047ef128e08cada9897c595978c5a273b439c
3
+ size 49623296608
README.md ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - quantized
4
+ - 2-bit
5
+ - 3-bit
6
+ - 4-bit
7
+ - 5-bit
8
+ - 6-bit
9
+ - 8-bit
10
+ - GGUF
11
+ - transformers
12
+ - pytorch
13
+ - tensorboard
14
+ - safetensors
15
+ - mixtral
16
+ - text-generation
17
+ - axolotl
18
+ - generated_from_trainer
19
+ - nous_hermes
20
+ - wikihow
21
+ - peft
22
+ - lora
23
+ - qlora
24
+ - adapter
25
+ - finetune
26
+ - conversational
27
+ - dataset:HuggingFaceTB/cosmopedia
28
+ - base_model:NousResearch/Nous-Hermes-2-Mixtral-8x7B-SFT
29
+ - license:apache-2.0
30
+ - autotrain_compatible
31
+ - endpoints_compatible
32
+ - text-generation-inference
33
+ - region:us
34
+ - text-generation
35
+ model_name: Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF
36
+ base_model: MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow
37
+ inference: false
38
+ model_creator: MaziyarPanahi
39
+ pipeline_tag: text-generation
40
+ quantized_by: MaziyarPanahi
41
+ ---
42
+ # [MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF](https://huggingface.co/MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF)
43
+ - Model creator: [MaziyarPanahi](https://huggingface.co/MaziyarPanahi)
44
+ - Original model: [MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow](https://huggingface.co/MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow)
45
+
46
+ ## Description
47
+ [MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF](https://huggingface.co/MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF) contains GGUF format model files for [MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow](https://huggingface.co/MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow).
48
+
49
+ ## How to use
50
+ Thanks to [TheBloke](https://huggingface.co/TheBloke) for preparing an amazing README on how to use GGUF models:
51
+
52
+ ### About GGUF
53
+
54
+ 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.
55
+
56
+ Here is an incomplete list of clients and libraries that are known to support GGUF:
57
+
58
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
59
+ * [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.
60
+ * [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.
61
+ * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
62
+ * [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.
63
+ * [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.
64
+ * [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.
65
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
66
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
67
+ * [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.
68
+
69
+ ### Explanation of quantisation methods
70
+
71
+ <details>
72
+ <summary>Click to see details</summary>
73
+
74
+ The new methods available are:
75
+
76
+ * 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)
77
+ * 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.
78
+ * 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.
79
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
80
+ * 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
81
+
82
+ ## How to download GGUF files
83
+
84
+ **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.
85
+
86
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
87
+
88
+ * LM Studio
89
+ * LoLLMS Web UI
90
+ * Faraday.dev
91
+
92
+ ### In `text-generation-webui`
93
+
94
+ Under Download Model, you can enter the model repo: [MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF](https://huggingface.co/MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF) and below it, a specific filename to download, such as: Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF.Q4_K_M.gguf.
95
+
96
+ Then click Download.
97
+
98
+ ### On the command line, including multiple files at once
99
+
100
+ I recommend using the `huggingface-hub` Python library:
101
+
102
+ ```shell
103
+ pip3 install huggingface-hub
104
+ ```
105
+
106
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
107
+
108
+ ```shell
109
+ huggingface-cli download MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
110
+ ```
111
+ </details>
112
+ <details>
113
+ <summary>More advanced huggingface-cli download usage (click to read)</summary>
114
+
115
+ You can also download multiple files at once with a pattern:
116
+
117
+ ```shell
118
+ huggingface-cli download [MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF](https://huggingface.co/MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF) --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
119
+ ```
120
+
121
+ 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).
122
+
123
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
124
+
125
+ ```shell
126
+ pip3 install hf_transfer
127
+ ```
128
+
129
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
130
+
131
+ ```shell
132
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download MaziyarPanahi/Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
133
+ ```
134
+
135
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
136
+ </details>
137
+
138
+ ## Example `llama.cpp` command
139
+
140
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
141
+
142
+ ```shell
143
+ ./main -ngl 35 -m Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system
144
+ {system_message}<|im_end|>
145
+ <|im_start|>user
146
+ {prompt}<|im_end|>
147
+ <|im_start|>assistant"
148
+ ```
149
+
150
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
151
+
152
+ Change `-c 32768` 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.
153
+
154
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
155
+
156
+ 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)
157
+
158
+ ## How to run in `text-generation-webui`
159
+
160
+ 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).
161
+
162
+ ## How to run from Python code
163
+
164
+ 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.
165
+
166
+ ### How to load this model in Python code, using llama-cpp-python
167
+
168
+ For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
169
+
170
+ #### First install the package
171
+
172
+ Run one of the following commands, according to your system:
173
+
174
+ ```shell
175
+ # Base ctransformers with no GPU acceleration
176
+ pip install llama-cpp-python
177
+ # With NVidia CUDA acceleration
178
+ CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
179
+ # Or with OpenBLAS acceleration
180
+ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
181
+ # Or with CLBLast acceleration
182
+ CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
183
+ # Or with AMD ROCm GPU acceleration (Linux only)
184
+ CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
185
+ # Or with Metal GPU acceleration for macOS systems only
186
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
187
+
188
+ # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
189
+ $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
190
+ pip install llama-cpp-python
191
+ ```
192
+
193
+ #### Simple llama-cpp-python example code
194
+
195
+ ```python
196
+ from llama_cpp import Llama
197
+
198
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
199
+ llm = Llama(
200
+ model_path="./Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF.Q4_K_M.gguf", # Download the model file first
201
+ n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources
202
+ n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
203
+ n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
204
+ )
205
+
206
+ # Simple inference example
207
+ output = llm(
208
+ "<|im_start|>system
209
+ {system_message}<|im_end|>
210
+ <|im_start|>user
211
+ {prompt}<|im_end|>
212
+ <|im_start|>assistant", # Prompt
213
+ max_tokens=512, # Generate up to 512 tokens
214
+ stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
215
+ echo=True # Whether to echo the prompt
216
+ )
217
+
218
+ # Chat Completion API
219
+
220
+ llm = Llama(model_path="./Nous-Hermes-2-Mixtral-8x7B-SFT-Wikihow-GGUF.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
221
+ llm.create_chat_completion(
222
+ messages = [
223
+ {"role": "system", "content": "You are a story writing assistant."},
224
+ {
225
+ "role": "user",
226
+ "content": "Write a story about llamas."
227
+ }
228
+ ]
229
+ )
230
+ ```
231
+
232
+ ## How to use with LangChain
233
+
234
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
235
+
236
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
237
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)