PI0 is a vision-language-action model for robotics manipulation. It jointly processes visual observations and language instructions to generate robot actions.
PI0
This model was published in HF papers on 2024-10-31 and contributed to Hugging Face Transformers on 2026-03-16.
PI0
PI0 is a vision-language-action model for robotics manipulation. It jointly processes visual observations and language instructions to generate robot actions.
The abstract from the paper is as follows: Robot learning holds tremendous promise to unlock the full potential of flexible, general, and dexterous robot systems, as well as to address some of the deepest questions in artificial intelligence. However, bringing robot learning to the level of generality required for effective real-world systems faces major obstacles in terms of data, generalization, and robustness. In this paper, we discuss how generalist robot policies (i.e., robot foundation models) can address these challenges, and how we can design effective generalist robot policies for complex and highly dexterous tasks. We propose a novel flow matching architecture built on top of a pre-trained vision-language model (VLM) to inherit Internet-scale semantic knowledge. We then discuss how this model can be trained on a large and diverse dataset from multiple dexterous robot platforms, including single-arm robots, dual-arm robots, and mobile manipulators. We evaluate our model in terms of its ability to perform tasks in zero shot after pre-training, follow language instructions from people and from a high-level VLM policy, and its ability to acquire new skills via fine-tuning. Our results cover a wide variety of tasks, such as laundry folding, table cleaning, and assembling boxes.
This model was contributed by Molbap and RaushanTurganbay. The original code can be found here.
You can find all the checkpoints under the PI0 collection.
Tip Set
use_kernels=TrueinPreTrainedModel.from_pretrainedto replace supported layers with optimized kernels from the Hub. Refer to Loading kernels to learn more.
The processor normalizes state and actions with the statistics of the dataset the checkpoint was trained on. Pass them when creating the processor.
Usage examples
import torch
from transformers import PI0ForConditionalGeneration, PI0Processor
from transformers.image_utils import load_image
model = PI0ForConditionalGeneration.from_pretrained(
"lerobot/pi0_base",
device_map="auto",
attn_implementation="sdpa"
)
processor = PI0Processor.from_pretrained(
"google/paligemma2-3b-mix-224",
state_mean=[0.0] * 8, # replace with the mean of your dataset's robot state
state_std=[1.0] * 8, # replace with the standard deviation of your dataset's robot state
)
prompt = "Pick up the object"
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/vla_pi0.jpg")
state = torch.randn(1, 8) # replace with the robot state
inputs = processor(image, prompt, state=state, return_tensors="pt").to(model.device)
actions = model.sample_actions(**inputs, num_steps=3)
print(actions)
PI0Config
[[autodoc]] PI0Config
PI0Processor
[[autodoc]] PI0Processor - call
PI0ImageProcessor
[[autodoc]] PI0ImageProcessor - preprocess
PI0Model
[[autodoc]] PI0Model - forward - embed_prefix
PI0ForConditionalGeneration
[[autodoc]] PI0ForConditionalGeneration - forward - sample_actions
Source and license
Source: Transformers documentation, adapted for this site. Licensing and attribution follow the terms of the upstream project.