VLA: robots that see, understand, and act|INEMA.CLUB-PRO

Lesson 5 · 18 min

Hands-on with LeRobot 0.6

LeRobot, from Hugging Face, puts data, policies, and commands for recording, training, and running in one place. In this lesson you train a real ACT policy for a few steps and end up with a checkpoint on disk. No robot and no account needed.

Start the lesson
A developer's desk with a laptop showing a training curve next to a small robotic arm and a USB camera.

In this lesson you will

  1. 1The record → train → eval → rollout cycle
  2. 2Train an ACT in 200 steps and find the checkpoint
  3. 3Read the loss in the log without fooling yourself
  4. 4How long it takes on GPU and on CPU

Goal: install LeRobot 0.6, train a small policy, and understand the record → train → run cycle.

01The LeRobot cycle

Four commands. The middle two don't need a robot. Click each one.

ACT = Action Chunking with Transformers: a small policy that returns chunks of actions, the idea from lesson 2.

Recording and running need the arm. Training and evaluating run on any computer.

02What you need to know before training

Click each step.

1. Installation 0.6

Since 0.6, the base package is lean: to train, install lerobot[training]. For simulation, use extras like [pusht] or [aloha].

Python 3.12 and PyTorch 2.7 or newer. Some options were renamed: eval_freq became env_eval_freq, and --dataset.vcodec became --dataset.rgb_encoder.vcodec.

03Train an ACT for 200 steps

Same venv as lesson 4. Swap cuda for cpu if you don't have an NVIDIA GPU.

Terminal · short training run
lerobot-train \
  --policy.type=act \
  --dataset.repo_id=lerobot/pusht \
  --steps=200 \
  --save_freq=200 \
  --log_freq=50 \
  --batch_size=8 \
  --policy.device=cuda \
  --policy.push_to_hub=false \
  --wandb.enable=false \
  --output_dir=outputs/train/act_pusht_teste \
  --job_name=act_pusht_teste
Terminal · check the checkpoint
ls outputs/train/act_pusht_teste/checkpoints/
ls outputs/train/act_pusht_teste/checkpoints/last/pretrained_model/
With the SO-101 (from the docs, needs the arm)
lerobot-record \
  --robot.type=so101_follower \
  --robot.port=<follower port> \
  --teleop.type=so101_leader \
  --teleop.port=<leader port> \
  --dataset.repo_id=<your username>/meu-dataset \
  --dataset.num_episodes=5 \
  --dataset.single_task="Pick up the black cube" \
  --dataset.streaming_encoding=true \
  --dataset.encoder_threads=2
Example from the repository
INFO ... cfg.steps=200 (200)
INFO ... dataset.num_frames=25650 (26K)
INFO ... dataset.num_episodes=206
INFO ... num_learnable_params=51588994 (52M)
INFO ... step:50 ... loss:14.587 ...
INFO ... step:100 ... loss:4.694 ...
INFO ... step:150 ... loss:3.878 ...
INFO ... step:200 ... loss:3.473 ... mem_gb:0.95
INFO ... Checkpoint policy after step 200
INFO ... End of training

$ ls outputs/train/act_pusht_teste/checkpoints/
000200  last

$ ls outputs/train/act_pusht_teste/checkpoints/last/pretrained_model/
config.json  model.safetensors  policy_postprocessor.json ...
train_config.json

LeRobot 0.6.1, NVIDIA GB10 GPU: 26 s total. CPU only: 321 s, final loss 3.536. Lines shortened with "...". The first time, it also downloads the ResNet-18 weights that ACT uses for vision.

04Exercise: your first checkpoint

About 5 minutes on CPU, under 1 minute on GPU.

E1 · Train for 200 steps

15 min

Run the lerobot-train from the panel (with cpu or cuda). Time it.

Done when: ls outputs/train/act_pusht_teste/checkpoints/ shows 000200 and last.

E2 · Read the loss

5 min

In the log, find the step:50 and step:200 lines and write down both losses.

Done when: the loss at step 200 is lower than at step 50, and you noted how long the training took on your machine.

E3 · More steps (optional, with a GPU)

15 min

Repeat with --steps=5000 --save_freq=5000 --batch_size=32 and a different --output_dir. Keep the checkpoint: lesson 6 compares the two.

Done when: the checkpoints/005000 folder exists (here it took 474 s on the GPU, with a final loss of 0.329).

05Test what you learned

The explanation appears after your answer.

Question 1 of 4

Which commands in the cycle run without a robot?skill

06Summary

Four commandsrecord, train, eval, rollout. Train and eval don't need a robot.
Installation 0.6lerobot[training], Python 3.12, push_to_hub=false to train without an account.
Real time200 steps: 26 s on GPU, 5 min on CPU here. Real training: hours.

Sources for this lesson

Previous lessonNext lesson