knightnemo commited on
Commit
82b169a
·
verified ·
1 Parent(s): 3b1e493

Initial upload: pred_target ablation checkpoint

Browse files
Files changed (3) hide show
  1. README.md +72 -0
  2. config.yaml +109 -0
  3. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ tags:
4
+ - video-generation
5
+ - world-model
6
+ - diffusion
7
+ - diffusion-forcing
8
+ - ablation
9
+ datasets:
10
+ - lerobot/fractal20220817_data
11
+ ---
12
+
13
+ # NanoWM-B/2 · RT-1 · Ablation: pred_name = v
14
+
15
+ One of three checkpoints from the pred_target ablation on RT-1 fractal
16
+ (v-prediction arm). Each arm runs in its native schedule
17
+ environment — cosine + ZTSNR for v and x, linear + no-ZTSNR for epsilon
18
+ — so the comparison isolates the prediction target rather than
19
+ handicapping any one of them.
20
+
21
+ ## Run identity
22
+ - **wandb**: https://wandb.ai/better_guidance/nano-world-model-ablation/runs/jszbuh4m
23
+ - **launcher**: `src/scripts/ablation/pred_v.sh`
24
+ - **collection**: https://huggingface.co/collections/knightnemo/nano-world-model
25
+
26
+ ## Training setup
27
+ | Key | Value |
28
+ |---|---|
29
+ | Architecture | NanoWM-B/2 (12 layers, d=768, patch=2, 158.6M params) |
30
+ | Dataset | RT-1 fractal (`lerobot/fractal20220817_data`) |
31
+ | Frames × resolution | 4 × 256² → 4 × 32² latents (SD-VAE) |
32
+ | Context frames | 1 (sequential / self-forcing scheduling) |
33
+ | Action injection | additive (7-dim continuous) |
34
+ | Steps | 50,000 |
35
+ | Batch | 8/GPU × 8 × H20 = 64 effective |
36
+ | Optimizer | AdamW, lr 1e-4, wd 0.01, warmup 1000, grad clip 0.1 after 20k |
37
+ | Precision | bf16-mixed (params fp32), VAE fp32, `torch.compile` on |
38
+ | Seed | 3407 |
39
+
40
+ ## Diffusion setup
41
+ | Key | Value |
42
+ |---|---|
43
+ | pred_name | **v** |
44
+ | noise_schedule | `squaredcos_cap_v2` (cosine) |
45
+ | zero_terminal_snr | true |
46
+ | timestep_sampling | logit_normal (SD3-style, μ=0, σ=1) |
47
+ | snr_gamma | 5.0 (Min-SNR loss weighting) |
48
+ | diffusion_steps | 1000 train · 250 DDIM sample |
49
+ | history_stabilization_level (inference) | 0.02 |
50
+
51
+ ## Loading
52
+
53
+ ```bash
54
+ git clone git@github.com:knightnemo/nano-world-model.git
55
+ cd nano-world-model
56
+ huggingface-cli download knightnemo/nanowm-b2-rt1-abl-pred-v-50k --local-dir ./ckpt
57
+ ```
58
+
59
+ ```python
60
+ import sys
61
+ from omegaconf import OmegaConf
62
+ from safetensors.torch import load_file
63
+ sys.path.insert(0, "src")
64
+ from models import get_models
65
+
66
+ cfg = OmegaConf.load("ckpt/config.yaml")
67
+ cfg.experiment.infra.compile = False
68
+ model = get_models(cfg).eval()
69
+
70
+ state_dict = load_file("ckpt/model.safetensors")
71
+ model.load_state_dict(state_dict, strict=True) # 0 missing / 0 unexpected
72
+ ```
config.yaml ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model:
2
+ arch: NanoWM-B/2
3
+ name: NanoWM-B-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:275c096e120affd172552e83c848fac7e262596a8236b47cebdd6efc7e241259
3
+ size 634407072