Upload folder using huggingface_hub (#1)
Browse files- 7d4b761d5df7391d829952cbb432a704e67e8650086ecf9933a1bded52907f60 (293820769f6e6ef08df75306489b7db5ade4c3e5)
- 62c9a89314fa34658f1794377608c646a3cdee9bd04d95d722878b1e5df21998 (973816ca7f3a2bd557be29f443aa03e242bd4ed1)
- 53beffc7f119b95bb23778203c2ee546ccaeaa8d8e3113ad9a9e33bf650228c8 (2a6395be02b1b6a2b3b6649f2b764503deb8413e)
- 4beb6a999f41ec71d2dc6fda2621d43211fa08b1008c69b83f064465e1e960d1 (d651267b1a6f6d04706be5e995bc56b0a1a7d84c)
- e51c83bb000581ad56cc8361d2e47829afb53a3252872c12f204dab253a86942 (dfd62e5ec02a1f32fd50e64e7c198682c4b9f360)
- bf78fad8c0209a8efeb416d4d2d3bcde34fcef8ca82944803cbd1bea37b1bc11 (66afceaf14fef70642f6a2385b76886b6c32648a)
- f8d48028f06a3cd1801010e8279f3624996228d44b36f0ac38054f2f75fcc833 (b5898f61c9e724b0a2010a76f2a510191ab39abb)
- fc6b8699174288461c53f10751a4ae302f00c867a4088a2ed894b67e5ba86ec2 (61658316326c0dfb187cbb636a46e8e1ba7b0a90)
- c6e0881447758c28f54ccc07855674630c2264f6907b58762bbf24935e231c75 (05d0e5e4fad0b6e8835403826ff4c7f8b5701fea)
- README.md +32 -0
- config.json +38 -0
- model-00001-of-00009.safetensors +3 -0
- model-00002-of-00009.safetensors +3 -0
- model-00003-of-00009.safetensors +3 -0
- model-00004-of-00009.safetensors +3 -0
- model-00005-of-00009.safetensors +3 -0
- model-00006-of-00009.safetensors +3 -0
- model-00007-of-00009.safetensors +3 -0
- model-00008-of-00009.safetensors +3 -0
- model-00009-of-00009.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +45 -0
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: rAIfle/SorcererLM-8x22b-bf16
|
3 |
+
license: apache-2.0
|
4 |
+
tags:
|
5 |
+
- mlx
|
6 |
+
---
|
7 |
+
|
8 |
+
# mlx-community/SorcererLM-8x22b-2bit
|
9 |
+
|
10 |
+
The Model [mlx-community/SorcererLM-8x22b-2bit](https://huggingface.co/mlx-community/SorcererLM-8x22b-2bit) was converted to MLX format from [rAIfle/SorcererLM-8x22b-bf16](https://huggingface.co/rAIfle/SorcererLM-8x22b-bf16) using mlx-lm version **0.19.0**.
|
11 |
+
|
12 |
+
## Use with mlx
|
13 |
+
|
14 |
+
```bash
|
15 |
+
pip install mlx-lm
|
16 |
+
```
|
17 |
+
|
18 |
+
```python
|
19 |
+
from mlx_lm import load, generate
|
20 |
+
|
21 |
+
model, tokenizer = load("mlx-community/SorcererLM-8x22b-2bit")
|
22 |
+
|
23 |
+
prompt="hello"
|
24 |
+
|
25 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
26 |
+
messages = [{"role": "user", "content": prompt}]
|
27 |
+
prompt = tokenizer.apply_chat_template(
|
28 |
+
messages, tokenize=False, add_generation_prompt=True
|
29 |
+
)
|
30 |
+
|
31 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
32 |
+
```
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": 2
|
23 |
+
},
|
24 |
+
"quantization_config": {
|
25 |
+
"group_size": 64,
|
26 |
+
"bits": 2
|
27 |
+
},
|
28 |
+
"rms_norm_eps": 1e-05,
|
29 |
+
"rope_theta": 1000000,
|
30 |
+
"router_aux_loss_coef": 0.001,
|
31 |
+
"router_jitter_noise": 0.0,
|
32 |
+
"sliding_window": null,
|
33 |
+
"tie_word_embeddings": false,
|
34 |
+
"torch_dtype": "bfloat16",
|
35 |
+
"transformers_version": "4.45.0.dev0",
|
36 |
+
"use_cache": false,
|
37 |
+
"vocab_size": 32000
|
38 |
+
}
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:76a1613a50a9b07af92d03c72a045e8dac002d091e317517c47bae46c028b9ae
|
3 |
+
size 5287557546
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a9e56d0d3be382ef179b50436cccca8709ea950a3bbf353dc6e7c1526d34be4f
|
3 |
+
size 5226142180
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:885fdfdd5ecb465b9c17a1be7fe60dce02bce2b37f4ac3e02ad8364aa52f2987
|
3 |
+
size 5226142195
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:983e3a973a59632072f3d62821114bed46ac07ba770160de1fc5cedc526792fe
|
3 |
+
size 5198575166
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2f31948ca12a1947c7a3feaa34d04e62870d69435a1ad48cc7dfc6765589fce0
|
3 |
+
size 5226142247
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:efc4a8a98b52a9a0853d8552ed5b47848f81c1d1b98041eed346a6c2c14157b0
|
3 |
+
size 5226142201
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:988eef7ea4b223424f71937fe28398217c11e18b16a06e6aa624f0425db5a691
|
3 |
+
size 5198575226
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7771c46dc10da2990ab58f5f6108d748b56d9be7313661d529efabf642b8f19e
|
3 |
+
size 5226142263
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0cfd8cdbddd12a3d4525d38cdfe5cb35b4f4e1df804f686b427b7dcd86799010
|
3 |
+
size 2129880719
|
The diff for this file is too large to render.
See raw diff
|
|
@@ -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 |
+
}
|
The diff for this file is too large to render.
See raw diff
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{{ messages[0]['content'].strip() }}{% else %}{% set loop_messages = messages %}{{ 'A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user\\'s questions.' }}{% endif %}{% for message in loop_messages %}{% if loop.index0 == 0 %}{% if message['role'] == 'system' or message['role'] == 'user' %}{{ ' USER: ' + message['content'].strip() }}{% else %}{{ ' ASSISTANT: ' + message['content'].strip() + eos_token }}{% endif %}{% else %}{% if message['role'] == 'system' or message['role'] == 'user' %}{{ '\nUSER: ' + message['content'].strip() }}{% else %}{{ ' ASSISTANT: ' + message['content'].strip() + eos_token }}{% endif %}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ ' ASSISTANT:' }}{% endif %}",
|
34 |
+
"clean_up_tokenization_spaces": false,
|
35 |
+
"eos_token": "</s>",
|
36 |
+
"legacy": true,
|
37 |
+
"model_max_length": 1000000000000000019884624838656,
|
38 |
+
"pad_token": "<unk>",
|
39 |
+
"padding_side": "right",
|
40 |
+
"sp_model_kwargs": {},
|
41 |
+
"spaces_between_special_tokens": false,
|
42 |
+
"tokenizer_class": "LlamaTokenizer",
|
43 |
+
"unk_token": "<unk>",
|
44 |
+
"use_default_system_prompt": true
|
45 |
+
}
|