PI05 lora fine-tune on libero dataset & differences about the norm_stats
I tried to reproduce the result on libero benchmark via the lora finetune method for Pi05base model. However after the finetuning process, the success rate is very low (1% on spatial task suite). Here is my config code. Could anyone point out if it is right?
TrainConfig(
name="pi05_libero_low_mem_finetune",
model=pi0_config.Pi0Config(pi05=True, action_horizon=10, discrete_state_input=False,
paligemma_variant="gemma_2b_lora", action_expert_variant="gemma_300m_lora"),
data=LeRobotLiberoDataConfig(
repo_id="physical-intelligence/libero",
base_config=DataConfig(prompt_from_task=True),
extra_delta_transform=False,
),
batch_size=64,
lr_schedule=_optimizer.CosineDecaySchedule(
warmup_steps=5_000,
peak_lr=5e-5/4,
decay_steps=120_000,
decay_lr=5e-5/4,
),
optimizer=_optimizer.AdamW(clip_gradient_norm=1.0),
ema_decay=None,
weight_loader=weight_loaders.CheckpointWeightLoader("/home/openpi/assets/checkpoints/pi05_base/params"),
# pytorch_weight_path="/path/to/your/pytorch_weight_path",
num_train_steps=120_000,
freeze_filter=pi0_config.Pi0Config(pi05=True, action_horizon=10, discrete_state_input=False,
paligemma_variant="gemma_2b_lora", action_expert_variant="gemma_300m_lora").get_freeze_filter(),
),
And I also found that the norm stats calculated using compute_norm_stats.py is very different from the original dataset, either the provided checkpoint pi05_libero. I don't understand why, since they use the same dataset.
- this is the part of the norm stats calculated using compute_norm_stats.py:
- This is the norm stats of provided checkpoint pi05_base model (which I tested, achieved success rate over 96% on libero benchmark)
- And this is the original norm stats offered by the official hugging face dataset physical-intelligence/libero:
I tried to reproduce the result on libero benchmark via the lora finetune method for Pi05base model. However after the finetuning process, the success rate is very low (1% on spatial task suite). Here is my config code. Could anyone point out if it is right?
TrainConfig( name="pi05_libero_low_mem_finetune", model=pi0_config.Pi0Config(pi05=True, action_horizon=10, discrete_state_input=False, paligemma_variant="gemma_2b_lora", action_expert_variant="gemma_300m_lora"), data=LeRobotLiberoDataConfig( repo_id="physical-intelligence/libero", base_config=DataConfig(prompt_from_task=True), extra_delta_transform=False, ), batch_size=64, lr_schedule=_optimizer.CosineDecaySchedule( warmup_steps=5_000, peak_lr=5e-5/4, decay_steps=120_000, decay_lr=5e-5/4, ), optimizer=_optimizer.AdamW(clip_gradient_norm=1.0), ema_decay=None, weight_loader=weight_loaders.CheckpointWeightLoader("/home/openpi/assets/checkpoints/pi05_base/params"), # pytorch_weight_path="/path/to/your/pytorch_weight_path", num_train_steps=120_000, freeze_filter=pi0_config.Pi0Config(pi05=True, action_horizon=10, discrete_state_input=False, paligemma_variant="gemma_2b_lora", action_expert_variant="gemma_300m_lora").get_freeze_filter(), ), And I also found that the norm stats calculated using compute_norm_stats.py is very different from the original dataset, either the provided checkpoint pi05_libero. I don't understand why, since they use the same dataset.
- this is the part of the norm stats calculated using compute_norm_stats.py:
* This is the norm stats of provided checkpoint _pi05_base_ model (which I tested, achieved success rate over 96% on libero benchmark)
* And this is the original norm stats offered by the official hugging face dataset _physical-intelligence/libero_:
![]()
This config works for me
TrainConfig(
name="pi05_libero_lora_v1",
model=pi0_config.Pi0Config(pi05=True, action_horizon=10, discrete_state_input=False,
paligemma_variant="gemma_2b_lora", action_expert_variant="gemma_300m_lora"),
data=LeRobotLiberoDataConfig(
repo_id="physical-intelligence/libero",
base_config=DataConfig(prompt_from_task=True),
extra_delta_transform=False,
),
weight_loader=weight_loaders.CheckpointWeightLoader("gs://openpi-assets/checkpoints/pi05_base/params"),
num_train_steps=30_000,
# Again, make sure to match the model config above when extracting the freeze filter
# that specifies which parameters should be frozen during LoRA finetuning.
freeze_filter=
pi0_config.Pi0Config(pi05=True, action_horizon=10,
discrete_state_input=False,
paligemma_variant="gemma_2b_lora",
action_expert_variant="gemma_300m_lora"
).get_freeze_filter(),
# Turn off EMA for LoRA finetuning.
ema_decay=None,
wandb_enabled=True,
# batch_size=32, #use fault 32
optimizer=_optimizer.AdamW(clip_gradient_norm=1.0),
lr_schedule=_optimizer.CosineDecaySchedule(
warmup_steps=10_000,
peak_lr=5e-5,
decay_steps=1_000_000,
decay_lr=5e-5,
),
),
Could you guys get satisfiable performance using peft (lora) on pi05_base and libero? LORA only finetunes part of the action head by default. I am not getting good performance.
One check worth adding here: print which norm-stats file the eval config actually loads, at startup. A stats file computed on a different split than the fine-tune fails quietly and only shows up as lower success, so it is easy to chase the wrong thing.
* This is the norm stats of provided checkpoint _pi05_base_ model (which I tested, achieved success rate over 96% on libero benchmark)
* And this is the original norm stats offered by the official hugging face dataset _physical-intelligence/libero_: