Add pi05_da3_pipeline_slide_summary.md (pi05-da3 pipeline slide summary)
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111# Ο0.5βDA3 Residual Pipeline β Slide Summary
One-liner: **Frozen Ο0.5 teacher + frozen DA3 depth β train only a 6-layer flow residual head that corrects actions.**
Source repo: `/work/maya/pi05_da3` (`pi05-residual`).
---
## Slide 1 β Problem & Idea
- Base policy (`PiBehavior` / Ο0.5) is strong but still errs on geometry-heavy BEHAVIOR-1K tasks- Retraining the full VLM + action expert is expensive and risks breaking the teacher- **Approach:** keep teacher + Depth Anything 3 frozen; train a small residual head that predicts a correction from state, VLM context, and depth tokens
\[a_{\text{final}} = a_{\text{teacher}} + \text{scale} \cdot \text{residual}(\text{state},\;\text{VLM ctx},\;\text{depth tokens})\]
---
## Slide 2 β System Architecture (what is / isnβt trained)
| Component | Role | Status ||-----------|------|--------|| BEHAVIOR-1K data | RGB (head), state, GT actions | data || Frozen PiBehavior (Ο0.5) | Teacher actions + VLM context | never updated || Frozen DA3 Nested-Giant | Head-cam metric depth β 4Γ4 tokens | never updated || **6-layer residual flow head** | Corrects teacher actions | **only trained params** |
- Head: dim 512, 8 heads, dropout 0.1, action chunk `[30, 32]`- Checkpoints store **residual params only** (no teacher/DA3 weights)
---
## Slide 3 β End-to-End Pipeline
```Data (eps 0β199) βExtract: frozen teacher + frozen DA3 β features in RAM / cache βRelease extractors (free GPU/RAM) βTrain residual head (30k steps, bs 1024, bf16) βEvaluate: scale β {0, 0.25, β¦, 1} (0 = teacher-only)```
CLI flow: `validate` β `cache` (optional) β `train` β `evaluate --scale β¦`
---
## Slide 4 β Feature Extraction Contract
Each sample stores:
- Normalized **32-D state**- **Teacher + target** actions `[30, 32]`- Compact **VLM context**- Per-camera **4Γ4 depth tokens** (head cam; wrists omitted)- Timestep mask `[30]` + action-dim mask `[32]`
**Depth geometry chain** (critical):`original RGB β DA3 β remap to RGB β Ο0.5 resize/pad β 4Γ4 tokens`
Never resize DA3 depth straight to 224Γ224. Final tokens are ~3136Γ smaller than full maps.
---
## Slide 5 β Train vs Inference
### Train (memory extract-then-train)
1. Decode video once β resize for teacher (224) and DA3 (252)2. Split GPUs: Ο0.5 on GPU 0 (JAX), DA3 on GPUs 1β3 (PyTorch)3. Hold features in RAM β drop extractors β train head (~30 min after extract)
**Losses:** velocity 1.0 Β· corrected action 0.05 Β· smoothness 0.01 Β· magnitude 0.01
### Inference
- Live obs β frozen teacher + frozen DA3 β residual sample β add with `scale`- `scale=0` returns teacher bit-for-bit (ablation)
---
## Slide 6 β Experiments & Provenance
- Tasks: `turning_on_radio`, `can_meat` (200 task-local episodes each)- Single stage on all eps `0β199`; eval must use **disjoint** sim seeds/episodes- Optional disk cache path vs default **RAM** feature store- Orchestration: radio job β chain script β can_meat job
**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.
---
## Optional diagram (copy-ready)
```mermaidflowchart LR D[BEHAVIOR-1K<br/>RGB + state] --> T[Frozen Ο0.5<br/>teacher] D --> DA3[Frozen DA3<br/>head depth] T --> F[Features:<br/>a_t, VLM ctx, state] DA3 --> F F --> R[Trainable 6-layer<br/>residual flow] T --> OUT[a_final] R --> OUT```
Companion figure in-repo: `design_flowchart.svg`.pi05_da3_pipeline_slide_summary.mdAdded+111