On-Device Adaptation and Personalization › Two Families of Adaptation

Michael BrenndoerferDecember 1, 20262 min read
Language AI HandbookAll chapters
Part 43 of 67Small and On-Device Language Models
Chapter 329On-Device Adaptation and Personalization › Two Families of Adaptation
Reading section 3 of 11 · Two Families of Adaptation · 2 minSection 3 of 11 · 2 min

Section 3 of 11 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

The practical question is whether the behavior should depend on a record selected for this request or on parameters that apply whenever the adapter is loaded.

Local retrieval: the model reads from a store

Local retrieval selects records at inference and passes their content to the model. The base weights stay unchanged. The original retrieval-augmented generation paper used a dense index as explicit nonparametric memory. The local design here consults a private store instead.

A record can contain a fact, an instruction or a style example. The user can edit it without retraining. Keep identifiers for the records included in each prompt so a user can see and correct the selected inputs. A record’s presence in the prompt does not prove the model used it correctly.

Retrieval can miss a relevant record or select the wrong one. The supplied records also consume context. A concise stored style instruction may be enough for some tasks. Test instructions and examples before committing to training.

Parameter adaptation: the model learns into weights

LoRA freezes the existing weight matrix and trains two factors of a low-rank update. Applying an adapter as a separate term makes it easy to choose a different adapter at load time. With a compatible weight representation, merging the update ahead of inference avoids running that separate matrix product for each input. The original LoRA paper describes the merged form. If the base is quantized, re-quantization and the inference kernel can affect both accuracy and performance.

Keeping the base and adapter separate also makes disabling the adaptation straightforward. It does not enable record-level edits inside the weight arrays. The route for deleting a training example is to discard any affected adapter or rebuild from an eligible snapshot and dataset.

Why they compose

Consider an assistant that needs a recent project name and a consistent summary format. A locally stored label helps supply the project name. A stored formatting instruction may already work. An adapter is an option when the instruction alone fails to produce the desired behavior and the app has suitable examples.

Use the current user-confirmed record for a factual field. Keep the adapter’s scope separate, for example output structure or tone. The application derives the factual value from the confirmed record even if the adapter still favors the old wording.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy