Buckets:

HuggingFaceDocBuilder's picture
download
raw
47 kB
import{s as el,c as Yl,u as zl,g as Ql,a as Fl,d as Dl,j as qe,o as El,n as St}from"../chunks/scheduler.8a2cc2fa.js";import{S as ll,i as nl,e as g,s as p,a as M,f as Yt,d as n,b as d,k as H,m as i,t as y,o as w,B as Ol,r as ql,u as Kl,l as tl,q as tn,v as en,w as Al,z as ln,x as nn,c as C,h as sn,g as U,j as $,n as v,p as x}from"../chunks/index.7079e750.js";import{C as an,H as R,E as on}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.23e7bceb.js";import{C as L}from"../chunks/CodeBlock.8691b651.js";import{e as Pl}from"../chunks/each.e59479a4.js";import{w as rn}from"../chunks/index.ed040676.js";const Vt=rn({});function mn(h,l){const u=new URL(window.location.href),e=new URLSearchParams(u.search);e.set(h,l),u.search=e.toString(),history.replaceState(null,"",u.toString())}function pn(h){const l=new URL(window.location.href);return new URLSearchParams(l.search).get(h)}function Sl(h,l,u){const e=h.slice();return e[7]=l[u],e}function Xl(h){let l,u=h[7]+"",e,o,r,f,m;function c(){return h[6](h[7])}return{c(){l=g("div"),e=ql(u),o=p(),this.h()},l(a){l=M(a,"DIV",{class:!0});var b=Yt(l);e=Kl(b,u),o=d(b),b.forEach(n),this.h()},h(){H(l,"class",r="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd "+(h[2][h[0]]===h[7]?"border-gray-800 bg-black dark:bg-gray-700 text-white":"text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm"))},m(a,b){i(a,l,b),tl(l,e),tl(l,o),f||(m=tn(l,"click",c),f=!0)},p(a,b){h=a,b&2&&u!==(u=h[7]+"")&&en(e,u),b&7&&r!==(r="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd "+(h[2][h[0]]===h[7]?"border-gray-800 bg-black dark:bg-gray-700 text-white":"text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm"))&&H(l,"class",r)},d(a){a&&n(l),f=!1,m()}}}function dn(h){let l,u,e,o,r=Pl(h[1]),f=[];for(let a=0;a<r.length;a+=1)f[a]=Xl(Sl(h,r,a));const m=h[5].default,c=Yl(m,h,h[4],null);return{c(){l=g("div");for(let a=0;a<f.length;a+=1)f[a].c();u=p(),e=g("div"),c&&c.c(),this.h()},l(a){l=M(a,"DIV",{class:!0});var b=Yt(l);for(let T=0;T<f.length;T+=1)f[T].l(b);b.forEach(n),u=d(a),e=M(a,"DIV",{class:!0});var G=Yt(e);c&&c.l(G),G.forEach(n),this.h()},h(){H(l,"class","flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"),H(e,"class","language-select")},m(a,b){i(a,l,b);for(let G=0;G<f.length;G+=1)f[G]&&f[G].m(l,null);i(a,u,b),i(a,e,b),c&&c.m(e,null),o=!0},p(a,[b]){if(b&15){r=Pl(a[1]);let G;for(G=0;G<r.length;G+=1){const T=Sl(a,r,G);f[G]?f[G].p(T,b):(f[G]=Xl(T),f[G].c(),f[G].m(l,null))}for(;G<f.length;G+=1)f[G].d(1);f.length=r.length}c&&c.p&&(!o||b&16)&&zl(c,m,a,a[4],o?Fl(m,a[4],b,null):Ql(a[4]),null)},i(a){o||(y(c,a),o=!0)},o(a){w(c,a),o=!1},d(a){a&&(n(l),n(u),n(e)),Ol(f,a),c&&c.d(a)}}}function un(h,l,u){let e;Dl(h,Vt,b=>u(2,e=b));let{$$slots:o={},$$scope:r}=l,{id:f}=l,{options:m}=l;qe(Vt,e[f]=m[0],e);function c(b){qe(Vt,e[f]=b,e),mn(f,b)}El(()=>{const b=pn(f);b&&m.includes(b)&&qe(Vt,e[f]=b,e)});const a=b=>c(b);return h.$$set=b=>{"id"in b&&u(0,f=b.id),"options"in b&&u(1,m=b.options),"$$scope"in b&&u(4,r=b.$$scope)},[f,m,e,c,r,o,a]}class Ke extends ll{constructor(l){super(),nl(this,l,un,dn,el,{id:0,options:1})}}function Vl(h){let l;const u=h[4].default,e=Yl(u,h,h[3],null);return{c(){e&&e.c()},l(o){e&&e.l(o)},m(o,r){e&&e.m(o,r),l=!0},p(o,r){e&&e.p&&(!l||r&8)&&zl(e,u,o,o[3],l?Fl(u,o[3],r,null):Ql(o[3]),null)},i(o){l||(y(e,o),l=!0)},o(o){w(e,o),l=!1},d(o){e&&e.d(o)}}}function fn(h){let l,u,e=h[2][h[0]]===h[1]&&Vl(h);return{c(){e&&e.c(),l=Al()},l(o){e&&e.l(o),l=Al()},m(o,r){e&&e.m(o,r),i(o,l,r),u=!0},p(o,[r]){o[2][o[0]]===o[1]?e?(e.p(o,r),r&7&&y(e,1)):(e=Vl(o),e.c(),y(e,1),e.m(l.parentNode,l)):e&&(ln(),w(e,1,1,()=>{e=null}),nn())},i(o){u||(y(e),u=!0)},o(o){w(e),u=!1},d(o){o&&n(l),e&&e.d(o)}}}function cn(h,l,u){let e;Dl(h,Vt,c=>u(2,e=c));let{$$slots:o={},$$scope:r}=l,{id:f}=l,{option:m}=l;return h.$$set=c=>{"id"in c&&u(0,f=c.id),"option"in c&&u(1,m=c.option),"$$scope"in c&&u(3,r=c.$$scope)},[f,m,e,r,o]}class Pt extends ll{constructor(l){super(),nl(this,l,cn,fn,el,{id:0,option:1})}}function hn(h){let l,u="To compile from source, you need CMake &gt;= <strong>3.22.1</strong> and Python &gt;= <strong>3.10</strong> installed. Make sure you have a compiler installed to compile C++ (<code>gcc</code>, <code>make</code>, headers, etc.). It is recommended to use GCC 11 or newer.",e,o,r="For example, to install a compiler and CMake on Ubuntu:",f,m,c,a,b='You should also install CUDA Toolkit by following the <a href="https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html" rel="nofollow">NVIDIA CUDA Installation Guide for Linux</a> guide. The current minimum supported CUDA Toolkit version that we support is <strong>11.8</strong>.',G,T,_,I,k="<p>If you have multiple versions of the CUDA Toolkit installed or it is in a non-standard location, please refer to CMake CUDA documentation for how to configure the CUDA compiler.</p>",N;return m=new L({props:{code:"YXB0LWdldCUyMGluc3RhbGwlMjAteSUyMGJ1aWxkLWVzc2VudGlhbCUyMGNtYWtl",highlighted:"apt-get install -y build-essential cmake",lang:"bash",wrap:!1}}),T=new L({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQWNtYWtlJTIwLURDT01QVVRFX0JBQ0tFTkQlM0RjdWRhJTIwLVMlMjAuJTBBbWFrZSUwQXBpcCUyMGluc3RhbGwlMjAtZSUyMC4lMjAlMjAlMjAlMjMlMjAlNjAtZSU2MCUyMGZvciUyMCUyMmVkaXRhYmxlJTIyJTIwaW5zdGFsbCUyQyUyMHdoZW4lMjBkZXZlbG9waW5nJTIwQk5CJTIwKG90aGVyd2lzZSUyMGxlYXZlJTIwdGhhdCUyMG91dCk=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/bitsandbytes-foundation/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
cmake -DCOMPUTE_BACKEND=cuda -S .
make
pip install -e . <span class="hljs-comment"># \`-e\` for &quot;editable&quot; install, when developing BNB (otherwise leave that out)</span>`,lang:"bash",wrap:!1}}),{c(){l=g("p"),l.innerHTML=u,e=p(),o=g("p"),o.textContent=r,f=p(),C(m.$$.fragment),c=p(),a=g("p"),a.innerHTML=b,G=p(),C(T.$$.fragment),_=p(),I=g("blockquote"),I.innerHTML=k,this.h()},l(J){l=M(J,"P",{"data-svelte-h":!0}),$(l)!=="svelte-62t1s"&&(l.innerHTML=u),e=d(J),o=M(J,"P",{"data-svelte-h":!0}),$(o)!=="svelte-noyxvz"&&(o.textContent=r),f=d(J),U(m.$$.fragment,J),c=d(J),a=M(J,"P",{"data-svelte-h":!0}),$(a)!=="svelte-kc1jbt"&&(a.innerHTML=b),G=d(J),U(T.$$.fragment,J),_=d(J),I=M(J,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),$(I)!=="svelte-1ayoph"&&(I.innerHTML=k),this.h()},h(){H(I,"class","tip")},m(J,j){i(J,l,j),i(J,e,j),i(J,o,j),i(J,f,j),v(m,J,j),i(J,c,j),i(J,a,j),i(J,G,j),v(T,J,j),i(J,_,j),i(J,I,j),N=!0},p:St,i(J){N||(y(m.$$.fragment,J),y(T.$$.fragment,J),N=!0)},o(J){w(m.$$.fragment,J),w(T.$$.fragment,J),N=!1},d(J){J&&(n(l),n(e),n(o),n(f),n(c),n(a),n(G),n(_),n(I)),x(m,J),x(T,J)}}}function bn(h){let l,u="Compilation from source on Windows systems require Visual Studio with C++ support as well as an installation of the CUDA Toolkit.",e,o,r='To compile from source, you need CMake &gt;= <strong>3.22.1</strong> and Python &gt;= <strong>3.10</strong> installed. You should also install CUDA Toolkit by following the <a href="https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html" rel="nofollow">CUDA Installation Guide for Windows</a> guide from NVIDIA. The current minimum supported CUDA Toolkit version that we support is <strong>11.8</strong>.',f,m,c,a,b='Big thanks to <a href="https://github.com/wkpark" rel="nofollow">wkpark</a>, <a href="https://github.com/Jamezo97" rel="nofollow">Jamezo97</a>, <a href="https://github.com/rickardp" rel="nofollow">rickardp</a>, <a href="https://github.com/akx" rel="nofollow">akx</a> for their amazing contributions to make bitsandbytes compatible with Windows.',G;return m=new L({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQWNtYWtlJTIwLURDT01QVVRFX0JBQ0tFTkQlM0RjdWRhJTIwLVMlMjAuJTBBY21ha2UlMjAtLWJ1aWxkJTIwLiUyMC0tY29uZmlnJTIwUmVsZWFzZSUwQXBpcCUyMGluc3RhbGwlMjAtZSUyMC4lMjAlMjAlMjAlMjMlMjAlNjAtZSU2MCUyMGZvciUyMCUyMmVkaXRhYmxlJTIyJTIwaW5zdGFsbCUyQyUyMHdoZW4lMjBkZXZlbG9waW5nJTIwQk5CJTIwKG90aGVyd2lzZSUyMGxlYXZlJTIwdGhhdCUyMG91dCk=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/bitsandbytes-foundation/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
cmake -DCOMPUTE_BACKEND=cuda -S .
cmake --build . --config Release
pip install -e . <span class="hljs-comment"># \`-e\` for &quot;editable&quot; install, when developing BNB (otherwise leave that out)</span>`,lang:"bash",wrap:!1}}),{c(){l=g("p"),l.textContent=u,e=p(),o=g("p"),o.innerHTML=r,f=p(),C(m.$$.fragment),c=p(),a=g("p"),a.innerHTML=b},l(T){l=M(T,"P",{"data-svelte-h":!0}),$(l)!=="svelte-10x6whz"&&(l.textContent=u),e=d(T),o=M(T,"P",{"data-svelte-h":!0}),$(o)!=="svelte-dit2ws"&&(o.innerHTML=r),f=d(T),U(m.$$.fragment,T),c=d(T),a=M(T,"P",{"data-svelte-h":!0}),$(a)!=="svelte-e0ivb"&&(a.innerHTML=b)},m(T,_){i(T,l,_),i(T,e,_),i(T,o,_),i(T,f,_),v(m,T,_),i(T,c,_),i(T,a,_),G=!0},p:St,i(T){G||(y(m.$$.fragment,T),G=!0)},o(T){w(m.$$.fragment,T),G=!1},d(T){T&&(n(l),n(e),n(o),n(f),n(c),n(a)),x(m,T)}}}function gn(h){let l,u,e,o;return l=new Pt({props:{id:"source",option:"Linux",$$slots:{default:[hn]},$$scope:{ctx:h}}}),e=new Pt({props:{id:"source",option:"Windows",$$slots:{default:[bn]},$$scope:{ctx:h}}}),{c(){C(l.$$.fragment),u=p(),C(e.$$.fragment)},l(r){U(l.$$.fragment,r),u=d(r),U(e.$$.fragment,r)},m(r,f){v(l,r,f),i(r,u,f),v(e,r,f),o=!0},p(r,f){const m={};f&2&&(m.$$scope={dirty:f,ctx:r}),l.$set(m);const c={};f&2&&(c.$$scope={dirty:f,ctx:r}),e.$set(c)},i(r){o||(y(l.$$.fragment,r),y(e.$$.fragment,r),o=!0)},o(r){w(l.$$.fragment,r),w(e.$$.fragment,r),o=!1},d(r){r&&n(u),x(l,r),x(e,r)}}}function Mn(h){let l,u="To compile from source, you need CMake &gt;= <strong>3.31.6</strong> and Python &gt;= <strong>3.10</strong> installed. Make sure you have a compiler installed to compile C++ (<code>gcc</code>, <code>make</code>, headers, etc.).",e,o,r="You should also have a ROCm installation (system-wide or via Docker). The current minimum supported version is <strong>6.2</strong>.",f,m,c;return m=new L({props:{code:"JTIzJTIwSW5zdGFsbCUyMGJpdHNhbmRieXRlcyUyMGZyb20lMjBzb3VyY2UlMEElMEElMjMlMjBDbG9uZSUyMGJpdHNhbmRieXRlcyUyMHJlcG8lMEFnaXQlMjBjbG9uZSUyMGh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmJpdHNhbmRieXRlcy1mb3VuZGF0aW9uJTJGYml0c2FuZGJ5dGVzLmdpdCUyMCUyNiUyNiUyMGNkJTIwYml0c2FuZGJ5dGVzJTJGJTBBJTBBJTIzJTIwQ29tcGlsZSUyMCUyNiUyMGluc3RhbGwlMEFhcHQtZ2V0JTIwaW5zdGFsbCUyMC15JTIwYnVpbGQtZXNzZW50aWFsJTIwY21ha2UlMjAlMjAlMjMlMjBpbnN0YWxsJTIwYnVpbGQlMjB0b29scyUyMGRlcGVuZGVuY2llcyUyQyUyMHVubGVzcyUyMHByZXNlbnQlMEFjbWFrZSUyMC1EQ09NUFVURV9CQUNLRU5EJTNEaGlwJTIwLVMlMjAuJTIwJTIwJTIzJTIwVXNlJTIwLURCTkJfUk9DTV9BUkNIJTNEJTIyZ2Z4OTBhJTNCZ2Z4OTQyJTIyJTIwdG8lMjB0YXJnZXQlMjBzcGVjaWZpYyUyMGdwdSUyMGFyY2glMEFtYWtlJTBBcGlwJTIwaW5zdGFsbCUyMC1lJTIwLiUyMCUyMCUyMCUyMyUyMCU2MC1lJTYwJTIwZm9yJTIwJTIyZWRpdGFibGUlMjIlMjBpbnN0YWxsJTJDJTIwd2hlbiUyMGRldmVsb3BpbmclMjBCTkIlMjAob3RoZXJ3aXNlJTIwbGVhdmUlMjB0aGF0JTIwb3V0KQ==",highlighted:`<span class="hljs-comment"># Install bitsandbytes from source</span>
<span class="hljs-comment"># Clone bitsandbytes repo</span>
git <span class="hljs-built_in">clone</span> https://github.com/bitsandbytes-foundation/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
<span class="hljs-comment"># Compile &amp; install</span>
apt-get install -y build-essential cmake <span class="hljs-comment"># install build tools dependencies, unless present</span>
cmake -DCOMPUTE_BACKEND=hip -S . <span class="hljs-comment"># Use -DBNB_ROCM_ARCH=&quot;gfx90a;gfx942&quot; to target specific gpu arch</span>
make
pip install -e . <span class="hljs-comment"># \`-e\` for &quot;editable&quot; install, when developing BNB (otherwise leave that out)</span>`,lang:"bash",wrap:!1}}),{c(){l=g("p"),l.innerHTML=u,e=p(),o=g("p"),o.innerHTML=r,f=p(),C(m.$$.fragment)},l(a){l=M(a,"P",{"data-svelte-h":!0}),$(l)!=="svelte-3khjtw"&&(l.innerHTML=u),e=d(a),o=M(a,"P",{"data-svelte-h":!0}),$(o)!=="svelte-1v5j4ex"&&(o.innerHTML=r),f=d(a),U(m.$$.fragment,a)},m(a,b){i(a,l,b),i(a,e,b),i(a,o,b),i(a,f,b),v(m,a,b),c=!0},p:St,i(a){c||(y(m.$$.fragment,a),c=!0)},o(a){w(m.$$.fragment,a),c=!1},d(a){a&&(n(l),n(e),n(o),n(f)),x(m,a)}}}function yn(h){let l,u="Compilation on Windows requires Visual Studio with C++ support, CMake, Ninja, and Python &gt;= <strong>3.10</strong>.",e,o,r='Instead of a system-wide ROCm installation, you can use the pip-installable ROCm SDK wheels from <a href="https://repo.radeon.com/rocm/windows/" rel="nofollow">repo.radeon.com</a>:',f,m,c;return m=new L({props:{code:"JTIzJTIwSW5zdGFsbCUyMFJPQ20lMjBTREslMjB3aGVlbHMlMjAoYWRqdXN0JTIwdmVyc2lvbiUyMGFzJTIwbmVlZGVkKSUwQXBpcCUyMGluc3RhbGwlMjBuaW5qYSUyMGNtYWtlJTBBcGlwJTIwaW5zdGFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMGh0dHBzJTNBJTJGJTJGcmVwby5yYWRlb24uY29tJTJGcm9jbSUyRndpbmRvd3MlMkZyb2NtLXJlbC03LjIuMSUyRnJvY21fc2RrX2NvcmUtNy4yLjEtcHkzLW5vbmUtd2luX2FtZDY0LndobCUyMCU1QyUwQSUyMCUyMCUyMCUyMGh0dHBzJTNBJTJGJTJGcmVwby5yYWRlb24uY29tJTJGcm9jbSUyRndpbmRvd3MlMkZyb2NtLXJlbC03LjIuMSUyRnJvY21fc2RrX2RldmVsLTcuMi4xLXB5My1ub25lLXdpbl9hbWQ2NC53aGwlMjAlNUMlMEElMjAlMjAlMjAlMjBodHRwcyUzQSUyRiUyRnJlcG8ucmFkZW9uLmNvbSUyRnJvY20lMkZ3aW5kb3dzJTJGcm9jbS1yZWwtNy4yLjElMkZyb2NtX3Nka19saWJyYXJpZXNfY3VzdG9tLTcuMi4xLXB5My1ub25lLXdpbl9hbWQ2NC53aGwlMjAlNUMlMEElMjAlMjAlMjAlMjBodHRwcyUzQSUyRiUyRnJlcG8ucmFkZW9uLmNvbSUyRnJvY20lMkZ3aW5kb3dzJTJGcm9jbS1yZWwtNy4yLjElMkZyb2NtLTcuMi4xLnRhci5neiUwQSUwQSUyMyUyMEV4cGFuZCUyMHRoZSUyMGRldmVsJTIwdGFyYmFsbCUwQXJvY20tc2RrJTIwaW5pdCUwQSUwQSUyMyUyMFNldCUyMFJPQ01fUEFUSCUyMGFuZCUyMGFjdGl2YXRlJTIwVmlzdWFsJTIwU3R1ZGlvJTIwZW52aXJvbm1lbnQlMkMlMjB0aGVuJTIwYnVpbGQlMEFleHBvcnQlMjBST0NNX1BBVEglM0QlMjIlMjQocm9jbS1zZGslMjBwYXRoJTIwLS1yb290KSUyMiUwQWV4cG9ydCUyMFBBVEglM0QlMjIlMjQlN0JST0NNX1BBVEglN0QlMkZiaW4lM0ElMjQlN0JQQVRIJTdEJTIyJTBBZ2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQWNtYWtlJTIwLUclMjBOaW5qYSUyMC1EQ09NUFVURV9CQUNLRU5EJTNEaGlwJTIwLURCTkJfUk9DTV9BUkNIJTNEJTIyZ2Z4MTEwMCUyMiUyMC1EQ01BS0VfQlVJTERfVFlQRSUzRFJlbGVhc2UlMjAtUyUyMC4lMEFjbWFrZSUyMC0tYnVpbGQlMjAuJTIwLS1jb25maWclMjBSZWxlYXNlJTBBcGlwJTIwaW5zdGFsbCUyMC4=",highlighted:`<span class="hljs-comment"># Install ROCm SDK wheels (adjust version as needed)</span>
pip install ninja cmake
pip install \\
https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/rocm_sdk_core-7.2.1-py3-none-win_amd64.whl \\
https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/rocm_sdk_devel-7.2.1-py3-none-win_amd64.whl \\
https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/rocm_sdk_libraries_custom-7.2.1-py3-none-win_amd64.whl \\
https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/rocm-7.2.1.tar.gz
<span class="hljs-comment"># Expand the devel tarball</span>
rocm-sdk init
<span class="hljs-comment"># Set ROCM_PATH and activate Visual Studio environment, then build</span>
<span class="hljs-built_in">export</span> ROCM_PATH=<span class="hljs-string">&quot;<span class="hljs-subst">$(rocm-sdk path --root)</span>&quot;</span>
<span class="hljs-built_in">export</span> PATH=<span class="hljs-string">&quot;<span class="hljs-variable">\${ROCM_PATH}</span>/bin:<span class="hljs-variable">\${PATH}</span>&quot;</span>
git <span class="hljs-built_in">clone</span> https://github.com/bitsandbytes-foundation/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
cmake -G Ninja -DCOMPUTE_BACKEND=hip -DBNB_ROCM_ARCH=<span class="hljs-string">&quot;gfx1100&quot;</span> -DCMAKE_BUILD_TYPE=Release -S .
cmake --build . --config Release
pip install .`,lang:"bash",wrap:!1}}),{c(){l=g("p"),l.innerHTML=u,e=p(),o=g("p"),o.innerHTML=r,f=p(),C(m.$$.fragment)},l(a){l=M(a,"P",{"data-svelte-h":!0}),$(l)!=="svelte-12w6ctf"&&(l.innerHTML=u),e=d(a),o=M(a,"P",{"data-svelte-h":!0}),$(o)!=="svelte-13gc57q"&&(o.innerHTML=r),f=d(a),U(m.$$.fragment,a)},m(a,b){i(a,l,b),i(a,e,b),i(a,o,b),i(a,f,b),v(m,a,b),c=!0},p:St,i(a){c||(y(m.$$.fragment,a),c=!0)},o(a){w(m.$$.fragment,a),c=!1},d(a){a&&(n(l),n(e),n(o),n(f)),x(m,a)}}}function $n(h){let l,u,e,o;return l=new Pt({props:{id:"rocm-source",option:"Linux",$$slots:{default:[Mn]},$$scope:{ctx:h}}}),e=new Pt({props:{id:"rocm-source",option:"Windows",$$slots:{default:[yn]},$$scope:{ctx:h}}}),{c(){C(l.$$.fragment),u=p(),C(e.$$.fragment)},l(r){U(l.$$.fragment,r),u=d(r),U(e.$$.fragment,r)},m(r,f){v(l,r,f),i(r,u,f),v(e,r,f),o=!0},p(r,f){const m={};f&2&&(m.$$scope={dirty:f,ctx:r}),l.$set(m);const c={};f&2&&(c.$$scope={dirty:f,ctx:r}),e.$set(c)},i(r){o||(y(l.$$.fragment,r),y(e.$$.fragment,r),o=!0)},o(r){w(l.$$.fragment,r),w(e.$$.fragment,r),o=!1},d(r){r&&n(u),x(l,r),x(e,r)}}}function wn(h){let l,u;return l=new L({props:{code:"JTIzJTIwTm90ZSUzQSUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBvdXIlMjBkZXBlbmRlbmNpZXMlMkMlMjBhcHBlbmQlMjB0aGUlMjAlNjAtLW5vLWRlcHMlNjAlMjBmbGFnISUwQSUwQSUyMyUyMHg4Nl82NCUyMChtb3N0JTIwdXNlcnMpJTBBcGlwJTIwaW5zdGFsbCUyMC0tZm9yY2UtcmVpbnN0YWxsJTIwaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGYml0c2FuZGJ5dGVzLWZvdW5kYXRpb24lMkZiaXRzYW5kYnl0ZXMlMkZyZWxlYXNlcyUyRmRvd25sb2FkJTJGY29udGludW91cy1yZWxlYXNlX21haW4lMkZiaXRzYW5kYnl0ZXMtMS4zMy43LnByZXZpZXctcHkzLW5vbmUtbWFueWxpbnV4XzJfMjRfeDg2XzY0LndobCUwQSUwQSUyMyUyMEFSTSUyRmFhcmNoNjQlMEFwaXAlMjBpbnN0YWxsJTIwLS1mb3JjZS1yZWluc3RhbGwlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcyUyRnJlbGVhc2VzJTJGZG93bmxvYWQlMkZjb250aW51b3VzLXJlbGVhc2VfbWFpbiUyRmJpdHNhbmRieXRlcy0xLjMzLjcucHJldmlldy1weTMtbm9uZS1tYW55bGludXhfMl8yNF9hYXJjaDY0LndobA==",highlighted:`<span class="hljs-comment"># Note: if you don&#x27;t want to reinstall our dependencies, append the \`--no-deps\` flag!</span>
<span class="hljs-comment"># x86_64 (most users)</span>
pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl
<span class="hljs-comment"># ARM/aarch64</span>
pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_aarch64.whl`,lang:"bash",wrap:!1}}),{c(){C(l.$$.fragment)},l(e){U(l.$$.fragment,e)},m(e,o){v(l,e,o),u=!0},p:St,i(e){u||(y(l.$$.fragment,e),u=!0)},o(e){w(l.$$.fragment,e),u=!1},d(e){x(l,e)}}}function Tn(h){let l,u;return l=new L({props:{code:"JTIzJTIwTm90ZSUzQSUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBvdXIlMjBkZXBlbmRlbmNpZXMlMkMlMjBhcHBlbmQlMjB0aGUlMjAlNjAtLW5vLWRlcHMlNjAlMjBmbGFnISUwQXBpcCUyMGluc3RhbGwlMjAtLWZvcmNlLXJlaW5zdGFsbCUyMGh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmJpdHNhbmRieXRlcy1mb3VuZGF0aW9uJTJGYml0c2FuZGJ5dGVzJTJGcmVsZWFzZXMlMkZkb3dubG9hZCUyRmNvbnRpbnVvdXMtcmVsZWFzZV9tYWluJTJGYml0c2FuZGJ5dGVzLTEuMzMuNy5wcmV2aWV3LXB5My1ub25lLXdpbl9hbWQ2NC53aGw=",highlighted:'<span class="hljs-comment"># Note: if you don&#x27;t want to reinstall our dependencies, append the `--no-deps` flag!</span>\npip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_amd64.whl',lang:"bash",wrap:!1}}),{c(){C(l.$$.fragment)},l(e){U(l.$$.fragment,e)},m(e,o){v(l,e,o),u=!0},p:St,i(e){u||(y(l.$$.fragment,e),u=!0)},o(e){w(l.$$.fragment,e),u=!1},d(e){x(l,e)}}}function Cn(h){let l,u;return l=new L({props:{code:"JTIzJTIwTm90ZSUzQSUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBvdXIlMjBkZXBlbmRlbmNpZXMlMkMlMjBhcHBlbmQlMjB0aGUlMjAlNjAtLW5vLWRlcHMlNjAlMjBmbGFnISUwQXBpcCUyMGluc3RhbGwlMjAtLWZvcmNlLXJlaW5zdGFsbCUyMGh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmJpdHNhbmRieXRlcy1mb3VuZGF0aW9uJTJGYml0c2FuZGJ5dGVzJTJGcmVsZWFzZXMlMkZkb3dubG9hZCUyRmNvbnRpbnVvdXMtcmVsZWFzZV9tYWluJTJGYml0c2FuZGJ5dGVzLTEuMzMuNy5wcmV2aWV3LXB5My1ub25lLW1hY29zeF8xNF8wX2FybTY0LndobA==",highlighted:'<span class="hljs-comment"># Note: if you don&#x27;t want to reinstall our dependencies, append the `--no-deps` flag!</span>\npip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-macosx_14_0_arm64.whl',lang:"bash",wrap:!1}}),{c(){C(l.$$.fragment)},l(e){U(l.$$.fragment,e)},m(e,o){v(l,e,o),u=!0},p:St,i(e){u||(y(l.$$.fragment,e),u=!0)},o(e){w(l.$$.fragment,e),u=!1},d(e){x(l,e)}}}function Un(h){let l,u,e,o,r,f;return l=new Pt({props:{id:"OS",option:"Linux",$$slots:{default:[wn]},$$scope:{ctx:h}}}),e=new Pt({props:{id:"OS",option:"Windows",$$slots:{default:[Tn]},$$scope:{ctx:h}}}),r=new Pt({props:{id:"OS",option:"macOS",$$slots:{default:[Cn]},$$scope:{ctx:h}}}),{c(){C(l.$$.fragment),u=p(),C(e.$$.fragment),o=p(),C(r.$$.fragment)},l(m){U(l.$$.fragment,m),u=d(m),U(e.$$.fragment,m),o=d(m),U(r.$$.fragment,m)},m(m,c){v(l,m,c),i(m,u,c),v(e,m,c),i(m,o,c),v(r,m,c),f=!0},p(m,c){const a={};c&2&&(a.$$scope={dirty:c,ctx:m}),l.$set(a);const b={};c&2&&(b.$$scope={dirty:c,ctx:m}),e.$set(b);const G={};c&2&&(G.$$scope={dirty:c,ctx:m}),r.$set(G)},i(m){f||(y(l.$$.fragment,m),y(e.$$.fragment,m),y(r.$$.fragment,m),f=!0)},o(m){w(l.$$.fragment,m),w(e.$$.fragment,m),w(r.$$.fragment,m),f=!1},d(m){m&&(n(u),n(o)),x(l,m),x(e,m),x(r,m)}}}function vn(h){let l,u,e,o,r,f,m,c,a,b="Welcome to the installation guide for the <code>bitsandbytes</code> library! This document provides step-by-step instructions to install <code>bitsandbytes</code> across various platforms and hardware configurations.",G,T,_="We provide official support for NVIDIA GPUs, CPUs, Intel XPUs, and Intel Gaudi. We also have experimental support for additional platforms such as AMD ROCm and Apple Silicon.",I,k,N,J,j='<li><a href="#requirements">System Requirements</a></li> <li><a href="#cuda">NVIDIA CUDA</a> <ul><li><a href="#cuda-pip">Installation via PyPI</a></li> <li><a href="#cuda-compile">Compile from Source</a></li></ul></li> <li><a href="#xpu">Intel XPU</a> <ul><li><a href="#xpu-pip">Installation via PyPI</a></li></ul></li> <li><a href="#gaudi">Intel Gaudi</a> <ul><li><a href="#gaudi-pip">Installation via PyPI</a></li></ul></li> <li><a href="#cpu">CPU</a> <ul><li><a href="#cpu-pip">Installation via PyPI</a></li> <li><a href="#cpu-compile">Compile from Source</a></li></ul></li> <li><a href="#rocm">AMD ROCm (Preview)</a> <ul><li><a href="#rocm-pip">Installation via PyPI</a></li> <li><a href="#rocm-compile">Compile from Source</a></li></ul></li> <li><a href="#preview-wheels">Preview Wheels</a></li>',zt,S,Qt,X,sl="These are the minimum requirements for <code>bitsandbytes</code> across all platforms. Please be aware that some compute platforms may impose more strict requirements.",Ft,V,il="<li>Python &gt;= 3.10</li> <li>PyTorch &gt;= 2.4</li>",Dt,Y,Et,z,al=`<code>bitsandbytes</code> is currently supported on NVIDIA GPUs with <a href="https://developer.nvidia.com/cuda-gpus" rel="nofollow">Compute Capability</a> 6.0+.
The library can be built using CUDA Toolkit versions as old as <strong>11.8</strong>.`,Ot,Q,ol="<thead><tr><th><strong>Feature</strong></th> <th><strong>CC Required</strong></th> <th><strong>Example Hardware Requirement</strong></th></tr></thead> <tbody><tr><td>LLM.int8()</td> <td>7.5+</td> <td>Turing (RTX 20 series, T4) or newer GPUs</td></tr> <tr><td>8-bit optimizers/quantization</td> <td>6.0+</td> <td>Pascal (GTX 10X0 series, P100) or newer GPUs</td></tr> <tr><td>NF4/FP4 quantization</td> <td>6.0+</td> <td>Pascal (GTX 10X0 series, P100) or newer GPUs</td></tr></tbody>",qt,F,Kt,D,rl="This is the most straightforward and recommended installation option.",te,E,ml="The currently distributed <code>bitsandbytes</code> packages are built with the following configurations:",ee,O,pl="<thead><tr><th><strong>OS</strong></th> <th><strong>CUDA Toolkit</strong></th> <th><strong>Host Compiler</strong></th> <th><strong>Targets</strong></th></tr></thead> <tbody><tr><td><strong>Linux x86-64</strong></td> <td>11.8 - 12.6</td> <td>GCC 11.2</td> <td>sm60, sm70, sm75, sm80, sm86, sm89, sm90</td></tr> <tr><td><strong>Linux x86-64</strong></td> <td>12.8 - 12.9</td> <td>GCC 11.2</td> <td>sm70, sm75, sm80, sm86, sm89, sm90, sm100, sm120</td></tr> <tr><td><strong>Linux x86-64</strong></td> <td>13.0</td> <td>GCC 11.2</td> <td>sm75, sm80, sm86, sm89, sm90, sm100, sm120</td></tr> <tr><td><strong>Linux aarch64</strong></td> <td>11.8 - 12.6</td> <td>GCC 11.2</td> <td>sm75, sm80, sm90</td></tr> <tr><td><strong>Linux aarch64</strong></td> <td>12.8 - 13.0</td> <td>GCC 11.2</td> <td>sm75, sm80, sm90, sm100, sm110, sm120, sm121</td></tr> <tr><td><strong>Windows x86-64</strong></td> <td>11.8 - 12.6</td> <td>MSVC 19.43+ (VS2022)</td> <td>sm50, sm60, sm75, sm80, sm86, sm89, sm90</td></tr> <tr><td><strong>Windows x86-64</strong></td> <td>12.8 - 12.9</td> <td>MSVC 19.43+ (VS2022)</td> <td>sm70, sm75, sm80, sm86, sm89, sm90, sm100, sm120</td></tr> <tr><td><strong>Windows x86-64</strong></td> <td>13.0</td> <td>MSVC 19.43+ (VS2022)</td> <td>sm75, sm80, sm86, sm89, sm90, sm100, sm120</td></tr></tbody>",le,q,dl="The Linux build has a minimum glibc version of 2.24.",ne,K,ul="Use <code>pip</code> or <code>uv</code> to install the latest release:",se,tt,ie,Z,fl='<p><strong>NVIDIA Jetson (L4T / JetPack) — source build required.</strong> The <code>Linux aarch64</code> wheels above are built on aarch64-sbsa runners (server-class ARM with the standard CUDA Toolkit). They are <strong>not compatible</strong> with the L4T runtime on Jetson devices (Orin Nano / NX / AGX, Xavier, Thor on CUDA 12), even though both are aarch64 and even though the cubins are binary-compatible with the device’s compute capability (e.g., <code>sm_80</code> cubin runs on <code>sm_87</code> hardware via Ampere-family binary compat — see <a href="https://developer.nvidia.com/blog/understanding-ptx-the-assembly-language-of-cuda-gpu-computing/#binary_compatibility" rel="nofollow">NVIDIA’s docs on binary compatibility</a>). The mismatch is at the CUDA library / ABI layer (JetPack ships its own CUDA Toolkit and system libraries), and surfaces as a runtime symbol-resolution error like <code>Error named symbol not found in /src/csrc/ops.cu</code> on the first CUDA op.</p> <p><strong>Two working options on Jetson:</strong></p> <ol><li><strong>Source build on-device.</strong> Use the <a href="#cuda-compile">Compile from Source</a> instructions below, passing your device’s compute capability explicitly (sm_87 for Orin family, sm_72 for Xavier). On an Orin Nano Super: <code>cmake -DCOMPUTE_BACKEND=cuda -DCOMPUTE_CAPABILITY=87 . &amp;&amp; make -j4 &amp;&amp; pip install .</code></li> <li><strong>Third-party prebuilt</strong> from <a href="https://pypi.jetson-ai-lab.io/" rel="nofollow">Jetson AI Lab’s package index</a> (e.g., <code>pypi.jetson-ai-lab.io/jp6/cu126/bitsandbytes/</code>).</li></ol>',ae,et,oe,W,cl="<p>Don’t hesitate to compile from source! The process is pretty straight forward and resilient. This might be needed for older CUDA Toolkit versions or Linux distributions, or other less common configurations.</p>",re,lt,hl="For Linux and Windows systems, compiling from source allows you to customize the build configurations. See below for detailed platform-specific instructions (see the <code>CMakeLists.txt</code> if you want to check the specifics and explore some additional options):",me,B,pe,nt,de,st,bl='<li>A compatible PyTorch version with Intel XPU support is required. The current minimum is <strong>PyTorch 2.6.0</strong>. It is recommended to use the latest stable release. See <a href="https://docs.pytorch.org/docs/stable/notes/get_start_xpu.html" rel="nofollow">Getting Started on Intel GPU</a> for guidance.</li>',ue,it,fe,at,gl="This is the most straightforward and recommended installation option.",ce,ot,Ml="The currently distributed <code>bitsandbytes</code> packages are built with the following configurations:",he,rt,yl="<thead><tr><th><strong>OS</strong></th> <th><strong>oneAPI Toolkit</strong></th> <th><strong>Kernel Implementation</strong></th></tr></thead> <tbody><tr><td><strong>Linux x86-64</strong></td> <td>2025.1.3</td> <td>SYCL + Triton</td></tr> <tr><td><strong>Windows x86-64</strong></td> <td>2025.1.3</td> <td>SYCL + Triton</td></tr></tbody>",be,mt,$l="The Linux build has a minimum glibc version of 2.34.",ge,pt,wl="Use <code>pip</code> or <code>uv</code> to install the latest release:",Me,dt,ye,ut,$e,ft,Tl='<li>A compatible PyTorch version with Intel Gaudi support is required. The current minimum is <strong>Gaudi v1.21</strong> with <strong>PyTorch 2.6.0</strong>. It is recommended to use the latest stable release. See the Gaudi software <a href="https://docs.habana.ai/en/latest/Installation_Guide/index.html" rel="nofollow">installation guide</a> for guidance.</li>',we,ct,Te,ht,Cl="Use <code>pip</code> or <code>uv</code> to install the latest release:",Ce,bt,Ue,gt,ve,Mt,xe,yt,Ul="This is the most straightforward and recommended installation option.",Je,$t,vl="The currently distributed <code>bitsandbytes</code> packages are built with the following configurations:",Ge,wt,xl="<thead><tr><th><strong>OS</strong></th> <th><strong>Host Compiler</strong></th> <th>Hardware Minimum</th></tr></thead> <tbody><tr><td><strong>Linux x86-64</strong></td> <td>GCC 11.4</td> <td>AVX2</td></tr> <tr><td><strong>Linux aarch64</strong></td> <td>GCC 11.4</td> <td></td></tr> <tr><td><strong>Windows x86-64</strong></td> <td>MSVC 19.43+ (VS2022)</td> <td>AVX2</td></tr> <tr><td><strong>macOS arm64</strong></td> <td>Apple Clang 17</td> <td></td></tr></tbody>",Re,Tt,Jl="The Linux build has a minimum glibc version of 2.24.",_e,Ct,Gl="Use <code>pip</code> or <code>uv</code> to install the latest release:",je,Ut,Le,vt,Ie,xt,Rl="To compile from source, simply install the package from source using <code>pip</code>. The package will be built for CPU only at this time.",ke,Jt,Ne,Gt,He,Rt,_l=`<li>Support for AMD GPUs is currently in a preview state.</li> <li>All features are supported for both consumer RDNA devices and Data Center CDNA products.</li> <li>A compatible PyTorch version with AMD ROCm support is required. It is recommended to use the latest stable release. On Linux, see <a href="https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/3rd-party/pytorch-install.html" rel="nofollow">PyTorch on ROCm</a> for guidance. On Windows, ROCm-enabled PyTorch wheels are available from:
<ul><li><a href="https://repo.radeon.com/rocm/windows/" rel="nofollow">repo.radeon.com/rocm/windows/</a> — official AMD releases</li> <li><a href="https://repo.amd.com/rocm/whl/" rel="nofollow">repo.amd.com/rocm/whl/</a> — <a href="https://github.com/ROCm/TheRock" rel="nofollow">TheRock</a> release builds</li> <li><a href="https://rocm.nightlies.amd.com/v2" rel="nofollow">rocm.nightlies.amd.com/v2</a> — TheRock nightly builds</li></ul></li>`,Ze,_t,We,jt,jl="This is the most straightforward and recommended installation option.",Be,Lt,Ll="The currently distributed <code>bitsandbytes</code> are built with the following configurations:",Ae,It,Il="<thead><tr><th><strong>OS</strong></th> <th><strong>ROCm</strong></th> <th><strong>Targets</strong></th></tr></thead> <tbody><tr><td><strong>Linux x86-64</strong></td> <td>6.2.4</td> <td>CDNA: gfx90a, gfx942 / RDNA: gfx1100, gfx1101, gfx1102, gfx1103</td></tr> <tr><td><strong>Linux x86-64</strong></td> <td>6.3.4</td> <td>CDNA: gfx90a, gfx942 / RDNA: gfx1100, gfx1101, gfx1102, gfx1103</td></tr> <tr><td><strong>Linux x86-64</strong></td> <td>6.4.4</td> <td>CDNA: gfx90a, gfx942 / RDNA: gfx1100, gfx1101, gfx1102, gfx1103, gfx1150, gfx1151, gfx1152, gfx1153, gfx1200, gfx1201</td></tr> <tr><td><strong>Linux x86-64</strong></td> <td>7.0.2</td> <td>CDNA: gfx90a, gfx942, gfx950 / RDNA: gfx1100, gfx1101, gfx1102, gfx1103, gfx1150, gfx1151, gfx1152, gfx1153, gfx1200, gfx1201</td></tr> <tr><td><strong>Linux x86-64</strong></td> <td>7.1.1</td> <td>CDNA: gfx90a, gfx942, gfx950 / RDNA: gfx1100, gfx1101, gfx1102, gfx1103, gfx1150, gfx1151, gfx1152, gfx1153, gfx1200, gfx1201</td></tr> <tr><td><strong>Linux x86-64</strong></td> <td>7.2.3</td> <td>CDNA: gfx90a, gfx942, gfx950 / RDNA: gfx1100, gfx1101, gfx1102, gfx1103, gfx1150, gfx1151, gfx1152, gfx1153, gfx1200, gfx1201</td></tr> <tr><td><strong>Windows x86-64</strong></td> <td>7.2.1</td> <td>RDNA: gfx1100, gfx1101, gfx1102, gfx1150, gfx1151, gfx1200, gfx1201</td></tr></tbody>",Pe,kt,kl="Use <code>pip</code> or <code>uv</code> to install the latest release:",Se,Nt,Xe,Ht,Ve,Zt,Nl="bitsandbytes can be compiled from ROCm 6.2 - ROCm 7.2.3. See the <code>CMakeLists.txt</code> for additional options.",Ye,A,ze,Wt,Qe,Bt,Hl="If you would like to use new features even before they are officially released and help us test them, feel free to install the wheel directly from our CI (<em>the wheel links will remain stable!</em>):",Fe,P,De,At,Ee,Xt,Oe;return r=new an({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),m=new R({props:{title:"Installation Guide",local:"installation-guide",headingTag:"h1"}}),k=new R({props:{title:"Table of Contents",local:"table-of-contents",headingTag:"h2"}}),S=new R({props:{title:"System Requirements",local:"requirements",headingTag:"h2"}}),Y=new R({props:{title:"NVIDIA CUDA",local:"cuda",headingTag:"h2"}}),F=new R({props:{title:"Installation via PyPI",local:"cuda-pip",headingTag:"h3"}}),tt=new L({props:{code:"cGlwJTIwaW5zdGFsbCUyMGJpdHNhbmRieXRlcw==",highlighted:"pip install bitsandbytes",lang:"bash",wrap:!1}}),et=new R({props:{title:"Compile from Source",local:"cuda-compile",headingTag:"h3"}}),B=new Ke({props:{id:"source",options:["Linux","Windows"],$$slots:{default:[gn]},$$scope:{ctx:h}}}),nt=new R({props:{title:"Intel XPU",local:"xpu",headingTag:"h2"}}),it=new R({props:{title:"Installation via PyPI",local:"xpu-pip",headingTag:"h3"}}),dt=new L({props:{code:"cGlwJTIwaW5zdGFsbCUyMGJpdHNhbmRieXRlcw==",highlighted:"pip install bitsandbytes",lang:"bash",wrap:!1}}),ut=new R({props:{title:"Intel Gaudi",local:"gaudi",headingTag:"h2"}}),ct=new R({props:{title:"Installation from PyPI",local:"gaudi-pip",headingTag:"h3"}}),bt=new L({props:{code:"cGlwJTIwaW5zdGFsbCUyMGJpdHNhbmRieXRlcw==",highlighted:"pip install bitsandbytes",lang:"bash",wrap:!1}}),gt=new R({props:{title:"CPU",local:"cpu",headingTag:"h2"}}),Mt=new R({props:{title:"Installation from PyPI",local:"cpu-pip",headingTag:"h3"}}),Ut=new L({props:{code:"cGlwJTIwaW5zdGFsbCUyMGJpdHNhbmRieXRlcw==",highlighted:"pip install bitsandbytes",lang:"bash",wrap:!1}}),vt=new R({props:{title:"Compile from Source",local:"cpu-compile",headingTag:"h3"}}),Jt=new L({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQXBpcCUyMGluc3RhbGwlMjAtZSUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/bitsandbytes-foundation/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
pip install -e .`,lang:"bash",wrap:!1}}),Gt=new R({props:{title:"AMD ROCm (Preview)",local:"rocm",headingTag:"h2"}}),_t=new R({props:{title:"Installation from PyPI",local:"rocm-pip",headingTag:"h3"}}),Nt=new L({props:{code:"cGlwJTIwaW5zdGFsbCUyMGJpdHNhbmRieXRlcw==",highlighted:"pip install bitsandbytes",lang:"bash",wrap:!1}}),Ht=new R({props:{title:"Compile from Source",local:"rocm-compile",headingTag:"h3"}}),A=new Ke({props:{id:"rocm-source",options:["Linux","Windows"],$$slots:{default:[$n]},$$scope:{ctx:h}}}),Wt=new R({props:{title:"Preview Wheels",local:"preview-wheels",headingTag:"h2"}}),P=new Ke({props:{id:"OS",options:["Linux","Windows","macOS"],$$slots:{default:[Un]},$$scope:{ctx:h}}}),At=new on({props:{source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/main/docs/source/installation.mdx"}}),{c(){l=g("meta"),u=p(),e=g("p"),o=p(),C(r.$$.fragment),f=p(),C(m.$$.fragment),c=p(),a=g("p"),a.innerHTML=b,G=p(),T=g("p"),T.textContent=_,I=p(),C(k.$$.fragment),N=p(),J=g("ul"),J.innerHTML=j,zt=p(),C(S.$$.fragment),Qt=p(),X=g("p"),X.innerHTML=sl,Ft=p(),V=g("ul"),V.innerHTML=il,Dt=p(),C(Y.$$.fragment),Et=p(),z=g("p"),z.innerHTML=al,Ot=p(),Q=g("table"),Q.innerHTML=ol,qt=p(),C(F.$$.fragment),Kt=p(),D=g("p"),D.textContent=rl,te=p(),E=g("p"),E.innerHTML=ml,ee=p(),O=g("table"),O.innerHTML=pl,le=p(),q=g("p"),q.textContent=dl,ne=p(),K=g("p"),K.innerHTML=ul,se=p(),C(tt.$$.fragment),ie=p(),Z=g("blockquote"),Z.innerHTML=fl,ae=p(),C(et.$$.fragment),oe=p(),W=g("blockquote"),W.innerHTML=cl,re=p(),lt=g("p"),lt.innerHTML=hl,me=p(),C(B.$$.fragment),pe=p(),C(nt.$$.fragment),de=p(),st=g("ul"),st.innerHTML=bl,ue=p(),C(it.$$.fragment),fe=p(),at=g("p"),at.textContent=gl,ce=p(),ot=g("p"),ot.innerHTML=Ml,he=p(),rt=g("table"),rt.innerHTML=yl,be=p(),mt=g("p"),mt.textContent=$l,ge=p(),pt=g("p"),pt.innerHTML=wl,Me=p(),C(dt.$$.fragment),ye=p(),C(ut.$$.fragment),$e=p(),ft=g("ul"),ft.innerHTML=Tl,we=p(),C(ct.$$.fragment),Te=p(),ht=g("p"),ht.innerHTML=Cl,Ce=p(),C(bt.$$.fragment),Ue=p(),C(gt.$$.fragment),ve=p(),C(Mt.$$.fragment),xe=p(),yt=g("p"),yt.textContent=Ul,Je=p(),$t=g("p"),$t.innerHTML=vl,Ge=p(),wt=g("table"),wt.innerHTML=xl,Re=p(),Tt=g("p"),Tt.textContent=Jl,_e=p(),Ct=g("p"),Ct.innerHTML=Gl,je=p(),C(Ut.$$.fragment),Le=p(),C(vt.$$.fragment),Ie=p(),xt=g("p"),xt.innerHTML=Rl,ke=p(),C(Jt.$$.fragment),Ne=p(),C(Gt.$$.fragment),He=p(),Rt=g("ul"),Rt.innerHTML=_l,Ze=p(),C(_t.$$.fragment),We=p(),jt=g("p"),jt.textContent=jl,Be=p(),Lt=g("p"),Lt.innerHTML=Ll,Ae=p(),It=g("table"),It.innerHTML=Il,Pe=p(),kt=g("p"),kt.innerHTML=kl,Se=p(),C(Nt.$$.fragment),Xe=p(),C(Ht.$$.fragment),Ve=p(),Zt=g("p"),Zt.innerHTML=Nl,Ye=p(),C(A.$$.fragment),ze=p(),C(Wt.$$.fragment),Qe=p(),Bt=g("p"),Bt.innerHTML=Hl,Fe=p(),C(P.$$.fragment),De=p(),C(At.$$.fragment),Ee=p(),Xt=g("p"),this.h()},l(t){const s=sn("svelte-u9bgzb",document.head);l=M(s,"META",{name:!0,content:!0}),s.forEach(n),u=d(t),e=M(t,"P",{}),Yt(e).forEach(n),o=d(t),U(r.$$.fragment,t),f=d(t),U(m.$$.fragment,t),c=d(t),a=M(t,"P",{"data-svelte-h":!0}),$(a)!=="svelte-118o68n"&&(a.innerHTML=b),G=d(t),T=M(t,"P",{"data-svelte-h":!0}),$(T)!=="svelte-16zrphu"&&(T.textContent=_),I=d(t),U(k.$$.fragment,t),N=d(t),J=M(t,"UL",{"data-svelte-h":!0}),$(J)!=="svelte-1cxufgb"&&(J.innerHTML=j),zt=d(t),U(S.$$.fragment,t),Qt=d(t),X=M(t,"P",{"data-svelte-h":!0}),$(X)!=="svelte-1jd2hl"&&(X.innerHTML=sl),Ft=d(t),V=M(t,"UL",{"data-svelte-h":!0}),$(V)!=="svelte-ypsghf"&&(V.innerHTML=il),Dt=d(t),U(Y.$$.fragment,t),Et=d(t),z=M(t,"P",{"data-svelte-h":!0}),$(z)!=="svelte-1cwf52b"&&(z.innerHTML=al),Ot=d(t),Q=M(t,"TABLE",{"data-svelte-h":!0}),$(Q)!=="svelte-7ka1gp"&&(Q.innerHTML=ol),qt=d(t),U(F.$$.fragment,t),Kt=d(t),D=M(t,"P",{"data-svelte-h":!0}),$(D)!=="svelte-1f6ncvc"&&(D.textContent=rl),te=d(t),E=M(t,"P",{"data-svelte-h":!0}),$(E)!=="svelte-9wkc2z"&&(E.innerHTML=ml),ee=d(t),O=M(t,"TABLE",{"data-svelte-h":!0}),$(O)!=="svelte-1fiphak"&&(O.innerHTML=pl),le=d(t),q=M(t,"P",{"data-svelte-h":!0}),$(q)!=="svelte-8wq6s4"&&(q.textContent=dl),ne=d(t),K=M(t,"P",{"data-svelte-h":!0}),$(K)!=="svelte-49q16t"&&(K.innerHTML=ul),se=d(t),U(tt.$$.fragment,t),ie=d(t),Z=M(t,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),$(Z)!=="svelte-zwu4gi"&&(Z.innerHTML=fl),ae=d(t),U(et.$$.fragment,t),oe=d(t),W=M(t,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),$(W)!=="svelte-v822tl"&&(W.innerHTML=cl),re=d(t),lt=M(t,"P",{"data-svelte-h":!0}),$(lt)!=="svelte-1ovl1gx"&&(lt.innerHTML=hl),me=d(t),U(B.$$.fragment,t),pe=d(t),U(nt.$$.fragment,t),de=d(t),st=M(t,"UL",{"data-svelte-h":!0}),$(st)!=="svelte-5zaimx"&&(st.innerHTML=bl),ue=d(t),U(it.$$.fragment,t),fe=d(t),at=M(t,"P",{"data-svelte-h":!0}),$(at)!=="svelte-1f6ncvc"&&(at.textContent=gl),ce=d(t),ot=M(t,"P",{"data-svelte-h":!0}),$(ot)!=="svelte-9wkc2z"&&(ot.innerHTML=Ml),he=d(t),rt=M(t,"TABLE",{"data-svelte-h":!0}),$(rt)!=="svelte-1biik1x"&&(rt.innerHTML=yl),be=d(t),mt=M(t,"P",{"data-svelte-h":!0}),$(mt)!=="svelte-dxuv01"&&(mt.textContent=$l),ge=d(t),pt=M(t,"P",{"data-svelte-h":!0}),$(pt)!=="svelte-49q16t"&&(pt.innerHTML=wl),Me=d(t),U(dt.$$.fragment,t),ye=d(t),U(ut.$$.fragment,t),$e=d(t),ft=M(t,"UL",{"data-svelte-h":!0}),$(ft)!=="svelte-1ol1nb2"&&(ft.innerHTML=Tl),we=d(t),U(ct.$$.fragment,t),Te=d(t),ht=M(t,"P",{"data-svelte-h":!0}),$(ht)!=="svelte-49q16t"&&(ht.innerHTML=Cl),Ce=d(t),U(bt.$$.fragment,t),Ue=d(t),U(gt.$$.fragment,t),ve=d(t),U(Mt.$$.fragment,t),xe=d(t),yt=M(t,"P",{"data-svelte-h":!0}),$(yt)!=="svelte-1f6ncvc"&&(yt.textContent=Ul),Je=d(t),$t=M(t,"P",{"data-svelte-h":!0}),$($t)!=="svelte-9wkc2z"&&($t.innerHTML=vl),Ge=d(t),wt=M(t,"TABLE",{"data-svelte-h":!0}),$(wt)!=="svelte-grs6yy"&&(wt.innerHTML=xl),Re=d(t),Tt=M(t,"P",{"data-svelte-h":!0}),$(Tt)!=="svelte-8wq6s4"&&(Tt.textContent=Jl),_e=d(t),Ct=M(t,"P",{"data-svelte-h":!0}),$(Ct)!=="svelte-49q16t"&&(Ct.innerHTML=Gl),je=d(t),U(Ut.$$.fragment,t),Le=d(t),U(vt.$$.fragment,t),Ie=d(t),xt=M(t,"P",{"data-svelte-h":!0}),$(xt)!=="svelte-am5kx9"&&(xt.innerHTML=Rl),ke=d(t),U(Jt.$$.fragment,t),Ne=d(t),U(Gt.$$.fragment,t),He=d(t),Rt=M(t,"UL",{"data-svelte-h":!0}),$(Rt)!=="svelte-toq1xs"&&(Rt.innerHTML=_l),Ze=d(t),U(_t.$$.fragment,t),We=d(t),jt=M(t,"P",{"data-svelte-h":!0}),$(jt)!=="svelte-1f6ncvc"&&(jt.textContent=jl),Be=d(t),Lt=M(t,"P",{"data-svelte-h":!0}),$(Lt)!=="svelte-1fyy1ua"&&(Lt.innerHTML=Ll),Ae=d(t),It=M(t,"TABLE",{"data-svelte-h":!0}),$(It)!=="svelte-1lvuxxg"&&(It.innerHTML=Il),Pe=d(t),kt=M(t,"P",{"data-svelte-h":!0}),$(kt)!=="svelte-49q16t"&&(kt.innerHTML=kl),Se=d(t),U(Nt.$$.fragment,t),Xe=d(t),U(Ht.$$.fragment,t),Ve=d(t),Zt=M(t,"P",{"data-svelte-h":!0}),$(Zt)!=="svelte-1vr3y6m"&&(Zt.innerHTML=Nl),Ye=d(t),U(A.$$.fragment,t),ze=d(t),U(Wt.$$.fragment,t),Qe=d(t),Bt=M(t,"P",{"data-svelte-h":!0}),$(Bt)!=="svelte-1fhfips"&&(Bt.innerHTML=Hl),Fe=d(t),U(P.$$.fragment,t),De=d(t),U(At.$$.fragment,t),Ee=d(t),Xt=M(t,"P",{}),Yt(Xt).forEach(n),this.h()},h(){H(l,"name","hf:doc:metadata"),H(l,"content",xn),H(Z,"class","warning"),H(W,"class","tip")},m(t,s){tl(document.head,l),i(t,u,s),i(t,e,s),i(t,o,s),v(r,t,s),i(t,f,s),v(m,t,s),i(t,c,s),i(t,a,s),i(t,G,s),i(t,T,s),i(t,I,s),v(k,t,s),i(t,N,s),i(t,J,s),i(t,zt,s),v(S,t,s),i(t,Qt,s),i(t,X,s),i(t,Ft,s),i(t,V,s),i(t,Dt,s),v(Y,t,s),i(t,Et,s),i(t,z,s),i(t,Ot,s),i(t,Q,s),i(t,qt,s),v(F,t,s),i(t,Kt,s),i(t,D,s),i(t,te,s),i(t,E,s),i(t,ee,s),i(t,O,s),i(t,le,s),i(t,q,s),i(t,ne,s),i(t,K,s),i(t,se,s),v(tt,t,s),i(t,ie,s),i(t,Z,s),i(t,ae,s),v(et,t,s),i(t,oe,s),i(t,W,s),i(t,re,s),i(t,lt,s),i(t,me,s),v(B,t,s),i(t,pe,s),v(nt,t,s),i(t,de,s),i(t,st,s),i(t,ue,s),v(it,t,s),i(t,fe,s),i(t,at,s),i(t,ce,s),i(t,ot,s),i(t,he,s),i(t,rt,s),i(t,be,s),i(t,mt,s),i(t,ge,s),i(t,pt,s),i(t,Me,s),v(dt,t,s),i(t,ye,s),v(ut,t,s),i(t,$e,s),i(t,ft,s),i(t,we,s),v(ct,t,s),i(t,Te,s),i(t,ht,s),i(t,Ce,s),v(bt,t,s),i(t,Ue,s),v(gt,t,s),i(t,ve,s),v(Mt,t,s),i(t,xe,s),i(t,yt,s),i(t,Je,s),i(t,$t,s),i(t,Ge,s),i(t,wt,s),i(t,Re,s),i(t,Tt,s),i(t,_e,s),i(t,Ct,s),i(t,je,s),v(Ut,t,s),i(t,Le,s),v(vt,t,s),i(t,Ie,s),i(t,xt,s),i(t,ke,s),v(Jt,t,s),i(t,Ne,s),v(Gt,t,s),i(t,He,s),i(t,Rt,s),i(t,Ze,s),v(_t,t,s),i(t,We,s),i(t,jt,s),i(t,Be,s),i(t,Lt,s),i(t,Ae,s),i(t,It,s),i(t,Pe,s),i(t,kt,s),i(t,Se,s),v(Nt,t,s),i(t,Xe,s),v(Ht,t,s),i(t,Ve,s),i(t,Zt,s),i(t,Ye,s),v(A,t,s),i(t,ze,s),v(Wt,t,s),i(t,Qe,s),i(t,Bt,s),i(t,Fe,s),v(P,t,s),i(t,De,s),v(At,t,s),i(t,Ee,s),i(t,Xt,s),Oe=!0},p(t,[s]){const Zl={};s&2&&(Zl.$$scope={dirty:s,ctx:t}),B.$set(Zl);const Wl={};s&2&&(Wl.$$scope={dirty:s,ctx:t}),A.$set(Wl);const Bl={};s&2&&(Bl.$$scope={dirty:s,ctx:t}),P.$set(Bl)},i(t){Oe||(y(r.$$.fragment,t),y(m.$$.fragment,t),y(k.$$.fragment,t),y(S.$$.fragment,t),y(Y.$$.fragment,t),y(F.$$.fragment,t),y(tt.$$.fragment,t),y(et.$$.fragment,t),y(B.$$.fragment,t),y(nt.$$.fragment,t),y(it.$$.fragment,t),y(dt.$$.fragment,t),y(ut.$$.fragment,t),y(ct.$$.fragment,t),y(bt.$$.fragment,t),y(gt.$$.fragment,t),y(Mt.$$.fragment,t),y(Ut.$$.fragment,t),y(vt.$$.fragment,t),y(Jt.$$.fragment,t),y(Gt.$$.fragment,t),y(_t.$$.fragment,t),y(Nt.$$.fragment,t),y(Ht.$$.fragment,t),y(A.$$.fragment,t),y(Wt.$$.fragment,t),y(P.$$.fragment,t),y(At.$$.fragment,t),Oe=!0)},o(t){w(r.$$.fragment,t),w(m.$$.fragment,t),w(k.$$.fragment,t),w(S.$$.fragment,t),w(Y.$$.fragment,t),w(F.$$.fragment,t),w(tt.$$.fragment,t),w(et.$$.fragment,t),w(B.$$.fragment,t),w(nt.$$.fragment,t),w(it.$$.fragment,t),w(dt.$$.fragment,t),w(ut.$$.fragment,t),w(ct.$$.fragment,t),w(bt.$$.fragment,t),w(gt.$$.fragment,t),w(Mt.$$.fragment,t),w(Ut.$$.fragment,t),w(vt.$$.fragment,t),w(Jt.$$.fragment,t),w(Gt.$$.fragment,t),w(_t.$$.fragment,t),w(Nt.$$.fragment,t),w(Ht.$$.fragment,t),w(A.$$.fragment,t),w(Wt.$$.fragment,t),w(P.$$.fragment,t),w(At.$$.fragment,t),Oe=!1},d(t){t&&(n(u),n(e),n(o),n(f),n(c),n(a),n(G),n(T),n(I),n(N),n(J),n(zt),n(Qt),n(X),n(Ft),n(V),n(Dt),n(Et),n(z),n(Ot),n(Q),n(qt),n(Kt),n(D),n(te),n(E),n(ee),n(O),n(le),n(q),n(ne),n(K),n(se),n(ie),n(Z),n(ae),n(oe),n(W),n(re),n(lt),n(me),n(pe),n(de),n(st),n(ue),n(fe),n(at),n(ce),n(ot),n(he),n(rt),n(be),n(mt),n(ge),n(pt),n(Me),n(ye),n($e),n(ft),n(we),n(Te),n(ht),n(Ce),n(Ue),n(ve),n(xe),n(yt),n(Je),n($t),n(Ge),n(wt),n(Re),n(Tt),n(_e),n(Ct),n(je),n(Le),n(Ie),n(xt),n(ke),n(Ne),n(He),n(Rt),n(Ze),n(We),n(jt),n(Be),n(Lt),n(Ae),n(It),n(Pe),n(kt),n(Se),n(Xe),n(Ve),n(Zt),n(Ye),n(ze),n(Qe),n(Bt),n(Fe),n(De),n(Ee),n(Xt)),n(l),x(r,t),x(m,t),x(k,t),x(S,t),x(Y,t),x(F,t),x(tt,t),x(et,t),x(B,t),x(nt,t),x(it,t),x(dt,t),x(ut,t),x(ct,t),x(bt,t),x(gt,t),x(Mt,t),x(Ut,t),x(vt,t),x(Jt,t),x(Gt,t),x(_t,t),x(Nt,t),x(Ht,t),x(A,t),x(Wt,t),x(P,t),x(At,t)}}}const xn='{"title":"Installation Guide","local":"installation-guide","sections":[{"title":"Table of Contents","local":"table-of-contents","sections":[],"depth":2},{"title":"System Requirements","local":"requirements","sections":[],"depth":2},{"title":"NVIDIA CUDA","local":"cuda","sections":[{"title":"Installation via PyPI","local":"cuda-pip","sections":[],"depth":3},{"title":"Compile from Source","local":"cuda-compile","sections":[],"depth":3}],"depth":2},{"title":"Intel XPU","local":"xpu","sections":[{"title":"Installation via PyPI","local":"xpu-pip","sections":[],"depth":3}],"depth":2},{"title":"Intel Gaudi","local":"gaudi","sections":[{"title":"Installation from PyPI","local":"gaudi-pip","sections":[],"depth":3}],"depth":2},{"title":"CPU","local":"cpu","sections":[{"title":"Installation from PyPI","local":"cpu-pip","sections":[],"depth":3},{"title":"Compile from Source","local":"cpu-compile","sections":[],"depth":3}],"depth":2},{"title":"AMD ROCm (Preview)","local":"rocm","sections":[{"title":"Installation from PyPI","local":"rocm-pip","sections":[],"depth":3},{"title":"Compile from Source","local":"rocm-compile","sections":[],"depth":3}],"depth":2},{"title":"Preview Wheels","local":"preview-wheels","sections":[],"depth":2}],"depth":1}';function Jn(h){return El(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class kn extends ll{constructor(l){super(),nl(this,l,Jn,vn,el,{})}}export{kn as component};

Xet Storage Details

Size:
47 kB
·
Xet hash:
d666d51354741253516d198a5b66cea885695bb0199b2a0debffa1fd2085cb5c

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