Inferensys

Glossary

Trainable Components

Trainable components are the small, added modules (e.g., adapters, prefixes) or selected parameter subsets within a PEFT setup that are updated during training, while the rest of the model remains frozen.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
DELTA TUNING AND MODULAR ADAPTATION

What are Trainable Components?

In parameter-efficient fine-tuning (PEFT), trainable components are the small, added modules or selected parameter subsets that are updated during training, while the vast majority of the pre-trained model remains frozen.

Trainable components are the specific, minimal set of parameters or modules within a neural network that are updated during a parameter-efficient fine-tuning (PEFT) process. This contrasts with full fine-tuning, where all model weights are trainable. In PEFT, the large frozen backbone of the pre-trained model is preserved, and adaptation is achieved solely by optimizing these small, strategically introduced components, such as adapters, prefixes, or low-rank matrices. This approach drastically reduces computational cost and memory footprint while mitigating catastrophic forgetting.

These components are the core delta—the learned change applied to the base model. Common types include Low-Rank Adaptation (LoRA) matrices, adapter modules inserted into transformer blocks, and continuous prompt embeddings for prefix tuning. The design and selection of trainable components define the PEFT method, balancing parameter efficiency, task performance, and inference latency. Their modular nature enables techniques like AdapterFusion for multi-task learning and supports efficient deployment in production and on edge devices.

DELTA TUNING AND MODULAR ADAPTATION

Key Characteristics of Trainable Components

In parameter-efficient fine-tuning (PEFT), trainable components are the small, added modules or selected parameter subsets that are updated, while the vast majority of the pre-trained model remains frozen. Their design is central to achieving efficient adaptation.

01

Additive Parameterization

