Small Library of Torch Adaptation modules
- LoRA
- Prompt Tuning
- Bottleneck Adapter
- Prefix Tuning
- IA3 (single task)
- P-Tuning
You can install torch-adapters using:
$ pip install torch-adapters
from torch_adapters.utils import add_lora
# Add lora to the model
add_lora(model, ["key", "value"], {"alpha": 8, "r": 8})