Text Generation
MLX
English
mistral
zephyr
File size: 1,554 Bytes
aa8b023
571f4f0
 
 
 
 
 
 
aa8b023
571f4f0
aa8b023
571f4f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
02bc678
571f4f0
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
pipeline_tag: text-generation
inference: false
tags:
- zephyr
- mlx
language:
- en
license: mit
library_name: mlx
---

# Zephyr 7B β

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).

This repository contains the `zephyr-7b-beta` weights in `npz` format suitable for use with Apple's MLX framework.

## Use with MLX

```bash
pip install mlx
pip install huggingface_hub hf_transfer
git clone https://github.com/ml-explore/mlx-examples.git
cd mlx-examples

# Download model
export HF_HUB_ENABLE_HF_TRANSFER=1
huggingface-cli download --local-dir-use-symlinks False --local-dir zephyr-7b-beta alvarobartt/zephyr-7b-beta

# Run example
python llms/mistral/mistral.py --model_path zephyr-7b-beta --prompt "My name is"
```

Please, refer to the [original model card](https://huggingface.co./HuggingFaceH4/zephyr-7b-beta) for more details on Zephyr 7B β.