Buckets:

rtrm's picture
download
raw
27.6 kB
import{s as Qt,c as he,u as ye,g as be,d as Me,e as Ue,f as St,o as Ce,n as Y}from"../chunks/scheduler.852ec091.js";import{S as Xt,i as Yt,g as U,s as c,h as C,j as ht,f as s,c as $,k as X,a as i,d as v,t as x,z as ge,m as we,n as _e,y as It,B as Te,o as ve,e as pe,p as xe,b as Re,r as R,A as ke,u as k,x as _,v as j,w as L}from"../chunks/index.28275fd3.js";import{T as ct}from"../chunks/Tip.9f398c59.js";import{C as G}from"../chunks/CodeBlock.c3366071.js";import{H as dt,E as je}from"../chunks/EditOnGithub.582011f0.js";import{e as ue}from"../chunks/each.e59479a4.js";import{w as Le}from"../chunks/index.268e315a.js";const $t=Le({});function Ae(u,e){const p=new URL(window.location.href),l=new URLSearchParams(p.search);l.set(u,e),p.search=l.toString(),history.replaceState(null,"",p.toString())}function Ee(u){const e=new URL(window.location.href);return new URLSearchParams(e.search).get(u)}function me(u,e,p){const l=u.slice();return l[7]=e[p],l}function de(u){let e,p=u[7]+"",l,n,o,f,y;function d(){return u[6](u[7])}return{c(){e=U("div"),l=we(p),n=c(),this.h()},l(a){e=C(a,"DIV",{class:!0});var m=ht(e);l=_e(m,p),n=$(m),m.forEach(s),this.h()},h(){X(e,"class",o="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd "+(u[2][u[0]]===u[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,m){i(a,e,m),It(e,l),It(e,n),f||(y=Te(e,"click",d),f=!0)},p(a,m){u=a,m&2&&p!==(p=u[7]+"")&&ve(l,p),m&7&&o!==(o="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd "+(u[2][u[0]]===u[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"))&&X(e,"class",o)},d(a){a&&s(e),f=!1,y()}}}function Je(u){let e,p,l,n,o=ue(u[1]),f=[];for(let a=0;a<o.length;a+=1)f[a]=de(me(u,o,a));const y=u[5].default,d=he(y,u,u[4],null);return{c(){e=U("div");for(let a=0;a<f.length;a+=1)f[a].c();p=c(),l=U("div"),d&&d.c(),this.h()},l(a){e=C(a,"DIV",{class:!0});var m=ht(e);for(let w=0;w<f.length;w+=1)f[w].l(m);m.forEach(s),p=$(a),l=C(a,"DIV",{class:!0});var g=ht(l);d&&d.l(g),g.forEach(s),this.h()},h(){X(e,"class","flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"),X(l,"class","language-select")},m(a,m){i(a,e,m);for(let g=0;g<f.length;g+=1)f[g]&&f[g].m(e,null);i(a,p,m),i(a,l,m),d&&d.m(l,null),n=!0},p(a,[m]){if(m&15){o=ue(a[1]);let g;for(g=0;g<o.length;g+=1){const w=me(a,o,g);f[g]?f[g].p(w,m):(f[g]=de(w),f[g].c(),f[g].m(e,null))}for(;g<f.length;g+=1)f[g].d(1);f.length=o.length}d&&d.p&&(!n||m&16)&&ye(d,y,a,a[4],n?Me(y,a[4],m,null):be(a[4]),null)},i(a){n||(v(d,a),n=!0)},o(a){x(d,a),n=!1},d(a){a&&(s(e),s(p),s(l)),ge(f,a),d&&d.d(a)}}}function He(u,e,p){let l;Ue(u,$t,m=>p(2,l=m));let{$$slots:n={},$$scope:o}=e,{id:f}=e,{options:y}=e;St($t,l[f]=y[0],l);function d(m){St($t,l[f]=m,l),Ae(f,m)}Ce(()=>{const m=Ee(f);m&&y.includes(m)&&St($t,l[f]=m,l)});const a=m=>d(m);return u.$$set=m=>{"id"in m&&p(0,f=m.id),"options"in m&&p(1,y=m.options),"$$scope"in m&&p(4,o=m.$$scope)},[f,y,l,d,o,n,a]}class ce extends Xt{constructor(e){super(),Yt(this,e,He,Je,Qt,{id:0,options:1})}}function $e(u){let e;const p=u[4].default,l=he(p,u,u[3],null);return{c(){l&&l.c()},l(n){l&&l.l(n)},m(n,o){l&&l.m(n,o),e=!0},p(n,o){l&&l.p&&(!e||o&8)&&ye(l,p,n,n[3],e?Me(p,n[3],o,null):be(n[3]),null)},i(n){e||(v(l,n),e=!0)},o(n){x(l,n),e=!1},d(n){l&&l.d(n)}}}function Ve(u){let e,p,l=u[2][u[0]]===u[1]&&$e(u);return{c(){l&&l.c(),e=pe()},l(n){l&&l.l(n),e=pe()},m(n,o){l&&l.m(n,o),i(n,e,o),p=!0},p(n,[o]){n[2][n[0]]===n[1]?l?(l.p(n,o),o&7&&v(l,1)):(l=$e(n),l.c(),v(l,1),l.m(e.parentNode,e)):l&&(xe(),x(l,1,1,()=>{l=null}),Re())},i(n){p||(v(l),p=!0)},o(n){x(l),p=!1},d(n){n&&s(e),l&&l.d(n)}}}function Ge(u,e,p){let l;Ue(u,$t,d=>p(2,l=d));let{$$slots:n={},$$scope:o}=e,{id:f}=e,{option:y}=e;return u.$$set=d=>{"id"in d&&p(0,f=d.id),"option"in d&&p(1,y=d.option),"$$scope"in d&&p(3,o=d.$$scope)},[f,y,l,o,n]}class Wt extends Xt{constructor(e){super(),Yt(this,e,Ge,Ve,Qt,{id:0,option:1})}}function De(u){let e,p='MacOS support is still a work in progress! Subscribe to this <a href="https://github.com/TimDettmers/bitsandbytes/issues/1020" rel="nofollow">issue</a> to get notified about discussions and to track the integration progress.';return{c(){e=U("p"),e.innerHTML=p},l(l){e=C(l,"P",{"data-svelte-h":!0}),_(e)!=="svelte-9rmqp2"&&(e.innerHTML=p)},m(l,n){i(l,e,n)},p:Y,d(l){l&&s(e)}}}function Be(u){let e,p="bitsandbytes &gt;= 0.39.1 no longer includes Kepler binaries in pip installations. This requires manual compilation, and you should follow the general steps and use <code>cuda11x_nomatmul_kepler</code> for Kepler-targeted compilation.";return{c(){e=U("p"),e.innerHTML=p},l(l){e=C(l,"P",{"data-svelte-h":!0}),_(e)!=="svelte-13h63kz"&&(e.innerHTML=p)},m(l,n){i(l,e,n)},p:Y,d(l){l&&s(e)}}}function Ne(u){let e,p="If you have multiple versions of CUDA installed or installed it in a non-standard location, please refer to CMake CUDA documentation for how to configure the CUDA compiler.";return{c(){e=U("p"),e.textContent=p},l(l){e=C(l,"P",{"data-svelte-h":!0}),_(e)!=="svelte-raeog1"&&(e.textContent=p)},m(l,n){i(l,e,n)},p:Y,d(l){l&&s(e)}}}function Pe(u){let e,p="To compile from source, you need CMake &gt;= <strong>3.22.1</strong> and Python &gt;= <strong>3.8</strong> installed. Make sure you have a compiler installed to compile C++ (gcc, make, headers, etc.). For example, to install a compiler and CMake on Ubuntu:",l,n,o,f,y='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 from NVIDIA. The current expected CUDA Toolkit version is <strong>11.1+</strong> and it is recommended to install <strong>GCC &gt;= 7.3</strong> and required to have at least <strong>GCC &gt;= 6</strong>.',d,a,m="Refer to the following table if you’re using another CUDA Toolkit version.",g,w,J="<thead><tr><th>CUDA Toolkit</th> <th>GCC</th></tr></thead> <tbody><tr><td>&gt;= 11.4.1</td> <td>&gt;= 11</td></tr> <tr><td>&gt;= 12.0</td> <td>&gt;= 12</td></tr> <tr><td>&gt;= 12.4</td> <td>&gt;= 13</td></tr></tbody>",M,T,D="Now to install the bitsandbytes package from source, run the following commands:",V,b,E,H,F;return n=new G({props:{code:"YXB0LWdldCUyMGluc3RhbGwlMjAteSUyMGJ1aWxkLWVzc2VudGlhbCUyMGNtYWtl",highlighted:"apt-get install -y build-essential cmake",wrap:!1}}),b=new G({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZUaW1EZXR0bWVycyUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQXBpcCUyMGluc3RhbGwlMjAtciUyMHJlcXVpcmVtZW50cy1kZXYudHh0JTBBY21ha2UlMjAtRENPTVBVVEVfQkFDS0VORCUzRGN1ZGElMjAtUyUyMC4lMEFtYWtlJTBBcGlwJTIwaW5zdGFsbCUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/TimDettmers/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
pip install -r requirements-dev.txt
cmake -DCOMPUTE_BACKEND=cuda -S .
make
pip install .`,wrap:!1}}),H=new ct({props:{warning:!1,$$slots:{default:[Ne]},$$scope:{ctx:u}}}),{c(){e=U("p"),e.innerHTML=p,l=c(),R(n.$$.fragment),o=c(),f=U("p"),f.innerHTML=y,d=c(),a=U("p"),a.textContent=m,g=c(),w=U("table"),w.innerHTML=J,M=c(),T=U("p"),T.textContent=D,V=c(),R(b.$$.fragment),E=c(),R(H.$$.fragment)},l(h){e=C(h,"P",{"data-svelte-h":!0}),_(e)!=="svelte-29yf67"&&(e.innerHTML=p),l=$(h),k(n.$$.fragment,h),o=$(h),f=C(h,"P",{"data-svelte-h":!0}),_(f)!=="svelte-gmjw5q"&&(f.innerHTML=y),d=$(h),a=C(h,"P",{"data-svelte-h":!0}),_(a)!=="svelte-1agbdv5"&&(a.textContent=m),g=$(h),w=C(h,"TABLE",{"data-svelte-h":!0}),_(w)!=="svelte-1nj1xe4"&&(w.innerHTML=J),M=$(h),T=C(h,"P",{"data-svelte-h":!0}),_(T)!=="svelte-1fitvy1"&&(T.textContent=D),V=$(h),k(b.$$.fragment,h),E=$(h),k(H.$$.fragment,h)},m(h,A){i(h,e,A),i(h,l,A),j(n,h,A),i(h,o,A),i(h,f,A),i(h,d,A),i(h,a,A),i(h,g,A),i(h,w,A),i(h,M,A),i(h,T,A),i(h,V,A),j(b,h,A),i(h,E,A),j(H,h,A),F=!0},p(h,A){const ut={};A&2&&(ut.$$scope={dirty:A,ctx:h}),H.$set(ut)},i(h){F||(v(n.$$.fragment,h),v(b.$$.fragment,h),v(H.$$.fragment,h),F=!0)},o(h){x(n.$$.fragment,h),x(b.$$.fragment,h),x(H.$$.fragment,h),F=!1},d(h){h&&(s(e),s(l),s(o),s(f),s(d),s(a),s(g),s(w),s(M),s(T),s(V),s(E)),L(n,h),L(b,h),L(H,h)}}}function We(u){let e,p="Windows systems require Visual Studio with C++ support as well as an installation of the CUDA SDK.",l,n,o='To compile from source, you need CMake &gt;= <strong>3.22.1</strong> and Python &gt;= <strong>3.8</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.',f,y,d="Refer to the following table if you’re using another CUDA Toolkit version.",a,m,g="<thead><tr><th>CUDA Toolkit</th> <th>MSVC</th></tr></thead> <tbody><tr><td>&gt;= 11.6</td> <td>19.30+ (VS2022)</td></tr></tbody>",w,J,M,T,D='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.',V;return J=new G({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZUaW1EZXR0bWVycyUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQXBpcCUyMGluc3RhbGwlMjAtciUyMHJlcXVpcmVtZW50cy1kZXYudHh0JTBBY21ha2UlMjAtRENPTVBVVEVfQkFDS0VORCUzRGN1ZGElMjAtUyUyMC4lMEFjbWFrZSUyMC0tYnVpbGQlMjAuJTIwLS1jb25maWclMjBSZWxlYXNlJTBBcHl0aG9uJTIwLW0lMjBidWlsZCUyMC0td2hlZWw=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/TimDettmers/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
pip install -r requirements-dev.txt
cmake -DCOMPUTE_BACKEND=cuda -S .
cmake --build . --config Release
python -m build --wheel`,wrap:!1}}),{c(){e=U("p"),e.textContent=p,l=c(),n=U("p"),n.innerHTML=o,f=c(),y=U("p"),y.textContent=d,a=c(),m=U("table"),m.innerHTML=g,w=c(),R(J.$$.fragment),M=c(),T=U("p"),T.innerHTML=D},l(b){e=C(b,"P",{"data-svelte-h":!0}),_(e)!=="svelte-1ngyk0s"&&(e.textContent=p),l=$(b),n=C(b,"P",{"data-svelte-h":!0}),_(n)!=="svelte-9zb6iz"&&(n.innerHTML=o),f=$(b),y=C(b,"P",{"data-svelte-h":!0}),_(y)!=="svelte-1agbdv5"&&(y.textContent=d),a=$(b),m=C(b,"TABLE",{"data-svelte-h":!0}),_(m)!=="svelte-1nj7txn"&&(m.innerHTML=g),w=$(b),k(J.$$.fragment,b),M=$(b),T=C(b,"P",{"data-svelte-h":!0}),_(T)!=="svelte-e0ivb"&&(T.innerHTML=D)},m(b,E){i(b,e,E),i(b,l,E),i(b,n,E),i(b,f,E),i(b,y,E),i(b,a,E),i(b,m,E),i(b,w,E),j(J,b,E),i(b,M,E),i(b,T,E),V=!0},p:Y,i(b){V||(v(J.$$.fragment,b),V=!0)},o(b){x(J.$$.fragment,b),V=!1},d(b){b&&(s(e),s(l),s(n),s(f),s(y),s(a),s(m),s(w),s(M),s(T)),L(J,b)}}}function Se(u){let e,p,l,n;return e=new Wt({props:{id:"source",option:"Linux",$$slots:{default:[Pe]},$$scope:{ctx:u}}}),l=new Wt({props:{id:"source",option:"Windows",$$slots:{default:[We]},$$scope:{ctx:u}}}),{c(){R(e.$$.fragment),p=c(),R(l.$$.fragment)},l(o){k(e.$$.fragment,o),p=$(o),k(l.$$.fragment,o)},m(o,f){j(e,o,f),i(o,p,f),j(l,o,f),n=!0},p(o,f){const y={};f&2&&(y.$$scope={dirty:f,ctx:o}),e.$set(y);const d={};f&2&&(d.$$scope={dirty:f,ctx:o}),l.$set(d)},i(o){n||(v(e.$$.fragment,o),v(l.$$.fragment,o),n=!0)},o(o){x(e.$$.fragment,o),x(l.$$.fragment,o),n=!1},d(o){o&&s(p),L(e,o),L(l,o)}}}function Ie(u){let e,p="It is recommended to add the following lines to the <code>.bashrc</code> file to make them permanent.";return{c(){e=U("p"),e.innerHTML=p},l(l){e=C(l,"P",{"data-svelte-h":!0}),_(e)!=="svelte-143buxs"&&(e.innerHTML=p)},m(l,n){i(l,e,n)},p:Y,d(l){l&&s(e)}}}function Qe(u){let e,p="Intel CPU backend only supports building from source; for now, please follow the instructions below.";return{c(){e=U("p"),e.textContent=p},l(l){e=C(l,"P",{"data-svelte-h":!0}),_(e)!=="svelte-11im0db"&&(e.textContent=p)},m(l,n){i(l,e,n)},p:Y,d(l){l&&s(e)}}}function Xe(u){let e,p="To compile from source, you need CMake &gt;= <strong>3.22.1</strong> and Python &gt;= <strong>3.8</strong> installed. Make sure you have a compiler installed to compile C++ (gcc, make, headers, etc.). For example, to install a compiler and CMake on Ubuntu:",l,n,o,f,y="We recommend installing <strong>GCC &gt;= 11</strong> and have at least <strong>GCC &gt;= 6</strong>.",d,a,m="Now to install the bitsandbytes package from source, run the following commands:",g,w,J;return n=new G({props:{code:"YXB0LWdldCUyMGluc3RhbGwlMjAteSUyMGJ1aWxkLWVzc2VudGlhbCUyMGNtYWtl",highlighted:"apt-get install -y build-essential cmake",wrap:!1}}),w=new G({props:{code:"Z2l0JTIwY2xvbmUlMjAtLWJyYW5jaCUyMG11bHRpLWJhY2tlbmQtcmVmYWN0b3IlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZUaW1EZXR0bWVycyUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQXBpcCUyMGluc3RhbGwlMjAtciUyMHJlcXVpcmVtZW50cy1kZXYudHh0JTBBcGlwJTIwaW5zdGFsbCUyMGludGVsX2V4dGVuc2lvbl9mb3JfcHl0b3JjaCUwQWNtYWtlJTIwLURDT01QVVRFX0JBQ0tFTkQlM0RjcHUlMjAtUyUyMC4lMEFtYWtlJTBBcGlwJTIwaW5zdGFsbCUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> --branch multi-backend-refactor https://github.com/TimDettmers/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
pip install -r requirements-dev.txt
pip install intel_extension_for_pytorch
cmake -DCOMPUTE_BACKEND=cpu -S .
make
pip install .`,wrap:!1}}),{c(){e=U("p"),e.innerHTML=p,l=c(),R(n.$$.fragment),o=c(),f=U("p"),f.innerHTML=y,d=c(),a=U("p"),a.textContent=m,g=c(),R(w.$$.fragment)},l(M){e=C(M,"P",{"data-svelte-h":!0}),_(e)!=="svelte-29yf67"&&(e.innerHTML=p),l=$(M),k(n.$$.fragment,M),o=$(M),f=C(M,"P",{"data-svelte-h":!0}),_(f)!=="svelte-o9dexa"&&(f.innerHTML=y),d=$(M),a=C(M,"P",{"data-svelte-h":!0}),_(a)!=="svelte-1fitvy1"&&(a.textContent=m),g=$(M),k(w.$$.fragment,M)},m(M,T){i(M,e,T),i(M,l,T),j(n,M,T),i(M,o,T),i(M,f,T),i(M,d,T),i(M,a,T),i(M,g,T),j(w,M,T),J=!0},p:Y,i(M){J||(v(n.$$.fragment,M),v(w.$$.fragment,M),J=!0)},o(M){x(n.$$.fragment,M),x(w.$$.fragment,M),J=!1},d(M){M&&(s(e),s(l),s(o),s(f),s(d),s(a),s(g)),L(n,M),L(w,M)}}}function Ye(u){let e,p="Windows systems require Visual Studio with C++ support.",l,n,o="To compile from source, you need CMake &gt;= <strong>3.22.1</strong> and Python &gt;= <strong>3.8</strong> installed.",f,y,d;return y=new G({props:{code:"Z2l0JTIwY2xvbmUlMjAtLWJyYW5jaCUyMG11bHRpLWJhY2tlbmQtcmVmYWN0b3IlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZUaW1EZXR0bWVycyUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQXBpcCUyMGluc3RhbGwlMjAtciUyMHJlcXVpcmVtZW50cy1kZXYudHh0JTBBY21ha2UlMjAtRENPTVBVVEVfQkFDS0VORCUzRGNwdSUyMC1TJTIwLiUwQWNtYWtlJTIwLS1idWlsZCUyMC4lMjAtLWNvbmZpZyUyMFJlbGVhc2UlMEFwaXAlMjBpbnN0YWxsJTIwLg==",highlighted:`git <span class="hljs-built_in">clone</span> --branch multi-backend-refactor https://github.com/TimDettmers/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
pip install -r requirements-dev.txt
cmake -DCOMPUTE_BACKEND=cpu -S .
cmake --build . --config Release
pip install .`,wrap:!1}}),{c(){e=U("p"),e.textContent=p,l=c(),n=U("p"),n.innerHTML=o,f=c(),R(y.$$.fragment)},l(a){e=C(a,"P",{"data-svelte-h":!0}),_(e)!=="svelte-7wy2zc"&&(e.textContent=p),l=$(a),n=C(a,"P",{"data-svelte-h":!0}),_(n)!=="svelte-4f6u0t"&&(n.innerHTML=o),f=$(a),k(y.$$.fragment,a)},m(a,m){i(a,e,m),i(a,l,m),i(a,n,m),i(a,f,m),j(y,a,m),d=!0},p:Y,i(a){d||(v(y.$$.fragment,a),d=!0)},o(a){x(y.$$.fragment,a),d=!1},d(a){a&&(s(e),s(l),s(n),s(f)),L(y,a)}}}function Fe(u){let e,p,l,n;return e=new Wt({props:{id:"source",option:"Linux",$$slots:{default:[Xe]},$$scope:{ctx:u}}}),l=new Wt({props:{id:"source",option:"Windows",$$slots:{default:[Ye]},$$scope:{ctx:u}}}),{c(){R(e.$$.fragment),p=c(),R(l.$$.fragment)},l(o){k(e.$$.fragment,o),p=$(o),k(l.$$.fragment,o)},m(o,f){j(e,o,f),i(o,p,f),j(l,o,f),n=!0},p(o,f){const y={};f&2&&(y.$$scope={dirty:f,ctx:o}),e.$set(y);const d={};f&2&&(d.$$scope={dirty:f,ctx:o}),l.$set(d)},i(o){n||(v(e.$$.fragment,o),v(l.$$.fragment,o),n=!0)},o(o){x(e.$$.fragment,o),x(l.$$.fragment,o),n=!1},d(o){o&&s(p),L(e,o),L(l,o)}}}function Ze(u){let e,p,l,n,o,f,y,d,a,m="bitsandbytes is only supported on CUDA GPUs for CUDA versions <strong>11.0 - 12.3</strong>.",g,w,J="The latest version of bitsandbytes (v0.43.0) builds on:",M,T,D="<thead><tr><th>OS</th> <th>CUDA</th> <th>Compiler</th></tr></thead> <tbody><tr><td>Linux</td> <td>11.7 - 12.3</td> <td>GCC 11.4</td></tr> <tr><td></td> <td>12.4+</td> <td>GCC 13.2</td></tr> <tr><td>Windows</td> <td>11.7 - 12.4</td> <td>MSVC 19.38+ (VS2022 17.8.0+)</td></tr></tbody>",V,b,E,H,F="For Linux systems, make sure your hardware meets the following requirements to use bitsandbytes features.",h,A,ut="<thead><tr><th><strong>Feature</strong></th> <th><strong>Hardware requirement</strong></th></tr></thead> <tbody><tr><td>LLM.int8()</td> <td>NVIDIA Turing (RTX 20 series, T4) or Ampere (RTX 30 series, A4-A100) GPUs</td></tr> <tr><td>8-bit optimizers/quantization</td> <td>NVIDIA Kepler (GTX 780 or newer)</td></tr></tbody>",yt,B,bt,Z,Ft="To install from PyPI.",Mt,z,Ut,O,Ct,q,Zt="For Linux and Windows systems, you can compile bitsandbytes from source. Installing from source allows for more build options with different CMake configurations.",gt,N,wt,K,_t,tt,zt="Some bitsandbytes features may need a newer CUDA version than the one currently supported by PyTorch binaries from Conda and pip. In this case, you should follow these instructions to load a precompiled bitsandbytes binary.",Tt,et,Ot="<li>Determine the path of the CUDA version you want to use. Common paths include:</li>",vt,lt,qt="<li><code>/usr/local/cuda</code></li> <li><code>/usr/local/cuda-XX.X</code> where <code>XX.X</code> is the CUDA version number</li>",xt,nt,Kt="Then locally install the CUDA version you need with this script from bitsandbytes:",Rt,st,kt,P,te="<li>Set the environment variables <code>BNB_CUDA_VERSION</code> and <code>LD_LIBRARY_PATH</code> by manually overriding the CUDA version installed by PyTorch.</li>",jt,W,Lt,it,At,ot,ee="For example, to use a local install path:",Et,at,Jt,S,le="<li>Now when you launch bitsandbytes with these environment variables, the PyTorch CUDA version is overridden by the new CUDA version (in this example, version 11.7) and a different bitsandbytes library is loaded.</li>",Ht,rt,Vt,I,Gt,ft,ne="Like CUDA, you can compile bitsandbytes from source for Linux and Windows systems. Installing from source allows for more build options with different CMake configurations.",Dt,Q,Bt,pt,Nt,mt,Pt;return o=new dt({props:{title:"Installation",local:"installation",headingTag:"h1"}}),y=new dt({props:{title:"CUDA",local:"cuda",headingTag:"h2"}}),b=new ct({props:{warning:!1,$$slots:{default:[De]},$$scope:{ctx:u}}}),B=new ct({props:{warning:!0,$$slots:{default:[Be]},$$scope:{ctx:u}}}),z=new G({props:{code:"cGlwJTIwaW5zdGFsbCUyMGJpdHNhbmRieXRlcw==",highlighted:"pip install bitsandbytes",wrap:!1}}),O=new dt({props:{title:"Compile from source",local:"compile-from-source",headingTag:"h3"}}),N=new ce({props:{id:"source",options:["Linux","Windows"],$$slots:{default:[Se]},$$scope:{ctx:u}}}),K=new dt({props:{title:"PyTorch CUDA versions",local:"pytorch-cuda-versions",headingTag:"h3"}}),st=new G({props:{code:"d2dldCUyMGh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRlRpbURldHRtZXJzJTJGYml0c2FuZGJ5dGVzJTJGbWFpbiUyRmluc3RhbGxfY3VkYS5zaCUwQSUyMyUyMFN5bnRheCUyMGN1ZGFfaW5zdGFsbCUyMENVREFfVkVSU0lPTiUyMElOU1RBTExfUFJFRklYJTIwRVhQT1JUX1RPX0JBU0glMEElMjMlMjAlMjAlMjBDVURBX1ZFUlNJT04lMjBpbiUyMCU3QjExMCUyQyUyMDExMSUyQyUyMDExMiUyQyUyMDExMyUyQyUyMDExNCUyQyUyMDExNSUyQyUyMDExNiUyQyUyMDExNyUyQyUyMDExOCUyQyUyMDEyMCUyQyUyMDEyMSUyQyUyMDEyMiUyQyUyMDEyMyUyQyUyMDEyNCU3RCUwQSUyMyUyMCUyMCUyMEVYUE9SVF9UT19CQVNIJTIwaW4lMjAlN0IwJTJDJTIwMSU3RCUyMHdpdGglMjAwJTNERmFsc2UlMjBhbmQlMjAxJTNEVHJ1ZSUwQSUwQSUyMyUyMEZvciUyMGV4YW1wbGUlMkMlMjB0aGUlMjBmb2xsb3dpbmclMjBpbnN0YWxscyUyMENVREElMjAxMS43JTIwdG8lMjB+JTJGbG9jYWwlMkZjdWRhLTExLjclMjBhbmQlMjBleHBvcnRzJTIwdGhlJTIwcGF0aCUyMHRvJTIweW91ciUyMC5iYXNocmMlMEElMEFiYXNoJTIwaW5zdGFsbF9jdWRhLnNoJTIwMTE3JTIwfiUyRmxvY2FsJTIwMQ==",highlighted:`wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh
<span class="hljs-comment"># Syntax cuda_install CUDA_VERSION INSTALL_PREFIX EXPORT_TO_BASH</span>
<span class="hljs-comment"># CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124}</span>
<span class="hljs-comment"># EXPORT_TO_BASH in {0, 1} with 0=False and 1=True</span>
<span class="hljs-comment"># For example, the following installs CUDA 11.7 to ~/local/cuda-11.7 and exports the path to your .bashrc</span>
bash install_cuda.sh 117 ~/local 1`,wrap:!1}}),W=new ct({props:{warning:!1,$$slots:{default:[Ie]},$$scope:{ctx:u}}}),it=new G({props:{code:"ZXhwb3J0JTIwQk5CX0NVREFfVkVSU0lPTiUzRCUzQ1ZFUlNJT04lM0UlMEFleHBvcnQlMjBMRF9MSUJSQVJZX1BBVEglM0QlMjRMRF9MSUJSQVJZX1BBVEglM0ElM0NQQVRIJTNF",highlighted:`<span class="hljs-built_in">export</span> BNB_CUDA_VERSION=&lt;VERSION&gt;
<span class="hljs-built_in">export</span> LD_LIBRARY_PATH=<span class="hljs-variable">$LD_LIBRARY_PATH</span>:&lt;PATH&gt;`,wrap:!1}}),at=new G({props:{code:"ZXhwb3J0JTIwQk5CX0NVREFfVkVSU0lPTiUzRDExNyUwQWV4cG9ydCUyMExEX0xJQlJBUllfUEFUSCUzRCUyNExEX0xJQlJBUllfUEFUSCUzQSUyRmhvbWUlMkZ0aW0lMkZsb2NhbCUyRmN1ZGEtMTEuNw==",highlighted:`<span class="hljs-built_in">export</span> BNB_CUDA_VERSION=117
<span class="hljs-built_in">export</span> LD_LIBRARY_PATH=<span class="hljs-variable">$LD_LIBRARY_PATH</span>:/home/tim/local/cuda-11.7`,wrap:!1}}),rt=new dt({props:{title:"Intel CPU",local:"intel-cpu",headingTag:"h2"}}),I=new ct({props:{warning:!1,$$slots:{default:[Qe]},$$scope:{ctx:u}}}),Q=new ce({props:{id:"source",options:["Linux","Windows"],$$slots:{default:[Fe]},$$scope:{ctx:u}}}),pt=new je({props:{source:"https://github.com/TimDettmers/bitsandbytes/blob/main/docs/source/installation.mdx"}}),{c(){e=U("meta"),p=c(),l=U("p"),n=c(),R(o.$$.fragment),f=c(),R(y.$$.fragment),d=c(),a=U("p"),a.innerHTML=m,g=c(),w=U("p"),w.textContent=J,M=c(),T=U("table"),T.innerHTML=D,V=c(),R(b.$$.fragment),E=c(),H=U("p"),H.textContent=F,h=c(),A=U("table"),A.innerHTML=ut,yt=c(),R(B.$$.fragment),bt=c(),Z=U("p"),Z.textContent=Ft,Mt=c(),R(z.$$.fragment),Ut=c(),R(O.$$.fragment),Ct=c(),q=U("p"),q.textContent=Zt,gt=c(),R(N.$$.fragment),wt=c(),R(K.$$.fragment),_t=c(),tt=U("p"),tt.textContent=zt,Tt=c(),et=U("ol"),et.innerHTML=Ot,vt=c(),lt=U("ul"),lt.innerHTML=qt,xt=c(),nt=U("p"),nt.textContent=Kt,Rt=c(),R(st.$$.fragment),kt=c(),P=U("ol"),P.innerHTML=te,jt=c(),R(W.$$.fragment),Lt=c(),R(it.$$.fragment),At=c(),ot=U("p"),ot.textContent=ee,Et=c(),R(at.$$.fragment),Jt=c(),S=U("ol"),S.innerHTML=le,Ht=c(),R(rt.$$.fragment),Vt=c(),R(I.$$.fragment),Gt=c(),ft=U("p"),ft.textContent=ne,Dt=c(),R(Q.$$.fragment),Bt=c(),R(pt.$$.fragment),Nt=c(),mt=U("p"),this.h()},l(t){const r=ke("svelte-u9bgzb",document.head);e=C(r,"META",{name:!0,content:!0}),r.forEach(s),p=$(t),l=C(t,"P",{}),ht(l).forEach(s),n=$(t),k(o.$$.fragment,t),f=$(t),k(y.$$.fragment,t),d=$(t),a=C(t,"P",{"data-svelte-h":!0}),_(a)!=="svelte-1jag7py"&&(a.innerHTML=m),g=$(t),w=C(t,"P",{"data-svelte-h":!0}),_(w)!=="svelte-1fgbi19"&&(w.textContent=J),M=$(t),T=C(t,"TABLE",{"data-svelte-h":!0}),_(T)!=="svelte-jwkomo"&&(T.innerHTML=D),V=$(t),k(b.$$.fragment,t),E=$(t),H=C(t,"P",{"data-svelte-h":!0}),_(H)!=="svelte-1hx87c4"&&(H.textContent=F),h=$(t),A=C(t,"TABLE",{"data-svelte-h":!0}),_(A)!=="svelte-fkifbv"&&(A.innerHTML=ut),yt=$(t),k(B.$$.fragment,t),bt=$(t),Z=C(t,"P",{"data-svelte-h":!0}),_(Z)!=="svelte-16utcew"&&(Z.textContent=Ft),Mt=$(t),k(z.$$.fragment,t),Ut=$(t),k(O.$$.fragment,t),Ct=$(t),q=C(t,"P",{"data-svelte-h":!0}),_(q)!=="svelte-wtvn8j"&&(q.textContent=Zt),gt=$(t),k(N.$$.fragment,t),wt=$(t),k(K.$$.fragment,t),_t=$(t),tt=C(t,"P",{"data-svelte-h":!0}),_(tt)!=="svelte-n0pdc4"&&(tt.textContent=zt),Tt=$(t),et=C(t,"OL",{"data-svelte-h":!0}),_(et)!=="svelte-w9mxyz"&&(et.innerHTML=Ot),vt=$(t),lt=C(t,"UL",{"data-svelte-h":!0}),_(lt)!=="svelte-r36v8e"&&(lt.innerHTML=qt),xt=$(t),nt=C(t,"P",{"data-svelte-h":!0}),_(nt)!=="svelte-1dhvzk8"&&(nt.textContent=Kt),Rt=$(t),k(st.$$.fragment,t),kt=$(t),P=C(t,"OL",{start:!0,"data-svelte-h":!0}),_(P)!=="svelte-y8zpl2"&&(P.innerHTML=te),jt=$(t),k(W.$$.fragment,t),Lt=$(t),k(it.$$.fragment,t),At=$(t),ot=C(t,"P",{"data-svelte-h":!0}),_(ot)!=="svelte-wx07f3"&&(ot.textContent=ee),Et=$(t),k(at.$$.fragment,t),Jt=$(t),S=C(t,"OL",{start:!0,"data-svelte-h":!0}),_(S)!=="svelte-lfqu8"&&(S.innerHTML=le),Ht=$(t),k(rt.$$.fragment,t),Vt=$(t),k(I.$$.fragment,t),Gt=$(t),ft=C(t,"P",{"data-svelte-h":!0}),_(ft)!=="svelte-1e2wtrl"&&(ft.textContent=ne),Dt=$(t),k(Q.$$.fragment,t),Bt=$(t),k(pt.$$.fragment,t),Nt=$(t),mt=C(t,"P",{}),ht(mt).forEach(s),this.h()},h(){X(e,"name","hf:doc:metadata"),X(e,"content",ze),X(P,"start","2"),X(S,"start","3")},m(t,r){It(document.head,e),i(t,p,r),i(t,l,r),i(t,n,r),j(o,t,r),i(t,f,r),j(y,t,r),i(t,d,r),i(t,a,r),i(t,g,r),i(t,w,r),i(t,M,r),i(t,T,r),i(t,V,r),j(b,t,r),i(t,E,r),i(t,H,r),i(t,h,r),i(t,A,r),i(t,yt,r),j(B,t,r),i(t,bt,r),i(t,Z,r),i(t,Mt,r),j(z,t,r),i(t,Ut,r),j(O,t,r),i(t,Ct,r),i(t,q,r),i(t,gt,r),j(N,t,r),i(t,wt,r),j(K,t,r),i(t,_t,r),i(t,tt,r),i(t,Tt,r),i(t,et,r),i(t,vt,r),i(t,lt,r),i(t,xt,r),i(t,nt,r),i(t,Rt,r),j(st,t,r),i(t,kt,r),i(t,P,r),i(t,jt,r),j(W,t,r),i(t,Lt,r),j(it,t,r),i(t,At,r),i(t,ot,r),i(t,Et,r),j(at,t,r),i(t,Jt,r),i(t,S,r),i(t,Ht,r),j(rt,t,r),i(t,Vt,r),j(I,t,r),i(t,Gt,r),i(t,ft,r),i(t,Dt,r),j(Q,t,r),i(t,Bt,r),j(pt,t,r),i(t,Nt,r),i(t,mt,r),Pt=!0},p(t,[r]){const se={};r&2&&(se.$$scope={dirty:r,ctx:t}),b.$set(se);const ie={};r&2&&(ie.$$scope={dirty:r,ctx:t}),B.$set(ie);const oe={};r&2&&(oe.$$scope={dirty:r,ctx:t}),N.$set(oe);const ae={};r&2&&(ae.$$scope={dirty:r,ctx:t}),W.$set(ae);const re={};r&2&&(re.$$scope={dirty:r,ctx:t}),I.$set(re);const fe={};r&2&&(fe.$$scope={dirty:r,ctx:t}),Q.$set(fe)},i(t){Pt||(v(o.$$.fragment,t),v(y.$$.fragment,t),v(b.$$.fragment,t),v(B.$$.fragment,t),v(z.$$.fragment,t),v(O.$$.fragment,t),v(N.$$.fragment,t),v(K.$$.fragment,t),v(st.$$.fragment,t),v(W.$$.fragment,t),v(it.$$.fragment,t),v(at.$$.fragment,t),v(rt.$$.fragment,t),v(I.$$.fragment,t),v(Q.$$.fragment,t),v(pt.$$.fragment,t),Pt=!0)},o(t){x(o.$$.fragment,t),x(y.$$.fragment,t),x(b.$$.fragment,t),x(B.$$.fragment,t),x(z.$$.fragment,t),x(O.$$.fragment,t),x(N.$$.fragment,t),x(K.$$.fragment,t),x(st.$$.fragment,t),x(W.$$.fragment,t),x(it.$$.fragment,t),x(at.$$.fragment,t),x(rt.$$.fragment,t),x(I.$$.fragment,t),x(Q.$$.fragment,t),x(pt.$$.fragment,t),Pt=!1},d(t){t&&(s(p),s(l),s(n),s(f),s(d),s(a),s(g),s(w),s(M),s(T),s(V),s(E),s(H),s(h),s(A),s(yt),s(bt),s(Z),s(Mt),s(Ut),s(Ct),s(q),s(gt),s(wt),s(_t),s(tt),s(Tt),s(et),s(vt),s(lt),s(xt),s(nt),s(Rt),s(kt),s(P),s(jt),s(Lt),s(At),s(ot),s(Et),s(Jt),s(S),s(Ht),s(Vt),s(Gt),s(ft),s(Dt),s(Bt),s(Nt),s(mt)),s(e),L(o,t),L(y,t),L(b,t),L(B,t),L(z,t),L(O,t),L(N,t),L(K,t),L(st,t),L(W,t),L(it,t),L(at,t),L(rt,t),L(I,t),L(Q,t),L(pt,t)}}}const ze='{"title":"Installation","local":"installation","sections":[{"title":"CUDA","local":"cuda","sections":[{"title":"Compile from source","local":"compile-from-source","sections":[],"depth":3},{"title":"PyTorch CUDA versions","local":"pytorch-cuda-versions","sections":[],"depth":3}],"depth":2},{"title":"Intel CPU","local":"intel-cpu","sections":[],"depth":2}],"depth":1}';function Oe(u){return Ce(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class il extends Xt{constructor(e){super(),Yt(this,e,Oe,Ze,Qt,{})}}export{il as component};

Xet Storage Details

Size:
27.6 kB
·
Xet hash:
d388942ae16668c72cc61cf75c04e0117dfeb70b914ff41ef143d124ddf6e70c

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