> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orchestrallabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Pi 0.5

> Inspect and deploy Pi 0.5, with its camera and state inputs and action output.

## Checkpoint

```bash title="Your computer" sample=verified theme={null}
orchestral models inspect openpi hf://orchestrallabs/pi05-yam-red-cap-full-7500@ececaedfccf76bf9b62ed443241fddf763fecb73 --options policy_config=none
```

```text title="Sample output" theme={null}
Inputs:
  base_0_rgb: RGB uint8 (224, 224, 3)
  left_wrist_0_rgb: RGB uint8 (224, 224, 3)
  right_wrist_0_rgb: RGB uint8 (224, 224, 3)
  state: float32 (7,)

Outputs:
  actions: float32 (15,7)
```

## Inputs and output

| Direction | Name | Shape | Type |
| - | - | - | - |
| Input | `base_0_rgb` | `(224, 224, 3)` | RGB `uint8` |
| Input | `left_wrist_0_rgb` | `(224, 224, 3)` | RGB `uint8` |
| Input | `right_wrist_0_rgb` | `(224, 224, 3)` | RGB `uint8` |
| Input | `state` | `(7,)` | `float32` |
| Output | `actions` | `(15, 7)` | `float32` |

## Deploy and predict

Deploy the checkpoint URI directly. Orchestral resolves, imports and prepares it before bringing up the serving deployment.

```bash your computer theme={null}
orchestral deployments create hf://orchestrallabs/pi05-yam-red-cap-full-7500@ececaedfccf76bf9b62ed443241fddf763fecb73 --options policy_config=none --robot robot-1 --wait
```

```text title="Sample output" theme={null}
jolly-tangerine-snail-rdik  ACTIVE · ready
π0.5 · robot-1
Timeline: requested 12s ago → starting worker 8s ago → ready now
```

```python robot computer theme={null}
import numpy as np
import orchestral as ol

client = ol.Orchestral()
deployment_id = input("Deployment ID from the CLI output: ").strip()
deployment = client.deployments.get(deployment_id)

inputs = {
    "base_0_rgb": np.zeros((224, 224, 3), dtype=np.uint8),
    "left_wrist_0_rgb": np.zeros((224, 224, 3), dtype=np.uint8),
    "right_wrist_0_rgb": np.zeros((224, 224, 3), dtype=np.uint8),
    "state": np.zeros((7,), dtype=np.float32),
}

with deployment.session() as session:
    result = session.predict(
        inputs=inputs,
        instruction="pick up the red cap",
        noise_seed=20260727,
    )

print(result.actions.shape)  # (15, 7)
```

## Replan with actions already queued

Pass queued rows from an earlier prediction as `committed_actions`. Supply ordinary `float32`
actions in the same format as `result.actions`; Orchestral handles the selected pi0.5 policy's
normalization and action transforms. The returned prefix is preserved exactly, while the remaining
rows are generated conditioned on it. The prefix can be any length up to the checkpoint's action
horizon.

```python robot computer theme={null}
with deployment.session() as session:
    current = session.predict(inputs=inputs, instruction="pick up the red cap")
    queued = current.actions[:6].copy()

    replanned = session.predict(
        inputs=inputs,  # Replace with the latest camera frames and state.
        instruction="pick up the red cap",
        committed_actions=queued,
    )

assert np.array_equal(replanned.actions[: len(queued)], queued)
```

## Select the inference policy

OpenPI requires `policy_config` during inspection and deployment. Use the registered upstream
`TrainConfig` name that matches training:

```bash your computer theme={null}
orchestral models inspect openpi hf://your-team/your-checkpoint --options policy_config=pi05_aloha
orchestral deployments create hf://your-team/your-checkpoint --options policy_config=pi05_aloha --robot robot-1 --wait
```

Orchestral runs that config's input transforms, normalization, model transforms, inference,
unnormalization, and output transforms. `inspect` reports the request names and shapes for
that policy. For example, `pi05_aloha` accepts `images/cam_high`, `images/cam_left_wrist`,
`images/cam_right_wrist`, and `state`. Supply those exact names in `session.predict(inputs=...)`.

The bundle supports native JAX pi0.5 checkpoints. Policy names come from its pinned OpenPI
version. An unknown name or a missing `policy_config` raises an error. Custom Python training
configs require their input and output transforms to run in your client.

### Client-owned transforms

Use `policy_config=none` when your client applies the training-specific input and output
transforms. The YAM example above uses this setting. For a custom checkpoint, also supply its
trained action horizon:

```bash your computer theme={null}
orchestral deployments create hf://your-team/your-checkpoint --options policy_config=none action_horizon=15 --robot robot-1 --wait
```

The server accepts `base_0_rgb`, `left_wrist_0_rgb`, `right_wrist_0_rgb`, and `state`. It applies
saved-stat normalization, the OpenPI model transforms, inference, and action unnormalization.
Returned actions have model padding removed. Your client applies its training-specific state
conversion and converts returned actions to robot commands, including any gripper conversion,
delta-to-absolute conversion, and clipping.

All three camera slots are required. Supply RGB `uint8` arrays with shape `(224, 224, 3)`.
Use the views and state order from training. The YAM
checkpoint has a recorded horizon of 15; other checkpoints require `action_horizon` in this mode.

### Normalization assets

A named policy supplies its upstream `asset_id`. With `policy_config=none`, deployment selects a
sole bundled `assets/<asset_id>/norm_stats.json`. Select a particular asset with `asset_id`:

```bash your computer theme={null}
orchestral deployments create hf://your-team/your-checkpoint --options policy_config=pi05_aloha asset_id=trossen --robot robot-1 --wait
```

Orchestral first checks `assets/trossen/norm_stats.json` in your checkpoint. If that file is
absent, it uses the selected upstream config’s `assets_dir` when one is declared. Otherwise,
it searches the official asset roots exported from the pinned OpenPI configs, including
base, DROID, and Polaris assets. Multiple matches raise an error listing the choices.
An unknown ID raises an error listing available upstream assets.
Use the statistics that match your training run's state and action definitions.

Deployment records the asset ID, source, and SHA-256 checksum. Upstream sources also include the
GCS object generation. Workers verify the selected bytes when loading the model; a missing or
changed imported asset fails loading. Bundled assets remain tied to the imported checkpoint.

Inspect the resolved asset and inference settings before deployment:

```bash your computer theme={null}
orchestral models inspect openpi hf://your-team/your-checkpoint --options policy_config=pi05_aloha asset_id=trossen --json
```

The JSON response includes `resolved_checkpoint_options`. Deployment saves these options and passes
them to deployment workers. Checkpoints use OpenPI's existing parameter and statistics files.

### Inference settings

A named policy supplies the model settings used by its upstream `TrainConfig`. With
`policy_config=none`, the following settings apply:

| Option | Default or source |
| - | - |
| `action_horizon` | Required for custom checkpoints; the catalog YAM checkpoint uses 15 |
| `model_action_dim` | Inferred from global projection shapes in parameter metadata; required explicitly when sharded metadata has no global shapes. No default in that case. An explicit value must agree with available metadata. |
| `max_token_len` | `200` |
| `discrete_state_input` | `true` |
| `paligemma_variant` | `gemma_2b` |
| `action_expert_variant` | `gemma_300m` |
| `use_quantile_norm` | `true` |

Pass multiple options after one flag, for example
`--options policy_config=none action_horizon=15 max_token_len=128`.
Your client controls request cadence and action execution timing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.