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.2.tar.gz
(217.2 kB
view hashes)
Built Distributions
Close
Hashes for pygptj-1.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92ff72b9fe23c9b7543af5c2d5fb22c6c544cbb6bb8dfbbe483e0948041665d9 |
|
MD5 | 622ffaf25757fa2e724efa64bd87a375 |
|
BLAKE2b-256 | 85cff40917ee023aa26c05939e1260e489a6307cbdceda4fec16305ee6a7bbd6 |
Close
Hashes for pygptj-1.0.2-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d2c8d4770a793b209f5b582d64d2b182670e1f4e8016931eedf6282a5600e74 |
|
MD5 | 23ca19bb0f4c8a9c3371aecb4d068059 |
|
BLAKE2b-256 | 2779a338d15c4c18b6e997993ffc2c1c9c5de36e01044d703a5d0978226cfee6 |
Close
Hashes for pygptj-1.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53ea473287f0a1c971c28aac9cd7f6dee8f47ab8426f0578d0b3761cc62f9056 |
|
MD5 | 8f57af3058a8328c32c525c50cca9535 |
|
BLAKE2b-256 | 4abdacad3a420f7aabd298652639d1e55f989e43224feb53dd1be8c0ffaf5f74 |
Close
Hashes for pygptj-1.0.2-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd101bb7bdfcef660d29e9f9cc38f304df5acf4c6a033e9f64eb4e0f12b76ee3 |
|
MD5 | 547c7bf9615847f1005f7d552a0fe836 |
|
BLAKE2b-256 | 297cf6a2a8b624edeaa47a56dda3ee58cae1d140699e80cd2418326f98c9c340 |
Close
Hashes for pygptj-1.0.2-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b19f30447b2612f99f7ffb654730e0e7e17448acfcd09143f77b8814a251f235 |
|
MD5 | aa695b3a9c148975a0cc64012c8c77d0 |
|
BLAKE2b-256 | e525826987ff32225f7fcecfa8d3593a7cef637c1fbb18d620fe1eb3ef87ed8b |
Close
Hashes for pygptj-1.0.2-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15a2a2d78b85c3094edca5c187425b284da346851885002ae2631be92aca6778 |
|
MD5 | 8a356aa92b44a6f79defac545ed56c47 |
|
BLAKE2b-256 | fe1e368f196ac340d7c6f5cf5d1b8b4fd6a359a11d28319ec1c53728097e1b8b |
Close
Hashes for pygptj-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f6352407edf4469a3091521408a33385b57bdcf5ba5efa3d7c6407f157c185c |
|
MD5 | b5448ab6836f384dccd3152553c9b1da |
|
BLAKE2b-256 | 8b4644bb3c0b2eec6faf41f8b3bab5df2727771416def2181169534fa1c31356 |
Close
Hashes for pygptj-1.0.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a093ea674d81c661944c532c6788e0451f18f3ab4bee5b9577f8935d04f6c36 |
|
MD5 | 940bdfbe306ea2595a16cdafaffd9614 |
|
BLAKE2b-256 | 29175a9f3404f1b0103ce785d9b7edfa869d558cfdd5e46d60f5c7f65edbedc0 |
Close
Hashes for pygptj-1.0.2-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 421df422474cf4ab4cafd96424e2d37d928f1559a13d9fb011c4afa469ea89de |
|
MD5 | bd9cd6cbd0c3780644e52888610277ff |
|
BLAKE2b-256 | 13ce6a2cc4beb15fc96fcb6815269ceb324bcefa01825913cda986b2abe5c0d3 |
Close
Hashes for pygptj-1.0.2-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 459107078dc4a312d62222499a9abfd589d6ed31231a0ddc211b048b66ec6f49 |
|
MD5 | 1e1a64f87ac928b00e9d4a9b3924f3df |
|
BLAKE2b-256 | eb038705494bf719bffd3e7ed61fed7e8431cc778274e5644e7ae5db8dc2bff5 |
Close
Hashes for pygptj-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f9cad1186bf9a08012fd86751318be68903ea1352dabeca46cee87bf41148c2 |
|
MD5 | 2449fa99d7090cd6bb3808a45ae6969f |
|
BLAKE2b-256 | f396755cab447a5c2dad50a210f251d684016b0f006e9dec0122b7fa9154ba73 |
Close
Hashes for pygptj-1.0.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4b1145b70898f68a7438d894e83a4d73c9103fe5392edf19ac516b2991f9504 |
|
MD5 | 64b5d1a38365918d3b9b230b29996eef |
|
BLAKE2b-256 | 57a8c9b644d0ce0638efb0233fe114326c9721bedeb23444a66de71f85625590 |
Close
Hashes for pygptj-1.0.2-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bb22ea628a87f118c6f9cf3f8b855267a73da0bc73af8c381cfd425c2ad31eb |
|
MD5 | d08a9dee803a3edb271a3dcb02e62568 |
|
BLAKE2b-256 | 2ecde8b5c2d51ef8febd83a6e2ab6112c9916cca253b1df195223abfd42ad1fa |
Close
Hashes for pygptj-1.0.2-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7b9a9644689eb26cbae142d481d1242e5e44c0f9a383e43671f7fde5e0ad089 |
|
MD5 | 38430f53041e7ef79378f1a99ea6e09e |
|
BLAKE2b-256 | 1067ee3fbb7bf669ef0d1762f920432987353775ba1bfc6f8d88d2922a3db768 |
Close
Hashes for pygptj-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fe40b6320b9afff310fbd1a1d3a84bb09268646d152d907f46d3bec076a9f50 |
|
MD5 | e76f1bdef5f182173bca016cf13242fa |
|
BLAKE2b-256 | 7c6b9d3d22869d8fd9db9acf421528793609e378ab8a48fd6ad77c8f59daf198 |
Close
Hashes for pygptj-1.0.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d954431ad29e7889dbdac5155f7b4e044d9f3882107f3f8d329f57df7846f630 |
|
MD5 | 290488910ea76a167e2c8f274700f685 |
|
BLAKE2b-256 | 65c53278daa3d7126037572a7b07f783a9a9227dc476674476e2eb3d8cf9a8a0 |
Close
Hashes for pygptj-1.0.2-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fa505e09821942e53bdf280bc26f7d598b33b9336ae2887de6e3cdd0d91ff1f |
|
MD5 | 9195e0c11d4850c1dc224c4eb122564f |
|
BLAKE2b-256 | 07d1c3e34255e6fb9ba4f4d8f5a2b194593518b86109f47630b7759ba243a3a2 |
Close
Hashes for pygptj-1.0.2-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0ff543df1a0e6adf0e644692035d9a1610ab8ee6905a5b1b562b7b7fdb7d769 |
|
MD5 | ad1c7919db4ca752d49e1f0b0a421834 |
|
BLAKE2b-256 | 3cc13a1e697d1770b4c5e7ca0f50d3f69b6fad46e59ebc14142985781beab883 |
Close
Hashes for pygptj-1.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bfae6975b3b656fb0dfed7dcc8a59ef3fc04837521e5f405ae1ae7351a6205c |
|
MD5 | c7a93c4b0a3dd197c1824a3c4fac7113 |
|
BLAKE2b-256 | 10b0ac6215f63da3f1e41b844ec835b056f1cc6edf4fc183b52be1eac36adcf9 |
Close
Hashes for pygptj-1.0.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fc98a81a87e3f0f1d14854dda7a1e3db72c77e3936f58cb89138c25c1363afd |
|
MD5 | 150759e7d38792ce8c3f8e730a494462 |
|
BLAKE2b-256 | 8a27a6d0660545b3f2bb59f034af557dbdfd7e54de524a45417b0a0432120800 |