mah-asd commited on
Commit
2e118ab
Β·
verified Β·
1 Parent(s): 2d9dc3c

Add pi05_da3_pipeline_slide_summary.md (pi05-da3 pipeline slide summary)

Browse files
Files changed (1) hide show
  1. pi05_da3_pipeline_slide_summary.md +111 -0
pi05_da3_pipeline_slide_summary.md ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ο€0.5–DA3 Residual Pipeline β€” Slide Summary
2
+
3
+ One-liner: **Frozen Ο€0.5 teacher + frozen DA3 depth β†’ train only a 6-layer flow residual head that corrects actions.**
4
+
5
+ Source repo: `/work/maya/pi05_da3` (`pi05-residual`).
6
+
7
+ ---
8
+
9
+ ## Slide 1 β€” Problem & Idea
10
+
11
+ - Base policy (`PiBehavior` / Ο€0.5) is strong but still errs on geometry-heavy BEHAVIOR-1K tasks
12
+ - Retraining the full VLM + action expert is expensive and risks breaking the teacher
13
+ - **Approach:** keep teacher + Depth Anything 3 frozen; train a small residual head that predicts a correction from state, VLM context, and depth tokens
14
+
15
+ \[
16
+ a_{\text{final}} = a_{\text{teacher}} + \text{scale} \cdot \text{residual}(\text{state},\;\text{VLM ctx},\;\text{depth tokens})
17
+ \]
18
+
19
+ ---
20
+
21
+ ## Slide 2 β€” System Architecture (what is / isn’t trained)
22
+
23
+ | Component | Role | Status |
24
+ |-----------|------|--------|
25
+ | BEHAVIOR-1K data | RGB (head), state, GT actions | data |
26
+ | Frozen PiBehavior (Ο€0.5) | Teacher actions + VLM context | never updated |
27
+ | Frozen DA3 Nested-Giant | Head-cam metric depth β†’ 4Γ—4 tokens | never updated |
28
+ | **6-layer residual flow head** | Corrects teacher actions | **only trained params** |
29
+
30
+ - Head: dim 512, 8 heads, dropout 0.1, action chunk `[30, 32]`
31
+ - Checkpoints store **residual params only** (no teacher/DA3 weights)
32
+
33
+ ---
34
+
35
+ ## Slide 3 β€” End-to-End Pipeline
36
+
37
+ ```
38
+ Data (eps 0–199)
39
+ ↓
40
+ Extract: frozen teacher + frozen DA3 β†’ features in RAM / cache
41
+ ↓
42
+ Release extractors (free GPU/RAM)
43
+ ↓
44
+ Train residual head (30k steps, bs 1024, bf16)
45
+ ↓
46
+ Evaluate: scale ∈ {0, 0.25, …, 1} (0 = teacher-only)
47
+ ```
48
+
49
+ CLI flow: `validate` β†’ `cache` (optional) β†’ `train` β†’ `evaluate --scale …`
50
+
51
+ ---
52
+
53
+ ## Slide 4 β€” Feature Extraction Contract
54
+
55
+ Each sample stores:
56
+
57
+ - Normalized **32-D state**
58
+ - **Teacher + target** actions `[30, 32]`
59
+ - Compact **VLM context**
60
+ - Per-camera **4Γ—4 depth tokens** (head cam; wrists omitted)
61
+ - Timestep mask `[30]` + action-dim mask `[32]`
62
+
63
+ **Depth geometry chain** (critical):
64
+ `original RGB β†’ DA3 β†’ remap to RGB β†’ Ο€0.5 resize/pad β†’ 4Γ—4 tokens`
65
+
66
+ Never resize DA3 depth straight to 224Γ—224. Final tokens are ~3136Γ— smaller than full maps.
67
+
68
+ ---
69
+
70
+ ## Slide 5 β€” Train vs Inference
71
+
72
+ ### Train (memory extract-then-train)
73
+
74
+ 1. Decode video once β†’ resize for teacher (224) and DA3 (252)
75
+ 2. Split GPUs: Ο€0.5 on GPU 0 (JAX), DA3 on GPUs 1–3 (PyTorch)
76
+ 3. Hold features in RAM β†’ drop extractors β†’ train head (~30 min after extract)
77
+
78
+ **Losses:** velocity 1.0 Β· corrected action 0.05 Β· smoothness 0.01 Β· magnitude 0.01
79
+
80
+ ### Inference
81
+
82
+ - Live obs β†’ frozen teacher + frozen DA3 β†’ residual sample β†’ add with `scale`
83
+ - `scale=0` returns teacher bit-for-bit (ablation)
84
+
85
+ ---
86
+
87
+ ## Slide 6 β€” Experiments & Provenance
88
+
89
+ - Tasks: `turning_on_radio`, `can_meat` (200 task-local episodes each)
90
+ - Single stage on all eps `0–199`; eval must use **disjoint** sim seeds/episodes
91
+ - Optional disk cache path vs default **RAM** feature store
92
+ - Orchestration: radio job β†’ chain script β†’ can_meat job
93
+
94
+ **Design contrast vs spatial-injection addons:** PiBehavior and DA3 stay frozen; no Gemma cross-attn into the action expert β€” only the separate residual head trains.
95
+
96
+ ---
97
+
98
+ ## Optional diagram (copy-ready)
99
+
100
+ ```mermaid
101
+ flowchart LR
102
+ D[BEHAVIOR-1K<br/>RGB + state] --> T[Frozen Ο€0.5<br/>teacher]
103
+ D --> DA3[Frozen DA3<br/>head depth]
104
+ T --> F[Features:<br/>a_t, VLM ctx, state]
105
+ DA3 --> F
106
+ F --> R[Trainable 6-layer<br/>residual flow]
107
+ T --> OUT[a_final]
108
+ R --> OUT
109
+ ```
110
+
111
+ Companion figure in-repo: `design_flowchart.svg`.