hurongliang commited on
Commit
432b435
1 Parent(s): b1c852c
Files changed (11) hide show
  1. README.md +34 -0
  2. config.json +19 -0
  3. tokenizer.model +3 -0
  4. weights.0.npz +3 -0
  5. weights.1.npz +3 -0
  6. weights.2.npz +3 -0
  7. weights.3.npz +3 -0
  8. weights.4.npz +3 -0
  9. weights.5.npz +3 -0
  10. weights.6.npz +3 -0
  11. weights.7.npz +3 -0
README.md CHANGED
@@ -1,3 +1,37 @@
1
  ---
2
  license: apache-2.0
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ inference: false
4
+ library_name: mlx
5
  ---
6
+
7
+ # Model Card for Mixtral-8x7B 4 bit
8
+
9
+ The Mixtral-8x7B Large Language Model (LLM) is a pretrained generative Sparse Mixture of Experts. The Mixtral-8x7B outperforms Llama 2 70B on most benchmarks we tested.
10
+
11
+ For full details of this model please read our [release blog post](https://mistral.ai/news/mixtral-of-experts/).
12
+
13
+ ## Instruction format
14
+
15
+ This format must be strictly respected, otherwise the model will generate sub-optimal outputs.
16
+
17
+ The template used to build a prompt for the Instruct model is defined as follows:
18
+ ```
19
+ <s> [INST] Instruction [/INST] Model answer</s> [INST] Follow-up instruction [/INST]
20
+ ```
21
+ Note that `<s>` and `</s>` are special tokens for beginning of string (BOS) and end of string (EOS) while [INST] and [/INST] are regular strings.
22
+
23
+ ## Run the model
24
+
25
+ ```bash
26
+ # Install mlx, mlx-examples, huggingface-cli
27
+ pip install mlx
28
+ pip install huggingface_hub hf_transfer
29
+ git clone https://github.com/ml-explore/mlx-examples.git
30
+
31
+ # Download model
32
+ export HF_HUB_ENABLE_HF_TRANSFER=1
33
+ huggingface-cli download --local-dir Mixtral-8x7B-Instruct-v0.1-4-bit https://huggingface.co/hurongliang/Mixtral-8x7B-Instruct-v0.1-4-bit
34
+
35
+ # Run example
36
+ python mlx-examples/llms/mixtral/mixtral.py --model_path Mixtral-8x7B-Instruct-v0.1-4-bit
37
+ ```
config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dim": 4096,
3
+ "n_layers": 32,
4
+ "head_dim": 128,
5
+ "hidden_dim": 14336,
6
+ "n_heads": 32,
7
+ "n_kv_heads": 8,
8
+ "norm_eps": 1e-05,
9
+ "vocab_size": 32000,
10
+ "moe": {
11
+ "num_experts_per_tok": 2,
12
+ "num_experts": 8
13
+ },
14
+ "quantization": {
15
+ "group_size": 64,
16
+ "bits": 4
17
+ },
18
+ "model_type": "mixtral"
19
+ }
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
3
+ size 493443
weights.0.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:527927721a735aa0eb9a539b164dc9f9ba79e7d76e33d046cc96cd97b80e37d5
3
+ size 3601584424
weights.1.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5920ffee12ebc6f970e502fa1f3c2821b24039c23ed3b76ee830e94c527e2adc
3
+ size 3601584424
weights.2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc52bf84d4a5ff6f13e2dc87b4d19ee6da3b79b278588973dae321a70cd106d3
3
+ size 3601584772
weights.3.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a98570f0c2456d613ff975c3635340aefd2f0b48856291e76b060ef5ebc2f12
3
+ size 3601585120
weights.4.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d38cfe4ab8f91adfb39fb2b030f0c367f248d2dc9ec366bc92fc883b633996e
3
+ size 3601585120
weights.5.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02d5faab866d587a69eb6686ef83d4e233fa99e86e859f57137e40592653ca8c
3
+ size 3601585120
weights.6.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eee13a3035f6ad3808376a55d3e2c6b5be713b546533dc64af5ca645005c2c1c
3
+ size 3601585120
weights.7.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebf0780fd807327750538e4b01d3ed4163bbe8fd3efdc54c7c371e923f27aa18
3
+ size 3601585120