import{s as Ht,n as zt,o as Ft}from"../chunks/scheduler.36a0863c.js";import{S as Pt,i as Lt,g as n,s,u as h,A as Kt,h as r,f as t,c as o,j as p,v as m,y as d,k as i,o as c,a as l,w as M,d as u,t as y,x as w}from"../chunks/index.d0f7a4c4.js";import{I as se}from"../chunks/IconCopyLink.bc5fad79.js";import{C as Z}from"../chunks/CodeBlock.69433f87.js";function qt(ht){let f,Te,Me,Ue,J,C,ue,W,rt,oe,mt="Entrenamiento distribuido con 🤗 Accelerate",ge,X,Mt='El paralelismo ha emergido como una estrategia para entrenar modelos grandes en hardware limitado e incrementar la velocidad de entrenamiento en varios órdenes de magnitud. En Hugging Face creamos la biblioteca <a href="https://huggingface.co/docs/accelerate" rel="nofollow">🤗 Accelerate</a> para ayudar a los usuarios a entrenar modelos 🤗 Transformers en cualquier tipo de configuración distribuida, ya sea en una máquina con múltiples GPUs o en múltiples GPUs distribuidas entre muchas máquinas. En este tutorial aprenderás cómo personalizar tu bucle de entrenamiento de PyTorch nativo para poder entrenar en entornos distribuidos.',Ce,v,$,ye,G,st,ie,ut="Configuración",$e,E,yt="Empecemos por instalar 🤗 Accelerate:",Ie,x,Ae,Y,wt='Luego, importamos y creamos un objeto <a href="https://huggingface.co/docs/accelerate/package_reference/accelerator#accelerate.Accelerator" rel="nofollow"><code>Accelerator</code></a>. <code>Accelerator</code> detectará automáticamente el tipo de configuración distribuida que tengas disponible e inicializará todos los componentes necesarios para el entrenamiento. No necesitas especificar el dispositivo en donde se debe colocar tu modelo.',ke,N,Be,j,I,we,S,ot,ce,ft="Prepárate para acelerar",_e,V,Jt='Pasa todos los objetos relevantes para el entrenamiento al método <a href="https://huggingface.co/docs/accelerate/package_reference/accelerator#accelerate.Accelerator.prepare" rel="nofollow"><code>prepare</code></a>. Esto incluye los DataLoaders de entrenamiento y evaluación, un modelo y un optimizador:',Ze,R,We,b,A,fe,Q,it,pe,vt="Backward",Xe,H,jt='Por último, reemplaza el típico <code>loss.backward()</code> en tu bucle de entrenamiento con el método <a href="https://huggingface.co/docs/accelerate/package_reference/accelerator#accelerate.Accelerator.backward" rel="nofollow"><code>backward</code></a> de 🤗 Accelerate:',Ge,z,Ee,F,bt="Como se puede ver en el siguiente código, ¡solo necesitas adicionar cuatro líneas de código a tu bucle de entrenamiento para habilitar el entrenamiento distribuido!",xe,P,Ye,T,k,Je,L,ct,de,Tt="Entrenamiento",Ne,K,Ut="Una vez que hayas añadido las líneas de código relevantes, inicia el entrenamiento desde un script o notebook como Colaboratory.",Se,U,B,ve,q,pt,he,gt="Entrenar con un script",Ve,D,Ct="Si estás corriendo tu entrenamiento desde un script ejecuta el siguiente comando para crear y guardar un archivo de configuración:",Re,O,Qe,ee,$t="Comienza el entrenamiento con:",He,te,ze,g,_,je,ae,dt,me,It="Entrenar con un notebook",Fe,le,At="🤗 Accelerate puede correr en un notebook si, por ejemplo, estás planeando utilizar las TPUs de Colaboratory. Encierra el código responsable del entrenamiento en una función y pásalo a <code>notebook_launcher</code>:",Pe,ne,Le,re,kt='Para obtener más información sobre 🤗 Accelerate y sus numerosas funciones, consulta la <a href="https://huggingface.co/docs/accelerate" rel="nofollow">documentación</a>.',Ke,be,qe;return W=new se({}),G=new se({}),x=new Z({props:{code:"cGlwJTIwaW5zdGFsbCUyMGFjY2VsZXJhdGU=",highlighted:"pip install accelerate"}}),N=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()`}}),S=new se({}),R=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>)`}}),Q=new se({}),z=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 se({}),q=new se({}),O=new Z({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config"}}),te=new Z({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHRyYWluLnB5",highlighted:"accelerate launch train.py"}}),ae=new se({}),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=s(),Me=n("p"),Ue=s(),J=n("h1"),C=n("a"),ue=n("span"),h(W.$$.fragment),rt=s(),oe=n("span"),oe.textContent=mt,ge=s(),X=n("p"),X.innerHTML=Mt,Ce=s(),v=n("h2"),$=n("a"),ye=n("span"),h(G.$$.fragment),st=s(),ie=n("span"),ie.textContent=ut,$e=s(),E=n("p"),E.textContent=yt,Ie=s(),h(x.$$.fragment),Ae=s(),Y=n("p"),Y.innerHTML=wt,ke=s(),h(N.$$.fragment),Be=s(),j=n("h2"),I=n("a"),we=n("span"),h(S.$$.fragment),ot=s(),ce=n("span"),ce.textContent=ft,_e=s(),V=n("p"),V.innerHTML=Jt,Ze=s(),h(R.$$.fragment),We=s(),b=n("h2"),A=n("a"),fe=n("span"),h(Q.$$.fragment),it=s(),pe=n("span"),pe.textContent=vt,Xe=s(),H=n("p"),H.innerHTML=jt,Ge=s(),h(z.$$.fragment),Ee=s(),F=n("p"),F.textContent=bt,xe=s(),h(P.$$.fragment),Ye=s(),T=n("h2"),k=n("a"),Je=n("span"),h(L.$$.fragment),ct=s(),de=n("span"),de.textContent=Tt,Ne=s(),K=n("p"),K.textContent=Ut,Se=s(),U=n("h3"),B=n("a"),ve=n("span"),h(q.$$.fragment),pt=s(),he=n("span"),he.textContent=gt,Ve=s(),D=n("p"),D.textContent=Ct,Re=s(),h(O.$$.fragment),Qe=s(),ee=n("p"),ee.textContent=$t,He=s(),h(te.$$.fragment),ze=s(),g=n("h3"),_=n("a"),je=n("span"),h(ae.$$.fragment),dt=s(),me=n("span"),me.textContent=It,Fe=s(),le=n("p"),le.innerHTML=At,Pe=s(),h(ne.$$.fragment),Le=s(),re=n("p"),re.innerHTML=kt,Ke=s(),be=n("p"),this.h()},l(e){const a=Kt("svelte-1phssyn",document.head);f=r(a,"META",{name:!0,content:!0}),a.forEach(t),Te=o(e),Me=r(e,"P",{}),p(Me).forEach(t),Ue=o(e),J=r(e,"H1",{class:!0});var De=p(J);C=r(De,"A",{id:!0,class:!0,href:!0});var Bt=p(C);ue=r(Bt,"SPAN",{});var _t=p(ue);m(W.$$.fragment,_t),_t.forEach(t),Bt.forEach(t),rt=o(De),oe=r(De,"SPAN",{"data-svelte-h":!0}),d(oe)!=="svelte-175az98"&&(oe.textContent=mt),De.forEach(t),ge=o(e),X=r(e,"P",{"data-svelte-h":!0}),d(X)!=="svelte-gsqkro"&&(X.innerHTML=Mt),Ce=o(e),v=r(e,"H2",{class:!0});var Oe=p(v);$=r(Oe,"A",{id:!0,class:!0,href:!0});var Zt=p($);ye=r(Zt,"SPAN",{});var Wt=p(ye);m(G.$$.fragment,Wt),Wt.forEach(t),Zt.forEach(t),st=o(Oe),ie=r(Oe,"SPAN",{"data-svelte-h":!0}),d(ie)!=="svelte-1fbnhy6"&&(ie.textContent=ut),Oe.forEach(t),$e=o(e),E=r(e,"P",{"data-svelte-h":!0}),d(E)!=="svelte-10vdwc7"&&(E.textContent=yt),Ie=o(e),m(x.$$.fragment,e),Ae=o(e),Y=r(e,"P",{"data-svelte-h":!0}),d(Y)!=="svelte-h27ljr"&&(Y.innerHTML=wt),ke=o(e),m(N.$$.fragment,e),Be=o(e),j=r(e,"H2",{class:!0});var et=p(j);I=r(et,"A",{id:!0,class:!0,href:!0});var Xt=p(I);we=r(Xt,"SPAN",{});var Gt=p(we);m(S.$$.fragment,Gt),Gt.forEach(t),Xt.forEach(t),ot=o(et),ce=r(et,"SPAN",{"data-svelte-h":!0}),d(ce)!=="svelte-1lmaxew"&&(ce.textContent=ft),et.forEach(t),_e=o(e),V=r(e,"P",{"data-svelte-h":!0}),d(V)!=="svelte-18shtua"&&(V.innerHTML=Jt),Ze=o(e),m(R.$$.fragment,e),We=o(e),b=r(e,"H2",{class:!0});var tt=p(b);A=r(tt,"A",{id:!0,class:!0,href:!0});var Et=p(A);fe=r(Et,"SPAN",{});var xt=p(fe);m(Q.$$.fragment,xt),xt.forEach(t),Et.forEach(t),it=o(tt),pe=r(tt,"SPAN",{"data-svelte-h":!0}),d(pe)!=="svelte-1hbv3ea"&&(pe.textContent=vt),tt.forEach(t),Xe=o(e),H=r(e,"P",{"data-svelte-h":!0}),d(H)!=="svelte-s1kttw"&&(H.innerHTML=jt),Ge=o(e),m(z.$$.fragment,e),Ee=o(e),F=r(e,"P",{"data-svelte-h":!0}),d(F)!=="svelte-hqe2mt"&&(F.textContent=bt),xe=o(e),m(P.$$.fragment,e),Ye=o(e),T=r(e,"H2",{class:!0});var at=p(T);k=r(at,"A",{id:!0,class:!0,href:!0});var Yt=p(k);Je=r(Yt,"SPAN",{});var Nt=p(Je);m(L.$$.fragment,Nt),Nt.forEach(t),Yt.forEach(t),ct=o(at),de=r(at,"SPAN",{"data-svelte-h":!0}),d(de)!=="svelte-1b8djky"&&(de.textContent=Tt),at.forEach(t),Ne=o(e),K=r(e,"P",{"data-svelte-h":!0}),d(K)!=="svelte-o7k00x"&&(K.textContent=Ut),Se=o(e),U=r(e,"H3",{class:!0});var lt=p(U);B=r(lt,"A",{id:!0,class:!0,href:!0});var St=p(B);ve=r(St,"SPAN",{});var Vt=p(ve);m(q.$$.fragment,Vt),Vt.forEach(t),St.forEach(t),pt=o(lt),he=r(lt,"SPAN",{"data-svelte-h":!0}),d(he)!=="svelte-1fcf5fs"&&(he.textContent=gt),lt.forEach(t),Ve=o(e),D=r(e,"P",{"data-svelte-h":!0}),d(D)!=="svelte-12guh7h"&&(D.textContent=Ct),Re=o(e),m(O.$$.fragment,e),Qe=o(e),ee=r(e,"P",{"data-svelte-h":!0}),d(ee)!=="svelte-d4zz74"&&(ee.textContent=$t),He=o(e),m(te.$$.fragment,e),ze=o(e),g=r(e,"H3",{class:!0});var nt=p(g);_=r(nt,"A",{id:!0,class:!0,href:!0});var Rt=p(_);je=r(Rt,"SPAN",{});var Qt=p(je);m(ae.$$.fragment,Qt),Qt.forEach(t),Rt.forEach(t),dt=o(nt),me=r(nt,"SPAN",{"data-svelte-h":!0}),d(me)!=="svelte-1vag7uy"&&(me.textContent=It),nt.forEach(t),Fe=o(e),le=r(e,"P",{"data-svelte-h":!0}),d(le)!=="svelte-18d6lv"&&(le.innerHTML=At),Pe=o(e),m(ne.$$.fragment,e),Le=o(e),re=r(e,"P",{"data-svelte-h":!0}),d(re)!=="svelte-zuhnw8"&&(re.innerHTML=kt),Ke=o(e),be=r(e,"P",{}),p(be).forEach(t),this.h()},h(){i(f,"name","hf:doc:metadata"),i(f,"content",JSON.stringify(Dt)),i(C,"id","entrenamiento-distribuido-con-accelerate"),i(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"),i(C,"href","#entrenamiento-distribuido-con-accelerate"),i(J,"class","relative group"),i($,"id","configuracin"),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"),i($,"href","#configuracin"),i(v,"class","relative group"),i(I,"id","preprate-para-acelerar"),i(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"),i(I,"href","#preprate-para-acelerar"),i(j,"class","relative group"),i(A,"id","backward"),i(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"),i(A,"href","#backward"),i(b,"class","relative group"),i(k,"id","entrenamiento"),i(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"),i(k,"href","#entrenamiento"),i(T,"class","relative group"),i(B,"id","entrenar-con-un-script"),i(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"),i(B,"href","#entrenar-con-un-script"),i(U,"class","relative group"),i(_,"id","entrenar-con-un-notebook"),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"),i(_,"href","#entrenar-con-un-notebook"),i(g,"class","relative group")},m(e,a){c(document.head,f),l(e,Te,a),l(e,Me,a),l(e,Ue,a),l(e,J,a),c(J,C),c(C,ue),M(W,ue,null),c(J,rt),c(J,oe),l(e,ge,a),l(e,X,a),l(e,Ce,a),l(e,v,a),c(v,$),c($,ye),M(G,ye,null),c(v,st),c(v,ie),l(e,$e,a),l(e,E,a),l(e,Ie,a),M(x,e,a),l(e,Ae,a),l(e,Y,a),l(e,ke,a),M(N,e,a),l(e,Be,a),l(e,j,a),c(j,I),c(I,we),M(S,we,null),c(j,ot),c(j,ce),l(e,_e,a),l(e,V,a),l(e,Ze,a),M(R,e,a),l(e,We,a),l(e,b,a),c(b,A),c(A,fe),M(Q,fe,null),c(b,it),c(b,pe),l(e,Xe,a),l(e,H,a),l(e,Ge,a),M(z,e,a),l(e,Ee,a),l(e,F,a),l(e,xe,a),M(P,e,a),l(e,Ye,a),l(e,T,a),c(T,k),c(k,Je),M(L,Je,null),c(T,ct),c(T,de),l(e,Ne,a),l(e,K,a),l(e,Se,a),l(e,U,a),c(U,B),c(B,ve),M(q,ve,null),c(U,pt),c(U,he),l(e,Ve,a),l(e,D,a),l(e,Re,a),M(O,e,a),l(e,Qe,a),l(e,ee,a),l(e,He,a),M(te,e,a),l(e,ze,a),l(e,g,a),c(g,_),c(_,je),M(ae,je,null),c(g,dt),c(g,me),l(e,Fe,a),l(e,le,a),l(e,Pe,a),M(ne,e,a),l(e,Le,a),l(e,re,a),l(e,Ke,a),l(e,be,a),qe=!0},p:zt,i(e){qe||(u(W.$$.fragment,e),u(G.$$.fragment,e),u(x.$$.fragment,e),u(N.$$.fragment,e),u(S.$$.fragment,e),u(R.$$.fragment,e),u(Q.$$.fragment,e),u(z.$$.fragment,e),u(P.$$.fragment,e),u(L.$$.fragment,e),u(q.$$.fragment,e),u(O.$$.fragment,e),u(te.$$.fragment,e),u(ae.$$.fragment,e),u(ne.$$.fragment,e),qe=!0)},o(e){y(W.$$.fragment,e),y(G.$$.fragment,e),y(x.$$.fragment,e),y(N.$$.fragment,e),y(S.$$.fragment,e),y(R.$$.fragment,e),y(Q.$$.fragment,e),y(z.$$.fragment,e),y(P.$$.fragment,e),y(L.$$.fragment,e),y(q.$$.fragment,e),y(O.$$.fragment,e),y(te.$$.fragment,e),y(ae.$$.fragment,e),y(ne.$$.fragment,e),qe=!1},d(e){e&&(t(Te),t(Me),t(Ue),t(J),t(ge),t(X),t(Ce),t(v),t($e),t(E),t(Ie),t(Ae),t(Y),t(ke),t(Be),t(j),t(_e),t(V),t(Ze),t(We),t(b),t(Xe),t(H),t(Ge),t(Ee),t(F),t(xe),t(Ye),t(T),t(Ne),t(K),t(Se),t(U),t(Ve),t(D),t(Re),t(Qe),t(ee),t(He),t(ze),t(g),t(Fe),t(le),t(Pe),t(Le),t(re),t(Ke),t(be)),t(f),w(W),w(G),w(x,e),w(N,e),w(S),w(R,e),w(Q),w(z,e),w(P,e),w(L),w(q),w(O,e),w(te,e),w(ae),w(ne,e)}}}const Dt={local:"entrenamiento-distribuido-con-accelerate",sections:[{local:"configuracin",title:"Configuración"},{local:"preprate-para-acelerar",title:"Prepárate para acelerar"},{local:"backward",title:"Backward"},{local:"entrenamiento",sections:[{local:"entrenar-con-un-script",title:"Entrenar con un script"},{local:"entrenar-con-un-notebook",title:"Entrenar con un notebook"}],title:"Entrenamiento"}],title:"Entrenamiento distribuido con 🤗 Accelerate"};function Ot(ht){return Ft(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class na extends Pt{constructor(f){super(),Lt(this,f,Ot,qt,Ht,{})}}export{na as component};
