llmp API Reference¶
llmp.components¶
Classes¶
Abstract base class for the EvaluationEngine. |
|
|
Base class for the Generator component. |
|
|
The EvaluationEngine is responsible for evaluating the generated examples and updating the job accordingly. |
|
Initialize the ExampleManager with a job. |
|
Generates a job multiple times asynchronous. |
|
|
Run SequentialAsyncGenerator in multiple threads. |
|
Execute a generation job within one thread multiple times for multiple Inputs in Sequence. |
|
A faster version of SequentialAsyncGenerator. |
Execute a job with a specific input multiple times and return the majority vote output. |
|
A Generator dedicated to generating examples for a given job. |
|
|
Basic generator that runs a job once. |
Generate Mutated Instructions. |
|
Class for creating example jobs. |
|
Abstract class for creating jobs. |
|
Class for creating zero-shot jobs. |
|
Class for creating template jobs. |
|
Example Optimizer for a given job. |
|
Instruction Optimizer for a given job. |
|
Configuration class to store the state of bools for different scripts access. |
|
Create a new model by parsing and validating input data from keyword arguments. |
|
Functions¶
Compute the average accuracy of the runs. |
|
Compute the average efficiency of the runs. |
|
Compute the average failure rate of the runs. |
|
Compute the average number of runs. |
|
Compute the average token usage of the outputs. |
|
Compute the accuracy of the outputs. |
|
Compute the accuracy of the outputs. |
|
Returns the human verified output from a list of outputs. |
|
Returns the grading output from a list of outputs. |
|
|
Returns the consensus and share of votes output from a list of outputs. |
|
Returns the consensus for each key from a list of outputs. |
|
Extend an instruction with context of input and output model. |
|
Extend an instruction with context of input and output model. |
|
Generate an instruction for a specific job. |
|
Generate an instruction for a specific job. |
|
Generate an instruction from the working out. |
Mutate an instruction by randomly changing one character. |
|
|
|
llmp.components.evaluation¶
Classes¶
The EvaluationEngine is responsible for evaluating the generated examples and updating the job accordingly. |
Functions¶
Compute the average accuracy of the runs. |
|
Compute the average efficiency of the runs. |
|
Compute the average failure rate of the runs. |
|
Compute the average number of runs. |
|
Compute the average token usage of the outputs. |
|
Compute the accuracy of the outputs. |
|
Compute the accuracy of the outputs. |
llmp.components.example_manager¶
Manage and store examples for a given job.
Classes¶
Initialize the ExampleManager with a job. |
llmp.components.generator¶
Generator module Used to perform generation tasks for a given job and input object.
Classes¶
Generates a job multiple times asynchronous. |
|
|
Run SequentialAsyncGenerator in multiple threads. |
|
Execute a generation job within one thread multiple times for multiple Inputs in Sequence. |
|
A faster version of SequentialAsyncGenerator. |
Execute a job with a specific input multiple times and return the majority vote output. |
|
A Generator dedicated to generating examples for a given job. |
|
|
Basic generator that runs a job once. |
Functions¶
Returns the human verified output from a list of outputs. |
|
Returns the grading output from a list of outputs. |
|
|
Returns the consensus and share of votes output from a list of outputs. |
|
Returns the consensus for each key from a list of outputs. |
llmp.components.optimizer¶
Classes¶
Example Optimizer for a given job. |
|
Instruction Optimizer for a given job. |
|
llmp.data_model¶
Classes¶
Create a new model by parsing and validating input data from keyword arguments. |
|
Create a new model by parsing and validating input data from keyword arguments. |
|
A representation of a job in the LLMP system. |
Functions¶
Find an example record by its input. |
|
Get a template from a job. |
|
|
Check if an input example is already in the example records. |
Load a Engine engine from a job. |
llmp.integration¶
Classes¶
Create a new model by parsing and validating input data from keyword arguments. |
llmp.services¶
Classes¶
|
|
|
|
|
Functions¶
Load a generator class by type. |
llmp.types¶
Classes¶
|
|
|
|
|
|
|
Validation rank for ExampleRecords |
llmp.utils¶
Classes¶
|
Constructor for JSONEncoder, with sensible defaults. |
|
Singleton metaclass for ensuring only one instance of a class. |
Functions¶
|
|
|
|
|
|
Lower text and remove punctuation, articles and extra whitespace. |
|
Return a timestamp. |
|
|
performs get operatation in descending order and returns the first value found |
|
Update a dictionary with kwargs. |
Check if val is a valid UUID. |
|
|