Mightypeacock commited on
Commit
33819de
·
verified ·
1 Parent(s): dfb57ba

Upload transformers-bitsandbytes.patch

Browse files

unsloth puzzles : fix Q4 model loading error in official notebook :
requires installing HF transformers module locally after patching

Files changed (1) hide show
  1. transformers-bitsandbytes.patch +13 -0
transformers-bitsandbytes.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/transformers/utils/import_utils.py b/src/transformers/utils/import_utils.py
2
+ index aa7be764c..c1f7ccadc 100755
3
+ --- a/src/transformers/utils/import_utils.py
4
+ +++ b/src/transformers/utils/import_utils.py
5
+ @@ -921,7 +921,7 @@ def is_torch_xpu_available(check_device=False):
6
+
7
+ @lru_cache()
8
+ def is_bitsandbytes_available():
9
+ - if not is_torch_available() or not _bitsandbytes_available:
10
+ + if not is_torch_available():
11
+ return False
12
+
13
+ import torch