Skip to main content

Fine-tuning the π0 and π0.5 Models

π0 and π0.5 are Vision-Language-Action (VLA) policies from Physical Intelligence, and their training pipeline comes from OpenPI. They are the openpi-0 and openpi-0.5 models of the OpenPI repository, written officially as π₀ and π₀.₅, registered under the model identifiers pi0 and pi05 with base checkpoints pi0_base and pi05_base. The platform registers the two models under those identifiers. Both support the jax and lerobot training frameworks and take LeRobot v2 and v3 datasets.

Roles and Prerequisites​

Roles​

RoleCan create a training taskDescription
AdministratorYesNot restricted by Module Permissions
Project ManagerRequires authorizationAn administrator grants Create Training Job in Module Permissions
AnnotatorRequires authorizationSame as above
AuditorRequires authorizationSame as above
CollectorRequires authorizationSame as above

Viewing training tasks and metrics requires only View Training.

Prerequisites​

ItemRequirement
Dataset versionLeRobot v2 or v3. The training service reads codebase_version in the dataset's meta/info.json to identify the version and choose the training image
Frameworkjax (OpenPI pipeline) or lerobot
GPU memoryAbout 22.5 GB or more with LoRA enabled on a single GPU; about 70 GB or more for full fine-tuning
DependencyThe platform's model training service is enabled with at least one training location configured; the jax framework uses the OpenPI training image, and the lerobot framework selects a LeRobot training image based on the dataset version
Dataset structureThe directory contains meta/info.json, data/, and videos/
PermissionCreating requires Create Training Job; viewing requires View Training

Training Task Creation and Parameters​

Procedure​

  1. Go to Model → Training and select Create Training Job.
  2. Choose a training location: a local GPU or a cloud training location enabled by an administrator.
  3. Under Selected Model, select pi0 or pi05.
  4. Under Training framework, select jax or lerobot. The framework determines which parameters appear in Training Parameters.
  5. Under Training Dataset, choose the data source: Export Records, an uploaded LeRobot dataset, Download Link, or Hugging Face.
  6. Set parameters in Training Parameters; the table below lists their meaning and default values.
  7. Enter Notes (optional).
  8. Select Create Training Job.

Training Parameters​

The jax and lerobot frameworks use two separate parameter sets. The jax framework targets the OpenPI training entry point:

ParameterDescriptionDefaultValid range
batch_sizeGlobal batch size1Integer, ≥ 1
stepsTraining steps10000Integer, ≥ 1
save_intervalCheckpoint save interval5000Integer, ≥ 1 and not greater than steps
learning_ratePeak learning rate of the cosine decay schedule2.5e-5Float, > 0
fsdp_devicesNumber of FSDP devicesautoauto or a positive integer; not greater than the visible GPU count and a divisor of it
ema_decayEMA decay factorNot enabled0 < x ≤ 1; ignored when LoRA is enabled
action_horizonLength of the action sequence predicted per step50Integer, ≥ 1
promptDefault instruction when the dataset has no task textEmptyString

The lerobot framework first applies general training parameters:

ParameterDescriptionDefaultValid range
batch_sizeBatch size1Integer, ≥ 1
stepsTraining steps10000Integer, ≥ 1
seedRandom seed1000Integer
num_workersDataLoader processes4Integer, ≥ 1
eval_freqEvaluation interval1000Integer, ≥ 1 and not greater than steps
log_freqLogging interval100Integer, ≥ 1 and not greater than steps
save_freqCheckpoint save interval5000Integer, ≥ 1 and not greater than steps
save_checkpointWhether to save checkpointstruetrue / false

It then appends model parameters with the policy. prefix:

