Skip to content

ma2za/torch-adapters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torch Adapters

Introduction

Small Library of Torch Adaptation modules

Supported Methods

  • LoRA
  • Prompt Tuning
  • Bottleneck Adapter
  • Prefix Tuning
  • IA3 (single task)
  • P-Tuning

Installation

You can install torch-adapters using:

$ pip install torch-adapters

Usage

from torch_adapters.utils import add_lora

# Add lora to the model
add_lora(model, ["key", "value"], {"alpha": 8, "r": 8})