Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- config.json +63 -0
- generation_config.json +10 -0
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
- model.safetensors.index.json +0 -0
- quantize_config.json +32 -0
- special_tokens_map.json +32 -0
- tokenizer.json +3 -0
- tokenizer_config.json +146 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
config.json
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"Glm4ForCausalLM"
|
4 |
+
],
|
5 |
+
"attention_bias": false,
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"eos_token_id": [
|
8 |
+
151329,
|
9 |
+
151336,
|
10 |
+
151338
|
11 |
+
],
|
12 |
+
"head_dim": 128,
|
13 |
+
"hidden_act": "silu",
|
14 |
+
"hidden_size": 6144,
|
15 |
+
"initializer_range": 0.02,
|
16 |
+
"intermediate_size": 23040,
|
17 |
+
"max_position_embeddings": 32768,
|
18 |
+
"model_type": "glm4",
|
19 |
+
"num_attention_heads": 48,
|
20 |
+
"num_hidden_layers": 61,
|
21 |
+
"num_key_value_heads": 2,
|
22 |
+
"pad_token_id": 151329,
|
23 |
+
"partial_rotary_factor": 0.5,
|
24 |
+
"quantization_config": {
|
25 |
+
"act_bits": 16,
|
26 |
+
"act_data_type": "int",
|
27 |
+
"act_dynamic": true,
|
28 |
+
"act_group_size": 128,
|
29 |
+
"act_sym": true,
|
30 |
+
"amp": true,
|
31 |
+
"autoround_version": "0.5.1",
|
32 |
+
"batch_size": 8,
|
33 |
+
"bits": 4,
|
34 |
+
"damp_percent": 0.01,
|
35 |
+
"data_type": "int",
|
36 |
+
"desc_act": false,
|
37 |
+
"enable_minmax_tuning": true,
|
38 |
+
"enable_norm_bias_tuning": false,
|
39 |
+
"enable_quanted_input": true,
|
40 |
+
"gradient_accumulate_steps": 1,
|
41 |
+
"group_size": 128,
|
42 |
+
"iters": 256,
|
43 |
+
"low_gpu_mem_usage": true,
|
44 |
+
"lr": 0.00390625,
|
45 |
+
"minmax_lr": 0.00390625,
|
46 |
+
"nsamples": 256,
|
47 |
+
"quant_method": "gptq",
|
48 |
+
"scale_dtype": "torch.float16",
|
49 |
+
"seqlen": 4096,
|
50 |
+
"super_bits": null,
|
51 |
+
"super_group_size": null,
|
52 |
+
"sym": true,
|
53 |
+
"to_quant_block_names": null,
|
54 |
+
"true_sequential": false
|
55 |
+
},
|
56 |
+
"rms_norm_eps": 1e-05,
|
57 |
+
"rope_theta": 10000.0,
|
58 |
+
"tie_word_embeddings": false,
|
59 |
+
"torch_dtype": "float16",
|
60 |
+
"transformers_version": "4.51.3",
|
61 |
+
"use_cache": true,
|
62 |
+
"vocab_size": 151552
|
63 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"eos_token_id": [
|
4 |
+
151329,
|
5 |
+
151336,
|
6 |
+
151338
|
7 |
+
],
|
8 |
+
"pad_token_id": 151329,
|
9 |
+
"transformers_version": "4.51.3"
|
10 |
+
}
|
model-00001-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f38ce33265eb97841a058aceadf145073c87aa4a03314add64b093641bf95d4c
|
3 |
+
size 4929657160
|
model-00002-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f1834b4b0eeaad601ce4449d9a188d77182d9194033ed7efbff107a53c357992
|
3 |
+
size 4973364504
|
model-00003-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2ae1a91d8af4a32ab0e42e97aff14ab1b73f17e3d5e490adbb4553695a0963bb
|
3 |
+
size 4973364504
|
model-00004-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:54293caf2874482de9a8896f43bc5f055d52d24073d3ca928924a50ef4ef07e1
|
3 |
+
size 4815285608
|
model.safetensors.index.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
quantize_config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bits": 4,
|
3 |
+
"group_size": 128,
|
4 |
+
"sym": true,
|
5 |
+
"data_type": "int",
|
6 |
+
"enable_quanted_input": true,
|
7 |
+
"enable_minmax_tuning": true,
|
8 |
+
"seqlen": 4096,
|
9 |
+
"batch_size": 8,
|
10 |
+
"scale_dtype": "torch.float16",
|
11 |
+
"lr": 0.00390625,
|
12 |
+
"minmax_lr": 0.00390625,
|
13 |
+
"gradient_accumulate_steps": 1,
|
14 |
+
"iters": 256,
|
15 |
+
"amp": true,
|
16 |
+
"nsamples": 256,
|
17 |
+
"low_gpu_mem_usage": true,
|
18 |
+
"to_quant_block_names": null,
|
19 |
+
"enable_norm_bias_tuning": false,
|
20 |
+
"act_bits": 16,
|
21 |
+
"act_group_size": 128,
|
22 |
+
"act_sym": true,
|
23 |
+
"act_dynamic": true,
|
24 |
+
"act_data_type": "int",
|
25 |
+
"super_bits": null,
|
26 |
+
"super_group_size": null,
|
27 |
+
"autoround_version": "0.5.1",
|
28 |
+
"quant_method": "gptq",
|
29 |
+
"desc_act": false,
|
30 |
+
"true_sequential": false,
|
31 |
+
"damp_percent": 0.01
|
32 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|endoftext|>",
|
4 |
+
"[MASK]",
|
5 |
+
"[gMASK]",
|
6 |
+
"[sMASK]",
|
7 |
+
"<sop>",
|
8 |
+
"<eop>",
|
9 |
+
"<|system|>",
|
10 |
+
"<|user|>",
|
11 |
+
"<|assistant|>",
|
12 |
+
"<|observation|>",
|
13 |
+
"<|begin_of_image|>",
|
14 |
+
"<|end_of_image|>",
|
15 |
+
"<|begin_of_video|>",
|
16 |
+
"<|end_of_video|>"
|
17 |
+
],
|
18 |
+
"eos_token": {
|
19 |
+
"content": "<|endoftext|>",
|
20 |
+
"lstrip": false,
|
21 |
+
"normalized": false,
|
22 |
+
"rstrip": false,
|
23 |
+
"single_word": false
|
24 |
+
},
|
25 |
+
"pad_token": {
|
26 |
+
"content": "<|endoftext|>",
|
27 |
+
"lstrip": false,
|
28 |
+
"normalized": false,
|
29 |
+
"rstrip": false,
|
30 |
+
"single_word": false
|
31 |
+
}
|
32 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b9266658ee99b47455dd9442acecfbe75e3633b5f01f9026cc08e5bc2f5c9385
|
3 |
+
size 19966595
|
tokenizer_config.json
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"151329": {
|
4 |
+
"content": "<|endoftext|>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"151330": {
|
12 |
+
"content": "[MASK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"151331": {
|
20 |
+
"content": "[gMASK]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"151332": {
|
28 |
+
"content": "[sMASK]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"151333": {
|
36 |
+
"content": "<sop>",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"151334": {
|
44 |
+
"content": "<eop>",
|
45 |
+
"lstrip": false,
|
46 |
+
"normalized": false,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": false,
|
49 |
+
"special": true
|
50 |
+
},
|
51 |
+
"151335": {
|
52 |
+
"content": "<|system|>",
|
53 |
+
"lstrip": false,
|
54 |
+
"normalized": false,
|
55 |
+
"rstrip": false,
|
56 |
+
"single_word": false,
|
57 |
+
"special": true
|
58 |
+
},
|
59 |
+
"151336": {
|
60 |
+
"content": "<|user|>",
|
61 |
+
"lstrip": false,
|
62 |
+
"normalized": false,
|
63 |
+
"rstrip": false,
|
64 |
+
"single_word": false,
|
65 |
+
"special": true
|
66 |
+
},
|
67 |
+
"151337": {
|
68 |
+
"content": "<|assistant|>",
|
69 |
+
"lstrip": false,
|
70 |
+
"normalized": false,
|
71 |
+
"rstrip": false,
|
72 |
+
"single_word": false,
|
73 |
+
"special": true
|
74 |
+
},
|
75 |
+
"151338": {
|
76 |
+
"content": "<|observation|>",
|
77 |
+
"lstrip": false,
|
78 |
+
"normalized": false,
|
79 |
+
"rstrip": false,
|
80 |
+
"single_word": false,
|
81 |
+
"special": true
|
82 |
+
},
|
83 |
+
"151339": {
|
84 |
+
"content": "<|begin_of_image|>",
|
85 |
+
"lstrip": false,
|
86 |
+
"normalized": false,
|
87 |
+
"rstrip": false,
|
88 |
+
"single_word": false,
|
89 |
+
"special": true
|
90 |
+
},
|
91 |
+
"151340": {
|
92 |
+
"content": "<|end_of_image|>",
|
93 |
+
"lstrip": false,
|
94 |
+
"normalized": false,
|
95 |
+
"rstrip": false,
|
96 |
+
"single_word": false,
|
97 |
+
"special": true
|
98 |
+
},
|
99 |
+
"151341": {
|
100 |
+
"content": "<|begin_of_video|>",
|
101 |
+
"lstrip": false,
|
102 |
+
"normalized": false,
|
103 |
+
"rstrip": false,
|
104 |
+
"single_word": false,
|
105 |
+
"special": true
|
106 |
+
},
|
107 |
+
"151342": {
|
108 |
+
"content": "<|end_of_video|>",
|
109 |
+
"lstrip": false,
|
110 |
+
"normalized": false,
|
111 |
+
"rstrip": false,
|
112 |
+
"single_word": false,
|
113 |
+
"special": true
|
114 |
+
}
|
115 |
+
},
|
116 |
+
"additional_special_tokens": [
|
117 |
+
"<|endoftext|>",
|
118 |
+
"[MASK]",
|
119 |
+
"[gMASK]",
|
120 |
+
"[sMASK]",
|
121 |
+
"<sop>",
|
122 |
+
"<eop>",
|
123 |
+
"<|system|>",
|
124 |
+
"<|user|>",
|
125 |
+
"<|assistant|>",
|
126 |
+
"<|observation|>",
|
127 |
+
"<|begin_of_image|>",
|
128 |
+
"<|end_of_image|>",
|
129 |
+
"<|begin_of_video|>",
|
130 |
+
"<|end_of_video|>"
|
131 |
+
],
|
132 |
+
"chat_template": "[gMASK]<sop>\n{%- if tools -%}\n<|system|>\n你是一个名为 ChatGLM 的人工智能助手。你是基于智谱 AI 公司训练的语言模型 GLM-4 模型开发的,你的任务是针对用户的问题和要求提供适当的答复和支持。\n\n# 可用工具\n{%- for tool in tools %}\n {%- set function = tool.function if tool.get(\"function\") else tool %}\n\n## {{ function.name }}\n\n{{ function | tojson(indent=4, ensure_ascii=False) }}\n在调用上述函数时,请使用 Json 格式表示调用的参数。\n{%- endfor %}\n{%- endif -%}\n\n{%- for msg in messages %}\n {%- if msg.role == 'system' %}\n<|system|>\n{{ msg.content }}\n {%- endif %}\n{%- endfor %}\n\n{%- for message in messages if message.role != 'system' %}\n {%- set role = message['role'] %}\n {%- set content = message['content'] %}\n {%- set visible = content.split('</think>')[-1].strip() %}\n {%- set meta = message.get(\"metadata\", \"\") %}\n\n {%- if role == 'user' %}\n<|user|>\n{{ visible }}\n {%- elif role == 'assistant' and not meta %}\n<|assistant|>\n{{ visible }}\n {%- elif role == 'assistant' and meta %}\n<|assistant|>{{ meta }}\n{{ visible }}\n {%- elif role == 'observation' %}\n<|observation|>\n{{ visible }}\n {%- endif %}\n{%- endfor %}\n{% if add_generation_prompt %}<|assistant|>\\n<think>{% endif %}",
|
133 |
+
"clean_up_tokenization_spaces": false,
|
134 |
+
"do_lower_case": false,
|
135 |
+
"eos_token": "<|endoftext|>",
|
136 |
+
"extra_special_tokens": {},
|
137 |
+
"model_input_names": [
|
138 |
+
"input_ids",
|
139 |
+
"attention_mask"
|
140 |
+
],
|
141 |
+
"model_max_length": 128000,
|
142 |
+
"pad_token": "<|endoftext|>",
|
143 |
+
"padding_side": "left",
|
144 |
+
"remove_space": false,
|
145 |
+
"tokenizer_class": "PreTrainedTokenizer"
|
146 |
+
}
|