Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed command line argpasrse to process '--symmetric [True|False]'. #19577

Merged
merged 4 commits into from
Feb 21, 2024
Merged
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 @@ -349,6 +349,10 @@ def process(self):
self.int4_quant_algo()


def ort_convert_str_to_bool(value):
return value.lower() in ("true", "1")


def parse_args():
parser = argparse.ArgumentParser(
description="""Blockwise int4 quantization for MatMul 2D weight matrices.
Expand All @@ -366,7 +370,10 @@ def parse_args():
"--symmetric",
required=False,
default=True,
type=bool,
const=True,
nargs="?",
type=ort_convert_str_to_bool,
choices=[True, False],
help="Indicate whether to quantize the model symmetrically",
)
parser.add_argument(
Expand Down
Loading