Upload 8 files
Browse files- .gitattributes +36 -35
- README.md +60 -0
- config.json +61 -0
- model.safetensors +3 -0
- policy_postprocessor.json +32 -0
- policy_postprocessor_step_0_unnormalizer_processor.safetensors +3 -0
- policy_preprocessor.json +87 -0
- policy_preprocessor_step_5_normalizer_processor.safetensors +3 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,36 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
collage_small.gif filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: robotics
|
| 3 |
+
tags:
|
| 4 |
+
- smolvla
|
| 5 |
+
library_name: lerobot
|
| 6 |
+
datasets:
|
| 7 |
+
- lerobot/svla_so101_pickplace
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
## SmolVLA: A vision-language-action model for affordable and efficient robotics
|
| 11 |
+
|
| 12 |
+
Resources and technical documentation:
|
| 13 |
+
|
| 14 |
+
[SmolVLA Paper](https://huggingface.co/papers/2506.01844)
|
| 15 |
+
|
| 16 |
+
[SmolVLA Blogpost](https://huggingface.co/blog/smolvla)
|
| 17 |
+
|
| 18 |
+
[Code](https://github.com/huggingface/lerobot/blob/main/lerobot/common/policies/smolvla/modeling_smolvla.py)
|
| 19 |
+
|
| 20 |
+
[Train using Google Colab Notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/lerobot/training-smolvla.ipynb#scrollTo=ZO52lcQtxseE)
|
| 21 |
+
|
| 22 |
+
[SmolVLA HF Documentation](https://huggingface.co/docs/lerobot/smolvla)
|
| 23 |
+
|
| 24 |
+
Designed by Hugging Face.
|
| 25 |
+
|
| 26 |
+
This model has 450M parameters in total.
|
| 27 |
+
You can use inside the [LeRobot library](https://github.com/huggingface/lerobot).
|
| 28 |
+
|
| 29 |
+
Before proceeding to the next steps, you need to properly install the environment by following [Installation Guide](https://huggingface.co/docs/lerobot/installation) on the docs.
|
| 30 |
+
|
| 31 |
+
Install smolvla extra dependencies:
|
| 32 |
+
```bash
|
| 33 |
+
pip install -e ".[smolvla]"
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
Example of finetuning the smolvla pretrained model (`smolvla_base`):
|
| 37 |
+
```bash
|
| 38 |
+
python lerobot/scripts/train.py \
|
| 39 |
+
--policy.path=lerobot/smolvla_base \
|
| 40 |
+
--dataset.repo_id=lerobot/svla_so101_pickplace \
|
| 41 |
+
--batch_size=64 \
|
| 42 |
+
--steps=20000 \
|
| 43 |
+
--output_dir=outputs/train/my_smolvla \
|
| 44 |
+
--job_name=my_smolvla_training \
|
| 45 |
+
--policy.device=cuda \
|
| 46 |
+
--wandb.enable=true
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
Example of finetuning the smolvla neural network with pretrained VLM and action expert
|
| 50 |
+
intialized from scratch:
|
| 51 |
+
```bash
|
| 52 |
+
python lerobot/scripts/train.py \
|
| 53 |
+
--dataset.repo_id=lerobot/svla_so101_pickplace \
|
| 54 |
+
--batch_size=64 \
|
| 55 |
+
--steps=200000 \
|
| 56 |
+
--output_dir=outputs/train/my_smolvla \
|
| 57 |
+
--job_name=my_smolvla_training \
|
| 58 |
+
--policy.device=cuda \
|
| 59 |
+
--wandb.enable=true
|
| 60 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "smolvla",
|
| 3 |
+
"n_obs_steps": 1,
|
| 4 |
+
"input_features": {
|
| 5 |
+
"observation.state": {
|
| 6 |
+
"type": "STATE",
|
| 7 |
+
6
|
| 8 |
+
]
|
| 9 |
+
},
|
| 10 |
+
"observation.images.camera1": {
|
| 11 |
+
"type": "VISUAL",
|
| 12 |
+
"shape": [
|
| 13 |
+
3,
|
| 14 |
+
256
|
| 15 |
+
]
|
| 16 |
+
},
|
| 17 |
+
"observation.images.camera2": {
|
| 18 |
+
"type": "VISUAL",
|
| 19 |
+
"shape": [
|
| 20 |
+
3,
|
| 21 |
+
256
|
| 22 |
+
]
|
| 23 |
+
},
|
| 24 |
+
"observation.images.camera3": {
|
| 25 |
+
"type": "VISUAL",
|
| 26 |
+
"shape": [
|
| 27 |
+
3,
|
| 28 |
+
]
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
"device": "cuda",
|
| 32 |
+
"use_amp": false,
|
| 33 |
+
"push_to_hub": true,
|
| 34 |
+
"repo_id": null,
|
| 35 |
+
"private": null,
|
| 36 |
+
"tags": null,
|
| 37 |
+
"license": 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 |
+
"scheduler_decay_lr": 2.5e-06,
|
| 49 |
+
"vlm_model_name": "HuggingFaceTB/SmolVLM2-500M-Video-Instruct",
|
| 50 |
+
"load_vlm_weights": true,
|
| 51 |
+
"add_image_special_tokens": false,
|
| 52 |
+
"attention_mode": "cross_attn",
|
| 53 |
+
"prefix_length": 0,
|
| 54 |
+
"pad_language_to": "max_length",
|
| 55 |
+
"num_expert_layers": 0,
|
| 56 |
+
"num_vlm_layers": 16,
|
| 57 |
+
"self_attn_every_n_layers": 2,
|
| 58 |
+
"expert_width_multiplier": 0.75,
|
| 59 |
+
"min_period": 0.004,
|
| 60 |
+
"max_period": 4.0
|
| 61 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f8dc071d5b933e79edd2b73b8d6b5cca482ef0437c099ea3ec13ab978a38fc8
|
| 3 |
+
size 906720008
|
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:809f43bfa90a2044165a0a25a43514ea64181e4d079b6be3ab8736e151a2f7d3
|
| 3 |
+
size 129
|
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:809f43bfa90a2044165a0a25a43514ea64181e4d079b6be3ab8736e151a2f7d3
|
| 3 |
+
size 129
|