Official code of RDT 2
RDT2, the sequel to RDT-1B, is the first foundation model that can achieve zero-shot deployment on unseen embodiments for simple open-vocabulary tasks like picking, placing, shaking, wiping, etc. This milestone was made possible by multifaceted efforts:
Currently, this repo contains models:
For all models, we provide checkpoints and examples for using them out of the box or fine-tuning them to your own datasets. Currently, we have verified the efficay of our models on platforms including Bimanual UR5e and Bimanual Franka Research 3, and we are optimistic will able to deploy them successfully on more platforms in the future by following our guidelines.
To run the models in this repository, you will need an NVIDIA GPU with at least the following specifications. These estimations assume a single GPU, but you can also use multiple GPUs with model parallelism or offload into CPU to reduce per-GPU memory. Since RDT2 is based on Qwen2.5-VL-7B, you basiclly need to follow the hard-ware requirements for Qwen2.5-VL-7B:
| Mode | RAM Required | VRAM Required | Example GPU |
|---|---|---|---|
| Inference | > 32 GB | ~ 16 GB | RTX 4090 |
| Fine-Tuning RDT2-FM (RDT Expert) | - | ~ 16 GB | RTX 4090 |
| Fine-Tuning RDT2-VQ (LoRA) | - | > 32 GB | A100 (40GB) |
| Fine-Tuning RDT2-VQ (Full) | - | > 80 GB | A100 (80GB) / H100 / B200 |
As for zero-shot deployment, you need to purchase the designated end effector and camera, and 3D print the corresponding camera stand and flange according to Harware Set up and Calibration.
The repo has been tested with Ubuntu 24.04, we do not currently support other operating systems.
Clone this repo and create a conda environment:
…We provide multiple VLA model checkpoints with capabilities to deploy on various robot platforms and simple vocabulary tasks. If you want to deploy on your own robot platform with other end effectors and cameras, you can fine-tune from the base model.
| Model | Use Case | Description | Checkpoint Path |
|---|---|---|---|
| normalizer | Inference & Fine-Tuning (Freeze) | Normalizer for action normalization | umi_normalizer_wo_downsample_indentity_rot.pt |
| Residual VQ | Inference & Fine-Tuning (Freeze) | Residual VQ (RVQ) as the action tokenizer | robotics-diffusion-transformer/RVQActionTokenizer |
| RDT2-VQ | Inference & Fine-Tuning | Auto-regressive VLA with Residual VQ as the action tokenizer | robotics-diffusion-transformer/RDT2-VQ |
| RDT2-FM | Inference & Fine-Tuning | Auto-regressive VLA (RDT2-VQ) with Flow-Matching Action Expert | robotics-diffusion-transformer/RDT2-FM |
Acquire deployment hardware according to our Hardware Guide.
Set up Robots
2.1 Set up UR5e
[0.001106, 0, 0,
0, 0.001106, 0,
0, 0, 0.001106]2.2 Set up Franka FR3
[0.001, 0, 0,
0, 0.001, 0,
0, 0, 0.001]Set up camera
.deb files.cd /opt/MVS/bin && ./MVS.sh. Select your camera, and set Acquisition Control -> Exposure Time to 20000.Calibrate your robot to tracker's tcp space
python deploy/calibration/calibrate_franka.py --franka_ip --franka_port # if using Franka Research 3
# or
python deploy/calibration/calibrate_ur5e.py --ur5e_ip # if using UR5epython deploy/calibration/compute_calibration_matrix.pyOur pre-trained model checkpoints can be run with a few lines of code (here our RDT2-VQ model):
…And you can also test the RDT2-FM with the following code:
…We provide detailed step-by-step examples for running inference of our pre-trained checkpoints on Bimanual UR5e and Bimanual Franka Research 3 robots.
IMPORTANT: If the inference success rate is still low after checking all the settings, configurations and calibrations, you can refer to the deployment tips for help.
We will fine-tune the RDT2 models on the example dataset from Bimanual UR5e as a running example for how to fine-tune a base model on your own data. We will explain three steps:
You should convert to a processed webdataset shards, with the following structure:
…Moreover, we provde processed example data collected with Bimanual UR5e on huggingface. You can download it and use it directly.
Define your dataset config following format in configs/datasets/example.yaml
# Define your dataset name here
name: # e.g. bimanual/ur_example
type: single
shards_dir: # e.g. /ssd/rdt2/bimanual_fold_cloth/shards
kwargs:
instruction_path: # e.g. /ssd/rdt2/ur_example/instruction.json
normalizer_path: # e.g. /ssd/rdt2/umi_normalizer_wo_downsample_indentity_rot.ptFor the provided example data, its corresponding config is in configs/datasets/example.yaml. Remember to replace the and with your own path for downloading.
Currently, we support the following fine-tuning methods:
Since RDT2-VQ is based on Qwen2.5-VL, you are free to apply using other techniques including (e.g., fsdp, quantization) by following Qwen2.5-VL's fine-tunig practices. We provide example fine-tuning scripts for full-parameter and LoRA fine-tuning, which you can directly use to kick off your own training.
To provide a better understanding, we elaborate the line-by-line explanation of the full-parameter fine-tuning script (scripts/finetune_full_param.sh) with our example data:
…Although our RVQ demonstrates high generalization among both hand-held gripper data and real robot data. If you want to fine-tune on your own data with our Residual VQ as action tokenzer, we sincerely suggest you firstly to check the statistics of your data are within the bound of our Residual VQ, and then test the reconstruction error of your data.
Currently, we support fine-tuning RDT2-FM's Action Expert with DeepSpeed: We provide example fine-
No open issues yet, or sync has not completed.