sharpenb commited on
Commit
d944785
1 Parent(s): 55c8486

677831e230c552374dd251bbaab42afe2d0a8135aab9e4ea04c169de10ce767d

Browse files
Files changed (6) hide show
  1. README.md +2 -2
  2. config.json +71 -70
  3. qmodel.pt +1 -1
  4. smash_config.json +1 -1
  5. tokenizer.json +13 -41
  6. tokenizer_config.json +15 -14
README.md CHANGED
@@ -31,7 +31,7 @@ tags:
31
  - Contact us and tell us which model to compress next [here](https://www.pruna.ai/contact).
32
  - Request access to easily compress your *own* AI models [here](https://z0halsaff74.typeform.com/pruna-access?typeform-source=www.pruna.ai).
33
  - Read the documentations to know more [here](https://pruna-ai-pruna.readthedocs-hosted.com/en/latest/)
34
- - Join Pruna AI community on Discord [here](https://discord.gg/rskEr4BZJx) to share feedback/suggestions or get help.
35
 
36
  ## Results
37
 
@@ -40,7 +40,7 @@ tags:
40
  **Frequently Asked Questions**
41
  - ***How does the compression work?*** The model is compressed with hqq.
42
  - ***How does the model quality change?*** The quality of the model output might vary compared to the base model.
43
- - ***How is the model efficiency evaluated?*** These results were obtained on NVIDIA A100-PCIE-40GB with configuration described in `model/smash_config.json` and are obtained after a hardware warmup. The smashed model is directly compared to the original base model. Efficiency results may vary in other settings (e.g. other hardware, image size, batch size, ...). We recommend to directly run them in the use-case conditions to know if the smashed model can benefit you.
44
  - ***What is the model format?*** We use safetensors.
45
  - ***What calibration data has been used?*** If needed by the compression method, we used WikiText as the calibration data.
46
  - ***What is the naming convention for Pruna Huggingface models?*** We take the original model name and append "turbo", "tiny", or "green" if the smashed model has a measured inference speed, inference memory, or inference energy consumption which is less than 90% of the original base model.
 
31
  - Contact us and tell us which model to compress next [here](https://www.pruna.ai/contact).
32
  - Request access to easily compress your *own* AI models [here](https://z0halsaff74.typeform.com/pruna-access?typeform-source=www.pruna.ai).
33
  - Read the documentations to know more [here](https://pruna-ai-pruna.readthedocs-hosted.com/en/latest/)
34
+ - Join Pruna AI community on Discord [here](https://discord.gg/CP4VSgck) to share feedback/suggestions or get help.
35
 
36
  ## Results
37
 
 
40
  **Frequently Asked Questions**
41
  - ***How does the compression work?*** The model is compressed with hqq.
42
  - ***How does the model quality change?*** The quality of the model output might vary compared to the base model.
43
+ - ***How is the model efficiency evaluated?*** These results were obtained on HARDWARE_NAME with configuration described in `model/smash_config.json` and are obtained after a hardware warmup. The smashed model is directly compared to the original base model. Efficiency results may vary in other settings (e.g. other hardware, image size, batch size, ...). We recommend to directly run them in the use-case conditions to know if the smashed model can benefit you.
44
  - ***What is the model format?*** We use safetensors.
45
  - ***What calibration data has been used?*** If needed by the compression method, we used WikiText as the calibration data.
46
  - ***What is the naming convention for Pruna Huggingface models?*** We take the original model name and append "turbo", "tiny", or "green" if the smashed model has a measured inference speed, inference memory, or inference energy consumption which is less than 90% of the original base model.
config.json CHANGED
@@ -3,6 +3,7 @@
3
  "architectures": [
4
  "Phi3ForCausalLM"
5
  ],
 
6
  "attention_dropout": 0.0,
7
  "auto_map": {
8
  "AutoConfig": "microsoft/Phi-3-mini-128k-instruct--configuration_phi3.Phi3Config",
@@ -26,71 +27,64 @@
26
  "rms_norm_eps": 1e-05,
27
  "rope_scaling": {
28
  "long_factor": [
29
- 1.0299999713897705,
30
- 1.0499999523162842,
31
- 1.0499999523162842,
32
- 1.0799999237060547,
33
- 1.2299998998641968,
34
- 1.2299998998641968,
35
- 1.2999999523162842,
36
- 1.4499999284744263,
37
- 1.5999999046325684,
38
- 1.6499998569488525,
39
- 1.8999998569488525,
40
- 2.859999895095825,
41
- 3.68999981880188,
42
- 5.419999599456787,
43
- 5.489999771118164,
44
- 5.489999771118164,
45
- 9.09000015258789,
46
- 11.579999923706055,
47
- 15.65999984741211,
48
- 15.769999504089355,
49
- 15.789999961853027,
50
- 18.360000610351562,
51
- 21.989999771118164,
52
- 23.079999923706055,
53
- 30.009998321533203,
54
- 32.35000228881836,
55
- 32.590003967285156,
56
- 35.56000518798828,
57
- 39.95000457763672,
58
- 53.840003967285156,
59
- 56.20000457763672,
60
- 57.95000457763672,
61
- 59.29000473022461,
62
- 59.77000427246094,
63
- 59.920005798339844,
64
- 61.190006256103516,
65
- 61.96000671386719,
66
- 62.50000762939453,
67
- 63.3700065612793,
68
- 63.48000717163086,
69
- 63.48000717163086,
70
- 63.66000747680664,
71
- 63.850006103515625,
72
- 64.08000946044922,
73
- 64.760009765625,
74
- 64.80001068115234,
75
- 64.81001281738281,
76
- 64.81001281738281
77
  ],
78
  "short_factor": [
79
- 1.05,
80
- 1.05,
81
- 1.05,
82
  1.1,
83
  1.1,
84
- 1.1500000000000001,
85
- 1.2000000000000002,
86
- 1.2500000000000002,
87
  1.3000000000000003,
88
  1.3500000000000003,
89
- 1.5000000000000004,
90
- 2.000000000000001,
91
- 2.000000000000001,
92
- 2.000000000000001,
93
- 2.000000000000001,
94
  2.000000000000001,
95
  2.000000000000001,
96
  2.000000000000001,
@@ -111,27 +105,34 @@
111
  2.0500000000000007,
112
  2.0500000000000007,
113
  2.0500000000000007,
 
 
 
114
  2.1000000000000005,
115
  2.1000000000000005,
116
- 2.1000000000000005,
117
- 2.1500000000000004,
118
  2.1500000000000004,
119
- 2.3499999999999996,
120
- 2.549999999999999,
121
- 2.5999999999999988,
122
- 2.5999999999999988,
 
 
 
 
 
 
123
  2.7499999999999982,
124
- 2.849999999999998,
125
- 2.849999999999998,
126
- 2.9499999999999975
127
  ],
128
- "type": "su"
129
  },
130
  "rope_theta": 10000.0,
131
  "sliding_window": 262144,
132
  "tie_word_embeddings": false,
133
  "torch_dtype": "bfloat16",
134
- "transformers_version": "4.40.0",
135
  "use_cache": true,
136
  "vocab_size": 32064
137
  }
 
3
  "architectures": [
4
  "Phi3ForCausalLM"
5
  ],
6
+ "attention_bias": false,
7
  "attention_dropout": 0.0,
8
  "auto_map": {
9
  "AutoConfig": "microsoft/Phi-3-mini-128k-instruct--configuration_phi3.Phi3Config",
 
27
  "rms_norm_eps": 1e-05,
28
  "rope_scaling": {
29
  "long_factor": [
30
+ 1.0700000524520874,
31
+ 1.1200000047683716,
32
+ 1.149999976158142,
33
+ 1.4199999570846558,
34
+ 1.5699999332427979,
35
+ 1.7999999523162842,
36
+ 2.129999876022339,
37
+ 2.129999876022339,
38
+ 3.009999990463257,
39
+ 5.910000324249268,
40
+ 6.950000286102295,
41
+ 9.070000648498535,
42
+ 9.930000305175781,
43
+ 10.710000038146973,
44
+ 11.130000114440918,
45
+ 14.609999656677246,
46
+ 15.409998893737793,
47
+ 19.809999465942383,
48
+ 37.279998779296875,
49
+ 38.279998779296875,
50
+ 38.599998474121094,
51
+ 40.12000274658203,
52
+ 46.20000457763672,
53
+ 50.940006256103516,
54
+ 53.66000747680664,
55
+ 54.9373893737793,
56
+ 56.89738845825195,
57
+ 57.28738784790039,
58
+ 59.98738479614258,
59
+ 60.86738586425781,
60
+ 60.887386322021484,
61
+ 61.71739196777344,
62
+ 62.91739273071289,
63
+ 62.957393646240234,
64
+ 63.41739273071289,
65
+ 63.8173942565918,
66
+ 63.83739471435547,
67
+ 63.897396087646484,
68
+ 63.93739700317383,
69
+ 64.06739807128906,
70
+ 64.11434936523438,
71
+ 64.12435150146484,
72
+ 64.15435028076172,
73
+ 64.19435119628906,
74
+ 64.24435424804688,
75
+ 64.57435607910156,
76
+ 64.69000244140625,
77
+ 64.76000213623047
78
  ],
79
  "short_factor": [
 
 
 
80
  1.1,
81
  1.1,
82
+ 1.1,
 
 
83
  1.3000000000000003,
84
  1.3500000000000003,
85
+ 1.3500000000000003,
86
+ 1.4000000000000004,
87
+ 1.5500000000000005,
 
 
88
  2.000000000000001,
89
  2.000000000000001,
90
  2.000000000000001,
 
105
  2.0500000000000007,
106
  2.0500000000000007,
107
  2.0500000000000007,
108
+ 2.0500000000000007,
109
+ 2.0500000000000007,
110
+ 2.0500000000000007,
111
  2.1000000000000005,
112
  2.1000000000000005,
 
 
113
  2.1500000000000004,
114
+ 2.25,
115
+ 2.25,
116
+ 2.25,
117
+ 2.25,
118
+ 2.25,
119
+ 2.3999999999999995,
120
+ 2.4499999999999993,
121
+ 2.499999999999999,
122
+ 2.6999999999999984,
123
+ 2.6999999999999984,
124
  2.7499999999999982,
125
+ 2.799999999999998,
126
+ 2.8999999999999977,
127
+ 3.049999999999997
128
  ],
129
+ "type": "longrope"
130
  },
131
  "rope_theta": 10000.0,
132
  "sliding_window": 262144,
133
  "tie_word_embeddings": false,
134
  "torch_dtype": "bfloat16",
135
+ "transformers_version": "4.42.4",
136
  "use_cache": true,
137
  "vocab_size": 32064
138
  }
qmodel.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b593bf5801aa0f5eddc066f1c3b01e4a490acd30ea1ae869d275c352a329d117
3
  size 932545573
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:751c4e665579b41d169cbdcc855fb95ebb1e91b75ea453308660262dd5c5e4da
3
  size 932545573
smash_config.json CHANGED
@@ -14,7 +14,7 @@
14
  "controlnet": "None",
15
  "unet_dim": 4,
16
  "device": "cuda",
17
- "cache_dir": "/ceph/hdd/staff/charpent/.cache/models8pnn8345",
18
  "batch_size": 1,
19
  "model_name": "microsoft/Phi-3-mini-128k-instruct",
20
  "task": "text_text_generation",
 
14
  "controlnet": "None",
15
  "unet_dim": 4,
16
  "device": "cuda",
17
+ "cache_dir": "/ceph/hdd/staff/charpent/.cache/modelsylk47uod",
18
  "batch_size": 1,
19
  "model_name": "microsoft/Phi-3-mini-128k-instruct",
20
  "task": "text_text_generation",
tokenizer.json CHANGED
@@ -26,9 +26,9 @@
26
  "content": "</s>",
27
  "single_word": false,
28
  "lstrip": false,
29
- "rstrip": false,
30
  "normalized": false,
31
- "special": true
32
  },
33
  {
34
  "id": 32000,
@@ -44,7 +44,7 @@
44
  "content": "<|assistant|>",
45
  "single_word": false,
46
  "lstrip": false,
47
- "rstrip": false,
48
  "normalized": false,
49
  "special": true
50
  },
@@ -53,7 +53,7 @@
53
  "content": "<|placeholder1|>",
54
  "single_word": false,
55
  "lstrip": false,
56
- "rstrip": false,
57
  "normalized": false,
58
  "special": true
59
  },
@@ -62,7 +62,7 @@
62
  "content": "<|placeholder2|>",
63
  "single_word": false,
64
  "lstrip": false,
65
- "rstrip": false,
66
  "normalized": false,
67
  "special": true
68
  },
@@ -71,7 +71,7 @@
71
  "content": "<|placeholder3|>",
72
  "single_word": false,
73
  "lstrip": false,
74
- "rstrip": false,
75
  "normalized": false,
76
  "special": true
77
  },
@@ -80,7 +80,7 @@
80
  "content": "<|placeholder4|>",
81
  "single_word": false,
82
  "lstrip": false,
83
- "rstrip": false,
84
  "normalized": false,
85
  "special": true
86
  },
@@ -89,7 +89,7 @@
89
  "content": "<|system|>",
90
  "single_word": false,
91
  "lstrip": false,
92
- "rstrip": false,
93
  "normalized": false,
94
  "special": true
95
  },
@@ -98,7 +98,7 @@
98
  "content": "<|end|>",
99
  "single_word": false,
100
  "lstrip": false,
101
- "rstrip": false,
102
  "normalized": false,
103
  "special": true
104
  },
@@ -107,7 +107,7 @@
107
  "content": "<|placeholder5|>",
108
  "single_word": false,
109
  "lstrip": false,
110
- "rstrip": false,
111
  "normalized": false,
112
  "special": true
113
  },
