Robotics
LeRobot
Safetensors
smolvla
taewonkoo commited on
Commit
ca70457
·
verified ·
1 Parent(s): a956259

Upload model card and train config

Browse files
Files changed (2) hide show
  1. README.md +173 -0
  2. train_config.json +306 -0
README.md ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: lerobot/smolvla_base
3
+ datasets: taewonkoo/stack_cube_v4_40ep
4
+ library_name: lerobot
5
+ license: apache-2.0
6
+ model_name: smolvla
7
+ pipeline_tag: robotics
8
+ tags:
9
+ - robotics
10
+ - lerobot
11
+ - smolvla
12
+ ---
13
+
14
+ # Model Card for smolvla
15
+
16
+ <!-- Provide a quick summary of what the model is/does. -->
17
+
18
+
19
+ [SmolVLA](https://huggingface.co/papers/2506.01844) is a compact, efficient vision-language-action model that achieves competitive performance at reduced computational costs and can be deployed on consumer-grade hardware.
20
+
21
+
22
+
23
+ <p align="center">
24
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/640e21ef3c82bd463ee5a76d/aooU0a3DMtYmy_1IWMaIM.png" alt="smolvla architecture" width="85%"/>
25
+ </p>
26
+
27
+
28
+ <!-- A short demo is worth more than any description! Record a GIF/video of the policy
29
+ running on your robot, upload it to this repo, and embed it here:
30
+ <p align="center">
31
+ <img src="https://huggingface.co/<hf_user>/<policy_repo_id>/resolve/main/demo.gif" width="60%"/>
32
+ </p>
33
+ -->
34
+
35
+ This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
36
+
37
+ Learn how to train and run it in the [LeRobot smolvla guide](https://huggingface.co/docs/lerobot/main/en/smolvla), or browse the [full documentation](https://huggingface.co/docs/lerobot/index).
38
+
39
+
40
+ ---
41
+
42
+ ## Model Details
43
+
44
+ - **License:** apache-2.0
45
+ - **Fine-tuned from:** [lerobot/smolvla_base](https://huggingface.co/lerobot/smolvla_base)
46
+ - **Robot type:** `so_follower`
47
+ - **Cameras:** `front`, `top`
48
+
49
+
50
+ ## Inputs & Outputs
51
+
52
+ The policy consumes these observation features and produces these action features.
53
+
54
+ **Inputs**
55
+
56
+ | Feature | Type | Shape |
57
+ | --- | --- | --- |
58
+ | `observation.state` | STATE | `(6,)` |
59
+ | `observation.images.camera1` | VISUAL | `(3, 256, 256)` |
60
+ | `observation.images.camera2` | VISUAL | `(3, 256, 256)` |
61
+ | `observation.images.camera3` | VISUAL | `(3, 256, 256)` |
62
+ | `observation.images.empty_camera_0` | VISUAL | `(3, 480, 640)` |
63
+
64
+ **Outputs**
65
+
66
+ | Feature | Type | Shape |
67
+ | --- | --- | --- |
68
+ | `action` | ACTION | `(6,)` |
69
+
70
+
71
+ ## Training Dataset
72
+
73
+ - **Repository:** [taewonkoo/stack_cube_v4_40ep](https://huggingface.co/datasets/taewonkoo/stack_cube_v4_40ep)
74
+ - **Episodes:** 40
75
+ - **Frames:** 13158
76
+ - **Frame rate:** 30 FPS
77
+ - **Task(s):** "Pick up the wooden cube and place it on top of the Rubik's Cube"
78
+
79
+ <a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=taewonkoo/stack_cube_v4_40ep">
80
+ <img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl.svg"/>
81
+ <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl-dark.svg"/>
82
+ </a>
83
+
84
+
85
+ ## Training Configuration
86
+
87
+ | Setting | Value |
88
+ | --- | --- |
89
+ | Training steps | 30000 |
90
+ | Batch size | 4 |
91
+ | Optimizer | adamw |
92
+ | Learning rate | 0.0001 |
93
+ | Seed | 1000 |
94
+ | LeRobot version | 0.6.2 |
95
+
96
+ ---
97
+
98
+ ## How to Get Started with the Model
99
+
100
+ New to LeRobot? These guides cover the full workflow:
101
+
102
+ - **[Install LeRobot](https://huggingface.co/docs/lerobot/main/en/installation)** — set up the `lerobot` package.
103
+ - **[Hardware setup](https://huggingface.co/docs/lerobot/main/en/hardware_guide)** — assemble, wire, and calibrate your robot and cameras.
104
+ - **[Record data & train a policy](https://huggingface.co/docs/lerobot/en/il_robots)** — the end-to-end imitation-learning walkthrough.
105
+ - **[CLI cheat-sheet](https://huggingface.co/docs/lerobot/main/en/cheat-sheet)** — quick reference for the `lerobot-*` commands.
106
+
107
+ The short version to run and train this policy:
108
+
109
+ ### Run the policy on your robot
110
+
111
+ ```bash
112
+ lerobot-rollout \
113
+ --strategy.type=base \
114
+ --robot.type=so_follower \
115
+ --robot.port=<your_robot_port> \
116
+ --robot.cameras="{ <camera_1>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}, <camera_2>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}}" \
117
+ --policy.path=taewonkoo/stack_cube_v4_40ep \
118
+ --task="Pick up the wooden cube and place it on top of the Rubik's Cube" \
119
+ --duration=60
120
+ ```
121
+
122
+ Replace the remaining `<...>` placeholders with your own values: `--robot.port` and the camera names/indices are specific to your machine, and the camera names must match the observation keys this policy was trained on.
123
+
124
+ When `--strategy.type=base` is used the script doesn't record the episodes. Skipping duration will make the policy run indefinitely. For more information look at [rollout documentation](https://huggingface.co/docs/lerobot/main/en/inference).
125
+
126
+ ### Train your own policy
127
+
128
+ This policy type is usually fine-tuned from the pretrained base model [lerobot/smolvla_base](https://huggingface.co/lerobot/smolvla_base):
129
+
130
+ ```bash
131
+ lerobot-train \
132
+ --dataset.repo_id=${HF_USER}/<dataset> \
133
+ --policy.path=lerobot/smolvla_base \
134
+ --output_dir=outputs/train/<policy_repo_id> \
135
+ --job_name=lerobot_training \
136
+ --policy.device=cuda \
137
+ --policy.repo_id=${HF_USER}/<policy_repo_id> \
138
+ --wandb.enable=true
139
+ ```
140
+
141
+ _Writes checkpoints to `outputs/train/<policy_repo_id>/checkpoints/`._
142
+
143
+ ---
144
+
145
+ ## Evaluation
146
+
147
+ <!-- Report real-robot results here: run the policy several times per task and count the
148
+ successes. Delete the "No evaluation results" line and fill in this table instead:
149
+
150
+ | Task | Trials | Successes | Success rate |
151
+ | ---- | ------ | --------- | ------------ |
152
+ | pick the lego brick | 10 | 8 | 80% |
153
+
154
+ Also worth noting: anything that affects difficulty (new object positions, lighting,
155
+ distractors, a different robot of the same type, ...).
156
+ -->
157
+
158
+ _No evaluation results have been provided for this policy yet._
159
+
160
+ ---
161
+
162
+ ## Citation
163
+
164
+ If you use this policy, please cite the method linked in the description above, along with LeRobot:
165
+
166
+ ```bibtex
167
+ @misc{cadene2024lerobot,
168
+ author = {Cadene, Remi and Alibert, Simon and Soare, Alexander and Gallouedec, Quentin and Zouitine, Adil and Palma, Steven and Kooijmans, Pepijn and Aractingi, Michel and Shukor, Mustafa and Aubakirova, Dana and Russi, Martino and Capuano, Francesco and Pascal, Caroline and Choghari, Jade and Moss, Jess and Wolf, Thomas},
169
+ title = {LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch},
170
+ howpublished = "\url{https://github.com/huggingface/lerobot}",
171
+ year = {2024}
172
+ }
173
+ ```
train_config.json ADDED
@@ -0,0 +1,306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "taewonkoo/stack_cube_v4_40ep",
4
+ "repo_type": "dataset",
5
+ "root": null,
6
+ "episodes": null,
7
+ "exclude_episodes": null,
8
+ "image_transforms": {
9
+ "enable": false,
10
+ "max_num_transforms": 3,
11
+ "random_order": false,
12
+ "tfs": {
13
+ "brightness": {
14
+ "weight": 1.0,
15
+ "type": "ColorJitter",
16
+ "kwargs": {
17
+ "brightness": [
18
+ 0.8,
19
+ 1.2
20
+ ]
21
+ }
22
+ },
23
+ "contrast": {
24
+ "weight": 1.0,
25
+ "type": "ColorJitter",
26
+ "kwargs": {
27
+ "contrast": [
28
+ 0.8,
29
+ 1.2
30
+ ]
31
+ }
32
+ },
33
+ "saturation": {
34
+ "weight": 1.0,
35
+ "type": "ColorJitter",
36
+ "kwargs": {
37
+ "saturation": [
38
+ 0.5,
39
+ 1.5
40
+ ]
41
+ }
42
+ },
43
+ "hue": {
44
+ "weight": 1.0,
45
+ "type": "ColorJitter",
46
+ "kwargs": {
47
+ "hue": [
48
+ -0.05,
49
+ 0.05
50
+ ]
51
+ }
52
+ },
53
+ "sharpness": {
54
+ "weight": 1.0,
55
+ "type": "SharpnessJitter",
56
+ "kwargs": {
57
+ "sharpness": [
58
+ 0.5,
59
+ 1.5
60
+ ]
61
+ }
62
+ },
63
+ "affine": {
64
+ "weight": 1.0,
65
+ "type": "RandomAffine",
66
+ "kwargs": {
67
+ "degrees": [
68
+ -5.0,
69
+ 5.0
70
+ ],
71
+ "translate": [
72
+ 0.05,
73
+ 0.05
74
+ ]
75
+ }
76
+ }
77
+ }
78
+ },
79
+ "revision": "76041c4f590eafb9b95c68dcf6cc91dc7211d549",
80
+ "use_imagenet_stats": true,
81
+ "video_backend": "torchcodec",
82
+ "return_uint8": false,
83
+ "depth_output_unit": "mm",
84
+ "streaming": false,
85
+ "eval_split": 0.0
86
+ },
87
+ "env": null,
88
+ "policy": {
89
+ "type": "smolvla",
90
+ "n_obs_steps": 1,
91
+ "input_features": {
92
+ "observation.state": {
93
+ "type": "STATE",
94
+ "shape": [
95
+ 6
96
+ ]
97
+ },
98
+ "observation.images.camera1": {
99
+ "type": "VISUAL",
100
+ "shape": [
101
+ 3,
102
+ 256,
103
+ 256
104
+ ]
105
+ },
106
+ "observation.images.camera2": {
107
+ "type": "VISUAL",
108
+ "shape": [
109
+ 3,
110
+ 256,
111
+ 256
112
+ ]
113
+ },
114
+ "observation.images.camera3": {
115
+ "type": "VISUAL",
116
+ "shape": [
117
+ 3,
118
+ 256,
119
+ 256
120
+ ]
121
+ },
122
+ "observation.images.empty_camera_0": {
123
+ "type": "VISUAL",
124
+ "shape": [
125
+ 3,
126
+ 480,
127
+ 640
128
+ ]
129
+ }
130
+ },
131
+ "output_features": {
132
+ "action": {
133
+ "type": "ACTION",
134
+ "shape": [
135
+ 6
136
+ ]
137
+ }
138
+ },
139
+ "device": "cuda",
140
+ "use_amp": false,
141
+ "use_peft": false,
142
+ "push_to_hub": true,
143
+ "repo_id": "taewonkoo/stack_cube_v4_40ep",
144
+ "private": false,
145
+ "tags": null,
146
+ "license": "apache-2.0",
147
+ "pretrained_path": "lerobot/smolvla_base",
148
+ "pretrained_revision": "c83c3163b8ca9b7e67c509fffd9121e66cb96205",
149
+ "chunk_size": 50,
150
+ "n_action_steps": 50,
151
+ "normalization_mapping": {
152
+ "VISUAL": "IDENTITY",
153
+ "STATE": "MEAN_STD",
154
+ "ACTION": "MEAN_STD"
155
+ },
156
+ "max_state_dim": 32,
157
+ "max_action_dim": 32,
158
+ "resize_imgs_with_padding": [
159
+ 512,
160
+ 512
161
+ ],
162
+ "empty_cameras": 1,
163
+ "adapt_to_pi_aloha": false,
164
+ "use_delta_joint_actions_aloha": false,
165
+ "tokenizer_max_length": 48,
166
+ "num_steps": 10,
167
+ "use_cache": true,
168
+ "freeze_vision_encoder": true,
169
+ "train_expert_only": true,
170
+ "train_state_proj": true,
171
+ "optimizer_lr": 0.0001,
172
+ "optimizer_betas": [
173
+ 0.9,
174
+ 0.95
175
+ ],
176
+ "optimizer_eps": 1e-08,
177
+ "optimizer_weight_decay": 1e-10,
178
+ "optimizer_grad_clip_norm": 10.0,
179
+ "scheduler_warmup_steps": 1000,
180
+ "scheduler_decay_steps": 30000,
181
+ "scheduler_decay_lr": 2.5e-06,
182
+ "vlm_model_name": "HuggingFaceTB/SmolVLM2-500M-Video-Instruct",
183
+ "load_vlm_weights": true,
184
+ "add_image_special_tokens": false,
185
+ "attention_mode": "cross_attn",
186
+ "prefix_length": 0,
187
+ "pad_language_to": "max_length",
188
+ "num_expert_layers": 0,
189
+ "num_vlm_layers": 16,
190
+ "self_attn_every_n_layers": 2,
191
+ "expert_width_multiplier": 0.75,
192
+ "min_period": 0.004,
193
+ "max_period": 4.0,
194
+ "rtc_config": null,
195
+ "compile_model": false,
196
+ "compile_mode": "max-autotune"
197
+ },
198
+ "reward_model": null,
199
+ "output_dir": "/home/bmil/TW/smolVLA/outputs/smolvla_stack_cube_v4_40ep_b4_30k",
200
+ "job_name": "smolvla_stack_cube_v4_40ep_b4_30k",
201
+ "resume": false,
202
+ "seed": 1000,
203
+ "cudnn_deterministic": true,
204
+ "num_workers": 2,
205
+ "batch_size": 4,
206
+ "prefetch_factor": 4,
207
+ "persistent_workers": true,
208
+ "dataloader_multiprocessing_context": "spawn",
209
+ "steps": 30000,
210
+ "env_eval_freq": 0,
211
+ "log_freq": 100,
212
+ "eval_steps": 0,
213
+ "max_eval_samples": 0,
214
+ "tolerance_s": 0.0001,
215
+ "save_checkpoint": true,
216
+ "save_freq": 5000,
217
+ "checkpoint_format": "safetensors",
218
+ "use_policy_training_preset": true,
219
+ "optimizer": {
220
+ "type": "adamw",
221
+ "lr": 0.0001,
222
+ "weight_decay": 1e-10,
223
+ "grad_clip_norm": 10.0,
224
+ "betas": [
225
+ 0.9,
226
+ 0.95
227
+ ],
228
+ "eps": 1e-08
229
+ },
230
+ "scheduler": {
231
+ "type": "cosine_decay_with_warmup",
232
+ "num_warmup_steps": 1000,
233
+ "num_decay_steps": 30000,
234
+ "peak_lr": 0.0001,
235
+ "decay_lr": 2.5e-06
236
+ },
237
+ "parallelism": {
238
+ "dp_replicate": 1,
239
+ "dp_shard": 1,
240
+ "context_parallel": {
241
+ "ring_degree": 1,
242
+ "ulysses_degree": 1
243
+ },
244
+ "cfg_parallel": 1
245
+ },
246
+ "accelerator": {
247
+ "mixed_precision": "no",
248
+ "gradient_accumulation": {
249
+ "steps": 1
250
+ },
251
+ "fsdp": {
252
+ "reshard_after_forward": true,
253
+ "wrap_modules": null,
254
+ "min_num_params": null,
255
+ "cpu_offload": false,
256
+ "ignored_modules": null
257
+ },
258
+ "ddp": {
259
+ "find_unused_parameters": true,
260
+ "gradient_as_bucket_view": false,
261
+ "static_graph": false
262
+ },
263
+ "compile": {
264
+ "enabled": false,
265
+ "backend": "inductor",
266
+ "mode": null,
267
+ "regional": true
268
+ },
269
+ "activation_checkpointing": {
270
+ "mode": "none"
271
+ }
272
+ },
273
+ "eval": {
274
+ "n_episodes": 50,
275
+ "batch_size": 22,
276
+ "use_async_envs": true,
277
+ "recording": false,
278
+ "recording_repo_id": null,
279
+ "recording_private": false
280
+ },
281
+ "wandb": {
282
+ "enable": true,
283
+ "disable_artifact": true,
284
+ "project": "smolvla-stack-cube-stop-noise",
285
+ "entity": "taewon-koo-sungkyunkwan-university",
286
+ "notes": "Independent SmolVLA fine-tune; batch=4, steps=30000, seed=1000, frozen VLM; dataset revision 76041c4f590eafb9b95c68dcf6cc91dc7211d549",
287
+ "run_id": "ps3csvbq",
288
+ "mode": "online",
289
+ "add_tags": true
290
+ },
291
+ "peft": null,
292
+ "job": {
293
+ "target": null,
294
+ "image": "huggingface/lerobot-gpu:latest",
295
+ "timeout": "2d",
296
+ "detach": false,
297
+ "tags": []
298
+ },
299
+ "save_checkpoint_to_hub": false,
300
+ "sample_weighting": null,
301
+ "rename_map": {
302
+ "observation.images.front": "observation.images.camera1",
303
+ "observation.images.top": "observation.images.camera2"
304
+ },
305
+ "checkpoint_path": null
306
+ }