import{S as Uo,i as Go,s as Lo,e as n,k as u,w as d,t as o,M as Bo,c as i,d as r,m as f,a,x as g,h as s,b as m,G as t,g as p,y as _,q as T,o as v,B as w,v as Fo}from"../../../chunks/vendor-hf-doc-builder.js";import{T as Yo}from"../../../chunks/Tip-hf-doc-builder.js";import{I as V}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{C as W}from"../../../chunks/CodeBlock-hf-doc-builder.js";function Mo(Ve){let h,D,c,R,k;return{c(){h=n("p"),D=o(`DeepSpeed is supported by ONNX Runtime(only ZeRO stage 1 and 2 for the moment).
You can find some `),c=n("a"),R=o("DeepSpeed configuration examples"),k=o(`
in the Optimum repository.`),this.h()},l($){h=i($,"P",{});var E=a(h);D=s(E,`DeepSpeed is supported by ONNX Runtime(only ZeRO stage 1 and 2 for the moment).
You can find some `),c=i(E,"A",{href:!0,rel:!0});var X=a(c);R=s(X,"DeepSpeed configuration examples"),X.forEach(r),k=s(E,`
in the Optimum repository.`),E.forEach(r),this.h()},h(){m(c,"href","https://github.com/huggingface/optimum/tree/main/tests/onnxruntime/ds_configs"),m(c,"rel","nofollow")},m($,E){p($,h,E),t(h,D),t(h,c),t(c,R),t(h,k)},d($){$&&r(h)}}}function Zo(Ve){let h,D,c,R,k;return{c(){h=n("p"),D=o(`DeepSpeed is supported by ONNX Runtime(only ZeRO stage 1 and 2 for the moment).
You can find some `),c=n("a"),R=o("DeepSpeed configuration examples"),k=o(`
in the Optimum repository.`),this.h()},l($){h=i($,"P",{});var E=a(h);D=s(E,`DeepSpeed is supported by ONNX Runtime(only ZeRO stage 1 and 2 for the moment).
You can find some `),c=i(E,"A",{href:!0,rel:!0});var X=a(c);R=s(X,"DeepSpeed configuration examples"),X.forEach(r),k=s(E,`
in the Optimum repository.`),E.forEach(r),this.h()},h(){m(c,"href","https://github.com/huggingface/optimum/tree/main/tests/onnxruntime/ds_configs"),m(c,"rel","nofollow")},m($,E){p($,h,E),t(h,D),t(h,c),t(c,R),t(h,k)},d($){$&&r(h)}}}function Vo(Ve){let h,D,c,R,k,$,E,X,Qr,rr,O,en,it,tn,rn,at,nn,an,ot,he,on,sn,st,ln,mn,lt,pn,un,mt,fn,hn,nr,Y,J,pt,ce,cn,ut,dn,ir,We,gn,ar,I,_n,ft,Tn,vn,ht,wn,$n,or,U,K,ct,de,On,dt,qn,sr,j,Sn,gt,En,Rn,ge,yn,An,lr,Q,bn,_e,Nn,xn,mr,Te,pr,Je,kn,ur,ve,fr,Ke,Dn,hr,we,cr,G,ee,_t,$e,Pn,Tt,Cn,dr,Qe,Xn,gr,Oe,_r,et,In,Tr,qe,vr,te,jn,Se,zn,Hn,wr,L,re,vt,Ee,Yn,wt,Un,$r,q,Gn,$t,Ln,Bn,Re,Ot,Fn,Mn,qt,Zn,Vn,St,Wn,Jn,Et,Kn,Qn,Rt,ei,ti,Or,ye,qr,ne,ri,Ae,ni,ii,Sr,B,ie,yt,be,ai,At,oi,Er,S,si,bt,li,mi,Ne,Nt,pi,ui,xt,fi,hi,kt,ci,di,Dt,gi,_i,Pt,Ti,vi,Rr,xe,yr,ae,wi,ke,$i,Oi,Ar,F,oe,Ct,De,qi,Xt,Si,br,y,Ei,It,Ri,yi,Pe,jt,Ai,bi,zt,Ni,xi,Ht,ki,Di,Nr,Ce,xr,se,kr,M,le,Yt,Xe,Pi,Ut,Ci,Dr,A,Xi,Gt,Ii,ji,Ie,Lt,zi,Hi,Bt,Yi,Ui,Ft,Gi,Li,Pr,je,Cr,me,Xr,Z,pe,Mt,ze,Bi,Zt,Fi,Ir,P,Vt,He,Mi,Zi,Wt,Ye,Vi,Wi,Jt,Ue,Ji,Ki,tt,Qi,Ge,Kt,Le,ea,ta,Qt,Be,ra,jr,C,na,er,ia,aa,Fe,oa,sa,Me,la,ma,zr;return $=new V({}),ce=new V({}),de=new V({}),Te=new W({props:{code:"docker build -f Dockerfile-ort1.12.0-cu113 -t <imagename:tag> .",highlighted:"docker build -f Dockerfile-ort1.12.0-cu113 -t &lt;imagename:tag&gt; ."}}),ve=new W({props:{code:`pip install onnx==1.12.0 ninja
pip install onnxruntime-training==1.12.0+cu113 -f https://download.onnxruntime.ai/onnxruntime_stable_cu113.html
pip install torch==1.12.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
pip install torch-ort
pip install transformers datasets accelerate
pip install --upgrade protobuf==3.20.1`,highlighted:`pip install onnx==1.12.0 ninja
pip install onnxruntime-training==1.12.0+cu113 -f https://download.onnxruntime.ai/onnxruntime_stable_cu113.html
pip install torch==1.12.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
pip install torch-ort
pip install transformers datasets accelerate
pip install --upgrade protobuf==3.20.1`}}),we=new W({props:{code:"python -m torch_ort.configure",highlighted:"python -m torch_ort.configure"}}),$e=new V({}),Oe=new W({props:{code:"pip install optimum",highlighted:"pip install optimum"}}),qe=new W({props:{code:"pip install git+https://github.com/huggingface/optimum.git",highlighted:"pip install git+https://github.com/huggingface/optimum.git"}}),Ee=new V({}),ye=new W({props:{code:`-from transformers import Trainer, TrainingArguments
+from optimum.onnxruntime import ORTTrainer, ORTTrainingArguments

# Step 1: Define training arguments
-training_args = TrainingArguments(
+training_args = ORTTrainingArguments(
    output_dir="path/to/save/folder/",
    optim-"adamw_ort_fused",
    ...
)

# Step 2: Create your ONNX Runtime Trainer
-trainer = Trainer(
+trainer = ORTTrainer(
    model=model,
    args=training_args,
    train_dataset=train_dataset,
+   feature="sequence-classification",
    ...
)

# Step 3: Use ONNX Runtime for training!\u{1F917}
trainer.train()`,highlighted:`<span class="hljs-deletion">-from transformers import Trainer, TrainingArguments</span>
<span class="hljs-addition">+from optimum.onnxruntime import ORTTrainer, ORTTrainingArguments</span>

# Step 1: Define training arguments
<span class="hljs-deletion">-training_args = TrainingArguments(</span>
<span class="hljs-addition">+training_args = ORTTrainingArguments(</span>
    output_dir=&quot;path/to/save/folder/&quot;,
    optim-&quot;adamw_ort_fused&quot;,
    ...
)

# Step 2: Create your ONNX Runtime Trainer
<span class="hljs-deletion">-trainer = Trainer(</span>
<span class="hljs-addition">+trainer = ORTTrainer(</span>
    model=model,
    args=training_args,
    train_dataset=train_dataset,
<span class="hljs-addition">+   feature=&quot;sequence-classification&quot;,</span>
    ...
)

# Step 3: Use ONNX Runtime for training!\u{1F917}
trainer.train()`}}),be=new V({}),xe=new W({props:{code:`-from transformers import Seq2SeqTrainer, Seq2SeqTrainingArguments
+from optimum.onnxruntime import ORTSeq2SeqTrainer, ORTSeq2SeqTrainingArguments

# Step 1: Define training arguments
-training_args = Seq2SeqTrainingArguments(
+training_args = ORTSeq2SeqTrainingArguments(
    output_dir="path/to/save/folder/",
    optim-"adamw_ort_fused",
    ...
)

# Step 2: Create your ONNX Runtime Seq2SeqTrainer
-trainer = Seq2SeqTrainer(
+trainer = ORTSeq2SeqTrainer(
    model=model,
    args=training_args,
    train_dataset=train_dataset,
+   feature="seq2seq-lm",
    ...
)

# Step 3: Use ONNX Runtime for training!\u{1F917}
trainer.train()`,highlighted:`<span class="hljs-deletion">-from transformers import Seq2SeqTrainer, Seq2SeqTrainingArguments</span>
<span class="hljs-addition">+from optimum.onnxruntime import ORTSeq2SeqTrainer, ORTSeq2SeqTrainingArguments</span>

# Step 1: Define training arguments
<span class="hljs-deletion">-training_args = Seq2SeqTrainingArguments(</span>
<span class="hljs-addition">+training_args = ORTSeq2SeqTrainingArguments(</span>
    output_dir=&quot;path/to/save/folder/&quot;,
    optim-&quot;adamw_ort_fused&quot;,
    ...
)

# Step 2: Create your ONNX Runtime Seq2SeqTrainer
<span class="hljs-deletion">-trainer = Seq2SeqTrainer(</span>
<span class="hljs-addition">+trainer = ORTSeq2SeqTrainer(</span>
    model=model,
    args=training_args,
    train_dataset=train_dataset,
<span class="hljs-addition">+   feature=&quot;seq2seq-lm&quot;,</span>
    ...
)

# Step 3: Use ONNX Runtime for training!\u{1F917}
trainer.train()`}}),De=new V({}),Ce=new W({props:{code:`-from transformers import TrainingArguments
+from optimum.onnxruntime import ORTTrainingArguments

-training_args = TrainingArguments(
+training_args =  ORTTrainingArguments(
    output_dir=tmp_dir,
    num_train_epochs=1,
    per_device_train_batch_size=8,
    per_device_eval_batch_size=8,
    warmup_steps=500,
    weight_decay=0.01,
    logging_dir=tmp_dir,
    optim="adamw_ort_fused",  # Fused Adam optimizer implemented by ORT
)`,highlighted:`<span class="hljs-deletion">-from transformers import TrainingArguments</span>
<span class="hljs-addition">+from optimum.onnxruntime import ORTTrainingArguments</span>

<span class="hljs-deletion">-training_args = TrainingArguments(</span>
<span class="hljs-addition">+training_args =  ORTTrainingArguments(</span>
    output_dir=tmp_dir,
    num_train_epochs=1,
    per_device_train_batch_size=8,
    per_device_eval_batch_size=8,
    warmup_steps=500,
    weight_decay=0.01,
    logging_dir=tmp_dir,
    optim=&quot;adamw_ort_fused&quot;,  # Fused Adam optimizer implemented by ORT
)`}}),se=new Yo({props:{warning:!1,$$slots:{default:[Mo]},$$scope:{ctx:Ve}}}),Xe=new V({}),je=new W({props:{code:`-from transformers import Seq2SeqTrainingArguments
+from optimum.onnxruntime import ORTSeq2SeqTrainingArguments

-training_args = Seq2SeqTrainingArguments(
+training_args =  ORTSeq2SeqTrainingArguments(
    output_dir=tmp_dir,
    num_train_epochs=1,
    per_device_train_batch_size=8,
    per_device_eval_batch_size=8,
    warmup_steps=500,
    weight_decay=0.01,
    logging_dir=tmp_dir,
    optim="adamw_ort_fused",  # Fused Adam optimizer implemented by ORT
)`,highlighted:`<span class="hljs-deletion">-from transformers import Seq2SeqTrainingArguments</span>
<span class="hljs-addition">+from optimum.onnxruntime import ORTSeq2SeqTrainingArguments</span>

<span class="hljs-deletion">-training_args = Seq2SeqTrainingArguments(</span>
<span class="hljs-addition">+training_args =  ORTSeq2SeqTrainingArguments(</span>
    output_dir=tmp_dir,
    num_train_epochs=1,
    per_device_train_batch_size=8,
    per_device_eval_batch_size=8,
    warmup_steps=500,
    weight_decay=0.01,
    logging_dir=tmp_dir,
    optim=&quot;adamw_ort_fused&quot;,  # Fused Adam optimizer implemented by ORT
)`}}),me=new Yo({props:{warning:!1,$$slots:{default:[Zo]},$$scope:{ctx:Ve}}}),ze=new V({}),{c(){h=n("meta"),D=u(),c=n("h1"),R=n("a"),k=n("span"),d($.$$.fragment),E=u(),X=n("span"),Qr=o("Trainer"),rr=u(),O=n("p"),en=o("The "),it=n("code"),tn=o("ORTTrainer"),rn=o(" and "),at=n("code"),nn=o("ORTSeq2SeqTrainer"),an=o(" classes provide APIs for training PyTorch models with "),ot=n("strong"),he=n("a"),on=o("ONNX Runtime (ORT)"),sn=o(`.
Taking ONNX Runtime as backend, `),st=n("code"),ln=o("ORTTrainer"),mn=o(" and "),lt=n("code"),pn=o("ORTSeq2SeqTrainer"),un=o(` optimize the computation graph and the memory usage. They also support
mixed precision training implemented by ORT, as well as distributed training on multiple GPUs. With them, you will be able to achieve
`),mt=n("strong"),fn=o("lower latency, higher throughput, and larger maximum batch size"),hn=o(" while training large transformers models."),nr=u(),Y=n("h2"),J=n("a"),pt=n("span"),d(ce.$$.fragment),cn=u(),ut=n("span"),dn=o("Prerequisite"),ir=u(),We=n("p"),gn=o("To use ONNX Runtime for training, you need a machine with at least one NVIDIA or AMD GPU."),ar=u(),I=n("p"),_n=o("To use "),ft=n("code"),Tn=o("ORTTrainer"),vn=o(" or "),ht=n("code"),wn=o("ORTSeq2SeqTrainer"),$n=o(", you need to install ONNX Runtime Training module and Optimum."),or=u(),U=n("h3"),K=n("a"),ct=n("span"),d(de.$$.fragment),On=u(),dt=n("span"),qn=o("Install ONNX Runtime"),sr=u(),j=n("p"),Sn=o("To set up the environment, we "),gt=n("strong"),En=o("strongly recommend"),Rn=o(` you install the dependencies with Docker to ensure that the versions are correct and well
configured. You can find dockerfiles with various combinations `),ge=n("a"),yn=o("here"),An=o("."),lr=u(),Q=n("p"),bn=o("For example, if you want to install "),_e=n("a"),Nn=o("onnxruntime-training 1.12.0"),xn=o(" via Dockerfile:"),mr=u(),d(Te.$$.fragment),pr=u(),Je=n("p"),kn=o("If you want to install the dependencies beyond in a local Python environment. You can pip install them once you have CUDA 11.3 and cuDNN 8 well installed."),ur=u(),d(ve.$$.fragment),fr=u(),Ke=n("p"),Dn=o("And run post-installation configuration:"),hr=u(),d(we.$$.fragment),cr=u(),G=n("h3"),ee=n("a"),_t=n("span"),d($e.$$.fragment),Pn=u(),Tt=n("span"),Cn=o("Install Optimum"),dr=u(),Qe=n("p"),Xn=o("You can install Optimum via pypi:"),gr=u(),d(Oe.$$.fragment),_r=u(),et=n("p"),In=o("Or install from source:"),Tr=u(),d(qe.$$.fragment),vr=u(),te=n("p"),jn=o(`This command installs the current main dev version of Optimum, which could include latest developments(new features, bug fixes). However, the
main version might not be very stable. If you run into any problem, please open an `),Se=n("a"),zn=o("issue"),Hn=o(` so
that we can fix it as soon as possible.`),wr=u(),L=n("h2"),re=n("a"),vt=n("span"),d(Ee.$$.fragment),Yn=u(),wt=n("span"),Un=o("ORTTrainer"),$r=u(),q=n("p"),Gn=o("The "),$t=n("code"),Ln=o("ORTTrainer"),Bn=o(" class inherits the "),Re=n("a"),Ot=n("code"),Fn=o("Trainer"),Mn=o(`
of Transformers. You can easily adapt the codes by replacing `),qt=n("code"),Zn=o("Trainer"),Vn=o(" of transformers with "),St=n("code"),Wn=o("ORTTrainer"),Jn=o(` to take advantage of the acceleration
empowered by ONNX Runtime. Here is an example of how to use `),Et=n("code"),Kn=o("ORTTrainer"),Qn=o(" compared with "),Rt=n("code"),ei=o("Trainer"),ti=o(":"),Or=u(),d(ye.$$.fragment),qr=u(),ne=n("p"),ri=o("Check out more detailed "),Ae=n("a"),ni=o("example scripts"),ii=o(" in the optimum repository."),Sr=u(),B=n("h2"),ie=n("a"),yt=n("span"),d(be.$$.fragment),ai=u(),At=n("span"),oi=o("ORTSeq2SeqTrainer"),Er=u(),S=n("p"),si=o("The "),bt=n("code"),li=o("ORTSeq2SeqTrainer"),mi=o(" class is similar to the "),Ne=n("a"),Nt=n("code"),pi=o("Seq2SeqTrainer"),ui=o(`
of Transformers. You can easily adapt the codes by replacing `),xt=n("code"),fi=o("Seq2SeqTrainer"),hi=o(" of transformers with "),kt=n("code"),ci=o("ORTSeq2SeqTrainer"),di=o(` to take advantage of the acceleration
empowered by ONNX Runtime. Here is an example of how to use `),Dt=n("code"),gi=o("ORTSeq2SeqTrainer"),_i=o(" compared with "),Pt=n("code"),Ti=o("Seq2SeqTrainer"),vi=o(":"),Rr=u(),d(xe.$$.fragment),yr=u(),ae=n("p"),wi=o("Check out more detailed "),ke=n("a"),$i=o("example scripts"),Oi=o(" in the optimum repository."),Ar=u(),F=n("h2"),oe=n("a"),Ct=n("span"),d(De.$$.fragment),qi=u(),Xt=n("span"),Si=o("ORTTrainingArguments"),br=u(),y=n("p"),Ei=o("The "),It=n("code"),Ri=o("ORTTrainingArguments"),yi=o(" class inherits the "),Pe=n("a"),jt=n("code"),Ai=o("TrainingArguments"),bi=o(`
class in Transformers. Besides the optimizers implemented in Transformers, it allows you to use the optimizers implemented in ONNX Runtime.
Replace `),zt=n("code"),Ni=o("Seq2SeqTrainingArguments"),xi=o(" with "),Ht=n("code"),ki=o("ORTSeq2SeqTrainingArguments"),Di=o(":"),Nr=u(),d(Ce.$$.fragment),xr=u(),d(se.$$.fragment),kr=u(),M=n("h2"),le=n("a"),Yt=n("span"),d(Xe.$$.fragment),Pi=u(),Ut=n("span"),Ci=o("ORTSeq2SeqTrainingArguments"),Dr=u(),A=n("p"),Xi=o("The "),Gt=n("code"),Ii=o("ORTSeq2SeqTrainingArguments"),ji=o(" class inherits the "),Ie=n("a"),Lt=n("code"),zi=o("Seq2SeqTrainingArguments"),Hi=o(`
class in Transformers. Besides the optimizers implemented in Transformers, it allows you to use the optimizers implemented in ONNX Runtime.
Replace `),Bt=n("code"),Yi=o("Seq2SeqTrainingArguments"),Ui=o(" with "),Ft=n("code"),Gi=o("ORTSeq2SeqTrainingArguments"),Li=o(":"),Pr=u(),d(je.$$.fragment),Cr=u(),d(me.$$.fragment),Xr=u(),Z=n("h2"),pe=n("a"),Mt=n("span"),d(ze.$$.fragment),Bi=u(),Zt=n("span"),Fi=o("Other Resources"),Ir=u(),P=n("ul"),Vt=n("li"),He=n("a"),Mi=o("ONNX Runtime github"),Zi=u(),Wt=n("li"),Ye=n("a"),Vi=o("Torch ORT github"),Wi=u(),Jt=n("li"),Ue=n("a"),Ji=o("Download ONNX Runtime stable versions"),Ki=u(),tt=n("li"),Qi=o("Blog posts"),Ge=n("ul"),Kt=n("li"),Le=n("a"),ea=o("Accelerate PyTorch transformer model training with ONNX Runtime \u2013 a deep dive"),ta=u(),Qt=n("li"),Be=n("a"),ra=o("ONNX Runtime Training Technical Deep Dive"),jr=u(),C=n("p"),na=o("If you have any problems or questions regarding "),er=n("code"),ia=o("ORTTrainer"),aa=o(", please file an issue with "),Fe=n("a"),oa=o("Optimum Github"),sa=o(`
or discuss with us on `),Me=n("a"),la=o("HuggingFace\u2019s community forum"),ma=o(", cheers \u{1F917} !"),this.h()},l(e){const l=Bo('[data-svelte="svelte-1phssyn"]',document.head);h=i(l,"META",{name:!0,content:!0}),l.forEach(r),D=f(e),c=i(e,"H1",{class:!0});var Ze=a(c);R=i(Ze,"A",{id:!0,class:!0,href:!0});var tr=a(R);k=i(tr,"SPAN",{});var ua=a(k);g($.$$.fragment,ua),ua.forEach(r),tr.forEach(r),E=f(Ze),X=i(Ze,"SPAN",{});var fa=a(X);Qr=s(fa,"Trainer"),fa.forEach(r),Ze.forEach(r),rr=f(e),O=i(e,"P",{});var b=a(O);en=s(b,"The "),it=i(b,"CODE",{});var ha=a(it);tn=s(ha,"ORTTrainer"),ha.forEach(r),rn=s(b," and "),at=i(b,"CODE",{});var ca=a(at);nn=s(ca,"ORTSeq2SeqTrainer"),ca.forEach(r),an=s(b," classes provide APIs for training PyTorch models with "),ot=i(b,"STRONG",{});var da=a(ot);he=i(da,"A",{href:!0,rel:!0});var ga=a(he);on=s(ga,"ONNX Runtime (ORT)"),ga.forEach(r),da.forEach(r),sn=s(b,`.
Taking ONNX Runtime as backend, `),st=i(b,"CODE",{});var _a=a(st);ln=s(_a,"ORTTrainer"),_a.forEach(r),mn=s(b," and "),lt=i(b,"CODE",{});var Ta=a(lt);pn=s(Ta,"ORTSeq2SeqTrainer"),Ta.forEach(r),un=s(b,` optimize the computation graph and the memory usage. They also support
mixed precision training implemented by ORT, as well as distributed training on multiple GPUs. With them, you will be able to achieve
`),mt=i(b,"STRONG",{});var va=a(mt);fn=s(va,"lower latency, higher throughput, and larger maximum batch size"),va.forEach(r),hn=s(b," while training large transformers models."),b.forEach(r),nr=f(e),Y=i(e,"H2",{class:!0});var Hr=a(Y);J=i(Hr,"A",{id:!0,class:!0,href:!0});var wa=a(J);pt=i(wa,"SPAN",{});var $a=a(pt);g(ce.$$.fragment,$a),$a.forEach(r),wa.forEach(r),cn=f(Hr),ut=i(Hr,"SPAN",{});var Oa=a(ut);dn=s(Oa,"Prerequisite"),Oa.forEach(r),Hr.forEach(r),ir=f(e),We=i(e,"P",{});var qa=a(We);gn=s(qa,"To use ONNX Runtime for training, you need a machine with at least one NVIDIA or AMD GPU."),qa.forEach(r),ar=f(e),I=i(e,"P",{});var rt=a(I);_n=s(rt,"To use "),ft=i(rt,"CODE",{});var Sa=a(ft);Tn=s(Sa,"ORTTrainer"),Sa.forEach(r),vn=s(rt," or "),ht=i(rt,"CODE",{});var Ea=a(ht);wn=s(Ea,"ORTSeq2SeqTrainer"),Ea.forEach(r),$n=s(rt,", you need to install ONNX Runtime Training module and Optimum."),rt.forEach(r),or=f(e),U=i(e,"H3",{class:!0});var Yr=a(U);K=i(Yr,"A",{id:!0,class:!0,href:!0});var Ra=a(K);ct=i(Ra,"SPAN",{});var ya=a(ct);g(de.$$.fragment,ya),ya.forEach(r),Ra.forEach(r),On=f(Yr),dt=i(Yr,"SPAN",{});var Aa=a(dt);qn=s(Aa,"Install ONNX Runtime"),Aa.forEach(r),Yr.forEach(r),sr=f(e),j=i(e,"P",{});var nt=a(j);Sn=s(nt,"To set up the environment, we "),gt=i(nt,"STRONG",{});var ba=a(gt);En=s(ba,"strongly recommend"),ba.forEach(r),Rn=s(nt,` you install the dependencies with Docker to ensure that the versions are correct and well
configured. You can find dockerfiles with various combinations `),ge=i(nt,"A",{href:!0,rel:!0});var Na=a(ge);yn=s(Na,"here"),Na.forEach(r),An=s(nt,"."),nt.forEach(r),lr=f(e),Q=i(e,"P",{});var Ur=a(Q);bn=s(Ur,"For example, if you want to install "),_e=i(Ur,"A",{href:!0,rel:!0});var xa=a(_e);Nn=s(xa,"onnxruntime-training 1.12.0"),xa.forEach(r),xn=s(Ur," via Dockerfile:"),Ur.forEach(r),mr=f(e),g(Te.$$.fragment,e),pr=f(e),Je=i(e,"P",{});var ka=a(Je);kn=s(ka,"If you want to install the dependencies beyond in a local Python environment. You can pip install them once you have CUDA 11.3 and cuDNN 8 well installed."),ka.forEach(r),ur=f(e),g(ve.$$.fragment,e),fr=f(e),Ke=i(e,"P",{});var Da=a(Ke);Dn=s(Da,"And run post-installation configuration:"),Da.forEach(r),hr=f(e),g(we.$$.fragment,e),cr=f(e),G=i(e,"H3",{class:!0});var Gr=a(G);ee=i(Gr,"A",{id:!0,class:!0,href:!0});var Pa=a(ee);_t=i(Pa,"SPAN",{});var Ca=a(_t);g($e.$$.fragment,Ca),Ca.forEach(r),Pa.forEach(r),Pn=f(Gr),Tt=i(Gr,"SPAN",{});var Xa=a(Tt);Cn=s(Xa,"Install Optimum"),Xa.forEach(r),Gr.forEach(r),dr=f(e),Qe=i(e,"P",{});var Ia=a(Qe);Xn=s(Ia,"You can install Optimum via pypi:"),Ia.forEach(r),gr=f(e),g(Oe.$$.fragment,e),_r=f(e),et=i(e,"P",{});var ja=a(et);In=s(ja,"Or install from source:"),ja.forEach(r),Tr=f(e),g(qe.$$.fragment,e),vr=f(e),te=i(e,"P",{});var Lr=a(te);jn=s(Lr,`This command installs the current main dev version of Optimum, which could include latest developments(new features, bug fixes). However, the
main version might not be very stable. If you run into any problem, please open an `),Se=i(Lr,"A",{href:!0,rel:!0});var za=a(Se);zn=s(za,"issue"),za.forEach(r),Hn=s(Lr,` so
that we can fix it as soon as possible.`),Lr.forEach(r),wr=f(e),L=i(e,"H2",{class:!0});var Br=a(L);re=i(Br,"A",{id:!0,class:!0,href:!0});var Ha=a(re);vt=i(Ha,"SPAN",{});var Ya=a(vt);g(Ee.$$.fragment,Ya),Ya.forEach(r),Ha.forEach(r),Yn=f(Br),wt=i(Br,"SPAN",{});var Ua=a(wt);Un=s(Ua,"ORTTrainer"),Ua.forEach(r),Br.forEach(r),$r=f(e),q=i(e,"P",{});var N=a(q);Gn=s(N,"The "),$t=i(N,"CODE",{});var Ga=a($t);Ln=s(Ga,"ORTTrainer"),Ga.forEach(r),Bn=s(N," class inherits the "),Re=i(N,"A",{href:!0,rel:!0});var La=a(Re);Ot=i(La,"CODE",{});var Ba=a(Ot);Fn=s(Ba,"Trainer"),Ba.forEach(r),La.forEach(r),Mn=s(N,`
of Transformers. You can easily adapt the codes by replacing `),qt=i(N,"CODE",{});var Fa=a(qt);Zn=s(Fa,"Trainer"),Fa.forEach(r),Vn=s(N," of transformers with "),St=i(N,"CODE",{});var Ma=a(St);Wn=s(Ma,"ORTTrainer"),Ma.forEach(r),Jn=s(N,` to take advantage of the acceleration
empowered by ONNX Runtime. Here is an example of how to use `),Et=i(N,"CODE",{});var Za=a(Et);Kn=s(Za,"ORTTrainer"),Za.forEach(r),Qn=s(N," compared with "),Rt=i(N,"CODE",{});var Va=a(Rt);ei=s(Va,"Trainer"),Va.forEach(r),ti=s(N,":"),N.forEach(r),Or=f(e),g(ye.$$.fragment,e),qr=f(e),ne=i(e,"P",{});var Fr=a(ne);ri=s(Fr,"Check out more detailed "),Ae=i(Fr,"A",{href:!0,rel:!0});var Wa=a(Ae);ni=s(Wa,"example scripts"),Wa.forEach(r),ii=s(Fr," in the optimum repository."),Fr.forEach(r),Sr=f(e),B=i(e,"H2",{class:!0});var Mr=a(B);ie=i(Mr,"A",{id:!0,class:!0,href:!0});var Ja=a(ie);yt=i(Ja,"SPAN",{});var Ka=a(yt);g(be.$$.fragment,Ka),Ka.forEach(r),Ja.forEach(r),ai=f(Mr),At=i(Mr,"SPAN",{});var Qa=a(At);oi=s(Qa,"ORTSeq2SeqTrainer"),Qa.forEach(r),Mr.forEach(r),Er=f(e),S=i(e,"P",{});var x=a(S);si=s(x,"The "),bt=i(x,"CODE",{});var eo=a(bt);li=s(eo,"ORTSeq2SeqTrainer"),eo.forEach(r),mi=s(x," class is similar to the "),Ne=i(x,"A",{href:!0,rel:!0});var to=a(Ne);Nt=i(to,"CODE",{});var ro=a(Nt);pi=s(ro,"Seq2SeqTrainer"),ro.forEach(r),to.forEach(r),ui=s(x,`
of Transformers. You can easily adapt the codes by replacing `),xt=i(x,"CODE",{});var no=a(xt);fi=s(no,"Seq2SeqTrainer"),no.forEach(r),hi=s(x," of transformers with "),kt=i(x,"CODE",{});var io=a(kt);ci=s(io,"ORTSeq2SeqTrainer"),io.forEach(r),di=s(x,` to take advantage of the acceleration
empowered by ONNX Runtime. Here is an example of how to use `),Dt=i(x,"CODE",{});var ao=a(Dt);gi=s(ao,"ORTSeq2SeqTrainer"),ao.forEach(r),_i=s(x," compared with "),Pt=i(x,"CODE",{});var oo=a(Pt);Ti=s(oo,"Seq2SeqTrainer"),oo.forEach(r),vi=s(x,":"),x.forEach(r),Rr=f(e),g(xe.$$.fragment,e),yr=f(e),ae=i(e,"P",{});var Zr=a(ae);wi=s(Zr,"Check out more detailed "),ke=i(Zr,"A",{href:!0,rel:!0});var so=a(ke);$i=s(so,"example scripts"),so.forEach(r),Oi=s(Zr," in the optimum repository."),Zr.forEach(r),Ar=f(e),F=i(e,"H2",{class:!0});var Vr=a(F);oe=i(Vr,"A",{id:!0,class:!0,href:!0});var lo=a(oe);Ct=i(lo,"SPAN",{});var mo=a(Ct);g(De.$$.fragment,mo),mo.forEach(r),lo.forEach(r),qi=f(Vr),Xt=i(Vr,"SPAN",{});var po=a(Xt);Si=s(po,"ORTTrainingArguments"),po.forEach(r),Vr.forEach(r),br=f(e),y=i(e,"P",{});var z=a(y);Ei=s(z,"The "),It=i(z,"CODE",{});var uo=a(It);Ri=s(uo,"ORTTrainingArguments"),uo.forEach(r),yi=s(z," class inherits the "),Pe=i(z,"A",{href:!0,rel:!0});var fo=a(Pe);jt=i(fo,"CODE",{});var ho=a(jt);Ai=s(ho,"TrainingArguments"),ho.forEach(r),fo.forEach(r),bi=s(z,`
class in Transformers. Besides the optimizers implemented in Transformers, it allows you to use the optimizers implemented in ONNX Runtime.
Replace `),zt=i(z,"CODE",{});var co=a(zt);Ni=s(co,"Seq2SeqTrainingArguments"),co.forEach(r),xi=s(z," with "),Ht=i(z,"CODE",{});var go=a(Ht);ki=s(go,"ORTSeq2SeqTrainingArguments"),go.forEach(r),Di=s(z,":"),z.forEach(r),Nr=f(e),g(Ce.$$.fragment,e),xr=f(e),g(se.$$.fragment,e),kr=f(e),M=i(e,"H2",{class:!0});var Wr=a(M);le=i(Wr,"A",{id:!0,class:!0,href:!0});var _o=a(le);Yt=i(_o,"SPAN",{});var To=a(Yt);g(Xe.$$.fragment,To),To.forEach(r),_o.forEach(r),Pi=f(Wr),Ut=i(Wr,"SPAN",{});var vo=a(Ut);Ci=s(vo,"ORTSeq2SeqTrainingArguments"),vo.forEach(r),Wr.forEach(r),Dr=f(e),A=i(e,"P",{});var H=a(A);Xi=s(H,"The "),Gt=i(H,"CODE",{});var wo=a(Gt);Ii=s(wo,"ORTSeq2SeqTrainingArguments"),wo.forEach(r),ji=s(H," class inherits the "),Ie=i(H,"A",{href:!0,rel:!0});var $o=a(Ie);Lt=i($o,"CODE",{});var Oo=a(Lt);zi=s(Oo,"Seq2SeqTrainingArguments"),Oo.forEach(r),$o.forEach(r),Hi=s(H,`
class in Transformers. Besides the optimizers implemented in Transformers, it allows you to use the optimizers implemented in ONNX Runtime.
Replace `),Bt=i(H,"CODE",{});var qo=a(Bt);Yi=s(qo,"Seq2SeqTrainingArguments"),qo.forEach(r),Ui=s(H," with "),Ft=i(H,"CODE",{});var So=a(Ft);Gi=s(So,"ORTSeq2SeqTrainingArguments"),So.forEach(r),Li=s(H,":"),H.forEach(r),Pr=f(e),g(je.$$.fragment,e),Cr=f(e),g(me.$$.fragment,e),Xr=f(e),Z=i(e,"H2",{class:!0});var Jr=a(Z);pe=i(Jr,"A",{id:!0,class:!0,href:!0});var Eo=a(pe);Mt=i(Eo,"SPAN",{});var Ro=a(Mt);g(ze.$$.fragment,Ro),Ro.forEach(r),Eo.forEach(r),Bi=f(Jr),Zt=i(Jr,"SPAN",{});var yo=a(Zt);Fi=s(yo,"Other Resources"),yo.forEach(r),Jr.forEach(r),Ir=f(e),P=i(e,"UL",{});var ue=a(P);Vt=i(ue,"LI",{});var Ao=a(Vt);He=i(Ao,"A",{href:!0,rel:!0});var bo=a(He);Mi=s(bo,"ONNX Runtime github"),bo.forEach(r),Ao.forEach(r),Zi=f(ue),Wt=i(ue,"LI",{});var No=a(Wt);Ye=i(No,"A",{href:!0,rel:!0});var xo=a(Ye);Vi=s(xo,"Torch ORT github"),xo.forEach(r),No.forEach(r),Wi=f(ue),Jt=i(ue,"LI",{});var ko=a(Jt);Ue=i(ko,"A",{href:!0,rel:!0});var Do=a(Ue);Ji=s(Do,"Download ONNX Runtime stable versions"),Do.forEach(r),ko.forEach(r),Ki=f(ue),tt=i(ue,"LI",{});var pa=a(tt);Qi=s(pa,"Blog posts"),Ge=i(pa,"UL",{});var Kr=a(Ge);Kt=i(Kr,"LI",{});var Po=a(Kt);Le=i(Po,"A",{href:!0,rel:!0});var Co=a(Le);ea=s(Co,"Accelerate PyTorch transformer model training with ONNX Runtime \u2013 a deep dive"),Co.forEach(r),Po.forEach(r),ta=f(Kr),Qt=i(Kr,"LI",{});var Xo=a(Qt);Be=i(Xo,"A",{href:!0,rel:!0});var Io=a(Be);ra=s(Io,"ONNX Runtime Training Technical Deep Dive"),Io.forEach(r),Xo.forEach(r),Kr.forEach(r),pa.forEach(r),ue.forEach(r),jr=f(e),C=i(e,"P",{});var fe=a(C);na=s(fe,"If you have any problems or questions regarding "),er=i(fe,"CODE",{});var jo=a(er);ia=s(jo,"ORTTrainer"),jo.forEach(r),aa=s(fe,", please file an issue with "),Fe=i(fe,"A",{href:!0,rel:!0});var zo=a(Fe);oa=s(zo,"Optimum Github"),zo.forEach(r),sa=s(fe,`
or discuss with us on `),Me=i(fe,"A",{href:!0,rel:!0});var Ho=a(Me);la=s(Ho,"HuggingFace\u2019s community forum"),Ho.forEach(r),ma=s(fe,", cheers \u{1F917} !"),fe.forEach(r),this.h()},h(){m(h,"name","hf:doc:metadata"),m(h,"content",JSON.stringify(Wo)),m(R,"id","trainer"),m(R,"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"),m(R,"href","#trainer"),m(c,"class","relative group"),m(he,"href","https://onnxruntime.ai/"),m(he,"rel","nofollow"),m(J,"id","prerequisite"),m(J,"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"),m(J,"href","#prerequisite"),m(Y,"class","relative group"),m(K,"id","install-onnx-runtime"),m(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"),m(K,"href","#install-onnx-runtime"),m(U,"class","relative group"),m(ge,"href","https://github.com/huggingface/optimum/tree/main/examples/onnxruntime/training/docker"),m(ge,"rel","nofollow"),m(_e,"href","https://github.com/huggingface/optimum/blob/main/examples/onnxruntime/training/docker/Dockerfile-ort1.12.0-cu113"),m(_e,"rel","nofollow"),m(ee,"id","install-optimum"),m(ee,"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"),m(ee,"href","#install-optimum"),m(G,"class","relative group"),m(Se,"href","https://github.com/huggingface/optimum/issues"),m(Se,"rel","nofollow"),m(re,"id","orttrainer"),m(re,"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"),m(re,"href","#orttrainer"),m(L,"class","relative group"),m(Re,"href","https://huggingface.co/docs/transformers/main/en/main_classes/trainer#trainer"),m(Re,"rel","nofollow"),m(Ae,"href","https://github.com/huggingface/optimum/tree/main/examples/onnxruntime/training"),m(Ae,"rel","nofollow"),m(ie,"id","ortseq2seqtrainer"),m(ie,"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"),m(ie,"href","#ortseq2seqtrainer"),m(B,"class","relative group"),m(Ne,"href","https://huggingface.co/docs/transformers/main/en/main_classes/trainer#transformers.Seq2SeqTrainer"),m(Ne,"rel","nofollow"),m(ke,"href","https://github.com/huggingface/optimum/tree/main/examples/onnxruntime/training"),m(ke,"rel","nofollow"),m(oe,"id","orttrainingarguments"),m(oe,"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"),m(oe,"href","#orttrainingarguments"),m(F,"class","relative group"),m(Pe,"href","https://huggingface.co/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments"),m(Pe,"rel","nofollow"),m(le,"id","ortseq2seqtrainingarguments"),m(le,"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"),m(le,"href","#ortseq2seqtrainingarguments"),m(M,"class","relative group"),m(Ie,"href","https://huggingface.co/docs/transformers/main/en/main_classes/trainer#transformers.Seq2SeqTrainingArguments"),m(Ie,"rel","nofollow"),m(pe,"id","other-resources"),m(pe,"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"),m(pe,"href","#other-resources"),m(Z,"class","relative group"),m(He,"href","https://github.com/microsoft/onnxruntime"),m(He,"rel","nofollow"),m(Ye,"href","https://github.com/pytorch/ort"),m(Ye,"rel","nofollow"),m(Ue,"href","https://download.onnxruntime.ai/"),m(Ue,"rel","nofollow"),m(Le,"href","https://techcommunity.microsoft.com/t5/ai-machine-learning-blog/accelerate-pytorch-transformer-model-training-with-onnx-runtime/ba-p/2540471"),m(Le,"rel","nofollow"),m(Be,"href","https://techcommunity.microsoft.com/t5/ai-machine-learning-blog/onnx-runtime-training-technical-deep-dive/ba-p/1398310"),m(Be,"rel","nofollow"),m(Fe,"href","https://github.com/huggingface/optimum"),m(Fe,"rel","nofollow"),m(Me,"href","https://discuss.huggingface.co/c/optimum/"),m(Me,"rel","nofollow")},m(e,l){t(document.head,h),p(e,D,l),p(e,c,l),t(c,R),t(R,k),_($,k,null),t(c,E),t(c,X),t(X,Qr),p(e,rr,l),p(e,O,l),t(O,en),t(O,it),t(it,tn),t(O,rn),t(O,at),t(at,nn),t(O,an),t(O,ot),t(ot,he),t(he,on),t(O,sn),t(O,st),t(st,ln),t(O,mn),t(O,lt),t(lt,pn),t(O,un),t(O,mt),t(mt,fn),t(O,hn),p(e,nr,l),p(e,Y,l),t(Y,J),t(J,pt),_(ce,pt,null),t(Y,cn),t(Y,ut),t(ut,dn),p(e,ir,l),p(e,We,l),t(We,gn),p(e,ar,l),p(e,I,l),t(I,_n),t(I,ft),t(ft,Tn),t(I,vn),t(I,ht),t(ht,wn),t(I,$n),p(e,or,l),p(e,U,l),t(U,K),t(K,ct),_(de,ct,null),t(U,On),t(U,dt),t(dt,qn),p(e,sr,l),p(e,j,l),t(j,Sn),t(j,gt),t(gt,En),t(j,Rn),t(j,ge),t(ge,yn),t(j,An),p(e,lr,l),p(e,Q,l),t(Q,bn),t(Q,_e),t(_e,Nn),t(Q,xn),p(e,mr,l),_(Te,e,l),p(e,pr,l),p(e,Je,l),t(Je,kn),p(e,ur,l),_(ve,e,l),p(e,fr,l),p(e,Ke,l),t(Ke,Dn),p(e,hr,l),_(we,e,l),p(e,cr,l),p(e,G,l),t(G,ee),t(ee,_t),_($e,_t,null),t(G,Pn),t(G,Tt),t(Tt,Cn),p(e,dr,l),p(e,Qe,l),t(Qe,Xn),p(e,gr,l),_(Oe,e,l),p(e,_r,l),p(e,et,l),t(et,In),p(e,Tr,l),_(qe,e,l),p(e,vr,l),p(e,te,l),t(te,jn),t(te,Se),t(Se,zn),t(te,Hn),p(e,wr,l),p(e,L,l),t(L,re),t(re,vt),_(Ee,vt,null),t(L,Yn),t(L,wt),t(wt,Un),p(e,$r,l),p(e,q,l),t(q,Gn),t(q,$t),t($t,Ln),t(q,Bn),t(q,Re),t(Re,Ot),t(Ot,Fn),t(q,Mn),t(q,qt),t(qt,Zn),t(q,Vn),t(q,St),t(St,Wn),t(q,Jn),t(q,Et),t(Et,Kn),t(q,Qn),t(q,Rt),t(Rt,ei),t(q,ti),p(e,Or,l),_(ye,e,l),p(e,qr,l),p(e,ne,l),t(ne,ri),t(ne,Ae),t(Ae,ni),t(ne,ii),p(e,Sr,l),p(e,B,l),t(B,ie),t(ie,yt),_(be,yt,null),t(B,ai),t(B,At),t(At,oi),p(e,Er,l),p(e,S,l),t(S,si),t(S,bt),t(bt,li),t(S,mi),t(S,Ne),t(Ne,Nt),t(Nt,pi),t(S,ui),t(S,xt),t(xt,fi),t(S,hi),t(S,kt),t(kt,ci),t(S,di),t(S,Dt),t(Dt,gi),t(S,_i),t(S,Pt),t(Pt,Ti),t(S,vi),p(e,Rr,l),_(xe,e,l),p(e,yr,l),p(e,ae,l),t(ae,wi),t(ae,ke),t(ke,$i),t(ae,Oi),p(e,Ar,l),p(e,F,l),t(F,oe),t(oe,Ct),_(De,Ct,null),t(F,qi),t(F,Xt),t(Xt,Si),p(e,br,l),p(e,y,l),t(y,Ei),t(y,It),t(It,Ri),t(y,yi),t(y,Pe),t(Pe,jt),t(jt,Ai),t(y,bi),t(y,zt),t(zt,Ni),t(y,xi),t(y,Ht),t(Ht,ki),t(y,Di),p(e,Nr,l),_(Ce,e,l),p(e,xr,l),_(se,e,l),p(e,kr,l),p(e,M,l),t(M,le),t(le,Yt),_(Xe,Yt,null),t(M,Pi),t(M,Ut),t(Ut,Ci),p(e,Dr,l),p(e,A,l),t(A,Xi),t(A,Gt),t(Gt,Ii),t(A,ji),t(A,Ie),t(Ie,Lt),t(Lt,zi),t(A,Hi),t(A,Bt),t(Bt,Yi),t(A,Ui),t(A,Ft),t(Ft,Gi),t(A,Li),p(e,Pr,l),_(je,e,l),p(e,Cr,l),_(me,e,l),p(e,Xr,l),p(e,Z,l),t(Z,pe),t(pe,Mt),_(ze,Mt,null),t(Z,Bi),t(Z,Zt),t(Zt,Fi),p(e,Ir,l),p(e,P,l),t(P,Vt),t(Vt,He),t(He,Mi),t(P,Zi),t(P,Wt),t(Wt,Ye),t(Ye,Vi),t(P,Wi),t(P,Jt),t(Jt,Ue),t(Ue,Ji),t(P,Ki),t(P,tt),t(tt,Qi),t(tt,Ge),t(Ge,Kt),t(Kt,Le),t(Le,ea),t(Ge,ta),t(Ge,Qt),t(Qt,Be),t(Be,ra),p(e,jr,l),p(e,C,l),t(C,na),t(C,er),t(er,ia),t(C,aa),t(C,Fe),t(Fe,oa),t(C,sa),t(C,Me),t(Me,la),t(C,ma),zr=!0},p(e,[l]){const Ze={};l&2&&(Ze.$$scope={dirty:l,ctx:e}),se.$set(Ze);const tr={};l&2&&(tr.$$scope={dirty:l,ctx:e}),me.$set(tr)},i(e){zr||(T($.$$.fragment,e),T(ce.$$.fragment,e),T(de.$$.fragment,e),T(Te.$$.fragment,e),T(ve.$$.fragment,e),T(we.$$.fragment,e),T($e.$$.fragment,e),T(Oe.$$.fragment,e),T(qe.$$.fragment,e),T(Ee.$$.fragment,e),T(ye.$$.fragment,e),T(be.$$.fragment,e),T(xe.$$.fragment,e),T(De.$$.fragment,e),T(Ce.$$.fragment,e),T(se.$$.fragment,e),T(Xe.$$.fragment,e),T(je.$$.fragment,e),T(me.$$.fragment,e),T(ze.$$.fragment,e),zr=!0)},o(e){v($.$$.fragment,e),v(ce.$$.fragment,e),v(de.$$.fragment,e),v(Te.$$.fragment,e),v(ve.$$.fragment,e),v(we.$$.fragment,e),v($e.$$.fragment,e),v(Oe.$$.fragment,e),v(qe.$$.fragment,e),v(Ee.$$.fragment,e),v(ye.$$.fragment,e),v(be.$$.fragment,e),v(xe.$$.fragment,e),v(De.$$.fragment,e),v(Ce.$$.fragment,e),v(se.$$.fragment,e),v(Xe.$$.fragment,e),v(je.$$.fragment,e),v(me.$$.fragment,e),v(ze.$$.fragment,e),zr=!1},d(e){r(h),e&&r(D),e&&r(c),w($),e&&r(rr),e&&r(O),e&&r(nr),e&&r(Y),w(ce),e&&r(ir),e&&r(We),e&&r(ar),e&&r(I),e&&r(or),e&&r(U),w(de),e&&r(sr),e&&r(j),e&&r(lr),e&&r(Q),e&&r(mr),w(Te,e),e&&r(pr),e&&r(Je),e&&r(ur),w(ve,e),e&&r(fr),e&&r(Ke),e&&r(hr),w(we,e),e&&r(cr),e&&r(G),w($e),e&&r(dr),e&&r(Qe),e&&r(gr),w(Oe,e),e&&r(_r),e&&r(et),e&&r(Tr),w(qe,e),e&&r(vr),e&&r(te),e&&r(wr),e&&r(L),w(Ee),e&&r($r),e&&r(q),e&&r(Or),w(ye,e),e&&r(qr),e&&r(ne),e&&r(Sr),e&&r(B),w(be),e&&r(Er),e&&r(S),e&&r(Rr),w(xe,e),e&&r(yr),e&&r(ae),e&&r(Ar),e&&r(F),w(De),e&&r(br),e&&r(y),e&&r(Nr),w(Ce,e),e&&r(xr),w(se,e),e&&r(kr),e&&r(M),w(Xe),e&&r(Dr),e&&r(A),e&&r(Pr),w(je,e),e&&r(Cr),w(me,e),e&&r(Xr),e&&r(Z),w(ze),e&&r(Ir),e&&r(P),e&&r(jr),e&&r(C)}}}const Wo={local:"trainer",sections:[{local:"prerequisite",sections:[{local:"install-onnx-runtime",title:"Install ONNX Runtime"},{local:"install-optimum",title:"Install Optimum"}],title:"Prerequisite"},{local:"orttrainer",title:"ORTTrainer"},{local:"ortseq2seqtrainer",title:"ORTSeq2SeqTrainer"},{local:"orttrainingarguments",title:"ORTTrainingArguments"},{local:"ortseq2seqtrainingarguments",title:"ORTSeq2SeqTrainingArguments"},{local:"other-resources",title:"Other Resources"}],title:"Trainer"};function Jo(Ve){return Fo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class rs extends Uo{constructor(h){super();Go(this,h,Jo,Vo,Lo,{})}}export{rs as default,Wo as metadata};
