MLX
Safetensors
English
mixtral
prince-canuma commited on
Commit
41658d9
1 Parent(s): dfa4557

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - mlx
7
+ datasets:
8
+ - teknium/OpenHermes-2.5
9
+ base_model: mistral-community/Mixtral-8x22B-v0.1
10
+ ---
11
+
12
+ # mlx-community/mixtral-8x22b-instruct-oh-4bit
13
+ This model was converted to MLX format from [`fireworks-ai/mixtral-8x22b-instruct-oh`]() using mlx-lm version **0.9.0**.
14
+ Refer to the [original model card](https://huggingface.co/fireworks-ai/mixtral-8x22b-instruct-oh) for more details on the model.
15
+ ## Use with mlx
16
+
17
+ ```bash
18
+ pip install mlx-lm
19
+ ```
20
+
21
+ ```python
22
+ from mlx_lm import load, generate
23
+
24
+ model, tokenizer = load("mlx-community/mixtral-8x22b-instruct-oh-4bit")
25
+ response = generate(model, tokenizer, prompt="hello", verbose=True)
26
+ ```
config.json ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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,
68
+ "router_aux_loss_coef": 0.001,
69
+ "router_jitter_noise": 0.0,
70
+ "sep_token_id": null,
71
+ "sliding_window": null,
72
+ "suppress_tokens": null,
73
+ "task_specific_params": null,
74
+ "temperature": 1.0,
75
+ "tf_legacy_loss": false,
76
+ "tie_encoder_decoder": false,
77
+ "tie_word_embeddings": false,
78
+ "tokenizer_class": null,
79
+ "top_k": 50,
80
+ "top_p": 1.0,
81
+ "torch_dtype": "float16",
82
+ "torchscript": false,
83
+ "transformers_version": "4.38.2",
84
+ "typical_p": 1.0,
85
+ "use_bfloat16": false,
86
+ "use_cache": true,
87
+ "vocab_size": 32000
88
+ }
model-00001-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afeb3fa1b3e0f937727eeb2b2fdf984e790418fde3fa514ae36752825d916a94
3
+ size 5348243543
model-00002-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:999668136b0c0da712f315c03c37660d7d8a35425987427db55837cc404faa24
3
+ size 5351416647
model-00003-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fac733a2e2e55ad33196e316a7867b8267cc2de34edeee6a1d45e6c8ee24265
3
+ size 5351416767
model-00004-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9cc94f320ae1f6a4c0530eebb2e090c91bd6f77e6ed158ffe1c01532a1683a93
3
+ size 5358370676
model-00005-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ee47a7aa0661ae32cd383574185b69435c4ae98715e053a38298bfbd447d222
3
+ size 5351416986
model-00006-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6fe6fec703f7eb096a5f5454961b3b70b0da7154a222261e4f245e429fadde5
3
+ size 5351416970
model-00007-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2141e92d1801b2e510a07d4ff978b585680435b64808d712c17e451b0970772
3
+ size 5351416986
model-00008-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75a58556b84c6b7db35123530aae93808420802fa0bec1999bb280946457a0a0
3
+ size 5351416926
model-00009-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3bd00c097570d406b1f603be357614c81fafeab03f10aee01b3d5f0d20cc0af7
3
+ size 5358370660
model-00010-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ae3891d7f964d57b4b2f8ca6a0547acab38874e631df8eb16c9f020a50fa4c2
3
+ size 5351416978
model-00011-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d9831522b31f8f3ce0f4c6cd3056a17c4caa4fd65a1de6b8257b25c178b7652
3
+ size 5351416972
model-00012-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5799b85f4b9066587f429b06de6d069dee537f7e2b999817595ef0681c3e2a66
3
+ size 5351416998
model-00013-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:120d68606672a1e680fccd4cbb6b6cb58574c36470ae9d6d5c1f638755986933
3
+ size 5351416966
model-00014-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:419d42c91cfa30fc828da014e0ee2099ca9758208af0c5838e33b53111e58c70
3
+ size 5358370678
model-00015-of-00015.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f61e68f9e09500f960612b55479115002a93434812a3f31765ebe276960c311a
3
+ size 4449777255
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,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
3
+ size 493443
tokenizer_config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "additional_special_tokens": [],
32
+ "bos_token": "<s>",
33
+ "chat_template": "{%- set message_roles = ['USER', 'ASSISTANT'] -%}\n{%- set ns = namespace(initial_system_message_handled=false, messages=messages) -%}\n{{ bos_token }}\n{%- for message in ns.messages -%}\n {%- if message['role'] | upper == 'SYSTEM' and not ns.initial_system_message_handled -%}\n {%- set ns.initial_system_message_handled = true -%}\n {{'SYSTEM: ' + message['content'] }}\n {%- elif message['role'] | upper != 'SYSTEM' -%}\n {%- if (message['role'] | upper == 'USER') != ((loop.index0 - (1 if ns.initial_system_message_handled else 0)) % 2 == 0) -%}\n {{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}\n {%- endif -%}\n {%- if loop.index0 > 0 or ns.initial_system_message_handled -%}\n {{ '\\n\\n' }}\n {%- endif -%}\n {%- if message['role'] | upper == 'USER' -%}\n {{ 'USER: ' + message['content'] }}\n {%- elif message['role'] | upper == 'ASSISTANT' -%}\n {{ 'ASSISTANT: ' + message['content'] + eos_token}}\n {%- endif -%}\n {%- endif -%}\n{%- endfor -%}\n",
34
+ "clean_up_tokenization_spaces": false,
35
+ "eos_token": "</s>",
36
+ "legacy": false,
37
+ "model_max_length": 1000000000000000019884624838656,
38
+ "pad_token": "<unk>",
39
+ "sp_model_kwargs": {},
40
+ "spaces_between_special_tokens": false,
41
+ "tokenizer_class": "LlamaTokenizer",
42
+ "unk_token": "<unk>",
43
+ "use_default_system_prompt": false
44
+ }