From e9451a36d4ca0f485fe5610058cfb29fc4421161 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 5 Nov 2024 14:54:07 -0800 Subject: [PATCH] Update _utils.py --- unsloth/models/_utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index bb004d588d..95ea381f00 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -389,11 +389,13 @@ import torch._inductor.utils torch._inductor.utils.is_big_gpu = is_big_gpu -UNSLOTH_COMPILE_DEBUG = os.environ.get("UNSLOTH_COMPILE_DEBUG", "0") == "1" -UNSLOTH_COMPILE_MAXIMUM = os.environ.get("UNSLOTH_COMPILE_MAXIMUM", "0") == "1" +UNSLOTH_COMPILE_DEBUG = os.environ.get("UNSLOTH_COMPILE_DEBUG", "0") == "1" +UNSLOTH_COMPILE_MAXIMUM = os.environ.get("UNSLOTH_COMPILE_MAXIMUM", "0") == "1" +UNSLOTH_COMPILE_IGNORE_ERRORS = os.environ.get("UNSLOTH_COMPILE_IGNORE_ERRORS", "0") == "1" patch_torch_compile( - debug = UNSLOTH_COMPILE_DEBUG, - O3 = UNSLOTH_COMPILE_MAXIMUM, + debug = UNSLOTH_COMPILE_DEBUG, + O3 = UNSLOTH_COMPILE_MAXIMUM, + ignore_errors = UNSLOTH_COMPILE_IGNORE_ERRORS, ) torch_compile_options = {