Chuyển đến nội dung
Skillpedia
Học máy14k · #11166

fine-tuning-serving-openpi

Skill này làm gì

Skill bao phủ việc điều chỉnh và chạy các mô hình điều khiển robot OpenPI của Physical Intelligence, từ thiết lập đến một máy chủ suy luận đang hoạt động. Skill dành cho kỹ sư robot muốn huấn luyện hoặc triển khai các chính sách này trên dữ liệu riêng.

Khi nào nên dùng

  • ✓Khi bạn muốn điều chỉnh một mô hình robot OpenPI theo bộ dữ liệu robot của mình.
  • ✓Khi bạn cần chuyển checkpoint JAX sang PyTorch.
  • ✓Khi bạn muốn chạy một máy chủ chính sách mà các robot truy vấn để lấy hành động.

Liên kết skill

https://github.com/Orchestra-Research/AI-Research-SKILLs/blob/main/18-multimodal/openpi/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/Orchestra-Research/AI-Research-SKILLs/blob/main/18-multimodal/openpi/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể giúp tôi tinh chỉnh mô hình pi0 trên bộ dữ liệu riêng của tôi rồi phục vụ nó để robot của tôi yêu cầu hành động không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent cài dự án OpenPI công khai, chuẩn bị dữ liệu và thống kê chuẩn hóa, chạy huấn luyện với thiết lập JAX hoặc PyTorch, rồi khởi động một máy chủ trả về dự đoán hành động. Nó cũng giúp xử lý các vấn đề thường gặp như chuẩn hóa và bộ nhớ GPU.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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:

  1. 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
Câu hỏi thường gặp

Nó hỗ trợ những mô hình nào?

Skill bao phủ pi0, pi0-fast và pi0.5 của Physical Intelligence.

Những thiết lập robot nào được nhắc đến?

Các môi trường ALOHA, DROID và LIBERO.

Nó có giúp về bộ nhớ GPU không?

Có. Các vấn đề bộ nhớ khi huấn luyện và phục vụ nằm trong những gì nó bao phủ.

Chi tiết

Mô tả gốc của tác giả

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.

repo: Orchestra-Research/AI-Research-SKILLs

Độ phổ biến

Sao GitHub
14k
Vị trí xếp hạng
#11166
Giấy phép
MIT
Cập nhật
10/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự