import{s as ce,n as Te,o as be}from"../chunks/scheduler.6efaaf90.js";import{S as ye,i as xe,e as u,s,c as i,h as Ie,a as d,d as n,b as a,f as he,g as r,j as P,k as we,l as Me,m as l,n as p,t as m,o as $,p as f}from"../chunks/index.eb3e1f0f.js";import{C as Ce,H as E,E as ve}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.bc356b46.js";import{C as H}from"../chunks/CodeBlock.1ecb727a.js";function ke(me){let o,Z,Y,N,g,R,h,j,w,$e=`You can install <code>text-embeddings-inference</code> locally to run it on your own machine with a GPU.
To make sure that your hardware is supported, check out the <a href="supported_models">Supported models and hardware</a> page.`,D,c,F,T,fe="Make sure you have CUDA and the NVIDIA drivers installed - NVIDIA drivers on your device need to be compatible with CUDA version 12.2 or higher.",B,b,oe="Add the NVIDIA binaries to your path:",W,y,X,x,z,I,ue='<a href="https://rustup.rs/" rel="nofollow">Install Rust</a> on your machine by run the following in your terminal, then following the instructions:',Q,M,q,C,O,v,de="This step  can take a while as we need to compile a lot of CUDA kernels.",K,k,ee,U,te,J,ne,_,le,S,se,G,ge="You can now launch Text Embeddings Inference on GPU with:",ae,L,ie,A,re,V,pe;return g=new Ce({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),h=new E({props:{title:"Using TEI locally with GPU",local:"using-tei-locally-with-gpu",headingTag:"h1"}}),c=new E({props:{title:"Step 1: CUDA and NVIDIA drivers",local:"step-1-cuda-and-nvidia-drivers",headingTag:"h2"}}),y=new H({props:{code:"ZXhwb3J0JTIwUEFUSCUzRCUyNFBBVEglM0ElMkZ1c3IlMkZsb2NhbCUyRmN1ZGElMkZiaW4=",highlighted:"export PATH=$PATH:/usr/local/cuda/bin",wrap:!1}}),x=new E({props:{title:"Step 2: Install Rust",local:"step-2-install-rust",headingTag:"h2"}}),M=new H({props:{code:"Y3VybCUyMC0tcHJvdG8lMjAnJTNEaHR0cHMnJTIwLS10bHN2MS4yJTIwLXNTZiUyMGh0dHBzJTNBJTJGJTJGc2gucnVzdHVwLnJzJTIwJTdDJTIwc2g=",highlighted:"curl --proto &#x27;=https&#x27; --tlsv1.2 -sSf https://sh.rustup.rs | sh",wrap:!1}}),C=new E({props:{title:"Step 3: Install necessary packages",local:"step-3-install-necessary-packages",headingTag:"h2"}}),k=new E({props:{title:"For Turing GPUs (T4, RTX 2000 series … )",local:"for-turing-gpus-t4-rtx-2000-series--",headingTag:"h3"}}),U=new H({props:{code:"Y2FyZ28lMjBpbnN0YWxsJTIwLS1wYXRoJTIwcm91dGVyJTIwLUYlMjBjYW5kbGUtY3VkYS10dXJpbmc=",highlighted:"cargo install --path router -F candle-cuda-turing",wrap:!1}}),J=new E({props:{title:"For Ampere and Hopper",local:"for-ampere-and-hopper",headingTag:"h3"}}),_=new H({props:{code:"Y2FyZ28lMjBpbnN0YWxsJTIwLS1wYXRoJTIwcm91dGVyJTIwLUYlMjBjYW5kbGUtY3VkYQ==",highlighted:"cargo install --path router -F candle-cuda",wrap:!1}}),S=new E({props:{title:"Step 4: Launch Text Embeddings Inference",local:"step-4-launch-text-embeddings-inference",headingTag:"h2"}}),L=new H({props:{code:"bW9kZWwlM0RRd2VuJTJGUXdlbjMtRW1iZWRkaW5nLTAuNkIlMEElMEF0ZXh0LWVtYmVkZGluZ3Mtcm91dGVyJTIwLS1tb2RlbC1pZCUyMCUyNG1vZGVsJTIwLS1kdHlwZSUyMGZsb2F0MTYlMjAtLXBvcnQlMjA4MDgw",highlighted:`model=Qwen/Qwen3-Embedding-0.6B

