Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pleonasty-0.1.2.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

pleonasty-0.1.2-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file pleonasty-0.1.2.tar.gz.

File metadata

  • Download URL: pleonasty-0.1.2.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

Hashes for pleonasty-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3d4fe0619f46b40d629c2161c57575d24ec0b3a914e42e48bdc6beb05283455d
MD5 4a30cc6057a8e897818bc2f0011118e6
BLAKE2b-256 25f49988e9d067267c1c9db410325ac6da775b126c096e4aa7fae43115df5682

See more details on using hashes here.

File details

Details for the file pleonasty-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pleonasty-0.1.2-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

Hashes for pleonasty-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 980f21822574d6361dfee5816f7efa7bcad13adbb107a68f24cda0519f7a7b21
MD5 377476f42a22e05f16d91a9359ece77f
BLAKE2b-256 b241563739a039b2f12255e57d64fc6ea81e9c1ae63a15cd124c504bcd425ca9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page