Skip to content

Commit

Permalink
update recipes for new modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Sara Adkins committed Jun 10, 2024
1 parent 934f0d8 commit 9b3e5f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 73 deletions.
27 changes: 1 addition & 26 deletions tests/sparseml/transformers/obcq/recipes/quant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,7 @@ test_stage:
[["re:.*q_proj", "re:.*k_proj", "re:.*v_proj"], "re:.*input_layernorm"],
[["re:.*gate_proj", "re:.*up_proj"], "re:.*post_attention_layernorm"]
]
LegacyQuantizationModifier:
ignore:
- LlamaRotaryEmbedding
- LlamaRMSNorm
- SiLU
- model.layers.0.mlp.down_proj
- model.layers.1.mlp.down_proj
- model.layers.2.mlp.down_proj
- model.layers.3.mlp.down_proj
- model.layers.4.mlp.down_proj
- model.layers.5.mlp.down_proj
scheme_overrides:
Embedding:
input_activations: null
weights:
num_bits: 8
symmetric: False
GPTQModifier:
block_size: 128
sequential_update: False
percdamp: 0.01
targets: [
"model.layers.0",
"model.layers.1",
"model.layers.2",
"model.layers.3",
"model.layers.4",
"model.layers.5"
]
percdamp: 0.01
48 changes: 7 additions & 41 deletions tests/sparseml/transformers/obcq/recipes/quant_and_sparse.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,18 @@
test_stage:
obcq_modifiers:
SparseGPTModifier:
sparsity: 0.5
block_size: 128
sequential_update: False
percdamp: 0.01
mask_structure: "0:0"
SmoothQuantModifier:
smoothing_strength: 0.5
mappings: [
[["re:.*q_proj", "re:.*k_proj", "re:.*v_proj"], "re:.*input_layernorm"],
[["re:.*gate_proj", "re:.*up_proj"], "re:.*post_attention_layernorm"]
]
LegacyQuantizationModifier:
ignore:
- LlamaRotaryEmbedding
- LlamaRMSNorm
- SiLU
- model.layers.0.mlp.down_proj
- model.layers.1.mlp.down_proj
- model.layers.2.mlp.down_proj
- model.layers.3.mlp.down_proj
- model.layers.4.mlp.down_proj
- model.layers.5.mlp.down_proj
post_oneshot_calibration: True
scheme_overrides:
Embedding:
input_activations: null
weights:
num_bits: 8
symmetric: False
GPTQModifier:
block_size: 128
sequential_update: False
percdamp: 0.01
targets: [
"model.layers.0",
"model.layers.1",
"model.layers.2",
"model.layers.3",
"model.layers.4",
"model.layers.5"
]
SparseGPTModifier:
sparsity: 0.5
block_size: 128
sequential_update: False
percdamp: 0.01
mask_structure: "0:0"
targets: [
"model.layers.0",
"model.layers.1",
"model.layers.2",
"model.layers.3",
"model.layers.4",
"model.layers.5"
]
percdamp: 0.01
7 changes: 1 addition & 6 deletions tests/sparseml/transformers/obcq/recipes/sparse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,4 @@ test_stage:
block_size: 128
sequential_update: False
percdamp: 0.01
mask_structure: "0:0"
targets: [
"model.layers.0",
"model.layers.1",
"lm_head"
]
mask_structure: "0:0"

0 comments on commit 9b3e5f3

Please sign in to comment.