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.3.tar.gz
(217.2 kB
view hashes)
Built Distributions
Close
Hashes for pygptj-1.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee9ffe1af35be06d62048d94ce4c0d2ca4c14cd359c1106184725f3eb629b8bb |
|
MD5 | adceef16d231455babd05cf413838e62 |
|
BLAKE2b-256 | 30369d3ec8b32ee1e3afbe776ebc9f62acea0ef97f8ce701e381ac53cec08414 |
Close
Hashes for pygptj-1.0.3-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a0b5da5fe7b06165dd9c662008a78b56fed9aef3e7b0e97434163c268d42a55 |
|
MD5 | 8daaec4533dab848cb52d1314504fe55 |
|
BLAKE2b-256 | 29f9c1350fcdc82863741726276b798cbf9cf5eb1473d436825af691183dab4c |
Close
Hashes for pygptj-1.0.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bbef90c181f3f57e1783413a65c9398fdf61b103c97d3da23743b770f246b6f |
|
MD5 | 083cc6bbb5a68079057ebe954b6c500c |
|
BLAKE2b-256 | 3c30eb85536ef3374deb1423156bec4df7c5c8926b563ba6fa76494c04d5f6da |
Close
Hashes for pygptj-1.0.3-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12a45b42a8f4a44de1ed5ab65d6f41e3cdb589e2dceae7afe7a08817748cafb7 |
|
MD5 | 06476741e8a3feac810a714f482b0780 |
|
BLAKE2b-256 | 1d8644b428a9b1f4547353c3d38036ee28caad1d9713615cdd2196f85f4de0c2 |
Close
Hashes for pygptj-1.0.3-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d54bbfa357032bcf7e8dea91d6443a663d641cef59644452d3cef657219ac7f |
|
MD5 | c52e2258e7afc47e3b438bad1f483265 |
|
BLAKE2b-256 | b5ee3849e8885bed6df28e0c437dd10852f97c9fdefdbcdb790844192d8c499b |
Close
Hashes for pygptj-1.0.3-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 903b8e11b67b938029b6f460ade8b0ecff2026881d3678d690c8bb9c5603c45e |
|
MD5 | 1a0a00dffb060a738554592453dce619 |
|
BLAKE2b-256 | 42ed4efd22fd528c246223fea051b3d48870394f24ad7b9de24f39a81f9418dc |
Close
Hashes for pygptj-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d1455207c01075affbac12c4ae3a19f104bcb15734c4bd632c16c4c00a001d6 |
|
MD5 | 082294383a2ad1d15cb3045dc15d34cf |
|
BLAKE2b-256 | b3bde750511d924498a427c8727be2383475f93a28d11f90714f89ff254c5270 |
Close
Hashes for pygptj-1.0.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcde541b808c8f267775214316e0b0593489255938f31944251f9f3d0a7fadaf |
|
MD5 | eb914dc9d373216cee2d3f7cad7a2d90 |
|
BLAKE2b-256 | 4521c0fa522311ed2397aea2d07a642cc6bf45f5285bcec60035caca1479b9e2 |
Close
Hashes for pygptj-1.0.3-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0086b07e4e944b994c63afcb939f73a75b4115464ceb1f96943df69e56f534c |
|
MD5 | 11c5e772580f386cd7925682ac1d001c |
|
BLAKE2b-256 | 4ffd50707a91ef38160e4caa027844bfcb213c0ca80d94eb6db50f1445c09881 |
Close
Hashes for pygptj-1.0.3-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9fe645de3d0451e3358f3de0295adfd9d6d88963e596661b6f1d31f3b3f28e5 |
|
MD5 | 90d6ba81a54f1fa46945a423b22c53b6 |
|
BLAKE2b-256 | 5ad32535eaa6044db411213d44c70def1e4e7727968bfc215968271c7430565e |
Close
Hashes for pygptj-1.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4339eab41b38824592cfe2100726e29704a09c267c84130e62d42ad04d520b78 |
|
MD5 | 6053323a5dc36cf36dcdebe3011284bf |
|
BLAKE2b-256 | 83c9886b41d7850ca2655143b4ff4d9689a0ad7c1fab7792fa84e4df0ddc5b27 |
Close
Hashes for pygptj-1.0.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 024b0f8645c289af6921d11f781efd49cf2e2336a301af5b9741ef0a90c1fec1 |
|
MD5 | 7e676e052218e7d5d18380f6fafdbb53 |
|
BLAKE2b-256 | a20ffe2b1220a2f8dcc51c69c1ea88bab91e0c4ce29b5c482d205ef2f7bf98f8 |
Close
Hashes for pygptj-1.0.3-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc5f6f5bc7226284ec6459fb0771f0d1d66b3414780512a2dc8cdecb8500e859 |
|
MD5 | 591d11a5688cc74825a65ec895768659 |
|
BLAKE2b-256 | 3c4f02bebf1d9584195f5da05fae8be8bae12bd7c5effc4324b18e5de394ea88 |
Close
Hashes for pygptj-1.0.3-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0c1144767070e08aaf78665ef86025081fe7a3e4c3a83cf8efc481a290d9fa7 |
|
MD5 | 6efba2753fae4d9d063f9f7c4728040a |
|
BLAKE2b-256 | 147a272faede6c750f4d0d3bafbfe2b363f448d65c8123651e78fea06b184ca1 |
Close
Hashes for pygptj-1.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06571b05896982626f2194c2b49a7e3466b791d08c203d03970bfd45d1f6caa8 |
|
MD5 | ae98333512df6532237ed4a63817cb67 |
|
BLAKE2b-256 | 115dab8d883774db357a9079d477ff9342942133b7c30c7d8dd70fb96cff10b6 |
Close
Hashes for pygptj-1.0.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34b42346eadbd50b563187c0ab3e92fe3c10ef206d0ab66befaaf5388e67094e |
|
MD5 | c5e200459625739f77471804a24ae499 |
|
BLAKE2b-256 | 115a078aacaf0a91f1053897831b092d9cd139c9d50821a6361574cdc268d713 |
Close
Hashes for pygptj-1.0.3-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79cfe55c23dcf80baf723b6168d8c84992fb2bca6982ef4c93e30f24e36d982c |
|
MD5 | 5d34385f61b9d2b2ef873a4812e32ffb |
|
BLAKE2b-256 | 6e30338e170194018cb1a1a9c967c9a23c776957ad741dbc7f795f5cc0e8f7a6 |
Close
Hashes for pygptj-1.0.3-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c785d22a3d4503252a0e3281b48ebb138fd47c24720bcd5b4dd0da7aeed3ac5b |
|
MD5 | 90e84d367a6d533e2fb439a7c256ac7f |
|
BLAKE2b-256 | d27f60bd7d52733fcea3d0f32b222c937a1054f336e1a2df8993ec67c7f34ea9 |
Close
Hashes for pygptj-1.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcc9f97f3d9c7b3ca9b2d8af9d1de4c9ce1b15cc1955294532509a738c237c74 |
|
MD5 | a3470628fce12d0d5c5606e8dc3d8ac6 |
|
BLAKE2b-256 | fe55f0b945fa499918bcb97f2f4f934f58bd335c6e5bb293e91ad43a4d29db45 |
Close
Hashes for pygptj-1.0.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2856bb0af978dce9cb60f5dcdfd0342bf39a0d784669084f07f814766582a80f |
|
MD5 | 037bcf9d528b28d026c32824267d4431 |
|
BLAKE2b-256 | b8ac19923988781130911f6c031a5a59a0b6a7be703cdcf32e6d8055a3d7f9db |