Python bindings for the C++ port of GPT4All-J model.
Project description
GPT4All-J
Python bindings for the C++ port of GPT4All-J model.
Installation
pip install gpt4all-j
Download the model from here.
Usage
from gpt4allj import Model
model = Model('/path/to/ggml-gpt4all-j.bin')
print(model.generate('AI is going to'))
Parameters
model.generate(prompt,
seed=-1,
n_threads=-1,
n_predict=200,
top_k=40,
top_p=0.9,
temp=0.9,
n_batch=8)
C++ Library
To build the C++ library from source, please see gptj.cpp. Once you have built the shared libraries, you can use them as:
from gpt4allj import Model, load_library
lib = load_library('/path/to/libgptj.so', '/path/to/libggml.so')
model = Model('/path/to/ggml-gpt4all-j.bin', lib=lib)
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gpt4all-j-0.1.4.tar.gz
(527.7 kB
view details)
File details
Details for the file gpt4all-j-0.1.4.tar.gz.
File metadata
- Download URL: gpt4all-j-0.1.4.tar.gz
- Upload date:
- Size: 527.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
140b4bf1b8436815be667adfde669096882677ac3d327bd89928913ab7b72eb0
|
|
| MD5 |
8097b01c0c3407089bf3ff2fa9fb0cb9
|
|
| BLAKE2b-256 |
c24f928f1645f5ada4ccc5cba3b2dc7ca4914ccb10fa1565972f77101f36fa65
|