ParameterDescriptionDefaultValid range
policy.n_obs_stepsInput observation steps1Integer
policy.chunk_sizeAction prediction length50Integer
policy.n_action_stepsAction steps executed per call50Integer
policy.max_state_dimState vector padding dimension32Integer
policy.max_action_dimAction vector padding dimension32Integer
policy.num_inference_stepsDenoising steps at inference10Integer
policy.dtypeModel data typebfloat16bfloat16, float32
policy.tokenizer_max_lengthMaximum tokenizer length48 for pi0, 200 for pi05Integer
policy.optimizer_lrOptimizer learning rate2.5e-5Float
policy.optimizer_weight_decayWeight decay0.0Float
policy.optimizer_grad_clip_normGradient clipping threshold1.0Float
policy.scheduler_warmup_stepsLearning rate warmup steps1000Integer
policy.scheduler_decay_stepsLearning rate decay steps10000Integer
policy.scheduler_decay_lrFinal learning rate after decay0.0Float

Verification​

Training Monitoring​

The training details page parses logs per framework and plots the metric curves. Metrics for the jax framework:

MetricMeaningCriteria
stepNumber of completed training stepsIncreases step by step up to the configured steps
lossTraining lossDecreases overall; if it stops decreasing for a long time, check the learning rate and data
gradient_normGradient normDoes not keep growing
param_normParameter normChanges slowly over training

Metrics for the lerobot framework:

MetricMeaningCriteria
stepNumber of completed training stepsIncreases step by step up to the configured steps
sampleNumber of processed samplesIncreases with step
episodeNumber of processed episodesIncreases with step
epochNumber of trained epochsIncreases with step
lossTraining lossDecreases overall
gradient_normGradient normDoes not keep growing
learning_rateCurrent learning rateChanges according to the schedule
update_time_sTime per update stepStable, does not keep growing
data_time_sData loading timeStable

Verification Checklist​

The training service determines the final task state from the container exit code: exit code 0 is recorded as Success, and a nonzero code as Failed.

CheckPass criteria
Task statusThe training details page shows Success and the container exit code is 0
Output directoryThe jax framework writes to docker_train/train/ under the output directory; the lerobot framework writes to checkpoints/
CheckpointsCheckpoints lists the checkpoints; jax contents include params/, and lerobot contents include pretrained_model/; the entry that last points to has type Final, and the rest have type Step
Metric curvesTraining Metrics plots step, loss, and gradient_norm for jax; for lerobot it also includes sample, episode, epoch, and learning_rate
LogsReal-time Logs can be read without repeated errors

Checkpoints listed in Checkpoints can be downloaded, synced to object storage, or used to create an inference service; see Model Inference for the inference side.

Error Handling​

SymptomPossible causeActionOwner
Training fails immediately with a dataset-not-found errorThe dataset lacks meta/info.json, or the selected source path is wrongSelect the correct Export Records entry or uploaded dataset againProject Manager
Out of GPU memorybatch_size is too large, or full fine-tuning runs on a single GPULower batch_size; keep LoRA enabled on a single GPUAlgorithm Engineer
Invalid FSDP device count errorfsdp_devices exceeds the visible GPU count or is not a divisor of itSet fsdp_devices to auto, or to a divisor of the visible GPU countAlgorithm Engineer
Save interval greater than training steps errorsave_interval or save_freq exceeds stepsReduce the save interval to no more than stepsAlgorithm Engineer
Single-GPU and multi-GPU results differ greatlyA single GPU defaults to LoRA and multiple GPUs default to FSDP, so the number of trained parameters differsFix the framework, fsdp_devices, batch_size, and random seed, then compare againAlgorithm Engineer
Loss stops decreasing for a long timeUnsuitable learning rate, missing task text, or insufficient data coverageCheck prompt and the dataset; adjust learning_rateAlgorithm Engineer
Training location unavailableThe platform has not enabled that training location, or its GPU is unavailableSwitch to another training location; ask an administrator to check the Training ServiceAdministrator
PagePurpose
Model TrainingCreating, monitoring, and quotas for training tasks
LeRobot datasets and trainingDataset export and training overview
LeRobot v2 and v3 format differencesDifferences between the two data formats and migration
Data exportGenerate a LeRobot training package