A package to easily make an LLM talk with itself for eternity.
Project description
The End is Never
A package to make an LLM talk with itself for eternity.
from thendisnever.theend import isnever
isnever(
model_name='Fredithefish/ScarletPajama-3B-HF', # Default LLM
prompt='THE END IS NEVER THE END IS NEVER ', # Default prompt
max_memory_ratio=0.25 # Default % of latest tokens to remember
)
Notes
- For the default LLM (which you can change as shown above), you'll need at least:
- ~ 6GB of free disk space
- ~ 15GB of RAM
- When running
isnever()
for the first time, it will download the model and tokenizer from HuggingFace. This will take a while, but it only needs to be done once. - If you want to use the CPU (not recommended because it's slow, but it works), make sure you have PyTorch for CPU installed.
Contributing
-
Install poetry if necessary.
-
Create and setup the poetry environment:
git clone https://github.com/andrewhinh/thendisnever.git cd thendisnever poetry shell poetry install
-
Make your changes, remembering to update in
pyproject.toml
theversion
in thetool.poetry
section and thetool.poetry.dependencies
section as necessary. -
Build the package:
poetry build
-
Add
TestPyPI
as a source:poetry config repositories.testpypi https://test.pypi.org/legacy/
-
Publish the package to
TestPyPI
:poetry publish -r testpypi
-
Test the package in a fresh environment:
pip install --index-url https://test.pypi.org/simple/ --no-deps --upgrade thendisnever
-
Once confirmed to work, make a PR from a feature branch to main on GitHub.
-
Once PR is merged, email me to be added as a collaborator on PyPI.
-
Once added as a collaborator, publish the package to
PyPI
:poetry publish
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
Built Distribution
Hashes for thendisnever-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39798e9065c1581ab7b5d475d62605c361e3e8ba8d9f290d6f42b58c84395f33 |
|
MD5 | cf090e93645f8c5269a779faaae0658e |
|
BLAKE2b-256 | 64f08dcb6417003d6c352883ff69ea44be0b7fdbde58930096459087d9bb4845 |