Skip to content

plan_vit: add the muP / scaling-study ViT as a torchtitan experiment - #10

Merged
utkarshgill merged 29 commits into
commaai:mainfrom
utkarshgill:plan-vit-experiment
Jul 2, 2026
Merged

plan_vit: add the muP / scaling-study ViT as a torchtitan experiment#10
utkarshgill merged 29 commits into
commaai:mainfrom
utkarshgill:plan-vit-experiment

Conversation

@utkarshgill

Copy link
Copy Markdown

Plan ViT for the prune-10m muP and scaling study, mirroring path's structure: model + config_registry (standard and muP flavors, n_embd 128..2048 at head_dim 64) + a thin trainer. Two cameras are channel-stacked into in_channels=24, matching the production worldmodel I/O.

Registered as the "plan_vit" experiment so it launches like path:
run.sh torchtitan/run_train.sh -e MODULE=plan_vit -e CONFIG=plan_vit_mup_w512

Self-contained plan ViT for the prune-10m muP and scaling study, mirroring
path's structure: model + config_registry (standard and muP flavors,
n_embd 128..2048 at head_dim 64) + a thin trainer. Two cameras are
channel-stacked into in_channels=24, matching the production worldmodel I/O.

Registered as the "plan_vit" experiment so it launches like path:
  run.sh torchtitan/run_train.sh -e MODULE=plan_vit -e CONFIG=plan_vit_mup_w512
the config hardcoded dp_shard=8 (only valid at world_size=8, i.e. N=1). launching
N=2 (world_size=16) tripped the parallel-dims assertion at startup. derive
replicate=num_nodes, shard=local_world_size from env like path does.
A pinned total_steps wrapped the cosine schedule, making the LR oscillate
when training.steps exceeded it. None falls back to the real training_steps.
…ase lr)

output_mult=1 made the coord check flat for the wrong reason (compensating
errors that cancel only at low step count). Canonical muP readout: forward
multiplier 1/m, base-width init, base lr (vector-like under Adam, ninf==1).
Verified by coord check: init output slopes ~1/sqrt(m), trained output flat.
adds default-off plan_target_last_frame flag so the single-frame ViT
supervises the last plan frame; convnext unchanged when off
# Conflicts:
#	torchtitan/experiments/__init__.py
drop the Meta copyright headers, the inherited-Meta formatter churn, and the dangling
plan_vit registry entry; the vit resolves via --module path --config vit_*.
optimizer_kwargs={**common},
)
]
if mup:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

if we confirm that muP is superior, let's just make it default and forget about SP

@YassineYousfi

YassineYousfi commented Jun 30, 2026

Copy link
Copy Markdown

weight decay muP with pytorch adamw should be propto width (inverse of LR)
let's just set 0.1 for large scale width and fix it accordingly for the small scale sweep

…hout base lr, VIT_ prefix constants, dedup vit dataloader config
@utkarshgill

Copy link
Copy Markdown
Author

confirmed: 1e-2 across w256-2048 at 2k steps, w256 tied with 3e-2 within noise https://research-reports.comma.life/gill_reports/mup/plan_vit/mutransfer.html. let's make it default, drop sp as a follow-up

mutransfer_basins

@utkarshgill
utkarshgill merged commit be29201 into commaai:main Jul 2, 2026
10 of 14 checks passed
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.

2 participants