Skip to main content
🤗 PEFT (Parameter-Efficient Fine-Tuning) enables efficient adaptation of large pre-trained models by training only a small number of additional parameters. This is especially useful for fine-tuning large Vision-Language-Action (VLA) models like SmolVLA, π₀, and GR00T.

What is PEFT?

PEFT methods add trainable adapter modules to a frozen pre-trained model. Instead of fine-tuning all billions of parameters, you train only millions of adapter parameters:
  • Full Fine-tuning: Update all 7B parameters
  • LoRA (rank=64): Update only ~100M adapter parameters (1.4% of total)
  • Result: Similar performance with much less compute and memory

Installation

Install LeRobot with PEFT support:
Or install PEFT separately:

Quick Start

Fine-tune SmolVLA with LoRA:
Key differences from full fine-tuning:
  • --policy.path: Load pre-trained model
  • --peft.method_type=LORA: Use LoRA adapters
  • --peft.r=64: LoRA rank (higher = more parameters)
  • Higher learning rate (1e-3 vs 1e-4 for full fine-tuning)

Supported Methods

LoRA (Low-Rank Adaptation)

LoRA is the most popular PEFT method. It adds low-rank matrices to attention layers:
Parameters:
  • r: Rank of adapter matrices (higher = more capacity)
    • r=8: Very lightweight (~25M params)
    • r=32: Balanced (~50M params)
    • r=64: High capacity (~100M params)
  • lora_alpha: Scaling factor (typically r/2 or r/4)
  • lora_dropout: Dropout rate for adapters
When to use: General purpose fine-tuning, good balance of efficiency and performance.

IA³ (Infused Adapter by Inhibiting and Amplifying Inner Activations)

IA³ uses even fewer parameters by learning scaling factors:
When to use: When you have very limited compute or want the smallest possible adapter.

AdaLoRA (Adaptive LoRA)

Adaptively allocates rank across different layers:
When to use: When you want to automatically find the optimal rank distribution.

Targeting Modules

Default Targets

By default, LoRA targets attention projection layers and task-specific heads:

Custom Targets

Specify custom modules to adapt:

Using Regex

Target modules with regex patterns:
This targets:
  • All MLP layers in the language model expert
  • State and action projection layers

Finding Module Names

Print model architecture to find module names:

Full Fine-tuning Specific Modules

For some modules, you may want full fine-tuning instead of adapters:
This:
  • Adds LoRA adapters to attention layers
  • Fully fine-tunes state and action projections

Fine-tuning SmolVLA

Complete example for fine-tuning SmolVLA on a manipulation task:
Key settings:
  • output_features=null, input_features=null: Auto-infer from dataset
  • Learning rate 10x higher than full fine-tuning
  • Batch size 32 (adjust based on GPU memory)
  • Evaluate every 10k steps

Fine-tuning π₀

Fine-tune Physical Intelligence’s π₀ policy:

Memory and Speed Benefits

Memory Usage

PEFT drastically reduces memory requirements:

Training Speed

PEFT training is faster because:
  • Fewer gradients to compute
  • Less memory movement
  • Faster optimizer updates
Typical speedup: 1.5-2x compared to full fine-tuning.

Hyperparameter Tuning

Learning Rate

PEFT typically uses higher learning rates:
Start with 5-10x the full fine-tuning learning rate.

LoRA Rank

Balance between capacity and efficiency:

LoRA Alpha

Scaling factor for adapter outputs:
Rule of thumb: Set lora_alpha = r/2 or r/4.

Loading PEFT Models

Load fine-tuned PEFT models:
PEFT adapters are stored alongside the base model weights.

Merging Adapters

Merge adapters into base model for deployment:
Merged models:
  • Load faster (no adapter overhead)
  • Use slightly less memory
  • Cannot be “un-merged”

Multi-GPU PEFT Training

Scale PEFT training across GPUs:
PEFT is very efficient for multi-GPU training due to reduced memory and communication overhead.

Best Practices

Troubleshooting

Model not learning

Increase learning rate or rank:

Out of memory

Reduce rank or batch size:

Overfitting

Reduce rank or add dropout:

Next Steps