abdelrahmane01 commited on
Commit
d4e61a4
·
verified ·
1 Parent(s): 9d806b0

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -34,3 +34,4 @@ saved_model/**/* 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
  Sparsity/25/tokenizer.json 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
  Sparsity/25/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ Sparsity/50/tokenizer.json filter=lfs diff=lfs merge=lfs -text
Sparsity/50/added_tokens.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "<|/tool_call|>": 200026,
3
+ "<|/tool|>": 200024,
4
+ "<|assistant|>": 200019,
5
+ "<|end|>": 200020,
6
+ "<|system|>": 200022,
7
+ "<|tag|>": 200028,
8
+ "<|tool_call|>": 200025,
9
+ "<|tool_response|>": 200027,
10
+ "<|tool|>": 200023,
11
+ "<|user|>": 200021
12
+ }
Sparsity/50/chat_template.jinja ADDED
@@ -0,0 +1 @@
 
 
1
+ {% for message in messages %}{% if message['role'] == 'system' and 'tools' in message and message['tools'] is not none %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|tool|>' + message['tools'] + '<|/tool|>' + '<|end|>' }}{% else %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|end|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>' }}{% else %}{{ eos_token }}{% endif %}
Sparsity/50/config.json ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Phi3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "auto_map": {
8
+ "AutoConfig": "configuration_phi3.Phi3Config",
9
+ "AutoModelForCausalLM": "modeling_phi3.Phi3ForCausalLM",
10
+ "AutoTokenizer": "Xenova/gpt-4o"
11
+ },
12
+ "bos_token_id": 199999,
13
+ "dtype": "bfloat16",
14
+ "embd_pdrop": 0.0,
15
+ "eos_token_id": 199999,
16
+ "full_attn_mod": 1,
17
+ "hidden_act": "silu",
18
+ "hidden_size": 3072,
19
+ "ignore_keys_at_rope_validation": null,
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 8192,
22
+ "interpolate_factor": 1,
23
+ "lm_head_bias": false,
24
+ "max_position_embeddings": 131072,
25
+ "mlp_bias": false,
26
+ "model_type": "phi3",
27
+ "num_attention_heads": 24,
28
+ "num_hidden_layers": 32,
29
+ "num_key_value_heads": 8,
30
+ "original_max_position_embeddings": 4096,
31
+ "pad_token_id": 199999,
32
+ "partial_rotary_factor": 0.75,
33
+ "quantization_config": {
34
+ "config_groups": {
35
+ "group_0": {
36
+ "format": "pack-quantized",
37
+ "input_activations": null,
38
+ "output_activations": null,
39
+ "targets": [
40
+ "Linear"
41
+ ],
42
+ "weights": {
43
+ "actorder": null,
44
+ "block_structure": null,
45
+ "dynamic": false,
46
+ "group_size": 128,
47
+ "num_bits": 4,
48
+ "observer": "memoryless_minmax",
49
+ "observer_kwargs": {},
50
+ "scale_dtype": null,
51
+ "strategy": "group",
52
+ "symmetric": true,
53
+ "type": "int",
54
+ "zp_dtype": null
55
+ }
56
+ }
57
+ },
58
+ "format": "pack-quantized",
59
+ "global_compression_ratio": null,
60
+ "ignore": [
61
+ "lm_head"
62
+ ],
63
+ "kv_cache_scheme": null,
64
+ "quant_method": "compressed-tensors",
65
+ "quantization_status": "compressed",
66
+ "sparsity_config": {
67
+ "format": "dense",
68
+ "global_sparsity": 0.3634794128315865,
69
+ "ignore": [
70
+ "lm_head"
71
+ ],
72
+ "registry_requires_subclass": false,
73
+ "sparsity_structure": "unstructured",
74
+ "targets": [
75
+ "Linear"
76
+ ]
77
+ },
78
+ "transform_config": {},
79
+ "version": "0.14.0.1"
80
+ },
81
+ "resid_pdrop": 0.0,
82
+ "rms_norm_eps": 1e-05,
83
+ "rope_parameters": {
84
+ "long_factor": [
85
+ 1,
86
+ 1.118320672,
87
+ 1.250641126,
88
+ 1.398617824,
89
+ 1.564103225,
90
+ 1.74916897,
91
+ 1.956131817,
92
+ 2.187582649,
93
+ 2.446418898,
94
+ 2.735880826,
95
+ 3.059592084,
96
+ 3.421605075,
97
+ 3.826451687,
98
+ 4.279200023,
99
+ 4.785517845,
100
+ 5.351743533,
101
+ 5.984965424,
102
+ 6.693110555,
103
+ 7.485043894,
104
+ 8.370679318,
105
+ 9.36110372,
106
+ 10.4687158,
107
+ 11.70738129,
108
+ 13.09260651,
109
+ 14.64173252,
110
+ 16.37415215,
111
+ 18.31155283,
112
+ 20.47818807,
113
+ 22.90118105,
114
+ 25.61086418,
115
+ 28.64115884,
116
+ 32.03,
117
+ 32.1,
118
+ 32.13,
119
+ 32.23,
120
+ 32.6,
121
+ 32.61,
122
+ 32.64,
123
+ 32.66,
124
+ 32.7,
125
+ 32.71,
126
+ 32.93,
127
+ 32.97,
128
+ 33.28,
129
+ 33.49,
130
+ 33.5,
131
+ 44.16,
132
+ 47.77
133
+ ],
134
+ "original_max_position_embeddings": 4096,
135
+ "partial_rotary_factor": 0.75,
136
+ "rope_theta": 10000.0,
137
+ "rope_type": "longrope",
138
+ "short_factor": [
139
+ 1.0,
140
+ 1.0,
141
+ 1.0,
142
+ 1.0,
143
+ 1.0,
144
+ 1.0,
145
+ 1.0,
146
+ 1.0,
147
+ 1.0,
148
+ 1.0,
149
+ 1.0,
150
+ 1.0,
151
+ 1.0,
152
+ 1.0,
153
+ 1.0,
154
+ 1.0,
155
+ 1.0,
156
+ 1.0,
157
+ 1.0,
158
+ 1.0,
159
+ 1.0,
160
+ 1.0,
161
+ 1.0,
162
+ 1.0,
163
+ 1.0,
164
+ 1.0,
165
+ 1.0,
166
+ 1.0,
167
+ 1.0,
168
+ 1.0,
169
+ 1.0,
170
+ 1.0,
171
+ 1.0,
172
+ 1.0,
173
+ 1.0,
174
+ 1.0,
175
+ 1.0,
176
+ 1.0,
177
+ 1.0,
178
+ 1.0,
179
+ 1.0,
180
+ 1.0,
181
+ 1.0,
182
+ 1.0,
183
+ 1.0,
184
+ 1.0,
185
+ 1.0,
186
+ 1.0
187
+ ],
188
+ "type": "longrope"
189
+ },
190
+ "rope_scaling": null,
191
+ "rope_theta": 10000.0,
192
+ "sliding_window": 262144,
193
+ "tie_word_embeddings": true,
194
+ "transformers_version": "4.57.6",
195
+ "use_cache": true,
196
+ "vocab_size": 200064
197
+ }
Sparsity/50/generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 199999,
4
+ "eos_token_id": [
5
+ 200020,
6
+ 199999
7
+ ],
8
+ "pad_token_id": 199999,
9
+ "transformers_version": "4.57.6"
10
+ }
Sparsity/50/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
Sparsity/50/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9a0ca74e85214663c51ffc0fb56cd72107587e3d1f4669fccff4fcd17bb26e7
3
+ size 2890590792
Sparsity/50/recipe.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ AWQModifier:
4
+ targets: [Linear]
5
+ ignore: [lm_head, embed_tokens]
6
+ scheme: W4A16
7
+ bypass_divisibility_checks: false
8
+ mappings:
9
+ - smooth_layer: re:.*input_layernorm$
10
+ balance_layers: ['re:.*qkv_proj$']
11
+ activation_hook_target: null
12
+ - smooth_layer: re:.*qkv_proj$
13
+ balance_layers: ['re:.*o_proj$']
14
+ activation_hook_target: null
15
+ - smooth_layer: re:.*post_attention_layernorm$
16
+ balance_layers: ['re:.*gate_up_proj$']
17
+ activation_hook_target: null
18
+ - smooth_layer: re:.*gate_up_proj$
19
+ balance_layers: ['re:.*down_proj$']
20
+ activation_hook_target: null
21
+ duo_scaling: true
22
+ n_grid: 20
Sparsity/50/special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|endoftext|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<|endoftext|>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
Sparsity/50/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ede691a2bf0cfe33fe6b7b4acd513d76ac81b4a768c0848c64d4afd40cc845c3
3
+ size 15524373
Sparsity/50/tokenizer_config.json ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": false,
5
+ "added_tokens_decoder": {
6
+ "199999": {
7
+ "content": "<|endoftext|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "200018": {
15
+ "content": "<|endofprompt|>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "200019": {
23
+ "content": "<|assistant|>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": true,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "200020": {
31
+ "content": "<|end|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": true,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "200021": {
39
+ "content": "<|user|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": true,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "200022": {
47
+ "content": "<|system|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": true,
51
+ "single_word": false,
52
+ "special": true
53
+ },
54
+ "200023": {
55
+ "content": "<|tool|>",
56
+ "lstrip": false,
57
+ "normalized": false,
58
+ "rstrip": true,
59
+ "single_word": false,
60
+ "special": false
61
+ },
62
+ "200024": {
63
+ "content": "<|/tool|>",
64
+ "lstrip": false,
65
+ "normalized": false,
66
+ "rstrip": true,
67
+ "single_word": false,
68
+ "special": false
69
+ },
70
+ "200025": {
71
+ "content": "<|tool_call|>",
72
+ "lstrip": false,
73
+ "normalized": false,
74
+ "rstrip": true,
75
+ "single_word": false,
76
+ "special": false
77
+ },
78
+ "200026": {
79
+ "content": "<|/tool_call|>",
80
+ "lstrip": false,
81
+ "normalized": false,
82
+ "rstrip": true,
83
+ "single_word": false,
84
+ "special": false
85
+ },
86
+ "200027": {
87
+ "content": "<|tool_response|>",
88
+ "lstrip": false,
89
+ "normalized": false,
90
+ "rstrip": true,
91
+ "single_word": false,
92
+ "special": false
93
+ },
94
+ "200028": {
95
+ "content": "<|tag|>",
96
+ "lstrip": false,
97
+ "normalized": false,
98
+ "rstrip": true,
99
+ "single_word": false,
100
+ "special": true
101
+ }
102
+ },
103
+ "bos_token": "<|endoftext|>",
104
+ "clean_up_tokenization_spaces": false,
105
+ "eos_token": "<|endoftext|>",
106
+ "extra_special_tokens": {},
107
+ "model_max_length": 131072,
108
+ "pad_token": "<|endoftext|>",
109
+ "tokenizer_class": "GPT2Tokenizer",
110
+ "unk_token": "<|endoftext|>"
111
+ }
Sparsity/50/vocab.json ADDED
The diff for this file is too large to render. See raw diff