AI GitHub
PEFT for training and loading model adapters
Adapt a supported model by training a subset of parameters and saving compact artifacts.
Key Takeaways
- PEFT provides methods such as LoRA that attach trainable parameters to a base model.
- Identify which model modules should receive trainable adapters and pin the base revision.
- Choose target modules for a small experiment, then inspect which parameters are trainable.
- Adapters depend on their base checkpoint and configuration.
How it works
PEFT provides methods such as LoRA that attach trainable parameters to a base model. A saved adapter can be loaded against the compatible base checkpoint.
What you need
Identify which model modules should receive trainable adapters and pin the base revision. Make the intended export and serving plan part of the experiment.
What to try first
Choose target modules for a small experiment, then inspect which parameters are trainable. Reload the saved adapter with the pinned base model and compare predictions.
Compare an unmerged adapter and a merged artifact on known prompts. Keep the source adapter and base revision so export changes can be isolated.
Where to look for failures
Adapters depend on their base checkpoint and configuration. Merging or exporting weights changes how an inference runtime loads the result.
Related Franklin pages
Choose a training objective separately from how you update or store weights. Verify the data format, then reload the resulting artifact against its original base model.
- Study published instruction tuning and alignment recipes with code and data references. Open Instruct for reproducing post-training experiments
- Configure image-model adaptation jobs through a graphical training interface. kohya_ss for configuring diffusion model training
For the distinction between training from scratch and adapting a checkpoint, see Franklin’s glossary. Fine-tuning
Project documentation
Try it for your workflow
Explore the project’s documentation for setup and usage, or save this page to a collection for later.
Read the project documentation ↗