Skip to main content

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'))

Run in Google Colab

Parameters

model.generate(prompt,
               seed=-1,
               n_threads=-1,
               n_predict=200,
               top_k=40,
               top_p=0.9,
               temp=0.9)

macOS

macOS isn't supported out of the box yet but you can use it with Docker or try building the C++ library from source here. 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

MIT

Project details


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.0.tar.gz (391.0 kB view details)

Uploaded Source

File details

Details for the file gpt4all-j-0.1.0.tar.gz.

File metadata

  • Download URL: gpt4all-j-0.1.0.tar.gz
  • Upload date:
  • Size: 391.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for gpt4all-j-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ef454cccde14027acf988995184175db9db10e13aa8c2505d3ac8691276a850e
MD5 45b41552230150af4df68fde8b1a9004
BLAKE2b-256 24b026ee59ab9b488181d883de070ee2e28fc0741ff3ec3d31a976649e395b79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page