import{s as Se,o as Fe,n as Qe}from"../chunks/scheduler.eb244325.js";import{S as Ze,i as Be,e as r,s as n,c as d,h as He,a as p,d as l,b as s,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 We,r as Ye}from"../chunks/index.3fe63ad3.js";import{T as xe}from"../chunks/Tip.8a9a4ce7.js";import{C as ze}from"../chunks/CopyLLMTxtMenu.88bde5f2.js";import{C as je}from"../chunks/CodeBlock.934d290d.js";import{H as le,E as Pe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.341974a5.js";function De(q){let i,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,U='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,$,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(){i=r("p"),i.textContent=c,g=n(),w=r("p"),w.innerHTML=U,J=n(),u=r("p"),u.innerHTML=A,T=n(),$=r("p"),$.textContent=L},l(o){i=p(o,"P",{"data-svelte-h":!0}),m(i)!=="svelte-zn5ywj"&&(i.textContent=c),g=s(o),w=p(o,"P",{"data-svelte-h":!0}),m(w)!=="svelte-x33539"&&(w.innerHTML=U),J=s(o),u=p(o,"P",{"data-svelte-h":!0}),m(u)!=="svelte-1qy68a1"&&(u.innerHTML=A),T=s(o),$=p(o,"P",{"data-svelte-h":!0}),m($)!=="svelte-1k3pii5"&&($.textContent=L)},m(o,v){a(o,i,v),a(o,g,v),a(o,w,v),a(o,J,v),a(o,u,v),a(o,T,v),a(o,$,v)},p:Qe,d(o){o&&(l(i),l(g),l(w),l(J),l(u),l(T),l($))}}}function qe(q){let i;return{c(){i=We(`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){i=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,i,g)},d(c){c&&l(i)}}}function Oe(q){let i,c,g,w,U,J,u,A,T,$="SmolVLA is Hugging Face’s lightweight foundation model for robotics. Designed for easy fine-tuning on LeRobot datasets, it helps accelerate your development!",L,o,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,G,K,Ae="Install SmolVLA dependencies by running:",_e,R,se,E,oe,N,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>`,ie,C,re,X,pe,k,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,Ge='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,Re='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,F,de,_,Me,Q,Ee="Fine-tuning is an art. For a complete overview of the options for finetuning, run",fe,Z,he,I,Ne=`<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,B,be,H,Xe=`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,W,we,Y,ke="Depending on your evaluation setup, you can configure the duration and the number of episodes to record for your evaluation suite.",Te,z,Ue,te,$e;return U=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"}}),R=new je({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QnNtb2x2bGElNUQlMjI=",highlighted:'pip install -e <span class="hljs-string">&quot;.[smolvla]&quot;</span>',wrap:!1}}),E=new le({props:{title:"Collect a dataset",local:"collect-a-dataset",headingTag:"h2"}}),C=new xe({props:{$$slots:{default:[De]},$$scope:{ctx:q}}}),X=new le({props:{title:"Finetune SmolVLA on your data",local:"finetune-smolvla-on-your-data",headingTag:"h2"}}),F=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}}}),Z=new je({props:{code:"bGVyb2JvdC10cmFpbiUyMC0taGVscA==",highlighted:'lerobot-train --<span class="hljs-built_in">help</span>',wrap:!1}}),B=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"}}),W=new je({props:{code:"bGVyb2JvdC1yZWNvcmQlMjAlNUMlMEElMjAlMjAtLXJvYm90LnR5cGUlM0RzbzEwMV9mb2xsb3dlciUyMCU1QyUwQSUyMCUyMC0tcm9ib3QucG9ydCUzRCUyRmRldiUyRnR0eUFDTTAlMjAlNUMlMjAlMjMlMjAlM0MtJTIwVXNlJTIweW91ciUyMHBvcnQlMEElMjAlMjAtLXJvYm90LmlkJTNEbXlfYmx1ZV9mb2xs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AlMjAlMjMlMjAtLWRhdGFzZXQudmNvZGVjJTNEYXV0byUyMCU1QyUwQSUyMCUyMCUyMyUyMCUzQy0lMjBUZWxlb3AlMjBvcHRpb25hbCUyMGlmJTIweW91JTIwd2FudCUyMHRvJTIwdGVsZW9wZXJhdGUlMjBpbiUyMGJldHdlZW4lMjBlcGlzb2RlcyUyMCU1QyUwQSUyMCUyMCUyMyUyMC0tdGVsZW9wLnR5cGUlM0RzbzEwMF9sZWFkZXIlMjAlNUMlMEElMjAlMjAlMjMlMjAtLXRlbGVvcC5wb3J0JTNEJTJGZGV2JTJGdHR5QUNNMCUyMCU1QyUwQSUyMCUyMCUyMyUyMC0tdGVsZW9wLmlkJTNEbXlfcmVkX2xlYWRlcl9hcm0lMjAlNUMlMEElMjAlMjAtLXBvbGljeS5wYXRoJTNESEZfVVNFUiUyRkZJTkVUVU5FX01PREVMX05BTUUlMjAlMjMlMjAlM0MtJTIwVXNlJTIweW91ciUyMGZpbmUtdHVuZWQlMjBtb2RlbA==",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 \\
  --dataset.streaming_encoding=<span class="hljs-literal">true</span> \\
  --dataset.encoder_threads=2 \\
  <span class="hljs-comment"># --dataset.vcodec=auto \\</span>
  <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(){i=r("meta"),c=n(),g=r("p"),w=n(),d(U.$$.fragment),J=n(),d(u.$$.fragment),A=n(),T=r("p"),T.textContent=$,L=n(),o=r("p"),o.innerHTML=v,ae=n(),d(V.$$.fragment),ne=n(),j=r("ol"),O=r("li"),O.innerHTML=Ie,Ce=n(),G=r("li"),K=r("p"),K.textContent=Ae,_e=n(),d(R.$$.fragment),se=n(),d(E.$$.fragment),oe=n(),N=r("p"),N.innerHTML=Le,ie=n(),d(C.$$.fragment),re=n(),d(X.$$.fragment),pe=n(),k=r("p"),k.innerHTML=Ve,me=n(),x=r("p"),x.innerHTML=Ge,ue=n(),S=r("p"),S.innerHTML=Re,ce=n(),d(F.$$.fragment),de=n(),d(_.$$.fragment),Me=n(),Q=r("p"),Q.textContent=Ee,fe=n(),d(Z.$$.fragment),he=n(),I=r("p"),I.innerHTML=Ne,ye=n(),d(B.$$.fragment),be=n(),H=r("p"),H.innerHTML=Xe,ge=n(),d(W.$$.fragment),we=n(),Y=r("p"),Y.textContent=ke,Te=n(),d(z.$$.fragment),Ue=n(),te=r("p"),this.h()},l(e){const t=He("svelte-u9bgzb",document.head);i=p(t,"META",{name:!0,content:!0}),t.forEach(l),c=s(e),g=p(e,"P",{}),ve(g).forEach(l),w=s(e),M(U.$$.fragment,e),J=s(e),M(u.$$.fragment,e),A=s(e),T=p(e,"P",{"data-svelte-h":!0}),m(T)!=="svelte-1tld23e"&&(T.textContent=$),L=s(e),o=p(e,"P",{align:!0,"data-svelte-h":!0}),m(o)!=="svelte-101agfp"&&(o.innerHTML=v),ae=s(e),M(V.$$.fragment,e),ne=s(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=s(P),G=p(P,"LI",{});var D=ve(G);K=p(D,"P",{"data-svelte-h":!0}),m(K)!=="svelte-ki45p0"&&(K.textContent=Ae),_e=s(D),M(R.$$.fragment,D),D.forEach(l),P.forEach(l),se=s(e),M(E.$$.fragment,e),oe=s(e),N=p(e,"P",{"data-svelte-h":!0}),m(N)!=="svelte-1tzgciw"&&(N.innerHTML=Le),ie=s(e),M(C.$$.fragment,e),re=s(e),M(X.$$.fragment,e),pe=s(e),k=p(e,"P",{"data-svelte-h":!0}),m(k)!=="svelte-e1jkd6"&&(k.innerHTML=Ve),me=s(e),x=p(e,"P",{"data-svelte-h":!0}),m(x)!=="svelte-1vvgawl"&&(x.innerHTML=Ge),ue=s(e),S=p(e,"P",{"data-svelte-h":!0}),m(S)!=="svelte-1cguocx"&&(S.innerHTML=Re),ce=s(e),M(F.$$.fragment,e),de=s(e),M(_.$$.fragment,e),Me=s(e),Q=p(e,"P",{"data-svelte-h":!0}),m(Q)!=="svelte-3fbl5x"&&(Q.textContent=Ee),fe=s(e),M(Z.$$.fragment,e),he=s(e),I=p(e,"P",{align:!0,"data-svelte-h":!0}),m(I)!=="svelte-15508rv"&&(I.innerHTML=Ne),ye=s(e),M(B.$$.fragment,e),be=s(e),H=p(e,"P",{"data-svelte-h":!0}),m(H)!=="svelte-13sa9ox"&&(H.innerHTML=Xe),ge=s(e),M(W.$$.fragment,e),we=s(e),Y=p(e,"P",{"data-svelte-h":!0}),m(Y)!=="svelte-8jincz"&&(Y.textContent=ke),Te=s(e),M(z.$$.fragment,e),Ue=s(e),te=p(e,"P",{}),ve(te).forEach(l),this.h()},h(){Je(i,"name","hf:doc:metadata"),Je(i,"content",Ke),Je(o,"align","center"),Je(I,"align","center")},m(e,t){ee(document.head,i),a(e,c,t),a(e,g,t),a(e,w,t),f(U,e,t),a(e,J,t),f(u,e,t),a(e,A,t),a(e,T,t),a(e,L,t),a(e,o,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,G),ee(G,K),ee(G,_e),f(R,G,null),a(e,se,t),f(E,e,t),a(e,oe,t),a(e,N,t),a(e,ie,t),f(C,e,t),a(e,re,t),f(X,e,t),a(e,pe,t),a(e,k,t),a(e,me,t),a(e,x,t),a(e,ue,t),a(e,S,t),a(e,ce,t),f(F,e,t),a(e,de,t),f(_,e,t),a(e,Me,t),a(e,Q,t),a(e,fe,t),f(Z,e,t),a(e,he,t),a(e,I,t),a(e,ye,t),f(B,e,t),a(e,be,t),a(e,H,t),a(e,ge,t),f(W,e,t),a(e,we,t),a(e,Y,t),a(e,Te,t),f(z,e,t),a(e,Ue,t),a(e,te,t),$e=!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){$e||(h(U.$$.fragment,e),h(u.$$.fragment,e),h(V.$$.fragment,e),h(R.$$.fragment,e),h(E.$$.fragment,e),h(C.$$.fragment,e),h(X.$$.fragment,e),h(F.$$.fragment,e),h(_.$$.fragment,e),h(Z.$$.fragment,e),h(B.$$.fragment,e),h(W.$$.fragment,e),h(z.$$.fragment,e),$e=!0)},o(e){y(U.$$.fragment,e),y(u.$$.fragment,e),y(V.$$.fragment,e),y(R.$$.fragment,e),y(E.$$.fragment,e),y(C.$$.fragment,e),y(X.$$.fragment,e),y(F.$$.fragment,e),y(_.$$.fragment,e),y(Z.$$.fragment,e),y(B.$$.fragment,e),y(W.$$.fragment,e),y(z.$$.fragment,e),$e=!1},d(e){e&&(l(c),l(g),l(w),l(J),l(A),l(T),l(L),l(o),l(ae),l(ne),l(j),l(se),l(oe),l(N),l(ie),l(re),l(pe),l(k),l(me),l(x),l(ue),l(S),l(ce),l(de),l(Me),l(Q),l(fe),l(he),l(I),l(ye),l(be),l(H),l(ge),l(we),l(Y),l(Te),l(Ue),l(te)),l(i),b(U,e),b(u,e),b(V,e),b(R),b(E,e),b(C,e),b(X,e),b(F,e),b(_,e),b(Z,e),b(B,e),b(W,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 Fe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class it extends Ze{constructor(i){super(),Be(this,i,et,Oe,Se,{})}}export{it as component};