@@ -116,7 +116,7 @@
116
  "content": "<|placeholder6|>",
117
  "single_word": false,
118
  "lstrip": false,
119
- "rstrip": false,
120
  "normalized": false,
121
  "special": true
122
  },
@@ -125,7 +125,7 @@
125
  "content": "<|user|>",
126
  "single_word": false,
127
  "lstrip": false,
128
- "rstrip": false,
129
  "normalized": false,
130
  "special": true
131
  }
@@ -150,12 +150,6 @@
150
  "post_processor": {
151
  "type": "TemplateProcessing",
152
  "single": [
153
- {
154
- "SpecialToken": {
155
- "id": "<s>",
156
- "type_id": 0
157
- }
158
- },
159
  {
160
  "Sequence": {
161
  "id": "A",
@@ -164,24 +158,12 @@
164
  }
165
  ],
166
  "pair": [
167
- {
168
- "SpecialToken": {
169
- "id": "<s>",
170
- "type_id": 0
171
- }
172
- },
173
  {
174
  "Sequence": {
175
  "id": "A",
176
  "type_id": 0
177
  }
178
  },
179
- {
180
- "SpecialToken": {
181
- "id": "<s>",
182
- "type_id": 1
183
- }
184
- },
185
  {
186
  "Sequence": {
187
  "id": "B",
@@ -189,17 +171,7 @@
189
  }
190
  }
191
  ],
192
- "special_tokens": {
193
- "<s>": {
194
- "id": "<s>",
195
- "ids": [
196
- 1
197
- ],
198
- "tokens": [
199
- "<s>"
200
- ]
201
- }
202
- }
203
  },
204
  "decoder": {
205
  "type": "Sequence",
 
26
  "content": "</s>",
27
  "single_word": false,
28
  "lstrip": false,
29
+ "rstrip": true,
30
  "normalized": false,
31
+ "special": false
32
  },
33
  {
34
  "id": 32000,
 
44
  "content": "<|assistant|>",
45
  "single_word": false,
46
  "lstrip": false,
47
+ "rstrip": true,
48
  "normalized": false,
49
  "special": true
50
  },
 
53
  "content": "<|placeholder1|>",
54
  "single_word": false,
55
  "lstrip": false,
56
+ "rstrip": true,
57
  "normalized": false,
58
  "special": true
59
  },
 
