No project description provided
Project description
LLM Few Shot Gen
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
Built Distribution
Hashes for llm_few_shot_gen-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74ba305069a3356e0d7d04279d2f65bc07a4e53c6b5197beee7a2ee4e08264d7 |
|
MD5 | 6a5df87b4a3545c4a5091c5b7ab34b19 |
|
BLAKE2b-256 | 7effc2ca59609381065b851a907efb580c0dcfa2a78eedb031cc02b40a44a144 |