text-embeddings-router --model-id $model --dtype float16 --port 8080`,wrap:!1}}),A=new ve({props:{source:"https://github.com/huggingface/text-embeddings-inference/blob/main/docs/source/en/local_gpu.md"}}),{c(){o=u("meta"),Z=s(),Y=u("p"),N=s(),i(g.$$.fragment),R=s(),i(h.$$.fragment),j=s(),w=u("p"),w.innerHTML=$e,D=s(),i(c.$$.fragment),F=s(),T=u("p"),T.textContent=fe,B=s(),b=u("p"),b.textContent=oe,W=s(),i(y.$$.fragment),X=s(),i(x.$$.fragment),z=s(),I=u("p"),I.innerHTML=ue,Q=s(),i(M.$$.fragment),q=s(),i(C.$$.fragment),O=s(),v=u("p"),v.textContent=de,K=s(),i(k.$$.fragment),ee=s(),i(U.$$.fragment),te=s(),i(J.$$.fragment),ne=s(),i(_.$$.fragment),le=s(),i(S.$$.fragment),se=s(),G=u("p"),G.textContent=ge,ae=s(),i(L.$$.fragment),ie=s(),i(A.$$.fragment),re=s(),V=u("p"),this.h()},l(e){const t=Ie("svelte-u9bgzb",document.head);o=d(t,"META",{name:!0,content:!0}),t.forEach(n),Z=a(e),Y=d(e,"P",{}),he(Y).forEach(n),N=a(e),r(g.$$.fragment,e),R=a(e),r(h.$$.fragment,e),j=a(e),w=d(e,"P",{"data-svelte-h":!0}),P(w)!=="svelte-ca5bh"&&(w.innerHTML=$e),D=a(e),r(c.$$.fragment,e),F=a(e),T=d(e,"P",{"data-svelte-h":!0}),P(T)!=="svelte-1xb6doe"&&(T.textContent=fe),B=a(e),b=d(e,"P",{"data-svelte-h":!0}),P(b)!=="svelte-mwtwrj"&&(b.textContent=oe),W=a(e),r(y.$$.fragment,e),X=a(e),r(x.$$.fragment,e),z=a(e),I=d(e,"P",{"data-svelte-h":!0}),P(I)!=="svelte-2fjw7p"&&(I.innerHTML=ue),Q=a(e),r(M.$$.fragment,e),q=a(e),r(C.$$.fragment,e),O=a(e),v=d(e,"P",{"data-svelte-h":!0}),P(v)!=="svelte-jes3wt"&&(v.textContent=de),K=a(e),r(k.$$.fragment,e),ee=a(e),r(U.$$.fragment,e),te=a(e),r(J.$$.fragment,e),ne=a(e),r(_.$$.fragment,e),le=a(e),r(S.$$.fragment,e),se=a(e),G=d(e,"P",{"data-svelte-h":!0}),P(G)!=="svelte-1bfdyk9"&&(G.textContent=ge),ae=a(e),r(L.$$.fragment,e),ie=a(e),r(A.$$.fragment,e),re=a(e),V=d(e,"P",{}),he(V).forEach(n),this.h()},h(){we(o,"name","hf:doc:metadata"),we(o,"content",Ue)},m(e,t){Me(document.head,o),l(e,Z,t),l(e,Y,t),l(e,N,t),p(g,e,t),l(e,R,t),p(h,e,t),l(e,j,t),l(e,w,t),l(e,D,t),p(c,e,t),l(e,F,t),l(e,T,t),l(e,B,t),l(e,b,t),l(e,W,t),p(y,e,t),l(e,X,t),p(x,e,t),l(e,z,t),l(e,I,t),l(e,Q,t),p(M,e,t),l(e,q,t),p(C,e,t),l(e,O,t),l(e,v,t),l(e,K,t),p(k,e,t),l(e,ee,t),p(U,e,t),l(e,te,t),p(J,e,t),l(e,ne,t),p(_,e,t),l(e,le,t),p(S,e,t),l(e,se,t),l(e,G,t),l(e,ae,t),p(L,e,t),l(e,ie,t),p(A,e,t),l(e,re,t),l(e,V,t),pe=!0},p:Te,i(e){pe||(m(g.$$.fragment,e),m(h.$$.fragment,e),m(c.$$.fragment,e),m(y.$$.fragment,e),m(x.$$.fragment,e),m(M.$$.fragment,e),m(C.$$.fragment,e),m(k.$$.fragment,e),m(U.$$.fragment,e),m(J.$$.fragment,e),m(_.$$.fragment,e),m(S.$$.fragment,e),m(L.$$.fragment,e),m(A.$$.fragment,e),pe=!0)},o(e){$(g.$$.fragment,e),$(h.$$.fragment,e),$(c.$$.fragment,e),$(y.$$.fragment,e),$(x.$$.fragment,e),$(M.$$.fragment,e),$(C.$$.fragment,e),$(k.$$.fragment,e),$(U.$$.fragment,e),$(J.$$.fragment,e),$(_.$$.fragment,e),$(S.$$.fragment,e),$(L.$$.fragment,e),$(A.$$.fragment,e),pe=!1},d(e){e&&(n(Z),n(Y),n(N),n(R),n(j),n(w),n(D),n(F),n(T),n(B),n(b),n(W),n(X),n(z),n(I),n(Q),n(q),n(O),n(v),n(K),n(ee),n(te),n(ne),n(le),n(se),n(G),n(ae),n(ie),n(re),n(V)),n(o),f(g,e),f(h,e),f(c,e),f(y,e),f(x,e),f(M,e),f(C,e),f(k,e),f(U,e),f(J,e),f(_,e),f(S,e),f(L,e),f(A,e)}}}const Ue='{"title":"Using TEI locally with GPU","local":"using-tei-locally-with-gpu","sections":[{"title":"Step 1: CUDA and NVIDIA drivers","local":"step-1-cuda-and-nvidia-drivers","sections":[],"depth":2},{"title":"Step 2: Install Rust","local":"step-2-install-rust","sections":[],"depth":2},{"title":"Step 3: Install necessary packages","local":"step-3-install-necessary-packages","sections":[{"title":"For Turing GPUs (T4, RTX 2000 series … )","local":"for-turing-gpus-t4-rtx-2000-series--","sections":[],"depth":3},{"title":"For Ampere and Hopper","local":"for-ampere-and-hopper","sections":[],"depth":3}],"depth":2},{"title":"Step 4: Launch Text Embeddings Inference","local":"step-4-launch-text-embeddings-inference","sections":[],"depth":2}],"depth":1}';function Je(me){return be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ae extends ye{constructor(o){super(),xe(this,o,Je,ke,ce,{})}}export{Ae as component};
