Skip to content

Commit 0774f80

Browse files
author
Suibian-YY-pro
committed
docs: add DiT4DiT and robot modeling docs
1 parent 82b8a2d commit 0774f80

23 files changed

Lines changed: 4228 additions & 1 deletion

06-策略抓取或抓取VLA/大模型控制、VLA、VLM/05DiT4DiT-LIBERO/01DiT4DiT-LIBERO训练与评估.md

Lines changed: 516 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 96 additions & 0 deletions
Loading
174 KB
Loading
167 KB
Loading
166 KB
Loading
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"franka": {
3+
"action": {
4+
"mean": [
5+
0.15312479436397552,
6+
0.13707277178764343,
7+
-0.15526802837848663,
8+
-0.005176450591534376,
9+
-0.01120874285697937,
10+
-0.020194264128804207,
11+
0.4578818082809448
12+
],
13+
"std": [
14+
0.41272708773612976,
15+
0.34724321961402893,
16+
0.50869220495224,
17+
0.037266165018081665,
18+
0.07244449853897095,
19+
0.05762382969260216,
20+
0.49827873706817627
21+
],
22+
"max": [
23+
0.9375,
24+
0.9375,
25+
0.9375,
26+
0.1971428543329239,
27+
0.33642858266830444,
28+
0.375,
29+
1.0
30+
],
31+
"min": [
32+
-0.9375,
33+
-0.9375,
34+
-0.9375,
35+
-0.1875,
36+
-0.3675000071525574,
37+
-0.36000001430511475,
38+
0.0
39+
],
40+
"q01": [
41+
-0.7454732114076613,
42+
-0.6616071462631226,
43+
-0.9375,
44+
-0.1071428582072258,
45+
-0.20678570866584778,
46+
-0.1842857152223587,
47+
0.0
48+
],
49+
"q99": [
50+
0.9375,
51+
0.8758928775787354,
52+
0.9321428537368774,
53+
0.1039285734295845,
54+
0.17678570747375488,
55+
0.14571428298950195,
56+
1.0
57+
],
58+
"mask": [
59+
true,
60+
true,
61+
true,
62+
true,
63+
true,
64+
true,
65+
false
66+
]
67+
},
68+
"state": {
69+
"mean": [
70+
-0.024462558329105377,
71+
0.106529600918293,
72+
1.0580483675003052,
73+
3.0628468990325928,
74+
-0.10464039444923401,
75+
0.08307311683893204,
76+
0.01995457336306572,
77+
-0.020162804052233696
78+
],
79+
"std": [
80+
0.1101478561758995,
81+
0.13784688711166382,
82+
0.10442823916673634,
83+
0.10451053828000996,
84+
0.4112098217010498,
85+
0.2176690548658371,
86+
0.017260896041989326,
87+
0.0171116404235363
88+
],
89+
"max": [
90+
0.1759040206670761,
91+
0.3904820382595062,
92+
1.3290715217590332,
93+
3.4566118717193604,
94+
1.2268599271774292,
95+
1.0429412126541138,
96+
0.041053611785173416,
97+
0.000775813648942858
98+
],
99+
"min": [
100+
-0.3095473051071167,
101+
-0.29250794649124146,
102+
0.9095591306686401,
103+
2.497488260269165,
104+
-1.8006486892700195,
105+
-0.7207611203193665,
106+
-0.0004703797458205372,
107+
-0.041536275297403336
108+
],
109+
"q01": [
110+
-0.2727657300233841,
111+
-0.23721413239836692,
112+
0.9160063165426254,
113+
2.77949666261673,
114+
-1.3187511622905732,
115+
-0.41989982962608335,
116+
0.001503719249740243,
117+
-0.03989770736545324
118+
],
119+
"q99": [
120+
0.13529365032911292,
121+
0.3629165390133857,
122+
1.2862326657772063,
123+
3.2829698753356933,
124+
0.9332760351896285,
125+
0.6325724506378171,
126+
0.039933966137468815,
127+
-0.001671919699292631
128+
]
129+
},
130+
"num_transitions": 52970,
131+
"num_trajectories": 432
132+
}
133+
}
134+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
ROOT=/root/gpufree-share/dit4dit_eval
5+
REPO="$ROOT/DiT4DiT"
6+
PY_ENV=/root/gpufree-share/conda-envs/dit4dit
7+
FREE_ROOT=/root/gpufree-data/dit4dit_train_test
8+
DATA_ROOT="$FREE_ROOT/datasets"
9+
RUN_ROOT="$FREE_ROOT/results"
10+
LOG_DIR="$FREE_ROOT/logs"
11+
COSMOS="$ROOT/models/Cosmos-Predict2.5-2B"
12+
PRETRAINED="$ROOT/models/dit4dit-model/dit4dit_libero/final_model/pytorch_model.pt"
13+
RUN_ID="train_smoke_libero_spatial_$(date +%Y%m%d_%H%M%S)"
14+
STEPS="${1:-2}"
15+
BATCH="${2:-1}"
16+
17+
source "$ROOT/env.sh"
18+
export PYTHONPATH="$REPO"
19+
export WANDB_MODE=offline
20+
export WANDB_DIR="$LOG_DIR/wandb"
21+
export HF_HOME="$FREE_ROOT/hf_cache"
22+
export TRANSFORMERS_CACHE="$FREE_ROOT/hf_cache/transformers"
23+
export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0}"
24+
export TOKENIZERS_PARALLELISM=false
25+
mkdir -p "$RUN_ROOT" "$LOG_DIR" "$WANDB_DIR" "$HF_HOME"
26+
27+
cd "$REPO"
28+
LOG_FILE="$LOG_DIR/${RUN_ID}.log"
29+
30+
echo "run_id=$RUN_ID"
31+
echo "steps=$STEPS batch=$BATCH"
32+
echo "data_root=$DATA_ROOT"
33+
echo "run_root=$RUN_ROOT"
34+
echo "log_file=$LOG_FILE"
35+
df -h /root/gpufree-data /root/gpufree-share
36+
37+
"$PY_ENV/bin/accelerate" launch \
38+
--config_file DiT4DiT/config/deepseeds/deepspeed_zero2.yaml \
39+
--num_processes 1 \
40+
DiT4DiT/training/train.py \
41+
--config_yaml ./DiT4DiT/config/libero/dit4dit_libero.yaml \
42+
--framework.name DiT4DiT \
43+
--framework.cosmos25.base_model "$COSMOS" \
44+
--framework.cosmos25.training joint \
45+
--framework.cosmos25.attn_implementation sdpa \
46+
--framework.cosmos25.extract_layer 17 \
47+
--framework.action_model.action_model_type DiT-B \
48+
--datasets.vla_data.data_root_dir "$DATA_ROOT" \
49+
--datasets.vla_data.data_mix libero_spatial_only \
50+
--datasets.vla_data.per_device_batch_size "$BATCH" \
51+
--datasets.vla_data.load_all_data_for_training false \
52+
--datasets.vla_data.video_backend torchvision_av \
53+
--trainer.pretrained_checkpoint "$PRETRAINED" \
54+
--trainer.freeze_modules backbone_interface \
55+
--trainer.max_train_steps "$STEPS" \
56+
--trainer.save_interval 999999 \
57+
--trainer.eval_interval 999999 \
58+
--trainer.logging_frequency 1 \
59+
--trainer.num_warmup_steps 0 \
60+
--trainer.learning_rate.base 1e-5 \
61+
--trainer.learning_rate.backbone_interface 0 \
62+
--trainer.learning_rate.action_model 1e-5 \
63+
--trainer.loss_scale.future_video 0 \
64+
--trainer.repeated_diffusion_steps 1 \
65+
--trainer.gradient_accumulation_steps 1 \
66+
--trainer.enable_gradient_checkpointing true \
67+
--run_root_dir "$RUN_ROOT" \
68+
--run_id "$RUN_ID" \
69+
--wandb_project DiT4DiT_libero_smoke \
70+
--wandb_entity offline 2>&1 | tee "$LOG_FILE"
71+
72+
FINAL="$RUN_ROOT/$RUN_ID/final_model/pytorch_model.pt"
73+
if [ -f "$FINAL" ]; then
74+
du -sh "$RUN_ROOT/$RUN_ID" || true
75+
if [ "${KEEP_FINAL_MODEL:-0}" != "1" ]; then
76+
rm -rf "$RUN_ROOT/$RUN_ID/final_model"
77+
echo "Removed large final_model to keep free data disk small. Set KEEP_FINAL_MODEL=1 to retain it."
78+
fi
79+
fi
80+
81+
echo "Smoke training finished: $RUN_ROOT/$RUN_ID"
82+
df -h /root/gpufree-data /root/gpufree-share
83+
84+
85+
86+

0 commit comments

Comments
 (0)