Skip to content

Commit

Permalink
docs(mixtral): add mixtral example (#1449)
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed Dec 16, 2023
1 parent 2f7beb6 commit 1c286c3
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/configurations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,21 @@ wget https://huggingface.co/mys/ggml_bakllava-1/resolve/main/mmproj-model-f16.gg
curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "llava",
"messages": [{"role": "user", "content": [{"type":"text", "text": "What is in the image?"}, {"type": "image_url", "image_url": {"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg" }}], "temperature": 0.9}]}'
```

### Mixtral

```
cp -r examples/configuration/mixtral/* models/
wget https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF/resolve/main/mixtral-8x7b-instruct-v0.1.Q2_K.gguf -O models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
```

#### Test it out

```
curl http://localhost:8080/v1/completions -H "Content-Type: application/json" -d '{
"model": "mixtral",
"prompt": "How fast is light?",
"temperature": 0.1 }'
```
1 change: 1 addition & 0 deletions examples/configurations/mixtral/mixtral
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[INST] {{.Input}} [/INST]
1 change: 1 addition & 0 deletions examples/configurations/mixtral/mixtral-chat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[INST] {{.Input}} [/INST]
16 changes: 16 additions & 0 deletions examples/configurations/mixtral/mixtral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
context_size: 512
f16: true
threads: 11
gpu_layers: 90
name: mixtral
mmap: true
parameters:
model: mixtral-8x7b-instruct-v0.1.Q2_K.gguf
temperature: 0.2
top_k: 40
top_p: 0.95
batch: 512
tfz: 1.0
template:
chat: mixtral-chat
completion: mixtral

0 comments on commit 1c286c3

Please sign in to comment.