Skip to content

cookbook(action/droid): align DROID recipe with GB200 reference reproduction#261

Merged
fwd4 merged 6 commits into
NVIDIA:mainfrom
fwd4:haolia/add-droid-policy-cookbook
Jul 7, 2026
Merged

cookbook(action/droid): align DROID recipe with GB200 reference reproduction#261
fwd4 merged 6 commits into
NVIDIA:mainfrom
fwd4:haolia/add-droid-policy-cookbook

Conversation

@fwd4

@fwd4 fwd4 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

What

Aligns the DROID action-policy finetune cookbook (cookbooks/cosmos3/generator/action/finetune/) with the actual Cosmos3-Nano-Policy-DROID GB200 reference reproduction run.

The DROID recipe files already exist on main; this PR pins the recipe's run-level scalars to the real reference shape instead of the single-node placeholder, mirroring how the LIBERO recipe already encodes its reference config.

Changes

  • action_policy_droid_repro.toml — encode the GB200 reference config:
    • data_parallel_replicate_degree=32 / data_parallel_shard_degree=8HSDP 32×8 = 256 ranks (GB200: 64 nodes × 4)
    • lr=2.0e-04, max_samples_per_batch=32, grad_accum_iter=1global batch 8192
    • max_iter=10000, cycle_lengths=[10000]
  • README — document the reference shape (HSDP 32×8, GBS 8192, lr 2e-4, 10k iters) and the JSON action-prompt format (format_prompt_as_json=True); note that eval must use the matching JSON prompt. Add the single-node scale-down override (replicate=1 + grad_accum_iter=32 keeps GBS 8192).
  • launch_sft_action_policy_droid.sh — fix the stale "8× H100" / "8-GPU FSDP by default" comments to reflect the 256-rank reference shape.

The TOML is kept byte-identical to the cosmos-framework copy (examples/toml/sft_config/action_policy_droid_repro.toml).

Notes

  • Companion to cosmos-framework PR #86, which carries the identical recipe TOML and the DROID/LIBERO stack.
  • The closed-loop RoboLab reference SR number will follow once the clean from-scratch reference run + eval land.

🤖 Generated with Claude Code

Add a 'Verifying numerical reproducibility' section to the DROID/LIBERO
action-policy finetune cookbook, pointing at cosmos-framework's deterministic
action_policy_regression_test with the reference H200 LIBERO-10 loss series.
Companion to cosmos-framework PR NVIDIA#86.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…8192, lr 2e-4)

Pin the DROID repro TOML to the actual reference run shape instead of the
single-node placeholder: data_parallel_replicate_degree=32 (HSDP 32x8 = 256
ranks), lr=2e-4, max_samples_per_batch=32, grad_accum_iter=1 -> global batch
8192, matching the LIBERO recipe's convention of encoding the true reference
shape. Document the shape in the README/launcher and give the single-node
scale-down override. Drops the earlier numerical-reproducibility section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fwd4 fwd4 marked this pull request as ready for review July 6, 2026 07:55
@fwd4 fwd4 requested review from mli0603 and ychao-nvidia July 6, 2026 07:55
fwd4 and others added 2 commits July 6, 2026 15:57
The action_policy_droid_nano experiment trains with format_prompt_as_json=True;
call this out in the DROID recipe description and flag that eval must use the
matching JSON prompt format.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keep the HSDP 32x8 reference described as the GB200 shape (64 nodes x 4)
without recommending an H100/H200 equivalent layout.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fwd4 fwd4 changed the title cookbook(action): numerical reproducibility for DROID/LIBERO action policy cookbook(action/droid): align DROID recipe with GB200 reference reproduction Jul 6, 2026
…le, dataloader)

Sync the DROID repro TOML with the framework copy: fold in loss_scale=10,
scheduler.cycle_lengths=[100000], compile_tokenizer, and dataloader worker
settings so the recipe reproduces the reference run without launcher overrides.
Update the README description (cosine cycle 100000, generator loss_scale 10).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread cookbooks/cosmos3/generator/action/finetune/README.md Outdated
@ychao-nvidia

Copy link
Copy Markdown
Collaborator

LGTM!

…erride

Reformat the DROID single-node smoke-test EXTRA_TAIL_OVERRIDES onto multiple
lines for readability, per @ychao-nvidia's suggestion on PR NVIDIA#261.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fwd4 fwd4 requested review from lfengad and ychao-nvidia July 6, 2026 15:34

@lfengad lfengad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fwd4 fwd4 merged commit d80caad into NVIDIA:main Jul 7, 2026
fwd4 added a commit to NVIDIA/cosmos-framework that referenced this pull request Jul 7, 2026
…o recipe + numerical regression test (#86)

## Summary

Adds **DROID action-policy post-training** on Cosmos3-Nano and a
**numerical regression test** for the action-policy launches — the
reference reproduction recipe for the DROID policy result.

## What's included

- **Lazy DROID LeRobot dataset** —
`cosmos_framework/data/generator/action/datasets/cosmos3_action_lerobot.py`
(streaming `BaseActionLeRobotDataset`) + a rewritten
`droid_lerobot_dataset.py` on top of it, plus
`droid_lerobot_dataset_config.py`. Keys the versioned merged root;
`use_success_only` resolves the `success/` split; eager
`_register_sources()`.
- **DROID Nano recipe** —
`configs/base/experiment/action/posttrain_config/action_policy_droid_nano.py`
+ `examples/toml/sft_config/action_policy_droid_repro.toml`: res480,
`joint_pos` 8D + `use_state`, JSON action prompt
(`format_prompt_as_json=True`), CPU-side color jitter. The TOML pins the
GB200 reference shape — HSDP 32×8 (256 ranks), global batch 8192, lr
2e-4, 10000 iters — and trains the generation + action heads from the
public Cosmos3-Nano base.
- **net_ema warm-start** — `checkpoint/dcp.py`: seed `net_ema` from
`net` when `net_ema` is skipped on load (fresh action heads).
- **Action-policy numerical regression test** —
`tests/action_policy_regression_test.py`: the action-policy analogue of
`tests/launch_regression_test.py`. Deterministic 10-iter re-run of the
LIBERO + DROID launches (single-node, `--deterministic`, seed 42),
asserting per-arch rank-0 loss goldens with a tolerance. LIBERO golden
captured on the H200 CI arch; the DROID spec skips unless its (large,
out-of-CI) dataset is supplied via `DROID_ROOT`.

## Reproduction

The recipe reproduces the DROID action-policy result from the public
Cosmos3-Nano base. The exact training code was validated by a
from-scratch 64-GPU (GB200) run to 10k iterations, and the recipe TOML
now encodes that run's configuration directly.

## Companion

Cookbook PR: NVIDIA/cosmos#261 — the runnable DROID/LIBERO finetune
cookbook that drives this recipe.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: lfengad <liangf@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants