Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Update _utils.py

Daniel Hane9451a36d4ca
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index bb004d588d5..95ea381f001 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 = {