Buckets:
| import{s as In,o as Cn,n as S}from"../chunks/scheduler.b108d059.js";import{S as $n,i as Gn,g as o,s,r as c,A as vn,h as M,f as l,c as a,j as ut,u as r,x as u,k as bn,y as Q,a as n,v as y,d as m,t as d,w as h}from"../chunks/index.008de539.js";import{T as R}from"../chunks/Tip.aeb15ab7.js";import{C as f}from"../chunks/CodeBlock.3968c746.js";import{H as v,E as Zn}from"../chunks/EditOnGithub.d1c48e3d.js";function Bn(j){let i,J='Installing the <code>gke-gcloud-auth-plugin</code> does not need to be installed via <code>gcloud</code> specifically, to read more about the alternative installation methods, please visit <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_plugin" rel="nofollow">GKE Documentation - Install kubectl and configure cluster access</a>.';return{c(){i=o("p"),i.innerHTML=J},l(p){i=M(p,"P",{"data-svelte-h":!0}),u(i)!=="svelte-15icaac"&&(i.innerHTML=J)},m(p,g){n(p,i,g)},p:S,d(p){p&&l(i)}}}function Nn(j){let i,J='Important to check before creating the GKE Autopilot Cluster the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/performance-pods" rel="nofollow">GKE Documentation - Optimize Autopilot Pod performance by choosing a machine series</a>, since not all the versions support GPU accelerators e.g. <code>nvidia-l4</code> is not supported in the GKE cluster versions 1.28.3 or lower.';return{c(){i=o("p"),i.innerHTML=J},l(p){i=M(p,"P",{"data-svelte-h":!0}),u(i)!=="svelte-1cdm5nv"&&(i.innerHTML=J)},m(p,g){n(p,i,g)},p:S,d(p){p&&l(i)}}}function Wn(j){let i,J="To select the specific version in your location of the GKE Cluster, you can run the following command:",p,g,I,w,C='For more information please visit <a href="https://cloud.google.com/kubernetes-engine/versioning#specifying_cluster_version" rel="nofollow">GKE Documentation - Specifying cluster version</a>.',$;return g=new f({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwZ2V0LXNlcnZlci1jb25maWclMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZsYXR0ZW4lM0QlMjJjaGFubmVscyUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZmlsdGVyJTNEJTIyY2hhbm5lbHMuY2hhbm5lbCUzRFNUQUJMRSUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZm9ybWF0JTNEJTIyeWFtbChjaGFubmVscy5jaGFubmVsJTJDY2hhbm5lbHMuZGVmYXVsdFZlcnNpb24pJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1sb2NhdGlvbiUzRCUyNExPQ0FUSU9O",highlighted:`gcloud container get-server-config \\ | |
| --flatten=<span class="hljs-string">"channels"</span> \\ | |
| --filter=<span class="hljs-string">"channels.channel=STABLE"</span> \\ | |
| --format=<span class="hljs-string">"yaml(channels.channel,channels.defaultVersion)"</span> \\ | |
| --location=<span class="hljs-variable">$LOCATION</span>`,wrap:!1}}),{c(){i=o("p"),i.textContent=J,p=s(),c(g.$$.fragment),I=s(),w=o("p"),w.innerHTML=C},l(T){i=M(T,"P",{"data-svelte-h":!0}),u(i)!=="svelte-a3yff9"&&(i.textContent=J),p=a(T),r(g.$$.fragment,T),I=a(T),w=M(T,"P",{"data-svelte-h":!0}),u(w)!=="svelte-1bsy0hk"&&(w.innerHTML=C)},m(T,b){n(T,i,b),n(T,p,b),y(g,T,b),n(T,I,b),n(T,w,b),$=!0},p:S,i(T){$||(m(g.$$.fragment,T),$=!0)},o(T){d(g.$$.fragment,T),$=!1},d(T){T&&(l(i),l(p),l(I),l(w)),h(g,T)}}}function An(j){let i,J='To explore all the models that can be served via TGI, you can explore <a href="https://huggingface.co/models?other=text-generation-inference" rel="nofollow">the models tagged with <code>text-generation-inference</code> in the Hub</a>.';return{c(){i=o("p"),i.innerHTML=J},l(p){i=M(p,"P",{"data-svelte-h":!0}),u(i)!=="svelte-zgh49r"&&(i.innerHTML=J)},m(p,g){n(p,i,g)},p:S,d(p){p&&l(i)}}}function En(j){let i,J="Note that the selected LoRA adapters are not intended to be used on production environments, as the fine-tuned adapters have not been tested extensively.";return{c(){i=o("p"),i.textContent=J},l(p){i=M(p,"P",{"data-svelte-h":!0}),u(i)!=="svelte-1lm2hqu"&&(i.textContent=J)},m(p,g){n(p,i,g)},p:S,d(p){p&&l(i)}}}function Vn(j){let i,J="The Kubernetes deployment may take a few minutes to be ready, so you can check the status of the deployment with the following command:",p,g,I,w,C="Alternatively, you can just wait for the deployment to be ready with the following command:",$,T,b;return g=new f({props:{code:"a3ViZWN0bCUyMGdldCUyMHBvZHM=",highlighted:"kubectl get pods",wrap:!1}}),T=new f({props:{code:"a3ViZWN0bCUyMHdhaXQlMjAtLWZvciUzRGNvbmRpdGlvbiUzREF2YWlsYWJsZSUyMC0tdGltZW91dCUzRDcwMHMlMjBkZXBsb3ltZW50JTJGdGdpLWRlcGxveW1lbnQ=",highlighted:'kubectl <span class="hljs-built_in">wait</span> --<span class="hljs-keyword">for</span>=condition=Available --<span class="hljs-built_in">timeout</span>=700s deployment/tgi-deployment',wrap:!1}}),{c(){i=o("p"),i.textContent=J,p=s(),c(g.$$.fragment),I=s(),w=o("p"),w.textContent=C,$=s(),c(T.$$.fragment)},l(U){i=M(U,"P",{"data-svelte-h":!0}),u(i)!=="svelte-qgh43p"&&(i.textContent=J),p=a(U),r(g.$$.fragment,U),I=a(U),w=M(U,"P",{"data-svelte-h":!0}),u(w)!=="svelte-16v3quh"&&(w.textContent=C),$=a(U),r(T.$$.fragment,U)},m(U,G){n(U,i,G),n(U,p,G),y(g,U,G),n(U,I,G),n(U,w,G),n(U,$,G),y(T,U,G),b=!0},p:S,i(U){b||(m(g.$$.fragment,U),m(T.$$.fragment,U),b=!0)},o(U){d(g.$$.fragment,U),d(T.$$.fragment,U),b=!1},d(U){U&&(l(i),l(p),l(I),l(w),l($)),h(g,U),h(T,U)}}}function xn(j){let i,J="As in this case you are serving multiple LoRA adapters, to use those you will need to specify the <code>model</code> parameter when using the <code>/v1/chat/completions</code> endpoint (or the <code>adapter_id</code> parameter when using the <code>/generate</code> endpoint), so that the LoRA adapter is used. In any other case, the base model will be used instead, meaning that the adapters are only used when explicitly specified.";return{c(){i=o("p"),i.innerHTML=J},l(p){i=M(p,"P",{"data-svelte-h":!0}),u(i)!=="svelte-8b0fg8"&&(i.innerHTML=J)},m(p,g){n(p,i,g)},p:S,d(p){p&&l(i)}}}function kn(j){let i,J="In the examples below <code>localhost</code> will be used, but if you did deploy TGI with the ingress, feel free to use the ingress IP as mentioned above (without specifying the port).";return{c(){i=o("p"),i.innerHTML=J},l(p){i=M(p,"P",{"data-svelte-h":!0}),u(i)!=="svelte-1cpu0bq"&&(i.innerHTML=J)},m(p,g){n(p,i,g)},p:S,d(p){p&&l(i)}}}function Qn(j){let i,J,p,g,I,w,C,$="Gemma 2 is an advanced, lightweight open model that enhances performance and efficiency while building on the research and technology of its predecessor and the Gemini models developed by Google DeepMind and other teams across Google. Text Generation Inference (TGI) is a toolkit developed by Hugging Face for deploying and serving LLMs, with high performance text generation. And, Google Kubernetes Engine (GKE) is a fully-managed Kubernetes service in Google Cloud that can be used to deploy and operate containerized applications at scale using GCP’s infrastructure.",T,b,U="This example showcases how to deploy Gemma 2 2B from the Hugging Face Hub with multiple LoRA adapters fine-tuned for different purposes such as coding, SQL, or Japanese, on a GKE Cluster running the Hugging Face DLC for TGI i.e. a purpose-built container to deploy LLMs in a secure and managed environment.",G,H,ct,_,Vl="First, you need to install both <code>gcloud</code> and <code>kubectl</code> in your local machine, which are the command-line tools for Google Cloud and Kubernetes, respectively, to interact with the GCP and the GKE Cluster.",rt,Y,xl='<li>To install <code>gcloud</code>, follow the instructions at <a href="https://cloud.google.com/sdk/docs/install" rel="nofollow">Cloud SDK Documentation - Install the gcloud CLI</a>.</li> <li>To install <code>kubectl</code>, follow the instructions at <a href="https://kubernetes.io/docs/tasks/tools/#kubectl" rel="nofollow">Kubernetes Documentation - Install Tools</a>.</li>',yt,X,kl="Optionally, to ease the usage of the commands within this tutorial, you need to set the following environment variables for GCP:",mt,q,dt,L,Ql="Then you need to login into your GCP account and set the project ID to the one you want to use for the deployment of the GKE Cluster.",ht,F,gt,z,Rl="Once you are logged in, you need to enable the necessary service APIs in GCP i.e. the Google Kubernetes Engine API and the Google Container Registry API, which are necessary for the deployment of the GKE Cluster and the Hugging Face DLC for TGI.",Tt,D,Jt,P,Sl="Additionally, to use <code>kubectl</code> with the GKE Cluster credentials, you also need to install the <code>gke-gcloud-auth-plugin</code>, that can be installed with <code>gcloud</code> as follows:",Ut,K,ft,Z,wt,O,jt,ee,Hl="Once everything’s set up, you can proceed with the creation of the GKE Cluster and the node pool, which in this case will be a single GPU node, in order to use the GPU accelerator for high performance inference, also following TGI recommendations based on their internal optimizations for GPUs.",bt,te,_l="To deploy the GKE Cluster, the “Autopilot” mode will be used as it is the recommended one for most of the workloads, since the underlying infrastructure is managed by Google. Alternatively, you can also use the “Standard” mode.",It,B,Ct,le,$t,N,Gt,ne,Yl='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/gke/tgi-multi-lora-deployment/imgs/gke-cluster.png" alt="GKE Cluster in the GCP Console"/>',vt,se,Xl="Once the GKE Cluster is created, you can get the credentials to access it via <code>kubectl</code> with the following command:",Zt,ae,Bt,ie,Nt,oe,ql='As <a href="https://huggingface.co/google/gemma-2-2b-it" rel="nofollow"><code>google/gemma-2-2b-it</code></a> is a gated model, you need to set a Kubernetes secret with the Hugging Face Hub token via <code>kubectl</code>.',Wt,Me,Ll='To generate a custom token for the Hugging Face Hub, you can follow the instructions at <a href="https://huggingface.co/docs/hub/en/security-tokens" rel="nofollow">Hugging Face Hub - User access tokens</a>; and the recommended way of setting it is to install the <code>huggingface_hub</code> Python SDK as follows:',At,pe,Et,ue,Fl="And then login in with the generated token with read-access over the gated/private model:",Vt,ce,xt,re,zl="Finally, you can create the Kubernetes secret with the generated token for the Hugging Face Hub as follows using the <code>huggingface_hub</code> Python SDK to retrieve the token:",kt,ye,Qt,me,Dl="Or, alternatively, you can directly set the token as follows:",Rt,de,St,he,Pl='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/gke/tgi-multi-lora-deployment/imgs/gke-secrets.png" alt="GKE Secret in the GCP Console"/>',Ht,ge,Kl='More information on how to set Kubernetes secrets in a GKE Cluster at <a href="https://cloud.google.com/secret-manager/docs/secret-manager-managed-csi-component" rel="nofollow">Secret Manager Documentation - Use Secret Manager add-on with Google Kubernetes Engine</a>.',_t,Te,Yt,Je,Ol='Now you can proceed to the Kubernetes deployment of the Hugging Face DLC for TGI, serving the <a href="https://huggingface.co/google/gemma-2-2b-it" rel="nofollow"><code>google/gemma-2-2b-it</code></a> model and multiple LoRA adapters fine-tuned on top of it, from the Hugging Face Hub.',Xt,W,qt,Ue,en='The Hugging Face DLC for TGI will be deployed via <code>kubectl</code>, from the configuration files in the <a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-multi-lora-deployment/config/" rel="nofollow"><code>config/</code></a> directory:',Lt,fe,tn='<li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-multi-lora-deployment/config/deployment.yaml" rel="nofollow"><code>deployment.yaml</code></a>: contains the deployment details of the pod including the reference to the Hugging Face DLC for TGI setting the <code>MODEL_ID</code> to <a href="https://huggingface.co/google/gemma-2-2b-it" rel="nofollow"><code>google/gemma-2-2b-it</code></a>, and the <code>LORA_ADAPTERS</code> to <code>google-cloud-partnership/gemma-2-2b-it-lora-magicoder,google-cloud-partnership/gemma-2-2b-it-lora-sql</code>, being the following adapters:<ul><li><a href="https://huggingface.co/google-cloud-partnership/gemma-2-2b-it-lora-sql" rel="nofollow"><code>google-cloud-partnership/gemma-2-2b-it-lora-sql</code></a>: fine-tuned with <a href="https://huggingface.co/datasets/gretelai/synthetic_text_to_sql" rel="nofollow"><code>gretelai/synthetic_text_to_sql</code></a> to generate SQL queries with an explanation, given an SQL context and a prompt / question about it.</li> <li><a href="https://huggingface.co/google-cloud-partnership/gemma-2-2b-it-lora-magicoder" rel="nofollow"><code>google-cloud-partnership/gemma-2-2b-it-lora-magicoder</code></a>: fine-tuned with <a href="https://huggingface.co/datasets/ise-uiuc/Magicoder-OSS-Instruct-75K" rel="nofollow"><code>ise-uiuc/Magicoder-OSS-Instruct-75K</code></a> to generate code in diverse programming languages such as Python, Rust, or C, among many others; based on an input problem.</li> <li><a href="https://huggingface.co/google-cloud-partnership/gemma-2-2b-it-lora-jap-en" rel="nofollow"><code>google-cloud-partnership/gemma-2-2b-it-lora-jap-en</code></a>: fine-tuned with <a href="https://huggingface.co/datasets/Jofthomas/japanese-english-translation" rel="nofollow"><code>Jofthomas/japanese-english-translation</code></a>, a synthetically generated dataset of short Japanese sentences translated to English; to translate English to Japanese and the other way around.</li></ul></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-multi-lora-deployment/config/service.yaml" rel="nofollow"><code>service.yaml</code></a>: contains the service details of the pod, exposing the port 8080 for the TGI service.</li> <li>(optional) <a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-multi-lora-deployment/config/ingress.yaml" rel="nofollow"><code>ingress.yaml</code></a>: contains the ingress details of the pod, exposing the service to the external world so that it can be accessed via the ingress IP.</li>',Ft,A,zt,we,Dt,E,Pt,je,ln='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/gke/tgi-multi-lora-deployment/imgs/gke-deployment.png" alt="GKE Deployment in the GCP Console"/>',Kt,be,nn='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/gke/tgi-multi-lora-deployment/imgs/gke-deployment-logs.png" alt="GKE Deployment Logs in the GCP Console"/>',Ot,Ie,el,Ce,sn="To run the inference over the deployed TGI service, you need to make sure that the service is accessible first, you can do so by either:",tl,V,$e,ot,an="Port-forwarding the deployed TGI service to the port 8080, so as to access via <code>localhost</code> with the command:",Wl,Ge,Al,ve,Mt,on="Accessing the TGI service via the external IP of the ingress, which is the default scenario here since you have defined the ingress configuration in the <code>config/ingress.yaml</code> file (but it can be skipped in favour of the port-forwarding), that can be retrieved with the following command:",El,Ze,ll,Be,nl,Ne,Mn="To send a POST request to the TGI service using <code>cURL</code>, you can run the following command:",sl,We,al,Ae,pn="Or send a POST request to the ingress IP instead:",il,Ee,ol,x,Ml,Ve,un='For example, say that you want to generate a piece of code for a problem that you cannot solve, then you should ideally use the fine-tuned adapter <a href="https://huggingface.co/google-cloud-partnership/gemma-2-2b-it-lora-magicoder" rel="nofollow"><code>google-cloud-partnership/gemma-2-2b-it-lora-magicoder</code></a> which is specifically fine-tuned for that; alternatively you could also use the base instruction-tuned model as it may be able to tackle a wide variety of tasks, but e.g. the Japanese to English model wouldn’t be a nice pick for that task.',pl,xe,ul,ke,cn="Which generates the following solution to the given prompt:",cl,Qe,rl,Re,rn="Translated to Rust code that would be:",yl,Se,ml,He,dl,_e,yn="To run the inference using Python, you can either use the <code>huggingface_hub</code> Python SDK (recommended) or the <code>openai</code> Python SDK.",hl,k,gl,Ye,Tl,Xe,mn="You can install it via <code>pip</code> as <code>pip install --upgrade --quiet huggingface_hub</code>, and then run the following snippet to mimic the <code>cURL</code> commands above i.e. sending requests to the Messages API providing the adapter identifier via the <code>model</code> parameter:",Jl,qe,Ul,Le,dn="Alternatively, you can also format the prompt yourself and send that via the Text Generation API providing the adapter identifier via the <code>adapter_id</code> argument as follows:",fl,Fe,wl,ze,jl,De,hn="Additionally, you can also use the Messages API via <code>openai</code>; you can install it via <code>pip</code> as <code>pip install --upgrade openai</code>, and then run:",bl,Pe,Il,Ke,Cl,Oe,gn="Finally, once you are done using TGI on the GKE Cluster, you can safely delete the GKE Cluster to avoid incurring in unnecessary costs.",$l,et,Gl,tt,Tn="Alternatively, you can also downscale the replicas of the deployed pod to 0 in case you want to preserve the cluster, since the default GKE Cluster deployed with GKE Autopilot mode is running just a single <code>e2-small</code> instance.",vl,lt,Zl,nt,Bl,pt,Nl;return I=new v({props:{title:"Deploy Gemma2 with multiple LoRA adapters with TGI DLC on GKE",local:"deploy-gemma2-with-multiple-lora-adapters-with-tgi-dlc-on-gke",headingTag:"h1"}}),H=new v({props:{title:"Setup / Configuration",local:"setup--configuration",headingTag:"h2"}}),q=new f({props:{code:"ZXhwb3J0JTIwUFJPSkVDVF9JRCUzRHlvdXItcHJvamVjdC1pZCUwQWV4cG9ydCUyMExPQ0FUSU9OJTNEeW91ci1sb2NhdGlvbiUwQWV4cG9ydCUyMENMVVNURVJfTkFNRSUzRHlvdXItY2x1c3Rlci1uYW1l",highlighted:`<span class="hljs-built_in">export</span> PROJECT_ID=your-project-id | |
| <span class="hljs-built_in">export</span> LOCATION=your-location | |
| <span class="hljs-built_in">export</span> CLUSTER_NAME=your-cluster-name`,wrap:!1}}),F=new f({props:{code:"Z2Nsb3VkJTIwYXV0aCUyMGxvZ2luJTBBZ2Nsb3VkJTIwYXV0aCUyMGFwcGxpY2F0aW9uLWRlZmF1bHQlMjBsb2dpbiUyMCUyMCUyMyUyMEZvciUyMGxvY2FsJTIwZGV2ZWxvcG1lbnQlMEFnY2xvdWQlMjBjb25maWclMjBzZXQlMjBwcm9qZWN0JTIwJTI0UFJPSkVDVF9JRA==",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 <span class="hljs-variable">$PROJECT_ID</span>`,wrap:!1}}),D=new f({props:{code:"Z2Nsb3VkJTIwc2VydmljZXMlMjBlbmFibGUlMjBjb250YWluZXIuZ29vZ2xlYXBpcy5jb20lMEFnY2xvdWQlMjBzZXJ2aWNlcyUyMGVuYWJsZSUyMGNvbnRhaW5lcnJlZ2lzdHJ5Lmdvb2dsZWFwaXMuY29t",highlighted:`gcloud services <span class="hljs-built_in">enable</span> container.googleapis.com | |
| gcloud services <span class="hljs-built_in">enable</span> containerregistry.googleapis.com`,wrap:!1}}),K=new f({props:{code:"Z2Nsb3VkJTIwY29tcG9uZW50cyUyMGluc3RhbGwlMjBna2UtZ2Nsb3VkLWF1dGgtcGx1Z2lu",highlighted:"gcloud components install gke-gcloud-auth-plugin",wrap:!1}}),Z=new R({props:{$$slots:{default:[Bn]},$$scope:{ctx:j}}}),O=new v({props:{title:"Create GKE Cluster",local:"create-gke-cluster",headingTag:"h2"}}),B=new R({props:{$$slots:{default:[Nn]},$$scope:{ctx:j}}}),le=new f({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwY2x1c3RlcnMlMjBjcmVhdGUtYXV0byUyMCUyNENMVVNURVJfTkFNRSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJvamVjdCUzRCUyNFBST0pFQ1RfSUQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWxvY2F0aW9uJTNEJTI0TE9DQVRJT04lMjAlNUMlMEElMjAlMjAlMjAlMjAtLXJlbGVhc2UtY2hhbm5lbCUzRHN0YWJsZSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tY2x1c3Rlci12ZXJzaW9uJTNEMS4yOSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbm8tYXV0b3Byb3Zpc2lvbmluZy1lbmFibGUtaW5zZWN1cmUta3ViZWxldC1yZWFkb25seS1wb3J0",highlighted:`gcloud container clusters create-auto <span class="hljs-variable">$CLUSTER_NAME</span> \\ | |
| --project=<span class="hljs-variable">$PROJECT_ID</span> \\ | |
| --location=<span class="hljs-variable">$LOCATION</span> \\ | |
| --release-channel=stable \\ | |
| --cluster-version=1.29 \\ | |
| --no-autoprovisioning-enable-insecure-kubelet-readonly-port`,wrap:!1}}),N=new R({props:{$$slots:{default:[Wn]},$$scope:{ctx:j}}}),ae=new f({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwY2x1c3RlcnMlMjBnZXQtY3JlZGVudGlhbHMlMjAlMjRDTFVTVEVSX05BTUUlMjAtLWxvY2F0aW9uJTNEJTI0TE9DQVRJT04=",highlighted:'gcloud container clusters get-credentials <span class="hljs-variable">$CLUSTER_NAME</span> --location=<span class="hljs-variable">$LOCATION</span>',wrap:!1}}),ie=new v({props:{title:"Get Hugging Face token and set secrets in GKE",local:"get-hugging-face-token-and-set-secrets-in-gke",headingTag:"h2"}}),pe=new f({props:{code:"cGlwJTIwaW5zdGFsbCUyMC0tdXBncmFkZSUyMC0tcXVpZXQlMjBodWdnaW5nZmFjZV9odWI=",highlighted:"pip install --upgrade --quiet huggingface_hub",wrap:!1}}),ce=new f({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}}),ye=new f({props:{code:"a3ViZWN0bCUyMGNyZWF0ZSUyMHNlY3JldCUyMGdlbmVyaWMlMjBoZi1zZWNyZXQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZyb20tbGl0ZXJhbCUzRGhmX3Rva2VuJTNEJTI0KHB5dGhvbiUyMC1jJTIwJTIyZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGdldF90b2tlbiUzQiUyMHByaW50KGdldF90b2tlbigpKSUyMiklMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRyeS1ydW4lM0RjbGllbnQlMjAtbyUyMHlhbWwlMjAlN0MlMjBrdWJlY3RsJTIwYXBwbHklMjAtZiUyMC0=",highlighted:`kubectl create secret generic hf-secret \\ | |
| --from-literal=hf_token=$(python -c <span class="hljs-string">"from huggingface_hub import get_token; print(get_token())"</span>) \\ | |
| --dry-run=client -o yaml | kubectl apply -f -`,wrap:!1}}),de=new f({props:{code:"a3ViZWN0bCUyMGNyZWF0ZSUyMHNlY3JldCUyMGdlbmVyaWMlMjBoZi1zZWNyZXQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZyb20tbGl0ZXJhbCUzRGhmX3Rva2VuJTNEaGZfKioqJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kcnktcnVuJTNEY2xpZW50JTIwLW8lMjB5YW1sJTIwJTdDJTIwa3ViZWN0bCUyMGFwcGx5JTIwLWYlMjAt",highlighted:`kubectl create secret generic hf-secret \\ | |
| --from-literal=hf_token=hf_*** \\ | |
| --dry-run=client -o yaml | kubectl apply -f -`,wrap:!1}}),Te=new v({props:{title:"Deploy TGI",local:"deploy-tgi",headingTag:"h2"}}),W=new R({props:{$$slots:{default:[An]},$$scope:{ctx:j}}}),A=new R({props:{warning:!0,$$slots:{default:[En]},$$scope:{ctx:j}}}),we=new f({props:{code:"a3ViZWN0bCUyMGFwcGx5JTIwLWYlMjBjb25maWclMkY=",highlighted:"kubectl apply -f config/",wrap:!1}}),E=new R({props:{$$slots:{default:[Vn]},$$scope:{ctx:j}}}),Ie=new v({props:{title:"Inference with TGI",local:"inference-with-tgi",headingTag:"h2"}}),Ge=new f({props:{code:"a3ViZWN0bCUyMHBvcnQtZm9yd2FyZCUyMHNlcnZpY2UlMkZ0Z2ktc2VydmljZSUyMDgwODAlM0E4MDgw",highlighted:"kubectl port-forward service/tgi-service 8080:8080",wrap:!1}}),Ze=new f({props:{code:"a3ViZWN0bCUyMGdldCUyMGluZ3Jlc3MlMjB0Z2ktaW5ncmVzcyUyMC1vJTIwanNvbnBhdGglM0QnJTdCLnN0YXR1cy5sb2FkQmFsYW5jZXIuaW5ncmVzcyU1QjAlNUQuaXAlN0Qn",highlighted:'kubectl get ingress tgi-ingress -o jsonpath=<span class="hljs-string">'{.status.loadBalancer.ingress[0].ip}'</span>',wrap:!1}}),Be=new v({props:{title:"Via cURL",local:"via-curl",headingTag:"h3"}}),We=new f({props:{code:"Y3VybCUyMGh0dHAlM0ElMkYlMkZsb2NhbGhvc3QlM0E4MDgwJTJGdjElMkZjaGF0JTJGY29tcGxldGlvbnMlMjAlNUMlMEElMjAlMjAlMjAlMjAtWCUyMFBPU1QlMjAlNUMlMEElMjAlMjAlMjAlMjAtZCUyMCclN0IlMjJtZXNzYWdlcyUyMiUzQSU1QiU3QiUyMnJvbGUlMjIlM0ElMjJ1c2VyJTIyJTJDJTIyY29udGVudCUyMiUzQSUyMldoYXQlMjBpcyUyMERlZXAlMjBMZWFybmluZyUzRiUyMiU3RCU1RCUyQyUyMnRlbXBlcmF0dXJlJTIyJTNBMC43JTJDJTIydG9wX3AlMjIlM0EwLjk1JTJDJTIybWF4X3Rva2VucyUyMiUzQTEyOCU3RCU3RCclMjAlNUMlMEElMjAlMjAlMjAlMjAtSCUyMCdDb250ZW50LVR5cGUlM0ElMjBhcHBsaWNhdGlvbiUyRmpzb24n",highlighted:`curl http://localhost:8080/v1/chat/completions \\ | |
| -X POST \\ | |
| -d <span class="hljs-string">'{"messages":[{"role":"user","content":"What is Deep Learning?"}],"temperature":0.7,"top_p":0.95,"max_tokens":128}}'</span> \\ | |
| -H <span class="hljs-string">'Content-Type: application/json'</span>`,wrap:!1}}),Ee=new f({props:{code:"Y3VybCUyMGh0dHAlM0ElMkYlMkYlMjQoa3ViZWN0bCUyMGdldCUyMGluZ3Jlc3MlMjB0Z2ktaW5ncmVzcyUyMC1vJTIwanNvbnBhdGglM0QnJTdCLnN0YXR1cy5sb2FkQmFsYW5jZXIuaW5ncmVzcyU1QjAlNUQuaXAlN0QnKSUyRnYxJTJGY2hhdCUyRmNvbXBsZXRpb25zJTIwJTVDJTBBJTIwJTIwJTIwJTIwLVglMjBQT1NUJTIwJTVDJTBBJTIwJTIwJTIwJTIwLWQlMjAnJTdCJTIybWVzc2FnZXMlMjIlM0ElNUIlN0IlMjJyb2xlJTIyJTNBJTIydXNlciUyMiUyQyUyMmNvbnRlbnQlMjIlM0ElMjJXaGF0JTIwaXMlMjBEZWVwJTIwTGVhcm5pbmclM0YlMjIlN0QlNUQlMkMlMjJ0ZW1wZXJhdHVyZSUyMiUzQTAuNyUyQyUyMnRvcF9wJTIyJTNBMC45NSUyQyUyMm1heF90b2tlbnMlMjIlM0ExMjglN0QlN0QnJTIwJTVDJTBBJTIwJTIwJTIwJTIwLUglMjAnQ29udGVudC1UeXBlJTNBJTIwYXBwbGljYXRpb24lMkZqc29uJw==",highlighted:`curl http://$(kubectl get ingress tgi-ingress -o jsonpath=<span class="hljs-string">'{.status.loadBalancer.ingress[0].ip}'</span>)/v1/chat/completions \\ | |
| -X POST \\ | |
| -d <span class="hljs-string">'{"messages":[{"role":"user","content":"What is Deep Learning?"}],"temperature":0.7,"top_p":0.95,"max_tokens":128}}'</span> \\ | |
| -H <span class="hljs-string">'Content-Type: application/json'</span>`,wrap:!1}}),x=new R({props:{$$slots:{default:[xn]},$$scope:{ctx:j}}}),xe=new f({props:{code:"Y3VybCUyMGh0dHAlM0ElMkYlMkZsb2NhbGhvc3QlM0E4MDgwJTJGdjElMkZjaGF0JTJGY29tcGxldGlvbnMlMjAlNUMlMEElMjAlMjAlMjAlMjAtWCUyMFBPU1QlMjAlNUMlMEElMjAlMjAlMjAlMjAtZCUyMCclN0IlMjJtZXNzYWdlcyUyMiUzQSU1QiU3QiUyMnJvbGUlMjIlM0ElMjJ1c2VyJTIyJTJDJTIyY29udGVudCUyMiUzQSUyMllvdSUyMGFyZSUyMGdpdmVuJTIwYSUyMHZlY3RvciUyMG9mJTIwaW50ZWdlcnMlMkMlMjBBJTJDJTIwb2YlMjBsZW5ndGglMjBuLiUyMFlvdXIlMjB0YXNrJTIwaXMlMjB0byUyMGltcGxlbWVudCUyMGElMjBmdW5jdGlvbiUyMHRoYXQlMjBmaW5kcyUyMHRoZSUyMG1heGltdW0lMjBwcm9kdWN0JTIwb2YlMjBhbnklMjB0d28lMjBkaXN0aW5jdCUyMGVsZW1lbnRzJTIwaW4lMjB0aGUlMjB2ZWN0b3IuJTIwV3JpdGUlMjBhJTIwZnVuY3Rpb24lMjBpbiUyMFJ1c3QlMjB0byUyMHJldHVybiUyMHRoaXMlMjBtYXhpbXVtJTIwcHJvZHVjdC4lMjBGdW5jdGlvbiUyMFNpZ25hdHVyZSUzQSUyMHJ1c3QlMjBmbiUyMG1heF9wcm9kdWN0KGElM0ElMjBWZWMlM0NpMzIlM0UpJTIwLSUzRSUyMGkzMiUyMCUyMElucHV0JTNBJTIwLSUyMEElMjB2ZWN0b3IlMjBhJTIwb2YlMjBsZW5ndGglMjBuJTIwKDIlMjAlM0MlM0QlMjBuJTIwJTNDJTNEJTIwMTAlNUU1KSUyQyUyMHdoZXJlJTIwZWFjaCUyMGVsZW1lbnQlMjBpcyUyMGFuJTIwaW50ZWdlciUyMCgtMTAlNUU0JTIwJTNDJTNEJTIwYSU1QmklNUQlMjAlM0MlM0QlMjAxMCU1RTQpLiUyME91dHB1dCUzQSUyMC0lMjBSZXR1cm4lMjB0aGUlMjBtYXhpbXVtJTIwcHJvZHVjdCUyMG9mJTIwdHdvJTIwZGlzdGluY3QlMjBlbGVtZW50cy4lMjBFeGFtcGxlJTNBJTIwSW5wdXQlM0ElMjBhJTIwJTNEJTIwdmVjISU1QjElMkMlMjA1JTJDJTIwMyUyQyUyMDklNUQlMjBPdXRwdXQlM0ElMjBtYXhfcHJvZHVjdChhKSUyMC0lM0UlMjA0NSUyMiU3RCU1RCUyQyUyMnRlbXBlcmF0dXJlJTIyJTNBMC43JTJDJTIydG9wX3AlMjIlM0EwLjk1JTJDJTIybWF4X3Rva2VucyUyMiUzQTI1NiUyQyUyMm1vZGVsJTIyJTNBJTIyZ29vZ2xlLWNsb3VkLXBhcnRuZXJzaGlwJTJGZ2VtbWEtMi0yYi1pdC1sb3JhLW1hZ2ljb2RlciUyMiU3RCU3RCclMjAlNUMlMEElMjAlMjAlMjAlMjAtSCUyMCdDb250ZW50LVR5cGUlM0ElMjBhcHBsaWNhdGlvbiUyRmpzb24n",highlighted:`curl http://localhost:8080/v1/chat/completions \\ | |
| -X POST \\ | |
| -d <span class="hljs-string">'{"messages":[{"role":"user","content":"You are given a vector of integers, A, of length n. Your task is to implement a function that finds the maximum product of any two distinct elements in the vector. Write a function in Rust to return this maximum product. Function Signature: rust fn max_product(a: Vec<i32>) -> i32 Input: - A vector a of length n (2 <= n <= 10^5), where each element is an integer (-10^4 <= a[i] <= 10^4). Output: - Return the maximum product of two distinct elements. Example: Input: a = vec![1, 5, 3, 9] Output: max_product(a) -> 45"}],"temperature":0.7,"top_p":0.95,"max_tokens":256,"model":"google-cloud-partnership/gemma-2-2b-it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lM0UlMjBtYXgxJTIwJTdCJTVDbiUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG1heDIlMjAlM0QlMjBtYXgxJTNCJTVDbiUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG1heDElMjAlM0QlMjBhJTVCaSU1RCUzQiU1Q24lMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0QlMjBlbHNlJTIwaWYlMjBhJTVCaSU1RCUyMCUzRSUyMG1heDIlMjAlN0IlNUNuJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyJTdEJTJDJTIybG9ncHJvYnMlMjIlM0FudWxsJTJDJTIyZmluaXNoX3JlYXNvbiUyMiUzQSUyMmxlbmd0aCUyMiU3RCU1RCUyQyUyMnVzYWdlJTIyJTNBJTdCJTIycHJvbXB0X3Rva2VucyUyMiUzQTE2MyUyQyUyMmNvbXBsZXRpb25fdG9rZW5zJTIyJTNBMTI4JTJDJTIydG90YWxfdG9rZW5zJTIyJTNBMjkxJTdEJTdE",highlighted:'{<span class="hljs-string">"object"</span>:<span class="hljs-string">"chat.completion"</span>,<span class="hljs-string">"id"</span>:<span class="hljs-string">""</span>,<span class="hljs-string">"created"</span>:<span class="hljs-number">1727378101</span>,<span class="hljs-string">"model"</span>:<span class="hljs-string">"google/gemma-2-2b-it"</span>,<span class="hljs-string">"system_fingerprint"</span>:<span class="hljs-string">"2.3.1-dev0-native"</span>,<span class="hljs-string">"choices"</span>:[{<span class="hljs-string">"index"</span>:<span class="hljs-number">0</span>,<span class="hljs-string">"message"</span>:{<span class="hljs-string">"role"</span>:<span class="hljs-string">"assistant"</span>,<span class="hljs-string">"content"</span>:<span class="hljs-string">"\\`\\`\\`rust<span class="hljs-char escape_">\\n</span>fn max_product(a: Vec<i32>) -> i32 {<span class="hljs-char escape_">\\n</span> let mut max1 = a[0];<span class="hljs-char escape_">\\n</span> let mut max2 = a[1];<span class="hljs-char escape_">\\n</span> if max2 < max1 {<span class="hljs-char escape_">\\n</span> std::mem::swap(&mut max1, &mut max2);<span class="hljs-char escape_">\\n</span> }<span class="hljs-char escape_">\\n</span> for i in 2..a.len() {<span class="hljs-char escape_">\\n</span> if a[i] > max1 {<span class="hljs-char escape_">\\n</span> max2 = max1;<span class="hljs-char escape_">\\n</span> max1 = a[i];<span class="hljs-char escape_">\\n</span> } else if a[i] > max2 {<span class="hljs-char escape_">\\n</span> "</span>},<span class="hljs-string">"logprobs"</span>:<span class="hljs-literal">null</span>,<span class="hljs-string">"finish_reason"</span>:<span class="hljs-string">"length"</span>}],<span class="hljs-string">"usage"</span>:{<span class="hljs-string">"prompt_tokens"</span>:<span class="hljs-number">163</span>,<span class="hljs-string">"completion_tokens"</span>:<span class="hljs-number">128</span>,<span class="hljs-string">"total_tokens"</span>:<span class="hljs-number">291</span>}}',wrap:!1}}),Se=new f({props:{code:"Zm4lMjBtYXhfcHJvZHVjdChhJTNBJTIwVmVjJTNDaTMyJTNFKSUyMC0lM0UlMjBpMzIlMjAlN0IlMEElMjAlMjAlMjAlMjBpZiUyMGEubGVuKCklMjAlM0MlMjAyJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwMCUzQiUwQSUyMCUyMCUyMCUyMCU3RCUwQSUyMCUyMCUyMCUyMGxldCUyMG11dCUyMG1heF9wcm9kdWN0JTIwJTNEJTIwYSU1QjAlNUQlMjAqJTIwYSU1QjElNUQlM0IlMEElMjAlMjAlMjAlMjBmb3IlMjBpJTIwaW4lMjAxLi5hLmxlbigpJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZm9yJTIwaiUyMGluJTIwaSUyMCUyQiUyMDEuLmEubGVuKCklMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBpZiUyMGElNUJpJTVEJTIwKiUyMGElNUJqJTVEJTIwJTNFJTIwbWF4X3Byb2R1Y3QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtYXhfcHJvZHVjdCUyMCUzRCUyMGElNUJpJTVEJTIwKiUyMGElNUJqJTVEJTNCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwbWF4X3Byb2R1Y3QlMEElN0Q=",highlighted:`<span class="hljs-keyword">fn</span> <span class="hljs-title function_">max_product</span>(a: <span class="hljs-type">Vec</span><<span class="hljs-type">i32</span>>) <span class="hljs-punctuation">-></span> <span class="hljs-type">i32</span> { | |
| <span class="hljs-keyword">if</span> a.<span class="hljs-title function_ invoke__">len</span>() < <span class="hljs-number">2</span> { | |
| <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>; | |
| } | |
| <span class="hljs-keyword">let</span> <span class="hljs-keyword">mut </span><span class="hljs-variable">max_product</span> = a[<span class="hljs-number">0</span>] * a[<span class="hljs-number">1</span>]; | |
| <span class="hljs-keyword">for</span> <span class="hljs-variable">i</span> <span class="hljs-keyword">in</span> <span class="hljs-number">1</span>..a.<span class="hljs-title function_ invoke__">len</span>() { | |
| <span class="hljs-keyword">for</span> <span class="hljs-variable">j</span> <span class="hljs-keyword">in</span> i + <span class="hljs-number">1</span>..a.<span class="hljs-title function_ invoke__">len</span>() { | |
| <span class="hljs-keyword">if</span> a[i] * a[j] > max_product { | |
| max_product = a[i] * a[j]; | |
| } | |
| } | |
| } | |
| max_product | |
| }`,wrap:!1}}),He=new v({props:{title:"Via Python",local:"via-python",headingTag:"h3"}}),k=new R({props:{$$slots:{default:[kn]},$$scope:{ctx:j}}}),Ye=new v({props:{title:"huggingface_hub",local:"huggingfacehub",headingTag:"h4"}}),qe=new f({props:{code:"ZnJv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Q2kzMiUzRSklMjAtJTNFJTIwaTMyJTIwJTIwSW5wdXQlM0ElMjAtJTIwQSUyMHZlY3RvciUyMGElMjBvZiUyMGxlbmd0aCUyMG4lMjAoMiUyMCUzQyUzRCUyMG4lMjAlM0MlM0QlMjAxMCU1RTUpJTJDJTIwd2hlcmUlMjBlYWNoJTIwZWxlbWVudCUyMGlzJTIwYW4lMjBpbnRlZ2VyJTIwKC0xMCU1RTQlMjAlM0MlM0QlMjBhJTVCaSU1RCUyMCUzQyUzRCUyMDEwJTVFNCkuJTIwT3V0cHV0JTNBJTIwLSUyMFJldHVybiUyMHRoZSUyMG1heGltdW0lMjBwcm9kdWN0JTIwb2YlMjB0d28lMjBkaXN0aW5jdCUyMGVsZW1lbnRzLiUyMEV4YW1wbGUlM0ElMjBJbnB1dCUzQSUyMGElMjAlM0QlMjB2ZWMhJTVCMSUyQyUyMDUlMkMlMjAzJTJDJTIwOSU1RCUyME91dHB1dCUzQSUyMG1heF9wcm9kdWN0KGEpJTIwLSUzRSUyMDQ1JTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTVEJTJDJTBBJTIwJTIwJTIwJTIwbWF4X3Rva2VucyUzRDEyOCUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> InferenceClient | |
| client = InferenceClient(base_url=<span class="hljs-string">"http://localhost:8080"</span>, api_key=<span class="hljs-string">"-"</span>) | |
| chat_completion = client.chat.completions.create( | |
| model=<span class="hljs-string">"google-cloud-partnership/gemma-2-2b-it-lora-magicoder"</span>, | |
| messages=[ | |
| {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"You are given a vector of integers, A, of length n. Your task is to implement a function that finds the maximum product of any two distinct elements in the vector. Write a function in Rust to return this maximum product. Function Signature: rust fn max_product(a: Vec<i32>) -> i32 Input: - A vector a of length n (2 <= n <= 10^5), where each element is an integer (-10^4 <= a[i] <= 10^4). Output: - Return the maximum product of two distinct elements. Example: Input: a = vec![1, 5, 3, 9] Output: max_product(a) -> 45"</span>}, | |
| ], | |
| max_tokens=<span class="hljs-number">128</span>, | |
| )`,wrap:!1}}),Fe=new f({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMEluZmVyZW5jZUNsaWVudCUwQSUwQWNsaWVudCUyMCUzRCUyMEluZmVyZW5jZUNsaWVudCglMjJodHRwJTNBJTJGJTJGbG9jYWxob3N0JTNBODA4MCUyMiUyQyUyMGFwaV9rZXklM0QlMjItJTIyKSUwQSUwQWdlbmVyYXRpb24lMjAlM0QlMjBjbGllbnQudGV4dF9nZW5lcmF0aW9uKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRCUyMllvdSUyMGFyZSUyMGdpdmVuJTIwYSUyMHZlY3RvciUyMG9mJTIwaW50ZWdlcnMlMkMlMjBBJTJDJTIwb2YlMjBsZW5ndGglMjBuLiUyMFlvdXIlMjB0YXNrJTIwaXMlMjB0byUyMGltcGxlbWVudCUyMGElMjBmdW5jdGlvbiUyMHRoYXQlMjBmaW5kcyUyMHRoZSUyMG1heGltdW0lMjBwcm9kdWN0JTIwb2YlMjBhbnklMjB0d28lMjBkaXN0aW5jdCUyMGVsZW1lbnRzJTIwaW4lMjB0aGUlMjB2ZWN0b3IuJTIwV3JpdGUlMjBhJTIwZnVuY3Rpb24lMjBpbiUyMFJ1c3QlMjB0byUyMHJldHVybiUyMHRoaXMlMjBtYXhpbXVtJTIwcHJvZHVjdC4lMjBGdW5jdGlvbiUyMFNpZ25hdHVyZSUzQSUyMHJ1c3QlMjBmbiUyMG1heF9wcm9kdWN0KGElM0ElMjBWZWMlM0NpMzIlM0UpJTIwLSUzRSUyMGkzMiUyMCUyMElucHV0JTNBJTIwLSUyMEElMjB2ZWN0b3IlMjBhJTIwb2YlMjBsZW5ndGglMjBuJTIwKDIlMjAlM0MlM0QlMjBuJTIwJTNDJTNEJTIwMTAlNUU1KSUyQyUyMHdoZXJlJTIwZWFjaCUyMGVsZW1lbnQlMjBpcyUyMGFuJTIwaW50ZWdlciUyMCgtMTAlNUU0JTIwJTNDJTNEJTIwYSU1QmklNUQlMjAlM0MlM0QlMjAxMCU1RTQpLiUyME91dHB1dCUzQSUyMC0lMjBSZXR1cm4lMjB0aGUlMjBtYXhpbXVtJTIwcHJvZHVjdCUyMG9mJTIwdHdvJTIwZGlzdGluY3QlMjBlbGVtZW50cy4lMjBFeGFtcGxlJTNBJTIwSW5wdXQlM0ElMjBhJTIwJTNEJTIwdmVjISU1QjElMkMlMjA1JTJDJTIwMyUyQyUyMDklNUQlMjBPdXRwdXQlM0ElMjBtYXhfcHJvZHVjdChhKSUyMC0lM0UlMjA0NSUyMiUyQyUwQSUyMCUyMCUyMCUyMG1heF9uZXdfdG9rZW5zJTNEMTI4JTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9pZCUzRCUyMmdvb2dsZS1jbG91ZC1wYXJ0bmVyc2hpcCUyRmdlbW1hLTItMmItaXQtbG9yYS1tYWdpY29kZXIlMjIlMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> InferenceClient | |
| client = InferenceClient(<span class="hljs-string">"http://localhost:8080"</span>, api_key=<span class="hljs-string">"-"</span>) | |
| generation = client.text_generation( | |
| prompt=<span class="hljs-string">"You are given a vector of integers, A, of length n. Your task is to implement a function that finds the maximum product of any two distinct elements in the vector. Write a function in Rust to return this maximum product. Function Signature: rust fn max_product(a: Vec<i32>) -> i32 Input: - A vector a of length n (2 <= n <= 10^5), where each element is an integer (-10^4 <= a[i] <= 10^4). Output: - Return the maximum product of two distinct elements. Example: Input: a = vec![1, 5, 3, 9] Output: max_product(a) -> 45"</span>, | |
| max_new_tokens=<span class="hljs-number">128</span>, | |
| adapter_id=<span class="hljs-string">"google-cloud-partnership/gemma-2-2b-it-lora-magicoder"</span>, | |
| )`,wrap:!1}}),ze=new v({props:{title:"openai",local:"openai",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Zm4lMjBtYXhfcHJvZHVjdChhJTNBJTIwVmVjJTNDaTMyJTNFKSUyMC0lM0UlMjBpMzIlMjAlMjBJbnB1dCUzQSUyMC0lMjBBJTIwdmVjdG9yJTIwYSUyMG9mJTIwbGVuZ3RoJTIwbiUyMCgyJTIwJTNDJTNEJTIwbiUyMCUzQyUzRCUyMDEwJTVFNSklMkMlMjB3aGVyZSUyMGVhY2glMjBlbGVtZW50JTIwaXMlMjBhbiUyMGludGVnZXIlMjAoLTEwJTVFNCUyMCUzQyUzRCUyMGElNUJpJTVEJTIwJTNDJTNEJTIwMTAlNUU0KS4lMjBPdXRwdXQlM0ElMjAtJTIwUmV0dXJuJTIwdGhlJTIwbWF4aW11bSUyMHByb2R1Y3QlMjBvZiUyMHR3byUyMGRpc3RpbmN0JTIwZWxlbWVudHMuJTIwRXhhbXBsZSUzQSUyMElucHV0JTNBJTIwYSUyMCUzRCUyMHZlYyElNUIxJTJDJTIwNSUyQyUyMDMlMkMlMjA5JTVEJTIwT3V0cHV0JTNBJTIwbWF4X3Byb2R1Y3QoYSklMjAtJTNFJTIwNDUlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlNUQlMkMlMEElMjAlMjAlMjAlMjBtYXhfdG9rZW5zJTNEMTI4JTJDJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> openai <span class="hljs-keyword">import</span> OpenAI | |
| client = OpenAI( | |
| base_url=<span class="hljs-string">"http://localhost:8080/v1/"</span>, | |
| api_key=<span class="hljs-string">"-"</span>, | |
| ) | |
| chat_completion = client.chat.completions.create( | |
| model=<span class="hljs-string">"google-cloud-partnership/gemma-2-2b-it-lora-magicoder"</span>, | |
| messages=[ | |
| {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"You are given a vector of integers, A, of length n. Your task is to implement a function that finds the maximum product of any two distinct elements in the vector. Write a function in Rust to return this maximum product. Function Signature: rust fn max_product(a: Vec<i32>) -> i32 Input: - A vector a of length n (2 <= n <= 10^5), where each element is an integer (-10^4 <= a[i] <= 10^4). Output: - Return the maximum product of two distinct elements. Example: Input: a = vec![1, 5, 3, 9] Output: max_product(a) -> 45"</span>}, | |
| ], | |
| max_tokens=<span class="hljs-number">128</span>, | |
| )`,wrap:!1}}),Ke=new v({props:{title:"Delete GKE Cluster",local:"delete-gke-cluster",headingTag:"h2"}}),et=new f({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwY2x1c3RlcnMlMjBkZWxldGUlMjAlMjRDTFVTVEVSX05BTUUlMjAtLWxvY2F0aW9uJTNEJTI0TE9DQVRJT04=",highlighted:'gcloud container clusters delete <span class="hljs-variable">$CLUSTER_NAME</span> --location=<span class="hljs-variable">$LOCATION</span>',wrap:!1}}),lt=new f({props:{code:"a3ViZWN0bCUyMHNjYWxlJTIwLS1yZXBsaWNhcyUzRDAlMjBkZXBsb3ltZW50JTJGdGdpLWRlcGxveW1lbnQ=",highlighted:"kubectl scale --replicas=0 deployment/tgi-deployment",wrap:!1}}),nt=new Zn({props:{source:"https://github.com/huggingface/Google-Cloud-Containers/blob/main/docs/source/examples/gke-tgi-multi-lora-deployment.mdx"}}),{c(){i=o("meta"),J=s(),p=o("p"),g=s(),c(I.$$.fragment),w=s(),C=o("p"),C.textContent=$,T=s(),b=o("p"),b.textContent=U,G=s(),c(H.$$.fragment),ct=s(),_=o("p"),_.innerHTML=Vl,rt=s(),Y=o("ul"),Y.innerHTML=xl,yt=s(),X=o("p"),X.textContent=kl,mt=s(),c(q.$$.fragment),dt=s(),L=o("p"),L.textContent=Ql,ht=s(),c(F.$$.fragment),gt=s(),z=o("p"),z.textContent=Rl,Tt=s(),c(D.$$.fragment),Jt=s(),P=o("p"),P.innerHTML=Sl,Ut=s(),c(K.$$.fragment),ft=s(),c(Z.$$.fragment),wt=s(),c(O.$$.fragment),jt=s(),ee=o("p"),ee.textContent=Hl,bt=s(),te=o("p"),te.textContent=_l,It=s(),c(B.$$.fragment),Ct=s(),c(le.$$.fragment),$t=s(),c(N.$$.fragment),Gt=s(),ne=o("p"),ne.innerHTML=Yl,vt=s(),se=o("p"),se.innerHTML=Xl,Zt=s(),c(ae.$$.fragment),Bt=s(),c(ie.$$.fragment),Nt=s(),oe=o("p"),oe.innerHTML=ql,Wt=s(),Me=o("p"),Me.innerHTML=Ll,At=s(),c(pe.$$.fragment),Et=s(),ue=o("p"),ue.textContent=Fl,Vt=s(),c(ce.$$.fragment),xt=s(),re=o("p"),re.innerHTML=zl,kt=s(),c(ye.$$.fragment),Qt=s(),me=o("p"),me.textContent=Dl,Rt=s(),c(de.$$.fragment),St=s(),he=o("p"),he.innerHTML=Pl,Ht=s(),ge=o("p"),ge.innerHTML=Kl,_t=s(),c(Te.$$.fragment),Yt=s(),Je=o("p"),Je.innerHTML=Ol,Xt=s(),c(W.$$.fragment),qt=s(),Ue=o("p"),Ue.innerHTML=en,Lt=s(),fe=o("ul"),fe.innerHTML=tn,Ft=s(),c(A.$$.fragment),zt=s(),c(we.$$.fragment),Dt=s(),c(E.$$.fragment),Pt=s(),je=o("p"),je.innerHTML=ln,Kt=s(),be=o("p"),be.innerHTML=nn,Ot=s(),c(Ie.$$.fragment),el=s(),Ce=o("p"),Ce.textContent=sn,tl=s(),V=o("ul"),$e=o("li"),ot=o("p"),ot.innerHTML=an,Wl=s(),c(Ge.$$.fragment),Al=s(),ve=o("li"),Mt=o("p"),Mt.innerHTML=on,El=s(),c(Ze.$$.fragment),ll=s(),c(Be.$$.fragment),nl=s(),Ne=o("p"),Ne.innerHTML=Mn,sl=s(),c(We.$$.fragment),al=s(),Ae=o("p"),Ae.textContent=pn,il=s(),c(Ee.$$.fragment),ol=s(),c(x.$$.fragment),Ml=s(),Ve=o("p"),Ve.innerHTML=un,pl=s(),c(xe.$$.fragment),ul=s(),ke=o("p"),ke.textContent=cn,cl=s(),c(Qe.$$.fragment),rl=s(),Re=o("p"),Re.textContent=rn,yl=s(),c(Se.$$.fragment),ml=s(),c(He.$$.fragment),dl=s(),_e=o("p"),_e.innerHTML=yn,hl=s(),c(k.$$.fragment),gl=s(),c(Ye.$$.fragment),Tl=s(),Xe=o("p"),Xe.innerHTML=mn,Jl=s(),c(qe.$$.fragment),Ul=s(),Le=o("p"),Le.innerHTML=dn,fl=s(),c(Fe.$$.fragment),wl=s(),c(ze.$$.fragment),jl=s(),De=o("p"),De.innerHTML=hn,bl=s(),c(Pe.$$.fragment),Il=s(),c(Ke.$$.fragment),Cl=s(),Oe=o("p"),Oe.textContent=gn,$l=s(),c(et.$$.fragment),Gl=s(),tt=o("p"),tt.innerHTML=Tn,vl=s(),c(lt.$$.fragment),Zl=s(),c(nt.$$.fragment),Bl=s(),pt=o("p"),this.h()},l(e){const t=vn("svelte-u9bgzb",document.head);i=M(t,"META",{name:!0,content:!0}),t.forEach(l),J=a(e),p=M(e,"P",{}),ut(p).forEach(l),g=a(e),r(I.$$.fragment,e),w=a(e),C=M(e,"P",{"data-svelte-h":!0}),u(C)!=="svelte-rhbd3y"&&(C.textContent=$),T=a(e),b=M(e,"P",{"data-svelte-h":!0}),u(b)!=="svelte-gygfhg"&&(b.textContent=U),G=a(e),r(H.$$.fragment,e),ct=a(e),_=M(e,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1qnmo38"&&(_.innerHTML=Vl),rt=a(e),Y=M(e,"UL",{"data-svelte-h":!0}),u(Y)!=="svelte-a8ymuw"&&(Y.innerHTML=xl),yt=a(e),X=M(e,"P",{"data-svelte-h":!0}),u(X)!=="svelte-1i8n6rq"&&(X.textContent=kl),mt=a(e),r(q.$$.fragment,e),dt=a(e),L=M(e,"P",{"data-svelte-h":!0}),u(L)!=="svelte-1g39t6p"&&(L.textContent=Ql),ht=a(e),r(F.$$.fragment,e),gt=a(e),z=M(e,"P",{"data-svelte-h":!0}),u(z)!=="svelte-19j5e72"&&(z.textContent=Rl),Tt=a(e),r(D.$$.fragment,e),Jt=a(e),P=M(e,"P",{"data-svelte-h":!0}),u(P)!=="svelte-wjaltb"&&(P.innerHTML=Sl),Ut=a(e),r(K.$$.fragment,e),ft=a(e),r(Z.$$.fragment,e),wt=a(e),r(O.$$.fragment,e),jt=a(e),ee=M(e,"P",{"data-svelte-h":!0}),u(ee)!=="svelte-lja57p"&&(ee.textContent=Hl),bt=a(e),te=M(e,"P",{"data-svelte-h":!0}),u(te)!=="svelte-l7bdz6"&&(te.textContent=_l),It=a(e),r(B.$$.fragment,e),Ct=a(e),r(le.$$.fragment,e),$t=a(e),r(N.$$.fragment,e),Gt=a(e),ne=M(e,"P",{"data-svelte-h":!0}),u(ne)!=="svelte-1iwuz7u"&&(ne.innerHTML=Yl),vt=a(e),se=M(e,"P",{"data-svelte-h":!0}),u(se)!=="svelte-f29e6h"&&(se.innerHTML=Xl),Zt=a(e),r(ae.$$.fragment,e),Bt=a(e),r(ie.$$.fragment,e),Nt=a(e),oe=M(e,"P",{"data-svelte-h":!0}),u(oe)!=="svelte-k9h9j0"&&(oe.innerHTML=ql),Wt=a(e),Me=M(e,"P",{"data-svelte-h":!0}),u(Me)!=="svelte-1n24rkf"&&(Me.innerHTML=Ll),At=a(e),r(pe.$$.fragment,e),Et=a(e),ue=M(e,"P",{"data-svelte-h":!0}),u(ue)!=="svelte-4hmhsl"&&(ue.textContent=Fl),Vt=a(e),r(ce.$$.fragment,e),xt=a(e),re=M(e,"P",{"data-svelte-h":!0}),u(re)!=="svelte-cqv9s0"&&(re.innerHTML=zl),kt=a(e),r(ye.$$.fragment,e),Qt=a(e),me=M(e,"P",{"data-svelte-h":!0}),u(me)!=="svelte-o99xdc"&&(me.textContent=Dl),Rt=a(e),r(de.$$.fragment,e),St=a(e),he=M(e,"P",{"data-svelte-h":!0}),u(he)!=="svelte-2ut1g7"&&(he.innerHTML=Pl),Ht=a(e),ge=M(e,"P",{"data-svelte-h":!0}),u(ge)!=="svelte-rgl2wl"&&(ge.innerHTML=Kl),_t=a(e),r(Te.$$.fragment,e),Yt=a(e),Je=M(e,"P",{"data-svelte-h":!0}),u(Je)!=="svelte-1exvts4"&&(Je.innerHTML=Ol),Xt=a(e),r(W.$$.fragment,e),qt=a(e),Ue=M(e,"P",{"data-svelte-h":!0}),u(Ue)!=="svelte-1wpqca9"&&(Ue.innerHTML=en),Lt=a(e),fe=M(e,"UL",{"data-svelte-h":!0}),u(fe)!=="svelte-1drrpur"&&(fe.innerHTML=tn),Ft=a(e),r(A.$$.fragment,e),zt=a(e),r(we.$$.fragment,e),Dt=a(e),r(E.$$.fragment,e),Pt=a(e),je=M(e,"P",{"data-svelte-h":!0}),u(je)!=="svelte-v69zjw"&&(je.innerHTML=ln),Kt=a(e),be=M(e,"P",{"data-svelte-h":!0}),u(be)!=="svelte-fevufb"&&(be.innerHTML=nn),Ot=a(e),r(Ie.$$.fragment,e),el=a(e),Ce=M(e,"P",{"data-svelte-h":!0}),u(Ce)!=="svelte-ww244g"&&(Ce.textContent=sn),tl=a(e),V=M(e,"UL",{});var st=ut(V);$e=M(st,"LI",{});var at=ut($e);ot=M(at,"P",{"data-svelte-h":!0}),u(ot)!=="svelte-k3movz"&&(ot.innerHTML=an),Wl=a(at),r(Ge.$$.fragment,at),at.forEach(l),Al=a(st),ve=M(st,"LI",{});var it=ut(ve);Mt=M(it,"P",{"data-svelte-h":!0}),u(Mt)!=="svelte-1uskw9x"&&(Mt.innerHTML=on),El=a(it),r(Ze.$$.fragment,it),it.forEach(l),st.forEach(l),ll=a(e),r(Be.$$.fragment,e),nl=a(e),Ne=M(e,"P",{"data-svelte-h":!0}),u(Ne)!=="svelte-1ks8djk"&&(Ne.innerHTML=Mn),sl=a(e),r(We.$$.fragment,e),al=a(e),Ae=M(e,"P",{"data-svelte-h":!0}),u(Ae)!=="svelte-1u6gmmt"&&(Ae.textContent=pn),il=a(e),r(Ee.$$.fragment,e),ol=a(e),r(x.$$.fragment,e),Ml=a(e),Ve=M(e,"P",{"data-svelte-h":!0}),u(Ve)!=="svelte-czq87h"&&(Ve.innerHTML=un),pl=a(e),r(xe.$$.fragment,e),ul=a(e),ke=M(e,"P",{"data-svelte-h":!0}),u(ke)!=="svelte-1e5t0j"&&(ke.textContent=cn),cl=a(e),r(Qe.$$.fragment,e),rl=a(e),Re=M(e,"P",{"data-svelte-h":!0}),u(Re)!=="svelte-1qmprs7"&&(Re.textContent=rn),yl=a(e),r(Se.$$.fragment,e),ml=a(e),r(He.$$.fragment,e),dl=a(e),_e=M(e,"P",{"data-svelte-h":!0}),u(_e)!=="svelte-wqgbww"&&(_e.innerHTML=yn),hl=a(e),r(k.$$.fragment,e),gl=a(e),r(Ye.$$.fragment,e),Tl=a(e),Xe=M(e,"P",{"data-svelte-h":!0}),u(Xe)!=="svelte-1aai54k"&&(Xe.innerHTML=mn),Jl=a(e),r(qe.$$.fragment,e),Ul=a(e),Le=M(e,"P",{"data-svelte-h":!0}),u(Le)!=="svelte-1ykgy4q"&&(Le.innerHTML=dn),fl=a(e),r(Fe.$$.fragment,e),wl=a(e),r(ze.$$.fragment,e),jl=a(e),De=M(e,"P",{"data-svelte-h":!0}),u(De)!=="svelte-1bza1up"&&(De.innerHTML=hn),bl=a(e),r(Pe.$$.fragment,e),Il=a(e),r(Ke.$$.fragment,e),Cl=a(e),Oe=M(e,"P",{"data-svelte-h":!0}),u(Oe)!=="svelte-1laf0m8"&&(Oe.textContent=gn),$l=a(e),r(et.$$.fragment,e),Gl=a(e),tt=M(e,"P",{"data-svelte-h":!0}),u(tt)!=="svelte-qo8r7n"&&(tt.innerHTML=Tn),vl=a(e),r(lt.$$.fragment,e),Zl=a(e),r(nt.$$.fragment,e),Bl=a(e),pt=M(e,"P",{}),ut(pt).forEach(l),this.h()},h(){bn(i,"name","hf:doc:metadata"),bn(i,"content",Rn)},m(e,t){Q(document.head,i),n(e,J,t),n(e,p,t),n(e,g,t),y(I,e,t),n(e,w,t),n(e,C,t),n(e,T,t),n(e,b,t),n(e,G,t),y(H,e,t),n(e,ct,t),n(e,_,t),n(e,rt,t),n(e,Y,t),n(e,yt,t),n(e,X,t),n(e,mt,t),y(q,e,t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t),y(Se,e,t),n(e,ml,t),y(He,e,t),n(e,dl,t),n(e,_e,t),n(e,hl,t),y(k,e,t),n(e,gl,t),y(Ye,e,t),n(e,Tl,t),n(e,Xe,t),n(e,Jl,t),y(qe,e,t),n(e,Ul,t),n(e,Le,t),n(e,fl,t),y(Fe,e,t),n(e,wl,t),y(ze,e,t),n(e,jl,t),n(e,De,t),n(e,bl,t),y(Pe,e,t),n(e,Il,t),y(Ke,e,t),n(e,Cl,t),n(e,Oe,t),n(e,$l,t),y(et,e,t),n(e,Gl,t),n(e,tt,t),n(e,vl,t),y(lt,e,t),n(e,Zl,t),y(nt,e,t),n(e,Bl,t),n(e,pt,t),Nl=!0},p(e,[t]){const st={};t&2&&(st.$$scope={dirty:t,ctx:e}),Z.$set(st);const at={};t&2&&(at.$$scope={dirty:t,ctx:e}),B.$set(at);const it={};t&2&&(it.$$scope={dirty:t,ctx:e}),N.$set(it);const Jn={};t&2&&(Jn.$$scope={dirty:t,ctx:e}),W.$set(Jn);const Un={};t&2&&(Un.$$scope={dirty:t,ctx:e}),A.$set(Un);const fn={};t&2&&(fn.$$scope={dirty:t,ctx:e}),E.$set(fn);const wn={};t&2&&(wn.$$scope={dirty:t,ctx:e}),x.$set(wn);const jn={};t&2&&(jn.$$scope={dirty:t,ctx:e}),k.$set(jn)},i(e){Nl||(m(I.$$.fragment,e),m(H.$$.fragment,e),m(q.$$.fragment,e),m(F.$$.fragment,e),m(D.$$.fragment,e),m(K.$$.fragment,e),m(Z.$$.fragment,e),m(O.$$.fragment,e),m(B.$$.fragment,e),m(le.$$.fragment,e),m(N.$$.fragment,e),m(ae.$$.fragment,e),m(ie.$$.fragment,e),m(pe.$$.fragment,e),m(ce.$$.fragment,e),m(ye.$$.fragment,e),m(de.$$.fragment,e),m(Te.$$.fragment,e),m(W.$$.fragment,e),m(A.$$.fragment,e),m(we.$$.fragment,e),m(E.$$.fragment,e),m(Ie.$$.fragment,e),m(Ge.$$.fragment,e),m(Ze.$$.fragment,e),m(Be.$$.fragment,e),m(We.$$.fragment,e),m(Ee.$$.fragment,e),m(x.$$.fragment,e),m(xe.$$.fragment,e),m(Qe.$$.fragment,e),m(Se.$$.fragment,e),m(He.$$.fragment,e),m(k.$$.fragment,e),m(Ye.$$.fragment,e),m(qe.$$.fragment,e),m(Fe.$$.fragment,e),m(ze.$$.fragment,e),m(Pe.$$.fragment,e),m(Ke.$$.fragment,e),m(et.$$.fragment,e),m(lt.$$.fragment,e),m(nt.$$.fragment,e),Nl=!0)},o(e){d(I.$$.fragment,e),d(H.$$.fragment,e),d(q.$$.fragment,e),d(F.$$.fragment,e),d(D.$$.fragment,e),d(K.$$.fragment,e),d(Z.$$.fragment,e),d(O.$$.fragment,e),d(B.$$.fragment,e),d(le.$$.fragment,e),d(N.$$.fragment,e),d(ae.$$.fragment,e),d(ie.$$.fragment,e),d(pe.$$.fragment,e),d(ce.$$.fragment,e),d(ye.$$.fragment,e),d(de.$$.fragment,e),d(Te.$$.fragment,e),d(W.$$.fragment,e),d(A.$$.fragment,e),d(we.$$.fragment,e),d(E.$$.fragment,e),d(Ie.$$.fragment,e),d(Ge.$$.fragment,e),d(Ze.$$.fragment,e),d(Be.$$.fragment,e),d(We.$$.fragment,e),d(Ee.$$.fragment,e),d(x.$$.fragment,e),d(xe.$$.fragment,e),d(Qe.$$.fragment,e),d(Se.$$.fragment,e),d(He.$$.fragment,e),d(k.$$.fragment,e),d(Ye.$$.fragment,e),d(qe.$$.fragment,e),d(Fe.$$.fragment,e),d(ze.$$.fragment,e),d(Pe.$$.fragment,e),d(Ke.$$.fragment,e),d(et.$$.fragment,e),d(lt.$$.fragment,e),d(nt.$$.fragment,e),Nl=!1},d(e){e&&(l(J),l(p),l(g),l(w),l(C),l(T),l(b),l(G),l(ct),l(_),l(rt),l(Y),l(yt),l(X),l(mt),l(dt),l(L),l(ht),l(gt),l(z),l(Tt),l(Jt),l(P),l(Ut),l(ft),l(wt),l(jt),l(ee),l(bt),l(te),l(It),l(Ct),l($t),l(Gt),l(ne),l(vt),l(se),l(Zt),l(Bt),l(Nt),l(oe),l(Wt),l(Me),l(At),l(Et),l(ue),l(Vt),l(xt),l(re),l(kt),l(Qt),l(me),l(Rt),l(St),l(he),l(Ht),l(ge),l(_t),l(Yt),l(Je),l(Xt),l(qt),l(Ue),l(Lt),l(fe),l(Ft),l(zt),l(Dt),l(Pt),l(je),l(Kt),l(be),l(Ot),l(el),l(Ce),l(tl),l(V),l(ll),l(nl),l(Ne),l(sl),l(al),l(Ae),l(il),l(ol),l(Ml),l(Ve),l(pl),l(ul),l(ke),l(cl),l(rl),l(Re),l(yl),l(ml),l(dl),l(_e),l(hl),l(gl),l(Tl),l(Xe),l(Jl),l(Ul),l(Le),l(fl),l(wl),l(jl),l(De),l(bl),l(Il),l(Cl),l(Oe),l($l),l(Gl),l(tt),l(vl),l(Zl),l(Bl),l(pt)),l(i),h(I,e),h(H,e),h(q,e),h(F,e),h(D,e),h(K,e),h(Z,e),h(O,e),h(B,e),h(le,e),h(N,e),h(ae,e),h(ie,e),h(pe,e),h(ce,e),h(ye,e),h(de,e),h(Te,e),h(W,e),h(A,e),h(we,e),h(E,e),h(Ie,e),h(Ge),h(Ze),h(Be,e),h(We,e),h(Ee,e),h(x,e),h(xe,e),h(Qe,e),h(Se,e),h(He,e),h(k,e),h(Ye,e),h(qe,e),h(Fe,e),h(ze,e),h(Pe,e),h(Ke,e),h(et,e),h(lt,e),h(nt,e)}}}const Rn='{"title":"Deploy Gemma2 with multiple LoRA adapters with TGI DLC on GKE","local":"deploy-gemma2-with-multiple-lora-adapters-with-tgi-dlc-on-gke","sections":[{"title":"Setup / Configuration","local":"setup--configuration","sections":[],"depth":2},{"title":"Create GKE Cluster","local":"create-gke-cluster","sections":[],"depth":2},{"title":"Get Hugging Face token and set secrets in GKE","local":"get-hugging-face-token-and-set-secrets-in-gke","sections":[],"depth":2},{"title":"Deploy TGI","local":"deploy-tgi","sections":[],"depth":2},{"title":"Inference with TGI","local":"inference-with-tgi","sections":[{"title":"Via cURL","local":"via-curl","sections":[],"depth":3},{"title":"Via Python","local":"via-python","sections":[{"title":"huggingface_hub","local":"huggingfacehub","sections":[],"depth":4},{"title":"openai","local":"openai","sections":[],"depth":4}],"depth":3}],"depth":2},{"title":"Delete GKE Cluster","local":"delete-gke-cluster","sections":[],"depth":2}],"depth":1}';function Sn(j){return Cn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ln extends $n{constructor(i){super(),Gn(this,i,Sn,Qn,In,{})}}export{Ln as component}; | |
Xet Storage Details
- Size:
- 56.8 kB
- Xet hash:
- e38c138d97ff70794679e81811ad6d7702c49095fc9362016562bd3522277f4e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.