Advanced level · Module 5: LoRA and Model Customization · Lesson 2 of 3
Merging, Serving and Switching Adapters
Learners merge an adapter into the base model for simple deployment, or keep adapters separate to switch tasks, and serve the result.
In this lesson you will
- Merge an adapter into a base model
- Serve and switch adapters
Key concepts
merge_and_unloadseparate adaptersadapter switchingserving optionsrollback
The lesson
merge_and_unload() folds the adapter into the base weights, producing a standalone model that runs like any other, which is simple to deploy but loses the ability to switch.
Keeping adapters separate lets one base model serve several tasks by loading different adapters, which saves memory when many customisations exist.
Whichever you choose, keep the unmerged adapter and the evaluation results so you can roll back.
Step by step
- Merge the adapter and compare outputs with the unmerged model.
- Load two different adapters on one base model.
- Serve the merged model through the provider-independent interface.
- Document rollback.
Practice activity
Deploy the customised model and document adapter management.
Expected result: A working deployment with a rollback plan.
Check your understanding
-
What does merge_and_unload do?
Show answer
Folds the adapter into the base model to create a standalone model.
-
Why keep adapters separate?
Show answer
To switch tasks on one base model and save memory.
Further learning
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.