Course contentsShow
← AI Engineering
Lesson 1365 of 1,88633. Parameter-Efficient Fine-Tuning (PEFT)Free lesson

Combining Multiple Adapters for Inference

Explore techniques for composing multiple LoRA adapters simultaneously to combine capabilities from different fine-tuning runs.

Combining Multiple Adapters for Inference

What you'll learn: How to compose multiple LoRA adapters simultaneously during inference to blend capabilities from different fine-tuning runs.

The Core Idea

Imagine you've fine-tuned separate LoRA adapters for different skills: one for writing in a medical tone, another for summarizing text, and a third for following strict formatting rules. Instead of choosing just one, you can combine multiple adapters at inference time by loading them together and specifying how much weight to give each.

This is powerful because you can create new, specialized behaviors without additional training—just by mixing existing adapters like ingredients in a recipe.

How Adapter Composition Works

When combining adapters, you typically:

  1. Load multiple adapters onto the same base model
  2. Assign weights to each adapter (e.g., 0.7 for medical tone, 0.5 for summarization)
  3. The model combines their learned parameter updates proportionally during inference

The PEFT library supports this through adapter composition methods. The combined output reflects all adapters' influences, weighted by their assigned coefficients.

Practical Applications

  • Domain + Task: Combine a domain-specific adapter (legal language) with a task adapter (question answering)
  • Style + Function: Merge formatting rules with creative writing patterns
  • Multi-capability models: Create specialized variants without maintaining separate full models

The weights let you dial up or down each adapter's influence, giving you fine-grained control over the final behavior.

Key Takeaway: Combining multiple LoRA adapters lets you compose capabilities from different fine-tuning runs dynamically at inference time, creating specialized behaviors without additional training or storing multiple full models.