azaracla commited on
Commit
79f39b3
·
verified ·
1 Parent(s): a7b84fd

Migrate policy to PolicyProcessorPipeline system

Browse files
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: lerobot/smolvla_base
3
+ datasets: unknown
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
+ This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
23
+ See the full documentation at [LeRobot Docs](https://huggingface.co/docs/lerobot/index).
24
+
25
+ ---
26
+
27
+ ## How to Get Started with the Model
28
+
29
+ For a complete walkthrough, see the [training guide](https://huggingface.co/docs/lerobot/il_robots#train-a-policy).
30
+ Below is the short version on how to train and run inference/eval:
31
+
32
+ ### Train from scratch
33
+
34
+ ```bash
35
+ lerobot-train \
36
+ --dataset.repo_id=${HF_USER}/<dataset> \
37
+ --policy.type=act \
38
+ --output_dir=outputs/train/<desired_policy_repo_id> \
39
+ --job_name=lerobot_training \
40
+ --policy.device=cuda \
41
+ --policy.repo_id=${HF_USER}/<desired_policy_repo_id>
42
+ --wandb.enable=true
43
+ ```
44
+
45
+ _Writes checkpoints to `outputs/train/<desired_policy_repo_id>/checkpoints/`._
46
+
47
+ ### Evaluate the policy/run inference
48
+
49
+ ```bash
50
+ lerobot-record \
51
+ --robot.type=so100_follower \
52
+ --dataset.repo_id=<hf_user>/eval_<dataset> \
53
+ --policy.path=<hf_user>/<desired_policy_repo_id> \
54
+ --episodes=10
55
+ ```
56
+
57
+ Prefix the dataset repo with **eval\_** and supply `--policy.path` pointing to a local or hub checkpoint.
58
+
59
+ ---
60
+
61
+ ## Model Details
62
+
63
+ - **License:** apache-2.0
config.json ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.image2": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 256,
16
+ 256
17
+ ]
18
+ },
19
+ "observation.image": {
20
+ "type": "VISUAL",
21
+ "shape": [
22
+ 3,
23
+ 256,
24
+ 256
25
+ ]
26
+ },
27
+ "observation.image3": {
28
+ "type": "VISUAL",
29
+ "shape": [
30
+ 3,
31
+ 256,
32
+ 256
33
+ ]
34
+ }
35
+ },
36
+ "output_features": {
37
+ "action": {
38
+ "type": "ACTION",
39
+ "shape": [
40
+ 6
41
+ ]
42
+ }
43
+ },
44
+ "device": "cuda",
45
+ "use_amp": false,
46
+ "push_to_hub": true,
47
+ "repo_id": null,
48
+ "private": null,
49
+ "tags": null,
50
+ "license": null,
51
+ "chunk_size": 50,
52
+ "n_action_steps": 50,
53
+ "normalization_mapping": {
54
+ "VISUAL": "IDENTITY",
55
+ "STATE": "MEAN_STD",
56
+ "ACTION": "MEAN_STD"
57
+ },
58
+ "max_state_dim": 32,
59
+ "max_action_dim": 32,
60
+ "resize_imgs_with_padding": [
61
+ 512,
62
+ 512
63
+ ],
64
+ "empty_cameras": 0,
65
+ "adapt_to_pi_aloha": false,
66
+ "use_delta_joint_actions_aloha": false,
67
+ "tokenizer_max_length": 48,
68
+ "num_steps": 10,
69
+ "use_cache": true,
70
+ "freeze_vision_encoder": true,
71
+ "train_expert_only": true,
72
+ "train_state_proj": true,
73
+ "optimizer_lr": 0.0001,
74
+ "optimizer_betas": [
75
+ 0.9,
76
+ 0.95
77
+ ],
78
+ "optimizer_eps": 1e-08,
79
+ "optimizer_weight_decay": 1e-10,
80
+ "optimizer_grad_clip_norm": 10,
81
+ "scheduler_warmup_steps": 1000,
82
+ "scheduler_decay_steps": 30000,
83
+ "scheduler_decay_lr": 2.5e-06,
84
+ "vlm_model_name": "HuggingFaceTB/SmolVLM2-500M-Video-Instruct",
85
+ "load_vlm_weights": true,
86
+ "add_image_special_tokens": false,
87
+ "attention_mode": "cross_attn",
88
+ "prefix_length": 0,
89
+ "pad_language_to": "max_length",
90
+ "num_expert_layers": 0,
91
+ "num_vlm_layers": 16,
92
+ "self_attn_every_n_layers": 2,
93
+ "expert_width_multiplier": 0.75,
94
+ "min_period": 0.004,
95
+ "max_period": 4.0
96
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cd549ac2351fb069c0ddb3c34ad2d09cfc92b56a15dccdfc2e41467aaca01eb
3
+ size 906712520
policy_postprocessor.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_postprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "unnormalizer_processor",
6
+ "config": {
7
+ "eps": 1e-08,
8
+ "features": {
9
+ "action": {
10
+ "type": "ACTION",
11
+ "shape": [
12
+ 6
13
+ ]
14
+ }
15
+ },
16
+ "norm_map": {
17
+ "VISUAL": "IDENTITY",
18
+ "STATE": "MEAN_STD",
19
+ "ACTION": "MEAN_STD"
20
+ }
21
+ },
22
+ "state_file": "policy_postprocessor_step_0_unnormalizer_processor.safetensors"
23
+ },
24
+ {
25
+ "registry_name": "device_processor",
26
+ "config": {
27
+ "device": "cpu",
28
+ "float_dtype": null
29
+ }
30
+ }
31
+ ]
32
+ }
policy_postprocessor_step_0_unnormalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:490ab239d96e263687c0b2e386a0afbc235a2eceb9857c36ed32f2f162a3e7c8
3
+ size 640
policy_preprocessor.json ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_preprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "rename_observations_processor",
6
+ "config": {
7
+ "rename_map": {}
8
+ }
9
+ },
10
+ {
11
+ "registry_name": "to_batch_processor",
12
+ "config": {}
13
+ },
14
+ {
15
+ "registry_name": "smolvla_new_line_processor",
16
+ "config": {}
17
+ },
18
+ {
19
+ "registry_name": "tokenizer_processor",
20
+ "config": {
21
+ "max_length": 48,
22
+ "task_key": "task",
23
+ "padding_side": "right",
24
+ "padding": "max_length",
25
+ "truncation": true,
26
+ "tokenizer_name": "HuggingFaceTB/SmolVLM2-500M-Video-Instruct"
27
+ }
28
+ },
29
+ {
30
+ "registry_name": "device_processor",
31
+ "config": {
32
+ "device": "cuda",
33
+ "float_dtype": null
34
+ }
35
+ },
36
+ {
37
+ "registry_name": "normalizer_processor",
38
+ "config": {
39
+ "eps": 1e-08,
40
+ "features": {
41
+ "observation.state": {
42
+ "type": "STATE",
43
+ "shape": [
44
+ 6
45
+ ]
46
+ },
47
+ "observation.image2": {
48
+ "type": "VISUAL",
49
+ "shape": [
50
+ 3,
51
+ 256,
52
+ 256
53
+ ]
54
+ },
55
+ "observation.image": {
56
+ "type": "VISUAL",
57
+ "shape": [
58
+ 3,
59
+ 256,
60
+ 256
61
+ ]
62
+ },
63
+ "observation.image3": {
64
+ "type": "VISUAL",
65
+ "shape": [
66
+ 3,
67
+ 256,
68
+ 256
69
+ ]
70
+ },
71
+ "action": {
72
+ "type": "ACTION",
73
+ "shape": [
74
+ 6
75
+ ]
76
+ }
77
+ },
78
+ "norm_map": {
79
+ "VISUAL": "IDENTITY",
80
+ "STATE": "MEAN_STD",
81
+ "ACTION": "MEAN_STD"
82
+ }
83
+ },
84
+ "state_file": "policy_preprocessor_step_5_normalizer_processor.safetensors"
85
+ }
86
+ ]
87
+ }
policy_preprocessor_step_5_normalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:490ab239d96e263687c0b2e386a0afbc235a2eceb9857c36ed32f2f162a3e7c8
3
+ size 640