@@ -762,6 +762,47 @@ print(output)`);
762762 return snippets ;
763763} ;
764764
765+ export const lerobot = ( model : ModelData ) : string [ ] => {
766+ if ( model . tags . includes ( "smolvla" ) ) {
767+ const smolvlaSnippets = [
768+ // Installation snippet
769+ `# See https://github.com/huggingface/lerobot?tab=readme-ov-file#installation for more details
770+ git clone https://github.com/huggingface/lerobot.git
771+ cd lerobot
772+ pip install -e .[smolvla]` ,
773+ // Finetune snippet
774+ `# Launch finetuning on your dataset
775+ python lerobot/scripts/train.py \\
776+ --policy.path=${ model . id } \\
777+ --dataset.repo_id=lerobot/svla_so101_pickplace \\
778+ --batch_size=64 \\
779+ --steps=20000 \\
780+ --output_dir=outputs/train/my_smolvla \\
781+ --job_name=my_smolvla_training \\
782+ --policy.device=cuda \\
783+ --wandb.enable=true` ,
784+ ] ;
785+ if ( model . id !== "lerobot/smolvla_base" ) {
786+ // Inference snippet (only if not base model)
787+ smolvlaSnippets . push (
788+ `# Run the policy using the record function
789+ python -m lerobot.record \\
790+ --robot.type=so101_follower \\
791+ --robot.port=/dev/ttyACM0 \\ # <- Use your port
792+ --robot.id=my_blue_follower_arm \\ # <- Use your robot id
793+ --robot.cameras="{ front: {type: opencv, index_or_path: 8, width: 640, height: 480, fps: 30}}" \\ # <- Use your cameras
794+ --dataset.single_task="Grasp a lego block and put it in the bin." \\ # <- Use the same task description you used in your dataset recording
795+ --dataset.repo_id=HF_USER/dataset_name \\ # <- This will be the dataset name on HF Hub
796+ --dataset.episode_time_s=50 \\
797+ --dataset.num_episodes=10 \\
798+ --policy.path=${ model . id } `
799+ ) ;
800+ }
801+ return smolvlaSnippets ;
802+ }
803+ return [ ] ;
804+ } ;
805+
765806export const tf_keras = ( model : ModelData ) : string [ ] => [
766807 `# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy)
767808# See https://github.com/keras-team/tf-keras for more details.
0 commit comments