A request to “use QLoRA instead of SFT” combines choices that can coexist. QLoRA describes a way to train low-rank updates while keeping pretrained weights quantized and frozen. Supervised fine-tuning, or SFT, describes an objective trained on target responses. You can apply both in the same experiment. Naming each decision separately helps you design informative comparisons and identify which resource constraints matter.
We will organize adaptation around two questions. First, which parameters can move, and how do their changes affect the model? Second, what evidence and objective tell the model how to change? A third set of choices concerns execution, such as weight precision, optimizer state, and sharding. Those settings affect feasibility and sometimes numerical behavior. They do not determine the training signal.
Learning objectives
- Classify a training run by parameter strategy and objective.
- Explain how selective, additive, reparameterized, and hybrid updates differ.
- Choose objectives that match the evidence you can obtain.
- Compare experiments without confusing trainable parameter count, memory use, and measured model quality.
This article assumes you can follow the next-token loss in Article 02 and are comfortable with matrix dimensions.
Axis one: what can change?
Let $W_0$ denote an original pretrained weight matrix. A parameter strategy specifies how the effective forward computation depends on $W_0$ and on new trainable values $\phi$. A useful way to classify a method is to ask what you would need to save to recover the adapted computation on top of the original checkpoint.
Full fine-tuning. You allow all original model parameters included in the run to update. For a matrix, the forward pass uses a trainable $W$ initialized from $W_0$. An update can, subject to finite precision and the optimizer, change any coordinate. Full updates provide many degrees of freedom and typically require more weight gradients and optimizer state. A standalone checkpoint is easy to understand operationally, but keeping one complete copy per task can be costly.
Partial fine-tuning. You allow a chosen subset of pretrained parameters to update. Training the last few blocks or an untied output head are examples. It matters where the frozen blocks are. A frozen prefix feeding a trainable head can yield detached features. A frozen block after a trainable module must still pass gradients through its operations to that earlier module, even though its own weights receive no gradient. Thus the same count of trainable weights can give different activation memory costs.
Selective PEFT. This is a more restrictive subset strategy when the selected original parameters are a tiny fraction of the backbone. Training only bias terms, known as BitFit in its original setting, or selected normalization parameters illustrates the idea. It is useful to state both the kind of parameter and its position. Many decoder variants have few or no linear bias terms, so a bias-only recipe may have little capacity or no target at all. The boundary between “partial” and “selective parameter-efficient” has no universal percentage cutoff.
Additive PEFT. You add trainable values or modules to the frozen model's computation. A bottleneck adapter can add a residual function of the hidden state. Prompt tuning learns virtual input embeddings. Prefix tuning supplies trainable key and value representations to attention. IA³ introduces small vectors that multiply selected activations. IA³ is additive in the sense of adding trainable parameters to the checkpoint. Its forward operation is multiplicative, a distinction worth stating explicitly.
Reparameterization-based PEFT. You constrain the form of a weight change. For LoRA, a matrix with $d_{\mathrm{out}}$ rows and $d_{\mathrm{in}}$ columns uses $W_0+sBA$, with $A$ of shape $[r,d_{\mathrm{in}}]$, $B$ of shape $[d_{\mathrm{out}},r]$, and scalar $s$. The selected rank $r$ limits the rank of the update and the number of learned coordinates. The base is frozen. The term $sBA$ can be applied as a side computation or, where supported, merged into the base matrix for inference. Weight quantization can complicate merging and should be tested separately.
Hybrid PEFT. You combine approaches, for example training LoRA factors and a small set of normalization parameters, or pairing adapters with trained input embeddings for newly added tokens. Verify what the checkpoint captures. If you save only the low-rank adapter and omit the updated embeddings, restoring the artifacts will recover a different effective model.
The categories describe implementations rather than rigid brands. LoRA adds parameters and a term to the forward equation. We classify it as reparameterized because the term represents a structured change to an existing weight. A bottleneck adapter with a nonlinear activation generally cannot be absorbed into a single fixed linear matrix. This difference can matter at deployment even if both methods use the word “adapter.”
Axis two: what teaches the model?
| Training paradigm | Training evidence | Typical signal |
|---|---|---|
| Continued pretraining | Raw domain or task-related text | Predict the next token across eligible spans |
| Supervised fine-tuning | Instructions paired with target outputs | Increase the probability of demonstration tokens |
| Offline preference optimization | Compared completions or desirability labels | Improve relative preference according to a defined objective |
| Reinforcement learning | Generated rollouts and rewards | Optimize expected reward with policy updates and optional regularization |
| Knowledge distillation | A teacher's responses or token distributions | Match teacher behavior or probabilities in a student |
Continued pretraining. An organization with a corpus of equipment manuals can train on the text itself using the same causal objective as its base checkpoint. The effect you are looking for may be better interpretation of vocabulary or more useful domain representations. A raw manual does not teach the exact dispatch output schema unless the necessary examples or structures appear in the data. Evaluate on separate documents or tasks. Keep retrieval available for policy that changes or requires citations.
Supervised fine-tuning. Supply target completions, such as dispatcher-approved JSON records, and score the model on the demonstration tokens. The next-token loss can be identical to continued pretraining at each scored position. Data structure and masking determine why those positions are scored. A missing target field is an example of a data specification problem, not an optimizer choice.
Offline preference optimization. For a report and two candidate responses, a reviewer may prefer one because it escalates an uncertain safety case with an appropriate explanation. Direct Preference Optimization, or DPO, uses the pair and a reference model to adjust relative likelihoods without fitting a separate reward model for use in on-policy rollouts. Some preference objectives accept other input formats or do not use a fixed reference model. Always name the exact objective and labels.
Reinforcement learning. A policy generates responses, a reward function scores them, and a policy optimization procedure adjusts the distribution. A reward might come from human preference modeling or from a deterministic verifier. Sampling explores model outputs but creates compute and monitoring requirements. If the reward grants all points for valid JSON, a model can earn high reward by emitting well-formed incorrect records. The verifier must measure the behavior you want.
Distillation. Distillation transfers behavior from a teacher to a student. A larger model might supply soft token probabilities or generate example outputs. If you train on teacher-generated outputs with ordinary next-token loss, the student procedure looks like SFT and the description “sequence-level distillation” tells you where the targets came from. For soft-target distillation, the student can match the teacher's full or truncated probability distribution. Compare the student against human labels or external measures because it can inherit the teacher's systematic errors.
Preference optimization and reinforcement learning overlap in motivation. A preference signal can train a reward model and then enter an RL loop. The labels “offline preference learning” and “on-policy RL” help you distinguish where completions come from and when you score them. A single production pipeline can include several stages.
Two runs with the same trainable budget
Assume you adapt one attention projection of shape $[4096,4096]$. Full updates to that matrix cover $4096^2=16{,}777{,}216$ weights. Rank 8 LoRA uses $8(4096+4096)=65{,}536$ trainable values, or approximately 0.391% of the original projection. These counts omit bias and cover one target matrix. Scaling to more projections requires summing their individual counts.
Suppose two runs use the same rank 8 update and the same base checkpoint. Run A trains on approved dispatch responses using SFT. Run B trains with DPO on choices between model-generated records. Their trainable weight counts match. Their data loading and loss calculations differ substantially. Run B scores both selected and rejected completions and may also evaluate a reference checkpoint or load precomputed scores. Peak memory and throughput can differ even before either run learns useful behavior.
Now compare two SFT runs, both scoring the same assistant tokens. Run C trains an output head, while Run D trains LoRA factors in attention blocks. Both use the same training signal. Where the gradients travel, what the adapted checkpoint contains, and the total trainable weight count can differ. The trainable count alone says little about peak memory. A frozen model still requires weight storage, and an adapter near early blocks can require gradients to flow through many later computations.
For a fair parameter-strategy comparison, hold constant the data split, supervised positions, checkpoint, and evaluation harness. Tune each method under the same documented budget. It can be misleading to impose identical learning rates when optimizers or trainable parametrizations differ. Report the search budget and selection metric as well as the final hyperparameters. For an objective comparison, matching inputs exactly may be impossible when one method requires demonstrations and another requires preferences. State what was held constant and what evidence changed.
Choosing a starting experiment
- Identify the failure on held-out examples. If the only issue is current facts or a guaranteed output schema, test retrieval, tools, or validation first. Training adds maintenance and typically needs repeated examples.
- Inventory the evidence. Raw text can support continued pretraining. Approved completions can support SFT. Compared outputs can support a preference objective. If you have a verifier and enough generation capacity, RL is an option. A teacher can support distillation when student cost or latency is the problem.
- Choose a parameter budget. When you need several independent task variants or cannot afford optimizer state for all weights, start with a small PEFT baseline. If it underfits, check data and targets before increasing rank or adding more modules. Consider full updates when the task and budget justify a broader search.
- Choose a serving artifact. Decide whether you need a small adapter plus a shared base, a merged checkpoint, or a separately hosted student. Round-trip any saved artifact before comparing production output. Include tokenizer, template, base revision, and adapter configuration.
- Validate the constraints. Measure held-out model quality, latency, memory, regression behavior, and the operational cost of new versions. Make the test reflect the actual task and serving environment.
For a team with labeled dispatch records and a constrained GPU budget, SFT with a standard LoRA adapter is an informative starting baseline. If the base weights fail to fit, test a supported QLoRA configuration. If performance is limited by preferences about ambiguous cases and reviewers can reliably compare alternatives, evaluate a preference stage separately. Every stage needs a baseline and a stopping criterion.
Reading empirical results responsibly
Houlsby and colleagues compared bottleneck adapters with full updates on BERT-based natural-language understanding tasks. Their result demonstrates that competitive performance with small task-specific adapters is possible under that experimental setup. It provides no universal rank or adapter placement for a decoder-only model.
Gururangan and colleagues evaluated continued pretraining on task- and domain-specific corpora. Their comparisons motivate testing whether additional in-domain text helps. The benefit in your application depends on the checkpoint, the overlap with its original training distribution, data quality, and the downstream metric. Rafailov and colleagues evaluated DPO on several preference tasks. Those experiments motivate an offline comparison when you have preference pairs. Pick training methods from evidence about your problem rather than treating publication order as a performance ranking.
Exercises
- Classify a recipe that updates the last two Transformer blocks with targets from a larger teacher. Give both axes and name the evidence source.
- Compute the number of LoRA parameters needed for four $4096\times4096$ projections with rank 16. Explain why this count is independent of sequence length while activation memory is not.
- Design a three-run experiment to compare a prompt baseline, SFT with LoRA, and SFT followed by DPO on the same dispatch product. Specify development and held-out comparisons.
- Identify what must be included in the artifact if you train input embeddings and attention adapters at the same time. Describe a round-trip test.
Frequently asked questions
Is PEFT a particular loss? PEFT describes what can change and how the change is represented. Continued pretraining, SFT, or a preference objective can each be used with an appropriate parameter-efficient strategy.
Is QLoRA a separate training objective? QLoRA combines quantized frozen base weights with trainable LoRA factors. It determines how adaptation fits in memory. An SFT or preference loss can provide the training signal.
Do more trainable parameters always improve results? Extra degrees of freedom may help fit a difficult task, but gains depend on data coverage, optimization, and evaluation. Extra capacity can also fit label errors and increase regressions or serving costs.
Can retrieval appear in a fine-tuning experiment? Yes. Include evidence in the model's training context if the deployment system will retrieve it. Report retrieval and generation metrics separately so you can diagnose where an end-to-end failure occurs.
Academic references
- Parameter-Efficient Transfer Learning for NLP, Neil Houlsby et al., ICML 2019. Introduces bottleneck adapters for transfer with a frozen backbone.
- LoRA: Low-Rank Adaptation of Large Language Models, Edward J. Hu et al., ICLR 2022. Describes low-rank weight updates with frozen pretrained weights.
- Don’t Stop Pretraining: Adapt Language Models to Domains and Tasks, Suchin Gururangan et al., ACL 2020. Evaluates domain-adaptive and task-adaptive pretraining.
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model, Rafael Rafailov et al., NeurIPS 2023. Derives an offline preference objective with a reference policy.
Continue the series
Article 04 begins traditional fine-tuning with full parameter updates, optimizer-state memory, forgetting, and evaluation. Open the series index to browse published lessons.