Upload recipe.yaml with huggingface_hub
Browse files- recipe.yaml +43 -0
recipe.yaml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
default_stage:
|
| 2 |
+
default_modifiers:
|
| 3 |
+
SmoothQuantModifier:
|
| 4 |
+
smoothing_strength: 0.5
|
| 5 |
+
mappings:
|
| 6 |
+
- !!python/tuple
|
| 7 |
+
- ['re:.*q_proj', 're:.*k_proj', 're:.*v_proj']
|
| 8 |
+
- re:.*input_layernorm
|
| 9 |
+
- !!python/tuple
|
| 10 |
+
- ['re:.*gate_proj', 're:.*up_proj']
|
| 11 |
+
- re:.*post_attention_layernorm
|
| 12 |
+
ignore: []
|
| 13 |
+
AWQModifier:
|
| 14 |
+
config_groups:
|
| 15 |
+
group_0:
|
| 16 |
+
targets: [Linear]
|
| 17 |
+
weights:
|
| 18 |
+
num_bits: 4
|
| 19 |
+
type: int
|
| 20 |
+
symmetric: true
|
| 21 |
+
group_size: 128
|
| 22 |
+
strategy: group
|
| 23 |
+
block_structure: null
|
| 24 |
+
dynamic: false
|
| 25 |
+
actorder: null
|
| 26 |
+
observer: minmax
|
| 27 |
+
observer_kwargs: {}
|
| 28 |
+
input_activations: null
|
| 29 |
+
output_activations: null
|
| 30 |
+
format: null
|
| 31 |
+
targets: [Linear]
|
| 32 |
+
ignore: [lm_head]
|
| 33 |
+
mappings:
|
| 34 |
+
- smooth_layer: re:.*input_layernorm$
|
| 35 |
+
balance_layers: ['re:.*q_proj$', 're:.*k_proj$', 're:.*v_proj$']
|
| 36 |
+
- smooth_layer: re:.*v_proj$
|
| 37 |
+
balance_layers: ['re:.*o_proj$']
|
| 38 |
+
- smooth_layer: re:.*post_attention_layernorm$
|
| 39 |
+
balance_layers: ['re:.*gate_proj$', 're:.*up_proj$']
|
| 40 |
+
- smooth_layer: re:.*up_proj$
|
| 41 |
+
balance_layers: ['re:.*down_proj$']
|
| 42 |
+
offload_device: !!python/object/apply:torch.device [cpu]
|
| 43 |
+
duo_scaling: true
|