62
  "content": "<|placeholder2|>",
63
  "single_word": false,
64
  "lstrip": false,
65
+ "rstrip": true,
66
  "normalized": false,
67
  "special": true
68
  },
 
71
  "content": "<|placeholder3|>",
72
  "single_word": false,
73
  "lstrip": false,
74
+ "rstrip": true,
75
  "normalized": false,
76
  "special": true
77
  },
 
80
  "content": "<|placeholder4|>",
81
  "single_word": false,
82
  "lstrip": false,
83
+ "rstrip": true,
84
  "normalized": false,
85
  "special": true
86
  },
 
89
  "content": "<|system|>",
90
  "single_word": false,
91
  "lstrip": false,
92
+ "rstrip": true,
93
  "normalized": false,
94
  "special": true
95
  },
 
98
  "content": "<|end|>",
99
  "single_word": false,
100
  "lstrip": false,
101
+ "rstrip": true,
102
  "normalized": false,
103
  "special": true
104
  },
 
107
  "content": "<|placeholder5|>",
108
  "single_word": false,
109
  "lstrip": false,
110
+ "rstrip": true,
111
  "normalized": false,
112
  "special": true
113
  },
 
116
  "content": "<|placeholder6|>",
117
  "single_word": false,
118
  "lstrip": false,
