From 47569be1d66b7d0f583accd4fa3ff3db299a57bc Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Thu, 30 Nov 2023 17:27:48 +1100 Subject: [PATCH] Update __init__.py --- unsloth/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/unsloth/__init__.py b/unsloth/__init__.py index 63689802d9..baf3919590 100644 --- a/unsloth/__init__.py +++ b/unsloth/__init__.py @@ -52,4 +52,11 @@ if reload_package: importlib.reload(torch) pass +# Try loading bitsandbytes +import bitsandbytes as bnb +try: + cdequantize_blockwise_fp32 = bnb.functional.lib.cdequantize_blockwise_fp32 +except: + raise ImportError("CUDA is not linked properly. Try running `ldconfig /usr/lib64-nvidia` first.") + from .models import *