installation.mdx 1.82 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
## Linux

### From Pypi

```bash
pip install bitsandbytes
```

### From source

```bash
git clone https://github.com/TimDettmers/bitsandbytes.git && cd bitsandbytes/
26
27
cmake -B build -DBUILD_CUDA=ON -S .
pip install .
Younes Belkada's avatar
Younes Belkada committed
28
```
29
Note support for non-CUDA GPUs (e.g. AMD, Intel), is also coming soon.
Titus's avatar
Titus committed
30
For a more detailed compilation guide, head to the [dedicated page on the topic](./compiling)
Younes Belkada's avatar
Younes Belkada committed
31
32
33
34
35
36

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

## Windows

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

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

46
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
47

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

Younes Belkada's avatar
Younes Belkada committed
50
</hfoption>
Titus's avatar
Titus committed
51
52
53
54
55
56
57
58
<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
59
</hfoptions>