Deploying Parameter-Efficient Fine-Tuning Adapters
This lesson explains parameter-efficient fine-tuning (PEFT), which trains a small number of additional parameters instead of every weight, and its deployment consequences: adapters are small, swappable and can share one base model.
Learning outcomes
After completing this lesson, you will be able to:
- Explain how LoRA adapters work.
- Serve many adapters on one endpoint with inference components.
- Choose between merged and dynamic adapters.
How LoRA and adapters work
Low-rank adaptation (LoRA) freezes the base model's weights and trains pairs of small matrices whose product approximates the change each layer needs. Because the matrices have a low rank (for example 8 or 16), they contain a tiny fraction of the model's parameters. QLoRA applies the same idea to a quantised base model, reducing training memory further. More generally, adapters are small trainable modules inserted into or alongside a frozen model.
A LoRA adapter for a model with billions of parameters is typically tens to hundreds of megabytes, compared with tens or hundreds of gigabytes for the model. The adapter can be merged into the base weights to create a standalone model, or kept separate and loaded at inference time on top of the shared base model.
The following diagram shows the frozen weights and the small trainable matrices.

How LoRA works
Serving many adapters on one endpoint
When an organisation has many variants, for example one per business unit, language or customer, hosting a full model for each is wasteful. On SageMaker AI, the base model is deployed as an inference component on an endpoint, and each adapter is deployed as another inference component that references the base component. Requests name the adapter's inference component, and the serving container applies the adapter to the shared base model, so hundreds of variants can share GPU memory. Large model inference containers with vLLM also support serving multiple LoRA adapters from one model server.
import boto3
sm = boto3.client("sagemaker")
# Adapter inference component that runs on top of an existing base model component
sm.create_inference_component(
InferenceComponentName="support-adapter-fr",
EndpointName="llm-endpoint",
Specification={
"BaseInferenceComponentName": "llama-base",
"Container": {"ArtifactUrl": "s3://my-bucket/adapters/support-fr/"},
},
)
# Invoke the adapter by naming its inference component
smr = boto3.client("sagemaker-runtime")
smr.invoke_endpoint(EndpointName="llm-endpoint", InferenceComponentName="support-adapter-fr",
ContentType="application/json", Body=b'{"inputs": "Bonjour ...", "parameters": {"max_new_tokens": 200}}')The following diagram shows adapter inference components sharing one base model.

Merged versus dynamic adapters
A LoRA adapter can be used in two ways. It can be merged into the base model's weights, producing an ordinary model with the adapter's behaviour built in. A merged model has no runtime overhead and needs no special serving support, which suits a single customised variant or importing the model into Bedrock with Custom Model Import. However, every new version means producing and deploying a full-size model.
Alternatively, adapters can be kept separate and loaded dynamically by a serving engine that applies the requested adapter to a shared base model at inference time. One endpoint can then serve many variants, for example one adapter per customer or per task, and a new version is a small artefact that can be deployed in seconds and versioned independently. The cost is a small amount of added latency and a more complex serving configuration. The following table compares the options.
| Option | Artifact size | Best for |
|---|---|---|
| Full fine-tuned model | Full model per variant | One variant needing maximum quality change |
| Merged LoRA model | Full model per variant | One variant; Bedrock Custom Model Import |
| Dynamic LoRA adapters | Small adapter per variant, shared base | Many variants, frequent updates, cost efficiency |
The following diagram compares the two ways of using an adapter.

Merge or load dynamically?
One model per customer
A software vendor offers each of 120 enterprise customers a model fine-tuned on that customer's support tickets. Hosting 120 full models is too expensive, and customers' adapters are retrained monthly.
The answer is to train LoRA adapters per customer on a common base model and deploy them as adapter inference components on a shared SageMaker AI endpoint, with the application choosing the inference component by customer ID. Each monthly update replaces one small adapter without redeploying the base model.
What does LoRA train, and what stays unchanged?
Show answer
It trains small low-rank matrices (adapters); the base model's weights stay frozen, so many adapters can share one base model.
Exam Tips
Remember for the exam
- LoRA trains small low-rank matrices; the base model stays frozen.
- Many variants of one base model: dynamic adapters on shared infrastructure.
- SageMaker AI inference components can reference a base component to serve adapters.
- Merged adapters suit a single variant or Custom Model Import.