Add README.md to repo
Browse files
README.md
CHANGED
@@ -34,40 +34,38 @@ quantized_by: TheBloke
|
|
34 |
<!-- header start -->
|
35 |
<!-- 200823 -->
|
36 |
<div style="width: auto; margin-left: auto; margin-right: auto">
|
37 |
-
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
38 |
</div>
|
39 |
<div style="display: flex; justify-content: space-between; width: 100%;">
|
40 |
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
41 |
-
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/
|
42 |
</div>
|
43 |
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
44 |
-
<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>
|
45 |
</div>
|
46 |
</div>
|
47 |
-
<div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">
|
48 |
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
49 |
<!-- header end -->
|
50 |
|
51 |
-
# Dolphin 2.5 Mixtral 8X7B -
|
52 |
- Model creator: [Eric Hartford](https://huggingface.co/ehartford)
|
53 |
- Original model: [Dolphin 2.5 Mixtral 8X7B](https://huggingface.co/ehartford/dolphin-2.5-mixtral-8x7b)
|
54 |
|
55 |
<!-- description start -->
|
56 |
## Description
|
57 |
|
58 |
-
This repo contains
|
59 |
|
60 |
-
|
61 |
-
<!--
|
62 |
-
### About
|
63 |
|
64 |
-
|
65 |
|
66 |
-
### Mixtral
|
67 |
|
68 |
Support for Mixtral was merged into Llama.cpp on December 13th.
|
69 |
|
70 |
-
These Mixtral
|
71 |
|
72 |
* llama.cpp as of December 13th
|
73 |
* KoboldCpp 1.52 as later
|
@@ -76,12 +74,12 @@ These Mixtral GGUFs are known to work in:
|
|
76 |
|
77 |
Other clients/libraries, not listed above, may not yet work.
|
78 |
|
79 |
-
<!--
|
80 |
<!-- repositories-available start -->
|
81 |
## Repositories available
|
82 |
|
83 |
-
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/
|
84 |
-
* [2, 3, 4, 5, 6 and 8-bit
|
85 |
* [Eric Hartford's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/dolphin-2.5-mixtral-8x7b)
|
86 |
<!-- repositories-available end -->
|
87 |
|
@@ -100,10 +98,10 @@ Other clients/libraries, not listed above, may not yet work.
|
|
100 |
<!-- prompt-template end -->
|
101 |
|
102 |
|
103 |
-
<!--
|
104 |
## Compatibility
|
105 |
|
106 |
-
These Mixtral
|
107 |
|
108 |
## Explanation of quantisation methods
|
109 |
|
@@ -120,30 +118,30 @@ The new methods available are:
|
|
120 |
|
121 |
Refer to the Provided Files table below to see what files use which methods, and how.
|
122 |
</details>
|
123 |
-
<!--
|
124 |
|
125 |
-
<!--
|
126 |
## Provided files
|
127 |
|
128 |
| Name | Quant method | Bits | Size | Max RAM required | Use case |
|
129 |
| ---- | ---- | ---- | ---- | ---- | ----- |
|
130 |
-
| [dolphin-2.5-mixtral-8x7b.Q2_K.
|
131 |
-
| [dolphin-2.5-mixtral-8x7b.Q3_K_M.
|
132 |
-
| [dolphin-2.5-mixtral-8x7b.Q4_0.
|
133 |
-
| [dolphin-2.5-mixtral-8x7b.Q4_K_M.
|
134 |
-
| [dolphin-2.5-mixtral-8x7b.Q5_0.
|
135 |
-
| [dolphin-2.5-mixtral-8x7b.Q5_K_M.
|
136 |
-
| [dolphin-2.5-mixtral-8x7b.Q6_K.
|
137 |
-
| [dolphin-2.5-mixtral-8x7b.Q8_0.
|
138 |
|
139 |
**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.
|
140 |
|
141 |
|
142 |
|
143 |
-
<!--
|
144 |
|
145 |
-
<!--
|
146 |
-
## How to download
|
147 |
|
148 |
**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.
|
149 |
|
@@ -155,7 +153,7 @@ The following clients/libraries will automatically download models for you, prov
|
|
155 |
|
156 |
### In `text-generation-webui`
|
157 |
|
158 |
-
Under Download Model, you can enter the model repo:
|
159 |
|
160 |
Then click Download.
|
161 |
|
@@ -170,7 +168,7 @@ pip3 install huggingface-hub
|
|
170 |
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
171 |
|
172 |
```shell
|
173 |
-
huggingface-cli download
|
174 |
```
|
175 |
|
176 |
<details>
|
@@ -179,7 +177,7 @@ huggingface-cli download TheBloke/dolphin-2.5-mixtral-8x7b-GGUF dolphin-2.5-mixt
|
|
179 |
You can also download multiple files at once with a pattern:
|
180 |
|
181 |
```shell
|
182 |
-
huggingface-cli download
|
183 |
```
|
184 |
|
185 |
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).
|
@@ -193,25 +191,25 @@ pip3 install hf_transfer
|
|
193 |
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
194 |
|
195 |
```shell
|
196 |
-
HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download
|
197 |
```
|
198 |
|
199 |
Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
|
200 |
</details>
|
201 |
-
<!--
|
202 |
|
203 |
-
<!--
|
204 |
## Example `llama.cpp` command
|
205 |
|
206 |
Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
|
207 |
|
208 |
```shell
|
209 |
-
./main -ngl 35 -m dolphin-2.5-mixtral-8x7b.Q4_K_M.
|
210 |
```
|
211 |
|
212 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
213 |
|
214 |
-
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
|
215 |
|
216 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
217 |
|
@@ -219,13 +217,13 @@ For other parameters and how to use them, please refer to [the llama.cpp documen
|
|
219 |
|
220 |
## How to run in `text-generation-webui`
|
221 |
|
222 |
-
Note that text-generation-webui may not yet be compatible with Mixtral
|
223 |
|
224 |
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).
|
225 |
|
226 |
## How to run from Python code
|
227 |
|
228 |
-
You can use
|
229 |
|
230 |
### How to load this model in Python code, using llama-cpp-python
|
231 |
|
@@ -261,7 +259,7 @@ from llama_cpp import Llama
|
|
261 |
|
262 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
263 |
llm = Llama(
|
264 |
-
model_path="./dolphin-2.5-mixtral-8x7b.Q4_K_M.
|
265 |
n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources
|
266 |
n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
|
267 |
n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
|
@@ -277,7 +275,7 @@ output = llm(
|
|
277 |
|
278 |
# Chat Completion API
|
279 |
|
280 |
-
llm = Llama(model_path="./dolphin-2.5-mixtral-8x7b.Q4_K_M.
|
281 |
llm.create_chat_completion(
|
282 |
messages = [
|
283 |
{"role": "system", "content": "You are a story writing assistant."},
|
@@ -295,7 +293,7 @@ Here are guides on using llama-cpp-python and ctransformers with LangChain:
|
|
295 |
|
296 |
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
297 |
|
298 |
-
<!--
|
299 |
|
300 |
<!-- footer start -->
|
301 |
<!-- 200823 -->
|
@@ -303,31 +301,23 @@ Here are guides on using llama-cpp-python and ctransformers with LangChain:
|
|
303 |
|
304 |
For further support, and discussions on these models and AI in general, join us at:
|
305 |
|
306 |
-
[
|
307 |
|
308 |
## Thanks, and how to contribute
|
309 |
|
310 |
-
Thanks to the [chirper.ai](https://chirper.ai) team!
|
311 |
|
312 |
-
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
313 |
|
314 |
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.
|
315 |
|
316 |
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.
|
317 |
|
318 |
-
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
319 |
|
320 |
-
* Patreon: https://patreon.com/TheBlokeAI
|
321 |
-
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
322 |
|
323 |
-
**Special thanks to**: Aemon Algiz.
|
324 |
|
325 |
-
**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
|
326 |
|
327 |
|
328 |
-
Thank you to all my generous patrons and donaters!
|
329 |
|
330 |
-
And thank you again to
|
331 |
|
332 |
<!-- footer end -->
|
333 |
|
@@ -402,7 +392,6 @@ Dolphin 3.0 dataset is in progress, and will include:
|
|
402 |
- enhanced Agent cases like Autogen, Memgpt, Functions
|
403 |
- enhanced role-playing
|
404 |
|
405 |
-
[If you would like to financially support my efforts](https://ko-fi.com/erichartford)
|
406 |
|
407 |
[swag](https://fa7113.myshopify.com/)
|
408 |
|
|
|
34 |
<!-- header start -->
|
35 |
<!-- 200823 -->
|
36 |
<div style="width: auto; margin-left: auto; margin-right: auto">
|
|
|
37 |
</div>
|
38 |
<div style="display: flex; justify-content: space-between; width: 100%;">
|
39 |
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
40 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/FwAVVu7eJ4">Chat & support: jartine's Discord server</a></p>
|
41 |
</div>
|
42 |
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
|
|
43 |
</div>
|
44 |
</div>
|
45 |
+
<div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">jartine's LLM work is generously supported by a grant from <a href="https://mozilla.org">mozilla</a></p></div>
|
46 |
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
47 |
<!-- header end -->
|
48 |
|
49 |
+
# Dolphin 2.5 Mixtral 8X7B - llamafile
|
50 |
- Model creator: [Eric Hartford](https://huggingface.co/ehartford)
|
51 |
- Original model: [Dolphin 2.5 Mixtral 8X7B](https://huggingface.co/ehartford/dolphin-2.5-mixtral-8x7b)
|
52 |
|
53 |
<!-- description start -->
|
54 |
## Description
|
55 |
|
56 |
+
This repo contains llamafile format model files for [Eric Hartford's Dolphin 2.5 Mixtral 8X7B](https://huggingface.co/ehartford/dolphin-2.5-mixtral-8x7b).
|
57 |
|
58 |
+
WARNING: This README may contain inaccuracies. It was generated automatically by forking <a href=/TheBloke/dolphin-2.5-mixtral-8x7b-GGUF>TheBloke/dolphin-2.5-mixtral-8x7b-GGUF</a> and piping the README through sed. Errors should be reported to jartine, and do not reflect TheBloke. You can also support his work on [Patreon](https://www.patreon.com/TheBlokeAI).
|
59 |
+
<!-- README_llamafile.md-about-llamafile start -->
|
60 |
+
### About llamafile
|
61 |
|
62 |
+
llamafile is a new format introduced by Mozilla Ocho on Nov 20th 2023. It uses Cosmopolitan Libc to turn LLM weights into runnable llama.cpp binaries that run on the stock installs of six OSes for both ARM64 and AMD64.
|
63 |
|
64 |
+
### Mixtral llamafile
|
65 |
|
66 |
Support for Mixtral was merged into Llama.cpp on December 13th.
|
67 |
|
68 |
+
These Mixtral llamafiles are known to work in:
|
69 |
|
70 |
* llama.cpp as of December 13th
|
71 |
* KoboldCpp 1.52 as later
|
|
|
74 |
|
75 |
Other clients/libraries, not listed above, may not yet work.
|
76 |
|
77 |
+
<!-- README_llamafile.md-about-llamafile end -->
|
78 |
<!-- repositories-available start -->
|
79 |
## Repositories available
|
80 |
|
81 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-GPTQ)
|
82 |
+
* [2, 3, 4, 5, 6 and 8-bit llamafile models for CPU+GPU inference](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-llamafile)
|
83 |
* [Eric Hartford's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/dolphin-2.5-mixtral-8x7b)
|
84 |
<!-- repositories-available end -->
|
85 |
|
|
|
98 |
<!-- prompt-template end -->
|
99 |
|
100 |
|
101 |
+
<!-- compatibility_llamafile start -->
|
102 |
## Compatibility
|
103 |
|
104 |
+
These Mixtral llamafiles are compatible with llama.cpp from December 13th onwards. Other clients/libraries may not work yet.
|
105 |
|
106 |
## Explanation of quantisation methods
|
107 |
|
|
|
118 |
|
119 |
Refer to the Provided Files table below to see what files use which methods, and how.
|
120 |
</details>
|
121 |
+
<!-- compatibility_llamafile end -->
|
122 |
|
123 |
+
<!-- README_llamafile.md-provided-files start -->
|
124 |
## Provided files
|
125 |
|
126 |
| Name | Quant method | Bits | Size | Max RAM required | Use case |
|
127 |
| ---- | ---- | ---- | ---- | ---- | ----- |
|
128 |
+
| [dolphin-2.5-mixtral-8x7b.Q2_K.llamafile](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-llamafile/blob/main/dolphin-2.5-mixtral-8x7b.Q2_K.llamafile) | Q2_K | 2 | 15.64 GB| 18.14 GB | smallest, significant quality loss - not recommended for most purposes |
|
129 |
+
| [dolphin-2.5-mixtral-8x7b.Q3_K_M.llamafile](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-llamafile/blob/main/dolphin-2.5-mixtral-8x7b.Q3_K_M.llamafile) | Q3_K_M | 3 | 20.36 GB| 22.86 GB | very small, high quality loss |
|
130 |
+
| [dolphin-2.5-mixtral-8x7b.Q4_0.llamafile](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-llamafile/blob/main/dolphin-2.5-mixtral-8x7b.Q4_0.llamafile) | Q4_0 | 4 | 26.44 GB| 28.94 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
|
131 |
+
| [dolphin-2.5-mixtral-8x7b.Q4_K_M.llamafile](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-llamafile/blob/main/dolphin-2.5-mixtral-8x7b.Q4_K_M.llamafile) | Q4_K_M | 4 | 26.44 GB| 28.94 GB | medium, balanced quality - recommended |
|
132 |
+
| [dolphin-2.5-mixtral-8x7b.Q5_0.llamafile](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-llamafile/blob/main/dolphin-2.5-mixtral-8x7b.Q5_0.llamafile) | Q5_0 | 5 | 32.23 GB| 34.73 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
|
133 |
+
| [dolphin-2.5-mixtral-8x7b.Q5_K_M.llamafile](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-llamafile/blob/main/dolphin-2.5-mixtral-8x7b.Q5_K_M.llamafile) | Q5_K_M | 5 | 32.23 GB| 34.73 GB | large, very low quality loss - recommended |
|
134 |
+
| [dolphin-2.5-mixtral-8x7b.Q6_K.llamafile](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-llamafile/blob/main/dolphin-2.5-mixtral-8x7b.Q6_K.llamafile) | Q6_K | 6 | 38.38 GB| 40.88 GB | very large, extremely low quality loss |
|
135 |
+
| [dolphin-2.5-mixtral-8x7b.Q8_0.llamafile](https://huggingface.co/jartine/dolphin-2.5-mixtral-8x7b-llamafile/blob/main/dolphin-2.5-mixtral-8x7b.Q8_0.llamafile) | Q8_0 | 8 | 49.62 GB| 52.12 GB | very large, extremely low quality loss - not recommended |
|
136 |
|
137 |
**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.
|
138 |
|
139 |
|
140 |
|
141 |
+
<!-- README_llamafile.md-provided-files end -->
|
142 |
|
143 |
+
<!-- README_llamafile.md-how-to-download start -->
|
144 |
+
## How to download llamafile files
|
145 |
|
146 |
**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.
|
147 |
|
|
|
153 |
|
154 |
### In `text-generation-webui`
|
155 |
|
156 |
+
Under Download Model, you can enter the model repo: jartine/dolphin-2.5-mixtral-8x7b-llamafile and below it, a specific filename to download, such as: dolphin-2.5-mixtral-8x7b.Q4_K_M.llamafile.
|
157 |
|
158 |
Then click Download.
|
159 |
|
|
|
168 |
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
169 |
|
170 |
```shell
|
171 |
+
huggingface-cli download jartine/dolphin-2.5-mixtral-8x7b-llamafile dolphin-2.5-mixtral-8x7b.Q4_K_M.llamafile --local-dir . --local-dir-use-symlinks False
|
172 |
```
|
173 |
|
174 |
<details>
|
|
|
177 |
You can also download multiple files at once with a pattern:
|
178 |
|
179 |
```shell
|
180 |
+
huggingface-cli download jartine/dolphin-2.5-mixtral-8x7b-llamafile --local-dir . --local-dir-use-symlinks False --include='*Q4_K*llamafile'
|
181 |
```
|
182 |
|
183 |
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).
|
|
|
191 |
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
192 |
|
193 |
```shell
|
194 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download jartine/dolphin-2.5-mixtral-8x7b-llamafile dolphin-2.5-mixtral-8x7b.Q4_K_M.llamafile --local-dir . --local-dir-use-symlinks False
|
195 |
```
|
196 |
|
197 |
Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
|
198 |
</details>
|
199 |
+
<!-- README_llamafile.md-how-to-download end -->
|
200 |
|
201 |
+
<!-- README_llamafile.md-how-to-run start -->
|
202 |
## Example `llama.cpp` command
|
203 |
|
204 |
Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
|
205 |
|
206 |
```shell
|
207 |
+
./main -ngl 35 -m dolphin-2.5-mixtral-8x7b.Q4_K_M.llamafile --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant"
|
208 |
```
|
209 |
|
210 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
211 |
|
212 |
+
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 llamafile file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.
|
213 |
|
214 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
215 |
|
|
|
217 |
|
218 |
## How to run in `text-generation-webui`
|
219 |
|
220 |
+
Note that text-generation-webui may not yet be compatible with Mixtral llamafiles. Please check compatibility first.
|
221 |
|
222 |
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).
|
223 |
|
224 |
## How to run from Python code
|
225 |
|
226 |
+
You can use llamafile models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) version 0.2.23 and later.
|
227 |
|
228 |
### How to load this model in Python code, using llama-cpp-python
|
229 |
|
|
|
259 |
|
260 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
261 |
llm = Llama(
|
262 |
+
model_path="./dolphin-2.5-mixtral-8x7b.Q4_K_M.llamafile", # Download the model file first
|
263 |
n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources
|
264 |
n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
|
265 |
n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
|
|
|
275 |
|
276 |
# Chat Completion API
|
277 |
|
278 |
+
llm = Llama(model_path="./dolphin-2.5-mixtral-8x7b.Q4_K_M.llamafile", chat_format="llama-2") # Set chat_format according to the model you are using
|
279 |
llm.create_chat_completion(
|
280 |
messages = [
|
281 |
{"role": "system", "content": "You are a story writing assistant."},
|
|
|
293 |
|
294 |
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
295 |
|
296 |
+
<!-- README_llamafile.md-how-to-run end -->
|
297 |
|
298 |
<!-- footer start -->
|
299 |
<!-- 200823 -->
|
|
|
301 |
|
302 |
For further support, and discussions on these models and AI in general, join us at:
|
303 |
|
304 |
+
[jartine AI's Discord server](https://discord.gg/FwAVVu7eJ4)
|
305 |
|
306 |
## Thanks, and how to contribute
|
307 |
|
|
|
308 |
|
|
|
309 |
|
310 |
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.
|
311 |
|
312 |
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.
|
313 |
|
|
|
314 |
|
|
|
|
|
315 |
|
|
|
316 |
|
|
|
317 |
|
318 |
|
|
|
319 |
|
320 |
+
And thank you again to mozilla for their generous grant.
|
321 |
|
322 |
<!-- footer end -->
|
323 |
|
|
|
392 |
- enhanced Agent cases like Autogen, Memgpt, Functions
|
393 |
- enhanced role-playing
|
394 |
|
|
|
395 |
|
396 |
[swag](https://fa7113.myshopify.com/)
|
397 |
|