Robotics
LeRobot
Safetensors
smolvla
ulasZoi commited on
Commit
4cdc2aa
·
verified ·
1 Parent(s): e7d9d3a

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +170 -0
  2. config.json +86 -0
  3. model.safetensors +3 -0
  4. train_config.json +241 -0
README.md ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: lerobot/smolvla_base
3
+ datasets: ulasZoi/smolvla_pickcube_all
4
+ library_name: lerobot
5
+ license: apache-2.0
6
+ model_name: smolvla
7
+ pipeline_tag: robotics
8
+ tags:
9
+ - lerobot
10
+ - smolvla
11
+ - robotics
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`
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.front` | VISUAL | `(3, 480, 640)` |
60
+
61
+ **Outputs**
62
+
63
+ | Feature | Type | Shape |
64
+ | --- | --- | --- |
65
+ | `action` | ACTION | `(6,)` |
66
+
67
+
68
+ ## Training Dataset
69
+
70
+ - **Repository:** [ulasZoi/smolvla_pickcube_all](https://huggingface.co/datasets/ulasZoi/smolvla_pickcube_all)
71
+ - **Episodes:** 243
72
+ - **Frames:** 76011
73
+ - **Frame rate:** 30 FPS
74
+ - **Task(s):** "pick up the cube"
75
+
76
+ <a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=ulasZoi/smolvla_pickcube_all">
77
+ <img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl.svg"/>
78
+ <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl-dark.svg"/>
79
+ </a>
80
+
81
+
82
+ ## Training Configuration
83
+
84
+ | Setting | Value |
85
+ | --- | --- |
86
+ | Training steps | 20000 |
87
+ | Batch size | 8 |
88
+ | Optimizer | adamw |
89
+ | Learning rate | 0.0001 |
90
+ | Seed | 1000 |
91
+ | LeRobot version | 0.6.1 |
92
+
93
+ ---
94
+
95
+ ## How to Get Started with the Model
96
+
97
+ New to LeRobot? These guides cover the full workflow:
98
+
99
+ - **[Install LeRobot](https://huggingface.co/docs/lerobot/main/en/installation)** — set up the `lerobot` package.
100
+ - **[Hardware setup](https://huggingface.co/docs/lerobot/main/en/hardware_guide)** — assemble, wire, and calibrate your robot and cameras.
101
+ - **[Record data & train a policy](https://huggingface.co/docs/lerobot/en/il_robots)** — the end-to-end imitation-learning walkthrough.
102
+ - **[CLI cheat-sheet](https://huggingface.co/docs/lerobot/main/en/cheat-sheet)** — quick reference for the `lerobot-*` commands.
103
+
104
+ The short version to run and train this policy:
105
+
106
+ ### Run the policy on your robot
107
+
108
+ ```bash
109
+ lerobot-rollout \
110
+ --strategy.type=base \
111
+ --robot.type=so_follower \
112
+ --robot.port=<your_robot_port> \
113
+ --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}}" \
114
+ --policy.path=ulasZoi/smolvla_pickcube_bs8 \
115
+ --task="pick up the cube" \
116
+ --duration=60
117
+ ```
118
+
119
+ 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.
120
+
121
+ 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).
122
+
123
+ ### Train your own policy
124
+
125
+ This policy type is usually fine-tuned from the pretrained base model [lerobot/smolvla_base](https://huggingface.co/lerobot/smolvla_base):
126
+
127
+ ```bash
128
+ lerobot-train \
129
+ --dataset.repo_id=${HF_USER}/<dataset> \
130
+ --policy.path=lerobot/smolvla_base \
131
+ --output_dir=outputs/train/<policy_repo_id> \
132
+ --job_name=lerobot_training \
133
+ --policy.device=cuda \
134
+ --policy.repo_id=${HF_USER}/<policy_repo_id> \
135
+ --wandb.enable=true
136
+ ```
137
+
138
+ _Writes checkpoints to `outputs/train/<policy_repo_id>/checkpoints/`._
139
+
140
+ ---
141
+
142
+ ## Evaluation
143
+
144
+ <!-- Report real-robot results here: run the policy several times per task and count the
145
+ successes. Delete the "No evaluation results" line and fill in this table instead:
146
+
147
+ | Task | Trials | Successes | Success rate |
148
+ | ---- | ------ | --------- | ------------ |
149
+ | pick the lego brick | 10 | 8 | 80% |
150
+
151
+ Also worth noting: anything that affects difficulty (new object positions, lighting,
152
+ distractors, a different robot of the same type, ...).
153
+ -->
154
+
155
+ _No evaluation results have been provided for this policy yet._
156
+
157
+ ---
158
+
159
+ ## Citation
160
+
161
+ If you use this policy, please cite the method linked in the description above, along with LeRobot:
162
+
163
+ ```bibtex
164
+ @misc{cadene2024lerobot,
165
+ 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},
166
+ title = {LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch},
167
+ howpublished = "\url{https://github.com/huggingface/lerobot}",
168
+ year = {2024}
169
+ }
170
+ ```
config.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "smolvla",
3
+ "n_obs_steps": 1,
4
+ "input_features": {
5
+ "observation.state": {
6
+ "type": "STATE",
7
+ "shape": [
8
+ 6
9
+ ]
10
+ },
11
+ "observation.images.front": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 480,
16
+ 640
17
+ ]
18
+ }
19
+ },
20
+ "output_features": {
21
+ "action": {
22
+ "type": "ACTION",
23
+ "shape": [
24
+ 6
25
+ ]
26
+ }
27
+ },
28
+ "device": "cuda",
29
+ "use_amp": false,
30
+ "use_peft": false,
31
+ "push_to_hub": true,
32
+ "repo_id": "ulasZoi/smolvla_pickcube_bs8",
33
+ "private": null,
34
+ "tags": null,
35
+ "license": null,
36
+ "pretrained_path": null,
37
+ "pretrained_revision": null,
38
+ "chunk_size": 50,
39
+ "n_action_steps": 50,
40
+ "normalization_mapping": {
41
+ "VISUAL": "IDENTITY",
42
+ "STATE": "MEAN_STD",
43
+ "ACTION": "MEAN_STD"
44
+ },
45
+ "max_state_dim": 32,
46
+ "max_action_dim": 32,
47
+ "resize_imgs_with_padding": [
48
+ 512,
49
+ 512
50
+ ],
51
+ "empty_cameras": 0,
52
+ "adapt_to_pi_aloha": false,
53
+ "use_delta_joint_actions_aloha": false,
54
+ "tokenizer_max_length": 48,
55
+ "num_steps": 10,
56
+ "use_cache": true,
57
+ "freeze_vision_encoder": true,
58
+ "train_expert_only": true,
59
+ "train_state_proj": true,
60
+ "optimizer_lr": 0.0001,
61
+ "optimizer_betas": [
62
+ 0.9,
63
+ 0.95
64
+ ],
65
+ "optimizer_eps": 1e-08,
66
+ "optimizer_weight_decay": 1e-10,
67
+ "optimizer_grad_clip_norm": 10,
68
+ "scheduler_warmup_steps": 1000,
69
+ "scheduler_decay_steps": 30000,
70
+ "scheduler_decay_lr": 2.5e-06,
71
+ "vlm_model_name": "HuggingFaceTB/SmolVLM2-500M-Video-Instruct",
72
+ "load_vlm_weights": false,
73
+ "add_image_special_tokens": false,
74
+ "attention_mode": "cross_attn",
75
+ "prefix_length": -1,
76
+ "pad_language_to": "longest",
77
+ "num_expert_layers": -1,
78
+ "num_vlm_layers": 16,
79
+ "self_attn_every_n_layers": 2,
80
+ "expert_width_multiplier": 0.75,
81
+ "min_period": 0.004,
82
+ "max_period": 4.0,
83
+ "rtc_config": null,
84
+ "compile_model": false,
85
+ "compile_mode": "max-autotune"
86
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a89d2ab93b6c06180726b38ab97df721e19d4f80e2a2407b7b64d0524ea7b1eb
3
+ size 1197789224
train_config.json ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "ulasZoi/smolvla_pickcube_all",
4
+ "repo_type": "dataset",
5
+ "root": null,
6
+ "episodes": null,
7
+ "image_transforms": {
8
+ "enable": false,
9
+ "max_num_transforms": 3,
10
+ "random_order": false,
11
+ "tfs": {
12
+ "brightness": {
13
+ "weight": 1.0,
14
+ "type": "ColorJitter",
15
+ "kwargs": {
16
+ "brightness": [
17
+ 0.8,
18
+ 1.2
19
+ ]
20
+ }
21
+ },
22
+ "contrast": {
23
+ "weight": 1.0,
24
+ "type": "ColorJitter",
25
+ "kwargs": {
26
+ "contrast": [
27
+ 0.8,
28
+ 1.2
29
+ ]
30
+ }
31
+ },
32
+ "saturation": {
33
+ "weight": 1.0,
34
+ "type": "ColorJitter",
35
+ "kwargs": {
36
+ "saturation": [
37
+ 0.5,
38
+ 1.5
39
+ ]
40
+ }
41
+ },
42
+ "hue": {
43
+ "weight": 1.0,
44
+ "type": "ColorJitter",
45
+ "kwargs": {
46
+ "hue": [
47
+ -0.05,
48
+ 0.05
49
+ ]
50
+ }
51
+ },
52
+ "sharpness": {
53
+ "weight": 1.0,
54
+ "type": "SharpnessJitter",
55
+ "kwargs": {
56
+ "sharpness": [
57
+ 0.5,
58
+ 1.5
59
+ ]
60
+ }
61
+ },
62
+ "affine": {
63
+ "weight": 1.0,
64
+ "type": "RandomAffine",
65
+ "kwargs": {
66
+ "degrees": [
67
+ -5.0,
68
+ 5.0
69
+ ],
70
+ "translate": [
71
+ 0.05,
72
+ 0.05
73
+ ]
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "revision": null,
79
+ "use_imagenet_stats": true,
80
+ "video_backend": "torchcodec",
81
+ "return_uint8": false,
82
+ "depth_output_unit": "mm",
83
+ "streaming": false,
84
+ "eval_split": 0.15
85
+ },
86
+ "env": null,
87
+ "policy": {
88
+ "type": "smolvla",
89
+ "n_obs_steps": 1,
90
+ "input_features": {
91
+ "observation.state": {
92
+ "type": "STATE",
93
+ "shape": [
94
+ 6
95
+ ]
96
+ },
97
+ "observation.images.front": {
98
+ "type": "VISUAL",
99
+ "shape": [
100
+ 3,
101
+ 480,
102
+ 640
103
+ ]
104
+ }
105
+ },
106
+ "output_features": {
107
+ "action": {
108
+ "type": "ACTION",
109
+ "shape": [
110
+ 6
111
+ ]
112
+ }
113
+ },
114
+ "device": "cuda",
115
+ "use_amp": false,
116
+ "use_peft": false,
117
+ "push_to_hub": true,
118
+ "repo_id": "ulasZoi/smolvla_pickcube_bs8",
119
+ "private": null,
120
+ "tags": null,
121
+ "license": null,
122
+ "pretrained_path": null,
123
+ "pretrained_revision": null,
124
+ "chunk_size": 50,
125
+ "n_action_steps": 50,
126
+ "normalization_mapping": {
127
+ "VISUAL": "IDENTITY",
128
+ "STATE": "MEAN_STD",
129
+ "ACTION": "MEAN_STD"
130
+ },
131
+ "max_state_dim": 32,
132
+ "max_action_dim": 32,
133
+ "resize_imgs_with_padding": [
134
+ 512,
135
+ 512
136
+ ],
137
+ "empty_cameras": 0,
138
+ "adapt_to_pi_aloha": false,
139
+ "use_delta_joint_actions_aloha": false,
140
+ "tokenizer_max_length": 48,
141
+ "num_steps": 10,
142
+ "use_cache": true,
143
+ "freeze_vision_encoder": true,
144
+ "train_expert_only": true,
145
+ "train_state_proj": true,
146
+ "optimizer_lr": 0.0001,
147
+ "optimizer_betas": [
148
+ 0.9,
149
+ 0.95
150
+ ],
151
+ "optimizer_eps": 1e-08,
152
+ "optimizer_weight_decay": 1e-10,
153
+ "optimizer_grad_clip_norm": 10,
154
+ "scheduler_warmup_steps": 1000,
155
+ "scheduler_decay_steps": 30000,
156
+ "scheduler_decay_lr": 2.5e-06,
157
+ "vlm_model_name": "HuggingFaceTB/SmolVLM2-500M-Video-Instruct",
158
+ "load_vlm_weights": false,
159
+ "add_image_special_tokens": false,
160
+ "attention_mode": "cross_attn",
161
+ "prefix_length": -1,
162
+ "pad_language_to": "longest",
163
+ "num_expert_layers": -1,
164
+ "num_vlm_layers": 16,
165
+ "self_attn_every_n_layers": 2,
166
+ "expert_width_multiplier": 0.75,
167
+ "min_period": 0.004,
168
+ "max_period": 4.0,
169
+ "rtc_config": null,
170
+ "compile_model": false,
171
+ "compile_mode": "max-autotune"
172
+ },
173
+ "reward_model": null,
174
+ "output_dir": "outputs/train/smolvla_pickcube_bs8",
175
+ "job_name": "smolvla_pickcube_bs8",
176
+ "resume": false,
177
+ "seed": 1000,
178
+ "cudnn_deterministic": false,
179
+ "num_workers": 4,
180
+ "batch_size": 8,
181
+ "prefetch_factor": 4,
182
+ "persistent_workers": true,
183
+ "dataloader_multiprocessing_context": "spawn",
184
+ "steps": 20000,
185
+ "env_eval_freq": 20000,
186
+ "log_freq": 200,
187
+ "eval_steps": 1000,
188
+ "max_eval_samples": 0,
189
+ "tolerance_s": 0.0001,
190
+ "save_checkpoint": true,
191
+ "save_freq": 1000,
192
+ "use_policy_training_preset": true,
193
+ "optimizer": {
194
+ "type": "adamw",
195
+ "lr": 0.0001,
196
+ "weight_decay": 1e-10,
197
+ "grad_clip_norm": 10,
198
+ "betas": [
199
+ 0.9,
200
+ 0.95
201
+ ],
202
+ "eps": 1e-08
203
+ },
204
+ "scheduler": {
205
+ "type": "cosine_decay_with_warmup",
206
+ "num_warmup_steps": 1000,
207
+ "num_decay_steps": 30000,
208
+ "peak_lr": 0.0001,
209
+ "decay_lr": 2.5e-06
210
+ },
211
+ "eval": {
212
+ "n_episodes": 50,
213
+ "batch_size": 8,
214
+ "use_async_envs": true,
215
+ "recording": false,
216
+ "recording_repo_id": null,
217
+ "recording_private": false
218
+ },
219
+ "wandb": {
220
+ "enable": false,
221
+ "disable_artifact": false,
222
+ "project": "lerobot",
223
+ "entity": null,
224
+ "notes": null,
225
+ "run_id": null,
226
+ "mode": null,
227
+ "add_tags": true
228
+ },
229
+ "peft": null,
230
+ "job": {
231
+ "target": null,
232
+ "image": "huggingface/lerobot-gpu:latest",
233
+ "timeout": "2d",
234
+ "detach": false,
235
+ "tags": []
236
+ },
237
+ "save_checkpoint_to_hub": false,
238
+ "sample_weighting": null,
239
+ "rename_map": {},
240
+ "checkpoint_path": null
241
+ }