import{S as Je,i as Ye,s as ze,e as o,k as c,w as Ot,t as i,M as Ke,c as l,d as a,m as f,a as r,x as Ct,h as s,b as n,G as t,g as m,y as xt,L as Qe,q as Pt,o as kt,B as At,v as We}from"../chunks/vendor-hf-doc-builder.js";import{I as Ze}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as de}from"../chunks/CodeBlock-hf-doc-builder.js";function ta(ue){let g,st,_,v,Q,w,Nt,W,Ht,pt,E,Rt,Z,St,qt,ct,b,ft,S,Gt,mt,y,tt,$,q,Ut,Bt,G,Lt,Mt,h,I,U,T,Ft,Vt,B,et,Xt,jt,D,L,O,Jt,Yt,M,at,zt,Kt,C,F,x,Qt,Wt,V,ot,Zt,te,P,X,k,ee,ae,j,lt,oe,le,A,J,N,re,ne,Y,rt,ie,ht,z,se,dt,H,ut,d,pe,nt,ce,fe,it,me,he,gt,R,_t;return w=new Ze({}),b=new de({props:{code:"python -m pip install optimum",highlighted:"python -m pip install optimum"}}),H=new de({props:{code:"python -m pip install git+https://github.com/huggingface/optimum.git",highlighted:"python -m pip install git+https://github.com/huggingface/optimum.git"}}),R=new de({props:{code:"python -m pip install git+https://github.com/huggingface/optimum.git#egg=optimum[onnxruntime]",highlighted:'python -m pip install git+https://github.com/huggingface/optimum.git<span class="hljs-comment">#egg=optimum[onnxruntime]</span>'}}),{c(){g=o("meta"),st=c(),_=o("h1"),v=o("a"),Q=o("span"),Ot(w.$$.fragment),Nt=c(),W=o("span"),Ht=i("Installation"),pt=c(),E=o("p"),Rt=i("\u{1F917} Optimum can be installed using "),Z=o("code"),St=i("pip"),qt=i(" as follows:"),ct=c(),Ot(b.$$.fragment),ft=c(),S=o("p"),Gt=i("If you\u2019d like to use the accelerator-specific features of \u{1F917} Optimum, you can install the required dependencies according to the table below:"),mt=c(),y=o("table"),tt=o("thead"),$=o("tr"),q=o("th"),Ut=i("Accelerator"),Bt=c(),G=o("th"),Lt=i("Installation"),Mt=c(),h=o("tbody"),I=o("tr"),U=o("td"),T=o("a"),Ft=i("ONNX runtime"),Vt=c(),B=o("td"),et=o("code"),Xt=i("python -m pip install optimum[onnxruntime]"),jt=c(),D=o("tr"),L=o("td"),O=o("a"),Jt=i("Intel Neural Compressor (INC)"),Yt=c(),M=o("td"),at=o("code"),zt=i("python -m pip install optimum[neural-compressor]"),Kt=c(),C=o("tr"),F=o("td"),x=o("a"),Qt=i("Intel OpenVINO"),Wt=c(),V=o("td"),ot=o("code"),Zt=i("python -m pip install optimum[openvino,nncf]"),te=c(),P=o("tr"),X=o("td"),k=o("a"),ee=i("Graphcore IPU"),ae=c(),j=o("td"),lt=o("code"),oe=i("python -m pip install optimum[graphcore]"),le=c(),A=o("tr"),J=o("td"),N=o("a"),re=i("Habana Gaudi Processor (HPU)"),ne=c(),Y=o("td"),rt=o("code"),ie=i("python -m pip install optimum[habana]"),ht=c(),z=o("p"),se=i("If you\u2019d like to play with the examples or need the bleeding edge of the code and can\u2019t wait for a new release, you can install the base library from source as follows:"),dt=c(),Ot(H.$$.fragment),ut=c(),d=o("p"),pe=i("For the accelerator-specific features, you can install them by appending "),nt=o("code"),ce=i("#egg=optimum[accelerator_type]"),fe=i(" to the "),it=o("code"),me=i("pip"),he=i(" command, e.g."),gt=c(),Ot(R.$$.fragment),this.h()},l(e){const p=Ke('[data-svelte="svelte-1phssyn"]',document.head);g=l(p,"META",{name:!0,content:!0}),p.forEach(a),st=f(e),_=l(e,"H1",{class:!0});var vt=r(_);v=l(vt,"A",{id:!0,class:!0,href:!0});var ge=r(v);Q=l(ge,"SPAN",{});var _e=r(Q);Ct(w.$$.fragment,_e),_e.forEach(a),ge.forEach(a),Nt=f(vt),W=l(vt,"SPAN",{});var ve=r(W);Ht=s(ve,"Installation"),ve.forEach(a),vt.forEach(a),pt=f(e),E=l(e,"P",{});var Et=r(E);Rt=s(Et,"\u{1F917} Optimum can be installed using "),Z=l(Et,"CODE",{});var Ee=r(Z);St=s(Ee,"pip"),Ee.forEach(a),qt=s(Et," as follows:"),Et.forEach(a),ct=f(e),Ct(b.$$.fragment,e),ft=f(e),S=l(e,"P",{});var ye=r(S);Gt=s(ye,"If you\u2019d like to use the accelerator-specific features of \u{1F917} Optimum, you can install the required dependencies according to the table below:"),ye.forEach(a),mt=f(e),y=l(e,"TABLE",{});var yt=r(y);tt=l(yt,"THEAD",{});var we=r(tt);$=l(we,"TR",{});var wt=r($);q=l(wt,"TH",{align:!0});var be=r(q);Ut=s(be,"Accelerator"),be.forEach(a),Bt=f(wt),G=l(wt,"TH",{align:!0});var $e=r(G);Lt=s($e,"Installation"),$e.forEach(a),wt.forEach(a),we.forEach(a),Mt=f(yt),h=l(yt,"TBODY",{});var u=r(h);I=l(u,"TR",{});var bt=r(I);U=l(bt,"TD",{align:!0});var Ie=r(U);T=l(Ie,"A",{href:!0,rel:!0});var Te=r(T);Ft=s(Te,"ONNX runtime"),Te.forEach(a),Ie.forEach(a),Vt=f(bt),B=l(bt,"TD",{align:!0});var De=r(B);et=l(De,"CODE",{});var Oe=r(et);Xt=s(Oe,"python -m pip install optimum[onnxruntime]"),Oe.forEach(a),De.forEach(a),bt.forEach(a),jt=f(u),D=l(u,"TR",{});var $t=r(D);L=l($t,"TD",{align:!0});var Ce=r(L);O=l(Ce,"A",{href:!0,rel:!0});var xe=r(O);Jt=s(xe,"Intel Neural Compressor (INC)"),xe.forEach(a),Ce.forEach(a),Yt=f($t),M=l($t,"TD",{align:!0});var Pe=r(M);at=l(Pe,"CODE",{});var ke=r(at);zt=s(ke,"python -m pip install optimum[neural-compressor]"),ke.forEach(a),Pe.forEach(a),$t.forEach(a),Kt=f(u),C=l(u,"TR",{});var It=r(C);F=l(It,"TD",{align:!0});var Ae=r(F);x=l(Ae,"A",{href:!0,rel:!0});var Ne=r(x);Qt=s(Ne,"Intel OpenVINO"),Ne.forEach(a),Ae.forEach(a),Wt=f(It),V=l(It,"TD",{align:!0});var He=r(V);ot=l(He,"CODE",{});var Re=r(ot);Zt=s(Re,"python -m pip install optimum[openvino,nncf]"),Re.forEach(a),He.forEach(a),It.forEach(a),te=f(u),P=l(u,"TR",{});var Tt=r(P);X=l(Tt,"TD",{align:!0});var Se=r(X);k=l(Se,"A",{href:!0,rel:!0});var qe=r(k);ee=s(qe,"Graphcore IPU"),qe.forEach(a),Se.forEach(a),ae=f(Tt),j=l(Tt,"TD",{align:!0});var Ge=r(j);lt=l(Ge,"CODE",{});var Ue=r(lt);oe=s(Ue,"python -m pip install optimum[graphcore]"),Ue.forEach(a),Ge.forEach(a),Tt.forEach(a),le=f(u),A=l(u,"TR",{});var Dt=r(A);J=l(Dt,"TD",{align:!0});var Be=r(J);N=l(Be,"A",{href:!0,rel:!0});var Le=r(N);re=s(Le,"Habana Gaudi Processor (HPU)"),Le.forEach(a),Be.forEach(a),ne=f(Dt),Y=l(Dt,"TD",{align:!0});var Me=r(Y);rt=l(Me,"CODE",{});var Fe=r(rt);ie=s(Fe,"python -m pip install optimum[habana]"),Fe.forEach(a),Me.forEach(a),Dt.forEach(a),u.forEach(a),yt.forEach(a),ht=f(e),z=l(e,"P",{});var Ve=r(z);se=s(Ve,"If you\u2019d like to play with the examples or need the bleeding edge of the code and can\u2019t wait for a new release, you can install the base library from source as follows:"),Ve.forEach(a),dt=f(e),Ct(H.$$.fragment,e),ut=f(e),d=l(e,"P",{});var K=r(d);pe=s(K,"For the accelerator-specific features, you can install them by appending "),nt=l(K,"CODE",{});var Xe=r(nt);ce=s(Xe,"#egg=optimum[accelerator_type]"),Xe.forEach(a),fe=s(K," to the "),it=l(K,"CODE",{});var je=r(it);me=s(je,"pip"),je.forEach(a),he=s(K," command, e.g."),K.forEach(a),gt=f(e),Ct(R.$$.fragment,e),this.h()},h(){n(g,"name","hf:doc:metadata"),n(g,"content",JSON.stringify(ea)),n(v,"id","installation"),n(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"),n(v,"href","#installation"),n(_,"class","relative group"),n(q,"align","left"),n(G,"align","left"),n(T,"href","https://onnxruntime.ai/docs/"),n(T,"rel","nofollow"),n(U,"align","left"),n(B,"align","left"),n(O,"href","https://www.intel.com/content/www/us/en/developer/tools/oneapi/neural-compressor.html"),n(O,"rel","nofollow"),n(L,"align","left"),n(M,"align","left"),n(x,"href","https://docs.openvino.ai/latest/index.html"),n(x,"rel","nofollow"),n(F,"align","left"),n(V,"align","left"),n(k,"href","https://www.graphcore.ai/products/ipu"),n(k,"rel","nofollow"),n(X,"align","left"),n(j,"align","left"),n(N,"href","https://habana.ai/training/"),n(N,"rel","nofollow"),n(J,"align","left"),n(Y,"align","left")},m(e,p){t(document.head,g),m(e,st,p),m(e,_,p),t(_,v),t(v,Q),xt(w,Q,null),t(_,Nt),t(_,W),t(W,Ht),m(e,pt,p),m(e,E,p),t(E,Rt),t(E,Z),t(Z,St),t(E,qt),m(e,ct,p),xt(b,e,p),m(e,ft,p),m(e,S,p),t(S,Gt),m(e,mt,p),m(e,y,p),t(y,tt),t(tt,$),t($,q),t(q,Ut),t($,Bt),t($,G),t(G,Lt),t(y,Mt),t(y,h),t(h,I),t(I,U),t(U,T),t(T,Ft),t(I,Vt),t(I,B),t(B,et),t(et,Xt),t(h,jt),t(h,D),t(D,L),t(L,O),t(O,Jt),t(D,Yt),t(D,M),t(M,at),t(at,zt),t(h,Kt),t(h,C),t(C,F),t(F,x),t(x,Qt),t(C,Wt),t(C,V),t(V,ot),t(ot,Zt),t(h,te),t(h,P),t(P,X),t(X,k),t(k,ee),t(P,ae),t(P,j),t(j,lt),t(lt,oe),t(h,le),t(h,A),t(A,J),t(J,N),t(N,re),t(A,ne),t(A,Y),t(Y,rt),t(rt,ie),m(e,ht,p),m(e,z,p),t(z,se),m(e,dt,p),xt(H,e,p),m(e,ut,p),m(e,d,p),t(d,pe),t(d,nt),t(nt,ce),t(d,fe),t(d,it),t(it,me),t(d,he),m(e,gt,p),xt(R,e,p),_t=!0},p:Qe,i(e){_t||(Pt(w.$$.fragment,e),Pt(b.$$.fragment,e),Pt(H.$$.fragment,e),Pt(R.$$.fragment,e),_t=!0)},o(e){kt(w.$$.fragment,e),kt(b.$$.fragment,e),kt(H.$$.fragment,e),kt(R.$$.fragment,e),_t=!1},d(e){a(g),e&&a(st),e&&a(_),At(w),e&&a(pt),e&&a(E),e&&a(ct),At(b,e),e&&a(ft),e&&a(S),e&&a(mt),e&&a(y),e&&a(ht),e&&a(z),e&&a(dt),At(H,e),e&&a(ut),e&&a(d),e&&a(gt),At(R,e)}}}const ea={local:"installation",title:"Installation"};function aa(ue){return We(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class na extends Je{constructor(g){super();Ye(this,g,aa,ta,ze,{})}}export{na as default,ea as metadata};
