Update _utils.py
This commit is contained in:
parent
1c063b4c98
commit
f195ee1e65
1 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue