Expand description
LoRA (Low-Rank Adaptation) implementation
LoRA enables parameter-efficient fine-tuning of large pretrained models by adding trainable low-rank decomposition matrices to frozen weights.
Structs§
- Adapter
Metadata - Adapter metadata (without weights)
- DoRA
Layer - DoRA layer: magnitude-direction decomposed LoRA
- LoRA
Adapter - Serializable LoRA adapter format
- LoRA
Config - Configuration for LoRA adapter targeting
- LoRA
Layer - LoRA layer: adds trainable low-rank adaptation to a frozen base weight
- Memory
Stats - Memory usage statistics for QLoRA layer
- Merge
Publish Result - Result of merge-export-publish pipeline
- Merged
Model - Merged model from combining LoRA/QLoRA adapters with base weights
- Multi
Adapter Manager - Multi-adapter manager
- Named
Adapter - Named adapter wrapping a set of LoRA layers
- Paged
Optim States - Paged optimizer state manager
- Paged
State - CPU-resident optimizer state for one parameter group
- Paging
Stats - Paging statistics for monitoring
- Peft
Adapter Bundle - A bundle of LoRA adapters keyed by layer path
- Peft
Adapter Config - PEFT adapter configuration matching the HuggingFace PEFT schema
- QLoRA
Layer - QLoRA layer with 4-bit quantized base weight
- Vram
Budget - VRAM budget tracker for optimizer state paging decisions
Enums§
- Adapter
Error - LoRA adapter save/load errors
- Adapter
Format - Adapter serialization format
- LoRA
Scaling - LoRA scaling mode (ENT-LoRA-004)
- Merge
Publish Error - Errors from the merge-export-publish pipeline
- Paging
Strategy - Paging strategy for optimizer states
Functions§
- load_
adapter - Load LoRA adapter from file (Entrenar JSON format)
- load_
adapter_ peft - Load LoRA adapter from PEFT-compatible format
- merge_
and_ collect - Merge LoRA layers into base weights and collect as merged model
- merge_
export_ publish - Merge LoRA adapters, export as SafeTensors, and publish to HuggingFace Hub
- merge_
qlora_ and_ collect - Merge QLoRA layers into f32 weights and collect as merged model
- merge_
qlora_ export_ publish - Merge QLoRA adapters, export as SafeTensors, and publish to HuggingFace Hub
- pissa_
init - Initialize a LoRA layer using PiSSA (SVD-based initialization)
- save_
adapter - Save LoRA adapter to file (Entrenar JSON format)
- save_
adapter_ peft - Save LoRA adapters in PEFT-compatible format