119
+ "rstrip": true,
120
  "normalized": false,
121
  "special": true
122
  },
 
125
  "content": "<|user|>",
126
  "single_word": false,
127
  "lstrip": false,
128
+ "rstrip": true,
129
  "normalized": false,
130
  "special": true
131
  }
 
150
  "post_processor": {
151
  "type": "TemplateProcessing",
152
  "single": [
 
 
 
 
 
 
153
  {
154
  "Sequence": {
155
  "id": "A",
 
158
  }
159
  ],
160
  "pair": [
 
 
 
 
 
 
161
  {
162
  "Sequence": {
163
  "id": "A",
164
  "type_id": 0
165
  }
166
  },
 
 
 
 
 
 
167
  {
168
  "Sequence": {
169
  "id": "B",
 
171
  }
172
  }
173
  ],
174
+ "special_tokens": {}
 
 
 
 
 
 
 
 
 
 
175
  },
176
  "decoder": {
177
  "type": "Sequence",
tokenizer_config.json CHANGED
@@ -1,6 +1,7 @@
1
  {
2
- "add_bos_token": true,
3
  "add_eos_token": false,
 
4
  "added_tokens_decoder": {
5
  "0": {
6
  "content": "<unk>",
@@ -22,9 +23,9 @@
22
  "content": "</s>",
23
  "lstrip": false,
24
  "normalized": false,
25
- "rstrip": false,
26
  "single_word": false,
27
- "special": true
28
  },
29
  "32000": {
30
  "content": "<|endoftext|>",
@@ -38,7 +39,7 @@
38
  "content": "<|assistant|>",
39
  "lstrip": false,
40
  "normalized": false,
41
- "rstrip": false,
42
  "single_word": false,
43
  "special": true
44
  },
@@ -46,7 +47,7 @@
46
  "content": "<|placeholder1|>",
47
  "lstrip": false,
48
  "normalized": false,
49
- "rstrip": false,
50
  "single_word": false,
51
  "special": true
52
  },
@@ -54,7 +55,7 @@
54
  "content": "<|placeholder2|>",
55
  "lstrip": false,
56
  "normalized": false,
57
- "rstrip": false,
58
  "single_word": false,
59
  "special": true
60
  },
@@ -62,7 +63,7 @@
62
  "content": "<|placeholder3|>",
63
  "lstrip": false,
64
  "normalized": false,
65
- "rstrip": false,
66
  "single_word": false,
67
  "special": true
68
  },
@@ -70,7 +71,7 @@
70
  "content": "<|placeholder4|>",
71
  "lstrip": false,
72
  "normalized": false,
73
- "rstrip": false,
74
  "single_word": false,
75
  "special": true
76
  },
@@ -78,7 +79,7 @@
78
  "content": "<|system|>",
79
  "lstrip": false,
80
  "normalized": false,
81
- "rstrip": false,
82
  "single_word": false,
83
  "special": true
84
  },
@@ -86,7 +87,7 @@
86
  "content": "<|end|>",
87
  "lstrip": false,
88
  "normalized": false,
89
- "rstrip": false,
90
  "single_word": false,
91
  "special": true
92
  },
@@ -94,7 +95,7 @@
94
  "content": "<|placeholder5|>",
95
  "lstrip": false,
96
  "normalized": false,
97
- "rstrip": false,
98
  "single_word": false,
99
  "special": true
100
  },
@@ -102,7 +103,7 @@
102
  "content": "<|placeholder6|>",
103
  "lstrip": false,
104
  "normalized": false,
105
- "rstrip": false,
106
  "single_word": false,
107
  "special": true
108
  },
@@ -110,13 +111,13 @@
110
  "content": "<|user|>",
111
  "lstrip": false,
112
  "normalized": false,
113
- "rstrip": false,
114
  "single_word": false,
115
  "special": true
116
  }
117
  },
118
  "bos_token": "<s>",
119
- "chat_template": "{{ bos_token }}{% for message in messages %}{% if (message['role'] in ['user', 'system']) %}{{'<|user|>' + '\n' + message['content'] + '<|end|>' + '\n' + '<|assistant|>' + '\n'}}{% elif message['role'] == 'assistant' %}{{message['content'] + '<|end|>' + '\n'}}{% endif %}{% endfor %}",
120
  "clean_up_tokenization_spaces": false,
