A very simple abstraction for LLMs to get single responses to a given input.
Project description
pleonasty
A very, very, very, very basic library to abstract interactions with an LLM for single-response purposes. Like, if you're a computer scientist, this package will probably make things harder rather than easier. But, if you're like me, then this is great!
In essence, this is a library that makes it a bit easier to load up a "chat" or "instruct" LLM and then have it sequentially provide a single response to multiple input texts. For example, if you want to use an LLM to "code" or annotate texts in the same way that a human would, you might want to give it the same instructions before batch coding an entire dataset. This makes it relatively easy to do so, saving the output as a CSV file.
Installation
The easiest way to get up and running with pleonasty
is to install via pip
, e.g.,
pip install pleonasty
Note that, in order to use this package, you will already need to have your CUDA environment properly configured if you plan to use a GPU for accelerated inference. This includes having the appropriate version of PyTorch installed with CUDA support.
To use pleonasty, ensure you have the following installed:
- Python 3.10 or higher (might work with older versions, but not tested)
- PyTorch with CUDA support (if using a GPU)
All other requirements can be found in the pyproject.toml
file.
How to Use
An example notebook is included in this repo that shows how it can be used. I have also included a "chat mode" where you can load up an LLM and have back-and-forth interactions with it — an example of this is also provided in a sample notebook.
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
File details
Details for the file pleonasty-0.1.1.tar.gz
.
File metadata
- Download URL: pleonasty-0.1.1.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96a0a016793d833f0cf61ba645188f2b266202ffbbcf06d4eadb5e7a9c6b5580 |
|
MD5 | 25d00ff92fc4e65f2fa50b5b26a30387 |
|
BLAKE2b-256 | ce8a9ba96eef026ab675261d9dbf0f15a09afb55d3e46bd87dbfcf57aaf81b05 |
File details
Details for the file pleonasty-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pleonasty-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37b9b4636f9072cd3215a464a3546ac16ceb6e50de3c0bf6316b981bf2784d17 |
|
MD5 | 035228563f52af9a87b68c8b0ead5bf7 |
|
BLAKE2b-256 | f441b5d7902bad6dd867961e3ada2c65e3a9b2a0a39cc982fd038368d7da9e39 |