(WIP: will keep updating with fresh insights or finds as i explore)
I am a huge Pytorch over anything else guy. So i love that this library gives major pytorch vibes.
signatures: abstract prompts (think of input/output dimensions) (start with question→answer)
modules: generalized prompting techniques (think of it as layers) (start with cot)
optimizers: optimizes systems (think of a training loop/adam optimizer). LLM based systems usually comprise of parameters of the following three kinds:
(1) the LM weights (2) the instructions (3) demonstrations of the input/output behaviour
optimizers available (start with BootstrapFewShotWithRandomSearch):
So getting back to our PyTorch analogy, LLMs would be the device to optimize over. similar role to a GPU (device= cuda) for pytorch. class building is exactly like building a neural network class in pytorch:
This library is like fine tuning the entire systems for LLMs (alongside the prompting), not just models.
So its optimizing over multiple prompts, compile it and then save the checkpoint and load it later in the future just like pytorch.
But how does it actually do this?
Candidate generation: Bootstrap candidates for learnable params- mainly valid demos
Parameter Optimization: Select candidates that maximize the program’s metric
Pipeline Optimization: Apply higher-order changes to the program, like ensembling or backtracking