Skip to content

Update --int8 flag to --optimized flag #2215

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

XuehaoSun
Copy link
Contributor

Type of Change

feature or bug fix or documentation or validation or others
API changed or not

Description

detail description

Expected Behavior & Potential Risk

the expected behavior that triggered by this PR

How has this PR been tested?

how to reproduce the test (including hardware information)

Dependency Change?

any library dependency introduced or removed

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@XuehaoSun XuehaoSun requested review from chensuyue, xin3he and Copilot May 28, 2025 06:05
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the command-line flag from "--int8" to "--optimized" to better reflect the behavior of loading optimized models rather than strictly int8-quantized ones.

  • Updated flag references in model loading and optimization logic across multiple demonstration files.
  • Modified printed messages and argument help text to align with the new flag nomenclature.

Reviewed Changes

Copilot reviewed 12 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
examples/3.x_api/pytorch/recommendation/dlrm/static_quant/ipex/dlrm_s_pytorch.py Replaced "int8" with "optimized" in optimization conditions.
examples/3.x_api/pytorch/nlp/huggingface_models/question-answering/quantization/static_quant/ipex/run_qa.py Updated flag argument and printed message accordingly.
examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/static_quant/pt2e/run_clm_no_trainer.py Renamed flag usage for loading models.
examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/static_quant/ipex/run_clm_no_trainer.py Updated flag checks and printed messages for model loading.
examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/smooth_quant/run_clm_no_trainer.py Changed the argument flag and associated model load condition.
examples/3.x_api/pytorch/image_recognition/torchvision_models/quantization/static_quant/ipex/main.py Adjusted flag conditionals and printed messages in the main function.
examples/3.x_api/pytorch/diffusion_model/diffusers/stable_diffusion/smooth_quant/main.py Modified the flag and condition for loading quantized models.
examples/3.x_api/pytorch/cv/static_quant/main.py Updated the flag and condition used for model evaluation.
Files not reviewed (12)
  • examples/3.x_api/pytorch/cv/static_quant/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/diffusion_model/diffusers/stable_diffusion/smooth_quant/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/image_recognition/torchvision_models/quantization/static_quant/ipex/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/multimodal-modeling/quantization/auto_round/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/fp8_quant/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/smooth_quant/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/static_quant/ipex/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/static_quant/pt2e/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/transformers/weight_only/text-generation/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/weight_only/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/nlp/huggingface_models/question-answering/quantization/static_quant/ipex/run_benchmark.sh: Language not supported
  • examples/3.x_api/pytorch/recommendation/dlrm/static_quant/ipex/run_benchmark.sh: Language not supported
Comments suppressed due to low confidence (1)

examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/static_quant/ipex/run_clm_no_trainer.py:201

  • [nitpick] Consider renaming 'int8_bf16_mixed' to align with the new '--optimized' flag convention for consistency, if appropriate for this use case.
if args.optimized or args.int8_bf16_mixed:

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants