From 940035b27efefd98f12a4460652709ec4c66564c Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 16 Oct 2025 05:13:07 -0700 Subject: [PATCH] Update _utils.py --- unsloth/models/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 6728044c8e..93575a043d 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1726,7 +1726,7 @@ def _prepare_model_for_qat(model: torch.nn.Module, qat_scheme: Union[str, TorchA inner_model = model while hasattr(inner_model, "model"): inner_model._torchao_config = torchao_config - inner_model = model.model + inner_model = inner_model.model inner_model._torchao_config = torchao_config # Quantize with TorchAO quantize_(model, QATConfig(base_config, step = "prepare"), filter_fn = filter_fn)