Skip to content
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
14 changes: 12 additions & 2 deletions QEfficient/cloud/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def main(
enable_qnn: Optional[bool] = False,
qnn_config: Optional[str] = None,
trust_remote_code: Optional[bool] = False,
ccl_enabled: Optional[bool] = False,
**kwargs,
) -> None:
"""
Expand Down Expand Up @@ -237,13 +238,16 @@ def main(
if args.mxint8:
logger.warning("mxint8 is going to be deprecated in a future release, use -mxint8_kv_cache instead.")

qaic_config = {"ccl_enabled": True} if ccl_enabled else None

qeff_model = QEFFCommonLoader.from_pretrained(
pretrained_model_name_or_path=model_name,
cache_dir=cache_dir,
hf_token=hf_token,
full_batch_size=full_batch_size,
local_model_dir=local_model_dir,
trust_remote_code=trust_remote_code,
qaic_config=qaic_config,
)

image_path = kwargs.pop("image_path", None)
Expand Down Expand Up @@ -343,15 +347,21 @@ def main(
parser.add_argument(
"--comp-ctx-lengths-prefill",
type=lambda comp_ctx_lengths_prefill: [int(x) for x in comp_ctx_lengths_prefill.split(",")],
default=[512],
default=None,
help="Define ccl list in csv format (e.g.,--comp-ctx-lengths 512,1024,2048).",
)
parser.add_argument(
"--comp-ctx-lengths-decode",
type=lambda comp_ctx_lengths_decode: [int(x) for x in comp_ctx_lengths_decode.split(",")],
default=[2048],
default=None,
help="Define ccl list in csv format (e.g.,--comp-ctx-lengths 512,1024,2048).",
)
parser.add_argument(
"--ccl_enabled",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its better to keep the flag name as enable_ccl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have used this flag name in the ccl implementation. I think it's better to keep it consistent with other scripts.

"--ccl-enabled",
action="store_true",
help="If passed, ccl feature will be activated",
)
parser.add_argument(
"--mxfp6",
"--mxfp6_matmul",
Expand Down
Loading