ctranslate2-4you commited on
Commit
a5fc16a
·
verified ·
1 Parent(s): 3bb3183

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -10
README.md CHANGED
@@ -10,19 +10,26 @@ tags:
10
  - chat
11
  - multimodal
12
  ---
13
- Quantization using ```bitsandbytes``` of the model located at:
14
 
15
- https://huggingface.co/allenai/Molmo-7B-D-0924
16
 
17
- NOTE:
18
 
19
- The sample script below requires that you install the following libraries into your virtual environment, and an Nvidia GPU is required. This is NOT MANDATORY when running the model in general. You can run it any way you like, it's just necessary to run my specific "example" script provided below. You can rely on a system-wide installation of CUDA, in which case just remove the ```set_cuda_paths``` function.
20
- - ```nvidia-cublas-cu12==12.1.3.1```
21
- - ```nvidia-cuda-runtime-cu12==12.1.105```
22
- - ```nvidia-cuda-nvrtc-cu12==12.1.105```
23
- - ```nvidia-cufft-cu12==11.0.2.54```
24
 
25
- Also, I've only tested it on ```torch==2.2.2``` although I plan on testing with higher versions. For Windows users, install torch with these commands:
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  ```
28
  pip install https://download.pytorch.org/whl/cu121/torch-2.2.2%2Bcu121-cp311-cp311-win_amd64.whl#sha256=efbcfdd4399197d06b32f7c0e1711c615188cdd65427b933648c7478fb880b3f
@@ -33,6 +40,32 @@ pip install https://download.pytorch.org/whl/cu121/torchvision-0.17.2%2Bcu121-cp
33
  ```
34
  pip install https://download.pytorch.org/whl/cu121/torchaudio-2.2.2%2Bcu121-cp311-cp311-win_amd64.whl#sha256=c7dee68cd3d2b889bab71d4a0c345bdc3ea2fe79a62b921a6b49292c605b6071
35
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  Example script (process single image):
38
 
@@ -55,7 +88,7 @@ def set_cuda_paths():
55
  str(cudnn_path),
56
  str(nvrtc_path),
57
  ]
58
- env_vars = ['CUDA_PATH', 'CUDA_PATH_V12_1', 'PATH']
59
 
60
  for env_var in env_vars:
61
  current_value = os.environ.get(env_var, '')
 
10
  - chat
11
  - multimodal
12
  ---
13
+ Quantization of the [original Molmo-7B-D-0924](https://huggingface.co/allenai/Molmo-7B-D-0924) model using ```bitsandbytes```.
14
 
15
+ This model differs from the [one located here](https://huggingface.co/cyan2k/molmo-7B-D-bnb-4bit) in that it includes modified source code to reduce dependencies to achieve the same results and works out of the box.
16
 
17
+ # NOTE:
18
 
19
+ The example script below requires an Nvidia GPU and that you `pip install` the CUDA libraries into your virtual environment. This is NOT NECESSARY if you plan to install CUDA on a systemwide basis (as most people do). If you install CUDA systemwide, simply remove the ```set_cuda_paths``` function from the example script, but make sure that you've installed a proper version of CUDA and a compatible version of the Pytorch libraries.
 
 
 
 
20
 
21
+ <details><summary>COMPATIBLE CUDA AND PYTORCH 2.2.2 VERSIONS</summary>
22
+
23
+ Pytorch is only tested with specific versions of CUDA. When using pytorch 2.2.2, the following CUDA versions are required:
24
+
25
+ - ```pip install nvidia-cublas-cu12==12.1.3.1```
26
+ - ```pip install nvidia-cuda-runtime-cu12==12.1.105```
27
+ - ```pip install nvidia-cuda-nvrtc-cu12==12.1.105```
28
+ - ```pip install nvidia-cufft-cu12==11.0.2.54```
29
+ - ```pip install nvidia-cudnn-cu12==8.9.2.26```
30
+ - Then install [`torch==2.2.2`](https://download.pytorch.org/whl/cu121/torch/), [`torchvision==0.17`](https://download.pytorch.org/whl/cu121/torchvision/), and [`torchaudio==2.2.2`](https://download.pytorch.org/whl/cu121/torchaudio/) by visiting each of these three links and creating a `pip install` command based on the link for your Python version and platform.
31
+
32
+ For example, for Windows using Python 3.11 you would use the following:
33
 
34
  ```
35
  pip install https://download.pytorch.org/whl/cu121/torch-2.2.2%2Bcu121-cp311-cp311-win_amd64.whl#sha256=efbcfdd4399197d06b32f7c0e1711c615188cdd65427b933648c7478fb880b3f
 
40
  ```
41
  pip install https://download.pytorch.org/whl/cu121/torchaudio-2.2.2%2Bcu121-cp311-cp311-win_amd64.whl#sha256=c7dee68cd3d2b889bab71d4a0c345bdc3ea2fe79a62b921a6b49292c605b6071
42
  ```
43
+ </details>
44
+
45
+ <details><summary>COMPATIBLE CUDA AND PYTORCH 2.5.1 VERSIONS</summary>
46
+
47
+ Pytorch is only tested with specific versions of CUDA. When using pytorch 2.5.1, the following CUDA versions are required:
48
+
49
+ - ```pip install nvidia-cublas-cu12==12.4.5.8```
50
+ - ```pip install nvidia-cuda-runtime-cu12==12.4.127```
51
+ - ```pip install nvidia-cuda-nvrtc-cu12==12.4.127```
52
+ - ```pip install nvidia-cufft-cu12==11.2.1.3```
53
+ - ```pip install nvidia-cudnn-cu12==9.1.0.70```
54
+ - Then install [`torch==2.5.1`](https://download.pytorch.org/whl/cu124/torch/), [`torchvision==0.20.1`](https://download.pytorch.org/whl/cu124/torchvision/), and [`torchaudio==2.5.1`](https://download.pytorch.org/whl/cu124/torchaudio/) by visiting each of these three links and creating a `pip install` command based on the link for your Python version and platform.
55
+
56
+ For example, for Windows using Python 3.11 you would use the following:
57
+
58
+ ```
59
+ pip install https://download.pytorch.org/whl/cu124/torch-2.5.1%2Bcu124-cp311-cp311-win_amd64.whl#sha256=6c8a7003ef1327479ede284b6e5ab3527d3900c2b2d401af15bcc50f2245a59f
60
+ ```
61
+ ```
62
+ pip install https://download.pytorch.org/whl/cu124/torchvision-0.20.1%2Bcu124-cp311-cp311-win_amd64.whl#sha256=15796b453a99ed0f0cbc249d129685ddc88157310135fb3addaf738a15db5306
63
+ ```
64
+ ```
65
+ pip install https://download.pytorch.org/whl/cu124/torchaudio-2.5.1%2Bcu124-cp311-cp311-win_amd64.whl#sha256=b3d75f4e6efc5412fe78c7f2787ee4f39cea1317652e1a47785879cde109f5c4
66
+ ```
67
+ </details>
68
+
69
 
70
  Example script (process single image):
71
 
 
88
  str(cudnn_path),
89
  str(nvrtc_path),
90
  ]
91
+ env_vars = ['CUDA_PATH', 'PATH']
92
 
93
  for env_var in env_vars:
94
  current_value = os.environ.get(env_var, '')