On-Device Adaptation and Personalization › Adapters Under a Tight Budget
Language AI HandbookAll chapters Keep the update small enough to train and separate enough to replace. Which matrices to adapt is a capacity and deployment decision.
Why adapters and not full fine-tuning
For a frozen layer matrix with rows and columns, LoRA parameterizes a layer update as
Here has shape , has shape , and is the chosen inner dimension. The product fits the original matrix and has rank at most . The scalar scales its contribution. It does not guarantee that two trained adapters with different ranks have the same update norm.
The adapter holds trainable entries for this layer. At and , that is 65,536 entries versus 16,777,216 dense entries. At two bytes per entry, the factors are 128 KiB before metadata. Each separately adapted projection adds its own entries.
Specify which projections and what rank you train. Also specify the maximum sequence length and microbatch size. A smaller microbatch can reduce activation memory per forward and backward pass. If you accumulate gradients across microbatches, count both microbatches and optimizer steps in the update budget.
The local training loop
- Collect consented examples that match the training purpose. Split before training and group related examples if the intended evaluation is transfer to new situations.
- Optionally include rehearsal examples that represent baseline behavior you want to retain. Keep the final canaries separate from rehearsal.
- Fit a separate candidate adapter for a bounded number of optimizer steps. Track wall time and peak memory as well as the count.
- Evaluate both adaptation success and preservation of baseline behavior on local held-out cases. Inspect behavior after a reset and include targeted checks for any sensitive information the training pipeline could have admitted.
- Activate the candidate only if it passes the acceptance criteria. Keep the current version until the new version and its metadata are ready to swap together.
A step limit bounds the amount of optimization you run. It is not a differential-privacy parameter.
Keeping it private
Carlini et al. found that a trained language model could retain examples verbatim. Treat the adapter, any merged copies, and intermediate checkpoints as potentially sensitive artifacts. Under the local-only design, none of these are uploaded. Sync needs a separate threat model and consent choice. Aggregation for a population-level update and syncing an individual adapter are different operations.
Abadi et al. describe training with differential privacy. A formal claim needs a defined unit of privacy, a mechanism such as clipping and adding calibrated noise, and accounting for the released outputs. Local execution, a small adapter or a short training run alone does not establish such a claim.
The overfitting cliff
A lower training loss can accompany worse behavior on independent examples. Compare two things before installing a candidate. First, does it improve the intended behavior on cases that were not used to fit it? Second, does it preserve behavior on other tasks? These tests can fail independently.
A test that checks whether a classifier returns one output for every input detects collapse on those probes. It does not measure whether a generative model reproduces training text. Run a dedicated audit if that failure mode matters, and report its coverage. The toy below uses both seen probes and independent inputs, which exposes what a gate built only from training topics can miss.
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!