knightnemo commited on
Commit
b72e4e3
·
verified ·
1 Parent(s): 38fe0d4

Initial upload: scale_s2

Browse files
Files changed (3) hide show
  1. README.md +71 -0
  2. config.yaml +109 -0
  3. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ tags:
4
+ - video-generation
5
+ - world-model
6
+ - diffusion
7
+ - diffusion-forcing
8
+ - ablation
9
+ - scaling
10
+ datasets:
11
+ - lerobot/fractal20220817_data
12
+ ---
13
+
14
+ # NanoWM-S/2 · RT-1 · Ablation: model scale = S/2
15
+
16
+ Scale ablation arm on RT-1 fractal. All other axes (pred_target=v, additive
17
+ action injection, cosine + ZTSNR schedule, 50k steps) match the B/2 reference,
18
+ so this row directly isolates the effect of backbone capacity.
19
+
20
+ ## Run identity
21
+ - **wandb**: https://wandb.ai/better_guidance/nano-world-model-ablation/runs/qdwuh9oe
22
+ - **launcher**: `src/scripts/ablation/scale_s2.sh`
23
+ - **collection**: https://huggingface.co/collections/knightnemo/nano-world-model
24
+
25
+ ## Training setup
26
+ | Key | Value |
27
+ |---|---|
28
+ | Architecture | **NanoWM-S/2** (12 layers, d=384, patch=2, ~39.8M params) |
29
+ | Dataset | RT-1 fractal (`lerobot/fractal20220817_data`) |
30
+ | Frames × resolution | 4 × 256² → 4 × 32² latents (SD-VAE) |
31
+ | Context frames | 1 (sequential / self-forcing scheduling) |
32
+ | Action injection | additive (7-dim continuous) |
33
+ | Steps | 50,000 |
34
+ | Batch | 8/GPU × 8 × H20 = 64 effective |
35
+ | Optimizer | AdamW, lr 1e-4, wd 0.01, warmup 1000, grad clip 0.1 after 20k |
36
+ | Precision | bf16-mixed (params fp32), VAE fp32, `torch.compile` on |
37
+ | Seed | 3407 |
38
+
39
+ ## Diffusion setup
40
+ | Key | Value |
41
+ |---|---|
42
+ | pred_name | v |
43
+ | noise_schedule | `squaredcos_cap_v2` (cosine) |
44
+ | zero_terminal_snr | true |
45
+ | timestep_sampling | logit_normal (SD3-style, μ=0, σ=1) |
46
+ | snr_gamma | 5.0 (Min-SNR loss weighting) |
47
+ | diffusion_steps | 1000 train · 250 DDIM sample |
48
+ | history_stabilization_level (inference) | 0.02 |
49
+
50
+ ## Loading
51
+
52
+ ```bash
53
+ git clone git@github.com:knightnemo/nano-world-model.git
54
+ cd nano-world-model
55
+ huggingface-cli download knightnemo/nanowm-s2-rt1-abl-scale-s2-50k --local-dir ./ckpt
56
+ ```
57
+
58
+ ```python
59
+ import sys
60
+ from omegaconf import OmegaConf
61
+ from safetensors.torch import load_file
62
+ sys.path.insert(0, "src")
63
+ from models import get_models
64
+
65
+ cfg = OmegaConf.load("ckpt/config.yaml")
66
+ cfg.experiment.infra.compile = False
67
+ model = get_models(cfg).eval()
68
+
69
+ state_dict = load_file("ckpt/model.safetensors")
70
+ model.load_state_dict(state_dict, strict=True)
71
+ ```
config.yaml ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model:
2
+ arch: NanoWM-S/2
3
+ name: NanoWM-S-2
4
+ num_frames: 4
5
+ n_context_frames: 1
6
+ scheduling_mode: sequential
7
+ num_sampling_steps: 250
8
+ use_action: true
9
+ action_injection:
10
+ type: additive
11
+ causal: true
12
+ image_size: 256
13
+ latent_size: 32
14
+ extras: 1
15
+ num_classes: 1000
16
+ dataset:
17
+ loader:
18
+ n_rollout: null
19
+ data_path_train: null
20
+ data_path_val: null
21
+ split_ratio: 0.9
22
+ validation_size: 32
23
+ normalize_state: false
24
+ normalize_action: true
25
+ train_slice_mode: random
26
+ val_slice_mode: exhaustive
27
+ stride: 1
28
+ random_seed: 42
29
+ validation_fixed_subset_path: null
30
+ validation_fixed_subset_size: null
31
+ validation_fixed_subset_seed: 42
32
+ data_path: lerobot/fractal20220817_data
33
+ root: ${oc.env:RT1_DATA_ROOT,/wuji-vepfs/wuji-il/huangsiqiao/nano-world-model-data/rt1_fractal}
34
+ image_key: observation.images.image
35
+ name: rt1
36
+ frame_interval: 1
37
+ spec:
38
+ action_dim: 7
39
+ experiment:
40
+ name: train
41
+ tasks:
42
+ - training
43
+ resume_from_checkpoint: null
44
+ pretrained: null
45
+ training:
46
+ optimizer:
47
+ lr: 0.0001
48
+ weight_decay: 0.01
49
+ lr_warmup_steps: 1000
50
+ max_steps: 50000
51
+ batch_size: 8
52
+ gradient_accumulation: 1
53
+ gradient_clip_norm: 0.1
54
+ gradient_clip_start_step: 20000
55
+ log_every: 100
56
+ val_every_n_steps: 1000
57
+ checkpointing:
58
+ across_timesteps:
59
+ every_n_train_steps: 10000
60
+ save_top_k: -1
61
+ save_on_train_epoch_end: true
62
+ save_weights_only: false
63
+ filename: '{epoch}-{step}'
64
+ latest:
65
+ every_n_train_steps: 1000
66
+ save_top_k: 1
67
+ save_on_train_epoch_end: false
68
+ save_weights_only: false
69
+ filename: latest-{epoch}-{step}
70
+ evaluation:
71
+ validation_size: 32
72
+ save_videos: true
73
+ metrics:
74
+ evaluate: true
75
+ log_every_n_train_steps: 5000
76
+ buffer_size: 32
77
+ max_batchsize: 2
78
+ i3d_model_path: ${oc.env:PRETRAINED_MODELS_DIR,pretrained_models}/i3d/i3d_torchscript.pt
79
+ diffusion:
80
+ noise_schedule: squaredcos_cap_v2
81
+ diffusion_steps: 1000
82
+ pred_name: v
83
+ mode: diffusion_forcing
84
+ snr_gamma: 5.0
85
+ zero_terminal_snr: true
86
+ timestep_sampling: logit_normal
87
+ logit_normal_mean: 0.0
88
+ logit_normal_std: 1.0
89
+ history_stabilization_level: 0.02
90
+ infra:
91
+ mixed_precision: true
92
+ vae_precision: fp32
93
+ gradient_checkpointing: false
94
+ num_workers: 16
95
+ compile: true
96
+ seed: 3407
97
+ dataset_dir: ${oc.env:DATASET_DIR,./data}
98
+ csgo_data_dir: ${oc.env:CSGO_DATA_DIR,./data/csgo}
99
+ vae_model_path: ${oc.env:VAE_MODEL_PATH,stabilityai/sd-vae-ft-mse}
100
+ results_dir: ${oc.env:RESULTS_DIR,./results}
101
+ logger:
102
+ name: wandb
103
+ save_dir: ${hydra:runtime.output_dir}/tb
104
+ logger_name: nanowm
105
+ wandb:
106
+ enabled: true
107
+ entity: ${oc.env:WANDB_ENTITY,null}
108
+ project: nano-world-model-ablation
109
+ mode: ${oc.env:WANDB_MODE,online}
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8169cc27064d53c4f210271a0273d243898ff2d91a71a0220c7ba9bf60af270
3
+ size 159140872