Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Add use_mse_search to GPTQ Config #1683

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading