Index
2026-05-14 — Experiment

Tier-2 multi-turn builder + LoRA 학습 완료

memer | subtasks.json supervision · 858 scenarios · eval_loss 0.00171 · combo_002 cascade 0/3→1/3

TL;DR

0.00171
eval_loss
0.99965
token_acc
2,793
학습 samples
258
steps
1/3
cascade fixture acc

1 배경 / 목적

Tier-1 LoRA V2 probe(260514 새벽)에서 RoboCasa atomic vocab format은 확보됐으나 target fixture 정확도가 0/3이었다. 원인은 Tier-1이 단일 atomic episode 1개 = keyframe 1개로 학습되어, scene-mem-benchmark가 요구하는 prior video 전체를 기억하고 마지막 query에 맞는 fixture를 recall하는 능력이 없었기 때문.

Tier-1 한계: single-atomic 학습 → memory FIFO 활용 불가 → prior 10K frame 보여줘도 target fixture 추측에 불과. compound trajectory + memory-aware supervision 필수.

이 세션에서 데이터셋 오너가 subtasks.json을 HF에 올려 segment-level supervision이 생겼다. Tier-2 builder와 학습을 한 세션에 완성하는 것이 목표.

2 작업 내용

subtasks.json supervision

2026-05-14 04:51 UTC에 Keh0t0/scene-mem-benchmarkvideos/subtasks.json이 858 scenario 전체에 추가됐다. combo_002 예시:

{"scenario": "combo_002_L29_S48_0006", "fps": 20, "video_total_frames": 10230, "n_tasks": 6, "segments": [ {"frame_start":0, "frame_end":724, "task_idx":0, "task_name":"MoveFridgeToFreezer", "is_pnp":true, "is_transit":false, "instruction":"Pick up the steak from the fridge..."}, {"frame_start":724, "frame_end":1003, "task_name":"Transit", "is_transit":true, "instruction":"Approach the cabinet..."}, ... (11 segments total: 6 PnP + 5 Transit) ]} # frame_start/end + task_idx → eval_spec.tests[].task_idx와 직접 매칭 # → 완벽한 supervision: prior video chunk별 GT atomic 알 수 있음

Tier-2 builder 설계 (scripts/build_scene_mem_subgoal_tier2.py, 420L)

핵심 구조: multi-turn conversation으로 prior video 전체를 segment별로 흘리고, 마지막 turn에서 test query에 맞는 target atomic 예측.

messages = [ system: SUBGOAL_SYSTEM_PROMPT, # segment별 1 turn씩 (11 chunks) for chunk_i in segments: user: build_user_prompt(chunk_task_goal, memory=i, recent=8 frames) assistant: {"current_subtask": <segment_atomic>, "keyframe_positions": [chunk_mid_frame]} → memory에 chunk_i의 mid-frame 추가 (FIFO) # 최종 query turn user: build_user_prompt(test.lang, memory=N, recent=8 from target chunk) assistant: {"current_subtask": <target_atomic>, "keyframe_positions": [target_idx+1]} ] # per sample: 25 messages, 162 images (8 frame/chunk × 11 chunks + final 8) # atomic 정규화: 3-tier fallback (test 매칭 → PnP regex → instruction 첫 문장)
ProcessPool 8 worker + cv2 sequential seek: 858 scenario, 9분 완료. per scenario 3 test → 2,793 sample, ~65MB JSONL.

학습 설정

시작점: ~/ckpts/robocasa-memer-tier1-v2-merged # vocab swap 보존 LoRA: r=16, alpha=32 (Tier-1과 동일) max_length: 20480 # 멀티턴 길이 대응 (Tier-1: 4096) IMAGE_MAX_TOKEN_NUM: 128 # 162 images/sample 보호 per_device_batch: 1, grad_accum: 8, 4 GPU → effective batch 32 epochs: 3 (858 scenario × 3 test / effective_batch ≈ 86 step/epoch → 258 steps) Hardware: 4 GPU (n57), 32 CPU, sdpa attention

3 결과

학습 수렴 (Job 2721, 1h6m18s)

Steptrain_losstoken_acceval_losseval_token_acc
10.7440.890
600.2110.948
1000.0480.9880.02880.9927
2000.0030.99940.00220.9994
258 (final)0.0020.999660.001710.99965
Tier-1 V2 대비 6.5×↓ eval_loss: multi-turn + memory recall task에서도 안정적 수렴. Tier-1 V2 eval_loss=0.0111 → Tier-2 0.00171.

cascade combo_002 비교 (stub Pi0.5, Tier-1 V2 vs Tier-2)

Test정답 fixtureTier-1 V2 출력Tier-2 출력Tier-2 정답?
steakfreezer"pick the steak from the cabinet and place it on the counter""place the steak in the fridge"❌ cold-storage confusion
bowlcabinet"pick the bowl from the cabinet and place it on the counter""place the bowl in the cabinet"
fishoven"pick the fish from the counter and place it in the microwave""place the fish in the fridge"❌ 큰 miss

개선 요약:

남은 약점: steak(fridge≠freezer, cold-storage visual ambiguity) / fish(fridge≠oven, memory FIFO 회상 부족). 30-scenario sweep으로 N 키워 통계 확보 필요.

산출물

경로내용
data/scene_mem_tier2/train.jsonl2,793 sample, 65MB
data/scene_mem_tier2/images/~25K JPEG (858 scenario × ~30 frame)
~/ckpts/scene-mem-tier2-merged/merged ckpt, 8.5GB
scripts/build_scene_mem_subgoal_tier2.py420L, ProcessPool 8 worker
scripts/finetune_scene_mem_memer_tier2.shV2 ckpt resume, max_length=20480
scripts/eval_tier2_30sample.sh30-scenario sweep entry (sbm용)
eval_outputs/cascade_tier2_combo_002.jsoncombo_002 cascade (stub) 결과

4 Takeaway

subtasks.json이 Tier-2를 가능하게 한 핵심

segment-level supervision(frame_start/end + task_idx + instruction) 없이는 prior video를 chunk로 나눠 GT atomic을 붙이는 것이 불가능했다. 데이터셋 오너가 제공한 이 파일이 Tier-1(single-atomic) → Tier-2(memory recall) 전환의 열쇠였다.

format 정합이 먼저, fixture 정확도는 다음

Tier-2 학습으로 출력 format이 place the X in the Y로 완전히 정합됐다. fixture 정확도(1/3)는 아직 낮지만, 30-scenario 통계와 추가 학습(더 많은 epoch, frames-per-chunk 조정)으로 개선 여지가 충분하다.

Context length vs 정보량 trade-off

8 frame/chunk에서 162 images/sample → ~40K image token. IMAGE_MAX_TOKEN_NUM=128 cap으로 보호했지만, 4 frame/chunk(~20K)로 줄이면 더 안전하다. 두 설정을 ablation해서 최적값 찾는 것이 Tier-3 방향.

5 Next Steps

30-scenario sweep 결과 확인 (Job 2773)

stratified seed=42로 선택한 30 scenario에 대해 Tier-2 cascade(stub) 실행 중. fixture accuracy 분포 확인 후 task-별 breakdown 필요. RestockBowls/cabinet이 높고 OvenBroilFish/oven이 낮을 것으로 예상 (visual ambiguity 차이).

real Pi0.5 cascade (PI05_STUB=0)

stub mode 검증 완료 → 진짜 Pi0.5 inference 연결. mme_vla_suite config 매핑 + 32-dim → 12-dim action 트리밍 + norm_stats 로딩 확인 후 memory_success 실측.

frames-per-chunk ablation + 학습 데이터 균형

현재 8 frame/chunk(162 images). 4 frame/chunk(~81 images, 더 안전한 context)와 비교. 또한 Tier-2 2,793 sample은 Tier-1 3,519보다 작아서 epoch 2~3 추가 또는 RoboCasa Tier-1 data concat augment 고려.

vocab + target probe (chunk 0 copy 위험)

chunk 0의 atomic과 test 0의 target_atomic이 동일 → 모델이 chunk 0 그대로 copy 학습할 수 있음. chunk 1(bowl), chunk 2(fish) 정답률로 진짜 memory recall 검증 필요.