Spaces:
Runtime error
Runtime error
Commit ·
9119bed
1
Parent(s): 76c5331
disable quantization
Browse files
app.py
CHANGED
|
@@ -39,7 +39,7 @@ print(">>> MODEL CACHE PATH:", MODEL_CACHE, os.listdir(MODEL_CACHE))
|
|
| 39 |
|
| 40 |
device = "gpu" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
| 41 |
dtype = torch.float16 if device in ("mps", "gpu") else torch.float32
|
| 42 |
-
bnb_config = BitsAndBytesConfig(load_in_8bit=True)
|
| 43 |
|
| 44 |
|
| 45 |
# If lower memory usage needed:
|
|
@@ -77,7 +77,7 @@ def load_model():
|
|
| 77 |
local_files_only=True,
|
| 78 |
torch_dtype=dtype,
|
| 79 |
trust_remote_code=True,
|
| 80 |
-
quantization_config=bnb_config,
|
| 81 |
no_split_module_classes=["Block"],
|
| 82 |
device_map="auto"
|
| 83 |
).to(device).eval()
|
|
|
|
| 39 |
|
| 40 |
device = "gpu" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
| 41 |
dtype = torch.float16 if device in ("mps", "gpu") else torch.float32
|
| 42 |
+
# bnb_config = BitsAndBytesConfig(load_in_8bit=True)
|
| 43 |
|
| 44 |
|
| 45 |
# If lower memory usage needed:
|
|
|
|
| 77 |
local_files_only=True,
|
| 78 |
torch_dtype=dtype,
|
| 79 |
trust_remote_code=True,
|
| 80 |
+
# quantization_config=bnb_config,
|
| 81 |
no_split_module_classes=["Block"],
|
| 82 |
device_map="auto"
|
| 83 |
).to(device).eval()
|