Upload folder using huggingface_hub (#1)
Browse files- cb623bf1bac8e594e91233ebd2998c2a0c4430a9c3ca24d47eeada821049b709 (a6cf559aa5814457587cde3e7c0beaa54c8d4469)
- 209744e49aed63b1df7604bf507b79eccb0ee925d236bfcb38e131fd29cb214f (22c1f1b853a1500d4f0c58a311a196a402b8ff35)
- 954b752c8d4696e0dd06a8add69b8c1ec4278afa535104647f8d82480f23ba7f (ec2dc1dd2b78e44fdeb06f34f4135fc50a6060a7)
- d25f4480ec46096c1f939adff7129e04fa6e346c7a75d8221f874792fd016f2d (c18e46622d28753c6e04eb4d20ddc7ecc3c5325b)
- 34c24c19f5e3effcb626599b43387ff1f6edac461f8a70fb6d0c32881610540a (5333cbae50f0ff930f1a92757a5b918badb237c0)
- 4c9a10491df332f56780eb440db8d7cc6cc823a24ff3209b7dff23ba919d954a (078df4e79a9718ca715c9230173e4bfce4cc8a79)
- a61918aeb34ddd20f550269e170a30c7b59e13deffa9f2d229199806a67b98ab (5ad6e9b2229d50f6ba575f614ed2a185c5170df1)
- README.md +27 -0
- added_tokens.json +5 -0
- config.json +39 -0
- merges.txt +0 -0
- model-00001-of-00007.safetensors +3 -0
- model-00002-of-00007.safetensors +3 -0
- model-00003-of-00007.safetensors +3 -0
- model-00004-of-00007.safetensors +3 -0
- model-00005-of-00007.safetensors +3 -0
- model-00006-of-00007.safetensors +3 -0
- model-00007-of-00007.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +20 -0
- tokenizer.json +0 -0
- tokenizer_config.json +43 -0
- vocab.json +0 -0
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
license: apache-2.0
|
5 |
+
tags:
|
6 |
+
- pretrained
|
7 |
+
- moe
|
8 |
+
- mlx
|
9 |
+
pipeline_tag: text-generation
|
10 |
+
---
|
11 |
+
|
12 |
+
# mlx-community/Qwen2-57B-A14B-4bit
|
13 |
+
|
14 |
+
The Model [mlx-community/Qwen2-57B-A14B-4bit](https://huggingface.co/mlx-community/Qwen2-57B-A14B-4bit) was converted to MLX format from [Qwen/Qwen2-57B-A14B](https://huggingface.co/Qwen/Qwen2-57B-A14B) using mlx-lm version **0.14.2**.
|
15 |
+
|
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("mlx-community/Qwen2-57B-A14B-4bit")
|
26 |
+
response = generate(model, tokenizer, prompt="hello", verbose=True)
|
27 |
+
```
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<|endoftext|>": 151643,
|
3 |
+
"<|im_end|>": 151645,
|
4 |
+
"<|im_start|>": 151644
|
5 |
+
}
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"Qwen2MoeForCausalLM"
|
4 |
+
],
|
5 |
+
"attention_dropout": 0.0,
|
6 |
+
"bos_token_id": 151643,
|
7 |
+
"decoder_sparse_step": 1,
|
8 |
+
"eos_token_id": 151643,
|
9 |
+
"hidden_act": "silu",
|
10 |
+
"hidden_size": 3584,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 18944,
|
13 |
+
"max_position_embeddings": 131072,
|
14 |
+
"max_window_layers": 28,
|
15 |
+
"model_type": "qwen2_moe",
|
16 |
+
"moe_intermediate_size": 2560,
|
17 |
+
"norm_topk_prob": false,
|
18 |
+
"num_attention_heads": 28,
|
19 |
+
"num_experts": 64,
|
20 |
+
"num_experts_per_tok": 8,
|
21 |
+
"num_hidden_layers": 28,
|
22 |
+
"num_key_value_heads": 4,
|
23 |
+
"output_router_logits": false,
|
24 |
+
"quantization": {
|
25 |
+
"group_size": 64,
|
26 |
+
"bits": 4
|
27 |
+
},
|
28 |
+
"rms_norm_eps": 1e-06,
|
29 |
+
"rope_theta": 1000000.0,
|
30 |
+
"router_aux_loss_coef": 0.001,
|
31 |
+
"shared_expert_intermediate_size": 20480,
|
32 |
+
"sliding_window": 131072,
|
33 |
+
"tie_word_embeddings": false,
|
34 |
+
"torch_dtype": "bfloat16",
|
35 |
+
"transformers_version": "4.40.1",
|
36 |
+
"use_cache": true,
|
37 |
+
"use_sliding_window": false,
|
38 |
+
"vocab_size": 151936
|
39 |
+
}
|
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:da150a27b7531c3e5f476270ab4df43186433354c153756e461ea45731c33985
|
3 |
+
size 5179027722
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dbf4abfab059fd75a56b8c33ec9314370da0b3717aac4e2bc975555342e30478
|
3 |
+
size 5326907408
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a34af079c0d9baf067d79643580ab097d8dda158438ebd25777e8c31f961ee21
|
3 |
+
size 5186371187
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:266030d6a37447488d49e264b05dc5af3df38ff1f34a503c489f200a877f6ce4
|
3 |
+
size 5326907658
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:65c882ea59b9a6cdf6d63323f61a344f3f9b80733a8bf2ed9ea413795596cf08
|
3 |
+
size 5326907542
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a082c26f2fbc8d073648cd022db2ee530923944afd2ad079ae8a2d0f620b65c3
|
3 |
+
size 5186371176
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c28b604d6c1e18ff9771c5d7a8e9d4f983b0ff123fdcb9ab82d0bfcfc68bf1f7
|
3 |
+
size 760493429
|
The diff for this file is too large to render.
See raw diff
|
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_start|>",
|
4 |
+
"<|im_end|>"
|
5 |
+
],
|
6 |
+
"eos_token": {
|
7 |
+
"content": "<|endoftext|>",
|
8 |
+
"lstrip": false,
|
9 |
+
"normalized": false,
|
10 |
+
"rstrip": false,
|
11 |
+
"single_word": false
|
12 |
+
},
|
13 |
+
"pad_token": {
|
14 |
+
"content": "<|endoftext|>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false
|
19 |
+
}
|
20 |
+
}
|
The diff for this file is too large to render.
See raw diff
|
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"151643": {
|
5 |
+
"content": "<|endoftext|>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": false,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"151644": {
|
13 |
+
"content": "<|im_start|>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": false,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"151645": {
|
21 |
+
"content": "<|im_end|>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": false,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
}
|
28 |
+
},
|
29 |
+
"additional_special_tokens": [
|
30 |
+
"<|im_start|>",
|
31 |
+
"<|im_end|>"
|
32 |
+
],
|
33 |
+
"bos_token": null,
|
34 |
+
"chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
35 |
+
"clean_up_tokenization_spaces": false,
|
36 |
+
"eos_token": "<|endoftext|>",
|
37 |
+
"errors": "replace",
|
38 |
+
"model_max_length": 131072,
|
39 |
+
"pad_token": "<|endoftext|>",
|
40 |
+
"split_special_tokens": false,
|
41 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
42 |
+
"unk_token": null
|
43 |
+
}
|
The diff for this file is too large to render.
See raw diff
|
|