L
commited on
Upload folder using huggingface_hub
Browse files- README.md +27 -0
- added_tokens.json +5 -0
- config.json +86 -0
- merges.txt +0 -0
- model-00001-of-00002.safetensors +3 -0
- model-00001-of-00008.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model-00002-of-00008.safetensors +3 -0
- model-00003-of-00008.safetensors +3 -0
- model-00004-of-00008.safetensors +3 -0
- model-00005-of-00008.safetensors +3 -0
- model-00006-of-00008.safetensors +3 -0
- model-00007-of-00008.safetensors +3 -0
- model-00008-of-00008.safetensors +3 -0
- model.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
README.md
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
license: other
|
5 |
+
tags:
|
6 |
+
- chat
|
7 |
+
- mlx
|
8 |
+
license_name: tongyi-qianwen
|
9 |
+
license_link: https://huggingface.co/Qwen/Qwen1.5-72B-Chat/blob/main/LICENSE
|
10 |
+
pipeline_tag: text-generation
|
11 |
+
---
|
12 |
+
|
13 |
+
# mlx-community/Qwen1.5-72B-Chat-4bit
|
14 |
+
This model was converted to MLX format from [`Qwen/Qwen1.5-72B-Chat`]().
|
15 |
+
Refer to the [original model card](https://huggingface.co/Qwen/Qwen1.5-72B-Chat) 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("mlx-community/Qwen1.5-72B-Chat-4bit")
|
26 |
+
response = generate(model, tokenizer, prompt="hello", verbose=True)
|
27 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<|endoftext|>": 151643,
|
3 |
+
"<|im_end|>": 151645,
|
4 |
+
"<|im_start|>": 151644
|
5 |
+
}
|
config.json
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"vocab_size": 152064,
|
3 |
+
"max_position_embeddings": 32768,
|
4 |
+
"hidden_size": 8192,
|
5 |
+
"intermediate_size": 24576,
|
6 |
+
"num_hidden_layers": 80,
|
7 |
+
"num_attention_heads": 64,
|
8 |
+
"use_sliding_window": false,
|
9 |
+
"sliding_window": 32768,
|
10 |
+
"max_window_layers": 70,
|
11 |
+
"num_key_value_heads": 64,
|
12 |
+
"hidden_act": "silu",
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"rms_norm_eps": 1e-06,
|
15 |
+
"use_cache": true,
|
16 |
+
"rope_theta": 1000000.0,
|
17 |
+
"attention_dropout": 0.0,
|
18 |
+
"return_dict": true,
|
19 |
+
"output_hidden_states": false,
|
20 |
+
"output_attentions": false,
|
21 |
+
"torchscript": false,
|
22 |
+
"torch_dtype": "bfloat16",
|
23 |
+
"use_bfloat16": false,
|
24 |
+
"tf_legacy_loss": false,
|
25 |
+
"pruned_heads": {},
|
26 |
+
"tie_word_embeddings": false,
|
27 |
+
"chunk_size_feed_forward": 0,
|
28 |
+
"is_encoder_decoder": false,
|
29 |
+
"is_decoder": false,
|
30 |
+
"cross_attention_hidden_size": null,
|
31 |
+
"add_cross_attention": false,
|
32 |
+
"tie_encoder_decoder": false,
|
33 |
+
"max_length": 20,
|
34 |
+
"min_length": 0,
|
35 |
+
"do_sample": false,
|
36 |
+
"early_stopping": false,
|
37 |
+
"num_beams": 1,
|
38 |
+
"num_beam_groups": 1,
|
39 |
+
"diversity_penalty": 0.0,
|
40 |
+
"temperature": 1.0,
|
41 |
+
"top_k": 50,
|
42 |
+
"top_p": 1.0,
|
43 |
+
"typical_p": 1.0,
|
44 |
+
"repetition_penalty": 1.0,
|
45 |
+
"length_penalty": 1.0,
|
46 |
+
"no_repeat_ngram_size": 0,
|
47 |
+
"encoder_no_repeat_ngram_size": 0,
|
48 |
+
"bad_words_ids": null,
|
49 |
+
"num_return_sequences": 1,
|
50 |
+
"output_scores": false,
|
51 |
+
"return_dict_in_generate": false,
|
52 |
+
"forced_bos_token_id": null,
|
53 |
+
"forced_eos_token_id": null,
|
54 |
+
"remove_invalid_values": false,
|
55 |
+
"exponential_decay_length_penalty": null,
|
56 |
+
"suppress_tokens": null,
|
57 |
+
"begin_suppress_tokens": null,
|
58 |
+
"architectures": [
|
59 |
+
"Qwen2ForCausalLM"
|
60 |
+
],
|
61 |
+
"finetuning_task": null,
|
62 |
+
"id2label": {
|
63 |
+
"0": "LABEL_0",
|
64 |
+
"1": "LABEL_1"
|
65 |
+
},
|
66 |
+
"label2id": {
|
67 |
+
"LABEL_0": 0,
|
68 |
+
"LABEL_1": 1
|
69 |
+
},
|
70 |
+
"tokenizer_class": null,
|
71 |
+
"prefix": null,
|
72 |
+
"bos_token_id": 151643,
|
73 |
+
"pad_token_id": null,
|
74 |
+
"eos_token_id": 151645,
|
75 |
+
"sep_token_id": null,
|
76 |
+
"decoder_start_token_id": null,
|
77 |
+
"task_specific_params": null,
|
78 |
+
"problem_type": null,
|
79 |
+
"_name_or_path": "/Users/lei/.cache/huggingface/hub/models--Qwen--Qwen1.5-72B-Chat/snapshots/1a6ccc1215278f962c794b1848c710c29ef4053d",
|
80 |
+
"transformers_version": "4.38.2",
|
81 |
+
"model_type": "qwen2",
|
82 |
+
"quantization": {
|
83 |
+
"group_size": 64,
|
84 |
+
"bits": 4
|
85 |
+
}
|
86 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model-00001-of-00002.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ec32c6dcbdcc41ae16943c578a62b898142cb59f37d3339420150acbc8e092e0
|
3 |
+
size 5340919734
|
model-00001-of-00008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8019d97e00ba099a61ed8091d9b163e9cb6e151376a48f22448176545ffcf797
|
3 |
+
size 5323047676
|
model-00002-of-00002.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:35fbf62cd220263dd1f0ab5b8b6276db36439c7d139e0a090a8e035ca133c48d
|
3 |
+
size 3748969812
|
model-00002-of-00008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4b68a7277f1d7e71cb8588b847bd6d4c47196d7010f08dc989da96004149d67b
|
3 |
+
size 5285756358
|
model-00003-of-00008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:56f24864158bb9d8e4dde9d3369e5f2dabe40a92b89bfd814d995c437c281ea8
|
3 |
+
size 5285756418
|
model-00004-of-00008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8e10e369449f07e728ecf836261e5c89e42a73a37d9c71806dceb390a0c399aa
|
3 |
+
size 5361253934
|
model-00005-of-00008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d648cc1f61914aaedb6038a0d02c4cae3d29ef4a3b5b694acaa0e0d96955713c
|
3 |
+
size 5361237436
|
model-00006-of-00008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3616cbf7ae6c4a8a5ddf9fc2df1e16da55932b067e550cadf9326dafca5fe39f
|
3 |
+
size 5361237470
|
model-00007-of-00008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dd958033b2709a6d9422a3c157ac863999483f0ab2449aa6328c6bcd2ae21a19
|
3 |
+
size 5361237440
|
model-00008-of-00008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a09d27dfe9f68affb80d0695623660487d8aea170252c473ae99facfb65997b1
|
3 |
+
size 5118093777
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a9e1e45a9cd3ecc85897f03db03b051244eae42729768e4cc0f66c814dca1bb4
|
3 |
+
size 5238886672
|
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,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_start|>",
|
4 |
+
"<|im_end|>"
|
5 |
+
],
|
6 |
+
"eos_token": {
|
7 |
+
"content": "<|im_end|>",
|
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 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -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']}}{% if (loop.last and add_generation_prompt) or not loop.last %}{{ '<|im_end|>' + '\n'}}{% endif %}{% endfor %}{% if add_generation_prompt and messages[-1]['role'] != 'assistant' %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
35 |
+
"clean_up_tokenization_spaces": false,
|
36 |
+
"eos_token": "<|im_end|>",
|
37 |
+
"errors": "replace",
|
38 |
+
"model_max_length": 32768,
|
39 |
+
"pad_token": "<|endoftext|>",
|
40 |
+
"split_special_tokens": false,
|
41 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
42 |
+
"unk_token": null
|
43 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|