Note: This is the real-world version of our work. If you are looking for the SIMPLER version, please check out PCD.
Official implementation of the paper "Policy Contrastive Decoding for Robotic Foundation Models".
Note: We are doing our best to improve this work. If you have any questions or suggestions, please feel free to create an issue in this repo or contact us at [email protected].
- 🔥Oct 13, 2025: Our paper has been updated for better clarity and readability. The optimized version is now available on arXiv.
- 🔥May 20, 2025: The code is released and the paper is now available on arXiv.
- Clone this repository:
git clone https://github.com/Koorye/PCD-real.git- Install the required packages:
bash scripts/install_dependencies.sh- Download the pretrained checkpoints:
Note: Some of the checkpoints cannot be downloaded directly, you may need to download them manually from the links provided in the script.
bash scripts/download_pretrained_weights.sh-
Fine-tune your own model. More details can be found in official repository of Pi-0.
-
Deploy the model:
Baseline
python scripts/deploy_server.py \
--config_name your_config_name \ # example: pi0_real
--checkpoint_bucket /path/to/your/finetuned/checkpoint/bucket+PCD (Ours)
python scripts/deploy_server.py \
--config_name your_config_name_pcd \ # example: pi0_real_pcd
--checkpoint_bucket /path/to/your/finetuned/checkpoint/bucket- Implement your own inference script based on the provided example in
scripts/inference_test.py.