Python bindings for the GGML GPT-J Laguage model
Project description
PyGPT-J
Official supported Python bindings for GPT4All-J language model based on ggml.
Table of contents
Installation
- The easy way is to use the prebuilt wheels
pip install pygptj
- Build it from source:
git clone --recursive https://github.com/abdeladim-s/pygptj && cd pygptj
pip install .
Usage
from pygptj.model import Model
def new_text_callback(text):
print(text, end="")
model = Model('./models/ggml-gpt4all-j.bin')
model.generate("Once upon a time, ", n_predict=55, new_text_callback=new_text_callback)
If you don't want to use the callback
, you can get the results from the generate
method once the inference is finished:
generated_text = model.generate("Once upon a time, ", n_predict=55)
print(generated_text)
GPT4All-J Model
Download the GPT4All-J model.
License
This project is licensed under the MIT 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
pygptj-1.0.0.tar.gz
(217.2 kB
view hashes)
Built Distributions
Close
Hashes for pygptj-1.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7707e5c88d5c3265143409579774f1342fa9475fa83d970ac653f9bc7108865f |
|
MD5 | 3f78cd05b3b1ab9936a48ca0b169bafe |
|
BLAKE2b-256 | c773098439e7a1bc0cb62ec19a96c230cfe3113a92772fe44b41475f2a779f3f |
Close
Hashes for pygptj-1.0.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed21cc12eb6ae067473a858286df9ef75ae03638ecf68d297dd51aaa925e40e4 |
|
MD5 | 95523c642a184067409abecf164a9df0 |
|
BLAKE2b-256 | e9a2744eaa1081e39ce7a97f47c491e7733876a19a218571b2db5427943d7443 |
Close
Hashes for pygptj-1.0.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ce52e6b405eacf32aa949d84f1a5d39c49ed36f41bab7353ef4816ba3a46213 |
|
MD5 | bad48cf3efd03b52e07cf289c647511d |
|
BLAKE2b-256 | 7adcfbcba4b954572ea258d678ab52306ce358286001dcca0ac8793d696a5c4d |
Close
Hashes for pygptj-1.0.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5901c01fc23677771a24b3bfd4c4650a0217a4d877626a4a4876113803e2daf |
|
MD5 | f9aa326951b5238f95241ab27f96160e |
|
BLAKE2b-256 | fa63284c65048002d3ca65dfd0c1f73409cce22cd264c10512a6b77be991f34c |
Close
Hashes for pygptj-1.0.0-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b03b94f38219f95a6fb5515a75de0fe575092f6b722808737ab2b19593f23330 |
|
MD5 | 0c11b6e8ab93700a5065f4cc7d4bfc3e |
|
BLAKE2b-256 | 9f7778920c6a0e53354e514ac200d00edd6135b84c27b002f3846a255c2b383f |
Close
Hashes for pygptj-1.0.0-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f433c11f8260d781ff14f55584f8a40b9dcb6d2fe298ece63f65eebf7a18793 |
|
MD5 | 0cca3c015e3534f46e94bdab18f2bfac |
|
BLAKE2b-256 | b04c51f4fc61b1e89eb027bb0f2d96bb82d3f5f6f5ba565f254dc654d786800d |
Close
Hashes for pygptj-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86bbb5784329942b8cbbe6b00d55acf8a59b155df36f2388e63f01695e1008ec |
|
MD5 | 2d75d10eb1276cfb146c04ca30df9ea9 |
|
BLAKE2b-256 | 65a4e061713509372db6e35339d9e86aa825599a5fc42509aab998207540238f |
Close
Hashes for pygptj-1.0.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 065a6189c6720efea29425fe48bd35c6c3705b193625869afa62e01be3cc3e2d |
|
MD5 | a36c56d23fc2dd0c6637296dc89614bd |
|
BLAKE2b-256 | f512493d2c57a764052d79e3d38b02b44df64bc3e546695e0853d4d2ef748f65 |
Close
Hashes for pygptj-1.0.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fea790dc8fa3919dcada8c407cc2565938174257134f3ca7955246bed237513 |
|
MD5 | 3ee6c0452d95055324e6bb98be64ea17 |
|
BLAKE2b-256 | 4ff1dfe8ca1a85f94cacbf61f3085eb4c7d1b3a32b11a60c2abc6758db8e3933 |
Close
Hashes for pygptj-1.0.0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50aaa6b0ae34cc11ac260715f973ed31f19f3b1d8be2fcbde1c44e9abc877e8b |
|
MD5 | 1bee1b9aeedd47413a57ec54d81146ea |
|
BLAKE2b-256 | a7a091b68242bc49e3aeaed0bc133037e2083db18bd62c1249b823f201e3e9c9 |
Close
Hashes for pygptj-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 343c9ef5e4dcbfa03b69db808772e749a8ca78d159442c06cfcf55fdb0e1b787 |
|
MD5 | 7a21e8968ae14009e5cadd9c7cf4974a |
|
BLAKE2b-256 | 919f487e82f353fb47b9005bc80bf5485a3472170f0bcc52d4ef251e7570f932 |
Close
Hashes for pygptj-1.0.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1949a261e326f65fe6fa1454d1d42032f7b25c545320618751e9e42d9e31260a |
|
MD5 | b9b32425a99a8317b29fcaa74aa44559 |
|
BLAKE2b-256 | 29444a822ab02ec529e5ed27835bc845e004f17f62ebdf80ac120d87109839db |
Close
Hashes for pygptj-1.0.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 807982e44de5d532d0181d42972aa829576ee9dd1e14743f9cf94a2d5d028fcb |
|
MD5 | 3491561bf886afadc4e17cba607edbe2 |
|
BLAKE2b-256 | 6be885f9b0e9917b1ef0a27462d86baeb663300c3c173863ee398ca5a18b437a |
Close
Hashes for pygptj-1.0.0-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b58695f6e1e78ba25a3d9fec979a3ef80d2d53a1e680f506fb0ffef90995df35 |
|
MD5 | 58255ca01eac954337de1a157d0464ad |
|
BLAKE2b-256 | b91b0203b50beb367b45a8fd111c4890ebabfe0bfba50593ff98a755ef0b67a5 |
Close
Hashes for pygptj-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc72e659a2428df97ee997390ce9a477d2617da99c8052427159e6e649fecfd0 |
|
MD5 | 5969580eab61434e060b7300ad7dc2d9 |
|
BLAKE2b-256 | 284d135301de72aca234cc86c0b5b9d7eccfa81504bf79b9c1ee29b677c45ebf |
Close
Hashes for pygptj-1.0.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 014052fcdb12414f06a77fe0228257e2bcaefd53fc98a3e1f29268447e62ea68 |
|
MD5 | 40f5639be21b1ad44108b8a708c8b5c8 |
|
BLAKE2b-256 | f3b3a62bfa7b56de6fb125ea03ad9a2dc63ed5ce46ff6ffff5c9f8719ba8c955 |
Close
Hashes for pygptj-1.0.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29aa3a5ccfb33558c250334d26378cd3c7196fe3f811524b71b2f4f242a4dee7 |
|
MD5 | dc9216a554934849ce6ada3e4a8f32f1 |
|
BLAKE2b-256 | c9bf1e60bd47e3e03028017f6fcfb92d6d6be230e9a30aaa63f7e9ed53f4de91 |
Close
Hashes for pygptj-1.0.0-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3d6784e9fd60ea33305461705fff900935f42c2065e1055f27ee1a3a86bdfbf |
|
MD5 | b6ab83962ed1d2ecd3522a86cb1408c5 |
|
BLAKE2b-256 | 7561afff3e9c56eb118c6db762db3b50269a35a302477d91f36a8c95c6b823fd |
Close
Hashes for pygptj-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1715542ad4f444687911f5208e45987d941cc3d04442a7978bbf01fe73b1848c |
|
MD5 | ef1b266da85b632c223aaa0984f69f7a |
|
BLAKE2b-256 | 5eb58c93b77c61d8ec90bff17f301a4f083ea6cf2cd7387fc6560c7aea764184 |
Close
Hashes for pygptj-1.0.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3383125b01f5b5d37bbaf7a0bde41dd52fded13a7530e24d1a0317b93307cc1d |
|
MD5 | 3c6c9bd4375fdd42362385a5167960ad |
|
BLAKE2b-256 | f790a10d6fc75c6834963401e0651204d67700af9cc37ff38f80d046723af2d6 |