Skip to main content

Overview

π0.5 is a vision-language-action (VLA) model from Physical Intelligence, jointly trained on robot demonstration data and large-scale multimodal data. It can perform long-horizon tasks in unseen real-world open environments and generalizes across them. This page focuses on ws1, i.e. world_size=1 — a single rank with no distributed setup. Everything on this page targets this single-card configuration. The entry is PI05Scheduler. PI0.5 model execution pipeline

Architecture

PhyAI’s decomposes pi0.5 inference into four cooperating components:
phyai/src/phyai/models/pi05
main_pi05.py
scheduler_pi05.py
model_runner_pi05.py
modeling_pi05.py
configuration_pi05.py
img_preprocess_pi05.py
tokenization_pi05.py
The diagram below illustrates how phyai’s three model runners cooperate with the scheduler, and how the engine bootstrap hands off to scheduler.setup() and scheduler.step(). PhyAI Engine ↔ Scheduler ↔ 3 Runners lifecycle

Running pi0.5

1

Get the weights

Prepare a pi05_base safetensors checkpoint. You can download it from huggingface:
2

Construct the engine

The plugin name is "pi05". The engine handles setup, weight loading, and graph capture in one shot.
max_batch_size fixes the captured-graph batch dimension. Pick based on the largest batch you’ll submit; smaller batches are padded internally.
The cuda graph batch bucketing optimization is not enabled when WS=1.
3

Build a request

PI05Request carries the per-step inference inputs:B can be any value in [1, max_batch_size]. Build the tensors on the engine’s device; the scheduler validates shapes and raises immediately on mismatch.
4

Step the engine

The padding is sliced off before returning — the tensor you get has its leading dim equal to the real batch.
5

Close the engine

Releases the scheduler’s buffers and tears down the captured cuda graphs.

End-to-end example

examples/pi05/run_pi05.py exercises the full path with deterministic dummy inputs at max_batch_size ∈ {1, 4} and includes a multi-batch equivalence check. To run it:
The script prints per-phase latency stats (mean / median / std / min / max over 3 warmups + 30 timed runs) and a PASS line for the equivalence check. Just change the path after --checkpoint to your local checkpoint path.

Training rollout integration

An external RL controller can request diffusion trajectories and replace the in-memory actor weights without rebuilding the engine. Initialize the engine from a complete checkpoint and construct PI05Args with capture_rollout=True. Training updates may then contain only the parameters selected by the controller. The controller owns the update transaction:
Each weight_batch maps HuggingFace parameter names to tensors. Every completed update refreshes weight-dependent scheduler state and recaptures the rollout graph. rollout_step accepts PI05RolloutRequest and returns PI05RolloutOutput with actions, the denoising chain, per-transition log probabilities, and optional values. The request must provide sigmas; noise and step_noise are optional deterministic inputs and are sampled internally when omitted. The RLinf BF16 integration uses the optional compatibility policy at examples/configs/kernel_policies/pi05/rlinf_bf16.yaml. Select it explicitly through the controller configuration or PHYAI_KERNEL_CONFIG; PI0.5 does not load this policy by default.
Do not run inference after a partially applied update fails. Engine marks that instance unavailable because its parameters may contain a mixture of versions. Abort the transaction and recreate the engine.

Current limitations

  • Single GPU only. Tensor parallel, continuous batching, and preemption are all out of scope for PI05Scheduler.
  • max_batch_size is fixed at engine construction. To change it, you must tear down and rebuild the engine.
  • The vision tower replays sequentially per real robot — it doesn’t batch along the camera dimension.

Full example