zamal commited on
Commit
d7936c9
·
verified ·
1 Parent(s): 11161c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -7,15 +7,13 @@ import subprocess
7
  import sys
8
 
9
  def install_bitsandbytes():
10
- # Uninstall bitsandbytes if installed
11
- subprocess.run([sys.executable, "-m", "pip", "uninstall", "-y", "bitsandbytes"])
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}