comparison/ 프레임워크 4번째 모델generate_samples_from_batch가 action+future+value를 공동 denoise → action call도 전액 지불, VAE decode만 skip(+106ms→459ms).rmsnorm_fwd)을 써서 Dynamo graph break 발생 → 융합 불가. X-WAM(~1.5×)/Cosmos3-Nano(~1.25×)와 대조적.X-WAM을 다른 VLA/world 모델과 input·latency 기준으로 비교하는 comparison/ 프레임워크(SCHEMA.md + models/*.yaml + build_table.py)에 모델을 추가하는 작업. 기존 등록: X-WAM, Cosmos3-Nano-DROID(16B), Pi0.5-DROID. 이번엔 NVIDIA Cosmos Policy(arXiv:2601.16163, Robotics/cosmos-policy OSS)의 RoboCasa 2B 체크포인트를 측정해 추가한다.
inference 진입점은 get_action()(cosmos_utils.py:851). 핵심: model.generate_samples_from_batch(num_steps=5)가 action + future state + value를 공동(joint) denoise하고, generate_future_state_and_value_in_parallel=True이면 추가로 future image VAE decode까지 수행. 즉 Cosmos3-Nano처럼 action-only fast path가 없고, VAE decode만 토글된다(ANS류 step 디커플링 아님).
실행: 로그인 GPU0 idle, CUDA_VISIBLE_DEVICES=0 timeout 5400 .venv/bin/python ... (총 70 calls, <2분 → 디버그 임계 이내). T5 캐시 lock/on-demand 우회를 위해 pkl에서 임베딩 1개를 .float().numpy()로 로드해 ndarray 경로로 주입(latency는 shape 결정이라 대표성 OK).
isolated 1×B200, eager, cuda-synced, warmup 5 / timed 30, batch 1:
| 경로 | median | mean | p10/p90 | min/max | per-action ÷32 | per-action ÷16 |
|---|---|---|---|---|---|---|
| action_only (5-step joint, VAE decode 없음) | 353 ms | 351 | 333 / 364 | 304 / 381 | 11.0 ms | 22.1 ms |
| full as-run (+ future-image VAE decode + value) | 459 ms | 455 | 430 / 469 | 427 / 482 | 14.3 ms | 28.7 ms |
torch.compile(net, dynamic=False)레포 자체 recipe(text2world_model_rectified_flow.py:355)와 동일하게 model.net을 compile (FSDP setup 경로라 단일 GPU inference엔 미적용 → 벤치에서 명시). warmup 10 / timed 30.
| 경로 | eager | compiled | speedup |
|---|---|---|---|
| action_only | 353 ms | 350 ms | ~1.0× (노이즈 내) |
| full | 459 ms | 434 ms | ~1.06× |
| per-action (÷32) | 11.0 ms | 11.0 ms | 동일 |
transformer_engine_torch.PyCapsule.rmsnorm_fwd)을 호출 → Dynamo가 트레이스 못 해 graph break → 융합 불가. flex_attention은 eager에서도 이미 torch.compile로 감싸짐(minimal_v4_dit.py:352). pi0.5(GEMM-bound)와는 다른 원인이지만 결과는 같음(compile 무의미). X-WAM(~1.5×)/Cosmos3-Nano(~1.25×)와 대조적.| Model | Params | Suite | Call latency | per-action | fast path? |
|---|---|---|---|---|---|
| X-WAM | 5B | RoboCasa | 237(comp)/352(eager) | 7.4(comp) / 11.0(eager) | ✅ ANS |
| Cosmos-Policy-RoboCasa | 2B | RoboCasa | 353(eager) | 11.0(eager) | ❌ joint |
| Pi0.5-DROID | 4B | DROID | 165(eager) | 11.0(eager) | ✅ action-only |
| Cosmos3-Nano-Policy-DROID | 16B | DROID | 961(comp) | 30.0(comp) | ❌ joint |
World-model 축에서 Cosmos-Policy는 1-step future obs(rollout video 아님)라 X-WAM 9프레임/Nano 33프레임과 성격이 다름 — 테이블/footnote에 명시.
산출물: comparison/models/cosmos_policy_robocasa.yaml, comparison/comparison_table.md(행+footnote³+World-model 행), 벤치 cosmos-policy/tmp/bench_cosmos_policy_latency.py.