<meta charset="utf-8" /><meta http-equiv="content-security-policy" content=""><meta name="hf:doc:metadata" content="{&quot;local&quot;:&quot;optimum-habana&quot;,&quot;title&quot;:&quot;🤗 Optimum Habana&quot;}" data-svelte="svelte-1phssyn">
	<link rel="modulepreload" href="/docs/optimum.habana/pr_444/en/_app/assets/pages/__layout.svelte-hf-doc-builder.css">
	<link rel="modulepreload" href="/docs/optimum.habana/pr_444/en/_app/start-hf-doc-builder.js">
	<link rel="modulepreload" href="/docs/optimum.habana/pr_444/en/_app/chunks/vendor-hf-doc-builder.js">
	<link rel="modulepreload" href="/docs/optimum.habana/pr_444/en/_app/chunks/paths-hf-doc-builder.js">
	<link rel="modulepreload" href="/docs/optimum.habana/pr_444/en/_app/pages/__layout.svelte-hf-doc-builder.js">
	<link rel="modulepreload" href="/docs/optimum.habana/pr_444/en/_app/pages/index.mdx-hf-doc-builder.js">
	<link rel="modulepreload" href="/docs/optimum.habana/pr_444/en/_app/chunks/IconCopyLink-hf-doc-builder.js"> 






<h1 class="relative group"><a id="optimum-habana" 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="#optimum-habana"><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>🤗 Optimum Habana
	</span></h1>

<p>🤗 Optimum Habana is the interface between the 🤗 Transformers library and <a href="https://docs.habana.ai/en/latest/index.html" rel="nofollow">Habana’s Gaudi processor (HPU)</a>. It provides a set of tools that enable simple model loading and training on single- and multi-HPU settings for various downstream tasks.</p>
<p>The table below shows which model architectures, tasks and device distributions are currently supported for 🤗 Optimum Habana:</p>
<table><thead><tr><th></th>
<th align="center">Text Classification</th>
<th align="center">Question Answering</th>
<th align="center">Language Modeling</th>
<th align="center">Summarization</th>
<th align="center">Translation</th>
<th align="center">Image Classification</th>
<th align="center">Audio Classification</th>
<th align="center">Speech Recognition</th>
<th align="center">Single Card</th>
<th align="center">Multi Card</th>
<th align="center">DeepSpeed</th></tr></thead>
<tbody><tr><td>BERT</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td></tr>
<tr><td>RoBERTa</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td></tr>
<tr><td>ALBERT</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td></tr>
<tr><td>DistilBERT</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td></tr>
<tr><td>GPT2</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td></tr>
<tr><td>T5</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td></tr>
<tr><td>ViT</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td></tr>
<tr><td>Swin</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td></tr>
<tr><td>Wav2Vec2</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">❌</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td></tr></tbody></table>
<p>Other models and tasks supported by the 🤗 Transformers library may also work. You can refer to the <a href="./quickstart">Quickstart</a> for examples on using them with 🤗 Optimum Habana. Besides, <a href="https://github.com/huggingface/optimum-habana/tree/main/examples" rel="nofollow">this page</a> explains how to modify any <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch" rel="nofollow">example</a> from the 🤗 Transformers library to make it work with 🤗 Optimum Habana.</p>
<div class="mt-10"><div class="w-full flex flex-col space-y-4 md:space-y-0 md:grid md:grid-cols-2 md:gap-y-4 md:gap-x-5"><a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./tutorials/accelerate_training"><div class="w-full text-center bg-gradient-to-br from-blue-400 to-blue-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Tutorials</div>
      <p class="text-gray-700">Learn the basics and become familiar with training transformers on HPUs with 🤗 Optimum. Start here if you are using 🤗 Optimum Habana for the first time!</p></a>
    <a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./usage_guides/single_hpu"><div class="w-full text-center bg-gradient-to-br from-indigo-400 to-indigo-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">How-to guides</div>
      <p class="text-gray-700">Practical guides to help you achieve a specific goal. Take a look at these guides to learn how to use 🤗 Optimum Habana to solve real-world problems.</p></a>
    <a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./concept_guides/hpu"><div class="w-full text-center bg-gradient-to-br from-pink-400 to-pink-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Conceptual guides</div>
      <p class="text-gray-700">High-level explanations for building a better understanding about important topics such as HPUs.</p></a>
    <a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./package_reference/trainer"><div class="w-full text-center bg-gradient-to-br from-purple-400 to-purple-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Reference</div>
      <p class="text-gray-700">Technical descriptions of how the Habana classes and methods of 🤗 Optimum Habana work.</p></a></div></div>


		<script type="module" data-hydrate="at253x">
		import { start } from "/docs/optimum.habana/pr_444/en/_app/start-hf-doc-builder.js";
		start({
			target: document.querySelector('[data-hydrate="at253x"]').parentNode,
			paths: {"base":"/docs/optimum.habana/pr_444/en","assets":"/docs/optimum.habana/pr_444/en"},
			session: {},
			route: false,
			spa: false,
			trailing_slash: "never",
			hydrate: {
				status: 200,
				error: null,
				nodes: [
					import("/docs/optimum.habana/pr_444/en/_app/pages/__layout.svelte-hf-doc-builder.js"),
						import("/docs/optimum.habana/pr_444/en/_app/pages/index.mdx-hf-doc-builder.js")
				],
				params: {}
			}
		});
	</script>
