Buckets:

rtrm's picture
download
raw
10.4 kB
import{s as Be,n as We,o as Se}from"../chunks/scheduler.defa9a21.js";import{S as Ee,i as Xe,g as f,s as i,r as s,A as Ye,h as u,f as l,c as a,j as Ge,u as p,x as w,k as Ne,y as Le,a as n,v as o,d as m,t as r,w as c}from"../chunks/index.fe795e71.js";import{C as $}from"../chunks/CodeBlock.42404125.js";import{H as k,E as Pe}from"../chunks/EditOnGithub.0f575778.js";function ke(Ue){let M,V,F,z,T,Q,J,ge="Before you start, you will need to setup your environment, install the appropriate packages, and configure 🤗 Accelerate. 🤗 Accelerate is tested on <strong>Python 3.8+</strong>.",R,d,q,y,he="🤗 Accelerate is available on pypi and conda, as well as on GitHub. Details to install from each are below:",D,U,O,g,Ie="To install 🤗 Accelerate from pypi, perform:",K,h,ee,I,te,j,je="🤗 Accelerate can also be installed with conda with:",le,b,ne,C,ie,x,be=`New features are added every day that haven’t been released yet. To try them out yourself, install
from the GitHub repository:`,ae,A,se,v,Ce=`If you’re working on contributing to the library or wish to play with the source code and see live
results as you run the code, an editable version can be installed from a locally-cloned version of the
repository:`,pe,_,oe,Z,me,G,xe=`After installing, you need to configure 🤗 Accelerate for how the current system is setup for training.
To do so run the following and answer the questions prompted to you:`,re,N,ce,B,Ae="To write a barebones configuration that doesn’t include options such as DeepSpeed configuration or running on TPUs, you can quickly run:",fe,W,ue,S,ve="🤗 Accelerate will automatically utilize the maximum number of GPUs available and set the mixed precision mode.",we,E,_e="To check that your configuration looks fine, run:",Me,X,$e,Y,Ze="An example output is shown below, which describes two GPUs on a single machine with no mixed precision being used:",Te,L,Je,P,de,H,ye;return T=new k({props:{title:"Installation and Configuration",local:"installation-and-configuration",headingTag:"h1"}}),d=new k({props:{title:"Installing 🤗 Accelerate",local:"installing--accelerate",headingTag:"h2"}}),U=new k({props:{title:"pip",local:"pip",headingTag:"h3"}}),h=new $({props:{code:"cGlwJTIwaW5zdGFsbCUyMGFjY2VsZXJhdGU=",highlighted:"pip install accelerate",wrap:!1}}),I=new k({props:{title:"conda",local:"conda",headingTag:"h3"}}),b=new $({props:{code:"Y29uZGElMjBpbnN0YWxsJTIwLWMlMjBjb25kYS1mb3JnZSUyMGFjY2VsZXJhdGU=",highlighted:"conda install -c conda-forge accelerate",wrap:!1}}),C=new k({props:{title:"Source",local:"source",headingTag:"h3"}}),A=new $({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGYWNjZWxlcmF0ZQ==",highlighted:"pip install git+https://github.com/huggingface/accelerate",wrap:!1}}),_=new $({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRmFjY2VsZXJhdGUlMEFjZCUyMGFjY2VsZXJhdGUlMEFwaXAlMjBpbnN0YWxsJTIwLWUlMjAu",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/accelerate
<span class="hljs-built_in">cd</span> accelerate
pip install -e .`,wrap:!1}}),Z=new k({props:{title:"Configuring 🤗 Accelerate",local:"configuring--accelerate",headingTag:"h2"}}),N=new $({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config",wrap:!1}}),W=new $({props:{code:"cHl0aG9uJTIwLWMlMjAlMjJmcm9tJTIwYWNjZWxlcmF0ZS51dGlscyUyMGltcG9ydCUyMHdyaXRlX2Jhc2ljX2NvbmZpZyUzQiUyMHdyaXRlX2Jhc2ljX2NvbmZpZyhtaXhlZF9wcmVjaXNpb24lM0QnZnAxNicpJTIy",highlighted:'python -c <span class="hljs-string">&quot;from accelerate.utils import write_basic_config; write_basic_config(mixed_precision=&#x27;fp16&#x27;)&quot;</span>',wrap:!1}}),X=new $({props:{code:"YWNjZWxlcmF0ZSUyMGVudg==",highlighted:'accelerate <span class="hljs-built_in">env</span>',wrap:!1}}),L=new $({props:{code:"LSUyMCU2MEFjY2VsZX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ZSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lMjBtYWluX3RyYWluaW5nX2Z1bmN0aW9uJTNBJTIwbWFpbiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lMjBkZWVwc3BlZWRfY29uZmlnJTNBJTIwJTdCJTdEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSUyMGZzZHBfY29uZmlnJTNBJTIwJTdCJTdE",highlighted:`- \`Accelerate\` version: 0.11.0.dev0
- Platform: Linux-5.10.0-15-cloud-amd64-x86_64-with-debian-11.3
- Python version: 3.7.12
- Numpy version: 1.19.5
- PyTorch version (GPU?): 1.12.0+cu102 (True)
- \`Accelerate\` default config:
- compute_environment: LOCAL_MACHINE
- distributed_type: MULTI_GPU
- mixed_precision: no
- use_cpu: False
- num_processes: 2
- machine_rank: 0
- num_machines: 1
- main_process_ip: None
- main_process_port: None
- main_training_function: main
- deepspeed_config: {}
- fsdp_config: {}`,wrap:!1}}),P=new Pe({props:{source:"https://github.com/huggingface/accelerate/blob/main/docs/source/basic_tutorials/install.md"}}),{c(){M=f("meta"),V=i(),F=f("p"),z=i(),s(T.$$.fragment),Q=i(),J=f("p"),J.innerHTML=ge,R=i(),s(d.$$.fragment),q=i(),y=f("p"),y.textContent=he,D=i(),s(U.$$.fragment),O=i(),g=f("p"),g.textContent=Ie,K=i(),s(h.$$.fragment),ee=i(),s(I.$$.fragment),te=i(),j=f("p"),j.textContent=je,le=i(),s(b.$$.fragment),ne=i(),s(C.$$.fragment),ie=i(),x=f("p"),x.textContent=be,ae=i(),s(A.$$.fragment),se=i(),v=f("p"),v.textContent=Ce,pe=i(),s(_.$$.fragment),oe=i(),s(Z.$$.fragment),me=i(),G=f("p"),G.textContent=xe,re=i(),s(N.$$.fragment),ce=i(),B=f("p"),B.textContent=Ae,fe=i(),s(W.$$.fragment),ue=i(),S=f("p"),S.textContent=ve,we=i(),E=f("p"),E.textContent=_e,Me=i(),s(X.$$.fragment),$e=i(),Y=f("p"),Y.textContent=Ze,Te=i(),s(L.$$.fragment),Je=i(),s(P.$$.fragment),de=i(),H=f("p"),this.h()},l(e){const t=Ye("svelte-u9bgzb",document.head);M=u(t,"META",{name:!0,content:!0}),t.forEach(l),V=a(e),F=u(e,"P",{}),Ge(F).forEach(l),z=a(e),p(T.$$.fragment,e),Q=a(e),J=u(e,"P",{"data-svelte-h":!0}),w(J)!=="svelte-du3nut"&&(J.innerHTML=ge),R=a(e),p(d.$$.fragment,e),q=a(e),y=u(e,"P",{"data-svelte-h":!0}),w(y)!=="svelte-vdiero"&&(y.textContent=he),D=a(e),p(U.$$.fragment,e),O=a(e),g=u(e,"P",{"data-svelte-h":!0}),w(g)!=="svelte-aebnct"&&(g.textContent=Ie),K=a(e),p(h.$$.fragment,e),ee=a(e),p(I.$$.fragment,e),te=a(e),j=u(e,"P",{"data-svelte-h":!0}),w(j)!=="svelte-1jeg0q3"&&(j.textContent=je),le=a(e),p(b.$$.fragment,e),ne=a(e),p(C.$$.fragment,e),ie=a(e),x=u(e,"P",{"data-svelte-h":!0}),w(x)!=="svelte-12xzaml"&&(x.textContent=be),ae=a(e),p(A.$$.fragment,e),se=a(e),v=u(e,"P",{"data-svelte-h":!0}),w(v)!=="svelte-1vkgb3u"&&(v.textContent=Ce),pe=a(e),p(_.$$.fragment,e),oe=a(e),p(Z.$$.fragment,e),me=a(e),G=u(e,"P",{"data-svelte-h":!0}),w(G)!=="svelte-i509ia"&&(G.textContent=xe),re=a(e),p(N.$$.fragment,e),ce=a(e),B=u(e,"P",{"data-svelte-h":!0}),w(B)!=="svelte-cxy4hk"&&(B.textContent=Ae),fe=a(e),p(W.$$.fragment,e),ue=a(e),S=u(e,"P",{"data-svelte-h":!0}),w(S)!=="svelte-1eh2s3y"&&(S.textContent=ve),we=a(e),E=u(e,"P",{"data-svelte-h":!0}),w(E)!=="svelte-1j0llwk"&&(E.textContent=_e),Me=a(e),p(X.$$.fragment,e),$e=a(e),Y=u(e,"P",{"data-svelte-h":!0}),w(Y)!=="svelte-20cfjt"&&(Y.textContent=Ze),Te=a(e),p(L.$$.fragment,e),Je=a(e),p(P.$$.fragment,e),de=a(e),H=u(e,"P",{}),Ge(H).forEach(l),this.h()},h(){Ne(M,"name","hf:doc:metadata"),Ne(M,"content",Fe)},m(e,t){Le(document.head,M),n(e,V,t),n(e,F,t),n(e,z,t),o(T,e,t),n(e,Q,t),n(e,J,t),n(e,R,t),o(d,e,t),n(e,q,t),n(e,y,t),n(e,D,t),o(U,e,t),n(e,O,t),n(e,g,t),n(e,K,t),o(h,e,t),n(e,ee,t),o(I,e,t),n(e,te,t),n(e,j,t),n(e,le,t),o(b,e,t),n(e,ne,t),o(C,e,t),n(e,ie,t),n(e,x,t),n(e,ae,t),o(A,e,t),n(e,se,t),n(e,v,t),n(e,pe,t),o(_,e,t),n(e,oe,t),o(Z,e,t),n(e,me,t),n(e,G,t),n(e,re,t),o(N,e,t),n(e,ce,t),n(e,B,t),n(e,fe,t),o(W,e,t),n(e,ue,t),n(e,S,t),n(e,we,t),n(e,E,t),n(e,Me,t),o(X,e,t),n(e,$e,t),n(e,Y,t),n(e,Te,t),o(L,e,t),n(e,Je,t),o(P,e,t),n(e,de,t),n(e,H,t),ye=!0},p:We,i(e){ye||(m(T.$$.fragment,e),m(d.$$.fragment,e),m(U.$$.fragment,e),m(h.$$.fragment,e),m(I.$$.fragment,e),m(b.$$.fragment,e),m(C.$$.fragment,e),m(A.$$.fragment,e),m(_.$$.fragment,e),m(Z.$$.fragment,e),m(N.$$.fragment,e),m(W.$$.fragment,e),m(X.$$.fragment,e),m(L.$$.fragment,e),m(P.$$.fragment,e),ye=!0)},o(e){r(T.$$.fragment,e),r(d.$$.fragment,e),r(U.$$.fragment,e),r(h.$$.fragment,e),r(I.$$.fragment,e),r(b.$$.fragment,e),r(C.$$.fragment,e),r(A.$$.fragment,e),r(_.$$.fragment,e),r(Z.$$.fragment,e),r(N.$$.fragment,e),r(W.$$.fragment,e),r(X.$$.fragment,e),r(L.$$.fragment,e),r(P.$$.fragment,e),ye=!1},d(e){e&&(l(V),l(F),l(z),l(Q),l(J),l(R),l(q),l(y),l(D),l(O),l(g),l(K),l(ee),l(te),l(j),l(le),l(ne),l(ie),l(x),l(ae),l(se),l(v),l(pe),l(oe),l(me),l(G),l(re),l(ce),l(B),l(fe),l(ue),l(S),l(we),l(E),l(Me),l($e),l(Y),l(Te),l(Je),l(de),l(H)),l(M),c(T,e),c(d,e),c(U,e),c(h,e),c(I,e),c(b,e),c(C,e),c(A,e),c(_,e),c(Z,e),c(N,e),c(W,e),c(X,e),c(L,e),c(P,e)}}}const Fe='{"title":"Installation and Configuration","local":"installation-and-configuration","sections":[{"title":"Installing 🤗 Accelerate","local":"installing--accelerate","sections":[{"title":"pip","local":"pip","sections":[],"depth":3},{"title":"conda","local":"conda","sections":[],"depth":3},{"title":"Source","local":"source","sections":[],"depth":3}],"depth":2},{"title":"Configuring 🤗 Accelerate","local":"configuring--accelerate","sections":[],"depth":2}],"depth":1}';function He(Ue){return Se(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qe extends Ee{constructor(M){super(),Xe(this,M,He,ke,Be,{})}}export{qe as component};

Xet Storage Details

Size:
10.4 kB
·
Xet hash:
89a003191546407d137007002bf513dd282f72e2e32acee7bbee79dab8d1efb7

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