SimGAN
Pytorch Implementation of SimGAN: Hybrid Simulator Identification for Domain Adaptation via Adversarial Reinforcement L…
DeepThinkVLA: Enhancing Reasoning Capability of Vision-Language-Action Models
Enhancing Reasoning Capability of Vision-Language-Action Models
wadeKeith/DeepThinkVLA_libero_plus).DeepThinkVLA rethinks Vision-Language-Action (VLA) policies with explicit deliberation. Starting from the public pi0-FAST checkpoint, we refactor the policy into a 2.9B parameter hybrid decoder that writes a reasoning trace before emitting action chunks. The accompanying paper combines embodied Chain-of-Thought (CoT) supervised fine-tuning with outcome-driven reinforcement learning, yielding a 97.0% average success rate across the LIBERO benchmark (Object 99.0, Spatial 96.6, Goal 96.4, Long 96.2). The hybrid architecture alone lifts success by 15.5 percentage points over a naive autoregressive CoT variant, and the RL refinement supplies the final +2.0 point boost on LIBERO-Long.
DeepThinkVLA inserts a <think> segment between observations and actions. Reasoning tokens are generated autoregressively, after which the decoder switches to bidirectional attention to emit action vectors in parallel. This resolves the modality conflict that limits single-decoder baselines and enables efficient rollouts for downstream reinforcement learning.
A scalable annotation pipeline supplies paired reasoning/action traces:
Training proceeds in two stages:
We additionally report zero-shot transfer performance on LIBERO Plus:
python experiments/run_libero_plus_eval.py \ --pretrained_checkpoint /path/to/deepthinkvla_libero_checkpoint \ --num_images_in_input 2 \ --task_suite_name libero_10 \ --max_new_tokens 2048 \ --swanlab_mode disabled
Or use the wrapper:
bash eval.sh
experiments/logs/rollouts/The following numbers are zero-shot success rates (SR) on LIBERO Plus, evaluated with a DeepThinkVLA model trained only on LIBERO (no LIBERO Plus fine-tuning).
| Objects Layout | Language Instructions | Light Conditions | Camera Viewpoints | Robot Initial States | Background Textures | Sensor Noise | Total |
|---|---|---|---|---|---|---|---|
| 0.7993 | 0.845 | 0.900 | 0.885 | 0.405 | 0.753 | 0.944 | 0.790 |
| object | spatial | goal | 10 | Total |
|---|---|---|---|---|
| 0.840 | 0.879 | 0.697 | 0.746 | 0.790 |
Deliberate reasoning enables self-correction: when the robot drops an object, CoT-aware decoding identifies the mistake and guides a recovery action, whereas the reactive baseline stalls.
Tested on Linux/WSL with NVIDIA GPUs (CUDA 12.x) and Python >= 3.10. Full SFT typically requires >= 8x80GB GPUs; RL runs assume a multi-node setup similar to scripts/run_deepthinkvla_rl.sh.
conda create -n deepthinkvla python=3.10 -y conda activate deepthinkvla pip install -r requirements.txt
If installation fails with egl_probe, install cmake==3.31.6, fetch the patched wheel, and retry:
pip install cmake==3.31.6 wget https://github.com/mhandb/egl_probe/archive/fix_windows_build.zip pip install fix_windows_build.zip pip install -r requirements.txt
Configure optional logging backends (Weights & Biases, SwanLab) before launching experiments.
bash data/download_libero_cot.sh data/datasets/yinchenghust/libero_cot yinchenghust/libero_cot
huggingface-cli download --repo-type dataset --resume-download yifengzhu-hf/LIBERO-datasets --local-dir ./src/libero/datasets/
huggingface-cli download --repo-type model \
--resume-download yinchenghust/deepthinkvla_base \
--local-dir yinchenghust/deepthinkvla_base/
huggingface-cli download --repo-type model \
--resume-download yinchenghust/deepthinkvla_libero_cot_sft \
--local-dir yinchenghust/deepthinkvla_libero_cot_sft/
huggingface-cli download --repo-type model \
--resume-download yinchenghust/deepthinkvla_libero_cot_rl \
--local-dir yinchenghust/deepthinkvla_libero_cot_rl/
Authenticate with huggingface-cli login if assets are private.
All scripts assume the repository root as the working directory and extend PYTHONPATH to src/.
bash scripts/finetune.sh
This expands to:
deepspeed src/train.py \ --deepspeed ./src/configs/zero2.json \ --base_model_path <hf_base_model_id_or_local_path> \ --repo_id <hf_dataset_repo>/libero_cot \ --output_dir ./checkpoints/sft/deepthinkvla/libero_cot \ --per_device_train_batch_size 8 \ --gradient_accumulation_steps 2 \ --num_images_in_input 2 \ --report_to none
Key flags: toggle --num_images_in_input for the single-camera variant, adjust --bits, --lora_enable, --vision_lora, and match schedules with --max_steps, --save_steps, and --save_total_limit.
bash scripts/eval.sh \ --pretrained_checkpoint yinchenghust/deepthinkvla_libero_cot_sft
Add arguments such as --task_suite_name libero_10 to sweep specific task sets.
bash scripts/run_deepthinkvla_rl.sh
Configure LIBERO_CONFIG_PATH, SFT_MODEL_PATH, and hardware settings (NUM_GPUS, NUM_NODES). The trainer (python -m verl.trainer.main_ppo) implements GRPO with sparse success rewards, format regularization, and KL penalties to remain close to the SFT policy.
bash scripts/eval.sh \ --pretrained_checkpoint yinchenghust/deepthinkvla_libero_cot_rl
get_vla_action for get_vla_action_mask_cot in src/experiments/run_libero_eval.py to drop reasoning tokens before decoding actions.cot_text in get_vla_action with sampled tokens to test sensitivity to reasoning quality.Measure inference latency via python -m experiments.run_libero_eval to reproduce the 0.175x runtime reported for Mask CoT.
DeepThinkVLA/
├── LICENSE
├── README.md
├── requirements.txt
├── data/ # Data helpers and CoT acquisition scripts
├── figs/ # README figures (Fig. 1-5)
├── scripts/ # Launchers for SFT, eval, RL, and alignment
├── src/
│ ├── configs/ # Hyperparameter dataclasses and DeepSpeed configs
│ ├── dt_datasets/ # Dataset wrappers, tokenizers, normalization
│ ├── experiments/ # Evaluation utilities and LIBERO runners
│ ├── lerobot/ # Third-party LeRobot components
│ ├── libero/ # LIBERO simulator assets
│ ├── sft/ # Model, trainer, and hybrid attention utilities
│ ├── tools/ # Maintenance utilities
│ ├── train.py # SFT entrypoint
│ └── verl/ # VERL PPO stack for RL refinement
└── checkpoints/ # (Generated) model checkpoints
DeepThinkVLA builds on open-source components from Hugging Face Transformers, PEFT, DeepSpeed, LeRobot, LIBERO, VERL, SimpleVLA-RL and the broader robotics community. We thank the maintainers of:
If you find this repository helpful, please consider citing:
@article{yin2025deepthinkvla,
title={DeepThinkVLA: Enhancing Reasoning Capability of Vision-Language-Action Models},
author={Yin, Cheng and Lin, Yankai and Xu, Wang and Tam, Sikyuen and Zeng, Xiangrui and Liu, Zhiyuan and Yin, Zhouping},
journal={arXiv preprint arXiv:2511.15669},
year={2025}
}
more like this
Pytorch Implementation of SimGAN: Hybrid Simulator Identification for Domain Adaptation via Adversarial Reinforcement L…
search projects, people, and tags