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 Hane3e4b7dfc31d
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index bf5216b2284..873a2723c23 100644
--- a/unsloth/models/_utils.py
+++ b/unsloth/models/_utils.py
@@ -162,6 +162,20 @@ if hasattr(transformers.cache_utils, "DynamicCache") and \
pass
# =============================================
+# =============================================
+# Weird Databricks errors
+from transformers.utils import is_openai_available
+if is_openai_available():
+ try:
+ from openai import OpenAI
+ except:
+ print("Unsloth: OpenAI failed to import - ignoring for now.")
+ import transformers.utils
+ def _is_openai_available(): return False
+ transformers.utils.is_openai_available = _is_openai_available
+ pass
+pass
+
# =============================================
# Get Flash Attention v2 if Ampere (RTX 30xx, A100)
import bitsandbytes as bnb