Skip to content

Commit 39d5f50

Browse files
update model-libraries-snippets.ts adding smolvla
1 parent 2343fee commit 39d5f50

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,4 +1637,30 @@ audio = model.autoencoder.decode(codes)[0].cpu()
16371637
torchaudio.save("sample.wav", audio, model.autoencoder.sampling_rate)
16381638
`,
16391639
];
1640+
1641+
export const smolvla = (model: ModelData): string[] => [
1642+
`# Clone the LeRobot repository and create the environment
1643+
git clone https://github.com/huggingface/lerobot.git
1644+
cd lerobot
1645+
conda create -y -n lerobot python=3.10
1646+
conda activate lerobot
1647+
1648+
# Install ffmpeg (required for video processing)
1649+
conda install ffmpeg=7.1.1 -c conda-forge
1650+
1651+
# Install LeRobot with the SmolVLA extra dependencies
1652+
pip install -e ".[smolvla]"
1653+
1654+
# Launch finetuning on your dataset
1655+
cd lerobot && python lerobot/scripts/train.py \\
1656+
--policy.path=lerobot/smolvla_base \\
1657+
--dataset.repo_id=${model.id} \\
1658+
--batch_size=64 \\
1659+
--steps=20000 \\
1660+
--output_dir=outputs/train/my_smolvla \\
1661+
--job_name=my_smolvla_training \\
1662+
--policy.device=cuda \\
1663+
--wandb.enable=true`,
1664+
];
1665+
16401666
//#endregion

0 commit comments

Comments
 (0)