Skip to content

Commit

Permalink
add use_mse_search
Browse files Browse the repository at this point in the history
Signed-off-by: Kaihui-intel <[email protected]>
  • Loading branch information
Kaihui-intel committed Aug 7, 2024
1 parent b400cb9 commit 63f2929
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@
action="store_true",
help="Use determined group to do quantization",
)
parser.add_argument(
"--use_mse_search",
action="store_true",
help="Enables mean squared error (MSE) search.",
)
# ============AUTOROUND configs==============
parser.add_argument(
"--lr",
Expand Down Expand Up @@ -261,6 +266,7 @@
sym=True if args.scheme == "sym" else False,
blocksize=args.blocksize,
static_groups=args.static_groups,
use_mse_search=args.use_mse_search,
group_size=args.group_size,
n_samples=args.n_samples,
seq_len=args.seq_len,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ def convert_to_quantized_model(model, config, device="cpu"):
percdamp=config.damp_percent,
block_size=config.blocksize,
static_groups=config.static_groups,
use_mse_search=config.use_mse_search,
)
if config.llm_int8_skip_modules != []:
for module in config.llm_int8_skip_modules:
Expand Down
2 changes: 2 additions & 0 deletions intel_extension_for_transformers/transformers/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ def __init__(
n_samples: int = 128,
seq_len: int = 2048,
static_groups: bool = False,
use_mse_search: bool = False,
true_sequential: bool = False,
layer_wise: bool = False,
use_ggml: bool = False,
Expand Down Expand Up @@ -908,6 +909,7 @@ def __init__(
self.damp_percent = damp_percent
self.desc_act = desc_act
self.static_groups = static_groups
self.use_mse_search = use_mse_search
self.true_sequential = true_sequential
self.layer_wise = layer_wise
self.seq_len = seq_len
Expand Down

0 comments on commit 63f2929

Please sign in to comment.