import{S as Ni,i as Ci,s as Ti,e as a,k as h,w as v,t as p,M as xi,c as i,d as t,m as f,a as o,x as d,h as u,b as s,N as Hi,G as r,g as l,y as g,q as w,o as _,B as P,v as Ii}from"../chunks/vendor-hf-doc-builder.js";import{T as Mi}from"../chunks/Tip-hf-doc-builder.js";import{I as $}from"../chunks/IconCopyLink-hf-doc-builder.js";function zi(Pt){let c,M;return{c(){c=a("p"),M=p("Note: Most of the strategies introduced in the single GPU sections (such as mixed precision training or gradient accumulation) are generic and apply to training models in general so make sure to have a look at it before diving into the following sections such as multi-GPU or CPU training.")},l(m){c=i(m,"P",{});var y=o(c);M=u(y,"Note: Most of the strategies introduced in the single GPU sections (such as mixed precision training or gradient accumulation) are generic and apply to training models in general so make sure to have a look at it before diving into the following sections such as multi-GPU or CPU training."),y.forEach(t)},m(m,y){l(m,c,y),r(c,M)},d(m){m&&t(c)}}}function qi(Pt){let c,M,m,y,Le,X,vr,Je,dr,$t,ue,gr,yt,ce,me,la,Et,ve,wr,bt,E,z,Oe,Y,_r,je,Pr,Ut,de,$r,kt,q,Gt,b,W,Fe,Z,yr,Ke,Er,At,ge,br,St,we,_e,Ur,Nt,U,B,Qe,ee,kr,Ve,Gr,Ct,Pe,Ar,Tt,$e,ye,Sr,xt,k,R,Xe,te,Nr,Ye,Cr,Ht,Ee,be,Tr,It,G,D,Ze,re,xr,et,Hr,Mt,Ue,ke,tt,Ir,zt,A,L,rt,ae,Mr,at,zr,qt,Ge,Ae,it,qr,Wt,S,J,ot,ie,Wr,nt,Br,Bt,Se,Rr,Rt,N,O,st,oe,Dr,lt,Lr,Dt,Ne,Ce,Jr,Lt,C,j,ht,ne,Or,ft,jr,Jt,Te,xe,Fr,Ot,T,F,pt,se,Kr,ut,Qr,jt,He,Ie,Vr,Ft,x,K,ct,le,Xr,mt,Yr,Kt,Me,ze,vt,Zr,Qt,H,Q,dt,he,ea,gt,ta,Vt,qe,ra,Xt,We,Be,aa,Yt,I,V,wt,fe,ia,_t,oa,Zt,Re,na,er,De,sa,tr;return X=new $({}),Y=new $({}),q=new Mi({props:{$$slots:{default:[zi]},$$scope:{ctx:Pt}}}),Z=new $({}),ee=new $({}),te=new $({}),re=new $({}),ae=new $({}),ie=new $({}),oe=new $({}),ne=new $({}),se=new $({}),le=new $({}),he=new $({}),fe=new $({}),{c(){c=a("meta"),M=h(),m=a("h1"),y=a("a"),Le=a("span"),v(X.$$.fragment),vr=h(),Je=a("span"),dr=p("Performance and Scalability"),$t=h(),ue=a("p"),gr=p("Training larger and larger transformer models and deploying them to production comes with a range of challenges. During training your model can require more GPU memory than is available or be very slow to train and when you deploy it for inference it can be overwhelmed with the throughput that is required in the production environment. This documentation is designed to help you navigate these challenges and find the best setting for your use-case. We split the guides into training and inference as they come with different challenges and solutions. Then within each of them we have separate guides for different kinds of hardware setting (e.g. single vs. multi-GPU for training or CPU vs. GPU for infrence)."),yt=h(),ce=a("p"),me=a("img"),Et=h(),ve=a("p"),wr=p("This document serves as an overview and entry point for the methods that could be useful for your scenario."),bt=h(),E=a("h2"),z=a("a"),Oe=a("span"),v(Y.$$.fragment),_r=h(),je=a("span"),Pr=p("Training"),Ut=h(),de=a("p"),$r=p("Training transformer models efficiently requires an accelerator such as a GPU or TPU. The most common case is where you only have a single GPU, but there is also a section about mutli-GPU and CPU training (with more coming soon)."),kt=h(),v(q.$$.fragment),Gt=h(),b=a("h3"),W=a("a"),Fe=a("span"),v(Z.$$.fragment),yr=h(),Ke=a("span"),Er=p("Single GPU"),At=h(),ge=a("p"),br=p("Training large models on a single GPU can be challenging but there are a number of tools and methods that make it feasible. In this section methods such as mixed precision training, gradient accumulation and checkpointing, efficient optimizers, as well as strategies to determine the best batch size are discussed."),St=h(),we=a("p"),_e=a("a"),Ur=p("Go to single GPU training section"),Nt=h(),U=a("h3"),B=a("a"),Qe=a("span"),v(ee.$$.fragment),kr=h(),Ve=a("span"),Gr=p("Multi-GPU"),Ct=h(),Pe=a("p"),Ar=p("In some cases training on a single GPU is still too slow or won\u2019t fit the large model. Moving to a mutli-GPU setup is the logical step, but training on multiple GPUs at once comes with new decisions: does each GPU have a full copy of the model or is the model itself also distributed? In this section we look at data, tensor, and pipeline parallism."),Tt=h(),$e=a("p"),ye=a("a"),Sr=p("Go to multi-GPU training section"),xt=h(),k=a("h3"),R=a("a"),Xe=a("span"),v(te.$$.fragment),Nr=h(),Ye=a("span"),Cr=p("CPU"),Ht=h(),Ee=a("p"),be=a("a"),Tr=p("Go to CPU training section"),It=h(),G=a("h3"),D=a("a"),Ze=a("span"),v(re.$$.fragment),xr=h(),et=a("span"),Hr=p("TPU"),Mt=h(),Ue=a("p"),ke=a("a"),tt=a("em"),Ir=p("Coming soon"),zt=h(),A=a("h3"),L=a("a"),rt=a("span"),v(ae.$$.fragment),Mr=h(),at=a("span"),zr=p("Specialized Hardware"),qt=h(),Ge=a("p"),Ae=a("a"),it=a("em"),qr=p("Coming soon"),Wt=h(),S=a("h2"),J=a("a"),ot=a("span"),v(ie.$$.fragment),Wr=h(),nt=a("span"),Br=p("Inference"),Bt=h(),Se=a("p"),Rr=p("Efficient inference with large models in a production environment can be as challenging as training them. In the following sections we go through the steps to run inference on CPU and single/multi-GPU setups."),Rt=h(),N=a("h3"),O=a("a"),st=a("span"),v(oe.$$.fragment),Dr=h(),lt=a("span"),Lr=p("CPU"),Dt=h(),Ne=a("p"),Ce=a("a"),Jr=p("Go to CPU inference section"),Lt=h(),C=a("h3"),j=a("a"),ht=a("span"),v(ne.$$.fragment),Or=h(),ft=a("span"),jr=p("Single GPU"),Jt=h(),Te=a("p"),xe=a("a"),Fr=p("Go to single GPU inference section"),Ot=h(),T=a("h3"),F=a("a"),pt=a("span"),v(se.$$.fragment),Kr=h(),ut=a("span"),Qr=p("Multi-GPU"),jt=h(),He=a("p"),Ie=a("a"),Vr=p("Go to multi-GPU inference section"),Ft=h(),x=a("h3"),K=a("a"),ct=a("span"),v(le.$$.fragment),Xr=h(),mt=a("span"),Yr=p("Specialized Hardware"),Kt=h(),Me=a("p"),ze=a("a"),vt=a("em"),Zr=p("Coming soon"),Qt=h(),H=a("h2"),Q=a("a"),dt=a("span"),v(he.$$.fragment),ea=h(),gt=a("span"),ta=p("Hardware"),Vt=h(),qe=a("p"),ra=p("In the hardware section you can find tips and tricks when building your own deep learning rig."),Xt=h(),We=a("p"),Be=a("a"),aa=p("Go to hardware section"),Yt=h(),I=a("h2"),V=a("a"),wt=a("span"),v(fe.$$.fragment),ia=h(),_t=a("span"),oa=p("Contribute"),Zt=h(),Re=a("p"),na=p("This document is far from being complete and a lot more needs to be added, so if you have additions or corrections to make please don\u2019t hesitate to open a PR or if you aren\u2019t sure start an Issue and we can discuss the details there."),er=h(),De=a("p"),sa=p("When making contributions that A is better than B, please try to include a reproducible benchmark and/or a link to the source of that information (unless it comes directly from you)."),this.h()},l(e){const n=xi('[data-svelte="svelte-1phssyn"]',document.head);c=i(n,"META",{name:!0,content:!0}),n.forEach(t),M=f(e),m=i(e,"H1",{class:!0});var pe=o(m);y=i(pe,"A",{id:!0,class:!0,href:!0});var ha=o(y);Le=i(ha,"SPAN",{});var fa=o(Le);d(X.$$.fragment,fa),fa.forEach(t),ha.forEach(t),vr=f(pe),Je=i(pe,"SPAN",{});var pa=o(Je);dr=u(pa,"Performance and Scalability"),pa.forEach(t),pe.forEach(t),$t=f(e),ue=i(e,"P",{});var ua=o(ue);gr=u(ua,"Training larger and larger transformer models and deploying them to production comes with a range of challenges. During training your model can require more GPU memory than is available or be very slow to train and when you deploy it for inference it can be overwhelmed with the throughput that is required in the production environment. This documentation is designed to help you navigate these challenges and find the best setting for your use-case. We split the guides into training and inference as they come with different challenges and solutions. Then within each of them we have separate guides for different kinds of hardware setting (e.g. single vs. multi-GPU for training or CPU vs. GPU for infrence)."),ua.forEach(t),yt=f(e),ce=i(e,"P",{});var ca=o(ce);me=i(ca,"IMG",{src:!0,alt:!0}),ca.forEach(t),Et=f(e),ve=i(e,"P",{});var ma=o(ve);wr=u(ma,"This document serves as an overview and entry point for the methods that could be useful for your scenario."),ma.forEach(t),bt=f(e),E=i(e,"H2",{class:!0});var rr=o(E);z=i(rr,"A",{id:!0,class:!0,href:!0});var va=o(z);Oe=i(va,"SPAN",{});var da=o(Oe);d(Y.$$.fragment,da),da.forEach(t),va.forEach(t),_r=f(rr),je=i(rr,"SPAN",{});var ga=o(je);Pr=u(ga,"Training"),ga.forEach(t),rr.forEach(t),Ut=f(e),de=i(e,"P",{});var wa=o(de);$r=u(wa,"Training transformer models efficiently requires an accelerator such as a GPU or TPU. The most common case is where you only have a single GPU, but there is also a section about mutli-GPU and CPU training (with more coming soon)."),wa.forEach(t),kt=f(e),d(q.$$.fragment,e),Gt=f(e),b=i(e,"H3",{class:!0});var ar=o(b);W=i(ar,"A",{id:!0,class:!0,href:!0});var _a=o(W);Fe=i(_a,"SPAN",{});var Pa=o(Fe);d(Z.$$.fragment,Pa),Pa.forEach(t),_a.forEach(t),yr=f(ar),Ke=i(ar,"SPAN",{});var $a=o(Ke);Er=u($a,"Single GPU"),$a.forEach(t),ar.forEach(t),At=f(e),ge=i(e,"P",{});var ya=o(ge);br=u(ya,"Training large models on a single GPU can be challenging but there are a number of tools and methods that make it feasible. In this section methods such as mixed precision training, gradient accumulation and checkpointing, efficient optimizers, as well as strategies to determine the best batch size are discussed."),ya.forEach(t),St=f(e),we=i(e,"P",{});var Ea=o(we);_e=i(Ea,"A",{href:!0});var ba=o(_e);Ur=u(ba,"Go to single GPU training section"),ba.forEach(t),Ea.forEach(t),Nt=f(e),U=i(e,"H3",{class:!0});var ir=o(U);B=i(ir,"A",{id:!0,class:!0,href:!0});var Ua=o(B);Qe=i(Ua,"SPAN",{});var ka=o(Qe);d(ee.$$.fragment,ka),ka.forEach(t),Ua.forEach(t),kr=f(ir),Ve=i(ir,"SPAN",{});var Ga=o(Ve);Gr=u(Ga,"Multi-GPU"),Ga.forEach(t),ir.forEach(t),Ct=f(e),Pe=i(e,"P",{});var Aa=o(Pe);Ar=u(Aa,"In some cases training on a single GPU is still too slow or won\u2019t fit the large model. Moving to a mutli-GPU setup is the logical step, but training on multiple GPUs at once comes with new decisions: does each GPU have a full copy of the model or is the model itself also distributed? In this section we look at data, tensor, and pipeline parallism."),Aa.forEach(t),Tt=f(e),$e=i(e,"P",{});var Sa=o($e);ye=i(Sa,"A",{href:!0});var Na=o(ye);Sr=u(Na,"Go to multi-GPU training section"),Na.forEach(t),Sa.forEach(t),xt=f(e),k=i(e,"H3",{class:!0});var or=o(k);R=i(or,"A",{id:!0,class:!0,href:!0});var Ca=o(R);Xe=i(Ca,"SPAN",{});var Ta=o(Xe);d(te.$$.fragment,Ta),Ta.forEach(t),Ca.forEach(t),Nr=f(or),Ye=i(or,"SPAN",{});var xa=o(Ye);Cr=u(xa,"CPU"),xa.forEach(t),or.forEach(t),Ht=f(e),Ee=i(e,"P",{});var Ha=o(Ee);be=i(Ha,"A",{href:!0});var Ia=o(be);Tr=u(Ia,"Go to CPU training section"),Ia.forEach(t),Ha.forEach(t),It=f(e),G=i(e,"H3",{class:!0});var nr=o(G);D=i(nr,"A",{id:!0,class:!0,href:!0});var Ma=o(D);Ze=i(Ma,"SPAN",{});var za=o(Ze);d(re.$$.fragment,za),za.forEach(t),Ma.forEach(t),xr=f(nr),et=i(nr,"SPAN",{});var qa=o(et);Hr=u(qa,"TPU"),qa.forEach(t),nr.forEach(t),Mt=f(e),Ue=i(e,"P",{});var Wa=o(Ue);ke=i(Wa,"A",{href:!0});var Ba=o(ke);tt=i(Ba,"EM",{});var Ra=o(tt);Ir=u(Ra,"Coming soon"),Ra.forEach(t),Ba.forEach(t),Wa.forEach(t),zt=f(e),A=i(e,"H3",{class:!0});var sr=o(A);L=i(sr,"A",{id:!0,class:!0,href:!0});var Da=o(L);rt=i(Da,"SPAN",{});var La=o(rt);d(ae.$$.fragment,La),La.forEach(t),Da.forEach(t),Mr=f(sr),at=i(sr,"SPAN",{});var Ja=o(at);zr=u(Ja,"Specialized Hardware"),Ja.forEach(t),sr.forEach(t),qt=f(e),Ge=i(e,"P",{});var Oa=o(Ge);Ae=i(Oa,"A",{href:!0});var ja=o(Ae);it=i(ja,"EM",{});var Fa=o(it);qr=u(Fa,"Coming soon"),Fa.forEach(t),ja.forEach(t),Oa.forEach(t),Wt=f(e),S=i(e,"H2",{class:!0});var lr=o(S);J=i(lr,"A",{id:!0,class:!0,href:!0});var Ka=o(J);ot=i(Ka,"SPAN",{});var Qa=o(ot);d(ie.$$.fragment,Qa),Qa.forEach(t),Ka.forEach(t),Wr=f(lr),nt=i(lr,"SPAN",{});var Va=o(nt);Br=u(Va,"Inference"),Va.forEach(t),lr.forEach(t),Bt=f(e),Se=i(e,"P",{});var Xa=o(Se);Rr=u(Xa,"Efficient inference with large models in a production environment can be as challenging as training them. In the following sections we go through the steps to run inference on CPU and single/multi-GPU setups."),Xa.forEach(t),Rt=f(e),N=i(e,"H3",{class:!0});var hr=o(N);O=i(hr,"A",{id:!0,class:!0,href:!0});var Ya=o(O);st=i(Ya,"SPAN",{});var Za=o(st);d(oe.$$.fragment,Za),Za.forEach(t),Ya.forEach(t),Dr=f(hr),lt=i(hr,"SPAN",{});var ei=o(lt);Lr=u(ei,"CPU"),ei.forEach(t),hr.forEach(t),Dt=f(e),Ne=i(e,"P",{});var ti=o(Ne);Ce=i(ti,"A",{href:!0});var ri=o(Ce);Jr=u(ri,"Go to CPU inference section"),ri.forEach(t),ti.forEach(t),Lt=f(e),C=i(e,"H3",{class:!0});var fr=o(C);j=i(fr,"A",{id:!0,class:!0,href:!0});var ai=o(j);ht=i(ai,"SPAN",{});var ii=o(ht);d(ne.$$.fragment,ii),ii.forEach(t),ai.forEach(t),Or=f(fr),ft=i(fr,"SPAN",{});var oi=o(ft);jr=u(oi,"Single GPU"),oi.forEach(t),fr.forEach(t),Jt=f(e),Te=i(e,"P",{});var ni=o(Te);xe=i(ni,"A",{href:!0});var si=o(xe);Fr=u(si,"Go to single GPU inference section"),si.forEach(t),ni.forEach(t),Ot=f(e),T=i(e,"H3",{class:!0});var pr=o(T);F=i(pr,"A",{id:!0,class:!0,href:!0});var li=o(F);pt=i(li,"SPAN",{});var hi=o(pt);d(se.$$.fragment,hi),hi.forEach(t),li.forEach(t),Kr=f(pr),ut=i(pr,"SPAN",{});var fi=o(ut);Qr=u(fi,"Multi-GPU"),fi.forEach(t),pr.forEach(t),jt=f(e),He=i(e,"P",{});var pi=o(He);Ie=i(pi,"A",{href:!0});var ui=o(Ie);Vr=u(ui,"Go to multi-GPU inference section"),ui.forEach(t),pi.forEach(t),Ft=f(e),x=i(e,"H3",{class:!0});var ur=o(x);K=i(ur,"A",{id:!0,class:!0,href:!0});var ci=o(K);ct=i(ci,"SPAN",{});var mi=o(ct);d(le.$$.fragment,mi),mi.forEach(t),ci.forEach(t),Xr=f(ur),mt=i(ur,"SPAN",{});var vi=o(mt);Yr=u(vi,"Specialized Hardware"),vi.forEach(t),ur.forEach(t),Kt=f(e),Me=i(e,"P",{});var di=o(Me);ze=i(di,"A",{href:!0});var gi=o(ze);vt=i(gi,"EM",{});var wi=o(vt);Zr=u(wi,"Coming soon"),wi.forEach(t),gi.forEach(t),di.forEach(t),Qt=f(e),H=i(e,"H2",{class:!0});var cr=o(H);Q=i(cr,"A",{id:!0,class:!0,href:!0});var _i=o(Q);dt=i(_i,"SPAN",{});var Pi=o(dt);d(he.$$.fragment,Pi),Pi.forEach(t),_i.forEach(t),ea=f(cr),gt=i(cr,"SPAN",{});var $i=o(gt);ta=u($i,"Hardware"),$i.forEach(t),cr.forEach(t),Vt=f(e),qe=i(e,"P",{});var yi=o(qe);ra=u(yi,"In the hardware section you can find tips and tricks when building your own deep learning rig."),yi.forEach(t),Xt=f(e),We=i(e,"P",{});var Ei=o(We);Be=i(Ei,"A",{href:!0});var bi=o(Be);aa=u(bi,"Go to hardware section"),bi.forEach(t),Ei.forEach(t),Yt=f(e),I=i(e,"H2",{class:!0});var mr=o(I);V=i(mr,"A",{id:!0,class:!0,href:!0});var Ui=o(V);wt=i(Ui,"SPAN",{});var ki=o(wt);d(fe.$$.fragment,ki),ki.forEach(t),Ui.forEach(t),ia=f(mr),_t=i(mr,"SPAN",{});var Gi=o(_t);oa=u(Gi,"Contribute"),Gi.forEach(t),mr.forEach(t),Zt=f(e),Re=i(e,"P",{});var Ai=o(Re);na=u(Ai,"This document is far from being complete and a lot more needs to be added, so if you have additions or corrections to make please don\u2019t hesitate to open a PR or if you aren\u2019t sure start an Issue and we can discuss the details there."),Ai.forEach(t),er=f(e),De=i(e,"P",{});var Si=o(De);sa=u(Si,"When making contributions that A is better than B, please try to include a reproducible benchmark and/or a link to the source of that information (unless it comes directly from you)."),Si.forEach(t),this.h()},h(){s(c,"name","hf:doc:metadata"),s(c,"content",JSON.stringify(Wi)),s(y,"id","performance-and-scalability"),s(y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(y,"href","#performance-and-scalability"),s(m,"class","relative group"),Hi(me.src,la="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/perf_overview.png")||s(me,"src",la),s(me,"alt","perf_overview"),s(z,"id","training"),s(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(z,"href","#training"),s(E,"class","relative group"),s(W,"id","single-gpu"),s(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(W,"href","#single-gpu"),s(b,"class","relative group"),s(_e,"href","perf_train_gpu_one"),s(B,"id","multigpu"),s(B,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(B,"href","#multigpu"),s(U,"class","relative group"),s(ye,"href","perf_train_gpu_many"),s(R,"id","cpu"),s(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(R,"href","#cpu"),s(k,"class","relative group"),s(be,"href","perf_train_cpu"),s(D,"id","tpu"),s(D,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(D,"href","#tpu"),s(G,"class","relative group"),s(ke,"href","perf_train_tpu"),s(L,"id","specialized-hardware"),s(L,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(L,"href","#specialized-hardware"),s(A,"class","relative group"),s(Ae,"href","perf_train_special"),s(J,"id","inference"),s(J,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(J,"href","#inference"),s(S,"class","relative group"),s(O,"id","cpu"),s(O,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(O,"href","#cpu"),s(N,"class","relative group"),s(Ce,"href","perf_infer_cpu"),s(j,"id","single-gpu"),s(j,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(j,"href","#single-gpu"),s(C,"class","relative group"),s(xe,"href","perf_infer_gpu_one"),s(F,"id","multigpu"),s(F,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(F,"href","#multigpu"),s(T,"class","relative group"),s(Ie,"href","perf_infer_gpu_many"),s(K,"id","specialized-hardware"),s(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(K,"href","#specialized-hardware"),s(x,"class","relative group"),s(ze,"href","perf_infer_special"),s(Q,"id","hardware"),s(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(Q,"href","#hardware"),s(H,"class","relative group"),s(Be,"href","perf_hardware"),s(V,"id","contribute"),s(V,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(V,"href","#contribute"),s(I,"class","relative group")},m(e,n){r(document.head,c),l(e,M,n),l(e,m,n),r(m,y),r(y,Le),g(X,Le,null),r(m,vr),r(m,Je),r(Je,dr),l(e,$t,n),l(e,ue,n),r(ue,gr),l(e,yt,n),l(e,ce,n),r(ce,me),l(e,Et,n),l(e,ve,n),r(ve,wr),l(e,bt,n),l(e,E,n),r(E,z),r(z,Oe),g(Y,Oe,null),r(E,_r),r(E,je),r(je,Pr),l(e,Ut,n),l(e,de,n),r(de,$r),l(e,kt,n),g(q,e,n),l(e,Gt,n),l(e,b,n),r(b,W),r(W,Fe),g(Z,Fe,null),r(b,yr),r(b,Ke),r(Ke,Er),l(e,At,n),l(e,ge,n),r(ge,br),l(e,St,n),l(e,we,n),r(we,_e),r(_e,Ur),l(e,Nt,n),l(e,U,n),r(U,B),r(B,Qe),g(ee,Qe,null),r(U,kr),r(U,Ve),r(Ve,Gr),l(e,Ct,n),l(e,Pe,n),r(Pe,Ar),l(e,Tt,n),l(e,$e,n),r($e,ye),r(ye,Sr),l(e,xt,n),l(e,k,n),r(k,R),r(R,Xe),g(te,Xe,null),r(k,Nr),r(k,Ye),r(Ye,Cr),l(e,Ht,n),l(e,Ee,n),r(Ee,be),r(be,Tr),l(e,It,n),l(e,G,n),r(G,D),r(D,Ze),g(re,Ze,null),r(G,xr),r(G,et),r(et,Hr),l(e,Mt,n),l(e,Ue,n),r(Ue,ke),r(ke,tt),r(tt,Ir),l(e,zt,n),l(e,A,n),r(A,L),r(L,rt),g(ae,rt,null),r(A,Mr),r(A,at),r(at,zr),l(e,qt,n),l(e,Ge,n),r(Ge,Ae),r(Ae,it),r(it,qr),l(e,Wt,n),l(e,S,n),r(S,J),r(J,ot),g(ie,ot,null),r(S,Wr),r(S,nt),r(nt,Br),l(e,Bt,n),l(e,Se,n),r(Se,Rr),l(e,Rt,n),l(e,N,n),r(N,O),r(O,st),g(oe,st,null),r(N,Dr),r(N,lt),r(lt,Lr),l(e,Dt,n),l(e,Ne,n),r(Ne,Ce),r(Ce,Jr),l(e,Lt,n),l(e,C,n),r(C,j),r(j,ht),g(ne,ht,null),r(C,Or),r(C,ft),r(ft,jr),l(e,Jt,n),l(e,Te,n),r(Te,xe),r(xe,Fr),l(e,Ot,n),l(e,T,n),r(T,F),r(F,pt),g(se,pt,null),r(T,Kr),r(T,ut),r(ut,Qr),l(e,jt,n),l(e,He,n),r(He,Ie),r(Ie,Vr),l(e,Ft,n),l(e,x,n),r(x,K),r(K,ct),g(le,ct,null),r(x,Xr),r(x,mt),r(mt,Yr),l(e,Kt,n),l(e,Me,n),r(Me,ze),r(ze,vt),r(vt,Zr),l(e,Qt,n),l(e,H,n),r(H,Q),r(Q,dt),g(he,dt,null),r(H,ea),r(H,gt),r(gt,ta),l(e,Vt,n),l(e,qe,n),r(qe,ra),l(e,Xt,n),l(e,We,n),r(We,Be),r(Be,aa),l(e,Yt,n),l(e,I,n),r(I,V),r(V,wt),g(fe,wt,null),r(I,ia),r(I,_t),r(_t,oa),l(e,Zt,n),l(e,Re,n),r(Re,na),l(e,er,n),l(e,De,n),r(De,sa),tr=!0},p(e,[n]){const pe={};n&2&&(pe.$$scope={dirty:n,ctx:e}),q.$set(pe)},i(e){tr||(w(X.$$.fragment,e),w(Y.$$.fragment,e),w(q.$$.fragment,e),w(Z.$$.fragment,e),w(ee.$$.fragment,e),w(te.$$.fragment,e),w(re.$$.fragment,e),w(ae.$$.fragment,e),w(ie.$$.fragment,e),w(oe.$$.fragment,e),w(ne.$$.fragment,e),w(se.$$.fragment,e),w(le.$$.fragment,e),w(he.$$.fragment,e),w(fe.$$.fragment,e),tr=!0)},o(e){_(X.$$.fragment,e),_(Y.$$.fragment,e),_(q.$$.fragment,e),_(Z.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(re.$$.fragment,e),_(ae.$$.fragment,e),_(ie.$$.fragment,e),_(oe.$$.fragment,e),_(ne.$$.fragment,e),_(se.$$.fragment,e),_(le.$$.fragment,e),_(he.$$.fragment,e),_(fe.$$.fragment,e),tr=!1},d(e){t(c),e&&t(M),e&&t(m),P(X),e&&t($t),e&&t(ue),e&&t(yt),e&&t(ce),e&&t(Et),e&&t(ve),e&&t(bt),e&&t(E),P(Y),e&&t(Ut),e&&t(de),e&&t(kt),P(q,e),e&&t(Gt),e&&t(b),P(Z),e&&t(At),e&&t(ge),e&&t(St),e&&t(we),e&&t(Nt),e&&t(U),P(ee),e&&t(Ct),e&&t(Pe),e&&t(Tt),e&&t($e),e&&t(xt),e&&t(k),P(te),e&&t(Ht),e&&t(Ee),e&&t(It),e&&t(G),P(re),e&&t(Mt),e&&t(Ue),e&&t(zt),e&&t(A),P(ae),e&&t(qt),e&&t(Ge),e&&t(Wt),e&&t(S),P(ie),e&&t(Bt),e&&t(Se),e&&t(Rt),e&&t(N),P(oe),e&&t(Dt),e&&t(Ne),e&&t(Lt),e&&t(C),P(ne),e&&t(Jt),e&&t(Te),e&&t(Ot),e&&t(T),P(se),e&&t(jt),e&&t(He),e&&t(Ft),e&&t(x),P(le),e&&t(Kt),e&&t(Me),e&&t(Qt),e&&t(H),P(he),e&&t(Vt),e&&t(qe),e&&t(Xt),e&&t(We),e&&t(Yt),e&&t(I),P(fe),e&&t(Zt),e&&t(Re),e&&t(er),e&&t(De)}}}const Wi={local:"performance-and-scalability",sections:[{local:"training",sections:[{local:"single-gpu",title:"Single GPU"},{local:"multigpu",title:"Multi-GPU"},{local:"cpu",title:"CPU"},{local:"tpu",title:"TPU"},{local:"specialized-hardware",title:"Specialized Hardware"}],title:"Training"},{local:"inference",sections:[{local:"cpu",title:"CPU"},{local:"single-gpu",title:"Single GPU"},{local:"multigpu",title:"Multi-GPU"},{local:"specialized-hardware",title:"Specialized Hardware"}],title:"Inference"},{local:"hardware",title:"Hardware"},{local:"contribute",title:"Contribute"}],title:"Performance and Scalability"};function Bi(Pt){return Ii(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ji extends Ni{constructor(c){super();Ci(this,c,Bi,qi,Ti,{})}}export{Ji as default,Wi as metadata};
