import{s as Qt,n as Ht,o as Ft}from"../chunks/scheduler.36a0863c.js";import{S as Pt,i as Lt,g as n,s as r,u as d,A as Kt,h as o,f as t,c as i,j as p,v as m,y as h,k as s,o as c,a,w as u,d as M,t as w,x as y}from"../chunks/index.d0f7a4c4.js";import{I as re}from"../chunks/IconCopyLink.bc5fad79.js";import{C as Z}from"../chunks/CodeBlock.69433f87.js";function qt(dt){let f,Te,ue,Ue,J,C,Me,W,ot,ie,mt="Allenamento distribuito con 🤗 Accelerate",ge,X,ut='La parallelizzazione è emersa come strategia per allenare modelli sempre più grandi su hardware limitato e accelerarne la velocità di allenamento di diversi ordini di magnitudine. In Hugging Face, abbiamo creato la libreria <a href="https://huggingface.co/docs/accelerate" rel="nofollow">🤗 Accelerate</a> per aiutarti ad allenare in modo semplice un modello 🤗 Transformers su qualsiasi tipo di configurazione distribuita, sia che si tratti di più GPU su una sola macchina o di più GPU su più macchine. In questo tutorial, imparerai come personalizzare il training loop nativo di PyTorch per consentire l’addestramento in un ambiente distribuito.',Ce,v,I,we,G,rt,se,Mt="Configurazione",Ie,x,wt="Inizia installando 🤗 Accelerate:",Ae,Y,$e,N,yt='Poi importa e crea un oggetto <a href="https://huggingface.co/docs/accelerate/package_reference/accelerator#accelerate.Accelerator" rel="nofollow"><code>Accelerator</code></a>. <code>Accelerator</code> rileverà automaticamente il tuo setup distribuito e inizializzerà tutte le componenti necessarie per l’allenamento. Non dovrai allocare esplicitamente il tuo modello su un device.',ke,z,Be,j,A,ye,E,it,ce,ft="Preparati ad accelerare",_e,S,Jt='Il prossimo passo è quello di passare tutti gli oggetti rilevanti per l’allenamento al metodo <a href="https://huggingface.co/docs/accelerate/package_reference/accelerator#accelerate.Accelerator.prepare" rel="nofollow"><code>prepare</code></a>. Questo include i tuoi DataLoaders per l’allenamento e per la valutazione, un modello e un ottimizzatore:',Ze,V,We,b,$,fe,R,st,pe,vt="Backward",Xe,Q,jt='Infine, sostituisci il tipico metodo <code>loss.backward()</code> nel tuo loop di allenamento con il metodo <a href="https://huggingface.co/docs/accelerate/package_reference/accelerator#accelerate.Accelerator.backward" rel="nofollow"><code>backward</code></a> di 🤗 Accelerate:',Ge,H,xe,F,bt="Come puoi vedere nel seguente codice, hai solo bisogno di aggiungere quattro righe in più di codice al tuo training loop per abilitare l’allenamento distribuito!",Ye,P,Ne,T,k,Je,L,ct,he,Tt="Allenamento",ze,K,Ut="Una volta che hai aggiunto le righe di codice rilevanti, lancia il tuo allenamento in uno script o in un notebook come Colaboratory.",Ee,U,B,ve,q,pt,de,gt="Allenamento con uno script",Se,D,Ct="Se stai eseguendo il tuo allenamento da uno script, esegui il comando seguente per creare e salvare un file di configurazione:",Ve,O,Re,ee,It="Poi lancia il tuo allenamento con:",Qe,te,He,g,_,je,le,ht,me,At="Allenamento con un notebook",Fe,ae,$t="La libreria 🤗 Accelerate può anche essere utilizzata in un notebook se stai pianificando di utilizzare le TPU di Colaboratory. Inserisci tutto il codice legato all’allenamento in una funzione, e passala al <code>notebook_launcher</code>:",Pe,ne,Le,oe,kt='Per maggiori informazioni relative a 🤗 Accelerate e le sue numerose funzionalità, fai riferimento alla <a href="https://huggingface.co/docs/accelerate" rel="nofollow">documentazione</a>.',Ke,be,qe;return W=new re({}),G=new re({}),Y=new Z({props:{code:"cGlwJTIwaW5zdGFsbCUyMGFjY2VsZXJhdGU=",highlighted:"pip install accelerate"}}),z=new Z({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUlMjBpbXBvcnQlMjBBY2NlbGVyYXRvciUwQSUwQWFjY2VsZXJhdG9yJTIwJTNEJTIwQWNjZWxlcmF0b3IoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> accelerate <span class="hljs-keyword">import</span> Accelerator

<span class="hljs-meta">&gt;&gt;&gt; </span>accelerator = Accelerator()`}}),E=new re({}),V=new Z({props:{code:"dHJhaW5fZGF0YWxvYWRlciUyQyUyMGV2YWxfZGF0YWxvYWRlciUyQyUyMG1vZGVsJTJDJTIwb3B0aW1pemVyJTIwJTNEJTIwYWNjZWxlcmF0b3IucHJlcGFyZSglMEElMjAlMjAlMjAlMjB0cmFpbl9kYXRhbG9hZGVyJTJDJTIwZXZhbF9kYXRhbG9hZGVyJTJDJTIwbW9kZWwlMkMlMjBvcHRpbWl6ZXIlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>train_dataloader, eval_dataloader, model, optimizer = accelerator.prepare(
<span class="hljs-meta">... </span>    train_dataloader, eval_dataloader, model, optimizer
<span class="hljs-meta">... </span>)`}}),R=new re({}),H=new Z({props:{code:"Zm9yJTIwZXBvY2glMjBpbiUyMHJhbmdlKG51bV9lcG9jaHMpJTNBJTBBJTIwJTIwJTIwJTIwZm9yJTIwYmF0Y2glMjBpbiUyMHRyYWluX2RhdGFsb2FkZXIlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKipiYXRjaCklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYWNjZWxlcmF0b3IuYmFja3dhcmQobG9zcyklMEElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBvcHRpbWl6ZXIuc3RlcCgpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbHJfc2NoZWR1bGVyLnN0ZXAoKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG9wdGltaXplci56ZXJvX2dyYWQoKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHByb2dyZXNzX2Jhci51cGRhdGUoMSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> epoch <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(num_epochs):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> batch <span class="hljs-keyword">in</span> train_dataloader:
<span class="hljs-meta">... </span>        outputs = model(**batch)
<span class="hljs-meta">... </span>        loss = outputs.loss
<span class="hljs-meta">... </span>        accelerator.backward(loss)

<span class="hljs-meta">... </span>        optimizer.step()
<span class="hljs-meta">... </span>        lr_scheduler.step()
<span class="hljs-meta">... </span>        optimizer.zero_grad()
<span class="hljs-meta">... </span>        progress_bar.update(<span class="hljs-number">1</span>)`}}),P=new Z({props:{code:"JTJCJTIwZnJvbSUyMGFjY2VsZXJhdGUlMjBpbXBvcnQlMjBBY2NlbGVyYXRvciUwQSUyMCUyMGZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBZGFtVyUyQyUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMkMlMjBnZXRfc2NoZWR1bGVyJTBBJTBBJTJCJTIwYWNjZWxlcmF0b3IlMjAlM0QlMjBBY2NlbGVyYXRvcigpJTBBJTBBJTIwJTIwbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50JTJDJTIwbnVtX2xhYmVscyUzRDIpJTBBJTIwJTIwb3B0aW1pemVyJTIwJTNEJTIwQWRhbVcobW9kZWwucGFyYW1ldGVycygpJTJDJTIwbHIlM0QzZS01KSUwQSUwQS0lMjBkZXZpY2UlMjAlM0QlMjB0b3JjaC5kZXZpY2UoJTIyY3VkYSUyMiklMjBpZiUyMHRvcmNoLmN1ZGEuaXNfYXZhaWxhYmxlKCklMjBlbHNlJTIwdG9yY2guZGV2aWNlKCUyMmNwdSUyMiklMEEtJTIwbW9kZWwudG8oZGV2aWNlKSUwQSUwQSUyQiUyMHRyYWluX2RhdGFsb2FkZXIlMkMlMjBldmFsX2RhdGFsb2FkZXIlMkMlMjBtb2RlbCUyQyUyMG9wdGltaXplciUyMCUzRCUyMGFjY2VsZXJhdG9yLnByZXBhcmUoJTBBJTJCJTIwJTIwJTIwJTIwJTIwdHJhaW5fZGF0YWxvYWRlciUyQyUyMGV2YWxfZGF0YWxvYWRlciUyQyUyMG1vZGVsJTJDJTIwb3B0aW1pemVyJTBBJTJCJTIwKSUwQSUwQSUyMCUyMG51bV9lcG9jaHMlMjAlM0QlMjAzJTBBJTIwJTIwbnVtX3RyYWluaW5nX3N0ZXBzJTIwJTNEJTIwbnVtX2Vwb2NocyUyMColMjBsZW4odHJhaW5fZGF0YWxvYWRlciklMEElMjAlMjBscl9zY2hlZHVsZXIlMjAlM0QlMjBnZXRfc2NoZWR1bGVyKCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMmxpbmVhciUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMG9wdGltaXplciUzRG9wdGltaXplciUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMG51bV93YXJtdXBfc3RlcHMlM0QwJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwbnVtX3RyYWluaW5nX3N0ZXBzJTNEbnVtX3RyYWluaW5nX3N0ZXBzJTBBJTIwJTIwKSUwQSUwQSUyMCUyMHByb2dyZXNzX2JhciUyMCUzRCUyMHRxZG0ocmFuZ2UobnVtX3RyYWluaW5nX3N0ZXBzKSklMEElMEElMjAlMjBtb2RlbC50cmFpbigpJTBBJTIwJTIwZm9yJTIwZXBvY2glMjBpbiUyMHJhbmdlKG51bV9lcG9jaHMpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwZm9yJTIwYmF0Y2glMjBpbiUyMHRyYWluX2RhdGFsb2FkZXIlM0ElMEEtJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYmF0Y2glMjAlM0QlMjAlN0JrJTNBJTIwdi50byhkZXZpY2UpJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGJhdGNoLml0ZW1zKCklN0QlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKipiYXRjaCklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBLSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGxvc3MuYmFja3dhcmQoKSUwQSUyQiUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGFjY2VsZXJhdG9yLmJhY2t3YXJkKGxvc3MpJTBBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwb3B0aW1pemVyLnN0ZXAoKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGxyX3NjaGVkdWxlci5zdGVwKCklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBvcHRpbWl6ZXIuemVyb19ncmFkKCklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBwcm9ncmVzc19iYXIudXBkYXRlKDEp",highlighted:`<span class="hljs-addition">+ from accelerate import Accelerator</span>
  from transformers import AdamW, AutoModelForSequenceClassification, get_scheduler

<span class="hljs-addition">+ accelerator = Accelerator()</span>

  model = AutoModelForSequenceClassification.from_pretrained(checkpoint, num_labels=2)
  optimizer = AdamW(model.parameters(), lr=3e-5)

<span class="hljs-deletion">- device = torch.device(&quot;cuda&quot;) if torch.cuda.is_available() else torch.device(&quot;cpu&quot;)</span>
<span class="hljs-deletion">- model.to(device)</span>

<span class="hljs-addition">+ train_dataloader, eval_dataloader, model, optimizer = accelerator.prepare(</span>
<span class="hljs-addition">+     train_dataloader, eval_dataloader, model, optimizer</span>
<span class="hljs-addition">+ )</span>

  num_epochs = 3
  num_training_steps = num_epochs * len(train_dataloader)
  lr_scheduler = get_scheduler(
      &quot;linear&quot;,
      optimizer=optimizer,
      num_warmup_steps=0,
      num_training_steps=num_training_steps
  )

  progress_bar = tqdm(range(num_training_steps))

  model.train()
  for epoch in range(num_epochs):
      for batch in train_dataloader:
<span class="hljs-deletion">-         batch = {k: v.to(device) for k, v in batch.items()}</span>
          outputs = model(**batch)
          loss = outputs.loss
<span class="hljs-deletion">-         loss.backward()</span>
<span class="hljs-addition">+         accelerator.backward(loss)</span>

          optimizer.step()
          lr_scheduler.step()
          optimizer.zero_grad()
          progress_bar.update(1)`}}),L=new re({}),q=new re({}),O=new Z({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config"}}),te=new Z({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHRyYWluLnB5",highlighted:"accelerate launch train.py"}}),le=new re({}),ne=new Z({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUlMjBpbXBvcnQlMjBub3RlYm9va19sYXVuY2hlciUwQSUwQW5vdGVib29rX2xhdW5jaGVyKHRyYWluaW5nX2Z1bmN0aW9uKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> accelerate <span class="hljs-keyword">import</span> notebook_launcher

<span class="hljs-meta">&gt;&gt;&gt; </span>notebook_launcher(training_function)`}}),{c(){f=n("meta"),Te=r(),ue=n("p"),Ue=r(),J=n("h1"),C=n("a"),Me=n("span"),d(W.$$.fragment),ot=r(),ie=n("span"),ie.textContent=mt,ge=r(),X=n("p"),X.innerHTML=ut,Ce=r(),v=n("h2"),I=n("a"),we=n("span"),d(G.$$.fragment),rt=r(),se=n("span"),se.textContent=Mt,Ie=r(),x=n("p"),x.textContent=wt,Ae=r(),d(Y.$$.fragment),$e=r(),N=n("p"),N.innerHTML=yt,ke=r(),d(z.$$.fragment),Be=r(),j=n("h2"),A=n("a"),ye=n("span"),d(E.$$.fragment),it=r(),ce=n("span"),ce.textContent=ft,_e=r(),S=n("p"),S.innerHTML=Jt,Ze=r(),d(V.$$.fragment),We=r(),b=n("h2"),$=n("a"),fe=n("span"),d(R.$$.fragment),st=r(),pe=n("span"),pe.textContent=vt,Xe=r(),Q=n("p"),Q.innerHTML=jt,Ge=r(),d(H.$$.fragment),xe=r(),F=n("p"),F.textContent=bt,Ye=r(),d(P.$$.fragment),Ne=r(),T=n("h2"),k=n("a"),Je=n("span"),d(L.$$.fragment),ct=r(),he=n("span"),he.textContent=Tt,ze=r(),K=n("p"),K.textContent=Ut,Ee=r(),U=n("h3"),B=n("a"),ve=n("span"),d(q.$$.fragment),pt=r(),de=n("span"),de.textContent=gt,Se=r(),D=n("p"),D.textContent=Ct,Ve=r(),d(O.$$.fragment),Re=r(),ee=n("p"),ee.textContent=It,Qe=r(),d(te.$$.fragment),He=r(),g=n("h3"),_=n("a"),je=n("span"),d(le.$$.fragment),ht=r(),me=n("span"),me.textContent=At,Fe=r(),ae=n("p"),ae.innerHTML=$t,Pe=r(),d(ne.$$.fragment),Le=r(),oe=n("p"),oe.innerHTML=kt,Ke=r(),be=n("p"),this.h()},l(e){const l=Kt("svelte-1phssyn",document.head);f=o(l,"META",{name:!0,content:!0}),l.forEach(t),Te=i(e),ue=o(e,"P",{}),p(ue).forEach(t),Ue=i(e),J=o(e,"H1",{class:!0});var De=p(J);C=o(De,"A",{id:!0,class:!0,href:!0});var Bt=p(C);Me=o(Bt,"SPAN",{});var _t=p(Me);m(W.$$.fragment,_t),_t.forEach(t),Bt.forEach(t),ot=i(De),ie=o(De,"SPAN",{"data-svelte-h":!0}),h(ie)!=="svelte-t92ad"&&(ie.textContent=mt),De.forEach(t),ge=i(e),X=o(e,"P",{"data-svelte-h":!0}),h(X)!=="svelte-17ajov5"&&(X.innerHTML=ut),Ce=i(e),v=o(e,"H2",{class:!0});var Oe=p(v);I=o(Oe,"A",{id:!0,class:!0,href:!0});var Zt=p(I);we=o(Zt,"SPAN",{});var Wt=p(we);m(G.$$.fragment,Wt),Wt.forEach(t),Zt.forEach(t),rt=i(Oe),se=o(Oe,"SPAN",{"data-svelte-h":!0}),h(se)!=="svelte-180u59c"&&(se.textContent=Mt),Oe.forEach(t),Ie=i(e),x=o(e,"P",{"data-svelte-h":!0}),h(x)!=="svelte-dexkcz"&&(x.textContent=wt),Ae=i(e),m(Y.$$.fragment,e),$e=i(e),N=o(e,"P",{"data-svelte-h":!0}),h(N)!=="svelte-72811u"&&(N.innerHTML=yt),ke=i(e),m(z.$$.fragment,e),Be=i(e),j=o(e,"H2",{class:!0});var et=p(j);A=o(et,"A",{id:!0,class:!0,href:!0});var Xt=p(A);ye=o(Xt,"SPAN",{});var Gt=p(ye);m(E.$$.fragment,Gt),Gt.forEach(t),Xt.forEach(t),it=i(et),ce=o(et,"SPAN",{"data-svelte-h":!0}),h(ce)!=="svelte-b6ug0b"&&(ce.textContent=ft),et.forEach(t),_e=i(e),S=o(e,"P",{"data-svelte-h":!0}),h(S)!=="svelte-1uhe1gm"&&(S.innerHTML=Jt),Ze=i(e),m(V.$$.fragment,e),We=i(e),b=o(e,"H2",{class:!0});var tt=p(b);$=o(tt,"A",{id:!0,class:!0,href:!0});var xt=p($);fe=o(xt,"SPAN",{});var Yt=p(fe);m(R.$$.fragment,Yt),Yt.forEach(t),xt.forEach(t),st=i(tt),pe=o(tt,"SPAN",{"data-svelte-h":!0}),h(pe)!=="svelte-1hbv3ea"&&(pe.textContent=vt),tt.forEach(t),Xe=i(e),Q=o(e,"P",{"data-svelte-h":!0}),h(Q)!=="svelte-1i670zk"&&(Q.innerHTML=jt),Ge=i(e),m(H.$$.fragment,e),xe=i(e),F=o(e,"P",{"data-svelte-h":!0}),h(F)!=="svelte-op71ru"&&(F.textContent=bt),Ye=i(e),m(P.$$.fragment,e),Ne=i(e),T=o(e,"H2",{class:!0});var lt=p(T);k=o(lt,"A",{id:!0,class:!0,href:!0});var Nt=p(k);Je=o(Nt,"SPAN",{});var zt=p(Je);m(L.$$.fragment,zt),zt.forEach(t),Nt.forEach(t),ct=i(lt),he=o(lt,"SPAN",{"data-svelte-h":!0}),h(he)!=="svelte-1rwcc7v"&&(he.textContent=Tt),lt.forEach(t),ze=i(e),K=o(e,"P",{"data-svelte-h":!0}),h(K)!=="svelte-12qrazq"&&(K.textContent=Ut),Ee=i(e),U=o(e,"H3",{class:!0});var at=p(U);B=o(at,"A",{id:!0,class:!0,href:!0});var Et=p(B);ve=o(Et,"SPAN",{});var St=p(ve);m(q.$$.fragment,St),St.forEach(t),Et.forEach(t),pt=i(at),de=o(at,"SPAN",{"data-svelte-h":!0}),h(de)!=="svelte-y8y320"&&(de.textContent=gt),at.forEach(t),Se=i(e),D=o(e,"P",{"data-svelte-h":!0}),h(D)!=="svelte-11jl52e"&&(D.textContent=Ct),Ve=i(e),m(O.$$.fragment,e),Re=i(e),ee=o(e,"P",{"data-svelte-h":!0}),h(ee)!=="svelte-1hc8rs1"&&(ee.textContent=It),Qe=i(e),m(te.$$.fragment,e),He=i(e),g=o(e,"H3",{class:!0});var nt=p(g);_=o(nt,"A",{id:!0,class:!0,href:!0});var Vt=p(_);je=o(Vt,"SPAN",{});var Rt=p(je);m(le.$$.fragment,Rt),Rt.forEach(t),Vt.forEach(t),ht=i(nt),me=o(nt,"SPAN",{"data-svelte-h":!0}),h(me)!=="svelte-1y8nduv"&&(me.textContent=At),nt.forEach(t),Fe=i(e),ae=o(e,"P",{"data-svelte-h":!0}),h(ae)!=="svelte-zv3zg4"&&(ae.innerHTML=$t),Pe=i(e),m(ne.$$.fragment,e),Le=i(e),oe=o(e,"P",{"data-svelte-h":!0}),h(oe)!=="svelte-1inqsdp"&&(oe.innerHTML=kt),Ke=i(e),be=o(e,"P",{}),p(be).forEach(t),this.h()},h(){s(f,"name","hf:doc:metadata"),s(f,"content",JSON.stringify(Dt)),s(C,"id","allenamento-distribuito-con-accelerate"),s(C,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(C,"href","#allenamento-distribuito-con-accelerate"),s(J,"class","relative group"),s(I,"id","configurazione"),s(I,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(I,"href","#configurazione"),s(v,"class","relative group"),s(A,"id","preparati-ad-accelerare"),s(A,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(A,"href","#preparati-ad-accelerare"),s(j,"class","relative group"),s($,"id","backward"),s($,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s($,"href","#backward"),s(b,"class","relative group"),s(k,"id","allenamento"),s(k,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(k,"href","#allenamento"),s(T,"class","relative group"),s(B,"id","allenamento-con-uno-script"),s(B,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(B,"href","#allenamento-con-uno-script"),s(U,"class","relative group"),s(_,"id","allenamento-con-un-notebook"),s(_,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(_,"href","#allenamento-con-un-notebook"),s(g,"class","relative group")},m(e,l){c(document.head,f),a(e,Te,l),a(e,ue,l),a(e,Ue,l),a(e,J,l),c(J,C),c(C,Me),u(W,Me,null),c(J,ot),c(J,ie),a(e,ge,l),a(e,X,l),a(e,Ce,l),a(e,v,l),c(v,I),c(I,we),u(G,we,null),c(v,rt),c(v,se),a(e,Ie,l),a(e,x,l),a(e,Ae,l),u(Y,e,l),a(e,$e,l),a(e,N,l),a(e,ke,l),u(z,e,l),a(e,Be,l),a(e,j,l),c(j,A),c(A,ye),u(E,ye,null),c(j,it),c(j,ce),a(e,_e,l),a(e,S,l),a(e,Ze,l),u(V,e,l),a(e,We,l),a(e,b,l),c(b,$),c($,fe),u(R,fe,null),c(b,st),c(b,pe),a(e,Xe,l),a(e,Q,l),a(e,Ge,l),u(H,e,l),a(e,xe,l),a(e,F,l),a(e,Ye,l),u(P,e,l),a(e,Ne,l),a(e,T,l),c(T,k),c(k,Je),u(L,Je,null),c(T,ct),c(T,he),a(e,ze,l),a(e,K,l),a(e,Ee,l),a(e,U,l),c(U,B),c(B,ve),u(q,ve,null),c(U,pt),c(U,de),a(e,Se,l),a(e,D,l),a(e,Ve,l),u(O,e,l),a(e,Re,l),a(e,ee,l),a(e,Qe,l),u(te,e,l),a(e,He,l),a(e,g,l),c(g,_),c(_,je),u(le,je,null),c(g,ht),c(g,me),a(e,Fe,l),a(e,ae,l),a(e,Pe,l),u(ne,e,l),a(e,Le,l),a(e,oe,l),a(e,Ke,l),a(e,be,l),qe=!0},p:Ht,i(e){qe||(M(W.$$.fragment,e),M(G.$$.fragment,e),M(Y.$$.fragment,e),M(z.$$.fragment,e),M(E.$$.fragment,e),M(V.$$.fragment,e),M(R.$$.fragment,e),M(H.$$.fragment,e),M(P.$$.fragment,e),M(L.$$.fragment,e),M(q.$$.fragment,e),M(O.$$.fragment,e),M(te.$$.fragment,e),M(le.$$.fragment,e),M(ne.$$.fragment,e),qe=!0)},o(e){w(W.$$.fragment,e),w(G.$$.fragment,e),w(Y.$$.fragment,e),w(z.$$.fragment,e),w(E.$$.fragment,e),w(V.$$.fragment,e),w(R.$$.fragment,e),w(H.$$.fragment,e),w(P.$$.fragment,e),w(L.$$.fragment,e),w(q.$$.fragment,e),w(O.$$.fragment,e),w(te.$$.fragment,e),w(le.$$.fragment,e),w(ne.$$.fragment,e),qe=!1},d(e){e&&(t(Te),t(ue),t(Ue),t(J),t(ge),t(X),t(Ce),t(v),t(Ie),t(x),t(Ae),t($e),t(N),t(ke),t(Be),t(j),t(_e),t(S),t(Ze),t(We),t(b),t(Xe),t(Q),t(Ge),t(xe),t(F),t(Ye),t(Ne),t(T),t(ze),t(K),t(Ee),t(U),t(Se),t(D),t(Ve),t(Re),t(ee),t(Qe),t(He),t(g),t(Fe),t(ae),t(Pe),t(Le),t(oe),t(Ke),t(be)),t(f),y(W),y(G),y(Y,e),y(z,e),y(E),y(V,e),y(R),y(H,e),y(P,e),y(L),y(q),y(O,e),y(te,e),y(le),y(ne,e)}}}const Dt={local:"allenamento-distribuito-con-accelerate",sections:[{local:"configurazione",title:"Configurazione"},{local:"preparati-ad-accelerare",title:"Preparati ad accelerare"},{local:"backward",title:"Backward"},{local:"allenamento",sections:[{local:"allenamento-con-uno-script",title:"Allenamento con uno script"},{local:"allenamento-con-un-notebook",title:"Allenamento con un notebook"}],title:"Allenamento"}],title:"Allenamento distribuito con 🤗 Accelerate"};function Ot(dt){return Ft(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class nl extends Pt{constructor(f){super(),Lt(this,f,Ot,qt,Qt,{})}}export{nl as component};
