import{s as Y,n as K,o as D}from"../chunks/scheduler.56725da7.js";import{S as ee,i as te,e as o,s as i,c as $,h as ne,a as l,d as n,b as r,f as A,g as M,j as v,k as O,l as ae,m as a,n as T,t as x,o as k,p as W}from"../chunks/index.18a26576.js";import{C as ie}from"../chunks/CopyLLMTxtMenu.b9295305.js";import{C as Q}from"../chunks/CodeBlock.8f86d875.js";import{H as X}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.61bde07c.js";function re(G){let s,j,w,S,m,U,u,Z,p,N=`We provide pre-built Optimum Neuron containers for Amazon SageMaker. These containers come with all of the Hugging Face libraries and dependencies pre-installed, so you can start using them right away.
We have containers for training and inference, and optimized text generation containers with TGI. The table is up to date and only includes the latest versions of each container. You can find older versions in the <a href="https://github.com/aws/deep-learning-containers/releases?q=hf-neuronx&amp;expanded=true" rel="nofollow">Deep Learning Container Release Notes</a>`,I,c,E="It is possible to ure the <code>get_huggingface_llm_image_uri</code> function from the <code>sagemaker</code> Python SDK to retrieve the Text Generation Inference URI for the container you want to use.",C,d,V,f,F="If you have the Optimum Neuron package installed, you can use the function <code>image_uri</code> to retrieve the image URI for the container you want to use. The result is the same as the one retrieved by the <code>sagemaker</code> Python SDK, but the image URI retrieved can be newer than the one reported by the <code>sagemaker</code> Python SDK.",L,h,H,g,J,b,R="<thead><tr><th>Type</th> <th>Optimum Neuron Version</th> <th>Image URI</th></tr></thead> <tbody><tr><td>Training</td> <td>0.4.1</td> <td><code>763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-training-neuronx:2.8.0-transformers4.55.4-neuronx-py310-sdk2.26.0-ubuntu22.04</code></td></tr> <tr><td>Inference</td> <td>0.4.1</td> <td><code>763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-inference-neuronx:2.8.0-transformers4.55.4-neuronx-py310-sdk2.26.0-ubuntu22.04</code></td></tr> <tr><td>vLLM</td> <td>0.4.2</td> <td><code>763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-vllm-inference-neuronx:0.11.0-optimum0.4.2-neuronx-py310-sdk2.26.0-ubuntu22.04</code></td></tr></tbody>",P,y,q='Please replace <code>763104351884</code> with the correct <a href="https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/huggingface-neuronx.json" rel="nofollow">AWS account ID</a> and <code>region</code> with the AWS region you are working in.',z,_,B;return m=new ie({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),u=new X({props:{title:"Optimum Neuron Container",local:"optimum-neuron-container",headingTag:"h1"}}),d=new Q({props:{code:"ZnJvbSUyMHNhZ2VtYWtlci5pbWFnZV91cmlfY29uZmlnJTIwaW1wb3J0JTIwZ2V0X2h1Z2dpbmdmYWNlX2xsbV9pbWFnZV91cmklMEElMEFsbG1faW1hZ2UlMjAlM0QlMjBnZXRfaHVnZ2luZ2ZhY2VfbGxtX2ltYWdlX3VyaSglMjJodWdnaW5nZmFjZS1uZXVyb254JTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> sagemaker.image_uri_config <span class="hljs-keyword">import</span> get_huggingface_llm_image_uri

llm_image = get_huggingface_llm_image_uri(<span class="hljs-string">&quot;huggingface-neuronx&quot;</span>)`,wrap:!1}}),h=new Q({props:{code:"ZnJvbSUyMG9wdGltdW0ubmV1cm9uLnV0aWxzJTIwaW1wb3J0JTIwZWNyJTBBJTBBJTIzJTIwcmV0cmlldmUlMjB0aGUlMjBsbG0lMjBpbWFnZSUyMHVyaSUwQWxsbV9pbWFnZSUyMCUzRCUyMGVjci5pbWFnZV91cmkoJTIydGdpJTIyKSUwQSUwQXByaW50KGYlMjJsbG0lMjBpbWFnZSUyMHVyaSUzQSUyMCU3QmxsbV9pbWFnZSU3RCUyMiklMEE=",highlighted:`<span class="hljs-keyword">from</span> optimum.neuron.utils <span class="hljs-keyword">import</span> ecr

<span class="hljs-comment"># retrieve the llm image uri</span>
llm_image = ecr.image_uri(<span class="hljs-string">&quot;tgi&quot;</span>)

<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;llm image uri: <span class="hljs-subst">{llm_image}</span>&quot;</span>)
`,wrap:!1}}),g=new X({props:{title:"Available Optimum Neuron Containers",local:"available-optimum-neuron-containers",headingTag:"h2"}}),{c(){s=o("meta"),j=i(),w=o("p"),S=i(),$(m.$$.fragment),U=i(),$(u.$$.fragment),Z=i(),p=o("p"),p.innerHTML=N,I=i(),c=o("p"),c.innerHTML=E,C=i(),$(d.$$.fragment),V=i(),f=o("p"),f.innerHTML=F,L=i(),$(h.$$.fragment),H=i(),$(g.$$.fragment),J=i(),b=o("table"),b.innerHTML=R,P=i(),y=o("p"),y.innerHTML=q,z=i(),_=o("p"),this.h()},l(e){const t=ne("svelte-u9bgzb",document.head);s=l(t,"META",{name:!0,content:!0}),t.forEach(n),j=r(e),w=l(e,"P",{}),A(w).forEach(n),S=r(e),M(m.$$.fragment,e),U=r(e),M(u.$$.fragment,e),Z=r(e),p=l(e,"P",{"data-svelte-h":!0}),v(p)!=="svelte-1igdzgs"&&(p.innerHTML=N),I=r(e),c=l(e,"P",{"data-svelte-h":!0}),v(c)!=="svelte-1tk1ud5"&&(c.innerHTML=E),C=r(e),M(d.$$.fragment,e),V=r(e),f=l(e,"P",{"data-svelte-h":!0}),v(f)!=="svelte-s5vwt6"&&(f.innerHTML=F),L=r(e),M(h.$$.fragment,e),H=r(e),M(g.$$.fragment,e),J=r(e),b=l(e,"TABLE",{"data-svelte-h":!0}),v(b)!=="svelte-t11l8f"&&(b.innerHTML=R),P=r(e),y=l(e,"P",{"data-svelte-h":!0}),v(y)!=="svelte-87fx8j"&&(y.innerHTML=q),z=r(e),_=l(e,"P",{}),A(_).forEach(n),this.h()},h(){O(s,"name","hf:doc:metadata"),O(s,"content",se)},m(e,t){ae(document.head,s),a(e,j,t),a(e,w,t),a(e,S,t),T(m,e,t),a(e,U,t),T(u,e,t),a(e,Z,t),a(e,p,t),a(e,I,t),a(e,c,t),a(e,C,t),T(d,e,t),a(e,V,t),a(e,f,t),a(e,L,t),T(h,e,t),a(e,H,t),T(g,e,t),a(e,J,t),a(e,b,t),a(e,P,t),a(e,y,t),a(e,z,t),a(e,_,t),B=!0},p:K,i(e){B||(x(m.$$.fragment,e),x(u.$$.fragment,e),x(d.$$.fragment,e),x(h.$$.fragment,e),x(g.$$.fragment,e),B=!0)},o(e){k(m.$$.fragment,e),k(u.$$.fragment,e),k(d.$$.fragment,e),k(h.$$.fragment,e),k(g.$$.fragment,e),B=!1},d(e){e&&(n(j),n(w),n(S),n(U),n(Z),n(p),n(I),n(c),n(C),n(V),n(f),n(L),n(H),n(J),n(b),n(P),n(y),n(z),n(_)),n(s),W(m,e),W(u,e),W(d,e),W(h,e),W(g,e)}}}const se='{"title":"Optimum Neuron Container","local":"optimum-neuron-container","sections":[{"title":"Available Optimum Neuron Containers","local":"available-optimum-neuron-containers","sections":[],"depth":2}],"depth":1}';function oe(G){return D(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class de extends ee{constructor(s){super(),te(this,s,oe,re,Y,{})}}export{de as component};
