Commit
·
19afbf3
1
Parent(s):
1f4c93a
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,47 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: mit
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
pipeline_tag: text-generation
|
3 |
+
inference: false
|
4 |
+
tags:
|
5 |
+
- zephyr
|
6 |
+
- mlx
|
7 |
+
language:
|
8 |
+
- en
|
9 |
license: mit
|
10 |
+
library_name: mlx
|
11 |
---
|
12 |
+
|
13 |
+
# Zephyr 7B β (✨ 4-bit)
|
14 |
+
|
15 |
+
Zephyr is a series of language models that are trained to act as helpful assistants. Zephyr-7B-β is the second model in the series, and is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) that was trained on on a mix of publicly available, synthetic datasets using [Direct Preference Optimization (DPO)](https://arxiv.org/abs/2305.18290). We found that removing the in-built alignment of these datasets boosted performance on [MT Bench](https://huggingface.co/spaces/lmsys/mt-bench) and made the model more helpful. However, this means that model is likely to generate problematic text when prompted to do so. You can find more details in the [technical report](https://arxiv.org/abs/2310.16944).
|
16 |
+
|
17 |
+
This repository contains the `zephyr-7b-beta` weights in `npz` format in 4-bit suitable for use with Apple's MLX framework (from 0.6.0 onwards).
|
18 |
+
|
19 |
+
## Use with MLX
|
20 |
+
|
21 |
+
```bash
|
22 |
+
pip install mlx
|
23 |
+
pip install huggingface_hub hf_transfer
|
24 |
+
git clone https://github.com/ml-explore/mlx-examples.git
|
25 |
+
cd mlx-examples
|
26 |
+
|
27 |
+
# Download model
|
28 |
+
export HF_HUB_ENABLE_HF_TRANSFER=1
|
29 |
+
huggingface-cli download --local-dir-use-symlinks False --local-dir zephyr-7b-beta-4-bit mlx-community/zephyr-7b-beta-4-bit
|
30 |
+
|
31 |
+
# Run example
|
32 |
+
python llms/mistral/mistral.py --model-path zephyr-7b-beta-4-bit --prompt "My name is"
|
33 |
+
```
|
34 |
+
|
35 |
+
Please, refer to the [original model card](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) for more details on Zephyr 7B β.
|
36 |
+
|
37 |
+
## Prompt Format
|
38 |
+
|
39 |
+
Please note that this model expects a specific prompt structure. Here is an example:
|
40 |
+
|
41 |
+
```
|
42 |
+
<|system|>
|
43 |
+
You are a pirate chatbot who always responds with Arr!</s>
|
44 |
+
<|user|>
|
45 |
+
There's a llama on my lawn, how can I get rid of him?</s>
|
46 |
+
<|assistant|>
|
47 |
+
```
|