fd5e4dca535e8d001f91b5baf1336c188739846ec84c0d6958e2e84aa51d5bfb
Browse files- README.md +7 -3
- config.json +1 -55
- model-00016-of-00016.safetensors +3 -0
- model.safetensors.index.json +0 -0
- tokenizer.json +4 -4
- tokenizer_config.json +14 -5
README.md
CHANGED
@@ -1,15 +1,19 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
3 |
tags:
|
4 |
- mlx
|
5 |
---
|
6 |
|
7 |
# mlx-community/Mixtral-8x22B-Instruct-v0.1-4bit
|
8 |
-
This model was converted to MLX format from [`mistralai/Mixtral-8x22B-Instruct-v0.1`]() using mlx-lm version **0.9.0**.
|
9 |
|
10 |
-
Model
|
11 |
|
12 |
-
Refer to the [original model card](https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1) for more details on the model.
|
13 |
## Use with mlx
|
14 |
|
15 |
```bash
|
|
|
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 |
# mlx-community/Mixtral-8x22B-Instruct-v0.1-4bit
|
|
|
14 |
|
15 |
+
The Model [mlx-community/Mixtral-8x22B-Instruct-v0.1-4bit](https://huggingface.co/mlx-community/Mixtral-8x22B-Instruct-v0.1-4bit) was converted to MLX format from [mistralai/Mixtral-8x22B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1) using mlx-lm version **0.14.0**.
|
16 |
|
|
|
17 |
## Use with mlx
|
18 |
|
19 |
```bash
|
config.json
CHANGED
@@ -1,87 +1,33 @@
|
|
1 |
{
|
2 |
-
"add_cross_attention": false,
|
3 |
"architectures": [
|
4 |
"MixtralForCausalLM"
|
5 |
],
|
6 |
"attention_dropout": 0.0,
|
7 |
-
"bad_words_ids": null,
|
8 |
-
"begin_suppress_tokens": null,
|
9 |
"bos_token_id": 1,
|
10 |
-
"chunk_size_feed_forward": 0,
|
11 |
-
"cross_attention_hidden_size": null,
|
12 |
-
"decoder_start_token_id": null,
|
13 |
-
"diversity_penalty": 0.0,
|
14 |
-
"do_sample": false,
|
15 |
-
"early_stopping": false,
|
16 |
-
"encoder_no_repeat_ngram_size": 0,
|
17 |
"eos_token_id": 2,
|
18 |
-
"exponential_decay_length_penalty": null,
|
19 |
-
"finetuning_task": null,
|
20 |
-
"forced_bos_token_id": null,
|
21 |
-
"forced_eos_token_id": null,
|
22 |
"hidden_act": "silu",
|
23 |
"hidden_size": 6144,
|
24 |
-
"id2label": {
|
25 |
-
"0": "LABEL_0",
|
26 |
-
"1": "LABEL_1"
|
27 |
-
},
|
28 |
"initializer_range": 0.02,
|
29 |
"intermediate_size": 16384,
|
30 |
-
"is_decoder": false,
|
31 |
-
"is_encoder_decoder": false,
|
32 |
-
"label2id": {
|
33 |
-
"LABEL_0": 0,
|
34 |
-
"LABEL_1": 1
|
35 |
-
},
|
36 |
-
"length_penalty": 1.0,
|
37 |
-
"max_length": 20,
|
38 |
"max_position_embeddings": 65536,
|
39 |
-
"min_length": 0,
|
40 |
"model_type": "mixtral",
|
41 |
-
"no_repeat_ngram_size": 0,
|
42 |
"num_attention_heads": 48,
|
43 |
-
"num_beam_groups": 1,
|
44 |
-
"num_beams": 1,
|
45 |
"num_experts_per_tok": 2,
|
46 |
"num_hidden_layers": 56,
|
47 |
"num_key_value_heads": 8,
|
48 |
"num_local_experts": 8,
|
49 |
-
"num_return_sequences": 1,
|
50 |
-
"output_attentions": false,
|
51 |
-
"output_hidden_states": false,
|
52 |
"output_router_logits": false,
|
53 |
-
"output_scores": false,
|
54 |
-
"pad_token_id": null,
|
55 |
-
"prefix": null,
|
56 |
-
"problem_type": null,
|
57 |
-
"pruned_heads": {},
|
58 |
"quantization": {
|
59 |
"group_size": 64,
|
60 |
"bits": 4
|
61 |
},
|
62 |
-
"remove_invalid_values": false,
|
63 |
-
"repetition_penalty": 1.0,
|
64 |
-
"return_dict": true,
|
65 |
-
"return_dict_in_generate": false,
|
66 |
"rms_norm_eps": 1e-05,
|
67 |
"rope_theta": 1000000.0,
|
68 |
"router_aux_loss_coef": 0.001,
|
69 |
-
"sep_token_id": null,
|
70 |
"sliding_window": null,
|
71 |
-
"suppress_tokens": null,
|
72 |
-
"task_specific_params": null,
|
73 |
-
"temperature": 1.0,
|
74 |
-
"tf_legacy_loss": false,
|
75 |
-
"tie_encoder_decoder": false,
|
76 |
"tie_word_embeddings": false,
|
77 |
-
"tokenizer_class": null,
|
78 |
-
"top_k": 50,
|
79 |
-
"top_p": 1.0,
|
80 |
"torch_dtype": "bfloat16",
|
81 |
-
"
|
82 |
-
"transformers_version": "4.39.3",
|
83 |
-
"typical_p": 1.0,
|
84 |
-
"use_bfloat16": false,
|
85 |
"use_cache": true,
|
86 |
"vocab_size": 32768
|
87 |
}
|
|
|
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-00016-of-00016.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cef97915a74a5e172c21766b15e8ae734fdca4368b07bcd08b4455cce4f06357
|
3 |
+
size 1472239423
|
model.safetensors.index.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.json
CHANGED
@@ -76,8 +76,8 @@
|
|
76 |
"special": true
|
77 |
},
|
78 |
{
|
79 |
-
"id":
|
80 |
-
"content": "[
|
81 |
"single_word": false,
|
82 |
"lstrip": false,
|
83 |
"rstrip": false,
|
@@ -85,8 +85,8 @@
|
|
85 |
"special": true
|
86 |
},
|
87 |
{
|
88 |
-
"id":
|
89 |
-
"content": "[
|
90 |
"single_word": false,
|
91 |
"lstrip": false,
|
92 |
"rstrip": false,
|
|
|
76 |
"special": true
|
77 |
},
|
78 |
{
|
79 |
+
"id": 8,
|
80 |
+
"content": "[TOOL_RESULTS]",
|
81 |
"single_word": false,
|
82 |
"lstrip": false,
|
83 |
"rstrip": false,
|
|
|
85 |
"special": true
|
86 |
},
|
87 |
{
|
88 |
+
"id": 9,
|
89 |
+
"content": "[/TOOL_RESULTS]",
|
90 |
"single_word": false,
|
91 |
"lstrip": false,
|
92 |
"rstrip": false,
|
tokenizer_config.json
CHANGED
@@ -66,16 +66,16 @@
|
|
66 |
"single_word": false,
|
67 |
"special": true
|
68 |
},
|
69 |
-
"
|
70 |
-
"content": "[
|
71 |
"lstrip": false,
|
72 |
"normalized": true,
|
73 |
"rstrip": false,
|
74 |
"single_word": false,
|
75 |
"special": true
|
76 |
},
|
77 |
-
"
|
78 |
-
"content": "[
|
79 |
"lstrip": false,
|
80 |
"normalized": true,
|
81 |
"rstrip": false,
|
@@ -85,7 +85,16 @@
|
|
85 |
},
|
86 |
"additional_special_tokens": [],
|
87 |
"bos_token": "<s>",
|
88 |
-
"chat_template":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
"clean_up_tokenization_spaces": false,
|
90 |
"eos_token": "</s>",
|
91 |
"legacy": true,
|
|
|
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,
|
|
|
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] %}{% if tools %}{{'[AVAILABLE_TOOLS]'+ tools|string + '[/AVAILABLE_TOOLS]'}}{% endif %}{{ '[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,
|