Spaces:
Running
Running
Upload transformers-bitsandbytes.patch
Browse filesunsloth puzzles : fix Q4 model loading error in official notebook :
requires installing HF transformers module locally after patching
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
|