Buckets:

download
raw
4.2 kB
import"../chunks/DsnmJJEf.js";import{i as m,h as b,C as k,H as o,E as w,s as _}from"../chunks/CyvF58-O.js";import{p as v,o as y,s as e,f as A,a as f,b as T,c as p,n as j}from"../chunks/DfHjNWj2.js";const x='{"title":"Projects using kernels","local":"projects-using-kernels","sections":[{"title":"autoresearch","local":"autoresearch","sections":[],"depth":2},{"title":"AReaL","local":"areal","sections":[],"depth":2},{"title":"transformers","local":"transformers","sections":[],"depth":2},{"title":"diffusers","local":"diffusers","sections":[],"depth":2}],"depth":1}';var z=p('<meta name="hf:doc:metadata"/>'),L=p(`<p></p> <!> <!> <p>This page shows how different projects use <code>kernels</code>.</p> <!> <p><a href="https://github.com/karpathy/autoresearch" rel="nofollow">karpathy/autoresearch</a> <a href="https://github.com/karpathy/autoresearch/blob/c2450add72cc80317be1fe8111974b892da10944/train.py#L23" rel="nofollow">uses</a> <code>kernels</code> to
integrate Flash-Attention 3 through the <a href="/docs/kernels/pr_774/en/api/kernels#kernels.get_kernel">get_kernel()</a> method.</p> <!> <p><a href="https://github.com/inclusionAI/AReaL" rel="nofollow">inclusionAI/AReaL</a> uses <code>kernels</code> in an opt-in manner to integrate
optimized attention mechanisms.</p> <!> <p><a href="https://github.com/huggingface/transformers/" rel="nofollow">huggingface/transformers</a> primarily
depends on <code>kernels</code> for all optimizations related to optimized kernels, including
optimized attention implementations, MoE blocks, and quantization. Besides <a href="/docs/kernels/pr_774/en/api/kernels#kernels.get_kernel">get_kernel()</a>, it also uses <a href="./layers">kernel layers</a> to optimize the forward passes
of common layers involved in the modeling blocks. Some references are available <a href="https://github.com/search?q=repo%3Ahuggingface%2Ftransformers%20get_kernel(&amp;type=code" rel="nofollow">here</a> and <a href="https://github.com/search?q=repo%3Ahuggingface%2Ftransformers+use_kernel_forward_from_hub&amp;type=code" rel="nofollow">here</a>.</p> <p>Refer to the following posts to know more:</p> <ul><li><a href="https://huggingface.co/blog/faster-transformers" rel="nofollow">Tricks from OpenAI gpt-oss YOU 🫵 can use with transformers</a></li> <li><a href="https://huggingface.co/blog/moe-transformers" rel="nofollow">Mixture of Experts (MoEs) in Transformers</a></li></ul> <!> <p>Similar to <code>transformers</code>, <a href="https://github.com/huggingface/diffusers/" rel="nofollow">huggingface/diffusers</a> uses <code>kernels</code> for integrating optimized kernels to <a href="https://github.com/huggingface/diffusers/blob/e5aa719241f9b74d6700be3320a777799bfab70a/src/diffusers/models/attention_dispatch.py" rel="nofollow">compute attention</a>.</p> <p>Besides leveraging pre-built compute kernels, different projects
rely on <code>kernels</code> to also package, build, and distribute their
kernels on the Hugging Face Hub platform. This is made possible by the <a href="./builder/writing-kernels">“builder” component of <code>kernels</code></a>.
Visit <a href="https://huggingface.co/kernels" rel="nofollow">huggingface.co/kernels</a> to browse
the pre-built compute kernels available on the Hub.</p> <p>Feel free to open a PR enlisting your project to show how <code>kernels</code> is leveraged there.</p> <!> <p></p>`,1);function E(g,d){v(d,!1),y(()=>{new URLSearchParams(window.location.search).get("fw")}),m();var r=L();b("102nbjw",c=>{var h=z();_(h,"content",x),f(c,h)});var a=e(A(r),2);k(a,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var t=e(a,2);o(t,{title:"Projects using kernels",local:"projects-using-kernels",headingTag:"h1"});var s=e(t,4);o(s,{title:"autoresearch",local:"autoresearch",headingTag:"h2"});var n=e(s,4);o(n,{title:"AReaL",local:"areal",headingTag:"h2"});var i=e(n,4);o(i,{title:"transformers",local:"transformers",headingTag:"h2"});var l=e(i,8);o(l,{title:"diffusers",local:"diffusers",headingTag:"h2"});var u=e(l,8);w(u,{source:"https://github.com/huggingface/kernels/blob/main/docs/source/integrating-kernels.md"}),j(2),f(g,r),T()}export{E as component};

Xet Storage Details

Size:
4.2 kB
·
Xet hash:
ed148907e181667311546ced88901a6c261267bfcaff5a411d36d1f29209810f

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