JackLiu0406 commited on
Commit
976e60f
Β·
verified Β·
1 Parent(s): 0587d65

add README for task54_putting_away_toys

Browse files
Files changed (1) hide show
  1. task54_putting_away_toys/README.md +134 -0
task54_putting_away_toys/README.md ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Task 54 β€” `putting_away_toys` (PiBehavior / pi0.5, no DA3)
2
+
3
+ Single-task fine-tune for the [BEHAVIOR-1K](https://behavior.stanford.edu/) 2026 challenge.
4
+ Part of [`JackLiu0406/b1k-checkpoints`](https://huggingface.co/JackLiu0406/b1k-checkpoints).
5
+
6
+ ---
7
+
8
+ ## Quick facts
9
+
10
+ | | |
11
+ |---|---|
12
+ | architecture | PiBehavior / pi0.5 β€” `gemma_2b` VLM + `gemma_300m` action expert, 3,826.8 M params |
13
+ | initialised from | [`IliaLarchenko/behavior_50t_checkpoint`](https://huggingface.co/IliaLarchenko/behavior_50t_checkpoint) (50-task meta) |
14
+ | task | **54** = `putting_away_toys` |
15
+ | data | 200 episodes, **2,259,351 frame-samples** |
16
+ | checkpoint | **19999** (full 20,000-step schedule completed) |
17
+ | task space | 100 tasks |
18
+ | DA3 | not used |
19
+ | training data | 224x224 **GOP=8** re-encode β€” [`JackLiu0406/b1k-224-gop8`](https://huggingface.co/datasets/JackLiu0406/b1k-224-gop8) |
20
+
21
+ ### Final metrics (step 19,975)
22
+
23
+ | metric | value |
24
+ |---|---|
25
+ | `action_loss` | **0.0443** (from 0.8591 at step 0) |
26
+ | `fast_accuracy` | **0.8143** (from 0.7523) |
27
+ | `subtask_accuracy` | 0.9989 |
28
+ | `grad_norm` | 0.1308 |
29
+
30
+ No nan/inf at any point. 20,000 steps at batch 256 over 2,259,351 samples is ~2.3 epochs.
31
+
32
+ ---
33
+
34
+ ## This is a NEW task β€” both embedding rows started from random init
35
+
36
+ `putting_away_toys` is **not** in the upstream 50, so nothing about it transferred:
37
+
38
+ ```
39
+ task_embeddings[54] random init
40
+ task_stage_embeddings[646-658] random init (13 stages, pretrained table ends at 596)
41
+ ```
42
+
43
+ Confirmed from the run's own log:
44
+
45
+ ```
46
+ Expanded task_embeddings/embedding (50, 2048) -> (100, 2048)
47
+ Expanded task_stage_embeddings/embedding (596, 1024) -> (1120, 1024)
48
+ ```
49
+
50
+ `B1K_TASK_SPACE=100` is required β€” the tables were widened to 100 rows and a 50-task model
51
+ fails on a shape mismatch at load.
52
+
53
+ ---
54
+
55
+ ## Normalisation β€” use the bundled `norm_stats.json`
56
+
57
+ `assets/IliaLarchenko/behavior_224_rgb/norm_stats.json` ships with this checkpoint and is
58
+ the file it trained against: the upstream 2025 **50-task** stats with `state[0:3]`
59
+ (`base_qvel`) corrected to the robot frame β€” identical to
60
+ [`norm-stats-fixed/`](../norm-stats-fixed) in this repo.
61
+
62
+ **Do not substitute per-task statistics.** That was tested directly, and it is worse. A
63
+ controlled A/B on task 56 β€” same seed, same data, same recipe, only `assets` differing
64
+ (`subtask_accuracy` identical at 0.2148, confirming identical init):
65
+
66
+ | step | `fast_accuracy` with task-only stats | with these 50-task stats |
67
+ |---|---|---|
68
+ | 0 | 0.4824 | **0.7523** |
69
+ | 70 | 0.5679 | **0.7792** |
70
+
71
+ `fast_loss` at step 0 was 2.3997 vs 0.9398. The FAST tokenizer is a fixed artifact
72
+ calibrated on the 2025 action distribution, and per-task normalisation rescales actions
73
+ 1.45-1.60x (up to 3.2x on trunk), pushing them outside its bins.
74
+
75
+ Note `action_loss` is *lower* under per-task stats (0.7842 vs 0.9493) β€” that is a change of
76
+ units, not accuracy: per-task stats give unit-variance targets by construction. Only metrics
77
+ invariant to the normalisation (`fast_accuracy`, `fast_loss`, `subtask_accuracy`) are
78
+ comparable, and all favour these.
79
+
80
+ ---
81
+
82
+ ## Running it
83
+
84
+ Observation contract, wrapper behaviour and the full loop:
85
+ [`EVAL.md`](../task85_putting_dirty_dishes_in_sink/EVAL.md) β€” applies to every checkpoint here.
86
+
87
+ ```bash
88
+ huggingface-cli download JackLiu0406/b1k-checkpoints \
89
+ --include "task54_putting_away_toys/19999/*" --local-dir ./ckpts
90
+
91
+ export B1K_TASK_SPACE=100
92
+ export XLA_PYTHON_CLIENT_MEM_FRACTION=0.9
93
+
94
+ uv run scripts/serve_b1k.py \
95
+ --policy.config pi_behavior_b1k_fast \
96
+ --policy.dir ./ckpts/task54_putting_away_toys/19999 \
97
+ --task_id 54 \
98
+ --port 8000
99
+ ```
100
+
101
+ Point `assets_base_dir` at the **bundled** `assets/` so both `norm_stats.json` and
102
+ `fast_tokenizer/` resolve under `<assets>/IliaLarchenko/behavior_224_rgb/`.
103
+
104
+ For a clean measurement of the policy itself add `--apply_eval_tricks False`; it defaults to
105
+ `True` and can rewrite actions and force stage corrections.
106
+
107
+ ---
108
+
109
+ ## Training setup
110
+
111
+ | | |
112
+ |---|---|
113
+ | GPUs | 8 x H200, global batch **256** (32/GPU), FSDP **off** |
114
+ | steps | 20,000 |
115
+ | LR | ramp `5e-7` -> `5e-5` over 2,000 warmup, cosine to `1e-6` at 20,000 |
116
+ | data | 224x224 GOP=8, decoded without resize (`B1K_DECODE_RESIZE=0`) |
117
+ | throughput | ~1.7 s/it, GPU-idle 0/30 samples (compute-limited) |
118
+
119
+ Inherited from the base config: `action_horizon=30`, `action_dim=32`, correlated noise
120
+ (`beta=0.5`), FAST auxiliary (weight 0.05, vocab 1024), `subtask_loss_weight=0.1`, frozen
121
+ vision backbone, delta joint actions, per-timestamp normalisation. The FAST tokenizer was
122
+ **not** retrained.
123
+
124
+ ---
125
+
126
+ ## Caveats
127
+
128
+ 1. **Inference only** β€” `train_state/` is not published; you cannot resume training.
129
+ 2. **Single-task.** Only task 54 was fine-tuned. Other indices in 50..99 not named in
130
+ this repo are at random init and will produce garbage.
131
+ 3. **All metrics are training-set.** No validation split, no rollout evaluation β€” none of
132
+ these numbers speak to generalisation.
133
+ 4. Episode length varies several-fold across tasks, so `action_loss` is not comparable
134
+ between checkpoints in this repo.