TheBloke commited on
Commit
d86dc4e
1 Parent(s): e88b596

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -111
README.md CHANGED
@@ -42,32 +42,24 @@ quantized_by: TheBloke
42
  <!-- description start -->
43
  ## Description
44
 
45
- This repo contains GGUF format model files for [Mistral AI_'s Mixtral 8X7B v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-v0.1).
46
 
47
- <!-- description end -->
48
- <!-- README_GGUF.md-about-gguf start -->
49
- ### About GGUF
50
 
51
- 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.
52
 
53
- Here is an incomplete list of clients and libraries that are known to support GGUF:
54
 
55
- * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
56
- * [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.
57
- * [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.
58
- * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
59
- * [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.
60
- * [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.
61
- * [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.
62
- * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
63
- * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
64
- * [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.
65
 
66
- <!-- README_GGUF.md-about-gguf end -->
67
  <!-- repositories-available start -->
68
  ## Repositories available
69
 
70
- * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Mixtral-8x7B-v0.1-GPTQ)
 
71
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Mixtral-8x7B-v0.1-GGUF)
72
  * [Mistral AI_'s original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/mistralai/Mixtral-8x7B-v0.1)
73
  <!-- repositories-available end -->
@@ -77,19 +69,9 @@ Here is an incomplete list of clients and libraries that are known to support GG
77
 
78
  ```
79
  {prompt}
80
-
81
  ```
82
-
83
  <!-- prompt-template end -->
84
 
85
-
86
- <!-- compatibility_gguf start -->
87
- ## Compatibility
88
-
89
- 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)
90
-
91
- They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
92
-
93
  ## Explanation of quantisation methods
94
 
95
  <details>
@@ -127,10 +109,7 @@ Refer to the Provided Files table below to see what files use which methods, and
127
 
128
  **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.
129
 
130
-
131
-
132
  <!-- README_GGUF.md-provided-files end -->
133
-
134
  <!-- README_GGUF.md-how-to-download start -->
135
  ## How to download GGUF files
136
 
@@ -142,12 +121,6 @@ The following clients/libraries will automatically download models for you, prov
142
  * LoLLMS Web UI
143
  * Faraday.dev
144
 
145
- ### In `text-generation-webui`
146
-
147
- Under Download Model, you can enter the model repo: TheBloke/Mixtral-8x7B-v0.1-GGUF and below it, a specific filename to download, such as: mixtral-8x7b-v0.1.Q4_K_M.gguf.
148
-
149
- Then click Download.
150
-
151
  ### On the command line, including multiple files at once
152
 
153
  I recommend using the `huggingface-hub` Python library:
@@ -192,7 +165,7 @@ Windows Command Line users: You can set the environment variable by running `set
192
  <!-- README_GGUF.md-how-to-run start -->
193
  ## Example `llama.cpp` command
194
 
195
- Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
196
 
197
  ```shell
198
  ./main -ngl 35 -m mixtral-8x7b-v0.1.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "{prompt}"
@@ -208,82 +181,11 @@ For other parameters and how to use them, please refer to [the llama.cpp documen
208
 
209
  ## How to run in `text-generation-webui`
210
 
211
- 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).
212
 
213
  ## How to run from Python code
214
 
215
- 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.
216
-
217
- ### How to load this model in Python code, using llama-cpp-python
218
-
219
- For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
220
-
221
- #### First install the package
222
-
223
- Run one of the following commands, according to your system:
224
-
225
- ```shell
226
- # Base ctransformers with no GPU acceleration
227
- pip install llama-cpp-python
228
- # With NVidia CUDA acceleration
229
- CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
230
- # Or with OpenBLAS acceleration
231
- CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
232
- # Or with CLBLast acceleration
233
- CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
234
- # Or with AMD ROCm GPU acceleration (Linux only)
235
- CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
236
- # Or with Metal GPU acceleration for macOS systems only
237
- CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
238
-
239
- # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
240
- $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
241
- pip install llama-cpp-python
242
- ```
243
-
244
- #### Simple llama-cpp-python example code
245
-
246
- ```python
247
- from llama_cpp import Llama
248
-
249
- # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
250
- llm = Llama(
251
- model_path="./mixtral-8x7b-v0.1.Q4_K_M.gguf", # Download the model file first
252
- n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources
253
- n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
254
- n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
255
- )
256
-
257
- # Simple inference example
258
- output = llm(
259
- "{prompt}", # Prompt
260
- max_tokens=512, # Generate up to 512 tokens
261
- stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
262
- echo=True # Whether to echo the prompt
263
- )
264
-
265
- # Chat Completion API
266
-
267
- llm = Llama(model_path="./mixtral-8x7b-v0.1.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
268
- llm.create_chat_completion(
269
- messages = [
270
- {"role": "system", "content": "You are a story writing assistant."},
271
- {
272
- "role": "user",
273
- "content": "Write a story about llamas."
274
- }
275
- ]
276
- )
277
- ```
278
-
279
- ## How to use with LangChain
280
-
281
- Here are guides on using llama-cpp-python and ctransformers with LangChain:
282
-
283
- * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
284
- * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
285
-
286
- <!-- README_GGUF.md-how-to-run end -->
287
 
288
  <!-- footer start -->
289
  <!-- 200823 -->
 
42
  <!-- description start -->
43
  ## Description
44
 
45
+ This repo contains **EXPERIMENTAL** GGUF format model files for [Mistral AI_'s Mixtral 8X7B v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-v0.1).
46
 
47
+ ## EXPERIMENTAL - REQUIRES LLAMA.CPP FORK
48
+
49
+ These are experimental GGUF files, created using a llama.cpp PR found here: https://github.com/ggerganov/llama.cpp/pull/4406.
50
 
51
+ THEY WILL NOT WORK WITH LLAMA.CPP FROM `main`, OR ANY DOWNSTREAM LLAMA.CPP CLIENT - such as llama-cpp-python, text-generation-webui, etc.
52
 
53
+ To test these GGUFs, please build llama.cpp from the above PR.
54
 
55
+ I have tested CUDA acceleration and it works great. I have not yet tested other forms of GPU acceleration.
 
 
 
 
 
 
 
 
 
56
 
57
+ <!-- description end -->
58
  <!-- repositories-available start -->
59
  ## Repositories available
60
 
61
+ * GPTQ: coming soon
62
+ * AWQ: coming soon
63
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Mixtral-8x7B-v0.1-GGUF)
64
  * [Mistral AI_'s original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/mistralai/Mixtral-8x7B-v0.1)
65
  <!-- repositories-available end -->
 
69
 
70
  ```
71
  {prompt}
 
72
  ```
 
73
  <!-- prompt-template end -->
74
 
 
 
 
 
 
 
 
 
75
  ## Explanation of quantisation methods
76
 
77
  <details>
 
109
 
110
  **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.
111
 
 
 
112
  <!-- README_GGUF.md-provided-files end -->
 
113
  <!-- README_GGUF.md-how-to-download start -->
114
  ## How to download GGUF files
115
 
 
121
  * LoLLMS Web UI
122
  * Faraday.dev
123
 
 
 
 
 
 
 
124
  ### On the command line, including multiple files at once
125
 
126
  I recommend using the `huggingface-hub` Python library:
 
165
  <!-- README_GGUF.md-how-to-run start -->
166
  ## Example `llama.cpp` command
167
 
168
+ Make sure you are using `llama.cpp` from [PR 4406](https://github.com/ggerganov/llama.cpp/pull/4406)
169
 
170
  ```shell
171
  ./main -ngl 35 -m mixtral-8x7b-v0.1.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "{prompt}"
 
181
 
182
  ## How to run in `text-generation-webui`
183
 
184
+ Not currently supported.
185
 
186
  ## How to run from Python code
187
 
188
+ Not currently supported.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
 
190
  <!-- footer start -->
191
  <!-- 200823 -->