installation.mdx 1.04 KB
Newer Older
Titus's avatar
Titus committed
1
2
# Installation

Younes Belkada's avatar
Younes Belkada committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Note currently `bitsandbytes` is only supported on CUDA GPU hardwares, support for AMD GPUs and M1 chips (MacOS) is coming soon.

<hfoptions id="OS system">
<hfoption id="Linux">

## Linux

### From Pypi

```bash
pip install bitsandbytes
```

### From source

```bash
git clone https://github.com/TimDettmers/bitsandbytes.git && cd bitsandbytes/
CUDA_VERSION=XXX make cuda12x
python setup.py install
```

with `XXX` being your CUDA version, for <12.0 call `make cuda 11x`

</hfoption>
<hfoption id="Windows">

## Windows

Currently for Windows users, you need to build bitsandbytes from source

```bash
git clone https://github.com/TimDettmers/bitsandbytes.git && cd bitsandbytes/
cmake -B build -DBUILD_CUDA=ON -S .
cmake --build build --config Release
python -m build --wheel
```

Big thanks to [wkpark](https://github.com/wkpark), [Jamezo97](https://github.com/Jamezo97), [rickardp](https://github.com/rickardp), [akx](https://github.com/akx) for their amazing contribution to make bitsandbytes compatible with Windows.

</hfoption>
</hfoptions>