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.3.3.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pleonasty-0.3.3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pleonasty-0.3.3.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.5

File hashes

Hashes for pleonasty-0.3.3.tar.gz
Algorithm Hash digest
SHA256 d6290746a8bae3343eb25b89ea8cdfa50f52434a9428acdca9eeea432f201a15
MD5 a5c77ac04d36ad43ad09661f06ba8ef4
BLAKE2b-256 65281b84569ccde1235f6778147b34c7e7400aabd83c9b6cfbc71a0c15142117

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pleonasty-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.5

File hashes

Hashes for pleonasty-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8ad5fe9a7001608edef7db576d1aa60771d8c0f44736078b1919968b308eb251
MD5 abfeccf0fbcb9e5d498f50e95ca0b552
BLAKE2b-256 1ec4ea267dc7dacbf862b38164f4fcbe4ce799aa7d5bf6523872035e137e1cb9

See more details on using hashes here.

Supported by

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