fine-tuning-serving-openpi
What it does
This skill covers adapting and running OpenPI robot control models from Physical Intelligence, from setup to a live inference server. It is for robotics engineers who want to train or deploy these policies on their own data.
When to use it
- ✓When you want to adapt an OpenPI robot model to your own robot dataset.
- ✓When you need to convert a JAX checkpoint into a PyTorch one.
- ✓When you want to run a policy server that robots query for actions.
Skill link
https://github.com/Orchestra-Research/AI-Research-SKILLs/blob/main/18-multimodal/openpi/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you help me fine-tune the pi0 robot model on my own dataset and then serve it so my robot can request actions?”
5 new skills a week. 1 minute to read.
How it works
The agent installs the public OpenPI project, prepares your data and normalization statistics, runs training with the JAX or PyTorch setup, and starts a server that returns action predictions. It also helps with common issues such as normalization and GPU memory.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
OpenPI Fine-Tuning and Serving
End-to-end workflows for fine-tuning and serving Physical Intelligence's OpenPI models (pi0, pi0-fast, pi0.5) on robot manipulation tasks from the public openpi repository. Covers blank-machine setup, JAX training, PyTorch training, checkpoint conversion, and policy inference serving.
Quick start
Clone the public repo, install the workspace, then serve a pretrained policy:
git clone --recurse-submodules https://github.com/Physical-Intelligence/openpi.git
cd openpi
GIT_LFS_SKIP_SMUDGE=1 uv sync
GIT_LFS_SKIP_SMUDGE=1 uv pip install -e .
uv run scripts/serve_policy.py --env DROID
from openpi_client import websocket_client_policy
client = websocket_client_policy.WebsocketClientPolicy(host="localhost", port=8000)
result = client.infer(observation)
actions = result["actions"] # numpy array of shape (chunk_size, action_dim)
Core concepts
Model family: OpenPI implements three model variants from Physical Intelligence:
| Model | Architecture | Speed | Quality | Typical use |
|---|---|---|---|---|
| pi0 | Flow-matching VLA | Baseline | Highest | Research, complex tasks |
| pi0-fast | Autoregressive action tokens | 2-5x faster | Good | Real-time control |
| pi0.5 | pi0 + improved vision encoder | Baseline | Best | Latest default |
Key design choices:
- Dual backend: JAX (primary, official training) and PyTorch (community, deployment-friendly)
- Config-driven: All training/serving parameters defined in
src/openpi/training/config.py - Norm stats: Every config requires precomputed normalization statistics before training
- WebSocket serving: Policy servers expose a WebSocket API for low-latency inference
Training loop invariant: After every config or dataset change, always re-run this cycle:
- Compute norm stats → 2. Train → 3. Serve checkpoint → 4. Validate inference
Compute requirements
| Task | GPU | VRAM | Notes |
|---|---|---|---|
| Serve pi0.5 (inference) | 1x A100/H100 | ~24 GB | Single GPU sufficient |
| Fine-tune pi0.5 (JAX) | 1x A100 80GB | ~60 GB | Use fsdp_devices for multi-GPU |
| Fine-tune pi0 (JAX) | 1x A100 80GB | ~40 GB | Smaller model footprint |
| Fine-tune (PyTorch DDP) | 1-8x A100 | ~40 GB/GPU | torchrun launcher |
| Compute norm stats | CPU or 1x GPU | ~8 GB | Fast, can run on login node |
Workflow 0: Blank-machine setup
Copy this checklist and track progress:
Setup Progress:
- [ ] Step 1: Clone the public openpi repo with submodules
- [ ] Step 2: Install uv and sync the workspace
- [ ] Step 3: Install the editable package
- [ ] Step 4: Verify core imports and serving entrypoint
Step 1: Clone repo
git clone --recurse-submodules https://github.com/Physical-Intelligence/openpi.git
cd openpi
If you already cloned without submodules:
git submodule update --init --recursive
Step 2: Sync dependencies
GIT_LFS_SKIP_SMUDGE=1 uv sync
Step 3: Install editable package
GIT_LFS_SKIP_SMUDGE=1 uv pip install -e .
Step 4: Verify installation
uv run python -c "from openpi.training import config as _config; print(_config.get_config('pi05_droid').name)"
uv run scripts/serve_policy.py --help
When to use vs alternatives
Use this skill when:
- Fine-tuning pi0, pi0-fast, or pi0.5 on LeRobot or RLDS datasets
- Serving OpenPI policies for ALOHA, DROID, or LIBERO evaluation
- Converting JAX checkpoints to PyTorch format
- Debugging OpenPI training issues (norm stats, memory, config)
Use fine-tuning-openvla-oft instead when:
- Fine-tuning OpenVLA with continuous action heads and LoRA
- Reproducing OpenVLA-OFT paper results on LIBERO or ALOHA
Use evaluating-cosmos-policy instead when:
- Evaluating NVIDIA Cosmos Policy on simulation benchmarks
Workflow 1: JAX fine-tuning on LeRobot data
Copy this checklist and track progress:
JAX Fine-Tuning Progress:
- [ ] Step 1: Select and copy closest training config
- [ ] Step 2: Update dataset mapping and base checkpoint
- [ ] Step 3: Compute normalization statistics
- [ ] Step 4: Launch JAX training
- [ ] Step 5: Serve checkpoint and run inference sanity check
Step 1: Select config
Copy the closest config from src/openpi/training/config.py:
| Config | Use case |
|---|---|
pi05_libero |
pi0.5 LIBERO fine-tuning |
pi0_libero |
pi0 full fine-tuning on LIBERO |
| `pi |
FAQ
What models does it support?
The skill covers pi0, pi0-fast and pi0.5 from Physical Intelligence.
Which robot setups are mentioned?
ALOHA, DROID and LIBERO environments.
Can it help with GPU memory problems?
Yes. Memory issues during training and serving are among the problems it covers.
Details
Original description by the author
Fine-tune and serve Physical Intelligence OpenPI models (pi0, pi0-fast, pi0.5) using JAX or PyTorch backends for robot policy inference across ALOHA, DROID, and LIBERO environments. Use when adapting pi0 models to custom datasets, converting JAX checkpoints to PyTorch, running policy inference servers, or debugging norm stats and GPU memory issues.
Popularity
- GitHub stars
- 14k
- Ranking position
- #11166
- License
- MIT
- Updated
- 10/10/2026
Comments
- …
More skills from this repository
autoresearch
14kGuides your agent through a full AI research project, from literature review to experiments and writing, with a repeating cycle of testing and review.
prompt-guard
14kLets your agent screen text for prompt injection and jailbreak attempts before it reaches your AI app, using Meta's small classifier.
pytorch-fsdp2
14kShows your agent how to add PyTorch FSDP2 to a training script so large models are split across GPUs and saved correctly.
ml-training-recipes
14kGives your agent proven training recipes for neural networks, covering model choice, optimizers, learning rates and fixing loss spikes.
Similar skills
pytorch-patterns
280kHelps your agent use PyTorch for machine learning models. It applies best practices for efficient model training and ensures reproducible results.
evm-token-decimals
280kHelps your agent avoid errors with decimal numbers across different blockchain networks. It ensures token values are accurate in transactions and calculations.
ito-inference
280kLets your agent check the availability of AI models for use. It connects the compute request with the ready model service.