Upload folder using huggingface_hub
Browse files- README.md +27 -0
- config.json +33 -0
- model-00001-of-00015.safetensors +3 -0
- model-00002-of-00015.safetensors +3 -0
- model-00003-of-00015.safetensors +3 -0
- model-00004-of-00015.safetensors +3 -0
- model-00005-of-00015.safetensors +3 -0
- model-00006-of-00015.safetensors +3 -0
- model-00007-of-00015.safetensors +3 -0
- model-00008-of-00015.safetensors +3 -0
- model-00009-of-00015.safetensors +3 -0
- model-00010-of-00015.safetensors +3 -0
- model-00011-of-00015.safetensors +3 -0
- model-00012-of-00015.safetensors +3 -0
- model-00013-of-00015.safetensors +3 -0
- model-00014-of-00015.safetensors +3 -0
- model-00015-of-00015.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +23 -0
- tokenizer.json +0 -0
- tokenizer_config.json +108 -0
README.md
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
- es
|
5 |
+
- it
|
6 |
+
- de
|
7 |
+
- fr
|
8 |
+
license: apache-2.0
|
9 |
+
tags:
|
10 |
+
- mlx
|
11 |
+
---
|
12 |
+
|
13 |
+
# lucataco/Mixtral-8x22B-Instruct-v0.1-4bit
|
14 |
+
This model was converted to MLX format from [`mistralai/Mixtral-8x22B-Instruct-v0.1`]() using mlx-lm version **0.10.0**.
|
15 |
+
Refer to the [original model card](https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1) for more details on the model.
|
16 |
+
## Use with mlx
|
17 |
+
|
18 |
+
```bash
|
19 |
+
pip install mlx-lm
|
20 |
+
```
|
21 |
+
|
22 |
+
```python
|
23 |
+
from mlx_lm import load, generate
|
24 |
+
|
25 |
+
model, tokenizer = load("lucataco/Mixtral-8x22B-Instruct-v0.1-4bit")
|
26 |
+
response = generate(model, tokenizer, prompt="hello", verbose=True)
|
27 |
+
```
|
config.json
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"MixtralForCausalLM"
|
4 |
+
],
|
5 |
+
"attention_dropout": 0.0,
|
6 |
+
"bos_token_id": 1,
|
7 |
+
"eos_token_id": 2,
|
8 |
+
"hidden_act": "silu",
|
9 |
+
"hidden_size": 6144,
|
10 |
+
"initializer_range": 0.02,
|
11 |
+
"intermediate_size": 16384,
|
12 |
+
"max_position_embeddings": 65536,
|
13 |
+
"model_type": "mixtral",
|
14 |
+
"num_attention_heads": 48,
|
15 |
+
"num_experts_per_tok": 2,
|
16 |
+
"num_hidden_layers": 56,
|
17 |
+
"num_key_value_heads": 8,
|
18 |
+
"num_local_experts": 8,
|
19 |
+
"output_router_logits": false,
|
20 |
+
"quantization": {
|
21 |
+
"group_size": 64,
|
22 |
+
"bits": 4
|
23 |
+
},
|
24 |
+
"rms_norm_eps": 1e-05,
|
25 |
+
"rope_theta": 1000000.0,
|
26 |
+
"router_aux_loss_coef": 0.001,
|
27 |
+
"sliding_window": null,
|
28 |
+
"tie_word_embeddings": false,
|
29 |
+
"torch_dtype": "bfloat16",
|
30 |
+
"transformers_version": "4.38.0",
|
31 |
+
"use_cache": true,
|
32 |
+
"vocab_size": 32768
|
33 |
+
}
|
model-00001-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e6bdf29f101a44a040c1f856aaefece1c47f3e9fa0d9b545d0ed90615fb4283e
|
3 |
+
size 5351109671
|
model-00002-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3d122c7facaadb39dd3ba9010848eff4ac0d78932489f52cf8d5e0fef8857518
|
3 |
+
size 5351134955
|
model-00003-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:81be7d66d18416c5b1a1b57e167c8cf2fd19f94d3d6cce1d4bae181f648bb8a3
|
3 |
+
size 5351135076
|
model-00004-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:48c01a097f07fb8dcbed080570ff8fe0e0e6085222f5fb617f9868260601cea4
|
3 |
+
size 5351135284
|
model-00005-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f06aaa7f54c4ff95ea1bc393b07004c25840a8351f7fb5cb25d3aa2613a9607f
|
3 |
+
size 5358159409
|
model-00006-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f7bc9827262558d43057b8b964f7d20a9f8df38c0824a6cfeae9a3cba28f933c
|
3 |
+
size 5351135308
|
model-00007-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:99fefff1394761b88e1cca295f474e4e5e64f053a4fd07ed2a00a1dbc47c833d
|
3 |
+
size 5351135298
|
model-00008-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5438d82e2baf0ca348f4704cad41b187307e214052151570377161399c96c9d6
|
3 |
+
size 5351135270
|
model-00009-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:14576b26b3feb0cf0a91783b8b940bdf0e2ed0dd318ebf3618aa11b557118083
|
3 |
+
size 5351135236
|
model-00010-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5212cf97edca24b788bf28c39e779779e0e7f1e5213c4601b0675f4755206f1f
|
3 |
+
size 5358159365
|
model-00011-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4a9ffc9602a5c9a61f7f3667bbaec731d9f88dbb0a922132da810b58d5644452
|
3 |
+
size 5351135294
|
model-00012-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5d1db95f7fe2ccd8a36c2bd101de4dc874fef4e81486d8e9c202213f8806339a
|
3 |
+
size 5351135318
|
model-00013-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6cc2987c0f67cd254cd57814f9e40623498dce43da49e6bddd68b0b5e9e79ddc
|
3 |
+
size 5351135282
|
model-00014-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d3cb64fa52dbf65a098a3baa30876866021ee35cda8b529d17867197f41e2f82
|
3 |
+
size 5351135266
|
model-00015-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8ad7c3b04d21c33b86846cf250e0fb35ecbe5f98e65fc1d4bbcfc5adf19189d6
|
3 |
+
size 4176126827
|
model.safetensors.index.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
special_tokens_map.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"unk_token": {
|
17 |
+
"content": "<unk>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
}
|
23 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": false,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<unk>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": true,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": true,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": true,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
},
|
29 |
+
"3": {
|
30 |
+
"content": "[INST]",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": true,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"4": {
|
38 |
+
"content": "[/INST]",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
},
|
45 |
+
"5": {
|
46 |
+
"content": "[TOOL_CALLS]",
|
47 |
+
"lstrip": false,
|
48 |
+
"normalized": true,
|
49 |
+
"rstrip": false,
|
50 |
+
"single_word": false,
|
51 |
+
"special": true
|
52 |
+
},
|
53 |
+
"6": {
|
54 |
+
"content": "[AVAILABLE_TOOLS]",
|
55 |
+
"lstrip": false,
|
56 |
+
"normalized": true,
|
57 |
+
"rstrip": false,
|
58 |
+
"single_word": false,
|
59 |
+
"special": true
|
60 |
+
},
|
61 |
+
"7": {
|
62 |
+
"content": "[/AVAILABLE_TOOLS]",
|
63 |
+
"lstrip": false,
|
64 |
+
"normalized": true,
|
65 |
+
"rstrip": false,
|
66 |
+
"single_word": false,
|
67 |
+
"special": true
|
68 |
+
},
|
69 |
+
"8": {
|
70 |
+
"content": "[TOOL_RESULTS]",
|
71 |
+
"lstrip": false,
|
72 |
+
"normalized": true,
|
73 |
+
"rstrip": false,
|
74 |
+
"single_word": false,
|
75 |
+
"special": true
|
76 |
+
},
|
77 |
+
"9": {
|
78 |
+
"content": "[/TOOL_RESULTS]",
|
79 |
+
"lstrip": false,
|
80 |
+
"normalized": true,
|
81 |
+
"rstrip": false,
|
82 |
+
"single_word": false,
|
83 |
+
"special": true
|
84 |
+
}
|
85 |
+
},
|
86 |
+
"additional_special_tokens": [],
|
87 |
+
"bos_token": "<s>",
|
88 |
+
"chat_template": [
|
89 |
+
{
|
90 |
+
"name": "default",
|
91 |
+
"template": "{{bos_token}}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ ' [INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + message['content'] + ' ' + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}"
|
92 |
+
},
|
93 |
+
{
|
94 |
+
"name": "tool_use",
|
95 |
+
"template": "{{bos_token}}{% set user_messages = messages | selectattr('role', 'equalto', 'user') | list %}{% for message in messages %}{% if message['role'] == 'user' %}{% if message == user_messages[-1] %}{{ '[AVAILABLE_TOOLS]'}}{% for tool in tools %}{{ tool }}{% endfor %}{{ '[/AVAILABLE_TOOLS]'}}{{ '[INST]' + message['content'] + '[/INST]' }}{% else %}{{ '[INST]' + message['content'] + '[/INST]' }}{% endif %}{% elif message['role'] == 'assistant' %}{{ ' ' + message['content'] + ' ' + eos_token}}{% elif message['role'] == 'tool_results' %}{{'[TOOL_RESULTS]' + message['content']|string + '[/TOOL_RESULTS]'}}{% elif message['role'] == 'tool_calls' %}{{'[TOOL_CALLS]' + message['content']|string + eos_token}}{% endif %}{% endfor %}"
|
96 |
+
}
|
97 |
+
],
|
98 |
+
"clean_up_tokenization_spaces": false,
|
99 |
+
"eos_token": "</s>",
|
100 |
+
"legacy": true,
|
101 |
+
"model_max_length": 1000000000000000019884624838656,
|
102 |
+
"pad_token": null,
|
103 |
+
"sp_model_kwargs": {},
|
104 |
+
"spaces_between_special_tokens": false,
|
105 |
+
"tokenizer_class": "LlamaTokenizer",
|
106 |
+
"unk_token": "<unk>",
|
107 |
+
"use_default_system_prompt": false
|
108 |
+
}
|