Instructions to use dhruv1672/smolvla-so101-peg-insertion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use dhruv1672/smolvla-so101-peg-insertion with LeRobot:
# See https://github.com/huggingface/lerobot?tab=readme-ov-file#installation for more details git clone https://github.com/huggingface/lerobot.git cd lerobot pip install -e .[smolvla]
# Launch finetuning on your dataset python lerobot/scripts/train.py \ --policy.path=dhruv1672/smolvla-so101-peg-insertion \ --dataset.repo_id=lerobot/svla_so101_pickplace \ --batch_size=64 \ --steps=20000 \ --output_dir=outputs/train/my_smolvla \ --job_name=my_smolvla_training \ --policy.device=cuda \ --wandb.enable=true
# Run the policy using the record function python -m lerobot.record \ --robot.type=so101_follower \ --robot.port=/dev/ttyACM0 \ # <- Use your port --robot.id=my_blue_follower_arm \ # <- Use your robot id --robot.cameras="{ front: {type: opencv, index_or_path: 8, width: 640, height: 480, fps: 30}}" \ # <- Use your cameras --dataset.single_task="Grasp a lego block and put it in the bin." \ # <- Use the same task description you used in your dataset recording --dataset.repo_id=HF_USER/dataset_name \ # <- This will be the dataset name on HF Hub --dataset.episode_time_s=50 \ --dataset.num_episodes=10 \ --policy.path=dhruv1672/smolvla-so101-peg-insertion - Notebooks
- Google Colab
- Kaggle
SmolVLA fine-tuned for SO-101 peg-in-hole (Isaac Sim)
Research checkpoints from a robotics simulation take-home: lerobot/smolvla_base (revision
d9f33c94a60fb382c90dea2164c96845bd955e28) fine-tuned on scripted-expert demonstrations of an SO-101 arm inserting a
held 20 mm peg into a blind hole in Isaac Sim 6.0.1 / Isaac Lab 3.0.
Status: none of these is a working insertion policy yet. All are well below the scripted expert at tight clearances. Published for reproducibility of the reported experiments.
Code: https://github.com/pateldhruv1672/so-101 · Data: https://huggingface.co/datasets/dhruv1672/so101-isaac-sim-peg-insertion-task
Revisions
| Revision (branch / tag) | Model | Training data | Closed-loop quality |
|---|---|---|---|
main / ckpt-020000 |
absolute joint targets, 20k steps | original 533 episodes (dataset v3.0-533ep) |
1.5 mm: 1/10 and 2/10 in two runs (expert 10/10) |
relative-020000 / relative-ckpt-020000 |
chunk-relative arm targets, 20k steps (best so far) | original 533 episodes | tight fresh scenes 9/30, 1.5 mm 4/10 |
relative-expertv3-005000 / relative-expertv3-ckpt-005000 |
relative 020000 + 5k steps, frozen vision | 154 tight-clearance expert episodes (dataset v3.0, episodes 533-686) |
tight fresh scenes 3/30 (worse, a negative result) |
relative-combined-vision-005000 / relative-combined-vision-ckpt-005000 |
relative 020000 + 5k steps, last vision block trainable | all 687 episodes (dataset v3.0) |
15 fresh tight scenes 3/15 (filtered relative-020000 5/15; no improvement) |
A later model trained from the original base with the whole vision encoder trainable, on new pan-shaped demonstrations, has its own repository: dhruv1672/smolvla-so101-peg-insertion-pan-shaped. Every closed-loop episode behind the numbers below (436 records across 12 test runs, with per-step joint commands and peg-tip trajectories) is in the private dataset repository dhruv1672/so101-peg-insertion-eval-results.
from lerobot.policies.smolvla.modeling_smolvla import SmolVLAPolicy
policy = SmolVLAPolicy.from_pretrained("dhruv1672/smolvla-so101-peg-insertion", revision="relative-020000")
Each branch has its own model card with training details. The files on main are the absolute-action checkpoint
described below.
Closed-loop results, all revisions
Isaac Sim GUI, four independent robots in one scene on a shared physics clock, matched scenes and noise seeds per comparison. Success = peg tip at least 20 mm inside the hole within 20 s.
Tight clearances, 30 fresh scenes (10 per clearance, training randomization ranges, nominal lighting):
| Policy | 0.5 mm | 0.75 mm | 1.0 mm | Total |
|---|---|---|---|---|
| scripted expert (privileged pose) | 7/10 | 8/10 | 10/10 | 25/30 |
relative-020000 |
4/10 | 3/10 | 2/10 | 9/30 |
relative-expertv3-005000 |
1/10 | 1/10 | 1/10 | 3/30 |
relative-expertv3-005000 + Kalman action filter |
0/10 | 0/10 | 1/10 | 1/30 |
A partial repeat of the same scenes in a second simulator window (stopped early) gave relative-020000 2/17
(0.5 mm 2/10, 0.75 mm 0/7) and the expert 13/17, so run-to-run variation on these small sets is large.
Vision adaptation, 15 fresh tight scenes (5 per clearance): filtered relative-020000 with 20-candidate sampling 5/15, relative-combined-vision-005000 3/15, the same plus sampling and filter 2/15, expert 11/15.
1.0 mm, 6 scenes (3 seen, 3 fresh), ramped reset: relative-020000 1/6 unfiltered (violent pan shake in 2 episodes) and 2/6 with the Kalman filter; the pan-shaped model's 10k-update checkpoint 2/6 and 1/6 (details in its repository).
1.5 mm, 10 matched scenes: expert 10/10, relative-020000 4/10, main (absolute) 2/10 in the same run (1/10 in an earlier run).
Seen vs fresh scenes, relative-020000, 2 scenes per clearance x 8 clearances: 9/16 when replaying training
scenes vs 1/16 on fresh scenes (expert 16/16 vs 14/16): a large generalization gap on small samples.
Typical failure: the policy approaches like the expert, then descends while still about 1-3 mm off the hole axis, lands on the rim, pushes at 15-20 N and the peg slips in the gripper. Single-frame probes show its commands near the rim depend weakly on both camera images.
Absolute-action checkpoint on main (ckpt-020000)
A research checkpoint from a robotics simulation take-home: lerobot/smolvla_base (revision
d9f33c94a60fb382c90dea2164c96845bd955e28) fine-tuned on scripted-expert demonstrations of an SO-101 arm inserting a
held 20 mm peg into a blind hole (0.5 to 2.5 mm radial clearance) in Isaac Sim 6.0.1 / Isaac Lab 3.0.
Status: not a working insertion policy yet. It approaches the hole like the expert but cannot hold millimetre alignment while descending (see results). Published for reproducibility of the reported experiments.
Code: https://github.com/pateldhruv1672/so-101 · Data: https://huggingface.co/datasets/dhruv1672/so101-isaac-sim-peg-insertion-task
Interface
- 30 Hz control, absolute joint targets: 5 arm joints in degrees + gripper 0..100 (
observation.state/action, 6 floats). - Cameras:
observation.images.overheadandobservation.images.wrist, uint8 480x640 RGB. Training renamed them to the base model'scamera1(overhead) andcamera2(wrist); the bundled preprocessor applies that rename. - Task string: "Insert the peg into the hole." (the only prompt seen in training).
- Chunk size 50; deployed with
n_action_steps10. Gripper is held at 0 during evaluation.
Training
- Data: 533 successful demonstrations (187,270 frames), 28 held-out episodes (whole four-cell batches).
- 20,000 steps, batch 16, frozen vision encoder and VLM (
train_expert_only), 99.9M trainable parameters (action expert and projections). AdamW (0.9, 0.95), weight decay 0.01 on weight matrices only, grad clip 10, cosine LR 1e-4 to 2.5e-6 with 1k warmup, bf16 autocast, about 2.3 h on an RTX 5080 Laptop GPU (peak 5.8 GiB).
Results
Offline (held-out flow-matching loss on 84 observations from 28 episodes; first-10-action arm MAE):
| step | held-out loss | arm MAE |
|---|---|---|
| 2,500 | 0.0623 | 0.515 deg |
| 10,000 | 0.0364 | 0.234 deg |
| 20,000 | 0.0286 | 0.143 deg |
Closed loop, Isaac Sim, 1.5 mm clearance, 10 matched scenes (training randomization ranges, nominal lighting):
| policy | success |
|---|---|
| scripted expert (privileged target pose) | 10/10 |
| this checkpoint | 1/10 |
| this checkpoint, re-plan every 5 actions | 0/10 |
| this checkpoint, joint speed capped at the expert's | 0/10 |
Failure mode: approaches at the expert's pace and gets within about 1.3 mm of the hole axis, but the lateral error wanders 2 to 10 mm during descent (the expert holds 0.1 to 0.3 mm); the peg lands on the block top, presses at about 20 N and slips in the gripper. Likely cause under investigation: absolute joint targets normalized by dataset-wide statistics give too little resolution for millimetre motion. Language probes (paraphrase, negation, two coloured holes) have not been meaningfully evaluated: the model only ever saw one prompt and single-hole scenes.
Limitations
Simulation only; one embodiment; one prompt; nominal-lighting closed-loop evaluation; small evaluation sets.
The base model lerobot/smolvla_base is distributed under its own license; check it before reuse. No separate license
has been assigned to this fine-tune.
- Downloads last month
- 23
Model tree for dhruv1672/smolvla-so101-peg-insertion
Base model
HuggingFaceTB/SmolLM2-360M