Buckets:

rtrm's picture
download
raw
33.2 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Hugging Face on Google Cloud&quot;,&quot;local&quot;:&quot;hugging-face-on-google-cloud&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Train and Deploy Models on Google Cloud with Hugging Face Deep Learning Containers&quot;,&quot;local&quot;:&quot;train-and-deploy-models-on-google-cloud-with-hugging-face-deep-learning-containers&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Features &amp; benefits 🔥&quot;,&quot;local&quot;:&quot;features--benefits-&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;One command is all you need&quot;,&quot;local&quot;:&quot;one-command-is-all-you-need&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Accelerate machine learning from science to production&quot;,&quot;local&quot;:&quot;accelerate-machine-learning-from-science-to-production&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;High-performance text generation and embedding&quot;,&quot;local&quot;:&quot;high-performance-text-generation-and-embedding&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Built-in performance&quot;,&quot;local&quot;:&quot;built-in-performance&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Resources, Documentation &amp; Examples 📄&quot;,&quot;local&quot;:&quot;resources-documentation--examples-&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Blog posts&quot;,&quot;local&quot;:&quot;blog-posts&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Documentation&quot;,&quot;local&quot;:&quot;documentation&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Examples&quot;,&quot;local&quot;:&quot;examples&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;GKE&quot;,&quot;local&quot;:&quot;gke&quot;,&quot;sections&quot;:[],&quot;depth&quot;:4},{&quot;title&quot;:&quot;Vertex AI&quot;,&quot;local&quot;:&quot;vertex-ai&quot;,&quot;sections&quot;:[],&quot;depth&quot;:4}],&quot;depth&quot;:3}],&quot;depth&quot;:2}],&quot;depth&quot;:1}">
<link href="/docs/google-cloud/pr_86/en/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload">
<link rel="modulepreload" href="/docs/google-cloud/pr_86/en/_app/immutable/entry/start.6d6d35a4.js">
<link rel="modulepreload" href="/docs/google-cloud/pr_86/en/_app/immutable/chunks/scheduler.e108d1fd.js">
<link rel="modulepreload" href="/docs/google-cloud/pr_86/en/_app/immutable/chunks/singletons.09e9b030.js">
<link rel="modulepreload" href="/docs/google-cloud/pr_86/en/_app/immutable/chunks/paths.24c0c4b0.js">
<link rel="modulepreload" href="/docs/google-cloud/pr_86/en/_app/immutable/entry/app.633438e2.js">
<link rel="modulepreload" href="/docs/google-cloud/pr_86/en/_app/immutable/chunks/index.0dc1bf70.js">
<link rel="modulepreload" href="/docs/google-cloud/pr_86/en/_app/immutable/nodes/0.e77b8c3b.js">
<link rel="modulepreload" href="/docs/google-cloud/pr_86/en/_app/immutable/nodes/2.3208a842.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Hugging Face on Google Cloud&quot;,&quot;local&quot;:&quot;hugging-face-on-google-cloud&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Train and Deploy Models on Google Cloud with Hugging Face Deep Learning Containers&quot;,&quot;local&quot;:&quot;train-and-deploy-models-on-google-cloud-with-hugging-face-deep-learning-containers&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Features &amp; benefits 🔥&quot;,&quot;local&quot;:&quot;features--benefits-&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;One command is all you need&quot;,&quot;local&quot;:&quot;one-command-is-all-you-need&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Accelerate machine learning from science to production&quot;,&quot;local&quot;:&quot;accelerate-machine-learning-from-science-to-production&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;High-performance text generation and embedding&quot;,&quot;local&quot;:&quot;high-performance-text-generation-and-embedding&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Built-in performance&quot;,&quot;local&quot;:&quot;built-in-performance&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Resources, Documentation &amp; Examples 📄&quot;,&quot;local&quot;:&quot;resources-documentation--examples-&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Blog posts&quot;,&quot;local&quot;:&quot;blog-posts&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Documentation&quot;,&quot;local&quot;:&quot;documentation&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Examples&quot;,&quot;local&quot;:&quot;examples&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;GKE&quot;,&quot;local&quot;:&quot;gke&quot;,&quot;sections&quot;:[],&quot;depth&quot;:4},{&quot;title&quot;:&quot;Vertex AI&quot;,&quot;local&quot;:&quot;vertex-ai&quot;,&quot;sections&quot;:[],&quot;depth&quot;:4}],&quot;depth&quot;:3}],&quot;depth&quot;:2}],&quot;depth&quot;:1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <h1 class="relative group"><a id="hugging-face-on-google-cloud" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#hugging-face-on-google-cloud"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Hugging Face on Google Cloud</span></h1> <p data-svelte-h="svelte-mz5ksq"><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/Google-Cloud-Containers/thumbnail.png" alt="Hugging Face x Google Cloud"></p> <p data-svelte-h="svelte-1xc3l3u">Hugging Face collaborates with Google across open science, open source, cloud, and hardware to enable companies to build their own AI with the latest open models from Hugging Face and the latest cloud and hardware features from Google Cloud.</p> <p data-svelte-h="svelte-15of9o9">Hugging Face enables new experiences for Google Cloud customers. They can easily train and deploy Hugging Face models on Google Kubernetes Engine (GKE) and Vertex AI, on any hardware available in Google Cloud using Hugging Face Deep Learning Containers (DLCs).</p> <h2 class="relative group"><a id="train-and-deploy-models-on-google-cloud-with-hugging-face-deep-learning-containers" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#train-and-deploy-models-on-google-cloud-with-hugging-face-deep-learning-containers"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Train and Deploy Models on Google Cloud with Hugging Face Deep Learning Containers</span></h2> <p data-svelte-h="svelte-19g98k1">Hugging Face built Deep Learning Containers (DLCs) for Google Cloud customers to run any of their machine learning workload in an optimized environment, with no configuration or maintenance on their part. These are Docker images pre-installed with deep learning frameworks and libraries such as 🤗 Transformers, 🤗 Datasets, and 🤗 Tokenizers. The DLCs allow you to directly serve and train any models, skipping the complicated process of building and optimizing your serving and training environments from scratch.</p> <p data-svelte-h="svelte-7tem3l">For training, our DLCs are available for PyTorch via 🤗 Transformers. They include support for training on both GPUs and TPUs with libraries such as 🤗 TRL, Sentence Transformers, or 🧨 Diffusers.</p> <p data-svelte-h="svelte-496whm">For inference, we have a general-purpose PyTorch inference DLC, for serving models trained with any of those frameworks mentioned before on both CPU and GPU. There is also the Text Generation Inference (TGI) DLC for high-performance text generation of LLMs on both GPU and TPU. Finally, there is a Text Embeddings Inference (TEI) DLC for high-performance serving of embedding models on both CPU and GPU.</p> <p data-svelte-h="svelte-l6cz0x">The DLCs are hosted in <a href="https://console.cloud.google.com/artifacts/docker/deeplearning-platform-release/us/gcr.io" rel="nofollow">Google Cloud Artifact Registry</a> and can be used from any Google Cloud service such as Google Kubernetes Engine (GKE), Vertex AI, or Cloud Run (in preview).</p> <p data-svelte-h="svelte-rlga4q">Hugging Face DLCs are open source and licensed under Apache 2.0 within the <a href="https://github.com/huggingface/Google-Cloud-Containers" rel="nofollow">Google-Cloud-Containers</a> repository. For premium support, our <a href="https://huggingface.co/support" rel="nofollow">Expert Support Program</a> gives you direct dedicated support from our team.</p> <p data-svelte-h="svelte-1rcb745">You have two options to take advantage of these DLCs as a Google Cloud customer:</p> <ol data-svelte-h="svelte-ca3bc9"><li>To <a href="https://huggingface.co/blog/google-cloud-model-garden" rel="nofollow">get started</a>, you can use our no-code integrations within Vertex AI or GKE.</li> <li>For more advanced scenarios, you can pull the containers from the Google Cloud Artifact Registry directly in your environment. <a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples" rel="nofollow">Here</a> is a list of notebooks examples.</li></ol> <h2 class="relative group"><a id="features--benefits-" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#features--benefits-"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Features &amp; benefits 🔥</span></h2> <p data-svelte-h="svelte-wt21d7">The Hugging Face DLCs provide ready-to-use, tested environments to train and deploy Hugging Face models. They can be used in combination with Google Cloud offerings including Google Kubernetes Engine (GKE) and Vertex AI. GKE is a fully-managed Kubernetes service in Google Cloud that can be used to deploy and operate containerized applications at scale using Google Cloud’s infrastructure. 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).</p> <h3 class="relative group"><a id="one-command-is-all-you-need" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#one-command-is-all-you-need"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>One command is all you need</span></h3> <p data-svelte-h="svelte-17e46z3">With the new Hugging Face DLCs, train cutting-edge Transformers-based NLP models in a single line of code. The Hugging Face PyTorch DLCs for training come with all the libraries installed to run a single command e.g. via TRL CLI to fine-tune LLMs on any setting, either single-GPU, single-node multi-GPU, and more.</p> <h3 class="relative group"><a id="accelerate-machine-learning-from-science-to-production" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#accelerate-machine-learning-from-science-to-production"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Accelerate machine learning from science to production</span></h3> <p data-svelte-h="svelte-t3ifdy">In addition to Hugging Face DLCs, we created a first-class Hugging Face library for inference, <a href="https://github.com/huggingface/huggingface-inference-toolkit" rel="nofollow"><code>huggingface-inference-toolkit</code></a>, that comes with the Hugging Face PyTorch DLCs for inference, with full support on serving any PyTorch model on Google Cloud.</p> <p data-svelte-h="svelte-19nk44j">Deploy your trained models for inference with just one more line of code or select <a href="https://huggingface.co/models?library=pytorch,transformers&sort=trending" rel="nofollow">any of the 170,000+ publicly available models from the model Hub</a> and deploy them on either Vertex AI or GKE.</p> <h3 class="relative group"><a id="high-performance-text-generation-and-embedding" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#high-performance-text-generation-and-embedding"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>High-performance text generation and embedding</span></h3> <p data-svelte-h="svelte-1tu8rbr">Besides the PyTorch-oriented DLCs, Hugging Face also provides high-performance inference for both text generation and embedding models via the Hugging Face DLCs for both <a href="https://github.com/huggingface/text-generation-inference" rel="nofollow">Text Generation Inference (TGI)</a> and <a href="https://github.com/huggingface/text-embeddings-inference" rel="nofollow">Text Embeddings Inference (TEI)</a>, respectively.</p> <p data-svelte-h="svelte-1e1vasz">The Hugging Face DLC for TGI enables you to deploy <a href="https://huggingface.co/models?other=text-generation-inference&sort=trending" rel="nofollow">any of the +140,000 text generation inference supported models from the Hugging Face Hub</a>, or any custom model as long as <a href="https://huggingface.co/docs/text-generation-inference/supported_models" rel="nofollow">its architecture is supported within TGI</a>.</p> <p data-svelte-h="svelte-1c04c20">The Hugging Face DLC for TEI enables you to deploy <a href="https://huggingface.co/models?other=text-embeddings-inference&sort=trending" rel="nofollow">any of the +10,000 embedding, re-ranking or sequence classification supported models from the Hugging Face Hub</a>, or any custom model as long as <a href="https://huggingface.co/docs/text-embeddings-inference/en/supported_models" rel="nofollow">its architecture is supported within TEI</a>.</p> <p data-svelte-h="svelte-a2fp78">Additionally, these DLCs come with full support for Google Cloud meaning that deploying models from Google Cloud Storage (GCS) is also straight forward and requires no configuration.</p> <h3 class="relative group"><a id="built-in-performance" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#built-in-performance"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Built-in performance</span></h3> <p data-svelte-h="svelte-jmp6ho">Hugging Face DLCs feature built-in performance optimizations for PyTorch to train models faster. The DLCs also give you the flexibility to choose a training infrastructure that best aligns with the price/performance ratio for your workload.</p> <p data-svelte-h="svelte-19redkc">The Hugging Face Training DLCs are fully integrated with Google Cloud, enabling the use of <a href="https://cloud.google.com/products/compute?hl=en" rel="nofollow">the latest generation of instances available on Google Cloud Compute Engine</a>.</p> <p data-svelte-h="svelte-109zam3">Hugging Face Inference DLCs provide you with production-ready endpoints that scale quickly with your Google Cloud environment, built-in monitoring, and a ton of enterprise features.</p> <hr> <p data-svelte-h="svelte-1hcwah1">Read more about both Vertex AI in <a href="https://cloud.google.com/vertex-ai/docs" rel="nofollow">their official documentation</a> and GKE in <a href="https://cloud.google.com/kubernetes-engine/docs" rel="nofollow">their official documentation</a>.</p> <h2 class="relative group"><a id="resources-documentation--examples-" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#resources-documentation--examples-"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Resources, Documentation &amp; Examples 📄</span></h2> <p data-svelte-h="svelte-1v2qge2">Learn how to use Hugging Face in Google Cloud by reading our blog posts, documentation and examples below.</p> <h3 class="relative group"><a id="blog-posts" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#blog-posts"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Blog posts</span></h3> <ul data-svelte-h="svelte-17k7t5"><li><a href="https://huggingface.co/blog/gcp-partnership" rel="nofollow">Hugging Face and Google partner for open AI collaboration</a></li> <li><a href="https://huggingface.co/blog/tpu-inference-endpoints-spaces" rel="nofollow">Google Cloud TPUs made available to Hugging Face users</a></li> <li><a href="https://huggingface.co/blog/google-cloud-model-garden" rel="nofollow">Making thousands of open LLMs bloom in the Vertex AI Model Garden</a></li> <li><a href="https://huggingface.co/blog/llama31-on-vertex-ai" rel="nofollow">Deploy Meta Llama 3.1 405B on Google Cloud Vertex AI</a></li></ul> <h3 class="relative group"><a id="documentation" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#documentation"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Documentation</span></h3> <ul data-svelte-h="svelte-hnzmg6"><li><a href="https://cloud.google.com/deep-learning-containers/docs/choosing-container#hugging-face" rel="nofollow">Google Cloud Hugging Face Deep Learning Containers</a></li> <li><a href="https://console.cloud.google.com/artifacts/docker/deeplearning-platform-release/us/gcr.io" rel="nofollow">Google Cloud public Artifact Registry for DLCs</a></li> <li><a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/serve-gemma-gpu-tgi" rel="nofollow">Serve Gemma open models using GPUs on GKE with Hugging Face TGI</a></li> <li><a href="https://cloud.google.com/vertex-ai/generative-ai/docs/open-models/use-hugging-face-models" rel="nofollow">Generative AI on Vertex - Use Hugging Face text generation models</a></li></ul> <h3 class="relative group"><a id="examples" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#examples"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Examples</span></h3> <ul data-svelte-h="svelte-q49mqk"><li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples" rel="nofollow">All examples</a></li></ul> <h4 class="relative group"><a id="gke" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#gke"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>GKE</span></h4> <ul data-svelte-h="svelte-1bx1rt5"><li><p>Training</p> <ul><li><a href="https://github.com/huggingface/Google-Cloud-Containers/blob/main/examples/gke/trl-full-fine-tuning" rel="nofollow">Full SFT fine-tuning of Gemma 2B in a multi-GPU instance with TRL on GKE</a></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/blob/main/examples/gke/trl-lora-fine-tuning" rel="nofollow">LoRA SFT fine-tuning of Mistral 7B v0.3 in a single GPU instance with TRL on GKE</a></li></ul></li> <li><p>Inference</p> <ul><li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-deployment" rel="nofollow">Deploying Llama3 8B with Text Generation Inference (TGI) on GKE</a></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-from-gcs-deployment" rel="nofollow">Deploying Qwen2 7B Instruct with Text Generation Inference (TGI) from a GCS Bucket on GKE</a></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tei-deployment" rel="nofollow">Deploying Snowflake’s Arctic Embed (M) with Text Embeddings Inference (TEI) on GKE</a></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tei-from-gcs-deployment" rel="nofollow">Deploying BGE Base v1.5 (English) with Text Embeddings Inference (TEI) from a GCS Bucket on GKE</a></li></ul></li></ul> <h4 class="relative group"><a id="vertex-ai" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#vertex-ai"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Vertex AI</span></h4> <ul data-svelte-h="svelte-10tr6db"><li><p>Training</p> <ul><li><a href="https://github.com/huggingface/Google-Cloud-Containers/blob/main/examples/vertex-ai/notebooks/trl-full-sft-fine-tuning-on-vertex-ai" rel="nofollow">Full SFT fine-tuning of Mistral 7B v0.3 in a multi-GPU instance with TRL on Vertex AI</a></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/blob/main/examples/vertex-ai/notebooks/trl-lora-sft-fine-tuning-on-vertex-ai" rel="nofollow">LoRA SFT fine-tuning of Mistral 7B v0.3 in a single GPU instance with TRL on Vertex AI</a></li></ul></li> <li><p>Inference</p> <ul><li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/vertex-ai/notebooks/deploy-bert-on-vertex-ai" rel="nofollow">Deploying a BERT model for a text classification task using huggingface-inference-toolkit for a Custom Prediction Routine (CPR) on Vertex AI</a></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/vertex-ai/notebooks/deploy-embedding-on-vertex-ai" rel="nofollow">Deploying an embedding model with Text Embeddings Inference (TEI) on Vertex AI</a></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/vertex-ai/notebooks/deploy-gemma-on-vertex-ai" rel="nofollow">Deploying Gemma 7B Instruct with Text Generation Inference (TGI) on Vertex AI</a></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/vertex-ai/notebooks/deploy-gemma-from-gcs-on-vertex-ai" rel="nofollow">Deploying Gemma 7B Instruct with Text Generation Inference (TGI) from a GCS Bucket on Vertex AI</a></li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/vertex-ai/notebooks/deploy-flux-on-vertex-ai" rel="nofollow">Deploying FLUX with Hugging Face PyTorch DLCs for Inference on Vertex AI</a></li></ul></li></ul> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/Google-Cloud-Containers/blob/main/docs/source/index.mdx" target="_blank"><span data-svelte-h="svelte-1kd6by1">&lt;</span> <span data-svelte-h="svelte-x0xyl0">&gt;</span> <span data-svelte-h="svelte-1dajgef"><span class="underline ml-1.5">Update</span> on GitHub</span></a> <p></p>
<script>
{
__sveltekit_148p94q = {
assets: "/docs/google-cloud/pr_86/en",
base: "/docs/google-cloud/pr_86/en",
env: {}
};
const element = document.currentScript.parentElement;
const data = [null,null];
Promise.all([
import("/docs/google-cloud/pr_86/en/_app/immutable/entry/start.6d6d35a4.js"),
import("/docs/google-cloud/pr_86/en/_app/immutable/entry/app.633438e2.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 2],
data,
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
33.2 kB
·
Xet hash:
4b342cdd70da1165bfdce3f9fce4fb1ff9e6276ea17aac344b67d2da37c1a774

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