diff --git a/pyproject.toml b/pyproject.toml index 0b10d0ca13..2f812c769f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ triton = [ "triton-windows ; (sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", ] huggingface = [ - "unsloth_zoo>=2025.10.3", + "unsloth_zoo>=2025.10.4", "wheel>=0.42.0", "packaging", "torchvision", @@ -458,7 +458,7 @@ colab-ampere-torch220 = [ "flash-attn>=2.6.3 ; ('linux' in sys_platform)", ] colab-new = [ - "unsloth_zoo>=2025.10.3", + "unsloth_zoo>=2025.10.4", "packaging", "tyro", "transformers>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,<=4.56.2", diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 93575a043d..bf7d441c38 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2025.10.3" +__version__ = "2025.10.4" __all__ = [ "SUPPORTS_BFLOAT16", @@ -1652,14 +1652,18 @@ def error_out_no_vllm(*args, **kwargs): raise NotImplementedError("Unsloth: vLLM is not yet supported for fast inference for this model! Please use `.generate` instead") -from torchao.core.config import AOBaseConfig try: - from torchao.quantization import Int4WeightOnlyConfig + from torchao.core.config import AOBaseConfig + try: + from torchao.quantization import Int4WeightOnlyConfig + except: + print("Unsloth: TorchAO changed `torchao.quantization.Int4WeightOnlyConfig`") + Int4WeightOnlyConfig = None + pass except: - print("Unsloth: TorchAO changed `torchao.quantization.Int4WeightOnlyConfig`") + AOBaseConfig = None Int4WeightOnlyConfig = None -pass - + pass @dataclass class TorchAOConfig: qat_scheme : str = "int4"