Choosing and carrying an adapter
An adapter depends on more than its saved matrices. Targets, scaling, and base identity determine its effect. Inspect those dependencies and validate any merge before treating the result as a standalone checkpoint.
#Section 34LoRA target modules
A library accepts target_modules, but naming a projection does not guarantee the intended tensors changed. Inspect the model’s actual modules and report the trainable names and shapes before training.
Q, K, V, and output projection
A target module is a projection chosen for adaptation. Q changes the questions, K changes matching, V changes content, and O changes how heads combine.
Gate, up, and down projections
The gate projection controls the up projection through SiLU and multiplication. The down projection returns to model width. Adapting these changes feature transformation rather than attention matching.
Attention-only and all-projection adapters affect different mechanisms. Compare held-out behavior, and inspect module layouts rather than copying another model’s target names.
#Section 35Choosing rank
An adapter fits the demonstrations perfectly at rank 32. That makes it better than rank 8 only if the extra capacity improves unseen behavior enough to pay for itself.
Capacity, memory, and small vs large rank
Capacity is the range of behavior trainable parameters can express. Higher rank permits more independent correction directions and increases trainable state.
Overfitting
Overfitting means gains on training examples fail to transfer to the intended unseen distribution. Higher rank makes memorization easier but does not decide it alone; dataset size, diversity, epochs, learning rate, and the starting model matter too.
Keep rank comparisons controlled. Under original scaling, fixing alpha changes alpha/r, and fixing the ratio changes alpha, so say which you did. Run a small grid on one split and model version, then pick the cheapest configuration that meets task and regression requirements.
The factors are not unique: scaling by a nonzero number and by its inverse leaves unchanged. Factor norms therefore underdescribe the update, so compare the product or its effect on inputs.
#Section 36Trainable parameter count
The report says "1.5% trainable." Without a denominator, you cannot tell whether that compares with the base or with base plus adapter.
Base parameters, adapter parameters, and percentage trainable
The trainable parameter count includes every tensor the optimizer can update. Inspect the enabled parameters, including any trained biases or embeddings.
#Section 37Adapter checkpoints
You send a small adapter file to someone who loads it onto a different revision of the same model family. The tensors fit and the results change: the adapter's base is part of its identity.
Saving adapters and loading adapters
An adapter checkpoint stores the trained factors and the configuration to attach them: target modules, rank, alpha, scaling convention, base revision, tokenizer revision, template, and any extra trained modules. Resuming training also needs optimizer state, schedule, RNG state, and data position; inference does not.
The PEFT checkpoint-format documentation separates adapter weights from configuration. Loading rebuilds the base, attaches adapters, restores factors, and checks metadata; a clean deserialization proves nothing.
Base-model dependency and multiple adapters
Base-model dependency means the adapter was learned against particular frozen weights, which a model name may not pin down. Multiple adapters can specialize one base for different tasks, but switching them changes cache validity and behavior.
Combining independently trained adapters needs an explicit policy. Adding corrections does not guarantee useful composition.
#Section 38Merging LoRA
The runtime computes two branches per projection. If only one adapter will ever be used, storing their sum as one matrix may be simpler.
Folding adapter weights into base weights
Merging stores W + sBA as one effective matrix. In exact arithmetic it gives the same linear map as the separate branches.
[2,1] it returns [26,33], the same output as the separate branch.Merged checkpoints and runtime implications
A merged checkpoint stores full effective weights, so inference drops the adapter branch and the separate load. It also loses easy adapter switching unless the base and factors are kept elsewhere.
PEFT's merge_and_unload merges supported configurations; assign its returned model and verify it, since quantized or specialized paths differ in support. PEFT LoRA merge reference.
Rounding and multiplication order make merged and unmerged logits differ slightly, and adapter dropout must be off for the comparison. Saving and reloading is a further boundary, tested separately in Section 69.