Buckets:
| import{s as ol,n as pl,o as rl}from"../chunks/scheduler.56725da7.js";import{S as Ml,i as cl,e as i,s,c as r,h as ml,a as o,d as l,b as a,f as al,g as M,j as p,k as il,l as ul,m as n,n as c,t as m,o as u,p as d}from"../chunks/index.18a26576.js";import{C as dl}from"../chunks/CopyLLMTxtMenu.a1f2bcd7.js";import{C as h}from"../chunks/CodeBlock.d6d1e300.js";import{H as Je}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.9f98faf7.js";function hl(bt){let y,we,Te,fe,T,Ue,j,be,J,gt='Mixtral 8x7B is an open-source LLM from Mistral AI. It is a Sparse Mixture of Experts and has a similar architecture to Mistral 7B, but comes with a twist: it’s actually 8 “expert” models in one. If you want to learn more about MoEs check out <a href="https://huggingface.co/blog/moe" rel="nofollow">Mixture of Experts Explained</a>.',ge,w,It='In this tutorial you will learn how to deploy <a href="https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1" rel="nofollow">mistralai/Mixtral-8x7B-Instruct-v0.1</a> model on AWS Inferentia2 with Hugging Face Optimum Neuron on Amazon SageMaker. We are going to use the Hugging Face vLLM Neuron Container, a purpose-built Inference Container to easily deploy LLMs on AWS Inferentia2 powered by <a href="https://github.com/vllm-project/vllm.git" rel="nofollow">vLLM</a> and <a href="https://huggingface.co/docs/optimum-neuron/index" rel="nofollow">Optimum Neuron</a>.',Ie,f,Ct="We will cover how to:",Ce,U,vt='<li><a href="#1-setup-development-environment">Setup a development environment</a></li> <li><a href="#2-retrieve-the-latest-hugging-face-vllm-neuron-dlc">Retrieve the latest Hugging Face vLLM Neuron DLC</a></li> <li><a href="#3-deploy-Mixtral-8x7B-to-inferentia2">Deploy Mixtral 8x7B to Inferentia2</a></li> <li><a href="#4-clean-up">Clean up</a></li>',ve,b,Bt="Lets get started! 🚀",Be,g,xt='<a href="https://aws.amazon.com/ec2/instance-types/inf2/" rel="nofollow">AWS inferentia (Inf2)</a> are purpose-built EC2 for deep learning (DL) inference workloads. Here are the different instances of the Inferentia2 family.',xe,I,Wt="<thead><tr><th>instance size</th> <th>accelerators</th> <th>Neuron Cores</th> <th>accelerator memory</th> <th>vCPU</th> <th>CPU Memory</th> <th>on-demand price ($/h)</th></tr></thead> <tbody><tr><td>inf2.xlarge</td> <td>1</td> <td>2</td> <td>32</td> <td>4</td> <td>16</td> <td>0.76</td></tr> <tr><td>inf2.8xlarge</td> <td>1</td> <td>2</td> <td>32</td> <td>32</td> <td>128</td> <td>1.97</td></tr> <tr><td>inf2.24xlarge</td> <td>6</td> <td>12</td> <td>192</td> <td>96</td> <td>384</td> <td>6.49</td></tr> <tr><td>inf2.48xlarge</td> <td>12</td> <td>24</td> <td>384</td> <td>192</td> <td>768</td> <td>12.98</td></tr></tbody>",We,C,Ze,v,Zt="For this tutorial, we are going to use a Notebook Instance in Amazon SageMaker with the Python 3 (ipykernel) and the <code>sagemaker</code> python SDK to deploy Mixtral 8x7B to a SageMaker inference endpoint.",Ne,B,Nt="Make sur you have the latest version of the SageMaker SDK installed.",$e,x,Ee,W,$t="Then, instantiate the sagemaker role and session.",_e,Z,ke,N,Se,$,Et='The latest Hugging Face vLLM Neuron DLCs can be used to run inference on AWS Inferentia2. To retrieve it you can use the method <code>image_uris.retrieve</code> of the Sagemaker SDK. However, if you have the Optimum Neuron package installed, you can use the <code>ecr.image_uri</code> function to retrieve the appropriate Hugging Face vLLM Neuron DLC URI based on your desired <code>region</code> and <code>version</code>. Default values can be deduced by your AWS credentials. For more details see the <a href="https://huggingface.co/docs/optimum-neuron/containers" rel="nofollow">containers</a> documentation.',Ge,E,Re,_,Ve,k,_t=`At the time of writing, <a href="https://awsdocs-neuron.readthedocs-hosted.com/en/v2.6.0/general/arch/neuron-features/dynamic-shapes.html#neuron-dynamic-shapes" rel="nofollow">AWS Inferentia2 does not support dynamic shapes for inference</a>, which means that we need to specify our sequence length and batch size ahead of time. | |
| To make it easier for customers to utilize the full power of Inferentia2, we created a <a href="https://huggingface.co/docs/optimum-neuron/guides/cache_system" rel="nofollow">neuron model cache</a>, which contains pre-compiled configurations for the most popular LLMs, including Mixtral 8x7B.`,He,S,kt=`This means we don’t need to compile the model ourselves, but we can use the pre-compiled model from the cache. You can find compiled/cached configurations on the | |
| <a href="https://huggingface.co/aws-neuron/optimum-neuron-cache/tree/main/inference-cache-config" rel="nofollow">Hugging Face Hub</a>. If your desired configuration is not yet cached, you can compile it yourself using the <a href="https://huggingface.co/docs/optimum-neuron/guides/export_model" rel="nofollow">Optimum CLI</a> or open a request at the <a href="https://huggingface.co/aws-neuron/optimum-neuron-cache/discussions" rel="nofollow">Cache repository</a>.`,Qe,G,St='Let’s check the different configurations that are in the cache. For that you first need to log in the Hugging Face Hub, using a <a href="https://huggingface.co/docs/hub/en/security-tokens" rel="nofollow">User Access Token</a> with read access.',Ae,R,Gt='Make sure you have the necessary permissions to access the model. You can request access to the model <a href="https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1" rel="nofollow">here</a>.',Le,V,Fe,H,Rt="Then, we need to install the latest version of Optimum Neuron.",qe,Q,Xe,A,Vt="Finally, we can query the cache and retrieve the existing set of configurations for which we maintained a compiled version of the model.",Ye,L,ze,F,Ht="You should retrieve two entries in the cache:",Pe,q,De,X,Qt="<strong>Deploying Mixtral 8x7B to a SageMaker Endpoint</strong>",Oe,Y,At="All we need when deploying the model to Amazon SageMaker, is to set the Hugging Face model id and token.",Ke,z,Lt="<li><code>SM_ON_MODEL</code>: The Hugging Face model ID.</li> <li><code>HF_TOKEN</code>: The Hugging Face API token to access gated models.</li>",et,P,Ft="Note: even if your model is not gated, we recommend setting your Hugging Face token to avoid rate limitations when fetching weights or pre-compiled neuron artifacts.",tt,D,qt="Optionally, you can specify some deployment parameters to select a specific cached configuration (otherwise a default one will be selected).",lt,O,Xt="<li><code>SM_ON_TENSOR_PARALLEL_SIZE</code>: Number of Neuron Cores used for the compilation.</li> <li><code>SM_ON_BATCH_SIZE</code>: The batch size that was used to compile the model.</li> <li><code>SM_ON_SEQUENCE_LENGTH</code>: The sequence length that was used to compile the model.</li>",nt,K,Yt="<strong>Select the right instance type</strong>",st,ee,zt="Mixtral 8x7B is a large model and requires a lot of memory. We are going to use the <code>inf2.48xlarge</code> instance type, which has 192 vCPUs and 384 GB of accelerator memory. The <code>inf2.48xlarge</code> instance comes with 12 Inferentia2 accelerators that include 24 Neuron Cores. In our case we will use a batch size of 4 and a sequence length of 4096.",at,te,Pt="After that we can create our endpoint configuration and deploy the model to Amazon SageMaker. It will be fully compatible with the OpenAI Chat Completion API.",it,le,ot,ne,Dt="After we have created the <code>Model</code> we need to define a deployment configuration. We will deploy the model with the <code>ml.inf2.48xlarge</code> instance type. vLLM will automatically distribute and shard the model across all Inferentia devices.",pt,se,rt,ae,Ot="We can now deploy the <code>Model</code> to an <code>Endpoint</code>.",Mt,ie,ct,oe,Kt="SageMaker will now create our endpoint and deploy the model to it. It takes around 15 minutes for deployment.",mt,pe,el="After our endpoint is deployed we can run inference on it. We will use the <code>invoke</code> method from the endpoint to run inference on our endpoint.",ut,re,tl="The endpoint supports the Messages API, which is fully compatible with the OpenAI Chat Completion API. The Messages API allows us to interact with the model in a conversational way. We can define the role of the message and the content. The role can be either <code>system</code>,<code>assistant</code> or <code>user</code>. The <code>system</code> role is used to provide context to the model and the <code>user</code> role is used to ask questions or provide input to the model.",dt,Me,ll='Parameters can be defined as separate attributes of the payload. Check out the chat completion <a href="https://platform.openai.com/docs/api-reference/chat/create" rel="nofollow">documentation</a> to find supported parameters.',ht,ce,yt,me,nl="Okay lets test it.",Tt,ue,jt,de,Jt,he,sl="To clean up, we can delete the model and endpoint.",wt,ye,ft,je,Ut;return T=new dl({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),j=new Je({props:{title:"Deploy Mixtral 8x7B on AWS Inferentia2",local:"deploy-mixtral-8x7b-on-aws-inferentia2",headingTag:"h1"}}),C=new Je({props:{title:"1. Setup development environment",local:"1-setup-development-environment",headingTag:"h2"}}),x=new h({props:{code:"IXBpcCUyMGluc3RhbGwlMjBzYWdlbWFrZXIlMjAtLXVwZ3JhZGUlMjAtLXF1aWV0",highlighted:"!pip install sagemaker --upgrade --quiet",lang:"python",wrap:!1}}),Z=new h({props:{code:"aW1wb3J0JTIwYm90bzMlMEFmcm9tJTIwc2FnZW1ha2VyLmNvcmUuaGVscGVyLnNlc3Npb25faGVscGVyJTIwaW1wb3J0JTIwZ2V0X2V4ZWN1dGlvbl9yb2xlJTBBJTBBdHJ5JTNBJTBBJTIwJTIwJTIwJTIwcm9sZSUyMCUzRCUyMGdldF9leGVjdXRpb25fcm9sZSgpJTBBZXhjZXB0JTIwVmFsdWVFcnJvciUzQSUwQSUyMCUyMCUyMCUyMGlhbSUyMCUzRCUyMGJvdG8zLmNsaWVudCglMjJpYW0lMjIpJTBBJTIwJTIwJTIwJTIwcm9sZSUyMCUzRCUyMGlhbS5nZXRfcm9sZShSb2xlTmFtZSUzRCUyMnNhZ2VtYWtlcl9leGVjdXRpb25fcm9sZSUyMiklNUIlMjJSb2xlJTIyJTVEJTVCJTIyQXJuJTIyJTVEJTBBJTBBcHJpbnQoZiUyMnNhZ2VtYWtlciUyMHJvbGUlMjBhcm4lM0ElMjAlN0Jyb2xlJTdEJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> boto3 | |
| <span class="hljs-keyword">from</span> sagemaker.core.helper.session_helper <span class="hljs-keyword">import</span> get_execution_role | |
| <span class="hljs-keyword">try</span>: | |
| role = get_execution_role() | |
| <span class="hljs-keyword">except</span> ValueError: | |
| iam = boto3.client(<span class="hljs-string">"iam"</span>) | |
| role = iam.get_role(RoleName=<span class="hljs-string">"sagemaker_execution_role"</span>)[<span class="hljs-string">"Role"</span>][<span class="hljs-string">"Arn"</span>] | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"sagemaker role arn: <span class="hljs-subst">{role}</span>"</span>)`,lang:"python",wrap:!1}}),N=new Je({props:{title:"2. Retrieve the latest Hugging Face vLLM Neuron DLC",local:"2-retrieve-the-latest-hugging-face-vllm-neuron-dlc",headingTag:"h2"}}),E=new h({props:{code:"IXBpcCUyMGluc3RhbGwlMjBvcHRpbXVtLW5ldXJvbiU1Qm5ldXJvbnglNUQlMEFmcm9tJTIwb3B0aW11bS5uZXVyb24udXRpbHMlMjBpbXBvcnQlMjBlY3IlMEElMEFSRUdJT04lMjAlM0QlMjAlMjJ1cy1lYXN0LTElMjIlMEFsbG1faW1hZ2UlMjAlM0QlMjBlY3IuaW1hZ2VfdXJpKCUyMnZsbG0lMjIlMkMlMjByZWdpb24lM0RSRUdJT04pJTBBJTIzJTIwcHJpbnQlMjBpbWFnZSUyMHVyaSUwQXByaW50KGYlMjJsbG0lMjBpbWFnZSUyMHVyaSUzQSUyMCU3QmxsbV9pbWFnZSU3RCUyMik=",highlighted:`!pip install optimum-neuron[neuronx] | |
| <span class="hljs-keyword">from</span> optimum.neuron.utils <span class="hljs-keyword">import</span> ecr | |
| REGION = <span class="hljs-string">"us-east-1"</span> | |
| llm_image = ecr.image_uri(<span class="hljs-string">"vllm"</span>, region=REGION) | |
| <span class="hljs-comment"># print image uri</span> | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"llm image uri: <span class="hljs-subst">{llm_image}</span>"</span>)`,lang:"python",wrap:!1}}),_=new Je({props:{title:"3. Deploy Mixtral 8x7B to Inferentia2",local:"3-deploy-mixtral-8x7b-to-inferentia2",headingTag:"h2"}}),V=new h({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login | |
| notebook_login()`,lang:"python",wrap:!1}}),Q=new h({props:{code:"IXBpcCUyMGluc3RhbGwlMjBvcHRpbXVtLW5ldXJvbiUyMC0tdXBncmFkZSUyMC0tcXVpZXQ=",highlighted:"!pip install optimum-neuron --upgrade --quiet",lang:"python",wrap:!1}}),L=new h({props:{code:"IW9wdGltdW0tY2xpJTIwbmV1cm9uJTIwY2FjaGUlMjBsb29rdXAlMjAlMjJtaXN0cmFsYWklMkZNaXh0cmFsLTh4N0ItSW5zdHJ1Y3QtdjAuMSUyMg==",highlighted:'!optimum-cli neuron cache lookup <span class="hljs-string">"mistralai/Mixtral-8x7B-Instruct-v0.1"</span>',lang:"python",wrap:!1}}),q=new h({props:{code:"KioqJTIwMiUyMGVudHJpZShzKSUyMGZvdW5kJTIwaW4lMjBjYWNoZSUyMGZvciUyMG1pc3RyYWxhaSUyRk1peHRyYWwtOHg3Qi1JbnN0cnVjdC12MC4xJTIwZm9yJTIwaW5mZXJlbmNlLioqKiUwQSUwQWF1dG9fY2FzdF90eXBlJTNBJTIwYmYxNiUwQWJhdGNoX3NpemUlM0ElMjAxJTBBY2hlY2twb2ludF9pZCUzQSUyMG1pc3RyYWxhaSUyRk1peHRyYWwtOHg3Qi1JbnN0cnVjdC12MC4xJTBBY2hlY2twb2ludF9yZXZpc2lvbiUzQSUyMDQxYmQ0YzllN2U0ZmIzMThjYTQwZTcyMTEzMWQ0OTMzOTY2YzJjYzElMEFjb21waWxlcl90eXBlJTNBJTIwbmV1cm9ueC1jYyUwQWNvbXBpbGVyX3ZlcnNpb24lM0ElMjAyLjE2LjM3Mi4wJTJCNGE5YjIzMjYlMEFudW1fY29yZXMlM0ElMjAyNCUwQXNlcXVlbmNlX2xlbmd0aCUzQSUyMDQwOTYlMEF0YXNrJTNBJTIwdGV4dC1nZW5lcmF0aW9uJTBBJTBBYXV0b19jYXN0X3R5cGUlM0ElMjBiZjE2JTBBYmF0Y2hfc2l6ZSUzQSUyMDQlMEFjaGVja3BvaW50X2lkJTNBJTIwbWlzdHJhbGFpJTJGTWl4dHJhbC04eDdCLUluc3RydWN0LXYwLjElMEFjaGVja3BvaW50X3JldmlzaW9uJTNBJTIwNDFiZDRjOWU3ZTRmYjMxOGNhNDBlNzIxMTMxZDQ5MzM5NjZjMmNjMSUwQWNvbXBpbGVyX3R5cGUlM0ElMjBuZXVyb254LWNjJTBBY29tcGlsZXJfdmVyc2lvbiUzQSUyMDIuMTYuMzcyLjAlMkI0YTliMjMyNiUwQW51bV9jb3JlcyUzQSUyMDI0JTBBc2VxdWVuY2VfbGVuZ3RoJTNBJTIwNDA5NiUwQXRhc2slM0ElMjB0ZXh0LWdlbmVyYXRpb24=",highlighted:`<span class="hljs-string">***</span> <span class="hljs-number">2</span> <span class="hljs-string">entrie(s)</span> <span class="hljs-string">found</span> <span class="hljs-string">in</span> <span class="hljs-string">cache</span> <span class="hljs-string">for</span> <span class="hljs-string">mistralai/Mixtral-8x7B-Instruct-v0.1</span> <span class="hljs-string">for</span> <span class="hljs-string">inference.***</span> | |
| <span class="hljs-attr">auto_cast_type:</span> <span class="hljs-string">bf16</span> | |
| <span class="hljs-attr">batch_size:</span> <span class="hljs-number">1</span> | |
| <span class="hljs-attr">checkpoint_id:</span> <span class="hljs-string">mistralai/Mixtral-8x7B-Instruct-v0.1</span> | |
| <span class="hljs-attr">checkpoint_revision:</span> <span class="hljs-string">41bd4c9e7e4fb318ca40e721131d4933966c2cc1</span> | |
| <span class="hljs-attr">compiler_type:</span> <span class="hljs-string">neuronx-cc</span> | |
| <span class="hljs-attr">compiler_version:</span> <span class="hljs-number">2.16</span><span class="hljs-number">.372</span><span class="hljs-number">.0</span><span class="hljs-string">+4a9b2326</span> | |
| <span class="hljs-attr">num_cores:</span> <span class="hljs-number">24</span> | |
| <span class="hljs-attr">sequence_length:</span> <span class="hljs-number">4096</span> | |
| <span class="hljs-attr">task:</span> <span class="hljs-string">text-generation</span> | |
| <span class="hljs-attr">auto_cast_type:</span> <span class="hljs-string">bf16</span> | |
| <span class="hljs-attr">batch_size:</span> <span class="hljs-number">4</span> | |
| <span class="hljs-attr">checkpoint_id:</span> <span class="hljs-string">mistralai/Mixtral-8x7B-Instruct-v0.1</span> | |
| <span class="hljs-attr">checkpoint_revision:</span> <span class="hljs-string">41bd4c9e7e4fb318ca40e721131d4933966c2cc1</span> | |
| <span class="hljs-attr">compiler_type:</span> <span class="hljs-string">neuronx-cc</span> | |
| <span class="hljs-attr">compiler_version:</span> <span class="hljs-number">2.16</span><span class="hljs-number">.372</span><span class="hljs-number">.0</span><span class="hljs-string">+4a9b2326</span> | |
| <span class="hljs-attr">num_cores:</span> <span class="hljs-number">24</span> | |
| <span class="hljs-attr">sequence_length:</span> <span class="hljs-number">4096</span> | |
| <span class="hljs-attr">task:</span> <span class="hljs-string">text-generation</span>`,lang:"code",wrap:!1}}),le=new h({props:{code:"ZnJvbSUyMHNhZ2VtYWtlci5jb3JlLnJlc291cmNlcyUyMGltcG9ydCUyME1vZGVsJTJDJTIwQ29udGFpbmVyRGVmaW5pdGlvbiUwQSUwQSUwQSUyMyUyMERlZmluZSUyME1vZGVsJTIwYW5kJTIwRW5kcG9pbnQlMjBjb25maWd1cmF0aW9uJTIwcGFyYW1ldGVyJTBBZW52aXJvbm1lbnQlMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJTTV9PTl9NT0RFTCUyMiUzQSUyMCUyMm1pc3RyYWxhaSUyRk1peHRyYWwtOHg3Qi1JbnN0cnVjdC12MC4xJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyU01fT05fQkFUQ0hfU0laRSUyMiUzQSUyMCUyMjElMjIlMkMlMjAlMjAlMjMlMjBTZWxlY3QlMjB0aGUlMjBjb25maWd1cmF0aW9uJTIwd2l0aCUyMGJhdGNoJTIwc2l6ZSUyMDElMEElMjAlMjAlMjAlMjAlMjJIRl9UT0tFTiUyMiUzQSUyMCUyMiUzQ1JFUExBQ0UlMjBXSVRIJTIwWU9VUiUyMFRPS0VOJTNFJTIyJTJDJTBBJTdEJTBBJTBBYXNzZXJ0JTIwZW52aXJvbm1lbnQlNUIlMjJIRl9UT0tFTiUyMiU1RCUyMCElM0QlMjAlMjIlM0NSRVBMQUNFJTIwV0lUSCUyMFlPVVIlMjBUT0tFTiUzRSUyMiUyQyUyMCglMEElMjAlMjAlMjAlMjAlMjJQbGVhc2UlMjByZXBsYWNlJTIwJyUzQ1JFUExBQ0UlMjBXSVRIJTIwWU9VUiUyMFRPS0VOJTNFJyUyMHdpdGglMjB5b3VyJTIwSHVnZ2luZyUyMEZhY2UlMjBIdWIlMjBBUEklMjB0b2tlbiUyMiUwQSklMEElMEFjb250YWluZXIlMjAlM0QlMjBDb250YWluZXJEZWZpbml0aW9uKGltYWdlJTNEbGxtX2ltYWdlJTJDJTIwZW52aXJvbm1lbnQlM0RlbnZpcm9ubWVudCklMEElMEElMjMlMjBjcmVhdGUlMjBNb2RlbCUyMHdpdGglMjB0aGUlMjBjb250YWluZXIlMjBkZWZpbml0aW9uJTBBbW9kZWwlMjAlM0QlMjBNb2RlbC5jcmVhdGUoJTBBJTIwJTIwJTIwJTIwbW9kZWxfbmFtZSUzRCUyMm1peHRyYWwtOHg3Yi1uZXVyb254LW1vZGVsJTIyJTJDJTIwcHJpbWFyeV9jb250YWluZXIlM0Rjb250YWluZXIlMkMlMjBleGVjdXRpb25fcm9sZV9hcm4lM0Ryb2xlJTJDJTIwcmVnaW9uJTNEUkVHSU9OJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> sagemaker.core.resources <span class="hljs-keyword">import</span> Model, ContainerDefinition | |
| <span class="hljs-comment"># Define Model and Endpoint configuration parameter</span> | |
| environment = { | |
| <span class="hljs-string">"SM_ON_MODEL"</span>: <span class="hljs-string">"mistralai/Mixtral-8x7B-Instruct-v0.1"</span>, | |
| <span class="hljs-string">"SM_ON_BATCH_SIZE"</span>: <span class="hljs-string">"1"</span>, <span class="hljs-comment"># Select the configuration with batch size 1</span> | |
| <span class="hljs-string">"HF_TOKEN"</span>: <span class="hljs-string">"<REPLACE WITH YOUR TOKEN>"</span>, | |
| } | |
| <span class="hljs-keyword">assert</span> environment[<span class="hljs-string">"HF_TOKEN"</span>] != <span class="hljs-string">"<REPLACE WITH YOUR TOKEN>"</span>, ( | |
| <span class="hljs-string">"Please replace '<REPLACE WITH YOUR TOKEN>' with your Hugging Face Hub API token"</span> | |
| ) | |
| container = ContainerDefinition(image=llm_image, environment=environment) | |
| <span class="hljs-comment"># create Model with the container definition</span> | |
| model = Model.create( | |
| model_name=<span class="hljs-string">"mixtral-8x7b-neuronx-model"</span>, primary_container=container, execution_role_arn=role, region=REGION | |
| )`,lang:"python",wrap:!1}}),se=new h({props:{code:"ZnJvbSUyMHNhZ2VtYWtlci5jb3JlLnJlc291cmNlcyUyMGltcG9ydCUyMEVuZHBvaW50Q29uZmlnJTJDJTIwUHJvZHVjdGlvblZhcmlhbnQlMEElMEElMjMlMjBzYWdlbWFrZXIlMjBjb25maWclMEFpbnN0YW5jZV90eXBlJTIwJTNEJTIwJTIybWwuaW5mMi40OHhsYXJnZSUyMiUwQWhlYWx0aF9jaGVja190aW1lb3V0JTIwJTNEJTIwMzYwMCUyMCUyMCUyMyUyMGFkZGl0aW9uYWwlMjB0aW1lJTIwdG8lMjBsb2FkJTIwdGhlJTIwbW9kZWwlMEF2b2x1bWVfc2l6ZSUyMCUzRCUyMDUxMiUyMCUyMCUyMyUyMHNpemUlMjBpbiUyMEdCJTIwb2YlMjB0aGUlMjBFQlMlMjB2b2x1bWUlMEElMEElMjMlMjBjcmVhdGUlMjBFbmRwb2ludENvbmZpZyUwQWVuZHBvaW50X2NvbmZpZyUyMCUzRCUyMEVuZHBvaW50Q29uZmlnKCUwQSUyMCUyMCUyMCUyMGVuZHBvaW50X2NvbmZpZ19uYW1lJTNEJTIybWl4dHJhbC04eDdiLWVuZHBvaW50LWNvbmZpZyUyMiUyQyUwQSUyMCUyMCUyMCUyMHByb2R1Y3Rpb25fdmFyaWFudHMlM0QlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBQcm9kdWN0aW9uVmFyaWFudCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtb2RlbF9uYW1lJTNEbW9kZWwubW9kZWxfbmFtZSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGluc3RhbmNlX3R5cGUlM0RpbnN0YW5jZV90eXBlJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaW5pdGlhbF9pbnN0YW5jZV9jb3VudCUzRDElMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBjb250YWluZXJfc3RhcnR1cF9oZWFsdGhfY2hlY2tfdGltZW91dCUzRGhlYWx0aF9jaGVja190aW1lb3V0JTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwdm9sdW1lX3NpemUlM0R2b2x1bWVfc2l6ZSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGVudmlyb25tZW50JTNEY29uZmlnJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaW1hZ2VfdXJpJTNEbGxtX2ltYWdlJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwKSUwQSUyMCUyMCUyMCUyMCU1RCUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> sagemaker.core.resources <span class="hljs-keyword">import</span> EndpointConfig, ProductionVariant | |
| <span class="hljs-comment"># sagemaker config</span> | |
| instance_type = <span class="hljs-string">"ml.inf2.48xlarge"</span> | |
| health_check_timeout = <span class="hljs-number">3600</span> <span class="hljs-comment"># additional time to load the model</span> | |
| volume_size = <span class="hljs-number">512</span> <span class="hljs-comment"># size in GB of the EBS volume</span> | |
| <span class="hljs-comment"># create EndpointConfig</span> | |
| endpoint_config = EndpointConfig( | |
| endpoint_config_name=<span class="hljs-string">"mixtral-8x7b-endpoint-config"</span>, | |
| production_variants=[ | |
| ProductionVariant( | |
| model_name=model.model_name, | |
| instance_type=instance_type, | |
| initial_instance_count=<span class="hljs-number">1</span>, | |
| container_startup_health_check_timeout=health_check_timeout, | |
| volume_size=volume_size, | |
| environment=config, | |
| image_uri=llm_image, | |
| ) | |
| ], | |
| )`,lang:"python",wrap:!1}}),ie=new h({props:{code:"ZnJvbSUyMHNhZ2VtYWtlci5jb3JlLnJlc291cmNlcyUyMGltcG9ydCUyMEVuZHBvaW50JTBBJTBBJTBBZW5kcG9pbnQlMjAlM0QlMjBFbmRwb2ludC5jcmVhdGUoJTBBJTIwJTIwJTIwJTIwZW5kcG9pbnRfbmFtZSUzRCUyMm1peHRyYWwtOHg3Yi1uZXVyb254LWVuZHBvaW50JTIyJTJDJTBBJTIwJTIwJTIwJTIwZW5kcG9pbnRfY29uZmlnX25hbWUlM0RlbmRwb2ludF9jb25maWcuZW5kcG9pbnRfY29uZmlnX25hbWUlMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> sagemaker.core.resources <span class="hljs-keyword">import</span> Endpoint | |
| endpoint = Endpoint.create( | |
| endpoint_name=<span class="hljs-string">"mixtral-8x7b-neuronx-endpoint"</span>, | |
| endpoint_config_name=endpoint_config.endpoint_config_name, | |
| )`,lang:"python",wrap:!1}}),ce=new h({props:{code:"JTIzJTIwUHJvbXB0JTIwdG8lMjBnZW5lcmF0ZSUwQW1lc3NhZ2VzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnN5c3RlbSUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJZb3UlMjBhcmUlMjBhJTIwaGVscGZ1bCUyMGFzc2lzdGFudC4lMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJXaGF0JTIwaXMlMjBkZWVwJTIwbGVhcm5pbmclMjBpbiUyMG9uZSUyMHNlbnRlbmNlJTNGJTIyJTdEJTJDJTBBJTVE",highlighted:`<span class="hljs-comment"># Prompt to generate</span> | |
| messages = [ | |
| {<span class="hljs-string">"role"</span>: <span class="hljs-string">"system"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"You are a helpful assistant."</span>}, | |
| {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"What is deep learning in one sentence?"</span>}, | |
| ]`,lang:"python",wrap:!1}}),ue=new h({props:{code:"aW1wb3J0JTIwanNvbiUwQSUwQSUyMyUyMEdlbmVyYXRpb24lMjBhcmd1bWVudHMlMjBodHRwcyUzQSUyRiUyRnBsYXRmb3JtLm9wZW5haS5jb20lMkZkb2NzJTJGYXBpLXJlZmVyZW5jZSUyRmNoYXQlMkZjcmVhdGUlMEFyZXN1bHQlMjAlM0QlMjBlbmRwb2ludC5pbnZva2UoJTBBJTIwJTIwJTIwJTIwYm9keSUzRGpzb24uZHVtcHMoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybWVzc2FnZXMlMjIlM0ElMjBtZXNzYWdlcyUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMm1heF90b2tlbnMlMjIlM0ElMjA1MCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnRvcF9rJTIyJTNBJTIwNTAlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJ0b3BfcCUyMiUzQSUyMDAuOSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnRlbXBlcmF0dXJlJTIyJTNBJTIwMC43JTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwKSUyQyUwQSUyMCUyMCUyMCUyMGNvbnRlbnRfdHlwZSUzRCUyMmFwcGxpY2F0aW9uJTJGanNvbiUyMiUyQyUwQSklMEFvdXRwdXQlMjAlM0QlMjBqc29uLmxvYWRzKHJlc3VsdC5ib2R5LnJlYWQoKS5kZWNvZGUoJTIydXRmLTglMjIpKSUwQW1lc3NhZ2UlMjAlM0QlMjBvdXRwdXQlNUIlMjJjaG9pY2VzJTIyJTVEJTVCMCU1RCU1QiUyMm1lc3NhZ2UlMjIlNUQlMEFhc3NlcnQlMjBtZXNzYWdlJTVCJTIycm9sZSUyMiU1RCUyMCUzRCUzRCUyMCUyMmFzc2lzdGFudCUyMiUwQXByaW50KCUyMkdlbmVyYXRlZCUyMHJlc3BvbnNlJTNBJTIyJTJDJTIwbWVzc2FnZSU1QiUyMmNvbnRlbnQlMjIlNUQp",highlighted:`<span class="hljs-keyword">import</span> json | |
| <span class="hljs-comment"># Generation arguments https://platform.openai.com/docs/api-reference/chat/create</span> | |
| result = endpoint.invoke( | |
| body=json.dumps( | |
| { | |
| <span class="hljs-string">"messages"</span>: messages, | |
| <span class="hljs-string">"max_tokens"</span>: <span class="hljs-number">50</span>, | |
| <span class="hljs-string">"top_k"</span>: <span class="hljs-number">50</span>, | |
| <span class="hljs-string">"top_p"</span>: <span class="hljs-number">0.9</span>, | |
| <span class="hljs-string">"temperature"</span>: <span class="hljs-number">0.7</span>, | |
| } | |
| ), | |
| content_type=<span class="hljs-string">"application/json"</span>, | |
| ) | |
| output = json.loads(result.body.read().decode(<span class="hljs-string">"utf-8"</span>)) | |
| message = output[<span class="hljs-string">"choices"</span>][<span class="hljs-number">0</span>][<span class="hljs-string">"message"</span>] | |
| <span class="hljs-keyword">assert</span> message[<span class="hljs-string">"role"</span>] == <span class="hljs-string">"assistant"</span> | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">"Generated response:"</span>, message[<span class="hljs-string">"content"</span>])`,lang:"python",wrap:!1}}),de=new Je({props:{title:"4. Clean up",local:"4-clean-up",headingTag:"h2"}}),ye=new h({props:{code:"bW9kZWwuZGVsZXRlKCklMEFlbmRwb2ludF9jb25maWcuZGVsZXRlKCklMEFlbmRwb2ludC5kZWxldGUoKQ==",highlighted:`model.delete() | |
| endpoint_config.delete() | |
| endpoint.delete()`,lang:"python",wrap:!1}}),{c(){y=i("meta"),we=s(),Te=i("p"),fe=s(),r(T.$$.fragment),Ue=s(),r(j.$$.fragment),be=s(),J=i("p"),J.innerHTML=gt,ge=s(),w=i("p"),w.innerHTML=It,Ie=s(),f=i("p"),f.textContent=Ct,Ce=s(),U=i("ol"),U.innerHTML=vt,ve=s(),b=i("p"),b.textContent=Bt,Be=s(),g=i("p"),g.innerHTML=xt,xe=s(),I=i("table"),I.innerHTML=Wt,We=s(),r(C.$$.fragment),Ze=s(),v=i("p"),v.innerHTML=Zt,Ne=s(),B=i("p"),B.textContent=Nt,$e=s(),r(x.$$.fragment),Ee=s(),W=i("p"),W.textContent=$t,_e=s(),r(Z.$$.fragment),ke=s(),r(N.$$.fragment),Se=s(),$=i("p"),$.innerHTML=Et,Ge=s(),r(E.$$.fragment),Re=s(),r(_.$$.fragment),Ve=s(),k=i("p"),k.innerHTML=_t,He=s(),S=i("p"),S.innerHTML=kt,Qe=s(),G=i("p"),G.innerHTML=St,Ae=s(),R=i("p"),R.innerHTML=Gt,Le=s(),r(V.$$.fragment),Fe=s(),H=i("p"),H.textContent=Rt,qe=s(),r(Q.$$.fragment),Xe=s(),A=i("p"),A.textContent=Vt,Ye=s(),r(L.$$.fragment),ze=s(),F=i("p"),F.textContent=Ht,Pe=s(),r(q.$$.fragment),De=s(),X=i("p"),X.innerHTML=Qt,Oe=s(),Y=i("p"),Y.textContent=At,Ke=s(),z=i("ul"),z.innerHTML=Lt,et=s(),P=i("p"),P.textContent=Ft,tt=s(),D=i("p"),D.textContent=qt,lt=s(),O=i("ul"),O.innerHTML=Xt,nt=s(),K=i("p"),K.innerHTML=Yt,st=s(),ee=i("p"),ee.innerHTML=zt,at=s(),te=i("p"),te.textContent=Pt,it=s(),r(le.$$.fragment),ot=s(),ne=i("p"),ne.innerHTML=Dt,pt=s(),r(se.$$.fragment),rt=s(),ae=i("p"),ae.innerHTML=Ot,Mt=s(),r(ie.$$.fragment),ct=s(),oe=i("p"),oe.textContent=Kt,mt=s(),pe=i("p"),pe.innerHTML=el,ut=s(),re=i("p"),re.innerHTML=tl,dt=s(),Me=i("p"),Me.innerHTML=ll,ht=s(),r(ce.$$.fragment),yt=s(),me=i("p"),me.textContent=nl,Tt=s(),r(ue.$$.fragment),jt=s(),r(de.$$.fragment),Jt=s(),he=i("p"),he.textContent=sl,wt=s(),r(ye.$$.fragment),ft=s(),je=i("p"),this.h()},l(e){const t=ml("svelte-u9bgzb",document.head);y=o(t,"META",{name:!0,content:!0}),t.forEach(l),we=a(e),Te=o(e,"P",{}),al(Te).forEach(l),fe=a(e),M(T.$$.fragment,e),Ue=a(e),M(j.$$.fragment,e),be=a(e),J=o(e,"P",{"data-svelte-h":!0}),p(J)!=="svelte-17okc9y"&&(J.innerHTML=gt),ge=a(e),w=o(e,"P",{"data-svelte-h":!0}),p(w)!=="svelte-pam5v6"&&(w.innerHTML=It),Ie=a(e),f=o(e,"P",{"data-svelte-h":!0}),p(f)!=="svelte-df2280"&&(f.textContent=Ct),Ce=a(e),U=o(e,"OL",{"data-svelte-h":!0}),p(U)!=="svelte-iuabs3"&&(U.innerHTML=vt),ve=a(e),b=o(e,"P",{"data-svelte-h":!0}),p(b)!=="svelte-fedw35"&&(b.textContent=Bt),Be=a(e),g=o(e,"P",{"data-svelte-h":!0}),p(g)!=="svelte-1q2zsrn"&&(g.innerHTML=xt),xe=a(e),I=o(e,"TABLE",{"data-svelte-h":!0}),p(I)!=="svelte-1tmwmqe"&&(I.innerHTML=Wt),We=a(e),M(C.$$.fragment,e),Ze=a(e),v=o(e,"P",{"data-svelte-h":!0}),p(v)!=="svelte-3gjk7m"&&(v.innerHTML=Zt),Ne=a(e),B=o(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-gxxxnf"&&(B.textContent=Nt),$e=a(e),M(x.$$.fragment,e),Ee=a(e),W=o(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-k2b9z7"&&(W.textContent=$t),_e=a(e),M(Z.$$.fragment,e),ke=a(e),M(N.$$.fragment,e),Se=a(e),$=o(e,"P",{"data-svelte-h":!0}),p($)!=="svelte-1awnn15"&&($.innerHTML=Et),Ge=a(e),M(E.$$.fragment,e),Re=a(e),M(_.$$.fragment,e),Ve=a(e),k=o(e,"P",{"data-svelte-h":!0}),p(k)!=="svelte-4yozv7"&&(k.innerHTML=_t),He=a(e),S=o(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-6rv5nu"&&(S.innerHTML=kt),Qe=a(e),G=o(e,"P",{"data-svelte-h":!0}),p(G)!=="svelte-1quxa5j"&&(G.innerHTML=St),Ae=a(e),R=o(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-bda3ge"&&(R.innerHTML=Gt),Le=a(e),M(V.$$.fragment,e),Fe=a(e),H=o(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-gvpj30"&&(H.textContent=Rt),qe=a(e),M(Q.$$.fragment,e),Xe=a(e),A=o(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-9yxrws"&&(A.textContent=Vt),Ye=a(e),M(L.$$.fragment,e),ze=a(e),F=o(e,"P",{"data-svelte-h":!0}),p(F)!=="svelte-1mgox28"&&(F.textContent=Ht),Pe=a(e),M(q.$$.fragment,e),De=a(e),X=o(e,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1ay2eoj"&&(X.innerHTML=Qt),Oe=a(e),Y=o(e,"P",{"data-svelte-h":!0}),p(Y)!=="svelte-qkir6d"&&(Y.textContent=At),Ke=a(e),z=o(e,"UL",{"data-svelte-h":!0}),p(z)!=="svelte-1f783f3"&&(z.innerHTML=Lt),et=a(e),P=o(e,"P",{"data-svelte-h":!0}),p(P)!=="svelte-1uoxmdt"&&(P.textContent=Ft),tt=a(e),D=o(e,"P",{"data-svelte-h":!0}),p(D)!=="svelte-rcd9mj"&&(D.textContent=qt),lt=a(e),O=o(e,"UL",{"data-svelte-h":!0}),p(O)!=="svelte-sq03vv"&&(O.innerHTML=Xt),nt=a(e),K=o(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-1qiwbk5"&&(K.innerHTML=Yt),st=a(e),ee=o(e,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-jofx65"&&(ee.innerHTML=zt),at=a(e),te=o(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-ttsgj0"&&(te.textContent=Pt),it=a(e),M(le.$$.fragment,e),ot=a(e),ne=o(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-4gejcg"&&(ne.innerHTML=Dt),pt=a(e),M(se.$$.fragment,e),rt=a(e),ae=o(e,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-aha0vi"&&(ae.innerHTML=Ot),Mt=a(e),M(ie.$$.fragment,e),ct=a(e),oe=o(e,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-qvkvmm"&&(oe.textContent=Kt),mt=a(e),pe=o(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-1nsplg8"&&(pe.innerHTML=el),ut=a(e),re=o(e,"P",{"data-svelte-h":!0}),p(re)!=="svelte-7vzs06"&&(re.innerHTML=tl),dt=a(e),Me=o(e,"P",{"data-svelte-h":!0}),p(Me)!=="svelte-iif644"&&(Me.innerHTML=ll),ht=a(e),M(ce.$$.fragment,e),yt=a(e),me=o(e,"P",{"data-svelte-h":!0}),p(me)!=="svelte-1pq3qhh"&&(me.textContent=nl),Tt=a(e),M(ue.$$.fragment,e),jt=a(e),M(de.$$.fragment,e),Jt=a(e),he=o(e,"P",{"data-svelte-h":!0}),p(he)!=="svelte-100mxno"&&(he.textContent=sl),wt=a(e),M(ye.$$.fragment,e),ft=a(e),je=o(e,"P",{}),al(je).forEach(l),this.h()},h(){il(y,"name","hf:doc:metadata"),il(y,"content",yl)},m(e,t){ul(document.head,y),n(e,we,t),n(e,Te,t),n(e,fe,t),c(T,e,t),n(e,Ue,t),c(j,e,t),n(e,be,t),n(e,J,t),n(e,ge,t),n(e,w,t),n(e,Ie,t),n(e,f,t),n(e,Ce,t),n(e,U,t),n(e,ve,t),n(e,b,t),n(e,Be,t),n(e,g,t),n(e,xe,t),n(e,I,t),n(e,We,t),c(C,e,t),n(e,Ze,t),n(e,v,t),n(e,Ne,t),n(e,B,t),n(e,$e,t),c(x,e,t),n(e,Ee,t),n(e,W,t),n(e,_e,t),c(Z,e,t),n(e,ke,t),c(N,e,t),n(e,Se,t),n(e,$,t),n(e,Ge,t),c(E,e,t),n(e,Re,t),c(_,e,t),n(e,Ve,t),n(e,k,t),n(e,He,t),n(e,S,t),n(e,Qe,t),n(e,G,t),n(e,Ae,t),n(e,R,t),n(e,Le,t),c(V,e,t),n(e,Fe,t),n(e,H,t),n(e,qe,t),c(Q,e,t),n(e,Xe,t),n(e,A,t),n(e,Ye,t),c(L,e,t),n(e,ze,t),n(e,F,t),n(e,Pe,t),c(q,e,t),n(e,De,t),n(e,X,t),n(e,Oe,t),n(e,Y,t),n(e,Ke,t),n(e,z,t),n(e,et,t),n(e,P,t),n(e,tt,t),n(e,D,t),n(e,lt,t),n(e,O,t),n(e,nt,t),n(e,K,t),n(e,st,t),n(e,ee,t),n(e,at,t),n(e,te,t),n(e,it,t),c(le,e,t),n(e,ot,t),n(e,ne,t),n(e,pt,t),c(se,e,t),n(e,rt,t),n(e,ae,t),n(e,Mt,t),c(ie,e,t),n(e,ct,t),n(e,oe,t),n(e,mt,t),n(e,pe,t),n(e,ut,t),n(e,re,t),n(e,dt,t),n(e,Me,t),n(e,ht,t),c(ce,e,t),n(e,yt,t),n(e,me,t),n(e,Tt,t),c(ue,e,t),n(e,jt,t),c(de,e,t),n(e,Jt,t),n(e,he,t),n(e,wt,t),c(ye,e,t),n(e,ft,t),n(e,je,t),Ut=!0},p:pl,i(e){Ut||(m(T.$$.fragment,e),m(j.$$.fragment,e),m(C.$$.fragment,e),m(x.$$.fragment,e),m(Z.$$.fragment,e),m(N.$$.fragment,e),m(E.$$.fragment,e),m(_.$$.fragment,e),m(V.$$.fragment,e),m(Q.$$.fragment,e),m(L.$$.fragment,e),m(q.$$.fragment,e),m(le.$$.fragment,e),m(se.$$.fragment,e),m(ie.$$.fragment,e),m(ce.$$.fragment,e),m(ue.$$.fragment,e),m(de.$$.fragment,e),m(ye.$$.fragment,e),Ut=!0)},o(e){u(T.$$.fragment,e),u(j.$$.fragment,e),u(C.$$.fragment,e),u(x.$$.fragment,e),u(Z.$$.fragment,e),u(N.$$.fragment,e),u(E.$$.fragment,e),u(_.$$.fragment,e),u(V.$$.fragment,e),u(Q.$$.fragment,e),u(L.$$.fragment,e),u(q.$$.fragment,e),u(le.$$.fragment,e),u(se.$$.fragment,e),u(ie.$$.fragment,e),u(ce.$$.fragment,e),u(ue.$$.fragment,e),u(de.$$.fragment,e),u(ye.$$.fragment,e),Ut=!1},d(e){e&&(l(we),l(Te),l(fe),l(Ue),l(be),l(J),l(ge),l(w),l(Ie),l(f),l(Ce),l(U),l(ve),l(b),l(Be),l(g),l(xe),l(I),l(We),l(Ze),l(v),l(Ne),l(B),l($e),l(Ee),l(W),l(_e),l(ke),l(Se),l($),l(Ge),l(Re),l(Ve),l(k),l(He),l(S),l(Qe),l(G),l(Ae),l(R),l(Le),l(Fe),l(H),l(qe),l(Xe),l(A),l(Ye),l(ze),l(F),l(Pe),l(De),l(X),l(Oe),l(Y),l(Ke),l(z),l(et),l(P),l(tt),l(D),l(lt),l(O),l(nt),l(K),l(st),l(ee),l(at),l(te),l(it),l(ot),l(ne),l(pt),l(rt),l(ae),l(Mt),l(ct),l(oe),l(mt),l(pe),l(ut),l(re),l(dt),l(Me),l(ht),l(yt),l(me),l(Tt),l(jt),l(Jt),l(he),l(wt),l(ft),l(je)),l(y),d(T,e),d(j,e),d(C,e),d(x,e),d(Z,e),d(N,e),d(E,e),d(_,e),d(V,e),d(Q,e),d(L,e),d(q,e),d(le,e),d(se,e),d(ie,e),d(ce,e),d(ue,e),d(de,e),d(ye,e)}}}const yl='{"title":"Deploy Mixtral 8x7B on AWS Inferentia2","local":"deploy-mixtral-8x7b-on-aws-inferentia2","sections":[{"title":"1. Setup development environment","local":"1-setup-development-environment","sections":[],"depth":2},{"title":"2. Retrieve the latest Hugging Face vLLM Neuron DLC","local":"2-retrieve-the-latest-hugging-face-vllm-neuron-dlc","sections":[],"depth":2},{"title":"3. Deploy Mixtral 8x7B to Inferentia2","local":"3-deploy-mixtral-8x7b-to-inferentia2","sections":[],"depth":2},{"title":"4. Clean up","local":"4-clean-up","sections":[],"depth":2}],"depth":1}';function Tl(bt){return rl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class bl extends Ml{constructor(y){super(),cl(this,y,Tl,hl,ol,{})}}export{bl as component}; | |
Xet Storage Details
- Size:
- 35 kB
- Xet hash:
- a21fa373634aac166158177619db97203acc81c8b996bbefcc44436912c9c423
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.