From d09caba2c59e29b239be8bf38cca26ed8ae30a2c Mon Sep 17 00:00:00 2001 From: Kinjal Patel Date: Wed, 10 Jun 2026 22:19:31 +0000 Subject: [PATCH 1/3] Fix --quant_cfg CLI parsing type in transformer trainer Signed-off-by: Kinjal Patel --- modelopt/torch/quantization/plugins/transformers_trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modelopt/torch/quantization/plugins/transformers_trainer.py b/modelopt/torch/quantization/plugins/transformers_trainer.py index 57db3e73b6f..30685063c7d 100644 --- a/modelopt/torch/quantization/plugins/transformers_trainer.py +++ b/modelopt/torch/quantization/plugins/transformers_trainer.py @@ -58,7 +58,7 @@ class QuantizationArguments(ModelOptHFArguments): ), }, ) - quant_cfg: str | QuantizeConfig | None = field( + quant_cfg: str | None = field( default=None, metadata={ "help": ( From 2766285f5245e88c28c8aa5cb0d4181cc945efc1 Mon Sep 17 00:00:00 2001 From: Kinjal Patel Date: Wed, 10 Jun 2026 22:50:18 +0000 Subject: [PATCH 2/3] minor Signed-off-by: Kinjal Patel --- modelopt/torch/quantization/plugins/transformers_trainer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/modelopt/torch/quantization/plugins/transformers_trainer.py b/modelopt/torch/quantization/plugins/transformers_trainer.py index 30685063c7d..981f3d990d4 100644 --- a/modelopt/torch/quantization/plugins/transformers_trainer.py +++ b/modelopt/torch/quantization/plugins/transformers_trainer.py @@ -32,7 +32,6 @@ from modelopt.torch.opt.plugins.transformers import ModelOptHFArguments from modelopt.torch.utils import get_module_device, print_rank_0 -from ..config import QuantizeConfig from ..nn import TensorQuantizer from ..utils import ( calibrate_with_adapters, From 9d49456352828dea482d46949434bb76f6f333f8 Mon Sep 17 00:00:00 2001 From: Kinjal Patel Date: Thu, 11 Jun 2026 17:12:31 +0000 Subject: [PATCH 3/3] minor Signed-off-by: Kinjal Patel --- examples/llm_qat/ARGUMENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/llm_qat/ARGUMENTS.md b/examples/llm_qat/ARGUMENTS.md index 579e235c346..0a3e2b7a12d 100644 --- a/examples/llm_qat/ARGUMENTS.md +++ b/examples/llm_qat/ARGUMENTS.md @@ -50,7 +50,7 @@ | Argument | Type | Default | Description | |----------|------|---------|-------------| | `--recipe` | `str` | `None` | Path to a quantization recipe YAML file (built-in or custom). Built-in recipes can be specified by relative path, e.g. 'general/ptq/nvfp4_default-kv_fp8'. Replaces the deprecated --quant_cfg flag. | -| `--quant_cfg` | `modelopt.torch.quantization.config.QuantizeConfig` | `None` | Deprecated: pre-quantize the model with a separate quantization step instead. Specify the quantization format for PTQ/QAT by name (e.g. NVFP4_DEFAULT_CFG). | +| `--quant_cfg` | `str` | `None` | Deprecated: pre-quantize the model with a separate quantization step instead. Specify the quantization format for PTQ/QAT by name (e.g. NVFP4_DEFAULT_CFG). | | `--calib_size` | `int` | `512` | Specify the calibration size for quantization. The calibration dataset is used to setup the quantization scale parameters for PTQ/QAT. | | `--compress` | `bool` | `False` | Whether to compress the model weights after quantization for QLoRA. This is useful for reducing the model size. | | `--calib_batch_size` | `int` | `1` | Batch size for calibration data during quantization. |