import{s as Lt,n as Zt,o as Nt}from"../chunks/scheduler.eb244325.js";import{S as Vt,i as Xt,e as i,s as a,c as r,h as Ft,a as o,d as l,b as n,f as xt,g as p,j as y,k as Et,l as St,m as s,n as d,t as M,o as c,p as m}from"../chunks/index.3fe63ad3.js";import{C as zt}from"../chunks/CopyLLMTxtMenu.88bde5f2.js";import{C as Ct}from"../chunks/CodeBlock.934d290d.js";import{H as w,E as Pt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.341974a5.js";function Dt(It){let h,V,Z,X,T,F,u,S,j,vt=`This repository contains the Hugging Face port of <strong>π₀</strong>, adapted from <a href="https://github.com/Physical-Intelligence/openpi" rel="nofollow">OpenPI</a> by the Physical Intelligence.
It is designed as a <strong>Vision-Language-Action model for general robot control</strong>.`,z,P,D,J,O,b,Bt="<thead><tr><th>Feature</th> <th>π₀</th> <th>π₀.₅</th></tr></thead> <tbody><tr><td>Time Conditioning</td> <td>Concatenates time with actions via <code>action_time_mlp_*</code></td> <td>Uses <code>time_mlp_*</code> for AdaRMS conditioning</td></tr> <tr><td>AdaRMS</td> <td>Not used</td> <td>Used in action expert</td></tr> <tr><td>Tokenizer Length</td> <td>48 tokens</td> <td>200 tokens</td></tr> <tr><td>Discrete State Input</td> <td>False (Uses <code>state_proj</code> layer)</td> <td>True</td></tr> <tr><td>Parameter Count</td> <td>Higher (includes state embedding)</td> <td>Lower (no state embedding)</td></tr></tbody>",q,K,tt,U,et,f,kt=`π₀ supports training with <strong>relative actions</strong>, where the model learns relative offsets
from the current robot state instead of absolute joint positions. This mirrors the
relative-action transform in OpenPI (<code>DeltaActions</code>) and can improve performance.`,lt,g,st,$,At=`<li><strong>During preprocessing</strong>, absolute actions are converted to relative offsets:
<code>relative = action - state</code> (for selected joints).</li> <li>The relative actions are normalized using statistics computed from the relative distribution.</li> <li><strong>During postprocessing</strong>, predicted relative actions are converted back to absolute:
<code>absolute = relative + state</code>.</li>`,at,C,Qt="Joints listed in <code>relative_exclude_joints</code> (e.g., gripper) are kept absolute.",nt,I,it,v,Wt="<thead><tr><th>Parameter</th> <th>Type</th> <th>Default</th> <th>Description</th></tr></thead> <tbody><tr><td><code>use_relative_actions</code></td> <td><code>bool</code></td> <td><code>False</code></td> <td>Enable relative-action training</td></tr> <tr><td><code>relative_exclude_joints</code></td> <td><code>list[str]</code></td> <td><code>[&quot;gripper&quot;]</code></td> <td>Joint names to keep absolute (matched by substring)</td></tr> <tr><td><code>action_feature_names</code></td> <td><code>list[str]</code></td> <td><code>None</code></td> <td>Auto-populated from dataset metadata at runtime by <code>make_policy</code></td></tr></tbody>",ot,B,rt,k,pt,A,Yt="When <code>use_relative_actions=true</code>, the training script automatically:",dt,Q,Rt="<li>Computes relative action statistics from the dataset (sampled chunk-level relative actions)</li> <li>Replaces the standard action stats with relative stats for normalization</li> <li>Broadcasts these stats across all ranks in distributed training</li>",Mt,W,ct,Y,_t=`If you want to precompute relative action stats offline, use <code>recompute_stats</code> from
<code>lerobot.datasets</code>:`,mt,R,yt,ht,wt,_,Tt,H,Ht="If you use this work, please cite both <strong>OpenPI</strong> and the π₀ paper:",ut,G,jt,Jt,bt,x,Ut,E,Gt='This port follows the <strong>Apache 2.0 License</strong>, consistent with the original <a href="https://github.com/Physical-Intelligence/openpi" rel="nofollow">OpenPI repository</a>.',ft,L,gt,N,$t;return T=new zt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),u=new w({props:{title:"π₀ (pi0)",local:"π₀-pi0",headingTag:"h1"}}),J=new w({props:{title:"Model Overview",local:"model-overview",headingTag:"h2"}}),U=new w({props:{title:"Relative Actions",local:"relative-actions",headingTag:"h2"}}),g=new w({props:{title:"How it works",local:"how-it-works",headingTag:"h3"}}),I=new w({props:{title:"Configuration",local:"configuration",headingTag:"h3"}}),B=new w({props:{title:"Training example",local:"training-example",headingTag:"h3"}}),k=new Ct({props:{code:"cHl0aG9uJTIwLW0lMjBsZXJvYm90LnNjcmlwdHMubGVyb2JvdF90cmFpbiUyMCU1QyUwQSUyMCUyMC0tcG9saWN5LnR5cGUlM0RwaTAlMjAlNUMlMEElMjAlMjAtLWRhdGFzZXQucmVwb19pZCUzRHlvdXJfb3JnJTJGeW91cl9kYXRhc2V0JTIwJTVDJTBBJTIwJTIwLS1wb2xpY3kudXNlX3JlbGF0aXZlX2FjdGlvbnMlM0R0cnVlJTIwJTVDJTBBJTIwJTIwLS1wb2xpY3kucmVsYXRpdmVfZXhjbHVkZV9qb2ludHMlM0QnJTVCJTIyZ3JpcHBlciUyMiU1RCc=",highlighted:`python -m lerobot.scripts.lerobot_train \\
  --policy.type=pi0 \\
  --dataset.repo_id=your_org/your_dataset \\
  --policy.use_relative_actions=<span class="hljs-literal">true</span> \\
  --policy.relative_exclude_joints=<span class="hljs-string">&#x27;[&quot;gripper&quot;]&#x27;</span>`,wrap:!1}}),W=new w({props:{title:"Recomputing stats for an existing dataset",local:"recomputing-stats-for-an-existing-dataset",headingTag:"h3"}}),R=new Ct({props:{code:"ZnJvbSUyMGxlcm9ib3QuZGF0YXNldHMlMjBpbXBvcnQlMjBMZVJvYm90RGF0YXNldCUyQyUyMHJlY29tcHV0ZV9zdGF0cyUwQSUwQWRhdGFzZXQlMjAlM0QlMjBMZVJvYm90RGF0YXNldCglMjJ5b3VyX29yZyUyRnlvdXJfZGF0YXNldCUyMiklMEFkYXRhc2V0JTIwJTNEJTIwcmVjb21wdXRlX3N0YXRzKCUwQSUyMCUyMCUyMCUyMGRhdGFzZXQlMkMlMEElMjAlMjAlMjAlMjByZWxhdGl2ZV9hY3Rpb24lM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwcmVsYXRpdmVfZXhjbHVkZV9qb2ludHMlM0QlNUIlMjJncmlwcGVyJTIyJTVEJTJDJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> lerobot.datasets <span class="hljs-keyword">import</span> LeRobotDataset, recompute_stats

dataset = LeRobotDataset(<span class="hljs-string">&quot;your_org/your_dataset&quot;</span>)
dataset = recompute_stats(
    dataset,
    relative_action=<span class="hljs-literal">True</span>,
    relative_exclude_joints=[<span class="hljs-string">&quot;gripper&quot;</span>],
)`,wrap:!1}}),_=new w({props:{title:"Citation",local:"citation",headingTag:"h2"}}),G=new Ct({props:{code:"JTQwbWlzYyU3Qm9wZW5waTIwMjQlMkMlMEElMjAlMjBhdXRob3IlMjAlMjAlMjAlMjAlMjAlMjAlMjAlM0QlMjAlN0JQaHlzaWNhbCUyMEludGVsbGlnZW5jZSUyMExhYiU3RCUyQyUwQSUyMCUyMHRpdGxlJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTNEJTIwJTdCT3BlblBJJTNBJTIwUHlUb3JjaCUyMEltcGxlbWVudGF0aW9uJTIwb2YlMjAlQ0YlODAwJTIwYW5kJTIwJUNGJTgwMC41JTIwUG9saWNpZXMlN0QlMkMlMEElMjAlMjB5ZWFyJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTNEJTIwJTdCMjAyNCU3RCUyQyUwQSUyMCUyMHB1Ymxpc2hlciUyMCUyMCUyMCUyMCUzRCUyMCU3QkdpdEh1YiU3RCUyQyUwQSUyMCUyMGhvd3B1Ymxpc2hlZCUyMCUzRCUyMCU3QiU1Q3VybCU3Qmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRlBoeXNpY2FsLUludGVsbGlnZW5jZSUyRm9wZW5waSU3RCU3RCUyQyUwQSUyMCUyMGxpY2Vuc2UlMjAlMjAlMjAlMjAlMjAlMjAlM0QlMjAlN0JBcGFjaGUtMi4wJTdEJTBBJTdEJTBBJTBBJTQwbWlzYyU3QmJsYWNrMjAyNHBpMHZpc2lvbmxhbmd1YWdlYWN0aW9uZmxvd21vZGVsJTJDJTBBJTIwJTIwdGl0bGUlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlM0QlMjAlN0IlQ0YlODAlRTIlODIlODAlM0ElMjBBJTIwVmlzaW9uLUxhbmd1YWdlLUFjdGlvbiUyMEZsb3clMjBN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IwJTdCYXJYaXYlN0QlMkMlMEElMjAlMjBwcmltYXJ5Q2xhc3MlMjAlM0QlMjAlN0Jjcy5MRyU3RCUyQyUwQSUyMCUyMHVybCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUzRCUyMCU3Qmh0dHBzJTNBJTJGJTJGYXJ4aXYub3JnJTJGYWJzJTJGMjQxMC4yNDE2NCU3RCUyQyUwQSU3RA==",highlighted:`<span class="hljs-comment">@misc{openpi2024,</span>
  author       = {Physical Intelligence Lab},
  title        = {OpenPI: PyTorch Implementation of π<span class="hljs-number">0</span> <span class="hljs-keyword">and</span> π<span class="hljs-number">0</span>.<span class="hljs-number">5</span> Policies},
  year         = {<span class="hljs-number">2024</span>},
  publisher    = {GitHub},
  howpublished = {\\url{https:<span class="hljs-comment">//github.com/Physical-Intelligence/openpi}},</span>
  license      = {Apache-<span class="hljs-number">2</span>.<span class="hljs-number">0</span>}
}

<span class="hljs-comment">@misc{black2024pi0visionlanguageactionflowmodel,</span>
  title        = {π₀: A Vision-Language-Action Flow Model for General Robot Control},
  author       = {Kevin Black <span class="hljs-keyword">and</span> Noah Brown <span class="hljs-keyword">and</span> Danny Driess <span class="hljs-keyword">and</span> Adnan Esmail <span class="hljs-keyword">and</span> Michael Equi <span class="hljs-keyword">and</span> Chelsea Finn <span class="hljs-keyword">and</span> Niccolo Fusai <span class="hljs-keyword">and</span> Lachy Groom <span class="hljs-keyword">and</span> Karol Hausman <span class="hljs-keyword">and</span> Brian Ichter <span class="hljs-keyword">and</span> Szymon Jakubczak <span class="hljs-keyword">and</span> Tim Jones <span class="hljs-keyword">and</span> Liyiming Ke <span class="hljs-keyword">and</span> Sergey Levine <span class="hljs-keyword">and</span> Adrian Li-Bell <span class="hljs-keyword">and</span> Mohith Mothukuri <span class="hljs-keyword">and</span> Suraj Nair <span class="hljs-keyword">and</span> Karl Pertsch <span class="hljs-keyword">and</span> Lucy Xiaoyang Shi <span class="hljs-keyword">and</span> James Tanner <span class="hljs-keyword">and</span> Quan Vuong <span class="hljs-keyword">and</span> Anna Walling <span class="hljs-keyword">and</span> Haohuan Wang <span class="hljs-keyword">and</span> Ury Zhilinsky},
  year         = {<span class="hljs-number">2024</span>},
  eprint       = {<span class="hljs-number">2410</span>.<span class="hljs-number">24164</span>},
  archivePrefix= {arXiv},
  primaryClass = {cs.LG},
  url          = {https:<span class="hljs-comment">//arxiv.org/abs/2410.24164},</span>
}`,wrap:!1}}),x=new w({props:{title:"License",local:"license",headingTag:"h2"}}),L=new Pt({props:{source:"https://github.com/huggingface/lerobot/blob/main/docs/source/policy_pi0_README.md"}}),{c(){h=i("meta"),V=a(),Z=i("p"),X=a(),r(T.$$.fragment),F=a(),r(u.$$.fragment),S=a(),j=i("p"),j.innerHTML=vt,z=a(),P=i("hr"),D=a(),r(J.$$.fragment),O=a(),b=i("table"),b.innerHTML=Bt,q=a(),K=i("hr"),tt=a(),r(U.$$.fragment),et=a(),f=i("p"),f.innerHTML=kt,lt=a(),r(g.$$.fragment),st=a(),$=i("ol"),$.innerHTML=At,at=a(),C=i("p"),C.innerHTML=Qt,nt=a(),r(I.$$.fragment),it=a(),v=i("table"),v.innerHTML=Wt,ot=a(),r(B.$$.fragment),rt=a(),r(k.$$.fragment),pt=a(),A=i("p"),A.innerHTML=Yt,dt=a(),Q=i("ul"),Q.innerHTML=Rt,Mt=a(),r(W.$$.fragment),ct=a(),Y=i("p"),Y.innerHTML=_t,mt=a(),r(R.$$.fragment),yt=a(),ht=i("hr"),wt=a(),r(_.$$.fragment),Tt=a(),H=i("p"),H.innerHTML=Ht,ut=a(),r(G.$$.fragment),jt=a(),Jt=i("hr"),bt=a(),r(x.$$.fragment),Ut=a(),E=i("p"),E.innerHTML=Gt,ft=a(),r(L.$$.fragment),gt=a(),N=i("p"),this.h()},l(t){const e=Ft("svelte-u9bgzb",document.head);h=o(e,"META",{name:!0,content:!0}),e.forEach(l),V=n(t),Z=o(t,"P",{}),xt(Z).forEach(l),X=n(t),p(T.$$.fragment,t),F=n(t),p(u.$$.fragment,t),S=n(t),j=o(t,"P",{"data-svelte-h":!0}),y(j)!=="svelte-1bcrmnm"&&(j.innerHTML=vt),z=n(t),P=o(t,"HR",{}),D=n(t),p(J.$$.fragment,t),O=n(t),b=o(t,"TABLE",{"data-svelte-h":!0}),y(b)!=="svelte-1xngzfe"&&(b.innerHTML=Bt),q=n(t),K=o(t,"HR",{}),tt=n(t),p(U.$$.fragment,t),et=n(t),f=o(t,"P",{"data-svelte-h":!0}),y(f)!=="svelte-9kuutt"&&(f.innerHTML=kt),lt=n(t),p(g.$$.fragment,t),st=n(t),$=o(t,"OL",{"data-svelte-h":!0}),y($)!=="svelte-7rg6ca"&&($.innerHTML=At),at=n(t),C=o(t,"P",{"data-svelte-h":!0}),y(C)!=="svelte-rd6nsg"&&(C.innerHTML=Qt),nt=n(t),p(I.$$.fragment,t),it=n(t),v=o(t,"TABLE",{"data-svelte-h":!0}),y(v)!=="svelte-1ussnef"&&(v.innerHTML=Wt),ot=n(t),p(B.$$.fragment,t),rt=n(t),p(k.$$.fragment,t),pt=n(t),A=o(t,"P",{"data-svelte-h":!0}),y(A)!=="svelte-by0dxl"&&(A.innerHTML=Yt),dt=n(t),Q=o(t,"UL",{"data-svelte-h":!0}),y(Q)!=="svelte-18oe6mp"&&(Q.innerHTML=Rt),Mt=n(t),p(W.$$.fragment,t),ct=n(t),Y=o(t,"P",{"data-svelte-h":!0}),y(Y)!=="svelte-4kjzyq"&&(Y.innerHTML=_t),mt=n(t),p(R.$$.fragment,t),yt=n(t),ht=o(t,"HR",{}),wt=n(t),p(_.$$.fragment,t),Tt=n(t),H=o(t,"P",{"data-svelte-h":!0}),y(H)!=="svelte-12y1hg4"&&(H.innerHTML=Ht),ut=n(t),p(G.$$.fragment,t),jt=n(t),Jt=o(t,"HR",{}),bt=n(t),p(x.$$.fragment,t),Ut=n(t),E=o(t,"P",{"data-svelte-h":!0}),y(E)!=="svelte-vshcib"&&(E.innerHTML=Gt),ft=n(t),p(L.$$.fragment,t),gt=n(t),N=o(t,"P",{}),xt(N).forEach(l),this.h()},h(){Et(h,"name","hf:doc:metadata"),Et(h,"content",Ot)},m(t,e){St(document.head,h),s(t,V,e),s(t,Z,e),s(t,X,e),d(T,t,e),s(t,F,e),d(u,t,e),s(t,S,e),s(t,j,e),s(t,z,e),s(t,P,e),s(t,D,e),d(J,t,e),s(t,O,e),s(t,b,e),s(t,q,e),s(t,K,e),s(t,tt,e),d(U,t,e),s(t,et,e),s(t,f,e),s(t,lt,e),d(g,t,e),s(t,st,e),s(t,$,e),s(t,at,e),s(t,C,e),s(t,nt,e),d(I,t,e),s(t,it,e),s(t,v,e),s(t,ot,e),d(B,t,e),s(t,rt,e),d(k,t,e),s(t,pt,e),s(t,A,e),s(t,dt,e),s(t,Q,e),s(t,Mt,e),d(W,t,e),s(t,ct,e),s(t,Y,e),s(t,mt,e),d(R,t,e),s(t,yt,e),s(t,ht,e),s(t,wt,e),d(_,t,e),s(t,Tt,e),s(t,H,e),s(t,ut,e),d(G,t,e),s(t,jt,e),s(t,Jt,e),s(t,bt,e),d(x,t,e),s(t,Ut,e),s(t,E,e),s(t,ft,e),d(L,t,e),s(t,gt,e),s(t,N,e),$t=!0},p:Zt,i(t){$t||(M(T.$$.fragment,t),M(u.$$.fragment,t),M(J.$$.fragment,t),M(U.$$.fragment,t),M(g.$$.fragment,t),M(I.$$.fragment,t),M(B.$$.fragment,t),M(k.$$.fragment,t),M(W.$$.fragment,t),M(R.$$.fragment,t),M(_.$$.fragment,t),M(G.$$.fragment,t),M(x.$$.fragment,t),M(L.$$.fragment,t),$t=!0)},o(t){c(T.$$.fragment,t),c(u.$$.fragment,t),c(J.$$.fragment,t),c(U.$$.fragment,t),c(g.$$.fragment,t),c(I.$$.fragment,t),c(B.$$.fragment,t),c(k.$$.fragment,t),c(W.$$.fragment,t),c(R.$$.fragment,t),c(_.$$.fragment,t),c(G.$$.fragment,t),c(x.$$.fragment,t),c(L.$$.fragment,t),$t=!1},d(t){t&&(l(V),l(Z),l(X),l(F),l(S),l(j),l(z),l(P),l(D),l(O),l(b),l(q),l(K),l(tt),l(et),l(f),l(lt),l(st),l($),l(at),l(C),l(nt),l(it),l(v),l(ot),l(rt),l(pt),l(A),l(dt),l(Q),l(Mt),l(ct),l(Y),l(mt),l(yt),l(ht),l(wt),l(Tt),l(H),l(ut),l(jt),l(Jt),l(bt),l(Ut),l(E),l(ft),l(gt),l(N)),l(h),m(T,t),m(u,t),m(J,t),m(U,t),m(g,t),m(I,t),m(B,t),m(k,t),m(W,t),m(R,t),m(_,t),m(G,t),m(x,t),m(L,t)}}}const Ot='{"title":"π₀ (pi0)","local":"π₀-pi0","sections":[{"title":"Model Overview","local":"model-overview","sections":[],"depth":2},{"title":"Relative Actions","local":"relative-actions","sections":[{"title":"How it works","local":"how-it-works","sections":[],"depth":3},{"title":"Configuration","local":"configuration","sections":[],"depth":3},{"title":"Training example","local":"training-example","sections":[],"depth":3},{"title":"Recomputing stats for an existing dataset","local":"recomputing-stats-for-an-existing-dataset","sections":[],"depth":3}],"depth":2},{"title":"Citation","local":"citation","sections":[],"depth":2},{"title":"License","local":"license","sections":[],"depth":2}],"depth":1}';function qt(It){return Nt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ae extends Vt{constructor(h){super(),Xt(this,h,qt,Dt,Lt,{})}}export{ae as component};
