A text generation plugin using local LLMs or other text generation methods. Builds on top of `transformers` by Hugging Face.
Project description
Nendo Plugin TextGen
A text generation plugin using local LLMs or other text generation methods.
Builds on top of transformers
by Hugging Face.
Features
- Generate text from a prompt using a local LLM
- Access all LLMs from the Hugging Face Model Hub
Requirements
Since we depend on transformers
, please make sure that you fulfill their requirements.
You also need Pytorch installed on your system, please refer to the pytorch installation instructions.
Installation
- Install Nendo
pip install nendo-plugin-textgen
If you have a CUDA GPU you can install the following library for an additional speedup:
pip install flash-attn --no-build-isolation
Then set ATTN_IMPLEMENTATION=flash_attention_2
in your environment variables.
Usage
Take a look at a basic usage example below. For more detailed information, please refer to the documentation.
>>> from nendo import Nendo
>>> nd = Nendo(plugins=["nendo_plugin_textgen"])
>>> nd.plugins.textgen(prompt=["Tell me about your favorite song."])[0]
Contributing
Visit our docs to learn all about how to contribute to Nendo: Contributing
License
Nendo: MIT License
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 nendo_plugin_textgen-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a86c81337e50e01b7f678a09d07aa8322039bd1294b63f118670e124b35b09bc |
|
MD5 | 4546d4d88406ebbb0898c904706d4cc1 |
|
BLAKE2b-256 | 0c1c801667373d8a43a461114819a52c4de7f410209a1c30226412617b24cf43 |
Hashes for nendo_plugin_textgen-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e37c661c464d280d9e9e7aaa9074e13852f1a4e1f13bdcc419ee051f5c1ed2bf |
|
MD5 | 3f5474c20a8e8fae1c8eee8cb626d92d |
|
BLAKE2b-256 | 72aa05b15ae9c70e35c1a451f47e2c3b4e09dc9dee40739512cd9a34d3cc119f |