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. | diff --git a/modelopt/torch/quantization/plugins/transformers_trainer.py b/modelopt/torch/quantization/plugins/transformers_trainer.py index 57db3e73b6f..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, @@ -58,7 +57,7 @@ class QuantizationArguments(ModelOptHFArguments): ), }, ) - quant_cfg: str | QuantizeConfig | None = field( + quant_cfg: str | None = field( default=None, metadata={ "help": (