This is the foundational mathematical principle for delta tuning. Adapted weights (W') are represented as the sum of the original frozen weights (W₀) and a learned delta matrix (ΔW): W' = W₀ + ΔW. The trainable component is the delta ΔW, which is typically constrained to be low-rank or sparse to minimize parameters. This formulation ensures the pre-trained knowledge in W₀ is preserved as a stable foundation.

02

Low Dimensionality

Trainable components are designed to operate in a significantly reduced parameter space compared to the full model. For example:

  • LoRA represents ΔW as the product of two low-rank matrices (A and B), where the rank r is often less than 8.
  • Adapters use a bottleneck architecture, projecting activations down to a hidden dimension (e.g., 64) before projecting back up. This constraint is the primary source of efficiency, reducing memory footprint and speeding up training.
03

Sparsity & Selectivity

Many PEFT methods enforce sparsity in which parameters are updated. The trainable component is not a dense update to all weights, but a targeted change:

  • Sparse Fine-Tuning / Diff Pruning: Learns a binary mask selecting a small percentage (<0.1%) of the original model's weights to update.
  • BitFit: Updates only the bias terms within the transformer.
  • Selective Fine-Tuning: Uses heuristics or saliency scores to identify and update only the most task-relevant layers or parameters.
04

Modularity & Composability

Trainable components like adapters are designed as self-contained, plug-and-play modules. This enables:

  • Multi-Task Learning: Training separate, small adapters for different tasks on the same frozen backbone.
  • Adapter Composition: Techniques like AdapterFusion learn to combine multiple pre-trained adapters for a new task.
  • AdapterSoup: Averaging the parameters of multiple task-specific adapters at inference for robust multi-task performance without extra training.
05

Conditional Activation

In advanced architectures, trainable components are activated based on the input or task, a form of conditional computation. This maximizes efficiency by only using necessary compute for a given input.

  • Mixture-of-Experts (MoE): A gating network routes each token to a sparse combination of expert layers (which can be considered large trainable components).
  • Hypernetworks: A small auxiliary network generates the weights for the trainable component (e.g., an adapter) conditioned on a task vector, allowing dynamic specialization.
06

Preservation of Pre-Trained Features

A core design goal is to minimize interference with the base model's general knowledge. By freezing the backbone and constraining updates to small, additive, or modular components, catastrophic forgetting is largely avoided. The trainable component learns a task-specific deviation from the base model's behavior rather than overwriting its fundamental representations. This makes PEFT models more stable and suitable for continual learning scenarios.

DELTA TUNING AND MODULAR ADAPTATION

How Trainable Components Work in PEFT

In Parameter-Efficient Fine-Tuning (PEFT), trainable components are the small, strategically inserted modules or parameter subsets that are updated during training, while the vast majority of the pre-trained model remains frozen.

Trainable components are the minimal set of parameters updated during parameter-efficient fine-tuning (PEFT), enabling task adaptation while the frozen backbone model's weights remain static. These components, such as low-rank matrices in LoRA, adapter modules, or prefix embeddings, represent a compact parameter delta learned for a specific task. Their design is governed by principles of additive parameterization and conditional computation, ensuring efficient training and inference.

The function of these components is to learn and apply a task vector—a directional update—to the model's forward pass. Methods like sparse fine-tuning (e.g., Diff Pruning) or modular adaptation (e.g., AdapterFusion) determine which parameters become trainable. This creates a delta-learning setup where the base model's knowledge is preserved and efficiently repurposed, forming the core engineering mechanism behind all PEFT techniques.

DELTA TUNING AND MODULAR ADAPTATION

Common Examples of Trainable Components

In parameter-efficient fine-tuning (PEFT), only a small fraction of the model's total parameters are updated. These are the core, learnable components that enable task-specific adaptation while the vast 'frozen backbone' remains unchanged.

01

Adapter Modules

Adapter modules are small, bottleneck feed-forward neural networks inserted sequentially or in parallel within transformer blocks. They are the quintessential trainable component in modular adaptation.

  • Structure: Typically consist of a down-projection, a non-linearity (e.g., ReLU), and an up-projection.
  • Placement: Commonly inserted after the feed-forward network or the multi-head attention module within a transformer layer.
  • Parameter Efficiency: A single adapter may add only 0.5-8% of the base model's parameters per task. For a 7B parameter model, this equates to 35-560 million trainable parameters, a massive reduction from full fine-tuning.
02

Low-Rank Matrices (LoRA)

In Low-Rank Adaptation (LoRA), the trainable components are pairs of low-rank matrices that approximate the full weight update. For a weight matrix W (of dimension d x k), LoRA represents the update as ΔW = B * A, where B is d x r, A is r x k, and the rank r is significantly smaller than d and k.

  • Key Insight: The intrinsic rank of weight updates during adaptation is often very low (e.g., rank r=4, 8, or 16).
  • Trainable Parameters: Only the matrices A and B are updated. For query/value projections in attention layers of a large model, this can reduce trainable parameters by >10,000x compared to full fine-tuning.
  • Deployment: The low-rank matrices can be merged with the frozen weights for zero-inference-overhead deployment.
03

Prompt & Prefix Vectors

Prompt tuning and prefix tuning optimize continuous, task-specific embeddings prepended to the model's input or hidden states. These vectors are the sole trainable components.

  • Soft Prompts: A small set of trainable token embeddings (e.g., 20-100 virtual tokens) prepended to the input sequence. The model's embedding table and all other weights remain frozen.
  • Prefix Vectors: Trainable tensors prepended to the key and value caches of the transformer's attention mechanism at every layer, steering the model's contextual processing.
  • Efficiency: For a model with a 4096-dimensional hidden size and 30 layers, a prefix of length 10 adds only ~1.2 million trainable parameters, a minuscule fraction of a multi-billion parameter model.
04

Scaling Vectors ((IA)^3)

The (IA)^3 method introduces trainable task-specific scaling vectors that modulate inner activations. These vectors are the only components updated during training.

  • Mechanism: Learns three sets of vectors: one to scale the keys (K), one for the values (V) in attention, and one for the intermediate feed-forward network (FFN) activations.
  • Parameter Count: Adds only three vectors per transformer layer, each with a dimension equal to the model's hidden size. For a 24-layer model with a 1024-dimensional hidden state, this is just 73,728 trainable parameters.
  • Operation: The scaling is performed via element-wise multiplication, making it computationally lightweight during both training and inference.
05

Sparse Masks (Diff Pruning)

In sparse fine-tuning methods like Diff Pruning, the trainable component is a sparse binary mask (and sometimes accompanying small diff weights) applied to a subset of the pre-trained model's parameters.

  • Function: The mask M selects which original parameters θ receive a small, learned delta δ. The adapted weight is θ' = θ + M ⊙ δ.
  • Sparsity: The mask is highly sparse, often targeting <0.5% of the model's total parameters for update. In a 1B parameter model, this means <5 million parameters are trainable.
  • Learning: The mask itself can be learned via a differentiable relaxation (e.g., the Hard Concrete distribution) or pre-determined by a saliency criterion.
06

Bias Terms (BitFit)

BitFit is an extreme PEFT method where the only trainable components are the bias terms within the transformer architecture. All weight matrices (e.g., in linear projections, attention, feed-forward networks) remain completely frozen.

  • Scope: Updates only the bias parameters in layers like attention query/key/value projections, feed-forward networks, and layer norms.
  • Extreme Efficiency: For many transformer models, biases constitute only ~0.1% of the total parameters. Fine-tuning a 110M parameter BERT model with BitFit updates only ~140,000 parameters.
  • Performance: Surprisingly effective for many natural language understanding tasks, demonstrating that re-calibrating activation offsets via biases can be a powerful adaptation signal.
PARAMETER-EFFICIENT FINE-TUNING

Trainable Components vs. Full Fine-Tuning

A comparison of the core adaptation strategies for large pre-trained models, contrasting the modular, efficient approach of updating only specific components with the traditional method of updating all parameters.

Feature / MetricTrainable Components (PEFT)Full Fine-Tuning

Core Adaptation Mechanism

Updates small, added modules (e.g., adapters, LoRA matrices) or a sparse parameter subset.

Updates all parameters of the pre-trained model.

Trainable Parameter Count

Typically 0.1% - 10% of total model parameters.

100% of model parameters.

Memory Footprint (Training)

Low. Stores gradients/optimizer states only for the small trainable subset.

Very High. Requires gradients/optimizer states for the entire model.

Compute Cost (Training)

Dramatically reduced. Enables fine-tuning on consumer-grade GPUs.

Prohibitively high for large models, often requiring multi-GPU/TPU clusters.

Storage per Adapted Model

Small (e.g., 1-100 MB). Only the delta (e.g., adapter weights) must be saved.

Large (e.g., full model size, 10s-100s of GB). The entire adapted model must be saved.

Risk of Catastrophic Forgetting

Very Low. The frozen backbone retains its original knowledge.

High. The model can overwrite pre-trained knowledge relevant to other tasks.

Task Switching / Multi-Task Inference

Efficient. Multiple small deltas can be swapped in/out dynamically.

Inefficient. Requires loading separate, full-sized model checkpoints.

Modularity & Composability

High. Components (e.g., adapters) can be mixed, matched, or ensembled (e.g., AdapterSoup).

Low. Each model is a monolithic, task-specific artifact.

Typical Use Case

Rapid, cost-effective domain adaptation, multi-task learning, and edge deployment.

Training a model from scratch on a new, massive dataset or when maximum performance on a single, primary task is critical.

TRAINABLE COMPONENTS

Frequently Asked Questions

In parameter-efficient fine-tuning (PEFT), the vast majority of a pre-trained model's parameters are frozen. Trainable components are the small, strategically added modules or selected parameter subsets that are updated to adapt the model to a new task.

Trainable components are the small, added neural modules or selected parameter subsets within a parameter-efficient fine-tuning (PEFT) setup that are updated during training, while the rest of the frozen backbone model remains fixed. They represent the minimal parameter change, or delta, required for task adaptation. Examples include adapters, prefixes, low-rank matrices (as in LoRA), scaling vectors (as in (IA)^3), or selectively updated parameters like biases (as in BitFit). Their core function is to modify the forward pass of the base model to produce new, task-specific behaviors without altering the foundational knowledge encoded in the billions of frozen parameters.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.