import{s as Ne,n as Se,o as ve}from"../chunks/scheduler.defa9a21.js";import{S as _e,i as Ee,g as M,s as a,r as s,A as We,h as m,f as l,c as i,j as Ge,u as p,x as T,k as Ze,y as Fe,a as n,v as o,d as w,t as r,w as c}from"../chunks/index.fe795e71.js";import{C as u}from"../chunks/CodeBlock.204b6c34.js";import{H as P,E as Ye}from"../chunks/getInferenceSnippets.2234a8dd.js";function Ve(Ue){let J,R,X,L,y,z,f,je="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>.",Q,U,de="Accelerate is available on pypi and conda, as well as on GitHub. Details to install from each are below:",H,j,q,d,$e="To install Accelerate from pypi, perform:",D,$,O,b,K,I,be="Accelerate can also be installed with conda with:",ee,h,te,A,le,g,Ie=`New features are added every day that haven’t been released yet. To try them out yourself, install
from the GitHub repository:`,ne,C,ae,B,he=`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:`,ie,x,Me,G,se,Z,Ae=`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:`,me,N,pe,S,ge="To write a barebones configuration that doesn’t include options such as DeepSpeed configuration or running on TPUs, you can quickly run:",oe,v,we,_,Ce="Accelerate will automatically utilize the maximum number of GPUs available and set the mixed precision mode.",re,E,Be="To check that your configuration looks fine, run:",ce,W,Te,F,xe="An example output is shown below, which describes two GPUs on a single machine with no mixed precision being used:",Je,Y,ue,V,ye,k,fe;return y=new P({props:{title:"Installation",local:"installation",headingTag:"h1"}}),j=new P({props:{title:"pip",local:"pip",headingTag:"h2"}}),$=new u({props:{code:"cGlwJTIwaW5zdGFsbCUyMGFjY2VsZXJhdGU=",highlighted:"pip install accelerate",wrap:!1}}),b=new P({props:{title:"conda",local:"conda",headingTag:"h2"}}),h=new u({props:{code:"Y29uZGElMjBpbnN0YWxsJTIwLWMlMjBjb25kYS1mb3JnZSUyMGFjY2VsZXJhdGU=",highlighted:"conda install -c conda-forge accelerate",wrap:!1}}),A=new P({props:{title:"Source",local:"source",headingTag:"h2"}}),C=new u({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGYWNjZWxlcmF0ZQ==",highlighted:"pip install git+https://github.com/huggingface/accelerate",wrap:!1}}),x=new u({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}}),G=new P({props:{title:"Configuration",local:"configuration",headingTag:"h2"}}),N=new u({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config",wrap:!1}}),v=new u({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}}),W=new u({props:{code:"YWNjZWxlcmF0ZSUyMGVudg==",highlighted:'accelerate <span class="hljs-built_in">env</span>',wrap:!1}}),Y=new u({props:{code:"LSUyMCU2MEFjY2VsZXJhdGUlNjAlMjB2ZXJzaW9uJTNBJTIwMS4yLjAuZGV2MCUwQS0lMjBQbGF0Zm9ybSUzQSUyMExpbnV4LTYuOC4wLTQ3LWdlbmVyaWMteDg2XzY0LXdpdGgtZ2xpYmMyLjM1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ZhbHNlJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSUyMGRlYnVnJTNBJTIwRmFsc2UlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTIwbnVtX3Byb2Nlc3NlcyUzQSUyMDIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTIwbWFjaGluZV9yYW5rJTNBJTIwMCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lMjBudW1fbWFjaGluZXMlM0ElMjAxJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSUyMGdwdV9pZHMlM0ElMjBhbGwlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTIwcmR6dl9iYWNrZW5kJTNBJTIwc3RhdGljJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSUyMHNhbWVfbmV0d29yayUzQSUyMFRydWUlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTIwbWFpbl90cmFpbmluZ19mdW5jdGlvbiUzQSUyMG1haW4lMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTIwZW5hYmxlX2NwdV9hZmZpbml0eSUzQSUyMEZhbHNlJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSUyMGRvd25jYXN0X2JmMTYlM0ElMjBubyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lMjB0cHVfdXNlX2NsdXN0ZXIlM0ElMjBGYWxzZSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lMjB0cHVfdXNlX3N1ZG8lM0ElMjBGYWxzZSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lMjB0cHVfZW52JTNBJTIwJTVCJTVE",highlighted:`- \`Accelerate\` version: 1.2.0.dev0
- Platform: Linux-6.8.0-47-generic-x86_64-with-glibc2.35
- \`accelerate\` bash location: /home/zach/miniconda3/envs/accelerate/bin/accelerate
- Python version: 3.10.13
- Numpy version: 1.26.4
- PyTorch version (GPU?): 2.5.1+cu124 (True)
- PyTorch XPU available: False
- PyTorch NPU available: False
- PyTorch MLU available: False
- PyTorch MUSA available: False
- System RAM: 187.91 GB
- GPU <span class="hljs-built_in">type</span>: NVIDIA GeForce RTX 4090
- \`Accelerate\` default config:
        - compute_environment: LOCAL_MACHINE
        - distributed_type: MULTI_GPU
        - mixed_precision: no
        - use_cpu: False
        - debug: False
        - num_processes: 2
        - machine_rank: 0
        - num_machines: 1
        - gpu_ids: all
        - rdzv_backend: static
        - same_network: True
        - main_training_function: main
        - enable_cpu_affinity: False
        - downcast_bf16: no
        - tpu_use_cluster: False
        - tpu_use_sudo: False
        - tpu_env: []`,wrap:!1}}),V=new Ye({props:{source:"https://github.com/huggingface/accelerate/blob/main/docs/source/basic_tutorials/install.md"}}),{c(){J=M("meta"),R=a(),X=M("p"),L=a(),s(y.$$.fragment),z=a(),f=M("p"),f.innerHTML=je,Q=a(),U=M("p"),U.textContent=de,H=a(),s(j.$$.fragment),q=a(),d=M("p"),d.textContent=$e,D=a(),s($.$$.fragment),O=a(),s(b.$$.fragment),K=a(),I=M("p"),I.textContent=be,ee=a(),s(h.$$.fragment),te=a(),s(A.$$.fragment),le=a(),g=M("p"),g.textContent=Ie,ne=a(),s(C.$$.fragment),ae=a(),B=M("p"),B.textContent=he,ie=a(),s(x.$$.fragment),Me=a(),s(G.$$.fragment),se=a(),Z=M("p"),Z.textContent=Ae,me=a(),s(N.$$.fragment),pe=a(),S=M("p"),S.textContent=ge,oe=a(),s(v.$$.fragment),we=a(),_=M("p"),_.textContent=Ce,re=a(),E=M("p"),E.textContent=Be,ce=a(),s(W.$$.fragment),Te=a(),F=M("p"),F.textContent=xe,Je=a(),s(Y.$$.fragment),ue=a(),s(V.$$.fragment),ye=a(),k=M("p"),this.h()},l(e){const t=We("svelte-u9bgzb",document.head);J=m(t,"META",{name:!0,content:!0}),t.forEach(l),R=i(e),X=m(e,"P",{}),Ge(X).forEach(l),L=i(e),p(y.$$.fragment,e),z=i(e),f=m(e,"P",{"data-svelte-h":!0}),T(f)!=="svelte-ba2x89"&&(f.innerHTML=je),Q=i(e),U=m(e,"P",{"data-svelte-h":!0}),T(U)!=="svelte-dwmq6v"&&(U.textContent=de),H=i(e),p(j.$$.fragment,e),q=i(e),d=m(e,"P",{"data-svelte-h":!0}),T(d)!=="svelte-1yuglu6"&&(d.textContent=$e),D=i(e),p($.$$.fragment,e),O=i(e),p(b.$$.fragment,e),K=i(e),I=m(e,"P",{"data-svelte-h":!0}),T(I)!=="svelte-1k8pkaq"&&(I.textContent=be),ee=i(e),p(h.$$.fragment,e),te=i(e),p(A.$$.fragment,e),le=i(e),g=m(e,"P",{"data-svelte-h":!0}),T(g)!=="svelte-12xzaml"&&(g.textContent=Ie),ne=i(e),p(C.$$.fragment,e),ae=i(e),B=m(e,"P",{"data-svelte-h":!0}),T(B)!=="svelte-1vkgb3u"&&(B.textContent=he),ie=i(e),p(x.$$.fragment,e),Me=i(e),p(G.$$.fragment,e),se=i(e),Z=m(e,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-dbkgg3"&&(Z.textContent=Ae),me=i(e),p(N.$$.fragment,e),pe=i(e),S=m(e,"P",{"data-svelte-h":!0}),T(S)!=="svelte-cxy4hk"&&(S.textContent=ge),oe=i(e),p(v.$$.fragment,e),we=i(e),_=m(e,"P",{"data-svelte-h":!0}),T(_)!=="svelte-103gb4t"&&(_.textContent=Ce),re=i(e),E=m(e,"P",{"data-svelte-h":!0}),T(E)!=="svelte-1j0llwk"&&(E.textContent=Be),ce=i(e),p(W.$$.fragment,e),Te=i(e),F=m(e,"P",{"data-svelte-h":!0}),T(F)!=="svelte-20cfjt"&&(F.textContent=xe),Je=i(e),p(Y.$$.fragment,e),ue=i(e),p(V.$$.fragment,e),ye=i(e),k=m(e,"P",{}),Ge(k).forEach(l),this.h()},h(){Ze(J,"name","hf:doc:metadata"),Ze(J,"content",Xe)},m(e,t){Fe(document.head,J),n(e,R,t),n(e,X,t),n(e,L,t),o(y,e,t),n(e,z,t),n(e,f,t),n(e,Q,t),n(e,U,t),n(e,H,t),o(j,e,t),n(e,q,t),n(e,d,t),n(e,D,t),o($,e,t),n(e,O,t),o(b,e,t),n(e,K,t),n(e,I,t),n(e,ee,t),o(h,e,t),n(e,te,t),o(A,e,t),n(e,le,t),n(e,g,t),n(e,ne,t),o(C,e,t),n(e,ae,t),n(e,B,t),n(e,ie,t),o(x,e,t),n(e,Me,t),o(G,e,t),n(e,se,t),n(e,Z,t),n(e,me,t),o(N,e,t),n(e,pe,t),n(e,S,t),n(e,oe,t),o(v,e,t),n(e,we,t),n(e,_,t),n(e,re,t),n(e,E,t),n(e,ce,t),o(W,e,t),n(e,Te,t),n(e,F,t),n(e,Je,t),o(Y,e,t),n(e,ue,t),o(V,e,t),n(e,ye,t),n(e,k,t),fe=!0},p:Se,i(e){fe||(w(y.$$.fragment,e),w(j.$$.fragment,e),w($.$$.fragment,e),w(b.$$.fragment,e),w(h.$$.fragment,e),w(A.$$.fragment,e),w(C.$$.fragment,e),w(x.$$.fragment,e),w(G.$$.fragment,e),w(N.$$.fragment,e),w(v.$$.fragment,e),w(W.$$.fragment,e),w(Y.$$.fragment,e),w(V.$$.fragment,e),fe=!0)},o(e){r(y.$$.fragment,e),r(j.$$.fragment,e),r($.$$.fragment,e),r(b.$$.fragment,e),r(h.$$.fragment,e),r(A.$$.fragment,e),r(C.$$.fragment,e),r(x.$$.fragment,e),r(G.$$.fragment,e),r(N.$$.fragment,e),r(v.$$.fragment,e),r(W.$$.fragment,e),r(Y.$$.fragment,e),r(V.$$.fragment,e),fe=!1},d(e){e&&(l(R),l(X),l(L),l(z),l(f),l(Q),l(U),l(H),l(q),l(d),l(D),l(O),l(K),l(I),l(ee),l(te),l(le),l(g),l(ne),l(ae),l(B),l(ie),l(Me),l(se),l(Z),l(me),l(pe),l(S),l(oe),l(we),l(_),l(re),l(E),l(ce),l(Te),l(F),l(Je),l(ue),l(ye),l(k)),l(J),c(y,e),c(j,e),c($,e),c(b,e),c(h,e),c(A,e),c(C,e),c(x,e),c(G,e),c(N,e),c(v,e),c(W,e),c(Y,e),c(V,e)}}}const Xe='{"title":"Installation","local":"installation","sections":[{"title":"pip","local":"pip","sections":[],"depth":2},{"title":"conda","local":"conda","sections":[],"depth":2},{"title":"Source","local":"source","sections":[],"depth":2},{"title":"Configuration","local":"configuration","sections":[],"depth":2}],"depth":1}';function ke(Ue){return ve(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qe extends _e{constructor(J){super(),Ee(this,J,ke,Ve,Ne,{})}}export{Qe as component};
