Skip to main content

No project description provided

Project description

LLM Few Shot Gen

PyPI - Version PyPI - Python Version


Installation

pip install llm-few-shot-gen

What is LLM Few Shot Generator?

Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, fine-tune them is not always possible or too expansive. In-context learning like Few Shot learning tries to solve this problem. Based on a few number of examples within the prompt a specific output can be obtained. This llm-few-shot-gen library enables few shot learning in a convenient way.

How can I use it?

The core functionality is the generators module. The abstract class BaseFewShotGenerator defines all requirements for a LLM few shot generator. You can either use a base class and create a child for your own use case or pick one of the existing generator classes.

Required functions of BaseFewShotGenerator children

Instruction: Instruction for LLM model

Context: Context of the Few Shot learning use case

Few Shot Examples: Example text to obtain a certain output

IO Prompt: Output instruction, which might contain some human input as well. I/O=input/output

Ready to use Generators

Showcases

License

llm-few-shot-gen is distributed under the terms of the MIT license.

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

llm_few_shot_gen-0.0.3.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

llm_few_shot_gen-0.0.3-py3-none-any.whl (12.9 kB view hashes)

Uploaded Python 3

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