Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -7,15 +7,13 @@ import subprocess
|
|
7 |
import sys
|
8 |
|
9 |
def install_bitsandbytes():
|
10 |
-
#
|
11 |
-
subprocess.run([sys.executable, "-m", "pip", "
|
12 |
-
|
13 |
-
# Reinstall bitsandbytes with the required options
|
14 |
-
subprocess.run([sys.executable, "-m", "pip", "install", "bitsandbytes", "--force-reinstall", "--index-url", "https://pypi.org/simple/", "--no-cache-dir"])
|
15 |
|
16 |
# Call the function at the start of the script
|
17 |
install_bitsandbytes()
|
18 |
|
|
|
19 |
# Load the model and processor
|
20 |
repo_name = "cyan2k/molmo-7B-O-bnb-4bit"
|
21 |
arguments = {"device_map": "auto", "torch_dtype": "auto", "trust_remote_code": True}
|
|
|
7 |
import sys
|
8 |
|
9 |
def install_bitsandbytes():
|
10 |
+
# Reinstall bitsandbytes with CPU support
|
11 |
+
subprocess.run([sys.executable, "-m", "pip", "install", "bitsandbytes-cpu", "--force-reinstall", "--index-url", "https://pypi.org/simple/", "--no-cache-dir"])
|
|
|
|
|
|
|
12 |
|
13 |
# Call the function at the start of the script
|
14 |
install_bitsandbytes()
|
15 |
|
16 |
+
|
17 |
# Load the model and processor
|
18 |
repo_name = "cyan2k/molmo-7B-O-bnb-4bit"
|
19 |
arguments = {"device_map": "auto", "torch_dtype": "auto", "trust_remote_code": True}
|