import{s as Se,o as Be,n as Fe}from"../chunks/scheduler.eb244325.js";import{S as He,i as Qe,e as r,s as n,c as d,h as We,a as p,d as l,b as o,f as ve,g as M,j as m,k as Je,l as ee,m as a,n as f,t as h,o as y,p as b,q as Ze,r as Ye}from"../chunks/index.3fe63ad3.js";import{T as Xe}from"../chunks/Tip.8a9a4ce7.js";import{C as ze}from"../chunks/CopyLLMTxtMenu.08242e11.js";import{C as je}from"../chunks/CodeBlock.91baa5b4.js";import{H as le,E as Pe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.234c3f85.js";function De(q){let s,c="In your dataset, make sure to have enough demonstrations per each variation (e.g. the cube position on the table if it is cube pick-place task) you are introducing.",g,w,$='We recommend checking out the dataset linked below for reference that was used in the <a href="https://huggingface.co/papers/2506.01844" rel="nofollow">SmolVLA paper</a>:',J,u,A='🔗 <a href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=%2Flerobot%2Fsvla_so100_pickplace%2Fepisode_0" rel="nofollow">SVLA SO100 PickPlace</a>',T,U,L=`In this dataset, we recorded 50 episodes across 5 distinct cube positions. For each position, we collected 10 episodes of pick-and-place interactions. This structure, repeating each variation several times, helped the model generalize better. We tried similar dataset with 25 episodes, and it was not enough leading to a bad performance. So, the data quality and quantity is definitely a key.
After you have your dataset available on the Hub, you are good to go to use our finetuning script to adapt SmolVLA to your application.`;return{c(){s=r("p"),s.textContent=c,g=n(),w=r("p"),w.innerHTML=$,J=n(),u=r("p"),u.innerHTML=A,T=n(),U=r("p"),U.textContent=L},l(i){s=p(i,"P",{"data-svelte-h":!0}),m(s)!=="svelte-zn5ywj"&&(s.textContent=c),g=o(i),w=p(i,"P",{"data-svelte-h":!0}),m(w)!=="svelte-x33539"&&(w.innerHTML=$),J=o(i),u=p(i,"P",{"data-svelte-h":!0}),m(u)!=="svelte-1qy68a1"&&(u.innerHTML=A),T=o(i),U=p(i,"P",{"data-svelte-h":!0}),m(U)!=="svelte-1k3pii5"&&(U.textContent=L)},m(i,v){a(i,s,v),a(i,g,v),a(i,w,v),a(i,J,v),a(i,u,v),a(i,T,v),a(i,U,v)},p:Fe,d(i){i&&(l(s),l(g),l(w),l(J),l(u),l(T),l(U))}}}function qe(q){let s;return{c(){s=Ze(`You can start with a small batch size and increase it incrementally, if the
  GPU allows it, as long as loading times remain short.`)},l(c){s=Ye(c,`You can start with a small batch size and increase it incrementally, if the
  GPU allows it, as long as loading times remain short.`)},m(c,g){a(c,s,g)},d(c){c&&l(s)}}}function Oe(q){let s,c,g,w,$,J,u,A,T,U="SmolVLA is Hugging Face’s lightweight foundation model for robotics. Designed for easy fine-tuning on LeRobot datasets, it helps accelerate your development!",L,i,v=`<img src="https://cdn-uploads.huggingface.co/production/uploads/640e21ef3c82bd463ee5a76d/aooU0a3DMtYmy_1IWMaIM.png" alt="SmolVLA architecture." width="500"/> <br/> <em>Figure 1. SmolVLA takes as input (i) multiple cameras views, (ii) the
    robot’s current sensorimotor state, and (iii) a natural language
    instruction, encoded into contextual features used to condition the action
    expert when generating an action chunk.</em>`,ae,V,ne,j,O,Ie='<p>Install LeRobot by following our <a href="./installation">Installation Guide</a>.</p>',Ce,E,K,Ae="Install SmolVLA dependencies by running:",_e,G,oe,R,ie,x,Le=`SmolVLA is a base model, so fine-tuning on your own data is required for optimal performance in your setup.
We recommend recording ~50 episodes of your task as a starting point. Follow our guide to get started: <a href="./il_robots">Recording a Dataset</a>`,se,C,re,k,pe,N,Ve=`Use <a href="https://hf.co/lerobot/smolvla_base" rel="nofollow"><code>smolvla_base</code></a>, our pretrained 450M model, and fine-tune it on your data.
Training the model for 20k steps will roughly take ~4 hrs on a single A100 GPU. You should tune the number of steps based on performance and your use-case.`,me,X,Ee='If you don’t have a gpu device, you can train using our notebook on <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/lerobot/training-smolvla.ipynb" rel="nofollow"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Google Colab"/></a>',ue,S,Ge='Pass your dataset to the training script using <code>--dataset.repo_id</code>. If you want to test your installation, run the following command where we use one of the datasets we collected for the <a href="https://huggingface.co/papers/2506.01844" rel="nofollow">SmolVLA Paper</a>.',ce,B,de,_,Me,F,Re="Fine-tuning is an art. For a complete overview of the options for finetuning, run",fe,H,he,I,xe=`<img src="https://cdn-uploads.huggingface.co/production/uploads/640e21ef3c82bd463ee5a76d/S-3vvVCulChREwHDkquoc.gif" alt="Comparison of SmolVLA across task variations." width="500"/> <br/> <em>Figure 2: Comparison of SmolVLA across task variations. From left to right:
    (1) pick-place cube counting, (2) pick-place cube counting, (3) pick-place
    cube counting under perturbations, and (4) generalization on pick-and-place
    of the lego block with real-world SO101.</em>`,ye,Q,be,W,ke=`Similarly for when recording an episode, it is recommended that you are logged in to the HuggingFace Hub. You can follow the corresponding steps: <a href="./il_robots">Record a dataset</a>.
Once you are logged in, you can run inference in your setup by doing:`,ge,Z,we,Y,Ne="Depending on your evaluation setup, you can configure the duration and the number of episodes to record for your evaluation suite.",Te,z,$e,te,Ue;return $=new ze({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),u=new le({props:{title:"SmolVLA",local:"smolvla",headingTag:"h1"}}),V=new le({props:{title:"Set Up Your Environment",local:"set-up-your-environment",headingTag:"h2"}}),G=new je({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QnNtb2x2bGElNUQlMjI=",highlighted:'pip install -e <span class="hljs-string">&quot;.[smolvla]&quot;</span>',wrap:!1}}),R=new le({props:{title:"Collect a dataset",local:"collect-a-dataset",headingTag:"h2"}}),C=new Xe({props:{$$slots:{default:[De]},$$scope:{ctx:q}}}),k=new le({props:{title:"Finetune SmolVLA on your data",local:"finetune-smolvla-on-your-data",headingTag:"h2"}}),B=new je({props:{code:"Y2QlMjBsZXJvYm90JTIwJTI2JTI2JTIwbGVyb2JvdC10cmFpbiUyMCU1QyUwQSUyMCUyMC0tcG9saWN5LnBhdGglM0RsZXJvYm90JTJGc21vbHZsYV9iYXNlJTIwJTVDJTBBJTIwJTIwLS1kYXRhc2V0LnJlcG9faWQlM0QlMjQlN0JIRl9VU0VSJTdEJTJGbXlkYXRhc2V0JTIwJTVDJTBBJTIwJTIwLS1iYXRjaF9zaXplJTNENjQlMjAlNUMlMEElMjAlMjAtLXN0ZXBzJTNEMjAwMDAlMjAlNUMlMEElMjAlMjAtLW91dHB1dF9kaXIlM0RvdXRwdXRzJTJGdHJhaW4lMkZteV9zbW9sdmxhJTIwJTVDJTBBJTIwJTIwLS1qb2JfbmFtZSUzRG15X3Ntb2x2bGFfdHJhaW5pbmclMjAlNUMlMEElMjAlMjAtLXBvbGljeS5kZXZpY2UlM0RjdWRhJTIwJTVDJTBBJTIwJTIwLS13YW5kYi5lbmFibGUlM0R0cnVl",highlighted:`<span class="hljs-built_in">cd</span> lerobot &amp;&amp; lerobot-train \\
  --policy.path=lerobot/smolvla_base \\
  --dataset.repo_id=<span class="hljs-variable">\${HF_USER}</span>/mydataset \\
  --batch_size=64 \\
  --steps=20000 \\
  --output_dir=outputs/train/my_smolvla \\
  --job_name=my_smolvla_training \\
  --policy.device=cuda \\
  --wandb.enable=<span class="hljs-literal">true</span>`,wrap:!1}}),_=new Xe({props:{$$slots:{default:[qe]},$$scope:{ctx:q}}}),H=new je({props:{code:"bGVyb2JvdC10cmFpbiUyMC0taGVscA==",highlighted:'lerobot-train --<span class="hljs-built_in">help</span>',wrap:!1}}),Q=new le({props:{title:"Evaluate the finetuned model and run it in real-time",local:"evaluate-the-finetuned-model-and-run-it-in-real-time",headingTag:"h2"}}),Z=new je({props:{code:"bGVyb2JvdC1yZWNvcmQlMjAlNUMlMEElMjAlMjAtLXJvYm90LnR5cGUlM0RzbzEwMV9mb2xsb3dlciUyMCU1QyUwQSUyMCUyMC0tcm9ib3QucG9ydCUzRCUyRmRldiUyRnR0eUFDTTAlMjAlNUMlMjAlMjMlMjAlM0MtJTIwVXNlJTIweW91ciUyMHBvcnQlMEElMjAlMjAtLXJvYm90LmlkJTNEbXlfYmx1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BlcGlzb2RlcyUyMCU1QyUwQSUyMCUyMCUyMyUyMC0tdGVsZW9wLnR5cGUlM0RzbzEwMF9sZWFkZXIlMjAlNUMlMEElMjAlMjAlMjMlMjAtLXRlbGVvcC5wb3J0JTNEJTJGZGV2JTJGdHR5QUNNMCUyMCU1QyUwQSUyMCUyMCUyMyUyMC0tdGVsZW9wLmlkJTNEbXlfcmVkX2xlYWRlcl9hcm0lMjAlNUMlMEElMjAlMjAtLXBvbGljeS5wYXRoJTNESEZfVVNFUiUyRkZJTkVUVU5FX01PREVMX05BTUUlMjAlMjMlMjAlM0MtJTIwVXNlJTIweW91ciUyMGZpbmUtdHVuZWQlMjBtb2RlbA==",highlighted:`lerobot-record \\
  --robot.type=so101_follower \\
  --robot.port=/dev/ttyACM0 \\ <span class="hljs-comment"># &lt;- Use your port</span>
  --robot.id=my_blue_follower_arm \\ <span class="hljs-comment"># &lt;- Use your robot id</span>
  --robot.cameras=<span class="hljs-string">&quot;{ front: {type: opencv, index_or_path: 8, width: 640, height: 480, fps: 30}}&quot;</span> \\ <span class="hljs-comment"># &lt;- Use your cameras</span>
  --dataset.single_task=<span class="hljs-string">&quot;Grasp a lego block and put it in the bin.&quot;</span> \\ <span class="hljs-comment"># &lt;- Use the same task description you used in your dataset recording</span>
  --dataset.repo_id=<span class="hljs-variable">\${HF_USER}</span>/eval_DATASET_NAME_test \\  <span class="hljs-comment"># &lt;- This will be the dataset name on HF Hub</span>
  --dataset.episode_time_s=50 \\
  --dataset.num_episodes=10 \\
  <span class="hljs-comment"># &lt;- Teleop optional if you want to teleoperate in between episodes \\</span>
  <span class="hljs-comment"># --teleop.type=so100_leader \\</span>
  <span class="hljs-comment"># --teleop.port=/dev/ttyACM0 \\</span>
  <span class="hljs-comment"># --teleop.id=my_red_leader_arm \\</span>
  --policy.path=HF_USER/FINETUNE_MODEL_NAME <span class="hljs-comment"># &lt;- Use your fine-tuned model</span>`,wrap:!1}}),z=new Pe({props:{source:"https://github.com/huggingface/lerobot/blob/main/docs/source/smolvla.mdx"}}),{c(){s=r("meta"),c=n(),g=r("p"),w=n(),d($.$$.fragment),J=n(),d(u.$$.fragment),A=n(),T=r("p"),T.textContent=U,L=n(),i=r("p"),i.innerHTML=v,ae=n(),d(V.$$.fragment),ne=n(),j=r("ol"),O=r("li"),O.innerHTML=Ie,Ce=n(),E=r("li"),K=r("p"),K.textContent=Ae,_e=n(),d(G.$$.fragment),oe=n(),d(R.$$.fragment),ie=n(),x=r("p"),x.innerHTML=Le,se=n(),d(C.$$.fragment),re=n(),d(k.$$.fragment),pe=n(),N=r("p"),N.innerHTML=Ve,me=n(),X=r("p"),X.innerHTML=Ee,ue=n(),S=r("p"),S.innerHTML=Ge,ce=n(),d(B.$$.fragment),de=n(),d(_.$$.fragment),Me=n(),F=r("p"),F.textContent=Re,fe=n(),d(H.$$.fragment),he=n(),I=r("p"),I.innerHTML=xe,ye=n(),d(Q.$$.fragment),be=n(),W=r("p"),W.innerHTML=ke,ge=n(),d(Z.$$.fragment),we=n(),Y=r("p"),Y.textContent=Ne,Te=n(),d(z.$$.fragment),$e=n(),te=r("p"),this.h()},l(e){const t=We("svelte-u9bgzb",document.head);s=p(t,"META",{name:!0,content:!0}),t.forEach(l),c=o(e),g=p(e,"P",{}),ve(g).forEach(l),w=o(e),M($.$$.fragment,e),J=o(e),M(u.$$.fragment,e),A=o(e),T=p(e,"P",{"data-svelte-h":!0}),m(T)!=="svelte-1tld23e"&&(T.textContent=U),L=o(e),i=p(e,"P",{align:!0,"data-svelte-h":!0}),m(i)!=="svelte-101agfp"&&(i.innerHTML=v),ae=o(e),M(V.$$.fragment,e),ne=o(e),j=p(e,"OL",{});var P=ve(j);O=p(P,"LI",{"data-svelte-h":!0}),m(O)!=="svelte-19fosg9"&&(O.innerHTML=Ie),Ce=o(P),E=p(P,"LI",{});var D=ve(E);K=p(D,"P",{"data-svelte-h":!0}),m(K)!=="svelte-ki45p0"&&(K.textContent=Ae),_e=o(D),M(G.$$.fragment,D),D.forEach(l),P.forEach(l),oe=o(e),M(R.$$.fragment,e),ie=o(e),x=p(e,"P",{"data-svelte-h":!0}),m(x)!=="svelte-1tzgciw"&&(x.innerHTML=Le),se=o(e),M(C.$$.fragment,e),re=o(e),M(k.$$.fragment,e),pe=o(e),N=p(e,"P",{"data-svelte-h":!0}),m(N)!=="svelte-e1jkd6"&&(N.innerHTML=Ve),me=o(e),X=p(e,"P",{"data-svelte-h":!0}),m(X)!=="svelte-1vvgawl"&&(X.innerHTML=Ee),ue=o(e),S=p(e,"P",{"data-svelte-h":!0}),m(S)!=="svelte-1cguocx"&&(S.innerHTML=Ge),ce=o(e),M(B.$$.fragment,e),de=o(e),M(_.$$.fragment,e),Me=o(e),F=p(e,"P",{"data-svelte-h":!0}),m(F)!=="svelte-3fbl5x"&&(F.textContent=Re),fe=o(e),M(H.$$.fragment,e),he=o(e),I=p(e,"P",{align:!0,"data-svelte-h":!0}),m(I)!=="svelte-15508rv"&&(I.innerHTML=xe),ye=o(e),M(Q.$$.fragment,e),be=o(e),W=p(e,"P",{"data-svelte-h":!0}),m(W)!=="svelte-13sa9ox"&&(W.innerHTML=ke),ge=o(e),M(Z.$$.fragment,e),we=o(e),Y=p(e,"P",{"data-svelte-h":!0}),m(Y)!=="svelte-8jincz"&&(Y.textContent=Ne),Te=o(e),M(z.$$.fragment,e),$e=o(e),te=p(e,"P",{}),ve(te).forEach(l),this.h()},h(){Je(s,"name","hf:doc:metadata"),Je(s,"content",Ke),Je(i,"align","center"),Je(I,"align","center")},m(e,t){ee(document.head,s),a(e,c,t),a(e,g,t),a(e,w,t),f($,e,t),a(e,J,t),f(u,e,t),a(e,A,t),a(e,T,t),a(e,L,t),a(e,i,t),a(e,ae,t),f(V,e,t),a(e,ne,t),a(e,j,t),ee(j,O),ee(j,Ce),ee(j,E),ee(E,K),ee(E,_e),f(G,E,null),a(e,oe,t),f(R,e,t),a(e,ie,t),a(e,x,t),a(e,se,t),f(C,e,t),a(e,re,t),f(k,e,t),a(e,pe,t),a(e,N,t),a(e,me,t),a(e,X,t),a(e,ue,t),a(e,S,t),a(e,ce,t),f(B,e,t),a(e,de,t),f(_,e,t),a(e,Me,t),a(e,F,t),a(e,fe,t),f(H,e,t),a(e,he,t),a(e,I,t),a(e,ye,t),f(Q,e,t),a(e,be,t),a(e,W,t),a(e,ge,t),f(Z,e,t),a(e,we,t),a(e,Y,t),a(e,Te,t),f(z,e,t),a(e,$e,t),a(e,te,t),Ue=!0},p(e,[t]){const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),C.$set(P);const D={};t&2&&(D.$$scope={dirty:t,ctx:e}),_.$set(D)},i(e){Ue||(h($.$$.fragment,e),h(u.$$.fragment,e),h(V.$$.fragment,e),h(G.$$.fragment,e),h(R.$$.fragment,e),h(C.$$.fragment,e),h(k.$$.fragment,e),h(B.$$.fragment,e),h(_.$$.fragment,e),h(H.$$.fragment,e),h(Q.$$.fragment,e),h(Z.$$.fragment,e),h(z.$$.fragment,e),Ue=!0)},o(e){y($.$$.fragment,e),y(u.$$.fragment,e),y(V.$$.fragment,e),y(G.$$.fragment,e),y(R.$$.fragment,e),y(C.$$.fragment,e),y(k.$$.fragment,e),y(B.$$.fragment,e),y(_.$$.fragment,e),y(H.$$.fragment,e),y(Q.$$.fragment,e),y(Z.$$.fragment,e),y(z.$$.fragment,e),Ue=!1},d(e){e&&(l(c),l(g),l(w),l(J),l(A),l(T),l(L),l(i),l(ae),l(ne),l(j),l(oe),l(ie),l(x),l(se),l(re),l(pe),l(N),l(me),l(X),l(ue),l(S),l(ce),l(de),l(Me),l(F),l(fe),l(he),l(I),l(ye),l(be),l(W),l(ge),l(we),l(Y),l(Te),l($e),l(te)),l(s),b($,e),b(u,e),b(V,e),b(G),b(R,e),b(C,e),b(k,e),b(B,e),b(_,e),b(H,e),b(Q,e),b(Z,e),b(z,e)}}}const Ke='{"title":"SmolVLA","local":"smolvla","sections":[{"title":"Set Up Your Environment","local":"set-up-your-environment","sections":[],"depth":2},{"title":"Collect a dataset","local":"collect-a-dataset","sections":[],"depth":2},{"title":"Finetune SmolVLA on your data","local":"finetune-smolvla-on-your-data","sections":[],"depth":2},{"title":"Evaluate the finetuned model and run it in real-time","local":"evaluate-the-finetuned-model-and-run-it-in-real-time","sections":[],"depth":2}],"depth":1}';function et(q){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class st extends He{constructor(s){super(),Qe(this,s,et,Oe,Se,{})}}export{st as component};
