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

Younes Belkada's avatar
Younes Belkada committed
3
4
5
6
7
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">

Titus's avatar
Titus committed
8
9
10
11
12
13
## Hardware requirements:
 - LLM.int8(): NVIDIA Turing (RTX 20xx; T4) or Ampere GPU (RTX 30xx; A4-A100); (a GPU from 2018 or newer).
 - 8-bit optimizers and quantization: NVIDIA Kepler GPU or newer (>=GTX 78X).

Supported CUDA versions: 10.2 - 12.0  #TODO: check currently supported versions

Younes Belkada's avatar
Younes Belkada committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## 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
```

Titus's avatar
Titus committed
30
31
32
with `XXX` being your CUDA version, for <12.0 call `make cuda 11x`. Note support for non-CUDA GPUs (e.g. AMD, Intel), is also coming soon.

For a more detailed compilation guide, head to the [dedicated page on the topic](./compiling)
Younes Belkada's avatar
Younes Belkada committed
33
34
35
36
37
38

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

## Windows

Titus's avatar
Titus committed
39
Currently for Windows users, you need to build bitsandbytes from source:
Younes Belkada's avatar
Younes Belkada committed
40
41
42
43
44
45
46
47

```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
```

48
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 contributions to make bitsandbytes compatible with Windows.
Younes Belkada's avatar
Younes Belkada committed
49

Titus's avatar
Titus committed
50
51
For a more detailed compilation guide, head to the [dedicated page on the topic](./compiling)

Younes Belkada's avatar
Younes Belkada committed
52
</hfoption>
Titus's avatar
Titus committed
53
54
55
56
57
58
59
60
<hfoption id="MacOS">

## MacOS

Mac support is still a work in progress. Please make sure to check out the [Apple Silicon implementation coordination issue](https://github.com/TimDettmers/bitsandbytes/issues/1020) to get notified about the discussions and progress with respect to MacOS integration.

</hfoption>

Younes Belkada's avatar
Younes Belkada committed
61
</hfoptions>