Skip to content

Commit b881598

Browse files
authored
py: improve README (#1860)
Signed-off-by: Jared Van Bortel <[email protected]>
1 parent a9c5f53 commit b881598

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

gpt4all-bindings/python/README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ https://docs.gpt4all.io/gpt4all_python.html
99

1010
## Installation
1111

12+
The easiest way to install the Python bindings for GPT4All is to use pip:
13+
1214
```
1315
pip install gpt4all
1416
```
1517

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.
1723

1824
### Prerequisites
1925

@@ -23,25 +29,32 @@ macOS users do not need Vulkan, as GPT4All will use Metal instead.
2329

2430
### Building the python bindings
2531

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.
2739

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

46+
For all other platforms:
3047
```
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
3750
```
38-
Confirm that `libllmodel.*` exists in `gpt4all-backend/build`.
3951

40-
2. Setup Python package
52+
`RelWithDebInfo` is a good default, but you can also use `Release` or `Debug` depending on the situation.
4153

54+
2. Install the Python package:
4255
```
4356
cd ../../gpt4all-bindings/python
44-
pip3 install -e .
57+
pip install -e .
4558
```
4659

4760
## Usage

0 commit comments

Comments
 (0)