A package to easily make an LLM talk with itself forever.
Project description
The End is Never
A package to make an LLM talk with itself forever.
from thendisnever.thend import isnever
isnever()
is_never()
parameters
model_name
: The model to generate text with.- This is the default model.
- This must be a model compatible with AutoModelForCausalLM.
prompt
: The initial prompt for the model.max_memory_ratio
: The % of past tokens to remember.- This must be a real number between 0 and 1, since empty prompts are not allowed (0) and the prompt must be smaller than the model's context window for generation to work (1).
Notes
- 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 before installing this package.
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
-
Test the package in a fresh environment:
pip install dist/thendisnever-<version>.tar.gz
-
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 config pypi-token.pypi <your-token> # Get your token from https://pypi.org/manage/account/token/ 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
thendisnever-0.8.0.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for thendisnever-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd206e95de3a900e5b2dafe2db292d93879264b7bb08abd719e24f637e335167 |
|
MD5 | 11432b7181fd4f85743f36d9c9f94041 |
|
BLAKE2b-256 | 96d40f8e04d11f27bea95c6e2ed04d29eb0b50c8a89ab47c480b8ef9fdfdb4b1 |