Adapter Families
EMEP implements three adapter families. Each adds parameters to a frozen base model.LoRA
LoRA (Hu et al. 2021) decomposes weight updates into low-rank matrices A and B. For a weight matrix W, the update is delta W = A B^T with rank r. Only A and B are trained. LoRA is the default PEFT method in EMEP because it merges cleanly into base weights and has low memory overhead. See LoRA for math, hyperparameters, and the training flowchart.Prefix-Tuning
Prefix-tuning prepends trainable prefix vectors to keys and values in attention layers. The base model remains frozen. Prefix-tuning works well for classification and generation tasks but is less flexible for merging than LoRA because prefix vectors do not compose with base weights in the same way.Prompt-Tuning
Prompt-tuning trains soft prompt embeddings at the input layer. It is the most parameter-efficient of the three but also the most task-specific. Prompt-tuned models may require task-specific prompts at inference time, which complicates deployment in InferenceBackend.Trade-Offs
When to Prefer PEFT Over Full FT
Prefer PEFT when:- The base model is large and GPU memory is constrained.
- You need multiple specialist variants of the same base model.
- The target task is close to the base model’s pretraining distribution.
- You intend to merge the fine-tuned model with others in MergeEngine.