Buckets:

download
raw
3.34 kB
import"../chunks/DsnmJJEf.js";import{i as d,h,C as m,H as f,a as g,E as T,s as b}from"../chunks/DdZvggmf.js";import{p as U,o as G,s as a,f as M,a as s,b as Q,c as p,n as w}from"../chunks/BbekZcyp.js";const R='{"title":"Intel Gaudi","local":"intel-gaudi","sections":[],"depth":1}';var j=p('<meta name="hf:doc:metadata"/>'),y=p('<p></p> <!> <!> <p>Intel Gaudi AI 加速器系列包括 <a href="https://habana.ai/products/gaudi/" rel="nofollow">Intel Gaudi 1</a>、<a href="https://habana.ai/products/gaudi2/" rel="nofollow">Intel Gaudi 2</a> 和 <a href="https://habana.ai/products/gaudi3/" rel="nofollow">Intel Gaudi 3</a>。每台服务器配备 8 个设备,称为 Habana 处理单元 (HPU),在 Gaudi 3 上提供 128GB 内存,在 Gaudi 2 上提供 96GB 内存,在第一代 Gaudi 上提供 32GB 内存。有关底层硬件架构的更多详细信息,请查看 <a href="https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Architecture.html" rel="nofollow">Gaudi 架构</a> 概述。</p> <p>Diffusers 管道可以利用 HPU 加速,即使管道尚未添加到 <a href="https://huggingface.co/docs/optimum/main/en/habana/index" rel="nofollow">Optimum for Intel Gaudi</a>,也可以通过 <a href="https://docs.habana.ai/en/latest/PyTorch/PyTorch_Model_Porting/GPU_Migration_Toolkit/GPU_Migration_Toolkit.html" rel="nofollow">GPU 迁移工具包</a> 实现。</p> <p>在您的管道上调用 <code>.to("hpu")</code> 以将其移动到 HPU 设备,如下所示为 Flux 示例:</p> <!> <blockquote class="tip"><p>对于 Gaudi 优化的扩散管道实现,我们推荐使用 <a href="https://huggingface.co/docs/optimum/main/en/habana/index" rel="nofollow">Optimum for Intel Gaudi</a>。</p></blockquote> <!> <p></p>',1);function Z(r,u){U(u,!1),G(()=>{new URLSearchParams(window.location.search).get("fw")}),d();var l=y();h("35pq9a",e=>{var n=j();b(n,"content",R),s(e,n)});var t=a(M(l),2);m(t,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var o=a(t,2);f(o,{title:"Intel Gaudi",local:"intel-gaudi",headingTag:"h1"});var i=a(o,8);g(i,{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJibGFjay1mb3Jlc3QtbGFicyUyRkZMVVguMS1zY2huZWxsJTIyJTJDJTIwZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlbGluZS50byglMjJocHUlMjIpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZSglMjIlRTQlQjglODAlRTUlQkMlQTAlRTYlOUQlQkUlRTklQkMlQTAlRTUlOUMlQTglRTYlQUYlOTUlRTUlOEElQTAlRTclQjQlQTIlRTklQTMlOEUlRTYlQTAlQkMlRTQlQjglQUQlRTclOUElODQlRTUlOUIlQkUlRTUlODMlOEYlMjIpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;black-forest-labs/FLUX.1-schnell&quot;</span>, dtype=torch.bfloat16)
pipeline.to(<span class="hljs-string">&quot;hpu&quot;</span>)
image = pipeline(<span class="hljs-string">&quot;一张松鼠在毕加索风格中的图像&quot;</span>).images[<span class="hljs-number">0</span>]`,lang:"py",wrap:!1});var c=a(i,4);T(c,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/zh/optimization/habana.md"}),w(2),s(r,l),Q()}export{Z as component};

Xet Storage Details

Size:
3.34 kB
·
Xet hash:
b5bbeed695aa39c21107e67e6a94d5e116e4150ee3c170834e8048d01377a716

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