Buckets:

rtrm's picture
download
raw
26.7 kB
import{s as Yt,o as qt,n as zt}from"../chunks/scheduler.6efaaf90.js";import{S as Ot,i as Kt,e as i,s as o,c as p,h as el,a,d as l,b as s,f as Dt,g as d,j as r,k as Ft,l as tl,m as n,n as c,t as m,o as u,p as h}from"../chunks/index.eb3e1f0f.js";import{T as ll}from"../chunks/Tip.292c2c3d.js";import{C as nl,H as ge,E as ol}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.bc0912b0.js";import{C as y}from"../chunks/CodeBlock.df49eaea.js";function sl(be){let f,M="The Vertex AI endpoint deployment via the <code>deploy</code> method may take from 15 to 25 minutes.";return{c(){f=i("p"),f.innerHTML=M},l(g){f=a(g,"P",{"data-svelte-h":!0}),r(f)!=="svelte-116se2o"&&(f.innerHTML=M)},m(g,fe){n(g,f,fe)},p:zt,d(g){g&&l(f)}}}function il(be){let f,M,g,fe,T,Me,w,Te,v,gt="<small>Written by Alvaro Bartolome</small>",we,x,yt="DistilBERT is a small, fast, cheap and light Transformer model trained by distilling BERT, which is a bidirectional transformer pretrained using a combination of masked language modeling objective and next sentence prediction on a large corpus. And, Google Vertex AI is a Machine Learning (ML) platform that lets you train and deploy ML models and AI applications, and customize large language models (LLMs) for use in your AI-powered applications.",ve,J,bt='This example showcases how to deploy any supported PyTorch model from the Hugging Face Hub, in this case <a href="https://huggingface.co/distilbert/distilbert-base-uncased-finetuned-sst-2-english" rel="nofollow"><code>distilbert/distilbert-base-uncased-finetuned-sst-2-english</code></a>, on Vertex AI using the PyTorch Inference DLC available in Google Cloud Platform (GCP) in both CPU and GPU instances.',xe,$,Mt='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/vertex-ai/notebooks/deploy-bert-on-vertex-ai/assets/model-in-hf-hub.png" alt="&#39;distilbert/distilbert-base-uncased-finetuned-sst-2-english&#39; in the Hugging Face Hub"/>',Je,C,$e,I,Tt='First, you need to install <code>gcloud</code> in your local machine, which is the command-line tool for Google Cloud, following the instructions at <a href="https://cloud.google.com/sdk/docs/install" rel="nofollow">Cloud SDK Documentation - Install the gcloud CLI</a>.',Ce,U,wt="Then, you also need to install the <code>google-cloud-aiplatform</code> Python SDK, required to programmatically create the Vertex AI model, register it, acreate the endpoint, and deploy it on Vertex AI.",Ie,j,Ue,_,vt="Optionally, to ease the usage of the commands within this tutorial, you need to set the following environment variables for GCP:",je,V,_e,Z,xt="Then you need to login into your GCP account and set the project ID to the one you want to use to register and deploy the models on Vertex AI.",Ve,k,Ze,L,Jt="Once you are logged in, you need to enable the necessary service APIs in GCP, such as the Vertex AI API, the Compute Engine API, and Google Container Registry related APIs.",ke,W,Le,H,We,G,$t="Once everything is set up, you can already initialize the Vertex AI session via the <code>google-cloud-aiplatform</code> Python SDK as follows:",He,N,Ge,A,Ct="Then you can already “upload” the model i.e. register the model on Vertex AI. It is not an upload per se, since the model will be automatically downloaded from the Hugging Face Hub in the Hugging Face PyTorch DLC for inference on startup via the <code>HF_MODEL_ID</code> environment variable, so what is uploaded is only the configuration, not the model weights.",Ne,E,It="Before going into the code, let’s quickly review the arguments provided to the <code>upload</code> method:",Ae,R,Ut=`<li><strong><code>display_name</code></strong> is the name that will be shown in the Vertex AI Model Registry.</li> <li><strong><code>serving_container_image_uri</code></strong> is the location of the Hugging Face PyTorch DLC for inference that will be used for serving the model.</li> <li><strong><code>serving_container_environment_variables</code></strong> are the environment variables that will be used during the container runtime, so these are aligned with the environment variables defined by <a href="https://github.com/huggingface/huggingface-inference-toolkit" rel="nofollow">huggingface-inference-toolkit</a> Python SDK, which exposes some environment variables such as the following:
<ul><li><code>HF_MODEL_ID</code> is the identifier of the model in the Hugging Face Hub. To explore all the supported models please check <a href="https://huggingface.co/models?sort=trending" rel="nofollow">https://huggingface.co/models?sort=trending</a> filtering by the task that you want to use e.g. <code>text-classification</code>.</li> <li><code>HF_TASK</code> is the task identifier within the Hugging Face Hub. To see all the supported tasks please check <a href="https://huggingface.co/docs/transformers/en/task_summary#natural-language-processing" rel="nofollow">https://huggingface.co/docs/transformers/en/task_summary#natural-language-processing</a>.</li></ul></li>`,Ee,S,jt='For more information on the supported <code>aiplatform.Model.upload</code> arguments, check its Python reference at <a href="https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.Model#google_cloud_aiplatform_Model_upload" rel="nofollow">https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.Model#google_cloud_aiplatform_Model_upload</a>.',Re,P,Se,B,_t='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/vertex-ai/notebooks/deploy-bert-on-vertex-ai/assets/vertex-ai-model.png" alt="Model in Vertex AI Model Registry"/>',Pe,Q,Vt='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/vertex-ai/notebooks/deploy-bert-on-vertex-ai/assets/vertex-ai-model-version.png" alt="Model Version in Vertex AI Model Registry"/>',Be,X,Qe,D,Zt="After the model is registered on Vertex AI, you need to define the endpoint that you want to deploy the model to, and then link the model deployment to that endpoint resource.",Xe,F,kt="To do so, you need to call the method <code>aiplatform.Endpoint.create</code> to create a new Vertex AI endpoint resource (which is not linked to a model or anything usable yet).",De,Y,Fe,q,Lt='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/vertex-ai/notebooks/deploy-bert-on-vertex-ai/assets/vertex-ai-endpoint.png" alt="Vertex AI Endpoint created"/>',Ye,z,Wt="Now you can deploy the registered model in an endpoint on Vertex AI.",qe,O,Ht="The <code>deploy</code> method will link the previously created endpoint resource with the model that contains the configuration of the serving container, and then, it will deploy the model on Vertex AI in the specified instance.",ze,K,Gt="Before going into the code, let’s quicklyl review the arguments provided to the <code>deploy</code> method:",Oe,ee,Nt='<li><strong><code>endpoint</code></strong> is the endpoint to deploy the model to, which is optional, and by default will be set to the model display name with the <code>_endpoint</code> suffix.</li> <li><strong><code>machine_type</code></strong>, <strong><code>accelerator_type</code></strong> and <strong><code>accelerator_count</code></strong> are arguments that define which instance to use, and additionally, the accelerator to use and the number of accelerators, respectively. The <code>machine_type</code> and the <code>accelerator_type</code> are tied together, so you will need to select an instance that supports the accelerator that you are using and vice-versa. More information about the different instances at <a href="https://cloud.google.com/compute/docs/gpus" rel="nofollow">Compute Engine Documentation - GPU machine types</a>, and about the <code>accelerator_type</code> naming at <a href="https://cloud.google.com/vertex-ai/docs/reference/rest/v1/MachineSpec" rel="nofollow">Vertex AI Documentation - MachineSpec</a>.</li>',Ke,te,At='For more information on the supported <code>aiplatform.Model.deploy</code> arguments, you can check its Python reference at <a href="https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.Model#google_cloud_aiplatform_Model_deploy" rel="nofollow">https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.Model#google_cloud_aiplatform_Model_deploy</a>.',et,le,tt,b,lt,ne,Et='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/vertex-ai/notebooks/deploy-bert-on-vertex-ai/assets/vertex-ai-endpoint-ready.png" alt="Vertex AI Endpoint Ready"/>',nt,oe,Rt='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/vertex-ai/notebooks/deploy-bert-on-vertex-ai/assets/vertex-ai-model-ready.png" alt="Vertex AI Model Ready"/>',ot,se,st,ie,St="Finally, you can run the online predictions on Vertex AI using the <code>predict</code> method, which will send the requests to the running endpoint in the <code>/predict</code> route specified within the container following Vertex AI I/O payload formatting.",it,ae,at,re,Pt="Which produces the following output for each of the instances provided i.e. being <code>POSITIVE</code> the label for the first sentence and <code>NEGATIVE</code> for the second, as those are the greater scores within each output instance, respectively:",rt,pe,pt,de,dt,ce,Bt="Finally, you can release the resources programmatically within the same Python session as follows:",ct,me,Qt="<li><code>deployed_model.undeploy_all</code> to undeploy the model from all the endpoints.</li> <li><code>deployed_model.delete</code> to delete the endpoint/s where the model was deployed gracefully after the <code>undeploy_all</code>.</li> <li><code>model.delete</code> to delete the model from the registry.</li>",mt,ue,ut,he,ht,ye,ft;return T=new nl({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),w=new ge({props:{title:"Deploy BERT Models with PyTorch Inference DLC on Vertex AI",local:"deploy-bert-models-with-pytorch-inference-dlc-on-vertex-ai",headingTag:"h1"}}),C=new ge({props:{title:"Setup / Configuration",local:"setup--configuration",headingTag:"h2"}}),j=new y({props:{code:"IXBpcCUyMGluc3RhbGwlMjAtLXVwZ3JhZGUlMjAtLXF1aWV0JTIwZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0=",highlighted:"!pip install --upgrade --quiet google-cloud-aiplatform",wrap:!1}}),V=new y({props:{code:"JTI1ZW52JTIwUFJPSkVDVF9JRCUzRHlvdXItcHJvamVjdC1pZCUwQSUyNWVudiUyMExPQ0FUSU9OJTNEeW91ci1sb2NhdGlvbiUwQSUyNWVudiUyMENPTlRBSU5FUl9VUkklM0R1cy1kb2NrZXIucGtnLmRldiUyRmRlZXBsZWFybmluZy1wbGF0Zm9ybS1yZWxlYXNlJTJGZ2NyLmlvJTJGaHVnZ2luZ2ZhY2UtcHl0b3JjaC1pbmZlcmVuY2UtY3UxMjEuMi0yLnRyYW5zZm9ybWVycy40LTQ0LnVidW50dTIyMDQucHkzMTE=",highlighted:`%env PROJECT_ID=your-project-<span class="hljs-built_in">id</span>
%env LOCATION=your-location
%env CONTAINER_URI=us-docker.pkg.dev/deeplearning-platform-release/gcr.io/huggingface-pytorch-inference-cu121<span class="hljs-number">.2</span>-<span class="hljs-number">2.</span>transformers<span class="hljs-number">.4</span>-<span class="hljs-number">44.</span>ubuntu2204.py311`,wrap:!1}}),k=new y({props:{code:"IWdjbG91ZCUyMGF1dGglMjBsb2dpbiUwQSFnY2xvdWQlMjBhdXRoJTIwYXBwbGljYXRpb24tZGVmYXVsdCUyMGxvZ2luJTIwJTIwJTIzJTIwRm9yJTIwbG9jYWwlMjBkZXZlbG9wbWVudCUwQSFnY2xvdWQlMjBjb25maWclMjBzZXQlMjBwcm9qZWN0JTIwJTI0UFJPSkVDVF9JRA==",highlighted:`!gcloud auth login
!gcloud auth application-default login <span class="hljs-comment"># For local development</span>
!gcloud config <span class="hljs-built_in">set</span> project $PROJECT_ID`,wrap:!1}}),W=new y({props:{code:"IWdjbG91ZCUyMHNlcnZpY2VzJTIwZW5hYmxlJTIwYWlwbGF0Zm9ybS5nb29nbGVhcGlzLmNvbSUwQSFnY2xvdWQlMjBzZXJ2aWNlcyUyMGVuYWJsZSUyMGNvbXB1dGUuZ29vZ2xlYXBpcy5jb20lMEEhZ2Nsb3VkJTIwc2VydmljZXMlMjBlbmFibGUlMjBjb250YWluZXIuZ29vZ2xlYXBpcy5jb20lMEEhZ2Nsb3VkJTIwc2VydmljZXMlMjBlbmFibGUlMjBjb250YWluZXJyZWdpc3RyeS5nb29nbGVhcGlzLmNvbSUwQSFnY2xvdWQlMjBzZXJ2aWNlcyUyMGVuYWJsZSUyMGNvbnRhaW5lcmZpbGVzeXN0ZW0uZ29vZ2xlYXBpcy5jb20=",highlighted:`!gcloud services enable aiplatform.googleapis.com
!gcloud services enable compute.googleapis.com
!gcloud services enable container.googleapis.com
!gcloud services enable containerregistry.googleapis.com
!gcloud services enable containerfilesystem.googleapis.com`,wrap:!1}}),H=new ge({props:{title:"Register model in Vertex AI",local:"register-model-in-vertex-ai",headingTag:"h2"}}),N=new y({props:{code:"aW1wb3J0JTIwb3MlMEFmcm9tJTIwZ29vZ2xlLmNsb3VkJTIwaW1wb3J0JTIwYWlwbGF0Zm9ybSUwQSUwQWFpcGxhdGZvcm0uaW5pdCglMEElMjAlMjAlMjAlMjBwcm9qZWN0JTNEb3MuZ2V0ZW52KCUyMlBST0pFQ1RfSUQlMjIpJTJDJTBBJTIwJTIwJTIwJTIwbG9jYXRpb24lM0Rvcy5nZXRlbnYoJTIyTE9DQVRJT04lMjIpJTJDJTBBKQ==",highlighted:`<span class="hljs-keyword">import</span> os
<span class="hljs-keyword">from</span> google.cloud <span class="hljs-keyword">import</span> aiplatform
aiplatform.init(
project=os.getenv(<span class="hljs-string">&quot;PROJECT_ID&quot;</span>),
location=os.getenv(<span class="hljs-string">&quot;LOCATION&quot;</span>),
)`,wrap:!1}}),P=new y({props:{code:"bW9kZWwlMjAlM0QlMjBhaXBsYXRmb3JtLk1vZGVsLnVwbG9hZCglMEElMjAlMjAlMjAlMjBkaXNwbGF5X25hbWUlM0QlMjJkaXN0aWxiZXJ0LS1kaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZC1maW5ldHVuZWQtc3N0LTItZW5nbGlzaCUyMiUyQyUwQSUyMCUyMCUyMCUyMHNlcnZpbmdfY29udGFpbmVyX2ltYWdlX3VyaSUzRG9zLmdldGVudiglMjJDT05UQUlORVJfVVJJJTIyKSUyQyUwQSUyMCUyMCUyMCUyMHNlcnZpbmdfY29udGFpbmVyX2Vudmlyb25tZW50X3ZhcmlhYmxlcyUzRCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMkhGX01PREVMX0lEJTIyJTNBJTIwJTIyZGlzdGlsYmVydCUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkLWZpbmV0dW5lZC1zc3QtMi1lbmdsaXNoJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIySEZfVEFTSyUyMiUzQSUyMCUyMnRleHQtY2xhc3NpZmljYXRpb24lMjIlMkMlMEElMjAlMjAlMjAlMjAlN0QlMkMlMEEpJTBBbW9kZWwud2FpdCgp",highlighted:`model = aiplatform.Model.upload(
display_name=<span class="hljs-string">&quot;distilbert--distilbert-base-uncased-finetuned-sst-2-english&quot;</span>,
serving_container_image_uri=os.getenv(<span class="hljs-string">&quot;CONTAINER_URI&quot;</span>),
serving_container_environment_variables={
<span class="hljs-string">&quot;HF_MODEL_ID&quot;</span>: <span class="hljs-string">&quot;distilbert/distilbert-base-uncased-finetuned-sst-2-english&quot;</span>,
<span class="hljs-string">&quot;HF_TASK&quot;</span>: <span class="hljs-string">&quot;text-classification&quot;</span>,
},
)
model.wait()`,wrap:!1}}),X=new ge({props:{title:"Deploy model in Vertex AI",local:"deploy-model-in-vertex-ai",headingTag:"h2"}}),Y=new y({props:{code:"ZW5kcG9pbnQlMjAlM0QlMjBhaXBsYXRmb3JtLkVuZHBvaW50LmNyZWF0ZShkaXNwbGF5X25hbWUlM0QlMjJkaXN0aWxiZXJ0LS1kaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZC1maW5ldHVuZWQtc3N0LTItZW5nbGlzaC1lbmRwb2ludCUyMik=",highlighted:'endpoint = aiplatform.Endpoint.create(display_name=<span class="hljs-string">&quot;distilbert--distilbert-base-uncased-finetuned-sst-2-english-endpoint&quot;</span>)',wrap:!1}}),le=new y({props:{code:"ZGVwbG95ZWRfbW9kZWwlMjAlM0QlMjBtb2RlbC5kZXBsb3koJTBBJTIwJTIwJTIwJTIwZW5kcG9pbnQlM0RlbmRwb2ludCUyQyUwQSUyMCUyMCUyMCUyMG1hY2hpbmVfdHlwZSUzRCUyMmcyLXN0YW5kYXJkLTEyJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWNjZWxlcmF0b3JfdHlwZSUzRCUyMk5WSURJQV9MNCUyMiUyQyUwQSUyMCUyMCUyMCUyMGFjY2VsZXJhdG9yX2NvdW50JTNEMSUyQyUwQSk=",highlighted:`deployed_model = model.deploy(
endpoint=endpoint,
machine_type=<span class="hljs-string">&quot;g2-standard-12&quot;</span>,
accelerator_type=<span class="hljs-string">&quot;NVIDIA_L4&quot;</span>,
accelerator_count=<span class="hljs-number">1</span>,
)`,wrap:!1}}),b=new ll({props:{warning:!0,$$slots:{default:[sl]},$$scope:{ctx:be}}}),se=new ge({props:{title:"Online predictions on Vertex AI",local:"online-predictions-on-vertex-ai",headingTag:"h2"}}),ae=new y({props:{code:"b3V0cHV0JTIwJTNEJTIwZGVwbG95ZWRfbW9kZWwucHJlZGljdChpbnN0YW5jZXMlM0QlNUIlMjJJJTIwbG92ZSUyMHRoaXMlMjBwcm9kdWN0JTIyJTJDJTIwJTIySSUyMGhhdGUlMjB0aGlzJTIwcHJvZHVjdCUyMiU1RCUyQyUyMHBhcmFtZXRlcnMlM0QlN0IlMjJ0b3BfayUyMiUzQSUyMDIlN0QpJTBBcHJpbnQob3V0cHV0LnByZWRpY3Rpb25zJTVCMCU1RCk=",highlighted:`output = deployed_model.predict(instances=[<span class="hljs-string">&quot;I love this product&quot;</span>, <span class="hljs-string">&quot;I hate this product&quot;</span>], parameters={<span class="hljs-string">&quot;top_k&quot;</span>: <span class="hljs-number">2</span>})
<span class="hljs-built_in">print</span>(output.predictions[<span class="hljs-number">0</span>])`,wrap:!1}}),pe=new y({props:{code:"JTVCJTVCJTdCJ3Njb3JlJyUzQSUyMDAuOTk5ODc4ODgzMzYxODE2NCUyQyUyMCdsYWJlbCclM0ElMjAnUE9TSVRJVkUnJTdEJTJDJTBBJTIwJTIwJTdCJ3Njb3JlJyUzQSUyMDAuMDAwMTIxMDU2MTk2ODAzNjkyNyUyQyUyMCdsYWJlbCclM0ElMjAnTkVHQVRJVkUnJTdEJTVEJTJDJTBBJTIwJTVCJTdCJ3Njb3JlJyUzQSUyMDAuOTk5NzU0NDg4NDY4MTcwMiUyQyUyMCdsYWJlbCclM0ElMjAnTkVHQVRJVkUnJTdEJTJDJTBBJTIwJTIwJTdCJ3Njb3JlJyUzQSUyMDAuMDAwMjQ1NDg0NjEwNzg2NjYxNSUyQyUyMCdsYWJlbCclM0ElMjAnUE9TSVRJVkUnJTdEJTVE",highlighted:`[[{<span class="hljs-symbol">&#x27;score</span><span class="hljs-symbol">&#x27;:</span> <span class="hljs-number">0.9998788833618164</span>, <span class="hljs-symbol">&#x27;label</span><span class="hljs-symbol">&#x27;:</span> <span class="hljs-symbol">&#x27;POSITIVE</span>&#x27;},
{<span class="hljs-symbol">&#x27;score</span><span class="hljs-symbol">&#x27;:</span> <span class="hljs-number">0.0001210561968036927</span>, <span class="hljs-symbol">&#x27;label</span><span class="hljs-symbol">&#x27;:</span> <span class="hljs-symbol">&#x27;NEGATIVE</span>&#x27;}],
[{<span class="hljs-symbol">&#x27;score</span><span class="hljs-symbol">&#x27;:</span> <span class="hljs-number">0.9997544884681702</span>, <span class="hljs-symbol">&#x27;label</span><span class="hljs-symbol">&#x27;:</span> <span class="hljs-symbol">&#x27;NEGATIVE</span>&#x27;},
{<span class="hljs-symbol">&#x27;score</span><span class="hljs-symbol">&#x27;:</span> <span class="hljs-number">0.0002454846107866615</span>, <span class="hljs-symbol">&#x27;label</span><span class="hljs-symbol">&#x27;:</span> <span class="hljs-symbol">&#x27;POSITIVE</span>&#x27;}]`,wrap:!1}}),de=new ge({props:{title:"Resource clean-up",local:"resource-clean-up",headingTag:"h2"}}),ue=new y({props:{code:"ZGVwbG95ZWRfbW9kZWwudW5kZXBsb3lfYWxsKCklMEFkZXBsb3llZF9tb2RlbC5kZWxldGUoKSUwQW1vZGVsLmRlbGV0ZSgp",highlighted:`deployed_model.undeploy_all()
deployed_model.delete()
model.delete()`,wrap:!1}}),he=new ol({props:{source:"https://github.com/huggingface/Google-Cloud-Containers/blob/main/docs/source/examples/vertex-ai-notebooks-deploy-bert-on-vertex-ai.mdx"}}),{c(){f=i("meta"),M=o(),g=i("p"),fe=o(),p(T.$$.fragment),Me=o(),p(w.$$.fragment),Te=o(),v=i("p"),v.innerHTML=gt,we=o(),x=i("p"),x.textContent=yt,ve=o(),J=i("p"),J.innerHTML=bt,xe=o(),$=i("p"),$.innerHTML=Mt,Je=o(),p(C.$$.fragment),$e=o(),I=i("p"),I.innerHTML=Tt,Ce=o(),U=i("p"),U.innerHTML=wt,Ie=o(),p(j.$$.fragment),Ue=o(),_=i("p"),_.textContent=vt,je=o(),p(V.$$.fragment),_e=o(),Z=i("p"),Z.textContent=xt,Ve=o(),p(k.$$.fragment),Ze=o(),L=i("p"),L.textContent=Jt,ke=o(),p(W.$$.fragment),Le=o(),p(H.$$.fragment),We=o(),G=i("p"),G.innerHTML=$t,He=o(),p(N.$$.fragment),Ge=o(),A=i("p"),A.innerHTML=Ct,Ne=o(),E=i("p"),E.innerHTML=It,Ae=o(),R=i("ul"),R.innerHTML=Ut,Ee=o(),S=i("p"),S.innerHTML=jt,Re=o(),p(P.$$.fragment),Se=o(),B=i("p"),B.innerHTML=_t,Pe=o(),Q=i("p"),Q.innerHTML=Vt,Be=o(),p(X.$$.fragment),Qe=o(),D=i("p"),D.textContent=Zt,Xe=o(),F=i("p"),F.innerHTML=kt,De=o(),p(Y.$$.fragment),Fe=o(),q=i("p"),q.innerHTML=Lt,Ye=o(),z=i("p"),z.textContent=Wt,qe=o(),O=i("p"),O.innerHTML=Ht,ze=o(),K=i("p"),K.innerHTML=Gt,Oe=o(),ee=i("ul"),ee.innerHTML=Nt,Ke=o(),te=i("p"),te.innerHTML=At,et=o(),p(le.$$.fragment),tt=o(),p(b.$$.fragment),lt=o(),ne=i("p"),ne.innerHTML=Et,nt=o(),oe=i("p"),oe.innerHTML=Rt,ot=o(),p(se.$$.fragment),st=o(),ie=i("p"),ie.innerHTML=St,it=o(),p(ae.$$.fragment),at=o(),re=i("p"),re.innerHTML=Pt,rt=o(),p(pe.$$.fragment),pt=o(),p(de.$$.fragment),dt=o(),ce=i("p"),ce.textContent=Bt,ct=o(),me=i("ul"),me.innerHTML=Qt,mt=o(),p(ue.$$.fragment),ut=o(),p(he.$$.fragment),ht=o(),ye=i("p"),this.h()},l(e){const t=el("svelte-u9bgzb",document.head);f=a(t,"META",{name:!0,content:!0}),t.forEach(l),M=s(e),g=a(e,"P",{}),Dt(g).forEach(l),fe=s(e),d(T.$$.fragment,e),Me=s(e),d(w.$$.fragment,e),Te=s(e),v=a(e,"P",{"data-svelte-h":!0}),r(v)!=="svelte-134ufhd"&&(v.innerHTML=gt),we=s(e),x=a(e,"P",{"data-svelte-h":!0}),r(x)!=="svelte-j8mwgp"&&(x.textContent=yt),ve=s(e),J=a(e,"P",{"data-svelte-h":!0}),r(J)!=="svelte-1itfjcp"&&(J.innerHTML=bt),xe=s(e),$=a(e,"P",{"data-svelte-h":!0}),r($)!=="svelte-aepex0"&&($.innerHTML=Mt),Je=s(e),d(C.$$.fragment,e),$e=s(e),I=a(e,"P",{"data-svelte-h":!0}),r(I)!=="svelte-1o67gfb"&&(I.innerHTML=Tt),Ce=s(e),U=a(e,"P",{"data-svelte-h":!0}),r(U)!=="svelte-1ebrquh"&&(U.innerHTML=wt),Ie=s(e),d(j.$$.fragment,e),Ue=s(e),_=a(e,"P",{"data-svelte-h":!0}),r(_)!=="svelte-1i8n6rq"&&(_.textContent=vt),je=s(e),d(V.$$.fragment,e),_e=s(e),Z=a(e,"P",{"data-svelte-h":!0}),r(Z)!=="svelte-15nvzfz"&&(Z.textContent=xt),Ve=s(e),d(k.$$.fragment,e),Ze=s(e),L=a(e,"P",{"data-svelte-h":!0}),r(L)!=="svelte-1nm8o2l"&&(L.textContent=Jt),ke=s(e),d(W.$$.fragment,e),Le=s(e),d(H.$$.fragment,e),We=s(e),G=a(e,"P",{"data-svelte-h":!0}),r(G)!=="svelte-14aynbe"&&(G.innerHTML=$t),He=s(e),d(N.$$.fragment,e),Ge=s(e),A=a(e,"P",{"data-svelte-h":!0}),r(A)!=="svelte-8v2oas"&&(A.innerHTML=Ct),Ne=s(e),E=a(e,"P",{"data-svelte-h":!0}),r(E)!=="svelte-zklutt"&&(E.innerHTML=It),Ae=s(e),R=a(e,"UL",{"data-svelte-h":!0}),r(R)!=="svelte-1w37ejo"&&(R.innerHTML=Ut),Ee=s(e),S=a(e,"P",{"data-svelte-h":!0}),r(S)!=="svelte-1flszm1"&&(S.innerHTML=jt),Re=s(e),d(P.$$.fragment,e),Se=s(e),B=a(e,"P",{"data-svelte-h":!0}),r(B)!=="svelte-1svcoip"&&(B.innerHTML=_t),Pe=s(e),Q=a(e,"P",{"data-svelte-h":!0}),r(Q)!=="svelte-ak2qag"&&(Q.innerHTML=Vt),Be=s(e),d(X.$$.fragment,e),Qe=s(e),D=a(e,"P",{"data-svelte-h":!0}),r(D)!=="svelte-2nwexf"&&(D.textContent=Zt),Xe=s(e),F=a(e,"P",{"data-svelte-h":!0}),r(F)!=="svelte-1lovlvw"&&(F.innerHTML=kt),De=s(e),d(Y.$$.fragment,e),Fe=s(e),q=a(e,"P",{"data-svelte-h":!0}),r(q)!=="svelte-1bvpvgs"&&(q.innerHTML=Lt),Ye=s(e),z=a(e,"P",{"data-svelte-h":!0}),r(z)!=="svelte-it668a"&&(z.textContent=Wt),qe=s(e),O=a(e,"P",{"data-svelte-h":!0}),r(O)!=="svelte-njbdvc"&&(O.innerHTML=Ht),ze=s(e),K=a(e,"P",{"data-svelte-h":!0}),r(K)!=="svelte-v5hhrl"&&(K.innerHTML=Gt),Oe=s(e),ee=a(e,"UL",{"data-svelte-h":!0}),r(ee)!=="svelte-1mv29i5"&&(ee.innerHTML=Nt),Ke=s(e),te=a(e,"P",{"data-svelte-h":!0}),r(te)!=="svelte-9p37qa"&&(te.innerHTML=At),et=s(e),d(le.$$.fragment,e),tt=s(e),d(b.$$.fragment,e),lt=s(e),ne=a(e,"P",{"data-svelte-h":!0}),r(ne)!=="svelte-j5qdd5"&&(ne.innerHTML=Et),nt=s(e),oe=a(e,"P",{"data-svelte-h":!0}),r(oe)!=="svelte-1jh5v6t"&&(oe.innerHTML=Rt),ot=s(e),d(se.$$.fragment,e),st=s(e),ie=a(e,"P",{"data-svelte-h":!0}),r(ie)!=="svelte-166ya0u"&&(ie.innerHTML=St),it=s(e),d(ae.$$.fragment,e),at=s(e),re=a(e,"P",{"data-svelte-h":!0}),r(re)!=="svelte-7wqul0"&&(re.innerHTML=Pt),rt=s(e),d(pe.$$.fragment,e),pt=s(e),d(de.$$.fragment,e),dt=s(e),ce=a(e,"P",{"data-svelte-h":!0}),r(ce)!=="svelte-1a8svyd"&&(ce.textContent=Bt),ct=s(e),me=a(e,"UL",{"data-svelte-h":!0}),r(me)!=="svelte-8vrgpw"&&(me.innerHTML=Qt),mt=s(e),d(ue.$$.fragment,e),ut=s(e),d(he.$$.fragment,e),ht=s(e),ye=a(e,"P",{}),Dt(ye).forEach(l),this.h()},h(){Ft(f,"name","hf:doc:metadata"),Ft(f,"content",al)},m(e,t){tl(document.head,f),n(e,M,t),n(e,g,t),n(e,fe,t),c(T,e,t),n(e,Me,t),c(w,e,t),n(e,Te,t),n(e,v,t),n(e,we,t),n(e,x,t),n(e,ve,t),n(e,J,t),n(e,xe,t),n(e,$,t),n(e,Je,t),c(C,e,t),n(e,$e,t),n(e,I,t),n(e,Ce,t),n(e,U,t),n(e,Ie,t),c(j,e,t),n(e,Ue,t),n(e,_,t),n(e,je,t),c(V,e,t),n(e,_e,t),n(e,Z,t),n(e,Ve,t),c(k,e,t),n(e,Ze,t),n(e,L,t),n(e,ke,t),c(W,e,t),n(e,Le,t),c(H,e,t),n(e,We,t),n(e,G,t),n(e,He,t),c(N,e,t),n(e,Ge,t),n(e,A,t),n(e,Ne,t),n(e,E,t),n(e,Ae,t),n(e,R,t),n(e,Ee,t),n(e,S,t),n(e,Re,t),c(P,e,t),n(e,Se,t),n(e,B,t),n(e,Pe,t),n(e,Q,t),n(e,Be,t),c(X,e,t),n(e,Qe,t),n(e,D,t),n(e,Xe,t),n(e,F,t),n(e,De,t),c(Y,e,t),n(e,Fe,t),n(e,q,t),n(e,Ye,t),n(e,z,t),n(e,qe,t),n(e,O,t),n(e,ze,t),n(e,K,t),n(e,Oe,t),n(e,ee,t),n(e,Ke,t),n(e,te,t),n(e,et,t),c(le,e,t),n(e,tt,t),c(b,e,t),n(e,lt,t),n(e,ne,t),n(e,nt,t),n(e,oe,t),n(e,ot,t),c(se,e,t),n(e,st,t),n(e,ie,t),n(e,it,t),c(ae,e,t),n(e,at,t),n(e,re,t),n(e,rt,t),c(pe,e,t),n(e,pt,t),c(de,e,t),n(e,dt,t),n(e,ce,t),n(e,ct,t),n(e,me,t),n(e,mt,t),c(ue,e,t),n(e,ut,t),c(he,e,t),n(e,ht,t),n(e,ye,t),ft=!0},p(e,[t]){const Xt={};t&2&&(Xt.$$scope={dirty:t,ctx:e}),b.$set(Xt)},i(e){ft||(m(T.$$.fragment,e),m(w.$$.fragment,e),m(C.$$.fragment,e),m(j.$$.fragment,e),m(V.$$.fragment,e),m(k.$$.fragment,e),m(W.$$.fragment,e),m(H.$$.fragment,e),m(N.$$.fragment,e),m(P.$$.fragment,e),m(X.$$.fragment,e),m(Y.$$.fragment,e),m(le.$$.fragment,e),m(b.$$.fragment,e),m(se.$$.fragment,e),m(ae.$$.fragment,e),m(pe.$$.fragment,e),m(de.$$.fragment,e),m(ue.$$.fragment,e),m(he.$$.fragment,e),ft=!0)},o(e){u(T.$$.fragment,e),u(w.$$.fragment,e),u(C.$$.fragment,e),u(j.$$.fragment,e),u(V.$$.fragment,e),u(k.$$.fragment,e),u(W.$$.fragment,e),u(H.$$.fragment,e),u(N.$$.fragment,e),u(P.$$.fragment,e),u(X.$$.fragment,e),u(Y.$$.fragment,e),u(le.$$.fragment,e),u(b.$$.fragment,e),u(se.$$.fragment,e),u(ae.$$.fragment,e),u(pe.$$.fragment,e),u(de.$$.fragment,e),u(ue.$$.fragment,e),u(he.$$.fragment,e),ft=!1},d(e){e&&(l(M),l(g),l(fe),l(Me),l(Te),l(v),l(we),l(x),l(ve),l(J),l(xe),l($),l(Je),l($e),l(I),l(Ce),l(U),l(Ie),l(Ue),l(_),l(je),l(_e),l(Z),l(Ve),l(Ze),l(L),l(ke),l(Le),l(We),l(G),l(He),l(Ge),l(A),l(Ne),l(E),l(Ae),l(R),l(Ee),l(S),l(Re),l(Se),l(B),l(Pe),l(Q),l(Be),l(Qe),l(D),l(Xe),l(F),l(De),l(Fe),l(q),l(Ye),l(z),l(qe),l(O),l(ze),l(K),l(Oe),l(ee),l(Ke),l(te),l(et),l(tt),l(lt),l(ne),l(nt),l(oe),l(ot),l(st),l(ie),l(it),l(at),l(re),l(rt),l(pt),l(dt),l(ce),l(ct),l(me),l(mt),l(ut),l(ht),l(ye)),l(f),h(T,e),h(w,e),h(C,e),h(j,e),h(V,e),h(k,e),h(W,e),h(H,e),h(N,e),h(P,e),h(X,e),h(Y,e),h(le,e),h(b,e),h(se,e),h(ae,e),h(pe,e),h(de,e),h(ue,e),h(he,e)}}}const al='{"title":"Deploy BERT Models with PyTorch Inference DLC on Vertex AI","local":"deploy-bert-models-with-pytorch-inference-dlc-on-vertex-ai","sections":[{"title":"Setup / Configuration","local":"setup--configuration","sections":[],"depth":2},{"title":"Register model in Vertex AI","local":"register-model-in-vertex-ai","sections":[],"depth":2},{"title":"Deploy model in Vertex AI","local":"deploy-model-in-vertex-ai","sections":[],"depth":2},{"title":"Online predictions on Vertex AI","local":"online-predictions-on-vertex-ai","sections":[],"depth":2},{"title":"Resource clean-up","local":"resource-clean-up","sections":[],"depth":2}],"depth":1}';function rl(be){return qt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hl extends Ot{constructor(f){super(),Kt(this,f,rl,il,Yt,{})}}export{hl as component};

Xet Storage Details

Size:
26.7 kB
·
Xet hash:
f4c24997a6cfdc5630b19ffb24a5cb7088ae22ad12c8c37391e4166c62560a3d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.