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

default quantization params set in qat from config #1192

Merged
merged 1 commit into from
Jun 19, 2023
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
4 changes: 3 additions & 1 deletion src/super_gradients/training/sg_trainer/sg_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,9 @@ def quantize_from_config(cls, cfg: Union[DictConfig, dict]) -> Tuple[nn.Module,
quantization_params = get_param(cfg, "quantization_params")

if quantization_params is None:
raise logger.warning("Your recipe does not include quantization_params. Using default quantization params.")
logger.warning("Your recipe does not include quantization_params. Using default quantization params.")
quantization_params = load_recipe("quantization_params/default_quantization_params").quantization_params
cfg.quantization_params = quantization_params

if get_param(cfg.checkpoint_params, "checkpoint_path") is None and get_param(cfg.checkpoint_params, "pretrained_weights") is None:
raise ValueError("Starting checkpoint / pretrained weights are a must for QAT finetuning.")
Expand Down