121
  "eos_token": "<|endoftext|>",
122
  "legacy": false,
 
1
  {
2
+ "add_bos_token": false,
3
  "add_eos_token": false,
4
+ "add_prefix_space": null,
5
  "added_tokens_decoder": {
6
  "0": {
7
  "content": "<unk>",
 
23
  "content": "</s>",
24
  "lstrip": false,
25
  "normalized": false,
26
+ "rstrip": true,
27
  "single_word": false,
28
+ "special": false
29
  },
30
  "32000": {
31
  "content": "<|endoftext|>",
 
39
  "content": "<|assistant|>",
40
  "lstrip": false,
41
  "normalized": false,
42
+ "rstrip": true,
43
  "single_word": false,
44
  "special": true
45
  },
 
47
  "content": "<|placeholder1|>",
48
  "lstrip": false,
49
  "normalized": false,
50
+ "rstrip": true,
51
  "single_word": false,
52
  "special": true
53
  },
 
55
  "content": "<|placeholder2|>",
56
  "lstrip": false,
57
  "normalized": false,
58
+ "rstrip": true,
59
  "single_word": false,
60
  "special": true
61
  },
 
63
  "content": "<|placeholder3|>",
64
  "lstrip": false,
65
  "normalized": false,
66
+ "rstrip": true,
67
  "single_word": false,
68
  "special": true
69
  },
 
71
  "content": "<|placeholder4|>",
72
  "lstrip": false,
73
  "normalized": false,
74
+ "rstrip": true,
75
  "single_word": false,
76
  "special": true
77
  },
 
79
  "content": "<|system|>",
80
  "lstrip": false,
81
  "normalized": false,
82
+ "rstrip": true,
83
  "single_word": false,
84
  "special": true
85
  },
 
87
  "content": "<|end|>",
88
  "lstrip": false,
89
  "normalized": false,
90
+ "rstrip": true,
91
  "single_word": false,
92
  "special": true
93
  },
 
95
  "content": "<|placeholder5|>",
96
  "lstrip": false,
97
  "normalized": false,
98
+ "rstrip": true,
99
  "single_word": false,
100
  "special": true
101
  },
 
103
  "content": "<|placeholder6|>",
104
  "lstrip": false,
105
  "normalized": false,
106
+ "rstrip": true,
107
  "single_word": false,
108
  "special": true
109
  },
 
111
  "content": "<|user|>",
112
  "lstrip": false,
113
  "normalized": false,
114
+ "rstrip": true,
115
  "single_word": false,
116
  "special": true
117
  }
118
  },
119
  "bos_token": "<s>",
120
+ "chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{{'<|system|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'user' %}{{'<|user|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>\n' + message['content'] + '<|end|>\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\n' }}{% else %}{{ eos_token }}{% endif %}",
121
  "clean_up_tokenization_spaces": false,
122
  "eos_token": "<|endoftext|>",
123
  "legacy": false,