@@ -9,11 +9,17 @@ https://docs.gpt4all.io/gpt4all_python.html
9
9
10
10
## Installation
11
11
12
+ The easiest way to install the Python bindings for GPT4All is to use pip:
13
+
12
14
```
13
15
pip install gpt4all
14
16
```
15
17
16
- ## Local Build Instructions
18
+ This will download the latest version of the ` gpt4all ` package from PyPI.
19
+
20
+ ## Local Build
21
+
22
+ As an alternative to downloading via pip, you may build the Python bindings from source.
17
23
18
24
### Prerequisites
19
25
@@ -23,25 +29,32 @@ macOS users do not need Vulkan, as GPT4All will use Metal instead.
23
29
24
30
### Building the python bindings
25
31
26
- ** NOTE** : If you are doing this on a Windows machine, you must build the GPT4All backend using [ MinGW64] ( https://www.mingw-w64.org/ ) compiler.
32
+ 1 . Clone GPT4All and change directory:
33
+ ```
34
+ git clone --recurse-submodules https://github.com/nomic-ai/gpt4all.git
35
+ cd gpt4all/gpt4all-backend
36
+ ```
37
+
38
+ 2 . Build the backend.
27
39
28
- 1 . Setup ` llmodel `
40
+ If you are using Windows and have Visual Studio installed:
41
+ ```
42
+ cmake -B build
43
+ cmake --build build --parallel --config RelWithDebInfo
44
+ ```
29
45
46
+ For all other platforms:
30
47
```
31
- git clone --recurse-submodules https://github.com/nomic-ai/gpt4all.git
32
- cd gpt4all/gpt4all-backend/
33
- mkdir build
34
- cd build
35
- cmake ..
36
- cmake --build . --parallel # optionally append: --config Release
48
+ cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
49
+ cmake --build build --parallel
37
50
```
38
- Confirm that ` libllmodel.* ` exists in ` gpt4all-backend/build ` .
39
51
40
- 2 . Setup Python package
52
+ ` RelWithDebInfo ` is a good default, but you can also use ` Release ` or ` Debug ` depending on the situation.
41
53
54
+ 2 . Install the Python package:
42
55
```
43
56
cd ../../gpt4all-bindings/python
44
- pip3 install -e .
57
+ pip install -e .
45
58
```
46
59
47
60
## Usage
0 commit comments