import{s as Eb,o as Vb,n as S}from"../chunks/scheduler.9bc65507.js";import{S as Zb,i as Xb,g as i,s as o,r as p,A as Gb,h as l,f as t,c as a,j as x,u,x as d,k as M,l as Yb,y as r,a as s,v as h,d as g,t as f,w as _}from"../chunks/index.707bf1b6.js";import{T as $e}from"../chunks/Tip.c2ecdbf4.js";import{D as k}from"../chunks/Docstring.17db21ae.js";import{C}from"../chunks/CodeBlock.54a9f38d.js";import{E as ke}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as L}from"../chunks/Heading.342b1fa6.js";function Ob(q){let c,w='If you’re looking to fine-tune a language model like Llama-2 or Mistral on a text dataset using autoregressive techniques, consider using <a href="https://github.com/huggingface/trl" rel="nofollow"><code>trl</code></a>’s <a href="https://huggingface.co/docs/trl/main/en/sft_trainer#trl.SFTTrainer" rel="nofollow">SFTTrainer</a>. The <a href="https://huggingface.co/docs/trl/main/en/sft_trainer#trl.SFTTrainer" rel="nofollow">SFTTrainer</a> wraps the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> and is specially optimized for this particular task and supports sequence packing, LoRA, quantization, and DeepSpeed for efficient scaling to any model size. On the other hand, the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> is a more versatile option, suitable for a broader spectrum of tasks.';return{c(){c=i("p"),c.innerHTML=w},l(b){c=l(b,"P",{"data-svelte-h":!0}),d(c)!=="svelte-1vm3q8r"&&(c.innerHTML=w)},m(b,y){s(b,c,y)},p:S,d(b){b&&t(c)}}}function Qb(q){let c,w=`The <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> class is optimized for 🤗 Transformers models and can have surprising behaviors
when you use it on other models. When using it on your own model, make sure:`,b,y,$=`<li>your model always return tuples or subclasses of <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a>.</li> <li>your model can compute the loss if a <code>labels</code> argument is provided and that loss is returned as the first
element of the tuple (if your model returns tuples)</li> <li>your model can accept multiple label arguments (use the <code>label_names</code> in your <a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a> to indicate their name to the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>) but none of them should be named <code>&quot;label&quot;</code>.</li>`;return{c(){c=i("p"),c.innerHTML=w,b=o(),y=i("ul"),y.innerHTML=$},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-zua54p"&&(c.innerHTML=w),b=a(m),y=l(m,"UL",{"data-svelte-h":!0}),d(y)!=="svelte-1ehfgke"&&(y.innerHTML=$)},m(m,A){s(m,c,A),s(m,b,A),s(m,y,A)},p:S,d(m){m&&(t(c),t(b),t(y))}}}function Kb(q){let c,w=`To use this method, you need to have provided a <code>model_init</code> when initializing your <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>: we need to
reinitialize the model at each new run. This is incompatible with the <code>optimizers</code> argument, so you need to
subclass <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> and override the method <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.create_optimizer_and_scheduler">create_optimizer_and_scheduler()</a> for custom
optimizer/scheduler.`;return{c(){c=i("p"),c.innerHTML=w},l(b){c=l(b,"P",{"data-svelte-h":!0}),d(c)!=="svelte-1kxt9b1"&&(c.innerHTML=w)},m(b,y){s(b,c,y)},p:S,d(b){b&&t(c)}}}function ey(q){let c,w="This function is deprecated and will be removed in v4.34.0 of Transformers.";return{c(){c=i("p"),c.textContent=w},l(b){c=l(b,"P",{"data-svelte-h":!0}),d(c)!=="svelte-1bkq44s"&&(c.textContent=w)},m(b,y){s(b,c,y)},p:S,d(b){b&&t(c)}}}function ty(q){let c,w="Now when this method is run, you will see a report that will include: :",b,y,$;return y=new C({props:{code:"aW5pdF9tZW1fY3B1X2FsbG9jX2RlbHRhJTIwJTIwJTIwJTNEJTIwJTIwJTIwJTIwJTIwMTMwMU1CJTBBaW5pdF9tZW1fY3B1X3BlYWtlZF9kZWx0YSUyMCUyMCUzRCUyMCUyMCUyMCUyMCUyMCUyMDE1NE1CJTBBaW5pdF9tZW1fZ3B1X2FsbG9jX2RlbHRhJTIwJTIwJTIwJTNEJTIwJTIwJTIwJTIwJTIwJTIwMjMwTUIlMEFpbml0X21lbV9ncHVfcGVha2VkX2RlbHRhJTIwJTIwJTNEJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwME1CJTBBdHJhaW5fbWVtX2NwdV9hbGxvY19kZWx0YSUyMCUyMCUzRCUyMCUyMCUyMCUyMCUyMDEzNDVNQiUwQXRyYWluX21lbV9jcHVfcGVha2VkX2RlbHRhJTIwJTNEJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwME1CJTBBdHJhaW5fbWVtX2dwdV9hbGxvY19kZWx0YSUyMCUyMCUzRCUyMCUyMCUyMCUyMCUyMCUyMDY5M01CJTBBdHJhaW5fbWVtX2dwdV9wZWFrZWRfZGVsdGElMjAlM0QlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjA3TUI=",highlighted:`<span class="hljs-attr">init_mem_cpu_alloc_delta</span>   =     <span class="hljs-number">1301</span>MB
<span class="hljs-attr">init_mem_cpu_peaked_delta</span>  =      <span class="hljs-number">154</span>MB
<span class="hljs-attr">init_mem_gpu_alloc_delta</span>   =      <span class="hljs-number">230</span>MB
<span class="hljs-attr">init_mem_gpu_peaked_delta</span>  =        <span class="hljs-number">0</span>MB
<span class="hljs-attr">train_mem_cpu_alloc_delta</span>  =     <span class="hljs-number">1345</span>MB
<span class="hljs-attr">train_mem_cpu_peaked_delta</span> =        <span class="hljs-number">0</span>MB
<span class="hljs-attr">train_mem_gpu_alloc_delta</span>  =      <span class="hljs-number">693</span>MB
<span class="hljs-attr">train_mem_gpu_peaked_delta</span> =        <span class="hljs-number">7</span>MB`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-2hs27k"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function ny(q){let c,w=`If your predictions or labels have different sequence length (for instance because you’re doing dynamic padding
in a token classification task) the predictions will be padded (on the right) to allow for concatenation into
one array. The padding index is -100.`;return{c(){c=i("p"),c.textContent=w},l(b){c=l(b,"P",{"data-svelte-h":!0}),d(c)!=="svelte-vq7haq"&&(c.textContent=w)},m(b,y){s(b,c,y)},p:S,d(b){b&&t(c)}}}function oy(q){let c,w=`If your predictions or labels have different sequence lengths (for instance because you’re doing dynamic
padding in a token classification task) the predictions will be padded (on the right) to allow for
concatenation into one array. The padding index is -100.`;return{c(){c=i("p"),c.textContent=w},l(b){c=l(b,"P",{"data-svelte-h":!0}),d(c)!=="svelte-1c3ugfb"&&(c.textContent=w)},m(b,y){s(b,c,y)},p:S,d(b){b&&t(c)}}}function ay(q){let c,w="Example:",b,y,$;return y=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUyMndvcmtpbmdfZGlyJTIyKSUwQWFyZ3MlMjAlM0QlMjBhcmdzLnNldF9kYXRhbG9hZGVyKHRyYWluX2JhdGNoX3NpemUlM0QxNiUyQyUyMGV2YWxfYmF0Y2hfc2l6ZSUzRDY0KSUwQWFyZ3MucGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXpl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TrainingArguments(<span class="hljs-string">&quot;working_dir&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args = args.set_dataloader(train_batch_size=<span class="hljs-number">16</span>, eval_batch_size=<span class="hljs-number">64</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args.per_device_train_batch_size
<span class="hljs-number">16</span>`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-11lpom8"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function ry(q){let c,w="Example:",b,y,$;return y=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUyMndvcmtpbmdfZGlyJTIyKSUwQWFyZ3MlMjAlM0QlMjBhcmdzLnNldF9ldmFsdWF0ZShzdHJhdGVneSUzRCUyMnN0ZXBzJTIyJTJDJTIwc3RlcHMlM0QxMDApJTBBYXJncy5ldmFsX3N0ZXBz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TrainingArguments(<span class="hljs-string">&quot;working_dir&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args = args.set_evaluate(strategy=<span class="hljs-string">&quot;steps&quot;</span>, steps=<span class="hljs-number">100</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args.eval_steps
<span class="hljs-number">100</span>`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-11lpom8"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function sy(q){let c,w="Example:",b,y,$;return y=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUyMndvcmtpbmdfZGlyJTIyKSUwQWFyZ3MlMjAlM0QlMjBhcmdzLnNldF9sb2dnaW5nKHN0cmF0ZWd5JTNEJTIyc3RlcHMlMjIlMkMlMjBzdGVwcyUzRDEwMCklMEFhcmdzLmxvZ2dpbmdfc3RlcHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TrainingArguments(<span class="hljs-string">&quot;working_dir&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args = args.set_logging(strategy=<span class="hljs-string">&quot;steps&quot;</span>, steps=<span class="hljs-number">100</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args.logging_steps
<span class="hljs-number">100</span>`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-11lpom8"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function iy(q){let c,w="Example:",b,y,$;return y=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUyMndvcmtpbmdfZGlyJTIyKSUwQWFyZ3MlMjAlM0QlMjBhcmdzLnNldF9scl9zY2hlZHVsZXIobmFtZSUzRCUyMmNvc2luZSUyMiUyQyUyMHdhcm11cF9yYXRpbyUzRDAuMDUpJTBBYXJncy53YXJtdXBfcmF0aW8=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TrainingArguments(<span class="hljs-string">&quot;working_dir&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args = args.set_lr_scheduler(name=<span class="hljs-string">&quot;cosine&quot;</span>, warmup_ratio=<span class="hljs-number">0.05</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args.warmup_ratio
<span class="hljs-number">0.05</span>`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-11lpom8"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function ly(q){let c,w="Example:",b,y,$;return y=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUyMndvcmtpbmdfZGlyJTIyKSUwQWFyZ3MlMjAlM0QlMjBhcmdzLnNldF9vcHRpbWl6ZXIobmFtZSUzRCUyMmFkYW13X3RvcmNoJTIyJTJDJTIwYmV0YTElM0QwLjgpJTBBYXJncy5vcHRpbQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TrainingArguments(<span class="hljs-string">&quot;working_dir&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args = args.set_optimizer(name=<span class="hljs-string">&quot;adamw_torch&quot;</span>, beta1=<span class="hljs-number">0.8</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args.optim
<span class="hljs-string">&#x27;adamw_torch&#x27;</span>`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-11lpom8"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function dy(q){let c,w=`Calling this method will set <code>self.push_to_hub</code> to <code>True</code>, which means the <code>output_dir</code> will begin a git
directory synced with the repo (determined by <code>model_id</code>) and the content will be pushed each time a save is
triggered (depending on<code>self.save_strategy</code>). Calling <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.save_model">save_model()</a> will also trigger a push.`;return{c(){c=i("p"),c.innerHTML=w},l(b){c=l(b,"P",{"data-svelte-h":!0}),d(c)!=="svelte-4hhjl7"&&(c.innerHTML=w)},m(b,y){s(b,c,y)},p:S,d(b){b&&t(c)}}}function cy(q){let c,w="Example:",b,y,$;return y=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUyMndvcmtpbmdfZGlyJTIyKSUwQWFyZ3MlMjAlM0QlMjBhcmdzLnNldF9wdXNoX3RvX2h1YiglMjJtZSUyRmF3ZXNvbWUtbW9kZWwlMjIpJTBBYXJncy5odWJfbW9kZWxfaWQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TrainingArguments(<span class="hljs-string">&quot;working_dir&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args = args.set_push_to_hub(<span class="hljs-string">&quot;me/awesome-model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args.hub_model_id
<span class="hljs-string">&#x27;me/awesome-model&#x27;</span>`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-11lpom8"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function my(q){let c,w="Example:",b,y,$;return y=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUyMndvcmtpbmdfZGlyJTIyKSUwQWFyZ3MlMjAlM0QlMjBhcmdzLnNldF9zYXZlKHN0cmF0ZWd5JTNEJTIyc3RlcHMlMjIlMkMlMjBzdGVwcyUzRDEwMCklMEFhcmdzLnNhdmVfc3RlcHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TrainingArguments(<span class="hljs-string">&quot;working_dir&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args = args.set_save(strategy=<span class="hljs-string">&quot;steps&quot;</span>, steps=<span class="hljs-number">100</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args.save_steps
<span class="hljs-number">100</span>`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-11lpom8"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function py(q){let c,w="Calling this method will automatically set <code>self.do_predict</code> to <code>True</code>.";return{c(){c=i("p"),c.innerHTML=w},l(b){c=l(b,"P",{"data-svelte-h":!0}),d(c)!=="svelte-ci4epi"&&(c.innerHTML=w)},m(b,y){s(b,c,y)},p:S,d(b){b&&t(c)}}}function uy(q){let c,w="Example:",b,y,$;return y=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUyMndvcmtpbmdfZGlyJTIyKSUwQWFyZ3MlMjAlM0QlMjBhcmdzLnNldF90ZXN0aW5nKGJhdGNoX3NpemUlM0QzMiklMEFhcmdzLnBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXpl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TrainingArguments(<span class="hljs-string">&quot;working_dir&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args = args.set_testing(batch_size=<span class="hljs-number">32</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args.per_device_eval_batch_size
<span class="hljs-number">32</span>`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-11lpom8"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function hy(q){let c,w="Calling this method will automatically set <code>self.do_train</code> to <code>True</code>.";return{c(){c=i("p"),c.innerHTML=w},l(b){c=l(b,"P",{"data-svelte-h":!0}),d(c)!=="svelte-102o7rb"&&(c.innerHTML=w)},m(b,y){s(b,c,y)},p:S,d(b){b&&t(c)}}}function gy(q){let c,w="Example:",b,y,$;return y=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUyMndvcmtpbmdfZGlyJTIyKSUwQWFyZ3MlMjAlM0QlMjBhcmdzLnNldF90cmFpbmluZyhsZWFybmluZ19yYXRlJTNEMWUtNCUyQyUyMGJhdGNoX3NpemUlM0QzMiklMEFhcmdzLmxlYXJuaW5nX3JhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TrainingArguments(<span class="hljs-string">&quot;working_dir&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args = args.set_training(learning_rate=<span class="hljs-number">1e-4</span>, batch_size=<span class="hljs-number">32</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>args.learning_rate
<span class="hljs-number">1e-4</span>`,wrap:!1}}),{c(){c=i("p"),c.textContent=w,b=o(),p(y.$$.fragment)},l(m){c=l(m,"P",{"data-svelte-h":!0}),d(c)!=="svelte-11lpom8"&&(c.textContent=w),b=a(m),u(y.$$.fragment,m)},m(m,A){s(m,c,A),s(m,b,A),h(y,m,A),$=!0},p:S,i(m){$||(g(y.$$.fragment,m),$=!0)},o(m){f(y.$$.fragment,m),$=!1},d(m){m&&(t(c),t(b)),_(y,m)}}}function fy(q){let c,w=`We strongly recommend to install PyTorch &gt;= 1.13 (nightly version at the time of writing) on your MacOS machine.
It has major fixes related to model correctness and performance improvements for transformer based models.
Please refer to <a href="https://github.com/pytorch/pytorch/issues/82707" rel="nofollow">https://github.com/pytorch/pytorch/issues/82707</a> for more details.`;return{c(){c=i("p"),c.innerHTML=w},l(b){c=l(b,"P",{"data-svelte-h":!0}),d(c)!=="svelte-l49dll"&&(c.innerHTML=w)},m(b,y){s(b,c,y)},p:S,d(b){b&&t(c)}}}function _y(q){let c,w,b,y,$,m,A,Dh='The <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> class provides an API for feature-complete training in PyTorch for most standard use cases. It’s used in most of the <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">example scripts</a>.',al,Le,rl,Jt,Hh='Before instantiating your <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, create a <a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a> to access all the points of customization during training.',sl,Ut,Rh='The API supports distributed training on multiple GPUs/TPUs, mixed precision through <a href="https://github.com/NVIDIA/apex" rel="nofollow">NVIDIA Apex</a> and Native AMP for PyTorch.',il,St,Bh='The <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> contains the basic training loop which supports the above features. To inject custom behavior you can subclass them and override the following methods:',ll,Pt,Eh=`<li><strong>get_train_dataloader</strong> — Creates the training DataLoader.</li> <li><strong>get_eval_dataloader</strong> — Creates the evaluation DataLoader.</li> <li><strong>get_test_dataloader</strong> — Creates the test DataLoader.</li> <li><strong>log</strong> — Logs information on the various objects watching training.</li> <li><strong>create_optimizer_and_scheduler</strong> — Sets up the optimizer and learning rate scheduler if they were not passed at
init. Note, that you can also subclass or override the <code>create_optimizer</code> and <code>create_scheduler</code> methods
separately.</li> <li><strong>create_optimizer</strong> — Sets up the optimizer if it wasn’t passed at init.</li> <li><strong>create_scheduler</strong> — Sets up the learning rate scheduler if it wasn’t passed at init.</li> <li><strong>compute_loss</strong> - Computes the loss on a batch of training inputs.</li> <li><strong>training_step</strong> — Performs a training step.</li> <li><strong>prediction_step</strong> — Performs an evaluation/test step.</li> <li><strong>evaluate</strong> — Runs an evaluation loop and returns metrics.</li> <li><strong>predict</strong> — Returns predictions (with metrics if labels are available) on a test set.</li>`,dl,Fe,cl,Lt,Vh='Here is an example of how to customize <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> to use a weighted loss (useful when you have an unbalanced training set):',ml,Ft,pl,Nt,Zh='Another way to customize the training loop behavior for the PyTorch <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> is to use <a href="callback">callbacks</a> that can inspect the training loop state (for progress reporting, logging on TensorBoard or other ML platforms…) and take decisions (like early stopping).',ul,zt,hl,v,Wt,gm,Pr,Xh="Trainer is a simple but feature-complete training and eval loop for PyTorch, optimized for 🤗 Transformers.",fm,Lr,Gh="Important attributes:",_m,Fr,Yh=`<li><strong>model</strong> — Always points to the core model. If using a transformers model, it will be a <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>
subclass.</li> <li><strong>model_wrapped</strong> — Always points to the most external model in case one or more other modules wrap the
original model. This is the model that should be used for the forward pass. For example, under <code>DeepSpeed</code>,
the inner model is wrapped in <code>DeepSpeed</code> and then again in <code>torch.nn.DistributedDataParallel</code>. If the inner
model hasn’t been wrapped, then <code>self.model_wrapped</code> is the same as <code>self.model</code>.</li> <li><strong>is_model_parallel</strong> — Whether or not a model has been switched to a model parallel mode (different from
data parallelism, this means some of the model layers are split on different GPUs).</li> <li><strong>place_model_on_device</strong> — Whether or not to automatically place the model on the device - it will be set
to <code>False</code> if model parallel or deepspeed is used, or if the default
<code>TrainingArguments.place_model_on_device</code> is overridden to return <code>False</code> .</li> <li><strong>is_in_train</strong> — Whether or not a model is currently running <code>train</code> (e.g. when <code>evaluate</code> is called while
in <code>train</code>)</li>`,bm,Ne,Dt,ym,Nr,Oh="Add a callback to the current list of <code>~transformer.TrainerCallback</code>.",vm,ze,Ht,Tm,zr,Qh=`A helper wrapper that creates an appropriate context manager for <code>autocast</code> while feeding it the desired
arguments, depending on the situation.`,wm,ee,Rt,xm,Wr,Kh="How the loss is computed by Trainer. By default, all models return the loss in the first element.",Mm,Dr,eg="Subclass and override for custom behavior.",$m,We,Bt,km,Hr,tg="A helper wrapper to group together context managers.",Am,De,Et,qm,Rr,ng="Creates a draft of a model card using the information available to the <code>Trainer</code>.",jm,te,Vt,Cm,Br,og="Setup the optimizer.",Im,Er,ag=`We provide a reasonable default that works well. If you want to use something else, you can pass a tuple in the
Trainer’s init through <code>optimizers</code>, or subclass and override this method in a subclass.`,Jm,ne,Zt,Um,Vr,rg="Setup the optimizer and the learning rate scheduler.",Sm,Zr,sg=`We provide a reasonable default that works well. If you want to use something else, you can pass a tuple in the
Trainer’s init through <code>optimizers</code>, or subclass and override this method (or <code>create_optimizer</code> and/or
<code>create_scheduler</code>) in a subclass.`,Pm,He,Xt,Lm,Xr,ig=`Setup the scheduler. The optimizer of the trainer must have been set up either before this method is called or
passed as an argument.`,Fm,H,Gt,Nm,Gr,lg="Run evaluation and returns metrics.",zm,Yr,dg=`The calling script will be responsible for providing a method to compute metrics, as they are task-dependent
(pass it to the init <code>compute_metrics</code> argument).`,Wm,Or,cg="You can also subclass and override this method to inject custom behavior.",Dm,oe,Yt,Hm,Qr,mg="Prediction/evaluation loop, shared by <code>Trainer.evaluate()</code> and <code>Trainer.predict()</code>.",Rm,Kr,pg="Works both with or without labels.",Bm,Re,Ot,Em,es,ug=`For models that inherit from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>, uses that method to compute the number of floating point
operations for every backward + forward pass. If using another model, either implement such a method in the
model or subclass and override this method.`,Vm,ae,Qt,Zm,ts,hg="Get all parameter names that weight decay will be applied to",Xm,ns,gg=`Note that some models implement their own layernorm instead of calling nn.LayerNorm, weight decay could still
apply to those modules since this function only filter out instance of nn.LayerNorm`,Gm,re,Kt,Ym,os,fg="Returns the evaluation <code>~torch.utils.data.DataLoader</code>.",Om,as,_g="Subclass and override this method if you want to inject some custom behavior.",Qm,Be,en,Km,rs,bg="Returns the optimizer class and optimizer parameters based on the training arguments.",ep,se,tn,tp,ss,yg="Returns the test <code>~torch.utils.data.DataLoader</code>.",np,is,vg="Subclass and override this method if you want to inject some custom behavior.",op,R,nn,ap,ls,Tg="Returns the training <code>~torch.utils.data.DataLoader</code>.",rp,ds,wg=`Will use no sampler if <code>train_dataset</code> does not implement <code>__len__</code>, a random sampler (adapted to distributed
training if necessary) otherwise.`,sp,cs,xg="Subclass and override this method if you want to inject some custom behavior.",ip,ie,on,lp,ms,Mg=`Launch an hyperparameter search using <code>optuna</code> or <code>Ray Tune</code> or <code>SigOpt</code>. The optimized quantity is determined
by <code>compute_objective</code>, which defaults to a function returning the evaluation loss when no metric is provided,
the sum of all metrics otherwise.`,dp,Ee,cp,le,an,mp,ps,$g="Initializes a git repo in <code>self.args.hub_model_id</code>.",pp,Ve,up,Ze,rn,hp,us,kg="Initializes a git repo in <code>self.args.hub_model_id</code>.",gp,Xe,sn,fp,hs,Ag=`Whether or not this process is the local (e.g., on one machine if training in a distributed fashion on several
machines) main process.`,_p,Ge,ln,bp,gs,qg=`Whether or not this process is the global main process (when training in a distributed fashion on several
machines, this is only going to be <code>True</code> for one process).`,yp,de,dn,vp,fs,jg="Log <code>logs</code> on the various objects watching training.",Tp,_s,Cg="Subclass and override this method to inject custom behavior.",wp,I,cn,xp,bs,Ig="Log metrics in a specially formatted way",Mp,ys,Jg="Under distributed environment this is done only for a process with rank 0.",$p,vs,Ug="Notes on memory reports:",kp,Ts,Sg="In order to get memory usage report you need to install <code>psutil</code>. You can do that with <code>pip install psutil</code>.",Ap,Ye,qp,ws,Pg="<strong>Understanding the reports:</strong>",jp,xs,Lg=`<li>the first segment, e.g., <code>train__</code>, tells you which stage the metrics are for. Reports starting with <code>init_</code>
will be added to the first stage that gets run. So that if only evaluation is run, the memory usage for the
<code>__init__</code> will be reported along with the <code>eval_</code> metrics.</li> <li>the third segment, is either <code>cpu</code> or <code>gpu</code>, tells you whether it’s the general RAM or the gpu0 memory
metric.</li> <li><code>*_alloc_delta</code> - is the difference in the used/allocated memory counter between the end and the start of the
stage - it can be negative if a function released more memory than it allocated.</li> <li><code>*_peaked_delta</code> - is any extra memory that was consumed and then freed - relative to the current allocated
memory counter - it is never negative. When you look at the metrics of any stage you add up <code>alloc_delta</code> +
<code>peaked_delta</code> and you know how much memory was needed to complete that stage.</li>`,Cp,Ms,Fg=`The reporting happens only for process of rank 0 and gpu 0 (if there is a gpu). Typically this is enough since the
main process does the bulk of work, but it could be not quite so if model parallel is used and then other GPUs may
use a different amount of gpu memory. This is also not the same under DataParallel where gpu0 may require much more
memory than the rest since it stores the gradient and optimizer states for all participating GPUS. Perhaps in the
future these reports will evolve to measure those too.`,Ip,$s,Ng=`The CPU RAM metric measures RSS (Resident Set Size) includes both the memory which is unique to the process and the
memory shared with other processes. It is important to note that it does not include swapped out memory, so the
reports could be imprecise.`,Jp,ks,zg=`The CPU peak memory is measured using a sampling thread. Due to python’s GIL it may miss some of the peak memory if
that thread didn’t get a chance to run when the highest memory was used. Therefore this report can be less than
reality. Using <code>tracemalloc</code> would have reported the exact peak memory, but it doesn’t report memory allocations
outside of python. So if some C++ CUDA extension allocated its own memory it won’t be reported. And therefore it
was dropped in favor of the memory sampling approach, which reads the current process memory usage.`,Up,As,Wg=`The GPU allocated and peak memory reporting is done with <code>torch.cuda.memory_allocated()</code> and
<code>torch.cuda.max_memory_allocated()</code>. This metric reports only “deltas” for pytorch-specific allocations, as
<code>torch.cuda</code> memory management system doesn’t track any memory allocated outside of pytorch. For example, the very
first cuda call typically loads CUDA kernels, which may take from 0.5 to 2GB of GPU memory.`,Sp,qs,Dg=`Note that this tracker doesn’t account for memory allocations outside of <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>’s <code>__init__</code>, <code>train</code>,
<code>evaluate</code> and <code>predict</code> calls.`,Pp,js,Hg=`Because <code>evaluation</code> calls may happen during <code>train</code>, we can’t handle nested invocations because
<code>torch.cuda.max_memory_allocated</code> is a single counter, so if it gets reset by a nested eval call, <code>train</code>’s tracker
will report incorrect info. If this <a href="https://github.com/pytorch/pytorch/issues/16266" rel="nofollow">pytorch issue</a> gets resolved
it will be possible to change this class to be re-entrant. Until then we will only track the outer level of
<code>train</code>, <code>evaluate</code> and <code>predict</code> methods. Which means that if <code>eval</code> is called during <code>train</code>, it’s the latter
that will account for its memory usage and that of the former.`,Lp,Cs,Rg=`This also means that if any other tool that is used along the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> calls
<code>torch.cuda.reset_peak_memory_stats</code>, the gpu peak memory stats could be invalid. And the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> will disrupt
the normal behavior of any such tools that rely on calling <code>torch.cuda.reset_peak_memory_stats</code> themselves.`,Fp,Is,Bg="For best performance you may want to consider turning the memory profiling off for production runs.",Np,Oe,mn,zp,Js,Eg="Reformat Trainer metrics values to a human-readable format",Wp,Qe,pn,Dp,Us,Vg=`Helper to get number of samples in a <code>~torch.utils.data.DataLoader</code> by accessing its dataset. When
dataloader.dataset does not exist or has no length, estimates as best it can`,Hp,Ke,un,Rp,Ss,Zg="Helper to get number of tokens in a <code>~torch.utils.data.DataLoader</code> by enumerating dataloader.",Bp,ce,hn,Ep,Ps,Xg="Remove a callback from the current list of <code>~transformer.TrainerCallback</code> and returns it.",Vp,Ls,Gg="If the callback is not found, returns <code>None</code> (and no error is raised).",Zp,F,gn,Xp,Fs,Yg="Run prediction and returns predictions and potential metrics.",Gp,Ns,Og=`Depending on the dataset and your use case, your test dataset may contain labels. In that case, this method
will also return metrics, like in <code>evaluate()</code>.`,Yp,et,Op,zs,Qg="Returns: <em>NamedTuple</em> A namedtuple with the following keys:",Qp,Ws,Kg=`<li>predictions (<code>np.ndarray</code>): The predictions on <code>test_dataset</code>.</li> <li>label_ids (<code>np.ndarray</code>, <em>optional</em>): The labels (if the dataset contained some).</li> <li>metrics (<code>Dict[str, float]</code>, <em>optional</em>): The potential dictionary of metrics (if the dataset contained
labels).</li>`,Kp,me,fn,eu,Ds,ef="Prediction/evaluation loop, shared by <code>Trainer.evaluate()</code> and <code>Trainer.predict()</code>.",tu,Hs,tf="Works both with or without labels.",nu,pe,_n,ou,Rs,nf="Perform an evaluation step on <code>model</code> using <code>inputs</code>.",au,Bs,of="Subclass and override to inject custom behavior.",ru,tt,bn,su,Es,af="Upload <code>self.model</code> and <code>self.tokenizer</code> to the 🤗 model hub on the repo <code>self.args.hub_model_id</code>.",iu,nt,yn,lu,Vs,rf="Remove a callback from the current list of <code>~transformer.TrainerCallback</code>.",du,B,vn,cu,Zs,sf="Save metrics into a json file for that split, e.g. <code>train_results.json</code>.",mu,Xs,lf="Under distributed environment this is done only for a process with rank 0.",pu,Gs,df=`To understand the metrics please read the docstring of <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.log_metrics">log_metrics()</a>. The only difference is that raw
unformatted numbers are saved in the current method.`,uu,ue,Tn,hu,Ys,cf="Will save the model, so you can reload it using <code>from_pretrained()</code>.",gu,Os,mf="Will only save from the main process.",fu,he,wn,_u,Qs,pf="Saves the Trainer state, since Trainer.save_model saves only the tokenizer with the model",bu,Ks,uf="Under distributed environment this is done only for a process with rank 0.",yu,ot,xn,vu,ei,hf="Main training entry point.",Tu,ge,Mn,wu,ti,gf="Perform a training step on a batch of inputs.",xu,ni,ff="Subclass and override to inject custom behavior.",gl,$n,fl,O,kn,Mu,E,An,$u,oi,_f="Run evaluation and returns metrics.",ku,ai,bf=`The calling script will be responsible for providing a method to compute metrics, as they are task-dependent
(pass it to the init <code>compute_metrics</code> argument).`,Au,ri,yf="You can also subclass and override this method to inject custom behavior.",qu,N,qn,ju,si,vf="Run prediction and returns predictions and potential metrics.",Cu,ii,Tf=`Depending on the dataset and your use case, your test dataset may contain labels. In that case, this method
will also return metrics, like in <code>evaluate()</code>.`,Iu,at,Ju,li,wf="Returns: <em>NamedTuple</em> A namedtuple with the following keys:",Uu,di,xf=`<li>predictions (<code>np.ndarray</code>): The predictions on <code>test_dataset</code>.</li> <li>label_ids (<code>np.ndarray</code>, <em>optional</em>): The labels (if the dataset contained some).</li> <li>metrics (<code>Dict[str, float]</code>, <em>optional</em>): The potential dictionary of metrics (if the dataset contained
labels).</li>`,_l,jn,bl,j,Cn,Su,ci,Mf=`TrainingArguments is the subset of the arguments we use in our example scripts <strong>which relate to the training loop
itself</strong>.`,Pu,mi,$f=`Using <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.HfArgumentParser">HfArgumentParser</a> we can turn this class into
<a href="https://docs.python.org/3/library/argparse#module-argparse" rel="nofollow">argparse</a> arguments that can be specified on the
command line.`,Lu,W,In,Fu,pi,kf=`Returns the log level to be used depending on whether this process is the main process of node 0, main process
of node non-0, or a non-main process.`,Nu,ui,Af=`For the main process the log level defaults to the logging level set (<code>logging.WARNING</code> if you didn’t do
anything) unless overridden by <code>log_level</code> argument.`,zu,hi,qf=`For the replica processes the log level defaults to <code>logging.WARNING</code> unless overridden by <code>log_level_replica</code>
argument.`,Wu,gi,jf="The choice between the main and replica process settings is made according to the return value of <code>should_log</code>.",Du,rt,Jn,Hu,fi,Cf="Get number of steps used for a linear warmup.",Ru,fe,Un,Bu,_i,If=`A context manager for torch distributed environment where on needs to do something on the main process, while
blocking replicas, and when it’s finished releasing the replicas.`,Eu,bi,Jf=`One such use is for <code>datasets</code>’s <code>map</code> feature which to be efficient should be run once on the main process,
which upon completion saves a cached version of results and which then automatically gets loaded by the
replicas.`,Vu,_e,Sn,Zu,yi,Uf="A method that regroups all arguments linked to the dataloaders creation.",Xu,st,Gu,be,Pn,Yu,vi,Sf="A method that regroups all arguments linked to evaluation.",Ou,it,Qu,ye,Ln,Ku,Ti,Pf="A method that regroups all arguments linked to logging.",eh,lt,th,ve,Fn,nh,wi,Lf="A method that regroups all arguments linked to the learning rate scheduler and its hyperparameters.",oh,dt,ah,Te,Nn,rh,xi,Ff="A method that regroups all arguments linked to the optimizer and its hyperparameters.",sh,ct,ih,V,zn,lh,Mi,Nf="A method that regroups all arguments linked to synchronizing checkpoints with the Hub.",dh,mt,ch,pt,mh,we,Wn,ph,$i,zf="A method that regroups all arguments linked to checkpoint saving.",uh,ut,hh,Z,Dn,gh,ki,Wf="A method that regroups all basic arguments linked to testing on a held-out dataset.",fh,ht,_h,gt,bh,X,Hn,yh,Ai,Df="A method that regroups all basic arguments linked to the training.",vh,ft,Th,_t,wh,bt,Rn,xh,qi,Hf=`Serializes this instance while replace <code>Enum</code> by their values (for JSON serialization support). It obfuscates
the token values by removing their value.`,Mh,yt,Bn,$h,ji,Rf="Serializes this instance to a JSON string.",kh,vt,En,Ah,Ci,Bf="Sanitized serialization to use with TensorBoard’s hparams",yl,Vn,vl,D,Zn,qh,Ii,Ef=`TrainingArguments is the subset of the arguments we use in our example scripts <strong>which relate to the training loop
itself</strong>.`,jh,Ji,Vf=`Using <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.HfArgumentParser">HfArgumentParser</a> we can turn this class into
<a href="https://docs.python.org/3/library/argparse#module-argparse" rel="nofollow">argparse</a> arguments that can be specified on the
command line.`,Ch,Tt,Xn,Ih,Ui,Zf=`Serializes this instance while replace <code>Enum</code> by their values and <code>GenerationConfig</code> by dictionaries (for JSON
serialization support). It obfuscates the token values by removing their value.`,Tl,Gn,wl,Yn,Xf=`By default, <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> will save all checkpoints in the <code>output_dir</code> you set in the
<a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a> you are using. Those will go in subfolder named <code>checkpoint-xxx</code> with xxx
being the step at which the training was at.`,xl,On,Gf='Resuming training from a checkpoint can be done when calling <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.train">Trainer.train()</a> with either:',Ml,Qn,Yf=`<li><code>resume_from_checkpoint=True</code> which will resume training from the latest checkpoint</li> <li><code>resume_from_checkpoint=checkpoint_dir</code> which will resume training from the specific checkpoint in the directory
passed.</li>`,$l,Kn,Of=`In addition, you can easily save your checkpoints on the Model Hub when using <code>push_to_hub=True</code>. By default, all
the models saved in intermediate checkpoints are saved in different commits, but not the optimizer state. You can adapt
the <code>hub-strategy</code> value of your <a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a> to either:`,kl,eo,Qf=`<li><code>&quot;checkpoint&quot;</code>: the latest checkpoint is also pushed in a subfolder named last-checkpoint, allowing you to
resume training easily with <code>trainer.train(resume_from_checkpoint=&quot;output_dir/last-checkpoint&quot;)</code>.</li> <li><code>&quot;all_checkpoints&quot;</code>: all checkpoints are pushed like they appear in the output folder (so you will get one
checkpoint folder per folder in your final repository)</li>`,Al,to,ql,no,Kf='By default <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> will use <code>logging.INFO</code> for the main process and <code>logging.WARNING</code> for the replicas if any.',jl,oo,e_=`These defaults can be overridden to use any of the 5 <code>logging</code> levels with <a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a>’s
arguments:`,Cl,ao,t_="<li><code>log_level</code> - for the main process</li> <li><code>log_level_replica</code> - for the replicas</li>",Il,ro,n_=`Further, if <a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a>’s <code>log_on_each_node</code> is set to <code>False</code> only the main node will
use the log level settings for its main process, all other nodes will use the log level settings for replicas.`,Jl,so,o_=`Note that <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> is going to set <code>transformers</code>’s log level separately for each node in its
<code>Trainer.__init__()</code>. So you may want to set this sooner (see the next example) if you tap into other
<code>transformers</code> functionality before creating the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> object.`,Ul,io,a_="Here is an example of how this can be used in an application:",Sl,lo,Pl,co,r_=`And then if you only want to see warnings on the main node and all other nodes to not print any most likely duplicated
warnings you could run it as:`,Ll,mo,Fl,po,s_=`In the multi-node environment if you also don’t want the logs to repeat for each node’s main process, you will want to
change the above to:`,Nl,uo,zl,ho,i_=`and then only the main process of the first node will log at the “warning” level, and all other processes on the main
node and all processes on other nodes will log at the “error” level.`,Wl,go,l_="If you need your application to be as quiet as possible you could do:",Dl,fo,Hl,_o,d_="(add <code>--log_on_each_node 0</code> if on multi-node environment)",Rl,bo,Bl,yo,c_=`When resuming from a checkpoint generated by <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> all efforts are made to restore the
<em>python</em>, <em>numpy</em> and <em>pytorch</em> RNG states to the same states as they were at the moment of saving that checkpoint,
which should make the “stop and resume” style of training as close as possible to non-stop training.`,El,vo,m_=`However, due to various default non-deterministic pytorch settings this might not fully work. If you want full
determinism please refer to <a href="https://pytorch.org/docs/stable/notes/randomness" rel="nofollow">Controlling sources of randomness</a>. As explained in the document, that some of those settings
that make things deterministic (.e.g., <code>torch.backends.cudnn.deterministic</code>) may slow things down, therefore this
can’t be done by default, but you can enable those yourself if needed.`,Vl,To,Zl,wo,p_="Let’s discuss how you can tell your program which GPUs are to be used and in what order.",Xl,xo,u_='When using <a href="https://pytorch.org/docs/stable/generated/torch.nn.parallel.DistributedDataParallel.html" rel="nofollow"><code>DistributedDataParallel</code></a> to use only a subset of your GPUs, you simply specify the number of GPUs to use. For example, if you have 4 GPUs, but you wish to use the first 2 you can do:',Gl,Mo,Yl,$o,h_='if you have either <a href="https://github.com/huggingface/accelerate" rel="nofollow"><code>accelerate</code></a> or <a href="https://github.com/microsoft/DeepSpeed" rel="nofollow"><code>deepspeed</code></a> installed you can also accomplish the same by using one of:',Ol,ko,Ql,Ao,Kl,qo,g_='You don’t need to use the Accelerate or <a href="Deepspeed">the Deepspeed integration</a> features to use these launchers.',ed,jo,f_="Until now you were able to tell the program how many GPUs to use. Now let’s discuss how to select specific GPUs and control their order.",td,Co,__="The following environment variables help you control which GPUs to use and their order.",nd,Io,b_="<strong><code>CUDA_VISIBLE_DEVICES</code></strong>",od,Jo,y_="If you have multiple GPUs and you’d like to use only 1 or a few of those GPUs, set the environment variable <code>CUDA_VISIBLE_DEVICES</code> to a list of the GPUs to be used.",ad,Uo,v_="For example, let’s say you have 4 GPUs: 0, 1, 2 and 3. To run only on the physical GPUs 0 and 2, you can do:",rd,So,sd,Po,T_="So now pytorch will see only 2 GPUs, where your physical GPUs 0 and 2 are mapped to <code>cuda:0</code> and <code>cuda:1</code> correspondingly.",id,Lo,w_="You can even change their order:",ld,Fo,dd,No,x_="Here your physical GPUs 0 and 2 are mapped to <code>cuda:1</code> and <code>cuda:0</code> correspondingly.",cd,zo,M_='The above examples were all for <code>DistributedDataParallel</code> use pattern, but the same method works for <a href="https://pytorch.org/docs/stable/generated/torch.nn.DataParallel.html" rel="nofollow"><code>DataParallel</code></a> as well:',md,Wo,pd,Do,$_="To emulate an environment without GPUs simply set this environment variable to an empty value like so:",ud,Ho,hd,Ro,k_="As with any environment variable you can, of course, export those instead of adding these to the command line, as in:",gd,Bo,fd,Eo,A_="but this approach can be confusing since you may forget you set up the environment variable earlier and not understand why the wrong GPUs are used. Therefore, it’s a common practice to set the environment variable just for a specific run on the same command line as it’s shown in most examples of this section.",_d,Vo,q_="<strong><code>CUDA_DEVICE_ORDER</code></strong>",bd,Zo,j_="There is an additional environment variable <code>CUDA_DEVICE_ORDER</code> that controls how the physical devices are ordered. The two choices are:",yd,Xo,C_="<li>ordered by PCIe bus IDs (matches <code>nvidia-smi</code>’s order) - this is the default.</li>",vd,Go,Td,wt,I_="<li>ordered by GPU compute capabilities</li>",wd,Yo,xd,Oo,J_="Most of the time you don’t need to care about this environment variable, but it’s very helpful if you have a lopsided setup where you have an old and a new GPUs physically inserted in such a way so that the slow older card appears to be first. One way to fix that is to swap the cards. But if you can’t swap the cards (e.g., if the cooling of the devices gets impacted) then setting <code>CUDA_DEVICE_ORDER=FASTEST_FIRST</code> will always put the newer faster card first. It’ll be somewhat confusing though since <code>nvidia-smi</code> will still report them in the PCIe order.",Md,Qo,U_="The other solution to swapping the order is to use:",$d,Ko,kd,ea,S_="In this example we are working with just 2 GPUs, but of course the same would apply to as many GPUs as your computer has.",Ad,ta,P_="Also if you do set this environment variable it’s the best to set it in your <code>~/.bashrc</code> file or some other startup config file and forget about it.",qd,na,jd,oa,L_=`The <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> has been extended to support libraries that may dramatically improve your training
time and fit much bigger models.`,Cd,aa,F_=`Currently it supports third party solutions, <a href="https://github.com/microsoft/DeepSpeed" rel="nofollow">DeepSpeed</a> and <a href="https://pytorch.org/docs/stable/fsdp.html" rel="nofollow">PyTorch FSDP</a>, which implement parts of the paper <a href="https://arxiv.org/abs/1910.02054" rel="nofollow">ZeRO: Memory Optimizations
Toward Training Trillion Parameter Models, by Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong He</a>.`,Id,ra,N_='This provided support is new and experimental as of this writing. While the support for DeepSpeed and PyTorch FSDP is active and we welcome issues around it, we don’t support the FairScale integration anymore since it has been integrated in PyTorch main (see the <a href="#pytorch-fully-sharded-data-parallel">PyTorch FSDP integration</a>)',Jd,Si,Ud,sa,Sd,ia,z_="As of this writing, Deepspeed require compilation of CUDA C++ code, before it can be used.",Pd,la,W_=`While all installation issues should be dealt with through the corresponding GitHub Issues of <a href="https://github.com/microsoft/DeepSpeed/issues" rel="nofollow">Deepspeed</a>, there are a few common issues that one may encounter while building
any PyTorch extension that needs to build CUDA extensions.`,Ld,da,D_="Therefore, if you encounter a CUDA-related build issue while doing the following:",Fd,ca,Nd,ma,H_="please, read the following notes first.",zd,pa,R_=`In these notes we give examples for what to do when <code>pytorch</code> has been built with CUDA <code>10.2</code>. If your situation is
different remember to adjust the version number to the one you are after.`,Wd,ua,Dd,ha,B_=`While, Pytorch comes with its own CUDA toolkit, to build these two projects you must have an identical version of CUDA
installed system-wide.`,Hd,ga,E_=`For example, if you installed <code>pytorch</code> with <code>cudatoolkit==10.2</code> in the Python environment, you also need to have
CUDA <code>10.2</code> installed system-wide.`,Rd,fa,V_=`The exact location may vary from system to system, but <code>/usr/local/cuda-10.2</code> is the most common location on many
Unix systems. When CUDA is correctly set up and added to the <code>PATH</code> environment variable, one can find the
installation location by doing:`,Bd,_a,Ed,ba,Z_=`If you don’t have CUDA installed system-wide, install it first. You will find the instructions by using your favorite
search engine. For example, if you’re on Ubuntu you may want to search for: <a href="https://www.google.com/search?q=ubuntu+cuda+10.2+install" rel="nofollow">ubuntu cuda 10.2 install</a>.`,Vd,ya,Zd,va,X_=`Another possible common problem is that you may have more than one CUDA toolkit installed system-wide. For example you
may have:`,Xd,Ta,Gd,wa,G_=`Now, in this situation you need to make sure that your <code>PATH</code> and <code>LD_LIBRARY_PATH</code> environment variables contain
the correct paths to the desired CUDA version. Typically, package installers will set these to contain whatever the
last version was installed. If you encounter the problem, where the package build fails because it can’t find the right
CUDA version despite you having it installed system-wide, it means that you need to adjust the 2 aforementioned
environment variables.`,Yd,xa,Y_="First, you may look at their contents:",Od,Ma,Qd,$a,O_="so you get an idea of what is inside.",Kd,ka,Q_="It’s possible that <code>LD_LIBRARY_PATH</code> is empty.",ec,Aa,K_=`<code>PATH</code> lists the locations of where executables can be found and <code>LD_LIBRARY_PATH</code> is for where shared libraries
are to looked for. In both cases, earlier entries have priority over the later ones. <code>:</code> is used to separate multiple
entries.`,tc,qa,eb=`Now, to tell the build program where to find the specific CUDA toolkit, insert the desired paths to be listed first by
doing:`,nc,ja,oc,Ca,tb="Note that we aren’t overwriting the existing values, but prepending instead.",ac,Ia,nb=`Of course, adjust the version number, the full path if need be. Check that the directories you assign actually do
exist. <code>lib64</code> sub-directory is where the various CUDA <code>.so</code> objects, like <code>libcudart.so</code> reside, it’s unlikely
that your system will have it named differently, but if it is adjust it to reflect your reality.`,rc,Ja,sc,Ua,ob=`Some older CUDA versions may refuse to build with newer compilers. For example, you my have <code>gcc-9</code> but it wants
<code>gcc-7</code>.`,ic,Sa,ab="There are various ways to go about it.",lc,Pa,rb="If you can install the latest CUDA toolkit it typically should support the newer compiler.",dc,La,sb=`Alternatively, you could install the lower version of the compiler in addition to the one you already have, or you may
already have it but it’s not the default one, so the build system can’t see it. If you have <code>gcc-7</code> installed but the
build system complains it can’t find it, the following might do the trick:`,cc,Fa,mc,Na,ib=`Here, we are making a symlink to <code>gcc-7</code> from <code>/usr/local/cuda-10.2/bin/gcc</code> and since
<code>/usr/local/cuda-10.2/bin/</code> should be in the <code>PATH</code> environment variable (see the previous problem’s solution), it
should find <code>gcc-7</code> (and <code>g++7</code>) and then the build will succeed.`,pc,za,lb="As always make sure to edit the paths in the example to match your situation.",uc,Wa,hc,Da,db=`To accelerate training huge models on larger batch sizes, we can use a fully sharded data parallel model.
This type of data parallel paradigm enables fitting more data and larger models by sharding the optimizer states, gradients and parameters.
To read more about it and the benefits, check out the <a href="https://pytorch.org/blog/introducing-pytorch-fully-sharded-data-parallel-api/" rel="nofollow">Fully Sharded Data Parallel blog</a>.
We have integrated the latest PyTorch’s Fully Sharded Data Parallel (FSDP) training feature.
All you need to do is enable it through the config.`,gc,Ha,cb=`<strong>Required PyTorch version for FSDP support</strong>: PyTorch Nightly (or 1.12.0 if you read this after it has been released)
as the model saving with FSDP activated is only available with recent fixes.`,fc,Ra,mb="<strong>Usage</strong>:",_c,Ba,pb=`<li><p>Make sure you have added the distributed launcher
<code>-m torch.distributed.launch --nproc_per_node=NUMBER_OF_GPUS_YOU_HAVE</code> if you haven’t been using it already.</p></li> <li><p><strong>Sharding Strategy</strong>:</p> <ul><li>FULL_SHARD : Shards optimizer states + gradients + model parameters across data parallel workers/GPUs.
For this, add <code>--fsdp full_shard</code> to the command line arguments.</li> <li>SHARD_GRAD_OP : Shards optimizer states + gradients across data parallel workers/GPUs.
For this, add <code>--fsdp shard_grad_op</code> to the command line arguments.</li> <li>NO_SHARD : No sharding. For this, add <code>--fsdp no_shard</code> to the command line arguments.</li></ul></li> <li><p>To offload the parameters and gradients to the CPU,
add <code>--fsdp &quot;full_shard offload&quot;</code> or <code>--fsdp &quot;shard_grad_op offload&quot;</code> to the command line arguments.</p></li> <li><p>To automatically recursively wrap layers with FSDP using <code>default_auto_wrap_policy</code>,
add <code>--fsdp &quot;full_shard auto_wrap&quot;</code> or <code>--fsdp &quot;shard_grad_op auto_wrap&quot;</code> to the command line arguments.</p></li> <li><p>To enable both CPU offloading and auto wrapping,
add <code>--fsdp &quot;full_shard offload auto_wrap&quot;</code> or <code>--fsdp &quot;shard_grad_op offload auto_wrap&quot;</code> to the command line arguments.</p></li> <li><p>Remaining FSDP config is passed via <code>--fsdp_config &lt;path_to_fsdp_config.json&gt;</code>. It is either a location of
FSDP json config file (e.g., <code>fsdp_config.json</code>) or an already loaded json file as <code>dict</code>.</p> <ul><li>If auto wrapping is enabled, you can either use transformer based auto wrap policy or size based auto wrap policy.<ul><li>For transformer based auto wrap policy, it is recommended to specify <code>fsdp_transformer_layer_cls_to_wrap</code> in the config file. If not specified, the default value is <code>model._no_split_modules</code> when available.
This specifies the list of transformer layer class name (case-sensitive) to wrap ,e.g, <code>BertLayer</code>, <code>GPTJBlock</code>, <code>T5Block</code> …
This is important because submodules that share weights (e.g., embedding layer) should not end up in different FSDP wrapped units.
Using this policy, wrapping happens for each block containing Multi-Head Attention followed by couple of MLP layers.
Remaining layers including the shared embeddings are conveniently wrapped in same outermost FSDP unit.
Therefore, use this for transformer based models.</li> <li>For size based auto wrap policy, please add <code>fsdp_min_num_params</code> in the config file.
It specifies FSDP’s minimum number of parameters for auto wrapping.</li></ul></li> <li><code>fsdp_backward_prefetch</code> can be specified in the config file. It controls when to prefetch next set of parameters.
<code>backward_pre</code> and <code>backward_pos</code> are available options.
For more information refer <code>torch.distributed.fsdp.fully_sharded_data_parallel.BackwardPrefetch</code></li> <li><code>fsdp_forward_prefetch</code> can be specified in the config file. It controls when to prefetch next set of parameters.
If <code>&quot;True&quot;</code>, FSDP explicitly prefetches the next upcoming all-gather while executing in the forward pass.</li> <li><code>limit_all_gathers</code> can be specified in the config file.
If <code>&quot;True&quot;</code>, FSDP explicitly synchronizes the CPU thread to prevent too many in-flight all-gathers.</li> <li><code>activation_checkpointing</code> can be specified in the config file.
If <code>&quot;True&quot;</code>, FSDP activation checkpointing is a technique to reduce memory usage by clearing activations of
certain layers and recomputing them during a backward pass. Effectively, this trades extra computation time
for reduced memory usage.</li></ul></li>`,bc,Ea,ub="<strong>Few caveats to be aware of</strong>",yc,Va,hb=`<li>it is incompatible with <code>generate</code>, thus is incompatible with <code>--predict_with_generate</code>
in all seq2seq/clm scripts (translation/summarization/clm etc.).<br/>
Please refer issue <a href="https://github.com/huggingface/transformers/issues/21667" rel="nofollow">#21667</a></li>`,vc,Za,Tc,Xa,gb=`For all the TPU users, great news! PyTorch/XLA now supports FSDP.
All the latest Fully Sharded Data Parallel (FSDP) training are supported.
For more information refer to the <a href="https://pytorch.org/blog/scaling-pytorch-models-on-cloud-tpus-with-fsdp/" rel="nofollow">Scaling PyTorch models on Cloud TPUs with FSDP</a> and <a href="https://github.com/pytorch/xla/tree/master/torch_xla/distributed/fsdp" rel="nofollow">PyTorch/XLA implementation of FSDP</a>
All you need to do is enable it through the config.`,wc,Ga,fb="<strong>Required PyTorch/XLA version for FSDP support</strong>: &gt;=2.0",xc,Ya,_b="<strong>Usage</strong>:",Mc,Oa,bb="Pass <code>--fsdp &quot;full shard&quot;</code> along with following changes to be made in <code>--fsdp_config &lt;path_to_fsdp_config.json&gt;</code>:",$c,Qa,yb=`<li><code>xla</code> should be set to <code>True</code> to enable PyTorch/XLA FSDP.</li> <li><code>xla_fsdp_settings</code> The value is a dictionary which stores the XLA FSDP wrapping parameters.
For a complete list of options, please see <a href="https://github.com/pytorch/xla/blob/master/torch_xla/distributed/fsdp/xla_fully_sharded_data_parallel.py" rel="nofollow">here</a>.</li> <li><code>xla_fsdp_grad_ckpt</code>. When <code>True</code>, uses gradient checkpointing over each nested XLA FSDP wrapped layer.
This setting can only be used when the xla flag is set to true, and an auto wrapping policy is specified through
<code>fsdp_min_num_params</code> or <code>fsdp_transformer_layer_cls_to_wrap</code>.</li> <li>You can either use transformer based auto wrap policy or size based auto wrap policy.<ul><li>For transformer based auto wrap policy, it is recommended to specify <code>fsdp_transformer_layer_cls_to_wrap</code> in the config file. If not specified, the default value is <code>model._no_split_modules</code> when available.
This specifies the list of transformer layer class name (case-sensitive) to wrap ,e.g, <code>BertLayer</code>, <code>GPTJBlock</code>, <code>T5Block</code> …
This is important because submodules that share weights (e.g., embedding layer) should not end up in different FSDP wrapped units.
Using this policy, wrapping happens for each block containing Multi-Head Attention followed by couple of MLP layers.
Remaining layers including the shared embeddings are conveniently wrapped in same outermost FSDP unit.
Therefore, use this for transformer based models.</li> <li>For size based auto wrap policy, please add <code>fsdp_min_num_params</code> in the config file.
It specifies FSDP’s minimum number of parameters for auto wrapping.</li></ul></li>`,kc,Ka,Ac,er,vb=`With PyTorch v1.12 release, developers and researchers can take advantage of Apple silicon GPUs for significantly faster model training.
This unlocks the ability to perform machine learning workflows like prototyping and fine-tuning locally, right on Mac.
Apple’s Metal Performance Shaders (MPS) as a backend for PyTorch enables this and can be used via the new <code>&quot;mps&quot;</code> device.
This will map computational graphs and primitives on the MPS Graph framework and tuned kernels provided by MPS.
For more information please refer official documents <a href="https://pytorch.org/blog/introducing-accelerated-pytorch-training-on-mac/" rel="nofollow">Introducing Accelerated PyTorch Training on Mac</a>
and <a href="https://pytorch.org/docs/stable/notes/mps.html" rel="nofollow">MPS BACKEND</a>.`,qc,xt,jc,tr,Tb="<strong>Benefits of Training and Inference using Apple Silicon Chips</strong>",Cc,nr,wb=`<li>Enables users to train larger networks or batch sizes locally</li> <li>Reduces data retrieval latency and provides the GPU with direct access to the full memory store due to unified memory architecture.
Therefore, improving end-to-end performance.</li> <li>Reduces costs associated with cloud-based development or the need for additional local GPUs.</li>`,Ic,or,xb=`<strong>Pre-requisites</strong>: To install torch with mps support,
please follow this nice medium article <a href="https://medium.com/towards-data-science/gpu-acceleration-comes-to-pytorch-on-m1-macs-195c399efcc1" rel="nofollow">GPU-Acceleration Comes to PyTorch on M1 Macs</a>.`,Jc,ar,Mb=`<strong>Usage</strong>:
<code>mps</code> device will be used by default if available similar to the way <code>cuda</code> device is used.
Therefore, no action from user is required.
For example, you can run the official Glue text classififcation task (from the root folder) using Apple Silicon GPU with below command:`,Uc,rr,Sc,sr,$b="<strong>A few caveats to be aware of</strong>",Pc,ir,kb=`<li>Some PyTorch operations have not been implemented in mps and will throw an error.
One way to get around that is to set the environment variable <code>PYTORCH_ENABLE_MPS_FALLBACK=1</code>,
which will fallback to CPU for these operations. It still throws a UserWarning however.</li> <li>Distributed setups <code>gloo</code> and <code>nccl</code> are not working with <code>mps</code> device.
This means that currently only single GPU of <code>mps</code> device type can be used.</li>`,Lc,lr,Ab=`Finally, please, remember that, 🤗 <code>Trainer</code> only integrates MPS backend, therefore if you
have any problems or questions with regards to MPS backend usage, please,
file an issue with <a href="https://github.com/pytorch/pytorch/issues" rel="nofollow">PyTorch GitHub</a>.`,Fc,dr,Nc,cr,qb="Accelerate now powers Trainer. In terms of what users should expect:",zc,mr,jb="<li>They can keep using the Trainer ingterations such as FSDP, DeepSpeed vis trainer arguments without any changes on their part.</li> <li>They can now use Accelerate Launcher with Trainer (recommended).</li>",Wc,pr,Cb="Steps to use Accelerate Launcher with Trainer:",Dc,xe,Pi,Ib="<p>Make sure 🤗 Accelerate is installed, you can’t use the <code>Trainer</code> without it anyway. If not <code>pip install accelerate</code>. You may also need to update your version of Accelerate: <code>pip install accelerate --upgrade</code></p>",Jh,P,Li,Jb=`Run <code>accelerate config</code> and fill the questionnaire. Below are example accelerate configs:
a. DDP Multi-node Multi-GPU config:`,Uh,ur,Sh,Fi,Ub="b. FSDP config:",Ph,hr,Lh,Ni,Sb="c. DeepSpeed config pointing to a file:",Fh,gr,Nh,zi,Pb="d. DeepSpeed config using accelerate plugin:",zh,fr,Wh,Wi,Lb=`<p>Run the Trainer script with args other than the ones handled above by accelerate config or launcher args.
Below is an example to run <code>run_glue.py</code> using <code>accelerate launcher</code> with FSDP config from above.</p>`,Hc,_r,Rc,Mt,Fb="<li>You can also directly use the cmd args for <code>accelerate launch</code>. Above example would map to:</li>",Bc,br,Ec,yr,Nb='For more information, please refer the 🤗 Accelerate CLI guide: <a href="https://huggingface.co/docs/accelerate/basic_tutorials/launch" rel="nofollow">Launching your 🤗 Accelerate scripts</a>.',Vc,vr,zb="Sections that were moved:",Zc,Tr,Wb=`[ <a href="./deepspeed#deepspeed-trainer-integration">DeepSpeed</a><a id="deepspeed"></a>
| <a href="./deepspeed#deepspeed-installation">Installation</a><a id="installation"></a>
| <a href="./deepspeed#deepspeed-multi-gpu">Deployment with multiple GPUs</a><a id="deployment-with-multiple-gpus"></a>
| <a href="./deepspeed#deepspeed-one-gpu">Deployment with one GPU</a><a id="deployment-with-one-gpu"></a>
| <a href="./deepspeed#deepspeed-notebook">Deployment in Notebooks</a><a id="deployment-in-notebooks"></a>
| <a href="./deepspeed#deepspeed-config">Configuration</a><a id="configuration"></a>
| <a href="./deepspeed#deepspeed-config-passing">Passing Configuration</a><a id="passing-configuration"></a>
| <a href="./deepspeed#deepspeed-config-shared">Shared Configuration</a><a id="shared-configuration"></a>
| <a href="./deepspeed#deepspeed-zero">ZeRO</a><a id="zero"></a>
| <a href="./deepspeed#deepspeed-zero2-config">ZeRO-2 Config</a><a id="zero-2-config"></a>
| <a href="./deepspeed#deepspeed-zero3-config">ZeRO-3 Config</a><a id="zero-3-config"></a>
| <a href="./deepspeed#deepspeed-nvme">NVMe Support</a><a id="nvme-support"></a>
| <a href="./deepspeed#deepspeed-zero2-zero3-performance">ZeRO-2 vs ZeRO-3 Performance</a><a id="zero-2-vs-zero-3-performance"></a>
| <a href="./deepspeed#deepspeed-zero2-example">ZeRO-2 Example</a><a id="zero-2-example"></a>
| <a href="./deepspeed#deepspeed-zero3-example">ZeRO-3 Example</a><a id="zero-3-example"></a>
| <a href="./deepspeed#deepspeed-optimizer">Optimizer</a><a id="optimizer"></a>
| <a href="./deepspeed#deepspeed-scheduler">Scheduler</a><a id="scheduler"></a>
| <a href="./deepspeed#deepspeed-fp32">fp32 Precision</a><a id="fp32-precision"></a>
| <a href="./deepspeed#deepspeed-amp">Automatic Mixed Precision</a><a id="automatic-mixed-precision"></a>
| <a href="./deepspeed#deepspeed-bs">Batch Size</a><a id="batch-size"></a>
| <a href="./deepspeed#deepspeed-grad-acc">Gradient Accumulation</a><a id="gradient-accumulation"></a>
| <a href="./deepspeed#deepspeed-grad-clip">Gradient Clipping</a><a id="gradient-clipping"></a>
| <a href="./deepspeed#deepspeed-weight-extraction">Getting The Model Weights Out</a><a id="getting-the-model-weights-out"></a>
]`,Xc,wr,Gc,xr,Db="NEFTune is a technique to boost the performance of chat models and was introduced by the paper “NEFTune: Noisy Embeddings Improve Instruction Finetuning” from Jain et al. it consists of adding noise to the embedding vectors during training. According to the abstract of the paper:",Yc,Mr,Hb="<p>Standard finetuning of LLaMA-2-7B using Alpaca achieves 29.79% on AlpacaEval, which rises to 64.69% using noisy embeddings. NEFTune also improves over strong baselines on modern instruction datasets. Models trained with Evol-Instruct see a 10% improvement, with ShareGPT an 8% improvement, and with OpenPlatypus an 8% improvement. Even powerful models further refined with RLHF such as LLaMA-2-Chat benefit from additional training with NEFTune.</p>",Oc,$t,Rb='<img src="https://huggingface.co/datasets/trl-internal-testing/example-images/resolve/main/images/neft-screenshot.png"/>',Qc,$r,Bb="To use it in <code>Trainer</code> simply pass <code>neftune_noise_alpha</code> when creating your <code>TrainingArguments</code> instance. Note that to avoid any surprising behaviour, NEFTune is disabled after training to retrieve back the original behaviour of the embedding layer.",Kc,kr,em,ol,tm;return $=new L({props:{title:"Trainer",local:"trainer",headingTag:"h1"}}),Le=new $e({props:{$$slots:{default:[Ob]},$$scope:{ctx:q}}}),Fe=new $e({props:{warning:!0,$$slots:{default:[Qb]},$$scope:{ctx:q}}}),Ft=new C({props:{code:"ZnJvbSUyMHRvcmNoJTIwaW1wb3J0JTIwbm4lMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVHJhaW5lciUwQSUwQSUwQWNsYXNzJTIwQ3VzdG9tVHJhaW5lcihUcmFpbmVyKSUzQSUwQSUyMCUyMCUyMCUyMGRlZiUyMGNvbXB1dGVfbG9zcyhzZWxmJTJDJTIwbW9kZWwlMkMlMjBpbnB1dHMlMkMlMjByZXR1cm5fb3V0cHV0cyUzREZhbHNlKSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGxhYmVscyUyMCUzRCUyMGlucHV0cy5wb3AoJTIybGFiZWxzJTIyKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMGZvcndhcmQlMjBwYXNzJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG91dHB1dHMuZ2V0KCUyMmxvZ2l0cyUyMiklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBjb21wdXRlJTIwY3VzdG9tJTIwbG9zcyUyMChzdXBwb3NlJTIwb25lJTIwaGFzJTIwMyUyMGxhYmVscyUyMHdpdGglMjBkaWZmZXJlbnQlMjB3ZWlnaHRzKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGxvc3NfZmN0JTIwJTNEJTIwbm4uQ3Jvc3NFbnRyb3B5TG9zcyh3ZWlnaHQlM0R0b3JjaC50ZW5zb3IoJTVCMS4wJTJDJTIwMi4wJTJDJTIwMy4wJTVEJTJDJTIwZGV2aWNlJTNEbW9kZWwuZGV2aWNlKSklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsb3NzJTIwJTNEJTIwbG9zc19mY3QobG9naXRzLnZpZXcoLTElMkMlMjBzZWxmLm1vZGVsLmNvbmZpZy5udW1fbGFiZWxzKSUyQyUyMGxhYmVscy52aWV3KC0xKSklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjAobG9zcyUyQyUyMG91dHB1dHMpJTIwaWYlMjByZXR1cm5fb3V0cHV0cyUyMGVsc2UlMjBsb3Nz",highlighted:`<span class="hljs-keyword">from</span> torch <span class="hljs-keyword">import</span> nn
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Trainer


<span class="hljs-keyword">class</span> <span class="hljs-title class_">CustomTrainer</span>(<span class="hljs-title class_ inherited__">Trainer</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_loss</span>(<span class="hljs-params">self, model, inputs, return_outputs=<span class="hljs-literal">False</span></span>):
        labels = inputs.pop(<span class="hljs-string">&quot;labels&quot;</span>)
        <span class="hljs-comment"># forward pass</span>
        outputs = model(**inputs)
        logits = outputs.get(<span class="hljs-string">&quot;logits&quot;</span>)
        <span class="hljs-comment"># compute custom loss (suppose one has 3 labels with different weights)</span>
        loss_fct = nn.CrossEntropyLoss(weight=torch.tensor([<span class="hljs-number">1.0</span>, <span class="hljs-number">2.0</span>, <span class="hljs-number">3.0</span>], device=model.device))
        loss = loss_fct(logits.view(-<span class="hljs-number">1</span>, self.model.config.num_labels), labels.view(-<span class="hljs-number">1</span>))
        <span class="hljs-keyword">return</span> (loss, outputs) <span class="hljs-keyword">if</span> return_outputs <span class="hljs-keyword">else</span> loss`,wrap:!1}}),zt=new L({props:{title:"Trainer",local:"transformers.Trainer",headingTag:"h2"}}),Wt=new k({props:{name:"class transformers.Trainer",anchor:"transformers.Trainer",parameters:[{name:"model",val:": typing.Union[transformers.modeling_utils.PreTrainedModel, torch.nn.modules.module.Module] = None"},{name:"args",val:": TrainingArguments = None"},{name:"data_collator",val:": typing.Optional[DataCollator] = None"},{name:"train_dataset",val:": typing.Optional[torch.utils.data.dataset.Dataset] = None"},{name:"eval_dataset",val:": typing.Union[torch.utils.data.dataset.Dataset, typing.Dict[str, torch.utils.data.dataset.Dataset], NoneType] = None"},{name:"tokenizer",val:": typing.Optional[transformers.tokenization_utils_base.PreTrainedTokenizerBase] = None"},{name:"model_init",val:": typing.Union[typing.Callable[[], transformers.modeling_utils.PreTrainedModel], NoneType] = None"},{name:"compute_metrics",val:": typing.Union[typing.Callable[[transformers.trainer_utils.EvalPrediction], typing.Dict], NoneType] = None"},{name:"callbacks",val:": typing.Optional[typing.List[transformers.trainer_callback.TrainerCallback]] = None"},{name:"optimizers",val:": typing.Tuple[torch.optim.optimizer.Optimizer, torch.optim.lr_scheduler.LambdaLR] = (None, None)"},{name:"preprocess_logits_for_metrics",val:": typing.Union[typing.Callable[[torch.Tensor, torch.Tensor], torch.Tensor], NoneType] = None"}],parametersDescription:[{anchor:"transformers.Trainer.model",description:`<strong>model</strong> (<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <code>torch.nn.Module</code>, <em>optional</em>) &#x2014;
The model to train, evaluate or use for predictions. If not provided, a <code>model_init</code> must be passed.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p><a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> is optimized to work with the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> provided by the library. You can still use
your own models defined as <code>torch.nn.Module</code> as long as they work the same way as the &#x1F917; Transformers
models.</p>

					</div>`,name:"model"},{anchor:"transformers.Trainer.args",description:`<strong>args</strong> (<a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a>, <em>optional</em>) &#x2014;
The arguments to tweak for training. Will default to a basic instance of <a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a> with the
<code>output_dir</code> set to a directory named <em>tmp_trainer</em> in the current directory if not provided.`,name:"args"},{anchor:"transformers.Trainer.data_collator",description:`<strong>data_collator</strong> (<code>DataCollator</code>, <em>optional</em>) &#x2014;
The function to use to form a batch from a list of elements of <code>train_dataset</code> or <code>eval_dataset</code>. Will
default to <a href="/docs/transformers/main/en/main_classes/data_collator#transformers.default_data_collator">default_data_collator()</a> if no <code>tokenizer</code> is provided, an instance of
<a href="/docs/transformers/main/en/main_classes/data_collator#transformers.DataCollatorWithPadding">DataCollatorWithPadding</a> otherwise.`,name:"data_collator"},{anchor:"transformers.Trainer.train_dataset",description:`<strong>train_dataset</strong> (<code>torch.utils.data.Dataset</code> or <code>torch.utils.data.IterableDataset</code>, <em>optional</em>) &#x2014;
The dataset to use for training. If it is a <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset" rel="nofollow">Dataset</a>, columns not accepted by the
<code>model.forward()</code> method are automatically removed.</p>
<p>Note that if it&#x2019;s a <code>torch.utils.data.IterableDataset</code> with some randomization and you are training in a
distributed fashion, your iterable dataset should either use a internal attribute <code>generator</code> that is a
<code>torch.Generator</code> for the randomization that must be identical on all processes (and the Trainer will
manually set the seed of this <code>generator</code> at each epoch) or have a <code>set_epoch()</code> method that internally
sets the seed of the RNGs used.`,name:"train_dataset"},{anchor:"transformers.Trainer.eval_dataset",description:`<strong>eval_dataset</strong> (Union[<code>torch.utils.data.Dataset</code>, Dict[str, <code>torch.utils.data.Dataset</code>]), <em>optional</em>) &#x2014;
The dataset to use for evaluation. If it is a <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset" rel="nofollow">Dataset</a>, columns not accepted by the
<code>model.forward()</code> method are automatically removed. If it is a dictionary, it will evaluate on each
dataset prepending the dictionary key to the metric name.`,name:"eval_dataset"},{anchor:"transformers.Trainer.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase">PreTrainedTokenizerBase</a>, <em>optional</em>) &#x2014;
The tokenizer used to preprocess the data. If provided, will be used to automatically pad the inputs to the
maximum length when batching inputs, and it will be saved along the model to make it easier to rerun an
interrupted training or reuse the fine-tuned model.`,name:"tokenizer"},{anchor:"transformers.Trainer.model_init",description:`<strong>model_init</strong> (<code>Callable[[], PreTrainedModel]</code>, <em>optional</em>) &#x2014;
A function that instantiates the model to be used. If provided, each call to <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.train">train()</a> will start
from a new instance of the model as given by this function.</p>
<p>The function may have zero argument, or a single one containing the optuna/Ray Tune/SigOpt trial object, to
be able to choose different architectures according to hyper parameters (such as layer count, sizes of
inner layers, dropout probabilities etc).`,name:"model_init"},{anchor:"transformers.Trainer.compute_metrics",description:`<strong>compute_metrics</strong> (<code>Callable[[EvalPrediction], Dict]</code>, <em>optional</em>) &#x2014;
The function that will be used to compute metrics at evaluation. Must take a <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.EvalPrediction">EvalPrediction</a> and return
a dictionary string to metric values.`,name:"compute_metrics"},{anchor:"transformers.Trainer.callbacks",description:`<strong>callbacks</strong> (List of <a href="/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a>, <em>optional</em>) &#x2014;
A list of callbacks to customize the training loop. Will add those to the list of default callbacks
detailed in <a href="callback">here</a>.</p>
<p>If you want to remove one of the default callbacks used, use the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.remove_callback">Trainer.remove_callback()</a> method.`,name:"callbacks"},{anchor:"transformers.Trainer.optimizers",description:`<strong>optimizers</strong> (<code>Tuple[torch.optim.Optimizer, torch.optim.lr_scheduler.LambdaLR]</code>, <em>optional</em>, defaults to <code>(None, None)</code>) &#x2014;
A tuple containing the optimizer and the scheduler to use. Will default to an instance of <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a> on your
model and a scheduler given by <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.get_linear_schedule_with_warmup">get_linear_schedule_with_warmup()</a> controlled by <code>args</code>.`,name:"optimizers"},{anchor:"transformers.Trainer.preprocess_logits_for_metrics",description:`<strong>preprocess_logits_for_metrics</strong> (<code>Callable[[torch.Tensor, torch.Tensor], torch.Tensor]</code>, <em>optional</em>) &#x2014;
A function that preprocess the logits right before caching them at each evaluation step. Must take two
tensors, the logits and the labels, and return the logits once processed as desired. The modifications made
by this function will be reflected in the predictions received by <code>compute_metrics</code>.</p>
<p>Note that the labels (second parameter) will be <code>None</code> if the dataset does not have them.`,name:"preprocess_logits_for_metrics"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L231"}}),Dt=new k({props:{name:"add_callback",anchor:"transformers.Trainer.add_callback",parameters:[{name:"callback",val:""}],parametersDescription:[{anchor:"transformers.Trainer.add_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <code>~transformer.TrainerCallback</code>) &#x2014;
A <code>~transformer.TrainerCallback</code> class or an instance of a <code>~transformer.TrainerCallback</code>. In the
first case, will instantiate a member of that class.`,name:"callback"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L677"}}),Ht=new k({props:{name:"autocast_smart_context_manager",anchor:"transformers.Trainer.autocast_smart_context_manager",parameters:[{name:"cache_enabled",val:": typing.Optional[bool] = True"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2687"}}),Rt=new k({props:{name:"compute_loss",anchor:"transformers.Trainer.compute_loss",parameters:[{name:"model",val:""},{name:"inputs",val:""},{name:"return_outputs",val:" = False"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2738"}}),Bt=new k({props:{name:"compute_loss_context_manager",anchor:"transformers.Trainer.compute_loss_context_manager",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2681"}}),Et=new k({props:{name:"create_model_card",anchor:"transformers.Trainer.create_model_card",parameters:[{name:"language",val:": typing.Optional[str] = None"},{name:"license",val:": typing.Optional[str] = None"},{name:"tags",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"model_name",val:": typing.Optional[str] = None"},{name:"finetuned_from",val:": typing.Optional[str] = None"},{name:"tasks",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"dataset_tags",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"dataset",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"dataset_args",val:": typing.Union[str, typing.List[str], NoneType] = None"}],parametersDescription:[{anchor:"transformers.Trainer.create_model_card.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language of the model (if applicable)`,name:"language"},{anchor:"transformers.Trainer.create_model_card.license",description:`<strong>license</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The license of the model. Will default to the license of the pretrained model used, if the original
model given to the <code>Trainer</code> comes from a repo on the Hub.`,name:"license"},{anchor:"transformers.Trainer.create_model_card.tags",description:`<strong>tags</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Some tags to be included in the metadata of the model card.`,name:"tags"},{anchor:"transformers.Trainer.create_model_card.model_name",description:`<strong>model_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the model.`,name:"model_name"},{anchor:"transformers.Trainer.create_model_card.finetuned_from",description:`<strong>finetuned_from</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the model used to fine-tune this one (if applicable). Will default to the name of the repo
of the original model given to the <code>Trainer</code> (if it comes from the Hub).`,name:"finetuned_from"},{anchor:"transformers.Trainer.create_model_card.tasks",description:`<strong>tasks</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
One or several task identifiers, to be included in the metadata of the model card.`,name:"tasks"},{anchor:"transformers.Trainer.create_model_card.dataset_tags",description:`<strong>dataset_tags</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
One or several dataset tags, to be included in the metadata of the model card.`,name:"dataset_tags"},{anchor:"transformers.Trainer.create_model_card.dataset",description:`<strong>dataset</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
One or several dataset identifiers, to be included in the metadata of the model card.`,name:"dataset"},{anchor:"transformers.Trainer.create_model_card.dataset_args",description:`<strong>dataset_args</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
One or several dataset arguments, to be included in the metadata of the model card.`,name:"dataset_args"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L3540"}}),Vt=new k({props:{name:"create_optimizer",anchor:"transformers.Trainer.create_optimizer",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L946"}}),Zt=new k({props:{name:"create_optimizer_and_scheduler",anchor:"transformers.Trainer.create_optimizer_and_scheduler",parameters:[{name:"num_training_steps",val:": int"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L919"}}),Xt=new k({props:{name:"create_scheduler",anchor:"transformers.Trainer.create_scheduler",parameters:[{name:"num_training_steps",val:": int"},{name:"optimizer",val:": Optimizer = None"}],parametersDescription:[{anchor:"transformers.Trainer.create_scheduler.num_training_steps",description:"<strong>num_training_steps</strong> (int) &#x2014; The number of training steps to do.",name:"num_training_steps"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L1126"}}),Gt=new k({props:{name:"evaluate",anchor:"transformers.Trainer.evaluate",parameters:[{name:"eval_dataset",val:": typing.Optional[torch.utils.data.dataset.Dataset] = None"},{name:"ignore_keys",val:": typing.Optional[typing.List[str]] = None"},{name:"metric_key_prefix",val:": str = 'eval'"}],parametersDescription:[{anchor:"transformers.Trainer.evaluate.eval_dataset",description:`<strong>eval_dataset</strong> (<code>Dataset</code>, <em>optional</em>) &#x2014;
Pass a dataset if you wish to override <code>self.eval_dataset</code>. If it is a <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset" rel="nofollow">Dataset</a>, columns
not accepted by the <code>model.forward()</code> method are automatically removed. It must implement the <code>__len__</code>
method.`,name:"eval_dataset"},{anchor:"transformers.Trainer.evaluate.ignore_keys",description:`<strong>ignore_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
A list of keys in the output of your model (if it is a dictionary) that should be ignored when
gathering predictions.`,name:"ignore_keys"},{anchor:"transformers.Trainer.evaluate.metric_key_prefix",description:`<strong>metric_key_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;eval&quot;</code>) &#x2014;
An optional prefix to be used as the metrics key prefix. For example the metrics &#x201C;bleu&#x201D; will be named
&#x201C;eval_bleu&#x201D; if the prefix is &#x201C;eval&#x201D; (default)`,name:"metric_key_prefix"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2975",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A dictionary containing the evaluation loss and the potential metrics computed from the predictions. The
dictionary also contains the epoch number which comes from the training state.</p>
`}}),Yt=new k({props:{name:"evaluation_loop",anchor:"transformers.Trainer.evaluation_loop",parameters:[{name:"dataloader",val:": DataLoader"},{name:"description",val:": str"},{name:"prediction_loss_only",val:": typing.Optional[bool] = None"},{name:"ignore_keys",val:": typing.Optional[typing.List[str]] = None"},{name:"metric_key_prefix",val:": str = 'eval'"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L3108"}}),Ot=new k({props:{name:"floating_point_ops",anchor:"transformers.Trainer.floating_point_ops",parameters:[{name:"inputs",val:": typing.Dict[str, typing.Union[torch.Tensor, typing.Any]]"}],parametersDescription:[{anchor:"transformers.Trainer.floating_point_ops.inputs",description:`<strong>inputs</strong> (<code>Dict[str, Union[torch.Tensor, Any]]</code>) &#x2014;
The inputs and targets of the model.`,name:"inputs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L3448",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The number of floating-point operations.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>int</code></p>
`}}),Qt=new k({props:{name:"get_decay_parameter_names",anchor:"transformers.Trainer.get_decay_parameter_names",parameters:[{name:"model",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L935"}}),Kt=new k({props:{name:"get_eval_dataloader",anchor:"transformers.Trainer.get_eval_dataloader",parameters:[{name:"eval_dataset",val:": typing.Optional[torch.utils.data.dataset.Dataset] = None"}],parametersDescription:[{anchor:"transformers.Trainer.get_eval_dataloader.eval_dataset",description:`<strong>eval_dataset</strong> (<code>torch.utils.data.Dataset</code>, <em>optional</em>) &#x2014;
If provided, will override <code>self.eval_dataset</code>. If it is a <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset" rel="nofollow">Dataset</a>, columns not accepted
by the <code>model.forward()</code> method are automatically removed. It must implement <code>__len__</code>.`,name:"eval_dataset"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L853"}}),en=new k({props:{name:"get_optimizer_cls_and_kwargs",anchor:"transformers.Trainer.get_optimizer_cls_and_kwargs",parameters:[{name:"args",val:": TrainingArguments"}],parametersDescription:[{anchor:"transformers.Trainer.get_optimizer_cls_and_kwargs.args",description:`<strong>args</strong> (<code>transformers.training_args.TrainingArguments</code>) &#x2014;
The training arguments for the training session.`,name:"args"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L994"}}),tn=new k({props:{name:"get_test_dataloader",anchor:"transformers.Trainer.get_test_dataloader",parameters:[{name:"test_dataset",val:": Dataset"}],parametersDescription:[{anchor:"transformers.Trainer.get_test_dataloader.test_dataset",description:`<strong>test_dataset</strong> (<code>torch.utils.data.Dataset</code>, <em>optional</em>) &#x2014;
The test dataset to use. If it is a <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset" rel="nofollow">Dataset</a>, columns not accepted by the
<code>model.forward()</code> method are automatically removed. It must implement <code>__len__</code>.`,name:"test_dataset"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L887"}}),nn=new k({props:{name:"get_train_dataloader",anchor:"transformers.Trainer.get_train_dataloader",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L798"}}),on=new k({props:{name:"hyperparameter_search",anchor:"transformers.Trainer.hyperparameter_search",parameters:[{name:"hp_space",val:": typing.Union[typing.Callable[[ForwardRef('optuna.Trial')], typing.Dict[str, float]], NoneType] = None"},{name:"compute_objective",val:": typing.Union[typing.Callable[[typing.Dict[str, float]], float], NoneType] = None"},{name:"n_trials",val:": int = 20"},{name:"direction",val:": typing.Union[str, typing.List[str]] = 'minimize'"},{name:"backend",val:": typing.Union[ForwardRef('str'), transformers.trainer_utils.HPSearchBackend, NoneType] = None"},{name:"hp_name",val:": typing.Union[typing.Callable[[ForwardRef('optuna.Trial')], str], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Trainer.hyperparameter_search.hp_space",description:`<strong>hp_space</strong> (<code>Callable[[&quot;optuna.Trial&quot;], Dict[str, float]]</code>, <em>optional</em>) &#x2014;
A function that defines the hyperparameter search space. Will default to
<code>default_hp_space_optuna()</code> or <code>default_hp_space_ray()</code> or
<code>default_hp_space_sigopt()</code> depending on your backend.`,name:"hp_space"},{anchor:"transformers.Trainer.hyperparameter_search.compute_objective",description:`<strong>compute_objective</strong> (<code>Callable[[Dict[str, float]], float]</code>, <em>optional</em>) &#x2014;
A function computing the objective to minimize or maximize from the metrics returned by the <code>evaluate</code>
method. Will default to <code>default_compute_objective()</code>.`,name:"compute_objective"},{anchor:"transformers.Trainer.hyperparameter_search.n_trials",description:`<strong>n_trials</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
The number of trial runs to test.`,name:"n_trials"},{anchor:"transformers.Trainer.hyperparameter_search.direction",description:`<strong>direction</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>, defaults to <code>&quot;minimize&quot;</code>) &#x2014;
If it&#x2019;s single objective optimization, direction is <code>str</code>, can be <code>&quot;minimize&quot;</code> or <code>&quot;maximize&quot;</code>, you
should pick <code>&quot;minimize&quot;</code> when optimizing the validation loss, <code>&quot;maximize&quot;</code> when optimizing one or
several metrics. If it&#x2019;s multi objectives optimization, direction is <code>List[str]</code>, can be List of
<code>&quot;minimize&quot;</code> and <code>&quot;maximize&quot;</code>, you should pick <code>&quot;minimize&quot;</code> when optimizing the validation loss,
<code>&quot;maximize&quot;</code> when optimizing one or several metrics.`,name:"direction"},{anchor:"transformers.Trainer.hyperparameter_search.backend",description:`<strong>backend</strong> (<code>str</code> or <code>~training_utils.HPSearchBackend</code>, <em>optional</em>) &#x2014;
The backend to use for hyperparameter search. Will default to optuna or Ray Tune or SigOpt, depending
on which one is installed. If all are installed, will default to optuna.`,name:"backend"},{anchor:"transformers.Trainer.hyperparameter_search.hp_name",description:`<strong>hp_name</strong> (<code>Callable[[&quot;optuna.Trial&quot;], str]]</code>, <em>optional</em>) &#x2014;
A function that defines the trial/run name. Will default to None.`,name:"hp_name"},{anchor:"transformers.Trainer.hyperparameter_search.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to <code>optuna.create_study</code> or <code>ray.tune.run</code>. For more
information see:</p>
<ul>
<li>the documentation of
<a href="https://optuna.readthedocs.io/en/stable/reference/generated/optuna.study.create_study.html" rel="nofollow">optuna.create_study</a></li>
<li>the documentation of <a href="https://docs.ray.io/en/latest/tune/api_docs/execution.html#tune-run" rel="nofollow">tune.run</a></li>
<li>the documentation of <a href="https://app.sigopt.com/docs/endpoints/experiments/create" rel="nofollow">sigopt</a></li>
</ul>`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2551",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>All the information about the best run or best
runs for multi-objective optimization. Experiment summary can be found in <code>run_summary</code> attribute for Ray
backend.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>[<code>trainer_utils.BestRun</code> or <code>List[trainer_utils.BestRun]</code>]</p>
`}}),Ee=new $e({props:{warning:!0,$$slots:{default:[Kb]},$$scope:{ctx:q}}}),an=new k({props:{name:"init_git_repo",anchor:"transformers.Trainer.init_git_repo",parameters:[{name:"at_init",val:": bool = False"}],parametersDescription:[{anchor:"transformers.Trainer.init_git_repo.at_init",description:`<strong>at_init</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether this function is called before any training or not. If <code>self.args.overwrite_output_dir</code> is
<code>True</code> and <code>at_init</code> is <code>True</code>, the path to the repo (which is <code>self.args.output_dir</code>) might be wiped
out.`,name:"at_init"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L3483"}}),Ve=new $e({props:{warning:!0,$$slots:{default:[ey]},$$scope:{ctx:q}}}),rn=new k({props:{name:"init_hf_repo",anchor:"transformers.Trainer.init_hf_repo",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L3466"}}),sn=new k({props:{name:"is_local_process_zero",anchor:"transformers.Trainer.is_local_process_zero",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2775"}}),ln=new k({props:{name:"is_world_process_zero",anchor:"transformers.Trainer.is_world_process_zero",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2782"}}),dn=new k({props:{name:"log",anchor:"transformers.Trainer.log",parameters:[{name:"logs",val:": typing.Dict[str, float]"}],parametersDescription:[{anchor:"transformers.Trainer.log.logs",description:`<strong>logs</strong> (<code>Dict[str, float]</code>) &#x2014;
The values to log.`,name:"logs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2630"}}),cn=new k({props:{name:"log_metrics",anchor:"transformers.Trainer.log_metrics",parameters:[{name:"split",val:""},{name:"metrics",val:""}],parametersDescription:[{anchor:"transformers.Trainer.log_metrics.split",description:`<strong>split</strong> (<code>str</code>) &#x2014;
Mode/split name: one of <code>train</code>, <code>eval</code>, <code>test</code>`,name:"split"},{anchor:"transformers.Trainer.log_metrics.metrics",description:`<strong>metrics</strong> (<code>Dict[str, float]</code>) &#x2014;
The metrics returned from train/evaluate/predictmetrics: metrics dict`,name:"metrics"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_pt_utils.py#L905"}}),Ye=new ke({props:{anchor:"transformers.Trainer.log_metrics.example",$$slots:{default:[ty]},$$scope:{ctx:q}}}),mn=new k({props:{name:"metrics_format",anchor:"transformers.Trainer.metrics_format",parameters:[{name:"metrics",val:": typing.Dict[str, float]"}],parametersDescription:[{anchor:"transformers.Trainer.metrics_format.metrics",description:`<strong>metrics</strong> (<code>Dict[str, float]</code>) &#x2014;
The metrics returned from train/evaluate/predict`,name:"metrics"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_pt_utils.py#L879",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The reformatted metrics</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>metrics (<code>Dict[str, float]</code>)</p>
`}}),pn=new k({props:{name:"num_examples",anchor:"transformers.Trainer.num_examples",parameters:[{name:"dataloader",val:": DataLoader"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L1144"}}),un=new k({props:{name:"num_tokens",anchor:"transformers.Trainer.num_tokens",parameters:[{name:"train_dl",val:": DataLoader"},{name:"max_steps",val:": typing.Optional[int] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L1158"}}),hn=new k({props:{name:"pop_callback",anchor:"transformers.Trainer.pop_callback",parameters:[{name:"callback",val:""}],parametersDescription:[{anchor:"transformers.Trainer.pop_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <code>~transformer.TrainerCallback</code>) &#x2014;
A <code>~transformer.TrainerCallback</code> class or an instance of a <code>~transformer.TrainerCallback</code>. In the
first case, will pop the first member of that class found in the list of callbacks.`,name:"callback"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L688",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The callback removed, if found.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~transformer.TrainerCallback</code></p>
`}}),gn=new k({props:{name:"predict",anchor:"transformers.Trainer.predict",parameters:[{name:"test_dataset",val:": Dataset"},{name:"ignore_keys",val:": typing.Optional[typing.List[str]] = None"},{name:"metric_key_prefix",val:": str = 'test'"}],parametersDescription:[{anchor:"transformers.Trainer.predict.test_dataset",description:`<strong>test_dataset</strong> (<code>Dataset</code>) &#x2014;
Dataset to run the predictions on. If it is an <code>datasets.Dataset</code>, columns not accepted by the
<code>model.forward()</code> method are automatically removed. Has to implement the method <code>__len__</code>`,name:"test_dataset"},{anchor:"transformers.Trainer.predict.ignore_keys",description:`<strong>ignore_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
A list of keys in the output of your model (if it is a dictionary) that should be ignored when
gathering predictions.`,name:"ignore_keys"},{anchor:"transformers.Trainer.predict.metric_key_prefix",description:`<strong>metric_key_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;test&quot;</code>) &#x2014;
An optional prefix to be used as the metrics key prefix. For example the metrics &#x201C;bleu&#x201D; will be named
&#x201C;test_bleu&#x201D; if the prefix is &#x201C;test&#x201D; (default)`,name:"metric_key_prefix"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L3046"}}),et=new $e({props:{$$slots:{default:[ny]},$$scope:{ctx:q}}}),fn=new k({props:{name:"prediction_loop",anchor:"transformers.Trainer.prediction_loop",parameters:[{name:"dataloader",val:": DataLoader"},{name:"description",val:": str"},{name:"prediction_loss_only",val:": typing.Optional[bool] = None"},{name:"ignore_keys",val:": typing.Optional[typing.List[str]] = None"},{name:"metric_key_prefix",val:": str = 'eval'"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L3712"}}),_n=new k({props:{name:"prediction_step",anchor:"transformers.Trainer.prediction_step",parameters:[{name:"model",val:": Module"},{name:"inputs",val:": typing.Dict[str, typing.Union[torch.Tensor, typing.Any]]"},{name:"prediction_loss_only",val:": bool"},{name:"ignore_keys",val:": typing.Optional[typing.List[str]] = None"}],parametersDescription:[{anchor:"transformers.Trainer.prediction_step.model",description:`<strong>model</strong> (<code>nn.Module</code>) &#x2014;
The model to evaluate.`,name:"model"},{anchor:"transformers.Trainer.prediction_step.inputs",description:`<strong>inputs</strong> (<code>Dict[str, Union[torch.Tensor, Any]]</code>) &#x2014;
The inputs and targets of the model.</p>
<p>The dictionary will be unpacked before being fed to the model. Most models expect the targets under the
argument <code>labels</code>. Check your model&#x2019;s documentation for all accepted arguments.`,name:"inputs"},{anchor:"transformers.Trainer.prediction_step.prediction_loss_only",description:`<strong>prediction_loss_only</strong> (<code>bool</code>) &#x2014;
Whether or not to return the loss only.`,name:"prediction_loss_only"},{anchor:"transformers.Trainer.prediction_step.ignore_keys",description:`<strong>ignore_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
A list of keys in the output of your model (if it is a dictionary) that should be ignored when
gathering predictions.`,name:"ignore_keys"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L3343",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A tuple with the loss,
logits and labels (each being optional).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Tuple[Optional[torch.Tensor], Optional[torch.Tensor], Optional[torch.Tensor]]</p>
`}}),bn=new k({props:{name:"push_to_hub",anchor:"transformers.Trainer.push_to_hub",parameters:[{name:"commit_message",val:": typing.Optional[str] = 'End of training'"},{name:"blocking",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Trainer.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;End of training&quot;</code>) &#x2014;
Message to commit while pushing.`,name:"commit_message"},{anchor:"transformers.Trainer.push_to_hub.blocking",description:`<strong>blocking</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the function should return only when the <code>git push</code> has finished.`,name:"blocking"},{anchor:"transformers.Trainer.push_to_hub.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.create_model_card">create_model_card()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L3660",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The URL of the repository where the model was pushed if <code>blocking=False</code>, or a <code>Future</code> object tracking the
progress of the commit if <code>blocking=True</code>.</p>
`}}),yn=new k({props:{name:"remove_callback",anchor:"transformers.Trainer.remove_callback",parameters:[{name:"callback",val:""}],parametersDescription:[{anchor:"transformers.Trainer.remove_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <code>~transformer.TrainerCallback</code>) &#x2014;
A <code>~transformer.TrainerCallback</code> class or an instance of a <code>~transformer.TrainerCallback</code>. In the
first case, will remove the first member of that class found in the list of callbacks.`,name:"callback"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L704"}}),vn=new k({props:{name:"save_metrics",anchor:"transformers.Trainer.save_metrics",parameters:[{name:"split",val:""},{name:"metrics",val:""},{name:"combined",val:" = True"}],parametersDescription:[{anchor:"transformers.Trainer.save_metrics.split",description:`<strong>split</strong> (<code>str</code>) &#x2014;
Mode/split name: one of <code>train</code>, <code>eval</code>, <code>test</code>, <code>all</code>`,name:"split"},{anchor:"transformers.Trainer.save_metrics.metrics",description:`<strong>metrics</strong> (<code>Dict[str, float]</code>) &#x2014;
The metrics returned from train/evaluate/predict`,name:"metrics"},{anchor:"transformers.Trainer.save_metrics.combined",description:`<strong>combined</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Creates combined metrics by updating <code>all_results.json</code> with metrics of this call`,name:"combined"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_pt_utils.py#L995"}}),Tn=new k({props:{name:"save_model",anchor:"transformers.Trainer.save_model",parameters:[{name:"output_dir",val:": typing.Optional[str] = None"},{name:"_internal_call",val:": bool = False"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2794"}}),wn=new k({props:{name:"save_state",anchor:"transformers.Trainer.save_state",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_pt_utils.py#L1033"}}),xn=new k({props:{name:"train",anchor:"transformers.Trainer.train",parameters:[{name:"resume_from_checkpoint",val:": typing.Union[str, bool, NoneType] = None"},{name:"trial",val:": typing.Union[ForwardRef('optuna.Trial'), typing.Dict[str, typing.Any]] = None"},{name:"ignore_keys_for_eval",val:": typing.Optional[typing.List[str]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Trainer.train.resume_from_checkpoint",description:`<strong>resume_from_checkpoint</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
If a <code>str</code>, local path to a saved checkpoint as saved by a previous instance of <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>. If a
<code>bool</code> and equals <code>True</code>, load the last checkpoint in <em>args.output_dir</em> as saved by a previous instance
of <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>. If present, training will resume from the model/optimizer/scheduler states loaded here.`,name:"resume_from_checkpoint"},{anchor:"transformers.Trainer.train.trial",description:`<strong>trial</strong> (<code>optuna.Trial</code> or <code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The trial run or the hyperparameter dictionary for hyperparameter search.`,name:"trial"},{anchor:"transformers.Trainer.train.ignore_keys_for_eval",description:`<strong>ignore_keys_for_eval</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
A list of keys in the output of your model (if it is a dictionary) that should be ignored when
gathering predictions for evaluation during the training.`,name:"ignore_keys_for_eval"},{anchor:"transformers.Trainer.train.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments used to hide deprecated arguments`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L1454"}}),Mn=new k({props:{name:"training_step",anchor:"transformers.Trainer.training_step",parameters:[{name:"model",val:": Module"},{name:"inputs",val:": typing.Dict[str, typing.Union[torch.Tensor, typing.Any]]"}],parametersDescription:[{anchor:"transformers.Trainer.training_step.model",description:`<strong>model</strong> (<code>nn.Module</code>) &#x2014;
The model to train.`,name:"model"},{anchor:"transformers.Trainer.training_step.inputs",description:`<strong>inputs</strong> (<code>Dict[str, Union[torch.Tensor, Any]]</code>) &#x2014;
The inputs and targets of the model.</p>
<p>The dictionary will be unpacked before being fed to the model. Most models expect the targets under the
argument <code>labels</code>. Check your model&#x2019;s documentation for all accepted arguments.`,name:"inputs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L2699",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The tensor with training loss on this batch.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code></p>
`}}),$n=new L({props:{title:"Seq2SeqTrainer",local:"transformers.Seq2SeqTrainer",headingTag:"h2"}}),kn=new k({props:{name:"class transformers.Seq2SeqTrainer",anchor:"transformers.Seq2SeqTrainer",parameters:[{name:"model",val:": typing.Union[ForwardRef('PreTrainedModel'), torch.nn.modules.module.Module] = None"},{name:"args",val:": TrainingArguments = None"},{name:"data_collator",val:": typing.Optional[ForwardRef('DataCollator')] = None"},{name:"train_dataset",val:": typing.Optional[torch.utils.data.dataset.Dataset] = None"},{name:"eval_dataset",val:": typing.Union[torch.utils.data.dataset.Dataset, typing.Dict[str, torch.utils.data.dataset.Dataset], NoneType] = None"},{name:"tokenizer",val:": typing.Optional[ForwardRef('PreTrainedTokenizerBase')] = None"},{name:"model_init",val:": typing.Union[typing.Callable[[], ForwardRef('PreTrainedModel')], NoneType] = None"},{name:"compute_metrics",val:": typing.Union[typing.Callable[[ForwardRef('EvalPrediction')], typing.Dict], NoneType] = None"},{name:"callbacks",val:": typing.Optional[typing.List[ForwardRef('TrainerCallback')]] = None"},{name:"optimizers",val:": typing.Tuple[torch.optim.optimizer.Optimizer, torch.optim.lr_scheduler.LambdaLR] = (None, None)"},{name:"preprocess_logits_for_metrics",val:": typing.Union[typing.Callable[[torch.Tensor, torch.Tensor], torch.Tensor], NoneType] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_seq2seq.py#L41"}}),An=new k({props:{name:"evaluate",anchor:"transformers.Seq2SeqTrainer.evaluate",parameters:[{name:"eval_dataset",val:": typing.Optional[torch.utils.data.dataset.Dataset] = None"},{name:"ignore_keys",val:": typing.Optional[typing.List[str]] = None"},{name:"metric_key_prefix",val:": str = 'eval'"},{name:"**gen_kwargs",val:""}],parametersDescription:[{anchor:"transformers.Seq2SeqTrainer.evaluate.eval_dataset",description:`<strong>eval_dataset</strong> (<code>Dataset</code>, <em>optional</em>) &#x2014;
Pass a dataset if you wish to override <code>self.eval_dataset</code>. If it is an <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset" rel="nofollow">Dataset</a>, columns
not accepted by the <code>model.forward()</code> method are automatically removed. It must implement the <code>__len__</code>
method.`,name:"eval_dataset"},{anchor:"transformers.Seq2SeqTrainer.evaluate.ignore_keys",description:`<strong>ignore_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
A list of keys in the output of your model (if it is a dictionary) that should be ignored when
gathering predictions.`,name:"ignore_keys"},{anchor:"transformers.Seq2SeqTrainer.evaluate.metric_key_prefix",description:`<strong>metric_key_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;eval&quot;</code>) &#x2014;
An optional prefix to be used as the metrics key prefix. For example the metrics &#x201C;bleu&#x201D; will be named
&#x201C;eval_bleu&#x201D; if the prefix is <code>&quot;eval&quot;</code> (default)`,name:"metric_key_prefix"},{anchor:"transformers.Seq2SeqTrainer.evaluate.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum target length to use when predicting with the generate method.`,name:"max_length"},{anchor:"transformers.Seq2SeqTrainer.evaluate.num_beams",description:`<strong>num_beams</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of beams for beam search that will be used when predicting with the generate method. 1 means no
beam search.
gen_kwargs &#x2014;
Additional <code>generate</code> specific kwargs.`,name:"num_beams"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_seq2seq.py#L112",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A dictionary containing the evaluation loss and the potential metrics computed from the predictions. The
dictionary also contains the epoch number which comes from the training state.</p>
`}}),qn=new k({props:{name:"predict",anchor:"transformers.Seq2SeqTrainer.predict",parameters:[{name:"test_dataset",val:": Dataset"},{name:"ignore_keys",val:": typing.Optional[typing.List[str]] = None"},{name:"metric_key_prefix",val:": str = 'test'"},{name:"**gen_kwargs",val:""}],parametersDescription:[{anchor:"transformers.Seq2SeqTrainer.predict.test_dataset",description:`<strong>test_dataset</strong> (<code>Dataset</code>) &#x2014;
Dataset to run the predictions on. If it is a <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset" rel="nofollow">Dataset</a>, columns not accepted by the
<code>model.forward()</code> method are automatically removed. Has to implement the method <code>__len__</code>`,name:"test_dataset"},{anchor:"transformers.Seq2SeqTrainer.predict.ignore_keys",description:`<strong>ignore_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
A list of keys in the output of your model (if it is a dictionary) that should be ignored when
gathering predictions.`,name:"ignore_keys"},{anchor:"transformers.Seq2SeqTrainer.predict.metric_key_prefix",description:`<strong>metric_key_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;eval&quot;</code>) &#x2014;
An optional prefix to be used as the metrics key prefix. For example the metrics &#x201C;bleu&#x201D; will be named
&#x201C;eval_bleu&#x201D; if the prefix is <code>&quot;eval&quot;</code> (default)`,name:"metric_key_prefix"},{anchor:"transformers.Seq2SeqTrainer.predict.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum target length to use when predicting with the generate method.`,name:"max_length"},{anchor:"transformers.Seq2SeqTrainer.predict.num_beams",description:`<strong>num_beams</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of beams for beam search that will be used when predicting with the generate method. 1 means no
beam search.
gen_kwargs &#x2014;
Additional <code>generate</code> specific kwargs.`,name:"num_beams"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_seq2seq.py#L167"}}),at=new $e({props:{$$slots:{default:[oy]},$$scope:{ctx:q}}}),jn=new L({props:{title:"TrainingArguments",local:"transformers.TrainingArguments",headingTag:"h2"}}),Cn=new k({props:{name:"class transformers.TrainingArguments",anchor:"transformers.TrainingArguments",parameters:[{name:"output_dir",val:": str"},{name:"overwrite_output_dir",val:": bool = False"},{name:"do_train",val:": bool = False"},{name:"do_eval",val:": bool = False"},{name:"do_predict",val:": bool = False"},{name:"evaluation_strategy",val:": typing.Union[transformers.trainer_utils.IntervalStrategy, str] = 'no'"},{name:"prediction_loss_only",val:": bool = False"},{name:"per_device_train_batch_size",val:": int = 8"},{name:"per_device_eval_batch_size",val:": int = 8"},{name:"per_gpu_train_batch_size",val:": typing.Optional[int] = None"},{name:"per_gpu_eval_batch_size",val:": typing.Optional[int] = None"},{name:"gradient_accumulation_steps",val:": int = 1"},{name:"eval_accumulation_steps",val:": typing.Optional[int] = None"},{name:"eval_delay",val:": typing.Optional[float] = 0"},{name:"learning_rate",val:": float = 5e-05"},{name:"weight_decay",val:": float = 0.0"},{name:"adam_beta1",val:": float = 0.9"},{name:"adam_beta2",val:": float = 0.999"},{name:"adam_epsilon",val:": float = 1e-08"},{name:"max_grad_norm",val:": float = 1.0"},{name:"num_train_epochs",val:": float = 3.0"},{name:"max_steps",val:": int = -1"},{name:"lr_scheduler_type",val:": typing.Union[transformers.trainer_utils.SchedulerType, str] = 'linear'"},{name:"warmup_ratio",val:": float = 0.0"},{name:"warmup_steps",val:": int = 0"},{name:"log_level",val:": typing.Optional[str] = 'passive'"},{name:"log_level_replica",val:": typing.Optional[str] = 'warning'"},{name:"log_on_each_node",val:": bool = True"},{name:"logging_dir",val:": typing.Optional[str] = None"},{name:"logging_strategy",val:": typing.Union[transformers.trainer_utils.IntervalStrategy, str] = 'steps'"},{name:"logging_first_step",val:": bool = False"},{name:"logging_steps",val:": float = 500"},{name:"logging_nan_inf_filter",val:": bool = True"},{name:"save_strategy",val:": typing.Union[transformers.trainer_utils.IntervalStrategy, str] = 'steps'"},{name:"save_steps",val:": float = 500"},{name:"save_total_limit",val:": typing.Optional[int] = None"},{name:"save_safetensors",val:": typing.Optional[bool] = True"},{name:"save_on_each_node",val:": bool = False"},{name:"no_cuda",val:": bool = False"},{name:"use_cpu",val:": bool = False"},{name:"use_mps_device",val:": bool = False"},{name:"seed",val:": int = 42"},{name:"data_seed",val:": typing.Optional[int] = None"},{name:"jit_mode_eval",val:": bool = False"},{name:"use_ipex",val:": bool = False"},{name:"bf16",val:": bool = False"},{name:"fp16",val:": bool = False"},{name:"fp16_opt_level",val:": str = 'O1'"},{name:"half_precision_backend",val:": str = 'auto'"},{name:"bf16_full_eval",val:": bool = False"},{name:"fp16_full_eval",val:": bool = False"},{name:"tf32",val:": typing.Optional[bool] = None"},{name:"local_rank",val:": int = -1"},{name:"ddp_backend",val:": typing.Optional[str] = None"},{name:"tpu_num_cores",val:": typing.Optional[int] = None"},{name:"tpu_metrics_debug",val:": bool = False"},{name:"debug",val:": typing.Union[str, typing.List[transformers.debug_utils.DebugOption]] = ''"},{name:"dataloader_drop_last",val:": bool = False"},{name:"eval_steps",val:": typing.Optional[float] = None"},{name:"dataloader_num_workers",val:": int = 0"},{name:"past_index",val:": int = -1"},{name:"run_name",val:": typing.Optional[str] = None"},{name:"disable_tqdm",val:": typing.Optional[bool] = None"},{name:"remove_unused_columns",val:": typing.Optional[bool] = True"},{name:"label_names",val:": typing.Optional[typing.List[str]] = None"},{name:"load_best_model_at_end",val:": typing.Optional[bool] = False"},{name:"metric_for_best_model",val:": typing.Optional[str] = None"},{name:"greater_is_better",val:": typing.Optional[bool] = None"},{name:"ignore_data_skip",val:": bool = False"},{name:"fsdp",val:": typing.Union[typing.List[transformers.trainer_utils.FSDPOption], str, NoneType] = ''"},{name:"fsdp_min_num_params",val:": int = 0"},{name:"fsdp_config",val:": typing.Optional[str] = None"},{name:"fsdp_transformer_layer_cls_to_wrap",val:": typing.Optional[str] = None"},{name:"deepspeed",val:": typing.Optional[str] = None"},{name:"label_smoothing_factor",val:": float = 0.0"},{name:"optim",val:": typing.Union[transformers.training_args.OptimizerNames, str] = 'adamw_torch'"},{name:"optim_args",val:": typing.Optional[str] = None"},{name:"adafactor",val:": bool = False"},{name:"group_by_length",val:": bool = False"},{name:"length_column_name",val:": typing.Optional[str] = 'length'"},{name:"report_to",val:": typing.Optional[typing.List[str]] = None"},{name:"ddp_find_unused_parameters",val:": typing.Optional[bool] = None"},{name:"ddp_bucket_cap_mb",val:": typing.Optional[int] = None"},{name:"ddp_broadcast_buffers",val:": typing.Optional[bool] = None"},{name:"dataloader_pin_memory",val:": bool = True"},{name:"skip_memory_metrics",val:": bool = True"},{name:"use_legacy_prediction_loop",val:": bool = False"},{name:"push_to_hub",val:": bool = False"},{name:"resume_from_checkpoint",val:": typing.Optional[str] = None"},{name:"hub_model_id",val:": typing.Optional[str] = None"},{name:"hub_strategy",val:": typing.Union[transformers.trainer_utils.HubStrategy, str] = 'every_save'"},{name:"hub_token",val:": typing.Optional[str] = None"},{name:"hub_private_repo",val:": bool = False"},{name:"hub_always_push",val:": bool = False"},{name:"gradient_checkpointing",val:": bool = False"},{name:"gradient_checkpointing_kwargs",val:": dict = None"},{name:"include_inputs_for_metrics",val:": bool = False"},{name:"fp16_backend",val:": str = 'auto'"},{name:"push_to_hub_model_id",val:": typing.Optional[str] = None"},{name:"push_to_hub_organization",val:": typing.Optional[str] = None"},{name:"push_to_hub_token",val:": typing.Optional[str] = None"},{name:"mp_parameters",val:": str = ''"},{name:"auto_find_batch_size",val:": bool = False"},{name:"full_determinism",val:": bool = False"},{name:"torchdynamo",val:": typing.Optional[str] = None"},{name:"ray_scope",val:": typing.Optional[str] = 'last'"},{name:"ddp_timeout",val:": typing.Optional[int] = 1800"},{name:"torch_compile",val:": bool = False"},{name:"torch_compile_backend",val:": typing.Optional[str] = None"},{name:"torch_compile_mode",val:": typing.Optional[str] = None"},{name:"dispatch_batches",val:": typing.Optional[bool] = None"},{name:"split_batches",val:": typing.Optional[bool] = False"},{name:"include_tokens_per_second",val:": typing.Optional[bool] = False"},{name:"neftune_noise_alpha",val:": float = None"}],parametersDescription:[{anchor:"transformers.TrainingArguments.output_dir",description:`<strong>output_dir</strong> (<code>str</code>) &#x2014;
The output directory where the model predictions and checkpoints will be written.`,name:"output_dir"},{anchor:"transformers.TrainingArguments.overwrite_output_dir",description:`<strong>overwrite_output_dir</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, overwrite the content of the output directory. Use this to continue training if <code>output_dir</code>
points to a checkpoint directory.`,name:"overwrite_output_dir"},{anchor:"transformers.TrainingArguments.do_train",description:`<strong>do_train</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to run training or not. This argument is not directly used by <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, it&#x2019;s intended to be used
by your training/evaluation scripts instead. See the <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">example
scripts</a> for more details.`,name:"do_train"},{anchor:"transformers.TrainingArguments.do_eval",description:`<strong>do_eval</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to run evaluation on the validation set or not. Will be set to <code>True</code> if <code>evaluation_strategy</code> is
different from <code>&quot;no&quot;</code>. This argument is not directly used by <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, it&#x2019;s intended to be used by your
training/evaluation scripts instead. See the <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">example
scripts</a> for more details.`,name:"do_eval"},{anchor:"transformers.TrainingArguments.do_predict",description:`<strong>do_predict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to run predictions on the test set or not. This argument is not directly used by <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, it&#x2019;s
intended to be used by your training/evaluation scripts instead. See the <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">example
scripts</a> for more details.`,name:"do_predict"},{anchor:"transformers.TrainingArguments.evaluation_strategy",description:`<strong>evaluation_strategy</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;no&quot;</code>) &#x2014;
The evaluation strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No evaluation is done during training.</li>
<li><code>&quot;steps&quot;</code>: Evaluation is done (and logged) every <code>eval_steps</code>.</li>
<li><code>&quot;epoch&quot;</code>: Evaluation is done at the end of each epoch.</li>
</ul>`,name:"evaluation_strategy"},{anchor:"transformers.TrainingArguments.prediction_loss_only",description:`<strong>prediction_loss_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When performing evaluation and generating predictions, only returns the loss.`,name:"prediction_loss_only"},{anchor:"transformers.TrainingArguments.per_device_train_batch_size",description:`<strong>per_device_train_batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The batch size per GPU/XPU/TPU/MPS/NPU core/CPU for training.`,name:"per_device_train_batch_size"},{anchor:"transformers.TrainingArguments.per_device_eval_batch_size",description:`<strong>per_device_eval_batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The batch size per GPU/XPU/TPU/MPS/NPU core/CPU for evaluation.`,name:"per_device_eval_batch_size"},{anchor:"transformers.TrainingArguments.gradient_accumulation_steps",description:`<strong>gradient_accumulation_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of updates steps to accumulate the gradients for, before performing a backward/update pass.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>When using gradient accumulation, one step is counted as one step with backward pass. Therefore, logging,
evaluation, save will be conducted every <code>gradient_accumulation_steps * xxx_step</code> training examples.</p>

					</div>`,name:"gradient_accumulation_steps"},{anchor:"transformers.TrainingArguments.eval_accumulation_steps",description:`<strong>eval_accumulation_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of predictions steps to accumulate the output tensors for, before moving the results to the CPU. If
left unset, the whole predictions are accumulated on GPU/NPU/TPU before being moved to the CPU (faster but
requires more memory).`,name:"eval_accumulation_steps"},{anchor:"transformers.TrainingArguments.eval_delay",description:`<strong>eval_delay</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Number of epochs or steps to wait for before the first evaluation can be performed, depending on the
evaluation_strategy.`,name:"eval_delay"},{anchor:"transformers.TrainingArguments.learning_rate",description:`<strong>learning_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 5e-5) &#x2014;
The initial learning rate for <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a> optimizer.`,name:"learning_rate"},{anchor:"transformers.TrainingArguments.weight_decay",description:`<strong>weight_decay</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The weight decay to apply (if not zero) to all layers except all bias and LayerNorm weights in <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a>
optimizer.`,name:"weight_decay"},{anchor:"transformers.TrainingArguments.adam_beta1",description:`<strong>adam_beta1</strong> (<code>float</code>, <em>optional</em>, defaults to 0.9) &#x2014;
The beta1 hyperparameter for the <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a> optimizer.`,name:"adam_beta1"},{anchor:"transformers.TrainingArguments.adam_beta2",description:`<strong>adam_beta2</strong> (<code>float</code>, <em>optional</em>, defaults to 0.999) &#x2014;
The beta2 hyperparameter for the <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a> optimizer.`,name:"adam_beta2"},{anchor:"transformers.TrainingArguments.adam_epsilon",description:`<strong>adam_epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-8) &#x2014;
The epsilon hyperparameter for the <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a> optimizer.`,name:"adam_epsilon"},{anchor:"transformers.TrainingArguments.max_grad_norm",description:`<strong>max_grad_norm</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Maximum gradient norm (for gradient clipping).`,name:"max_grad_norm"},{anchor:"transformers.TrainingArguments.num_train_epochs(float,",description:`<strong>num_train_epochs(<code>float</code>,</strong> <em>optional</em>, defaults to 3.0) &#x2014;
Total number of training epochs to perform (if not an integer, will perform the decimal part percents of
the last epoch before stopping training).`,name:"num_train_epochs(float,"},{anchor:"transformers.TrainingArguments.max_steps",description:`<strong>max_steps</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
If set to a positive number, the total number of training steps to perform. Overrides <code>num_train_epochs</code>.
In case of using a finite iterable dataset the training may stop before reaching the set number of steps
when all data is exhausted`,name:"max_steps"},{anchor:"transformers.TrainingArguments.lr_scheduler_type",description:`<strong>lr_scheduler_type</strong> (<code>str</code> or <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.SchedulerType">SchedulerType</a>, <em>optional</em>, defaults to <code>&quot;linear&quot;</code>) &#x2014;
The scheduler type to use. See the documentation of <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.SchedulerType">SchedulerType</a> for all possible values.`,name:"lr_scheduler_type"},{anchor:"transformers.TrainingArguments.warmup_ratio",description:`<strong>warmup_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Ratio of total training steps used for a linear warmup from 0 to <code>learning_rate</code>.`,name:"warmup_ratio"},{anchor:"transformers.TrainingArguments.warmup_steps",description:`<strong>warmup_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of steps used for a linear warmup from 0 to <code>learning_rate</code>. Overrides any effect of <code>warmup_ratio</code>.`,name:"warmup_steps"},{anchor:"transformers.TrainingArguments.log_level",description:`<strong>log_level</strong> (<code>str</code>, <em>optional</em>, defaults to <code>passive</code>) &#x2014;
Logger log level to use on the main process. Possible choices are the log levels as strings: &#x2018;debug&#x2019;,
&#x2018;info&#x2019;, &#x2018;warning&#x2019;, &#x2018;error&#x2019; and &#x2018;critical&#x2019;, plus a &#x2018;passive&#x2019; level which doesn&#x2019;t set anything and keeps the
current log level for the Transformers library (which will be <code>&quot;warning&quot;</code> by default).`,name:"log_level"},{anchor:"transformers.TrainingArguments.log_level_replica",description:`<strong>log_level_replica</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;warning&quot;</code>) &#x2014;
Logger log level to use on replicas. Same choices as <code>log_level</code>&#x201D;`,name:"log_level_replica"},{anchor:"transformers.TrainingArguments.log_on_each_node",description:`<strong>log_on_each_node</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
In multinode distributed training, whether to log using <code>log_level</code> once per node, or only on the main
node.`,name:"log_on_each_node"},{anchor:"transformers.TrainingArguments.logging_dir",description:`<strong>logging_dir</strong> (<code>str</code>, <em>optional</em>) &#x2014;
<a href="https://www.tensorflow.org/tensorboard" rel="nofollow">TensorBoard</a> log directory. Will default to
*output_dir/runs/<strong>CURRENT_DATETIME_HOSTNAME*</strong>.`,name:"logging_dir"},{anchor:"transformers.TrainingArguments.logging_strategy",description:`<strong>logging_strategy</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;steps&quot;</code>) &#x2014;
The logging strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No logging is done during training.</li>
<li><code>&quot;epoch&quot;</code>: Logging is done at the end of each epoch.</li>
<li><code>&quot;steps&quot;</code>: Logging is done every <code>logging_steps</code>.</li>
</ul>`,name:"logging_strategy"},{anchor:"transformers.TrainingArguments.logging_first_step",description:`<strong>logging_first_step</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to log and evaluate the first <code>global_step</code> or not.`,name:"logging_first_step"},{anchor:"transformers.TrainingArguments.logging_steps",description:`<strong>logging_steps</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to 500) &#x2014;
Number of update steps between two logs if <code>logging_strategy=&quot;steps&quot;</code>. Should be an integer or a float in
range <code>[0,1)</code>. If smaller than 1, will be interpreted as ratio of total training steps.`,name:"logging_steps"},{anchor:"transformers.TrainingArguments.logging_nan_inf_filter",description:`<strong>logging_nan_inf_filter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to filter <code>nan</code> and <code>inf</code> losses for logging. If set to <code>True</code> the loss of every step that is <code>nan</code>
or <code>inf</code> is filtered and the average loss of the current logging window is taken instead.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p><code>logging_nan_inf_filter</code> only influences the logging of loss values, it does not change the behavior the
gradient is computed or applied to the model.</p>

					</div>`,name:"logging_nan_inf_filter"},{anchor:"transformers.TrainingArguments.save_strategy",description:`<strong>save_strategy</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;steps&quot;</code>) &#x2014;
The checkpoint save strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No save is done during training.</li>
<li><code>&quot;epoch&quot;</code>: Save is done at the end of each epoch.</li>
<li><code>&quot;steps&quot;</code>: Save is done every <code>save_steps</code>.</li>
</ul>`,name:"save_strategy"},{anchor:"transformers.TrainingArguments.save_steps",description:`<strong>save_steps</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to 500) &#x2014;
Number of updates steps before two checkpoint saves if <code>save_strategy=&quot;steps&quot;</code>. Should be an integer or a
float in range <code>[0,1)</code>. If smaller than 1, will be interpreted as ratio of total training steps.`,name:"save_steps"},{anchor:"transformers.TrainingArguments.save_total_limit",description:`<strong>save_total_limit</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a value is passed, will limit the total amount of checkpoints. Deletes the older checkpoints in
<code>output_dir</code>. When <code>load_best_model_at_end</code> is enabled, the &#x201C;best&#x201D; checkpoint according to
<code>metric_for_best_model</code> will always be retained in addition to the most recent ones. For example, for
<code>save_total_limit=5</code> and <code>load_best_model_at_end</code>, the four last checkpoints will always be retained
alongside the best model. When <code>save_total_limit=1</code> and <code>load_best_model_at_end</code>, it is possible that two
checkpoints are saved: the last one and the best one (if they are different).`,name:"save_total_limit"},{anchor:"transformers.TrainingArguments.save_safetensors",description:`<strong>save_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Use <a href="https://huggingface.co/docs/safetensors" rel="nofollow">safetensors</a> saving and loading for state dicts instead of
default <code>torch.load</code> and <code>torch.save</code>.`,name:"save_safetensors"},{anchor:"transformers.TrainingArguments.save_on_each_node",description:`<strong>save_on_each_node</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When doing multi-node distributed training, whether to save models and checkpoints on each node, or only on
the main one.</p>
<p>This should not be activated when the different nodes use the same storage as the files will be saved with
the same names for each node.`,name:"save_on_each_node"},{anchor:"transformers.TrainingArguments.use_cpu",description:`<strong>use_cpu</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use cpu. If set to False, we will use cuda or mps device if available.`,name:"use_cpu"},{anchor:"transformers.TrainingArguments.seed",description:`<strong>seed</strong> (<code>int</code>, <em>optional</em>, defaults to 42) &#x2014;
Random seed that will be set at the beginning of training. To ensure reproducibility across runs, use the
<code>~Trainer.model_init</code> function to instantiate the model if it has some randomly initialized parameters.`,name:"seed"},{anchor:"transformers.TrainingArguments.data_seed",description:`<strong>data_seed</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Random seed to be used with data samplers. If not set, random generators for data sampling will use the
same seed as <code>seed</code>. This can be used to ensure reproducibility of data sampling, independent of the model
seed.`,name:"data_seed"},{anchor:"transformers.TrainingArguments.jit_mode_eval",description:`<strong>jit_mode_eval</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use PyTorch jit trace for inference.`,name:"jit_mode_eval"},{anchor:"transformers.TrainingArguments.use_ipex",description:`<strong>use_ipex</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Use Intel extension for PyTorch when it is available. <a href="https://github.com/intel/intel-extension-for-pytorch" rel="nofollow">IPEX
installation</a>.`,name:"use_ipex"},{anchor:"transformers.TrainingArguments.bf16",description:`<strong>bf16</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use bf16 16-bit (mixed) precision training instead of 32-bit training. Requires Ampere or higher
NVIDIA architecture or using CPU (use_cpu) or Ascend NPU. This is an experimental API and it may change.`,name:"bf16"},{anchor:"transformers.TrainingArguments.fp16",description:`<strong>fp16</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use fp16 16-bit (mixed) precision training instead of 32-bit training.`,name:"fp16"},{anchor:"transformers.TrainingArguments.fp16_opt_level",description:`<strong>fp16_opt_level</strong> (<code>str</code>, <em>optional</em>, defaults to &#x2018;O1&#x2019;) &#x2014;
For <code>fp16</code> training, Apex AMP optimization level selected in [&#x2018;O0&#x2019;, &#x2018;O1&#x2019;, &#x2018;O2&#x2019;, and &#x2018;O3&#x2019;]. See details on
the <a href="https://nvidia.github.io/apex/amp" rel="nofollow">Apex documentation</a>.`,name:"fp16_opt_level"},{anchor:"transformers.TrainingArguments.fp16_backend",description:`<strong>fp16_backend</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
This argument is deprecated. Use <code>half_precision_backend</code> instead.`,name:"fp16_backend"},{anchor:"transformers.TrainingArguments.half_precision_backend",description:`<strong>half_precision_backend</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
The backend to use for mixed precision training. Must be one of <code>&quot;auto&quot;, &quot;apex&quot;, &quot;cpu_amp&quot;</code>. <code>&quot;auto&quot;</code> will
use CPU/CUDA AMP or APEX depending on the PyTorch version detected, while the other choices will force the
requested backend.`,name:"half_precision_backend"},{anchor:"transformers.TrainingArguments.bf16_full_eval",description:`<strong>bf16_full_eval</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use full bfloat16 evaluation instead of 32-bit. This will be faster and save memory but can harm
metric values. This is an experimental API and it may change.`,name:"bf16_full_eval"},{anchor:"transformers.TrainingArguments.fp16_full_eval",description:`<strong>fp16_full_eval</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use full float16 evaluation instead of 32-bit. This will be faster and save memory but can harm
metric values.`,name:"fp16_full_eval"},{anchor:"transformers.TrainingArguments.tf32",description:`<strong>tf32</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to enable the TF32 mode, available in Ampere and newer GPU architectures. The default value depends
on PyTorch&#x2019;s version default of <code>torch.backends.cuda.matmul.allow_tf32</code>. For more details please refer to
the <a href="https://huggingface.co/docs/transformers/performance#tf32" rel="nofollow">TF32</a> documentation. This is an
experimental API and it may change.`,name:"tf32"},{anchor:"transformers.TrainingArguments.local_rank",description:`<strong>local_rank</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Rank of the process during distributed training.`,name:"local_rank"},{anchor:"transformers.TrainingArguments.ddp_backend",description:`<strong>ddp_backend</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The backend to use for distributed training. Must be one of <code>&quot;nccl&quot;</code>, <code>&quot;mpi&quot;</code>, <code>&quot;ccl&quot;</code>, <code>&quot;gloo&quot;</code>, <code>&quot;hccl&quot;</code>.`,name:"ddp_backend"},{anchor:"transformers.TrainingArguments.tpu_num_cores",description:`<strong>tpu_num_cores</strong> (<code>int</code>, <em>optional</em>) &#x2014;
When training on TPU, the number of TPU cores (automatically passed by launcher script).`,name:"tpu_num_cores"},{anchor:"transformers.TrainingArguments.dataloader_drop_last",description:`<strong>dataloader_drop_last</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to drop the last incomplete batch (if the length of the dataset is not divisible by the batch size)
or not.`,name:"dataloader_drop_last"},{anchor:"transformers.TrainingArguments.eval_steps",description:`<strong>eval_steps</strong> (<code>int</code> or <code>float</code>, <em>optional</em>) &#x2014;
Number of update steps between two evaluations if <code>evaluation_strategy=&quot;steps&quot;</code>. Will default to the same
value as <code>logging_steps</code> if not set. Should be an integer or a float in range <code>[0,1)</code>. If smaller than 1,
will be interpreted as ratio of total training steps.`,name:"eval_steps"},{anchor:"transformers.TrainingArguments.dataloader_num_workers",description:`<strong>dataloader_num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of subprocesses to use for data loading (PyTorch only). 0 means that the data will be loaded in the
main process.`,name:"dataloader_num_workers"},{anchor:"transformers.TrainingArguments.past_index",description:`<strong>past_index</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Some models like <a href="../model_doc/transformerxl">TransformerXL</a> or <a href="../model_doc/xlnet">XLNet</a> can make use of
the past hidden states for their predictions. If this argument is set to a positive int, the <code>Trainer</code> will
use the corresponding output (usually index 2) as the past state and feed it to the model at the next
training step under the keyword argument <code>mems</code>.`,name:"past_index"},{anchor:"transformers.TrainingArguments.run_name",description:`<strong>run_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A descriptor for the run. Typically used for <a href="https://www.wandb.com/" rel="nofollow">wandb</a> and
<a href="https://www.mlflow.org/" rel="nofollow">mlflow</a> logging.`,name:"run_name"},{anchor:"transformers.TrainingArguments.disable_tqdm",description:`<strong>disable_tqdm</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to disable the tqdm progress bars and table of metrics produced by
<code>~notebook.NotebookTrainingTracker</code> in Jupyter Notebooks. Will default to <code>True</code> if the logging level is
set to warn or lower (default), <code>False</code> otherwise.`,name:"disable_tqdm"},{anchor:"transformers.TrainingArguments.remove_unused_columns",description:`<strong>remove_unused_columns</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to automatically remove the columns unused by the model forward method.</p>
<p>(Note that this behavior is not implemented for <code>TFTrainer</code> yet.)`,name:"remove_unused_columns"},{anchor:"transformers.TrainingArguments.label_names",description:`<strong>label_names</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of keys in your dictionary of inputs that correspond to the labels.</p>
<p>Will eventually default to the list of argument names accepted by the model that contain the word &#x201C;label&#x201D;,
except if the model used is one of the <code>XxxForQuestionAnswering</code> in which case it will also include the
<code>[&quot;start_positions&quot;, &quot;end_positions&quot;]</code> keys.`,name:"label_names"},{anchor:"transformers.TrainingArguments.load_best_model_at_end",description:`<strong>load_best_model_at_end</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to load the best model found during training at the end of training. When this option is
enabled, the best checkpoint will always be saved. See
<a href="https://huggingface.co/docs/transformers/main_classes/trainer#transformers.TrainingArguments.save_total_limit" rel="nofollow"><code>save_total_limit</code></a>
for more.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When set to <code>True</code>, the parameters <code>save_strategy</code> needs to be the same as <code>evaluation_strategy</code>, and in
the case it is &#x201C;steps&#x201D;, <code>save_steps</code> must be a round multiple of <code>eval_steps</code>.</p>

					</div>`,name:"load_best_model_at_end"},{anchor:"transformers.TrainingArguments.metric_for_best_model",description:`<strong>metric_for_best_model</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Use in conjunction with <code>load_best_model_at_end</code> to specify the metric to use to compare two different
models. Must be the name of a metric returned by the evaluation with or without the prefix <code>&quot;eval_&quot;</code>. Will
default to <code>&quot;loss&quot;</code> if unspecified and <code>load_best_model_at_end=True</code> (to use the evaluation loss).</p>
<p>If you set this value, <code>greater_is_better</code> will default to <code>True</code>. Don&#x2019;t forget to set it to <code>False</code> if
your metric is better when lower.`,name:"metric_for_best_model"},{anchor:"transformers.TrainingArguments.greater_is_better",description:`<strong>greater_is_better</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Use in conjunction with <code>load_best_model_at_end</code> and <code>metric_for_best_model</code> to specify if better models
should have a greater metric or not. Will default to:</p>
<ul>
<li><code>True</code> if <code>metric_for_best_model</code> is set to a value that isn&#x2019;t <code>&quot;loss&quot;</code> or <code>&quot;eval_loss&quot;</code>.</li>
<li><code>False</code> if <code>metric_for_best_model</code> is not set, or set to <code>&quot;loss&quot;</code> or <code>&quot;eval_loss&quot;</code>.</li>
</ul>`,name:"greater_is_better"},{anchor:"transformers.TrainingArguments.ignore_data_skip",description:`<strong>ignore_data_skip</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When resuming training, whether or not to skip the epochs and batches to get the data loading at the same
stage as in the previous training. If set to <code>True</code>, the training will begin faster (as that skipping step
can take a long time) but will not yield the same results as the interrupted training would have.`,name:"ignore_data_skip"},{anchor:"transformers.TrainingArguments.fsdp",description:`<strong>fsdp</strong> (<code>bool</code>, <code>str</code> or list of <code>FSDPOption</code>, <em>optional</em>, defaults to <code>&apos;&apos;</code>) &#x2014;
Use PyTorch Distributed Parallel Training (in distributed training only).</p>
<p>A list of options along the following:</p>
<ul>
<li><code>&quot;full_shard&quot;</code>: Shard parameters, gradients and optimizer states.</li>
<li><code>&quot;shard_grad_op&quot;</code>: Shard optimizer states and gradients.</li>
<li><code>&quot;offload&quot;</code>: Offload parameters and gradients to CPUs (only compatible with <code>&quot;full_shard&quot;</code> and
<code>&quot;shard_grad_op&quot;</code>).</li>
<li><code>&quot;auto_wrap&quot;</code>: Automatically recursively wrap layers with FSDP using <code>default_auto_wrap_policy</code>.</li>
</ul>`,name:"fsdp"},{anchor:"transformers.TrainingArguments.fsdp_config",description:`<strong>fsdp_config</strong> (<code>str</code> or <code>dict</code>, <em>optional</em>) &#x2014;
Config to be used with fsdp (Pytorch Distributed Parallel Training). The value is either a location of
deepspeed json config file (e.g., <code>ds_config.json</code>) or an already loaded json file as <code>dict</code>.</p>
<p>A List of config and its options:</p>
<ul>
<li>
<p>min_num_params (<code>int</code>, <em>optional</em>, defaults to <code>0</code>):
FSDP&#x2019;s minimum number of parameters for Default Auto Wrapping. (useful only when <code>fsdp</code> field is
passed).</p>
</li>
<li>
<p>transformer_layer_cls_to_wrap (<code>List[str]</code>, <em>optional</em>):
List of transformer layer class names (case-sensitive) to wrap, e.g, <code>BertLayer</code>, <code>GPTJBlock</code>,
<code>T5Block</code> &#x2026; (useful only when <code>fsdp</code> flag is passed).</p>
</li>
<li>
<p>backward_prefetch (<code>str</code>, <em>optional</em>)
FSDP&#x2019;s backward prefetch mode. Controls when to prefetch next set of parameters (useful only when
<code>fsdp</code> field is passed).</p>
<p>A list of options along the following:</p>
<ul>
<li><code>&quot;backward_pre&quot;</code> : Prefetches the next set of parameters before the current set of parameter&#x2019;s
gradient
computation.</li>
<li><code>&quot;backward_post&quot;</code> : This prefetches the next set of parameters after the current set of
parameter&#x2019;s
gradient computation.</li>
</ul>
</li>
<li>
<p>forward_prefetch (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>)
FSDP&#x2019;s forward prefetch mode (useful only when <code>fsdp</code> field is passed).
If <code>&quot;True&quot;</code>, then FSDP explicitly prefetches the next upcoming all-gather while executing in the
forward pass.</p>
</li>
<li>
<p>limit_all_gathers (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>)
FSDP&#x2019;s limit_all_gathers (useful only when <code>fsdp</code> field is passed).
If <code>&quot;True&quot;</code>, FSDP explicitly synchronizes the CPU thread to prevent too many in-flight
all-gathers.</p>
</li>
<li>
<p>use_orig_params (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>)
If <code>&quot;True&quot;</code>, allows non-uniform <code>requires_grad</code> during init, which means support for interspersed
frozen and trainable paramteres. Useful in cases such as parameter-efficient fine-tuning. Please
refer this
[blog](<a href="https://dev-discuss.pytorch.org/t/rethinking-pytorch-fully-sharded-data-parallel-fsdp-from-first-principles/1019" rel="nofollow">https://dev-discuss.pytorch.org/t/rethinking-pytorch-fully-sharded-data-parallel-fsdp-from-first-principles/1019</a></p>
</li>
<li>
<p>sync_module_states (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>)
If <code>&quot;True&quot;</code>, each individually wrapped FSDP unit will broadcast module parameters from rank 0 to
ensure they are the same across all ranks after initialization</p>
</li>
<li>
<p>xla (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
Whether to use PyTorch/XLA Fully Sharded Data Parallel Training. This is an experimental feature
and its API may evolve in the future.</p>
</li>
<li>
<p>xla_fsdp_settings (<code>dict</code>, <em>optional</em>)
The value is a dictionary which stores the XLA FSDP wrapping parameters.</p>
<p>For a complete list of options, please see <a href="https://github.com/pytorch/xla/blob/master/torch_xla/distributed/fsdp/xla_fully_sharded_data_parallel.py" rel="nofollow">here</a>.</p>
</li>
<li>
<p>xla_fsdp_grad_ckpt (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
Will use gradient checkpointing over each nested XLA FSDP wrapped layer. This setting can only be
used when the xla flag is set to true, and an auto wrapping policy is specified through
fsdp_min_num_params or fsdp_transformer_layer_cls_to_wrap.</p>
</li>
<li>
<p>activation_checkpointing (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
If True, activation checkpointing is a technique to reduce memory usage by clearing activations of
certain layers and recomputing them during a backward pass. Effectively, this trades extra
computation time for reduced memory usage.</p>
</li>
</ul>`,name:"fsdp_config"},{anchor:"transformers.TrainingArguments.deepspeed",description:`<strong>deepspeed</strong> (<code>str</code> or <code>dict</code>, <em>optional</em>) &#x2014;
Use <a href="https://github.com/microsoft/deepspeed" rel="nofollow">Deepspeed</a>. This is an experimental feature and its API may
evolve in the future. The value is either the location of DeepSpeed json config file (e.g.,
<code>ds_config.json</code>) or an already loaded json file as a <code>dict</code>&#x201D;`,name:"deepspeed"},{anchor:"transformers.TrainingArguments.label_smoothing_factor",description:`<strong>label_smoothing_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The label smoothing factor to use. Zero means no label smoothing, otherwise the underlying onehot-encoded
labels are changed from 0s and 1s to <code>label_smoothing_factor/num_labels</code> and <code>1 - label_smoothing_factor + label_smoothing_factor/num_labels</code> respectively.`,name:"label_smoothing_factor"},{anchor:"transformers.TrainingArguments.debug",description:`<strong>debug</strong> (<code>str</code> or list of <code>DebugOption</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
Enable one or more debug features. This is an experimental feature.</p>
<p>Possible options are:</p>
<ul>
<li><code>&quot;underflow_overflow&quot;</code>: detects overflow in model&#x2019;s input/outputs and reports the last frames that led to
the event</li>
<li><code>&quot;tpu_metrics_debug&quot;</code>: print debug metrics on TPU</li>
</ul>
<p>The options should be separated by whitespaces.`,name:"debug"},{anchor:"transformers.TrainingArguments.optim",description:`<strong>optim</strong> (<code>str</code> or <code>training_args.OptimizerNames</code>, <em>optional</em>, defaults to <code>&quot;adamw_torch&quot;</code>) &#x2014;
The optimizer to use: adamw_hf, adamw_torch, adamw_torch_fused, adamw_apex_fused, adamw_anyprecision or
adafactor.`,name:"optim"},{anchor:"transformers.TrainingArguments.optim_args",description:`<strong>optim_args</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Optional arguments that are supplied to AnyPrecisionAdamW.`,name:"optim_args"},{anchor:"transformers.TrainingArguments.group_by_length",description:`<strong>group_by_length</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to group together samples of roughly the same length in the training dataset (to minimize
padding applied and be more efficient). Only useful if applying dynamic padding.`,name:"group_by_length"},{anchor:"transformers.TrainingArguments.length_column_name",description:`<strong>length_column_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;length&quot;</code>) &#x2014;
Column name for precomputed lengths. If the column exists, grouping by length will use these values rather
than computing them on train startup. Ignored unless <code>group_by_length</code> is <code>True</code> and the dataset is an
instance of <code>Dataset</code>.`,name:"length_column_name"},{anchor:"transformers.TrainingArguments.report_to",description:`<strong>report_to</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>, defaults to <code>&quot;all&quot;</code>) &#x2014;
The list of integrations to report the results and logs to. Supported platforms are <code>&quot;azure_ml&quot;</code>,
<code>&quot;clearml&quot;</code>, <code>&quot;codecarbon&quot;</code>, <code>&quot;comet_ml&quot;</code>, <code>&quot;dagshub&quot;</code>, <code>&quot;flyte&quot;</code>, <code>&quot;mlflow&quot;</code>, <code>&quot;neptune&quot;</code>,
<code>&quot;tensorboard&quot;</code>, and <code>&quot;wandb&quot;</code>. Use <code>&quot;all&quot;</code> to report to all integrations installed, <code>&quot;none&quot;</code> for no
integrations.`,name:"report_to"},{anchor:"transformers.TrainingArguments.ddp_find_unused_parameters",description:`<strong>ddp_find_unused_parameters</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
When using distributed training, the value of the flag <code>find_unused_parameters</code> passed to
<code>DistributedDataParallel</code>. Will default to <code>False</code> if gradient checkpointing is used, <code>True</code> otherwise.`,name:"ddp_find_unused_parameters"},{anchor:"transformers.TrainingArguments.ddp_bucket_cap_mb",description:`<strong>ddp_bucket_cap_mb</strong> (<code>int</code>, <em>optional</em>) &#x2014;
When using distributed training, the value of the flag <code>bucket_cap_mb</code> passed to <code>DistributedDataParallel</code>.`,name:"ddp_bucket_cap_mb"},{anchor:"transformers.TrainingArguments.ddp_broadcast_buffers",description:`<strong>ddp_broadcast_buffers</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
When using distributed training, the value of the flag <code>broadcast_buffers</code> passed to
<code>DistributedDataParallel</code>. Will default to <code>False</code> if gradient checkpointing is used, <code>True</code> otherwise.`,name:"ddp_broadcast_buffers"},{anchor:"transformers.TrainingArguments.dataloader_pin_memory",description:`<strong>dataloader_pin_memory</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether you want to pin memory in data loaders or not. Will default to <code>True</code>.`,name:"dataloader_pin_memory"},{anchor:"transformers.TrainingArguments.skip_memory_metrics",description:`<strong>skip_memory_metrics</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to skip adding of memory profiler reports to metrics. This is skipped by default because it slows
down the training and evaluation speed.`,name:"skip_memory_metrics"},{anchor:"transformers.TrainingArguments.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push the model to the Hub every time the model is saved. If this is activated,
<code>output_dir</code> will begin a git directory synced with the repo (determined by <code>hub_model_id</code>) and the content
will be pushed each time a save is triggered (depending on your <code>save_strategy</code>). Calling
<a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.save_model">save_model()</a> will also trigger a push.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>If <code>output_dir</code> exists, it needs to be a local clone of the repository to which the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> will be
pushed.</p>

					</div>`,name:"push_to_hub"},{anchor:"transformers.TrainingArguments.resume_from_checkpoint",description:`<strong>resume_from_checkpoint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The path to a folder with a valid checkpoint for your model. This argument is not directly used by
<a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, it&#x2019;s intended to be used by your training/evaluation scripts instead. See the <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">example
scripts</a> for more details.`,name:"resume_from_checkpoint"},{anchor:"transformers.TrainingArguments.hub_model_id",description:`<strong>hub_model_id</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the repository to keep in sync with the local <em>output_dir</em>. It can be a simple model ID in
which case the model will be pushed in your namespace. Otherwise it should be the whole repository name,
for instance <code>&quot;user_name/model&quot;</code>, which allows you to push to an organization you are a member of with
<code>&quot;organization_name/model&quot;</code>. Will default to <code>user_name/output_dir_name</code> with <em>output_dir_name</em> being the
name of <code>output_dir</code>.</p>
<p>Will default to the name of <code>output_dir</code>.`,name:"hub_model_id"},{anchor:"transformers.TrainingArguments.hub_strategy",description:`<strong>hub_strategy</strong> (<code>str</code> or <code>HubStrategy</code>, <em>optional</em>, defaults to <code>&quot;every_save&quot;</code>) &#x2014;
Defines the scope of what is pushed to the Hub and when. Possible values are:</p>
<ul>
<li><code>&quot;end&quot;</code>: push the model, its configuration, the tokenizer (if passed along to the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>) and a
draft of a model card when the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.save_model">save_model()</a> method is called.</li>
<li><code>&quot;every_save&quot;</code>: push the model, its configuration, the tokenizer (if passed along to the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>) and
a draft of a model card each time there is a model save. The pushes are asynchronous to not block
training, and in case the save are very frequent, a new push is only attempted if the previous one is
finished. A last push is made with the final model at the end of training.</li>
<li><code>&quot;checkpoint&quot;</code>: like <code>&quot;every_save&quot;</code> but the latest checkpoint is also pushed in a subfolder named
last-checkpoint, allowing you to resume training easily with
<code>trainer.train(resume_from_checkpoint=&quot;last-checkpoint&quot;)</code>.</li>
<li><code>&quot;all_checkpoints&quot;</code>: like <code>&quot;checkpoint&quot;</code> but all checkpoints are pushed like they appear in the output
folder (so you will get one checkpoint folder per folder in your final repository)</li>
</ul>`,name:"hub_strategy"},{anchor:"transformers.TrainingArguments.hub_token",description:`<strong>hub_token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use to push the model to the Hub. Will default to the token in the cache folder obtained with
<code>huggingface-cli login</code>.`,name:"hub_token"},{anchor:"transformers.TrainingArguments.hub_private_repo",description:`<strong>hub_private_repo</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If True, the Hub repo will be set to private.`,name:"hub_private_repo"},{anchor:"transformers.TrainingArguments.hub_always_push",description:`<strong>hub_always_push</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Unless this is <code>True</code>, the <code>Trainer</code> will skip pushing a checkpoint when the previous push is not finished.`,name:"hub_always_push"},{anchor:"transformers.TrainingArguments.gradient_checkpointing",description:`<strong>gradient_checkpointing</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If True, use gradient checkpointing to save memory at the expense of slower backward pass.`,name:"gradient_checkpointing"},{anchor:"transformers.TrainingArguments.gradient_checkpointing_args",description:`<strong>gradient_checkpointing_args</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Key word arguments to be passed to the <code>gradient_checkpointing_enable</code> method.`,name:"gradient_checkpointing_args"},{anchor:"transformers.TrainingArguments.include_inputs_for_metrics",description:`<strong>include_inputs_for_metrics</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the inputs will be passed to the <code>compute_metrics</code> function. This is intended for metrics
that need inputs, predictions and references for scoring calculation in Metric class.`,name:"include_inputs_for_metrics"},{anchor:"transformers.TrainingArguments.auto_find_batch_size",description:`<strong>auto_find_batch_size</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to find a batch size that will fit into memory automatically through exponential decay, avoiding
CUDA Out-of-Memory errors. Requires accelerate to be installed (<code>pip install accelerate</code>)`,name:"auto_find_batch_size"},{anchor:"transformers.TrainingArguments.full_determinism",description:`<strong>full_determinism</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.enable_full_determinism">enable_full_determinism()</a> is called instead of <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.set_seed">set_seed()</a> to ensure reproducible results in
distributed training. Important: this will negatively impact the performance, so only use it for debugging.`,name:"full_determinism"},{anchor:"transformers.TrainingArguments.torchdynamo",description:`<strong>torchdynamo</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If set, the backend compiler for TorchDynamo. Possible choices are <code>&quot;eager&quot;</code>, <code>&quot;aot_eager&quot;</code>, <code>&quot;inductor&quot;</code>,
<code>&quot;nvfuser&quot;</code>, <code>&quot;aot_nvfuser&quot;</code>, <code>&quot;aot_cudagraphs&quot;</code>, <code>&quot;ofi&quot;</code>, <code>&quot;fx2trt&quot;</code>, <code>&quot;onnxrt&quot;</code> and <code>&quot;ipex&quot;</code>.`,name:"torchdynamo"},{anchor:"transformers.TrainingArguments.ray_scope",description:`<strong>ray_scope</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;last&quot;</code>) &#x2014;
The scope to use when doing hyperparameter search with Ray. By default, <code>&quot;last&quot;</code> will be used. Ray will
then use the last checkpoint of all trials, compare those, and select the best one. However, other options
are also available. See the <a href="https://docs.ray.io/en/latest/tune/api_docs/analysis.html#ray.tune.ExperimentAnalysis.get_best_trial" rel="nofollow">Ray documentation</a> for
more options.`,name:"ray_scope"},{anchor:"transformers.TrainingArguments.ddp_timeout",description:`<strong>ddp_timeout</strong> (<code>int</code>, <em>optional</em>, defaults to 1800) &#x2014;
The timeout for <code>torch.distributed.init_process_group</code> calls, used to avoid GPU socket timeouts when
performing slow operations in distributed runnings. Please refer the [PyTorch documentation]
(<a href="https://pytorch.org/docs/stable/distributed.html#torch.distributed.init_process_group" rel="nofollow">https://pytorch.org/docs/stable/distributed.html#torch.distributed.init_process_group</a>) for more
information.`,name:"ddp_timeout"},{anchor:"transformers.TrainingArguments.use_mps_device",description:`<strong>use_mps_device</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This argument is deprecated.<code>mps</code> device will be used if it is available similar to <code>cuda</code> device.`,name:"use_mps_device"},{anchor:"transformers.TrainingArguments.torch_compile",description:`<strong>torch_compile</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to compile the model using PyTorch 2.0
<a href="https://pytorch.org/get-started/pytorch-2.0/" rel="nofollow"><code>torch.compile</code></a>.</p>
<p>This will use the best defaults for the <a href="https://pytorch.org/docs/stable/generated/torch.compile.html?highlight=torch+compile#torch.compile" rel="nofollow"><code>torch.compile</code>
API</a>.
You can customize the defaults with the argument <code>torch_compile_backend</code> and <code>torch_compile_mode</code> but we
don&#x2019;t guarantee any of them will work as the support is progressively rolled in in PyTorch.</p>
<p>This flag and the whole compile API is experimental and subject to change in future releases.`,name:"torch_compile"},{anchor:"transformers.TrainingArguments.torch_compile_backend",description:`<strong>torch_compile_backend</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The backend to use in <code>torch.compile</code>. If set to any value, <code>torch_compile</code> will be set to <code>True</code>.</p>
<p>Refer to the PyTorch doc for possible values and note that they may change across PyTorch versions.</p>
<p>This flag is experimental and subject to change in future releases.`,name:"torch_compile_backend"},{anchor:"transformers.TrainingArguments.torch_compile_mode",description:`<strong>torch_compile_mode</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The mode to use in <code>torch.compile</code>. If set to any value, <code>torch_compile</code> will be set to <code>True</code>.</p>
<p>Refer to the PyTorch doc for possible values and note that they may change across PyTorch versions.</p>
<p>This flag is experimental and subject to change in future releases.`,name:"torch_compile_mode"},{anchor:"transformers.TrainingArguments.split_batches",description:`<strong>split_batches</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the accelerator should split the batches yielded by the dataloaders across the devices
during distributed training. If</p>
<p>set to <code>True</code>, the actual batch size used will be the same on any kind of distributed processes, but it
must be a</p>
<p>round multiple of the number of processes you are using (such as GPUs).`,name:"split_batches"},{anchor:"transformers.TrainingArguments.include_tokens_per_second",description:`<strong>include_tokens_per_second</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to compute the number of tokens per second per device for training speed metrics.</p>
<p>This will iterate over the entire training dataloader once beforehand,</p>
<p>and will slow down the entire process.`,name:"include_tokens_per_second"},{anchor:"transformers.TrainingArguments.neftune_noise_alpha",description:`<strong>neftune_noise_alpha</strong> (<code>Optional[float]</code>) &#x2014;
If not <code>None</code>, this will activate NEFTune noise embeddings. This can drastically improve model performance
for instruction fine-tuning. Check out the <a href="https://arxiv.org/abs/2310.05914" rel="nofollow">original paper</a> and the
<a href="https://github.com/neelsjain/NEFTune" rel="nofollow">original code</a>. Support transformers <code>PreTrainedModel</code> and also
<code>PeftModel</code> from peft.`,name:"neftune_noise_alpha"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L161"}}),In=new k({props:{name:"get_process_log_level",anchor:"transformers.TrainingArguments.get_process_log_level",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L1994"}}),Jn=new k({props:{name:"get_warmup_steps",anchor:"transformers.TrainingArguments.get_warmup_steps",parameters:[{name:"num_training_steps",val:": int"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2083"}}),Un=new k({props:{name:"main_process_first",anchor:"transformers.TrainingArguments.main_process_first",parameters:[{name:"local",val:" = True"},{name:"desc",val:" = 'work'"}],parametersDescription:[{anchor:"transformers.TrainingArguments.main_process_first.local",description:`<strong>local</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
if <code>True</code> first means process of rank 0 of each node if <code>False</code> first means process of rank 0 of node
rank 0 In multi-node environment with a shared filesystem you most likely will want to use
<code>local=False</code> so that only the main process of the first node will do the processing. If however, the
filesystem is not shared, then the main process of each node will need to do the processing, which is
the default behavior.`,name:"local"},{anchor:"transformers.TrainingArguments.main_process_first.desc",description:`<strong>desc</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;work&quot;</code>) &#x2014;
a work description to be used in debug logs`,name:"desc"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2032"}}),Sn=new k({props:{name:"set_dataloader",anchor:"transformers.TrainingArguments.set_dataloader",parameters:[{name:"train_batch_size",val:": int = 8"},{name:"eval_batch_size",val:": int = 8"},{name:"drop_last",val:": bool = False"},{name:"num_workers",val:": int = 0"},{name:"pin_memory",val:": bool = True"},{name:"auto_find_batch_size",val:": bool = False"},{name:"ignore_data_skip",val:": bool = False"},{name:"sampler_seed",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.TrainingArguments.set_dataloader.drop_last",description:`<strong>drop_last</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to drop the last incomplete batch (if the length of the dataset is not divisible by the batch
size) or not.`,name:"drop_last"},{anchor:"transformers.TrainingArguments.set_dataloader.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of subprocesses to use for data loading (PyTorch only). 0 means that the data will be loaded in
the main process.`,name:"num_workers"},{anchor:"transformers.TrainingArguments.set_dataloader.pin_memory",description:`<strong>pin_memory</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether you want to pin memory in data loaders or not. Will default to <code>True</code>.`,name:"pin_memory"},{anchor:"transformers.TrainingArguments.set_dataloader.auto_find_batch_size",description:`<strong>auto_find_batch_size</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to find a batch size that will fit into memory automatically through exponential decay,
avoiding CUDA Out-of-Memory errors. Requires accelerate to be installed (<code>pip install accelerate</code>)`,name:"auto_find_batch_size"},{anchor:"transformers.TrainingArguments.set_dataloader.ignore_data_skip",description:`<strong>ignore_data_skip</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When resuming training, whether or not to skip the epochs and batches to get the data loading at the
same stage as in the previous training. If set to <code>True</code>, the training will begin faster (as that
skipping step can take a long time) but will not yield the same results as the interrupted training
would have.`,name:"ignore_data_skip"},{anchor:"transformers.TrainingArguments.set_dataloader.sampler_seed",description:`<strong>sampler_seed</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Random seed to be used with data samplers. If not set, random generators for data sampling will use the
same seed as <code>self.seed</code>. This can be used to ensure reproducibility of data sampling, independent of
the model seed.`,name:"sampler_seed"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2595"}}),st=new ke({props:{anchor:"transformers.TrainingArguments.set_dataloader.example",$$slots:{default:[ay]},$$scope:{ctx:q}}}),Pn=new k({props:{name:"set_evaluate",anchor:"transformers.TrainingArguments.set_evaluate",parameters:[{name:"strategy",val:": typing.Union[str, transformers.trainer_utils.IntervalStrategy] = 'no'"},{name:"steps",val:": int = 500"},{name:"batch_size",val:": int = 8"},{name:"accumulation_steps",val:": typing.Optional[int] = None"},{name:"delay",val:": typing.Optional[float] = None"},{name:"loss_only",val:": bool = False"},{name:"jit_mode",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TrainingArguments.set_evaluate.strategy",description:`<strong>strategy</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;no&quot;</code>) &#x2014;
The evaluation strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No evaluation is done during training.</li>
<li><code>&quot;steps&quot;</code>: Evaluation is done (and logged) every <code>steps</code>.</li>
<li><code>&quot;epoch&quot;</code>: Evaluation is done at the end of each epoch.</li>
</ul>
<p>Setting a <code>strategy</code> different from <code>&quot;no&quot;</code> will set <code>self.do_eval</code> to <code>True</code>.`,name:"strategy"},{anchor:"transformers.TrainingArguments.set_evaluate.steps",description:`<strong>steps</strong> (<code>int</code>, <em>optional</em>, defaults to 500) &#x2014;
Number of update steps between two evaluations if <code>strategy=&quot;steps&quot;</code>.`,name:"steps"},{anchor:"transformers.TrainingArguments.set_evaluate.batch_size",description:`<strong>batch_size</strong> (<code>int</code> <em>optional</em>, defaults to 8) &#x2014;
The batch size per device (GPU/TPU core/CPU&#x2026;) used for evaluation.`,name:"batch_size"},{anchor:"transformers.TrainingArguments.set_evaluate.accumulation_steps",description:`<strong>accumulation_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of predictions steps to accumulate the output tensors for, before moving the results to the CPU.
If left unset, the whole predictions are accumulated on GPU/TPU before being moved to the CPU (faster
but requires more memory).`,name:"accumulation_steps"},{anchor:"transformers.TrainingArguments.set_evaluate.delay",description:`<strong>delay</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Number of epochs or steps to wait for before the first evaluation can be performed, depending on the
evaluation_strategy.`,name:"delay"},{anchor:"transformers.TrainingArguments.set_evaluate.loss_only",description:`<strong>loss_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Ignores all outputs except the loss.`,name:"loss_only"},{anchor:"transformers.TrainingArguments.set_evaluate.jit_mode",description:`<strong>jit_mode</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use PyTorch jit trace for inference.`,name:"jit_mode"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2204"}}),it=new ke({props:{anchor:"transformers.TrainingArguments.set_evaluate.example",$$slots:{default:[ry]},$$scope:{ctx:q}}}),Ln=new k({props:{name:"set_logging",anchor:"transformers.TrainingArguments.set_logging",parameters:[{name:"strategy",val:": typing.Union[str, transformers.trainer_utils.IntervalStrategy] = 'steps'"},{name:"steps",val:": int = 500"},{name:"report_to",val:": typing.Union[str, typing.List[str]] = 'none'"},{name:"level",val:": str = 'passive'"},{name:"first_step",val:": bool = False"},{name:"nan_inf_filter",val:": bool = False"},{name:"on_each_node",val:": bool = False"},{name:"replica_level",val:": str = 'passive'"}],parametersDescription:[{anchor:"transformers.TrainingArguments.set_logging.strategy",description:`<strong>strategy</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;steps&quot;</code>) &#x2014;
The logging strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No save is done during training.</li>
<li><code>&quot;epoch&quot;</code>: Save is done at the end of each epoch.</li>
<li><code>&quot;steps&quot;</code>: Save is done every <code>save_steps</code>.</li>
</ul>`,name:"strategy"},{anchor:"transformers.TrainingArguments.set_logging.steps",description:`<strong>steps</strong> (<code>int</code>, <em>optional</em>, defaults to 500) &#x2014;
Number of update steps between two logs if <code>strategy=&quot;steps&quot;</code>.`,name:"steps"},{anchor:"transformers.TrainingArguments.set_logging.level",description:`<strong>level</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;passive&quot;</code>) &#x2014;
Logger log level to use on the main process. Possible choices are the log levels as strings: <code>&quot;debug&quot;</code>,
<code>&quot;info&quot;</code>, <code>&quot;warning&quot;</code>, <code>&quot;error&quot;</code> and <code>&quot;critical&quot;</code>, plus a <code>&quot;passive&quot;</code> level which doesn&#x2019;t set anything
and lets the application set the level.`,name:"level"},{anchor:"transformers.TrainingArguments.set_logging.report_to",description:`<strong>report_to</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>, defaults to <code>&quot;all&quot;</code>) &#x2014;
The list of integrations to report the results and logs to. Supported platforms are <code>&quot;azure_ml&quot;</code>,
<code>&quot;clearml&quot;</code>, <code>&quot;codecarbon&quot;</code>, <code>&quot;comet_ml&quot;</code>, <code>&quot;dagshub&quot;</code>, <code>&quot;flyte&quot;</code>, <code>&quot;mlflow&quot;</code>, <code>&quot;neptune&quot;</code>,
<code>&quot;tensorboard&quot;</code>, and <code>&quot;wandb&quot;</code>. Use <code>&quot;all&quot;</code> to report to all integrations installed, <code>&quot;none&quot;</code> for no
integrations.`,name:"report_to"},{anchor:"transformers.TrainingArguments.set_logging.first_step",description:`<strong>first_step</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to log and evaluate the first <code>global_step</code> or not.`,name:"first_step"},{anchor:"transformers.TrainingArguments.set_logging.nan_inf_filter",description:`<strong>nan_inf_filter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to filter <code>nan</code> and <code>inf</code> losses for logging. If set to <code>True</code> the loss of every step that is
<code>nan</code> or <code>inf</code> is filtered and the average loss of the current logging window is taken instead.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p><code>nan_inf_filter</code> only influences the logging of loss values, it does not change the behavior the
gradient is computed or applied to the model.</p>

					</div>`,name:"nan_inf_filter"},{anchor:"transformers.TrainingArguments.set_logging.on_each_node",description:`<strong>on_each_node</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
In multinode distributed training, whether to log using <code>log_level</code> once per node, or only on the main
node.`,name:"on_each_node"},{anchor:"transformers.TrainingArguments.set_logging.replica_level",description:`<strong>replica_level</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;passive&quot;</code>) &#x2014;
Logger log level to use on replicas. Same choices as <code>log_level</code>`,name:"replica_level"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2354"}}),lt=new ke({props:{anchor:"transformers.TrainingArguments.set_logging.example",$$slots:{default:[sy]},$$scope:{ctx:q}}}),Fn=new k({props:{name:"set_lr_scheduler",anchor:"transformers.TrainingArguments.set_lr_scheduler",parameters:[{name:"name",val:": typing.Union[str, transformers.trainer_utils.SchedulerType] = 'linear'"},{name:"num_epochs",val:": float = 3.0"},{name:"max_steps",val:": int = -1"},{name:"warmup_ratio",val:": float = 0"},{name:"warmup_steps",val:": int = 0"}],parametersDescription:[{anchor:"transformers.TrainingArguments.set_lr_scheduler.name",description:`<strong>name</strong> (<code>str</code> or <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.SchedulerType">SchedulerType</a>, <em>optional</em>, defaults to <code>&quot;linear&quot;</code>) &#x2014;
The scheduler type to use. See the documentation of <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.SchedulerType">SchedulerType</a> for all possible values.`,name:"name"},{anchor:"transformers.TrainingArguments.set_lr_scheduler.num_epochs(float,",description:`<strong>num_epochs(<code>float</code>,</strong> <em>optional</em>, defaults to 3.0) &#x2014;
Total number of training epochs to perform (if not an integer, will perform the decimal part percents
of the last epoch before stopping training).`,name:"num_epochs(float,"},{anchor:"transformers.TrainingArguments.set_lr_scheduler.max_steps",description:`<strong>max_steps</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
If set to a positive number, the total number of training steps to perform. Overrides
<code>num_train_epochs</code>. In case of using a finite iterable dataset the training may stop before reaching
the set number of steps when all data is exhausted.`,name:"max_steps"},{anchor:"transformers.TrainingArguments.set_lr_scheduler.warmup_ratio",description:`<strong>warmup_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Ratio of total training steps used for a linear warmup from 0 to <code>learning_rate</code>.`,name:"warmup_ratio"},{anchor:"transformers.TrainingArguments.set_lr_scheduler.warmup_steps",description:`<strong>warmup_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of steps used for a linear warmup from 0 to <code>learning_rate</code>. Overrides any effect of
<code>warmup_ratio</code>.`,name:"warmup_steps"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2550"}}),dt=new ke({props:{anchor:"transformers.TrainingArguments.set_lr_scheduler.example",$$slots:{default:[iy]},$$scope:{ctx:q}}}),Nn=new k({props:{name:"set_optimizer",anchor:"transformers.TrainingArguments.set_optimizer",parameters:[{name:"name",val:": typing.Union[str, transformers.training_args.OptimizerNames] = 'adamw_torch'"},{name:"learning_rate",val:": float = 5e-05"},{name:"weight_decay",val:": float = 0"},{name:"beta1",val:": float = 0.9"},{name:"beta2",val:": float = 0.999"},{name:"epsilon",val:": float = 1e-08"},{name:"args",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"transformers.TrainingArguments.set_optimizer.name",description:`<strong>name</strong> (<code>str</code> or <code>training_args.OptimizerNames</code>, <em>optional</em>, defaults to <code>&quot;adamw_torch&quot;</code>) &#x2014;
The optimizer to use: <code>&quot;adamw_hf&quot;</code>, <code>&quot;adamw_torch&quot;</code>, <code>&quot;adamw_torch_fused&quot;</code>, <code>&quot;adamw_apex_fused&quot;</code>,
<code>&quot;adamw_anyprecision&quot;</code> or <code>&quot;adafactor&quot;</code>.`,name:"name"},{anchor:"transformers.TrainingArguments.set_optimizer.learning_rate",description:`<strong>learning_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 5e-5) &#x2014;
The initial learning rate.`,name:"learning_rate"},{anchor:"transformers.TrainingArguments.set_optimizer.weight_decay",description:`<strong>weight_decay</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The weight decay to apply (if not zero) to all layers except all bias and LayerNorm weights.`,name:"weight_decay"},{anchor:"transformers.TrainingArguments.set_optimizer.beta1",description:`<strong>beta1</strong> (<code>float</code>, <em>optional</em>, defaults to 0.9) &#x2014;
The beta1 hyperparameter for the adam optimizer or its variants.`,name:"beta1"},{anchor:"transformers.TrainingArguments.set_optimizer.beta2",description:`<strong>beta2</strong> (<code>float</code>, <em>optional</em>, defaults to 0.999) &#x2014;
The beta2 hyperparameter for the adam optimizer or its variants.`,name:"beta2"},{anchor:"transformers.TrainingArguments.set_optimizer.epsilon",description:`<strong>epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-8) &#x2014;
The epsilon hyperparameter for the adam optimizer or its variants.`,name:"epsilon"},{anchor:"transformers.TrainingArguments.set_optimizer.args",description:`<strong>args</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Optional arguments that are supplied to AnyPrecisionAdamW (only useful when
<code>optim=&quot;adamw_anyprecision&quot;</code>).`,name:"args"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2499"}}),ct=new ke({props:{anchor:"transformers.TrainingArguments.set_optimizer.example",$$slots:{default:[ly]},$$scope:{ctx:q}}}),zn=new k({props:{name:"set_push_to_hub",anchor:"transformers.TrainingArguments.set_push_to_hub",parameters:[{name:"model_id",val:": str"},{name:"strategy",val:": typing.Union[str, transformers.trainer_utils.HubStrategy] = 'every_save'"},{name:"token",val:": typing.Optional[str] = None"},{name:"private_repo",val:": bool = False"},{name:"always_push",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TrainingArguments.set_push_to_hub.model_id",description:`<strong>model_id</strong> (<code>str</code>) &#x2014;
The name of the repository to keep in sync with the local <em>output_dir</em>. It can be a simple model ID in
which case the model will be pushed in your namespace. Otherwise it should be the whole repository
name, for instance <code>&quot;user_name/model&quot;</code>, which allows you to push to an organization you are a member of
with <code>&quot;organization_name/model&quot;</code>.`,name:"model_id"},{anchor:"transformers.TrainingArguments.set_push_to_hub.strategy",description:`<strong>strategy</strong> (<code>str</code> or <code>HubStrategy</code>, <em>optional</em>, defaults to <code>&quot;every_save&quot;</code>) &#x2014;
Defines the scope of what is pushed to the Hub and when. Possible values are:</p>
<ul>
<li><code>&quot;end&quot;</code>: push the model, its configuration, the tokenizer (if passed along to the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>) and a
draft of a model card when the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.save_model">save_model()</a> method is called.</li>
<li><code>&quot;every_save&quot;</code>: push the model, its configuration, the tokenizer (if passed along to the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>)
and
a draft of a model card each time there is a model save. The pushes are asynchronous to not block
training, and in case the save are very frequent, a new push is only attempted if the previous one is
finished. A last push is made with the final model at the end of training.</li>
<li><code>&quot;checkpoint&quot;</code>: like <code>&quot;every_save&quot;</code> but the latest checkpoint is also pushed in a subfolder named
last-checkpoint, allowing you to resume training easily with
<code>trainer.train(resume_from_checkpoint=&quot;last-checkpoint&quot;)</code>.</li>
<li><code>&quot;all_checkpoints&quot;</code>: like <code>&quot;checkpoint&quot;</code> but all checkpoints are pushed like they appear in the
output
folder (so you will get one checkpoint folder per folder in your final repository)</li>
</ul>`,name:"strategy"},{anchor:"transformers.TrainingArguments.set_push_to_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use to push the model to the Hub. Will default to the token in the cache folder obtained
with <code>huggingface-cli login</code>.`,name:"token"},{anchor:"transformers.TrainingArguments.set_push_to_hub.private_repo",description:`<strong>private_repo</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If True, the Hub repo will be set to private.`,name:"private_repo"},{anchor:"transformers.TrainingArguments.set_push_to_hub.always_push",description:`<strong>always_push</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Unless this is <code>True</code>, the <code>Trainer</code> will skip pushing a checkpoint when the previous push is not
finished.`,name:"always_push"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2429"}}),mt=new $e({props:{$$slots:{default:[dy]},$$scope:{ctx:q}}}),pt=new ke({props:{anchor:"transformers.TrainingArguments.set_push_to_hub.example",$$slots:{default:[cy]},$$scope:{ctx:q}}}),Wn=new k({props:{name:"set_save",anchor:"transformers.TrainingArguments.set_save",parameters:[{name:"strategy",val:": typing.Union[str, transformers.trainer_utils.IntervalStrategy] = 'steps'"},{name:"steps",val:": int = 500"},{name:"total_limit",val:": typing.Optional[int] = None"},{name:"on_each_node",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TrainingArguments.set_save.strategy",description:`<strong>strategy</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;steps&quot;</code>) &#x2014;
The checkpoint save strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No save is done during training.</li>
<li><code>&quot;epoch&quot;</code>: Save is done at the end of each epoch.</li>
<li><code>&quot;steps&quot;</code>: Save is done every <code>save_steps</code>.</li>
</ul>`,name:"strategy"},{anchor:"transformers.TrainingArguments.set_save.steps",description:`<strong>steps</strong> (<code>int</code>, <em>optional</em>, defaults to 500) &#x2014;
Number of updates steps before two checkpoint saves if <code>strategy=&quot;steps&quot;</code>.`,name:"steps"},{anchor:"transformers.TrainingArguments.set_save.total_limit",description:`<strong>total_limit</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a value is passed, will limit the total amount of checkpoints. Deletes the older checkpoints in
<code>output_dir</code>.`,name:"total_limit"},{anchor:"transformers.TrainingArguments.set_save.on_each_node",description:`<strong>on_each_node</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When doing multi-node distributed training, whether to save models and checkpoints on each node, or
only on the main one.</p>
<p>This should not be activated when the different nodes use the same storage as the files will be saved
with the same names for each node.`,name:"on_each_node"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2305"}}),ut=new ke({props:{anchor:"transformers.TrainingArguments.set_save.example",$$slots:{default:[my]},$$scope:{ctx:q}}}),Dn=new k({props:{name:"set_testing",anchor:"transformers.TrainingArguments.set_testing",parameters:[{name:"batch_size",val:": int = 8"},{name:"loss_only",val:": bool = False"},{name:"jit_mode",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TrainingArguments.set_testing.batch_size",description:`<strong>batch_size</strong> (<code>int</code> <em>optional</em>, defaults to 8) &#x2014;
The batch size per device (GPU/TPU core/CPU&#x2026;) used for testing.`,name:"batch_size"},{anchor:"transformers.TrainingArguments.set_testing.loss_only",description:`<strong>loss_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Ignores all outputs except the loss.`,name:"loss_only"},{anchor:"transformers.TrainingArguments.set_testing.jit_mode",description:`<strong>jit_mode</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use PyTorch jit trace for inference.`,name:"jit_mode"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2265"}}),ht=new $e({props:{$$slots:{default:[py]},$$scope:{ctx:q}}}),gt=new ke({props:{anchor:"transformers.TrainingArguments.set_testing.example",$$slots:{default:[uy]},$$scope:{ctx:q}}}),Hn=new k({props:{name:"set_training",anchor:"transformers.TrainingArguments.set_training",parameters:[{name:"learning_rate",val:": float = 5e-05"},{name:"batch_size",val:": int = 8"},{name:"weight_decay",val:": float = 0"},{name:"num_epochs",val:": float = 3"},{name:"max_steps",val:": int = -1"},{name:"gradient_accumulation_steps",val:": int = 1"},{name:"seed",val:": int = 42"},{name:"gradient_checkpointing",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TrainingArguments.set_training.learning_rate",description:`<strong>learning_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 5e-5) &#x2014;
The initial learning rate for the optimizer.`,name:"learning_rate"},{anchor:"transformers.TrainingArguments.set_training.batch_size",description:`<strong>batch_size</strong> (<code>int</code> <em>optional</em>, defaults to 8) &#x2014;
The batch size per device (GPU/TPU core/CPU&#x2026;) used for training.`,name:"batch_size"},{anchor:"transformers.TrainingArguments.set_training.weight_decay",description:`<strong>weight_decay</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The weight decay to apply (if not zero) to all layers except all bias and LayerNorm weights in the
optimizer.`,name:"weight_decay"},{anchor:"transformers.TrainingArguments.set_training.num_train_epochs(float,",description:`<strong>num_train_epochs(<code>float</code>,</strong> <em>optional</em>, defaults to 3.0) &#x2014;
Total number of training epochs to perform (if not an integer, will perform the decimal part percents
of the last epoch before stopping training).`,name:"num_train_epochs(float,"},{anchor:"transformers.TrainingArguments.set_training.max_steps",description:`<strong>max_steps</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
If set to a positive number, the total number of training steps to perform. Overrides
<code>num_train_epochs</code>. In case of using a finite iterable dataset the training may stop before reaching
the set number of steps when all data is exhausted.`,name:"max_steps"},{anchor:"transformers.TrainingArguments.set_training.gradient_accumulation_steps",description:`<strong>gradient_accumulation_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of updates steps to accumulate the gradients for, before performing a backward/update pass.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>When using gradient accumulation, one step is counted as one step with backward pass. Therefore,
logging, evaluation, save will be conducted every <code>gradient_accumulation_steps * xxx_step</code> training
examples.</p>

					</div>`,name:"gradient_accumulation_steps"},{anchor:"transformers.TrainingArguments.set_training.seed",description:`<strong>seed</strong> (<code>int</code>, <em>optional</em>, defaults to 42) &#x2014;
Random seed that will be set at the beginning of training. To ensure reproducibility across runs, use
the <code>~Trainer.model_init</code> function to instantiate the model if it has some randomly initialized
parameters.`,name:"seed"},{anchor:"transformers.TrainingArguments.set_training.gradient_checkpointing",description:`<strong>gradient_checkpointing</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If True, use gradient checkpointing to save memory at the expense of slower backward pass.`,name:"gradient_checkpointing"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2129"}}),ft=new $e({props:{$$slots:{default:[hy]},$$scope:{ctx:q}}}),_t=new ke({props:{anchor:"transformers.TrainingArguments.set_training.example",$$slots:{default:[gy]},$$scope:{ctx:q}}}),Rn=new k({props:{name:"to_dict",anchor:"transformers.TrainingArguments.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2092"}}),Bn=new k({props:{name:"to_json_string",anchor:"transformers.TrainingArguments.to_json_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2109"}}),En=new k({props:{name:"to_sanitized_dict",anchor:"transformers.TrainingArguments.to_sanitized_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L2115"}}),Vn=new L({props:{title:"Seq2SeqTrainingArguments",local:"transformers.Seq2SeqTrainingArguments",headingTag:"h2"}}),Zn=new k({props:{name:"class transformers.Seq2SeqTrainingArguments",anchor:"transformers.Seq2SeqTrainingArguments",parameters:[{name:"output_dir",val:": str"},{name:"overwrite_output_dir",val:": bool = False"},{name:"do_train",val:": bool = False"},{name:"do_eval",val:": bool = False"},{name:"do_predict",val:": bool = False"},{name:"evaluation_strategy",val:": typing.Union[transformers.trainer_utils.IntervalStrategy, str] = 'no'"},{name:"prediction_loss_only",val:": bool = False"},{name:"per_device_train_batch_size",val:": int = 8"},{name:"per_device_eval_batch_size",val:": int = 8"},{name:"per_gpu_train_batch_size",val:": typing.Optional[int] = None"},{name:"per_gpu_eval_batch_size",val:": typing.Optional[int] = None"},{name:"gradient_accumulation_steps",val:": int = 1"},{name:"eval_accumulation_steps",val:": typing.Optional[int] = None"},{name:"eval_delay",val:": typing.Optional[float] = 0"},{name:"learning_rate",val:": float = 5e-05"},{name:"weight_decay",val:": float = 0.0"},{name:"adam_beta1",val:": float = 0.9"},{name:"adam_beta2",val:": float = 0.999"},{name:"adam_epsilon",val:": float = 1e-08"},{name:"max_grad_norm",val:": float = 1.0"},{name:"num_train_epochs",val:": float = 3.0"},{name:"max_steps",val:": int = -1"},{name:"lr_scheduler_type",val:": typing.Union[transformers.trainer_utils.SchedulerType, str] = 'linear'"},{name:"warmup_ratio",val:": float = 0.0"},{name:"warmup_steps",val:": int = 0"},{name:"log_level",val:": typing.Optional[str] = 'passive'"},{name:"log_level_replica",val:": typing.Optional[str] = 'warning'"},{name:"log_on_each_node",val:": bool = True"},{name:"logging_dir",val:": typing.Optional[str] = None"},{name:"logging_strategy",val:": typing.Union[transformers.trainer_utils.IntervalStrategy, str] = 'steps'"},{name:"logging_first_step",val:": bool = False"},{name:"logging_steps",val:": float = 500"},{name:"logging_nan_inf_filter",val:": bool = True"},{name:"save_strategy",val:": typing.Union[transformers.trainer_utils.IntervalStrategy, str] = 'steps'"},{name:"save_steps",val:": float = 500"},{name:"save_total_limit",val:": typing.Optional[int] = None"},{name:"save_safetensors",val:": typing.Optional[bool] = True"},{name:"save_on_each_node",val:": bool = False"},{name:"no_cuda",val:": bool = False"},{name:"use_cpu",val:": bool = False"},{name:"use_mps_device",val:": bool = False"},{name:"seed",val:": int = 42"},{name:"data_seed",val:": typing.Optional[int] = None"},{name:"jit_mode_eval",val:": bool = False"},{name:"use_ipex",val:": bool = False"},{name:"bf16",val:": bool = False"},{name:"fp16",val:": bool = False"},{name:"fp16_opt_level",val:": str = 'O1'"},{name:"half_precision_backend",val:": str = 'auto'"},{name:"bf16_full_eval",val:": bool = False"},{name:"fp16_full_eval",val:": bool = False"},{name:"tf32",val:": typing.Optional[bool] = None"},{name:"local_rank",val:": int = -1"},{name:"ddp_backend",val:": typing.Optional[str] = None"},{name:"tpu_num_cores",val:": typing.Optional[int] = None"},{name:"tpu_metrics_debug",val:": bool = False"},{name:"debug",val:": typing.Union[str, typing.List[transformers.debug_utils.DebugOption]] = ''"},{name:"dataloader_drop_last",val:": bool = False"},{name:"eval_steps",val:": typing.Optional[float] = None"},{name:"dataloader_num_workers",val:": int = 0"},{name:"past_index",val:": int = -1"},{name:"run_name",val:": typing.Optional[str] = None"},{name:"disable_tqdm",val:": typing.Optional[bool] = None"},{name:"remove_unused_columns",val:": typing.Optional[bool] = True"},{name:"label_names",val:": typing.Optional[typing.List[str]] = None"},{name:"load_best_model_at_end",val:": typing.Optional[bool] = False"},{name:"metric_for_best_model",val:": typing.Optional[str] = None"},{name:"greater_is_better",val:": typing.Optional[bool] = None"},{name:"ignore_data_skip",val:": bool = False"},{name:"fsdp",val:": typing.Union[typing.List[transformers.trainer_utils.FSDPOption], str, NoneType] = ''"},{name:"fsdp_min_num_params",val:": int = 0"},{name:"fsdp_config",val:": typing.Optional[str] = None"},{name:"fsdp_transformer_layer_cls_to_wrap",val:": typing.Optional[str] = None"},{name:"deepspeed",val:": typing.Optional[str] = None"},{name:"label_smoothing_factor",val:": float = 0.0"},{name:"optim",val:": typing.Union[transformers.training_args.OptimizerNames, str] = 'adamw_torch'"},{name:"optim_args",val:": typing.Optional[str] = None"},{name:"adafactor",val:": bool = False"},{name:"group_by_length",val:": bool = False"},{name:"length_column_name",val:": typing.Optional[str] = 'length'"},{name:"report_to",val:": typing.Optional[typing.List[str]] = None"},{name:"ddp_find_unused_parameters",val:": typing.Optional[bool] = None"},{name:"ddp_bucket_cap_mb",val:": typing.Optional[int] = None"},{name:"ddp_broadcast_buffers",val:": typing.Optional[bool] = None"},{name:"dataloader_pin_memory",val:": bool = True"},{name:"skip_memory_metrics",val:": bool = True"},{name:"use_legacy_prediction_loop",val:": bool = False"},{name:"push_to_hub",val:": bool = False"},{name:"resume_from_checkpoint",val:": typing.Optional[str] = None"},{name:"hub_model_id",val:": typing.Optional[str] = None"},{name:"hub_strategy",val:": typing.Union[transformers.trainer_utils.HubStrategy, str] = 'every_save'"},{name:"hub_token",val:": typing.Optional[str] = None"},{name:"hub_private_repo",val:": bool = False"},{name:"hub_always_push",val:": bool = False"},{name:"gradient_checkpointing",val:": bool = False"},{name:"gradient_checkpointing_kwargs",val:": dict = None"},{name:"include_inputs_for_metrics",val:": bool = False"},{name:"fp16_backend",val:": str = 'auto'"},{name:"push_to_hub_model_id",val:": typing.Optional[str] = None"},{name:"push_to_hub_organization",val:": typing.Optional[str] = None"},{name:"push_to_hub_token",val:": typing.Optional[str] = None"},{name:"mp_parameters",val:": str = ''"},{name:"auto_find_batch_size",val:": bool = False"},{name:"full_determinism",val:": bool = False"},{name:"torchdynamo",val:": typing.Optional[str] = None"},{name:"ray_scope",val:": typing.Optional[str] = 'last'"},{name:"ddp_timeout",val:": typing.Optional[int] = 1800"},{name:"torch_compile",val:": bool = False"},{name:"torch_compile_backend",val:": typing.Optional[str] = None"},{name:"torch_compile_mode",val:": typing.Optional[str] = None"},{name:"dispatch_batches",val:": typing.Optional[bool] = None"},{name:"split_batches",val:": typing.Optional[bool] = False"},{name:"include_tokens_per_second",val:": typing.Optional[bool] = False"},{name:"neftune_noise_alpha",val:": float = None"},{name:"sortish_sampler",val:": bool = False"},{name:"predict_with_generate",val:": bool = False"},{name:"generation_max_length",val:": typing.Optional[int] = None"},{name:"generation_num_beams",val:": typing.Optional[int] = None"},{name:"generation_config",val:": typing.Union[str, pathlib.Path, transformers.generation.configuration_utils.GenerationConfig, NoneType] = None"}],parametersDescription:[{anchor:"transformers.Seq2SeqTrainingArguments.output_dir",description:`<strong>output_dir</strong> (<code>str</code>) &#x2014;
The output directory where the model predictions and checkpoints will be written.`,name:"output_dir"},{anchor:"transformers.Seq2SeqTrainingArguments.overwrite_output_dir",description:`<strong>overwrite_output_dir</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, overwrite the content of the output directory. Use this to continue training if <code>output_dir</code>
points to a checkpoint directory.`,name:"overwrite_output_dir"},{anchor:"transformers.Seq2SeqTrainingArguments.do_train",description:`<strong>do_train</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to run training or not. This argument is not directly used by <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, it&#x2019;s intended to be used
by your training/evaluation scripts instead. See the <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">example
scripts</a> for more details.`,name:"do_train"},{anchor:"transformers.Seq2SeqTrainingArguments.do_eval",description:`<strong>do_eval</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to run evaluation on the validation set or not. Will be set to <code>True</code> if <code>evaluation_strategy</code> is
different from <code>&quot;no&quot;</code>. This argument is not directly used by <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, it&#x2019;s intended to be used by your
training/evaluation scripts instead. See the <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">example
scripts</a> for more details.`,name:"do_eval"},{anchor:"transformers.Seq2SeqTrainingArguments.do_predict",description:`<strong>do_predict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to run predictions on the test set or not. This argument is not directly used by <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, it&#x2019;s
intended to be used by your training/evaluation scripts instead. See the <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">example
scripts</a> for more details.`,name:"do_predict"},{anchor:"transformers.Seq2SeqTrainingArguments.evaluation_strategy",description:`<strong>evaluation_strategy</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;no&quot;</code>) &#x2014;
The evaluation strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No evaluation is done during training.</li>
<li><code>&quot;steps&quot;</code>: Evaluation is done (and logged) every <code>eval_steps</code>.</li>
<li><code>&quot;epoch&quot;</code>: Evaluation is done at the end of each epoch.</li>
</ul>`,name:"evaluation_strategy"},{anchor:"transformers.Seq2SeqTrainingArguments.prediction_loss_only",description:`<strong>prediction_loss_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When performing evaluation and generating predictions, only returns the loss.`,name:"prediction_loss_only"},{anchor:"transformers.Seq2SeqTrainingArguments.per_device_train_batch_size",description:`<strong>per_device_train_batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The batch size per GPU/XPU/TPU/MPS/NPU core/CPU for training.`,name:"per_device_train_batch_size"},{anchor:"transformers.Seq2SeqTrainingArguments.per_device_eval_batch_size",description:`<strong>per_device_eval_batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The batch size per GPU/XPU/TPU/MPS/NPU core/CPU for evaluation.`,name:"per_device_eval_batch_size"},{anchor:"transformers.Seq2SeqTrainingArguments.gradient_accumulation_steps",description:`<strong>gradient_accumulation_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of updates steps to accumulate the gradients for, before performing a backward/update pass.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>When using gradient accumulation, one step is counted as one step with backward pass. Therefore, logging,
evaluation, save will be conducted every <code>gradient_accumulation_steps * xxx_step</code> training examples.</p>

					</div>`,name:"gradient_accumulation_steps"},{anchor:"transformers.Seq2SeqTrainingArguments.eval_accumulation_steps",description:`<strong>eval_accumulation_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of predictions steps to accumulate the output tensors for, before moving the results to the CPU. If
left unset, the whole predictions are accumulated on GPU/NPU/TPU before being moved to the CPU (faster but
requires more memory).`,name:"eval_accumulation_steps"},{anchor:"transformers.Seq2SeqTrainingArguments.eval_delay",description:`<strong>eval_delay</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Number of epochs or steps to wait for before the first evaluation can be performed, depending on the
evaluation_strategy.`,name:"eval_delay"},{anchor:"transformers.Seq2SeqTrainingArguments.learning_rate",description:`<strong>learning_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 5e-5) &#x2014;
The initial learning rate for <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a> optimizer.`,name:"learning_rate"},{anchor:"transformers.Seq2SeqTrainingArguments.weight_decay",description:`<strong>weight_decay</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The weight decay to apply (if not zero) to all layers except all bias and LayerNorm weights in <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a>
optimizer.`,name:"weight_decay"},{anchor:"transformers.Seq2SeqTrainingArguments.adam_beta1",description:`<strong>adam_beta1</strong> (<code>float</code>, <em>optional</em>, defaults to 0.9) &#x2014;
The beta1 hyperparameter for the <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a> optimizer.`,name:"adam_beta1"},{anchor:"transformers.Seq2SeqTrainingArguments.adam_beta2",description:`<strong>adam_beta2</strong> (<code>float</code>, <em>optional</em>, defaults to 0.999) &#x2014;
The beta2 hyperparameter for the <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a> optimizer.`,name:"adam_beta2"},{anchor:"transformers.Seq2SeqTrainingArguments.adam_epsilon",description:`<strong>adam_epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-8) &#x2014;
The epsilon hyperparameter for the <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.AdamW">AdamW</a> optimizer.`,name:"adam_epsilon"},{anchor:"transformers.Seq2SeqTrainingArguments.max_grad_norm",description:`<strong>max_grad_norm</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Maximum gradient norm (for gradient clipping).`,name:"max_grad_norm"},{anchor:"transformers.Seq2SeqTrainingArguments.num_train_epochs(float,",description:`<strong>num_train_epochs(<code>float</code>,</strong> <em>optional</em>, defaults to 3.0) &#x2014;
Total number of training epochs to perform (if not an integer, will perform the decimal part percents of
the last epoch before stopping training).`,name:"num_train_epochs(float,"},{anchor:"transformers.Seq2SeqTrainingArguments.max_steps",description:`<strong>max_steps</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
If set to a positive number, the total number of training steps to perform. Overrides <code>num_train_epochs</code>.
In case of using a finite iterable dataset the training may stop before reaching the set number of steps
when all data is exhausted`,name:"max_steps"},{anchor:"transformers.Seq2SeqTrainingArguments.lr_scheduler_type",description:`<strong>lr_scheduler_type</strong> (<code>str</code> or <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.SchedulerType">SchedulerType</a>, <em>optional</em>, defaults to <code>&quot;linear&quot;</code>) &#x2014;
The scheduler type to use. See the documentation of <a href="/docs/transformers/main/en/main_classes/optimizer_schedules#transformers.SchedulerType">SchedulerType</a> for all possible values.`,name:"lr_scheduler_type"},{anchor:"transformers.Seq2SeqTrainingArguments.warmup_ratio",description:`<strong>warmup_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Ratio of total training steps used for a linear warmup from 0 to <code>learning_rate</code>.`,name:"warmup_ratio"},{anchor:"transformers.Seq2SeqTrainingArguments.warmup_steps",description:`<strong>warmup_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of steps used for a linear warmup from 0 to <code>learning_rate</code>. Overrides any effect of <code>warmup_ratio</code>.`,name:"warmup_steps"},{anchor:"transformers.Seq2SeqTrainingArguments.log_level",description:`<strong>log_level</strong> (<code>str</code>, <em>optional</em>, defaults to <code>passive</code>) &#x2014;
Logger log level to use on the main process. Possible choices are the log levels as strings: &#x2018;debug&#x2019;,
&#x2018;info&#x2019;, &#x2018;warning&#x2019;, &#x2018;error&#x2019; and &#x2018;critical&#x2019;, plus a &#x2018;passive&#x2019; level which doesn&#x2019;t set anything and keeps the
current log level for the Transformers library (which will be <code>&quot;warning&quot;</code> by default).`,name:"log_level"},{anchor:"transformers.Seq2SeqTrainingArguments.log_level_replica",description:`<strong>log_level_replica</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;warning&quot;</code>) &#x2014;
Logger log level to use on replicas. Same choices as <code>log_level</code>&#x201D;`,name:"log_level_replica"},{anchor:"transformers.Seq2SeqTrainingArguments.log_on_each_node",description:`<strong>log_on_each_node</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
In multinode distributed training, whether to log using <code>log_level</code> once per node, or only on the main
node.`,name:"log_on_each_node"},{anchor:"transformers.Seq2SeqTrainingArguments.logging_dir",description:`<strong>logging_dir</strong> (<code>str</code>, <em>optional</em>) &#x2014;
<a href="https://www.tensorflow.org/tensorboard" rel="nofollow">TensorBoard</a> log directory. Will default to
*output_dir/runs/<strong>CURRENT_DATETIME_HOSTNAME*</strong>.`,name:"logging_dir"},{anchor:"transformers.Seq2SeqTrainingArguments.logging_strategy",description:`<strong>logging_strategy</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;steps&quot;</code>) &#x2014;
The logging strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No logging is done during training.</li>
<li><code>&quot;epoch&quot;</code>: Logging is done at the end of each epoch.</li>
<li><code>&quot;steps&quot;</code>: Logging is done every <code>logging_steps</code>.</li>
</ul>`,name:"logging_strategy"},{anchor:"transformers.Seq2SeqTrainingArguments.logging_first_step",description:`<strong>logging_first_step</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to log and evaluate the first <code>global_step</code> or not.`,name:"logging_first_step"},{anchor:"transformers.Seq2SeqTrainingArguments.logging_steps",description:`<strong>logging_steps</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to 500) &#x2014;
Number of update steps between two logs if <code>logging_strategy=&quot;steps&quot;</code>. Should be an integer or a float in
range <code>[0,1)</code>. If smaller than 1, will be interpreted as ratio of total training steps.`,name:"logging_steps"},{anchor:"transformers.Seq2SeqTrainingArguments.logging_nan_inf_filter",description:`<strong>logging_nan_inf_filter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to filter <code>nan</code> and <code>inf</code> losses for logging. If set to <code>True</code> the loss of every step that is <code>nan</code>
or <code>inf</code> is filtered and the average loss of the current logging window is taken instead.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p><code>logging_nan_inf_filter</code> only influences the logging of loss values, it does not change the behavior the
gradient is computed or applied to the model.</p>

					</div>`,name:"logging_nan_inf_filter"},{anchor:"transformers.Seq2SeqTrainingArguments.save_strategy",description:`<strong>save_strategy</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;steps&quot;</code>) &#x2014;
The checkpoint save strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No save is done during training.</li>
<li><code>&quot;epoch&quot;</code>: Save is done at the end of each epoch.</li>
<li><code>&quot;steps&quot;</code>: Save is done every <code>save_steps</code>.</li>
</ul>`,name:"save_strategy"},{anchor:"transformers.Seq2SeqTrainingArguments.save_steps",description:`<strong>save_steps</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to 500) &#x2014;
Number of updates steps before two checkpoint saves if <code>save_strategy=&quot;steps&quot;</code>. Should be an integer or a
float in range <code>[0,1)</code>. If smaller than 1, will be interpreted as ratio of total training steps.`,name:"save_steps"},{anchor:"transformers.Seq2SeqTrainingArguments.save_total_limit",description:`<strong>save_total_limit</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a value is passed, will limit the total amount of checkpoints. Deletes the older checkpoints in
<code>output_dir</code>. When <code>load_best_model_at_end</code> is enabled, the &#x201C;best&#x201D; checkpoint according to
<code>metric_for_best_model</code> will always be retained in addition to the most recent ones. For example, for
<code>save_total_limit=5</code> and <code>load_best_model_at_end</code>, the four last checkpoints will always be retained
alongside the best model. When <code>save_total_limit=1</code> and <code>load_best_model_at_end</code>, it is possible that two
checkpoints are saved: the last one and the best one (if they are different).`,name:"save_total_limit"},{anchor:"transformers.Seq2SeqTrainingArguments.save_safetensors",description:`<strong>save_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Use <a href="https://huggingface.co/docs/safetensors" rel="nofollow">safetensors</a> saving and loading for state dicts instead of
default <code>torch.load</code> and <code>torch.save</code>.`,name:"save_safetensors"},{anchor:"transformers.Seq2SeqTrainingArguments.save_on_each_node",description:`<strong>save_on_each_node</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When doing multi-node distributed training, whether to save models and checkpoints on each node, or only on
the main one.</p>
<p>This should not be activated when the different nodes use the same storage as the files will be saved with
the same names for each node.`,name:"save_on_each_node"},{anchor:"transformers.Seq2SeqTrainingArguments.use_cpu",description:`<strong>use_cpu</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use cpu. If set to False, we will use cuda or mps device if available.`,name:"use_cpu"},{anchor:"transformers.Seq2SeqTrainingArguments.seed",description:`<strong>seed</strong> (<code>int</code>, <em>optional</em>, defaults to 42) &#x2014;
Random seed that will be set at the beginning of training. To ensure reproducibility across runs, use the
<code>~Trainer.model_init</code> function to instantiate the model if it has some randomly initialized parameters.`,name:"seed"},{anchor:"transformers.Seq2SeqTrainingArguments.data_seed",description:`<strong>data_seed</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Random seed to be used with data samplers. If not set, random generators for data sampling will use the
same seed as <code>seed</code>. This can be used to ensure reproducibility of data sampling, independent of the model
seed.`,name:"data_seed"},{anchor:"transformers.Seq2SeqTrainingArguments.jit_mode_eval",description:`<strong>jit_mode_eval</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use PyTorch jit trace for inference.`,name:"jit_mode_eval"},{anchor:"transformers.Seq2SeqTrainingArguments.use_ipex",description:`<strong>use_ipex</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Use Intel extension for PyTorch when it is available. <a href="https://github.com/intel/intel-extension-for-pytorch" rel="nofollow">IPEX
installation</a>.`,name:"use_ipex"},{anchor:"transformers.Seq2SeqTrainingArguments.bf16",description:`<strong>bf16</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use bf16 16-bit (mixed) precision training instead of 32-bit training. Requires Ampere or higher
NVIDIA architecture or using CPU (use_cpu) or Ascend NPU. This is an experimental API and it may change.`,name:"bf16"},{anchor:"transformers.Seq2SeqTrainingArguments.fp16",description:`<strong>fp16</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use fp16 16-bit (mixed) precision training instead of 32-bit training.`,name:"fp16"},{anchor:"transformers.Seq2SeqTrainingArguments.fp16_opt_level",description:`<strong>fp16_opt_level</strong> (<code>str</code>, <em>optional</em>, defaults to &#x2018;O1&#x2019;) &#x2014;
For <code>fp16</code> training, Apex AMP optimization level selected in [&#x2018;O0&#x2019;, &#x2018;O1&#x2019;, &#x2018;O2&#x2019;, and &#x2018;O3&#x2019;]. See details on
the <a href="https://nvidia.github.io/apex/amp" rel="nofollow">Apex documentation</a>.`,name:"fp16_opt_level"},{anchor:"transformers.Seq2SeqTrainingArguments.fp16_backend",description:`<strong>fp16_backend</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
This argument is deprecated. Use <code>half_precision_backend</code> instead.`,name:"fp16_backend"},{anchor:"transformers.Seq2SeqTrainingArguments.half_precision_backend",description:`<strong>half_precision_backend</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
The backend to use for mixed precision training. Must be one of <code>&quot;auto&quot;, &quot;apex&quot;, &quot;cpu_amp&quot;</code>. <code>&quot;auto&quot;</code> will
use CPU/CUDA AMP or APEX depending on the PyTorch version detected, while the other choices will force the
requested backend.`,name:"half_precision_backend"},{anchor:"transformers.Seq2SeqTrainingArguments.bf16_full_eval",description:`<strong>bf16_full_eval</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use full bfloat16 evaluation instead of 32-bit. This will be faster and save memory but can harm
metric values. This is an experimental API and it may change.`,name:"bf16_full_eval"},{anchor:"transformers.Seq2SeqTrainingArguments.fp16_full_eval",description:`<strong>fp16_full_eval</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use full float16 evaluation instead of 32-bit. This will be faster and save memory but can harm
metric values.`,name:"fp16_full_eval"},{anchor:"transformers.Seq2SeqTrainingArguments.tf32",description:`<strong>tf32</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to enable the TF32 mode, available in Ampere and newer GPU architectures. The default value depends
on PyTorch&#x2019;s version default of <code>torch.backends.cuda.matmul.allow_tf32</code>. For more details please refer to
the <a href="https://huggingface.co/docs/transformers/performance#tf32" rel="nofollow">TF32</a> documentation. This is an
experimental API and it may change.`,name:"tf32"},{anchor:"transformers.Seq2SeqTrainingArguments.local_rank",description:`<strong>local_rank</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Rank of the process during distributed training.`,name:"local_rank"},{anchor:"transformers.Seq2SeqTrainingArguments.ddp_backend",description:`<strong>ddp_backend</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The backend to use for distributed training. Must be one of <code>&quot;nccl&quot;</code>, <code>&quot;mpi&quot;</code>, <code>&quot;ccl&quot;</code>, <code>&quot;gloo&quot;</code>, <code>&quot;hccl&quot;</code>.`,name:"ddp_backend"},{anchor:"transformers.Seq2SeqTrainingArguments.tpu_num_cores",description:`<strong>tpu_num_cores</strong> (<code>int</code>, <em>optional</em>) &#x2014;
When training on TPU, the number of TPU cores (automatically passed by launcher script).`,name:"tpu_num_cores"},{anchor:"transformers.Seq2SeqTrainingArguments.dataloader_drop_last",description:`<strong>dataloader_drop_last</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to drop the last incomplete batch (if the length of the dataset is not divisible by the batch size)
or not.`,name:"dataloader_drop_last"},{anchor:"transformers.Seq2SeqTrainingArguments.eval_steps",description:`<strong>eval_steps</strong> (<code>int</code> or <code>float</code>, <em>optional</em>) &#x2014;
Number of update steps between two evaluations if <code>evaluation_strategy=&quot;steps&quot;</code>. Will default to the same
value as <code>logging_steps</code> if not set. Should be an integer or a float in range <code>[0,1)</code>. If smaller than 1,
will be interpreted as ratio of total training steps.`,name:"eval_steps"},{anchor:"transformers.Seq2SeqTrainingArguments.dataloader_num_workers",description:`<strong>dataloader_num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of subprocesses to use for data loading (PyTorch only). 0 means that the data will be loaded in the
main process.`,name:"dataloader_num_workers"},{anchor:"transformers.Seq2SeqTrainingArguments.past_index",description:`<strong>past_index</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Some models like <a href="../model_doc/transformerxl">TransformerXL</a> or <a href="../model_doc/xlnet">XLNet</a> can make use of
the past hidden states for their predictions. If this argument is set to a positive int, the <code>Trainer</code> will
use the corresponding output (usually index 2) as the past state and feed it to the model at the next
training step under the keyword argument <code>mems</code>.`,name:"past_index"},{anchor:"transformers.Seq2SeqTrainingArguments.run_name",description:`<strong>run_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A descriptor for the run. Typically used for <a href="https://www.wandb.com/" rel="nofollow">wandb</a> and
<a href="https://www.mlflow.org/" rel="nofollow">mlflow</a> logging.`,name:"run_name"},{anchor:"transformers.Seq2SeqTrainingArguments.disable_tqdm",description:`<strong>disable_tqdm</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to disable the tqdm progress bars and table of metrics produced by
<code>~notebook.NotebookTrainingTracker</code> in Jupyter Notebooks. Will default to <code>True</code> if the logging level is
set to warn or lower (default), <code>False</code> otherwise.`,name:"disable_tqdm"},{anchor:"transformers.Seq2SeqTrainingArguments.remove_unused_columns",description:`<strong>remove_unused_columns</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to automatically remove the columns unused by the model forward method.</p>
<p>(Note that this behavior is not implemented for <code>TFTrainer</code> yet.)`,name:"remove_unused_columns"},{anchor:"transformers.Seq2SeqTrainingArguments.label_names",description:`<strong>label_names</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of keys in your dictionary of inputs that correspond to the labels.</p>
<p>Will eventually default to the list of argument names accepted by the model that contain the word &#x201C;label&#x201D;,
except if the model used is one of the <code>XxxForQuestionAnswering</code> in which case it will also include the
<code>[&quot;start_positions&quot;, &quot;end_positions&quot;]</code> keys.`,name:"label_names"},{anchor:"transformers.Seq2SeqTrainingArguments.load_best_model_at_end",description:`<strong>load_best_model_at_end</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to load the best model found during training at the end of training. When this option is
enabled, the best checkpoint will always be saved. See
<a href="https://huggingface.co/docs/transformers/main_classes/trainer#transformers.TrainingArguments.save_total_limit" rel="nofollow"><code>save_total_limit</code></a>
for more.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When set to <code>True</code>, the parameters <code>save_strategy</code> needs to be the same as <code>evaluation_strategy</code>, and in
the case it is &#x201C;steps&#x201D;, <code>save_steps</code> must be a round multiple of <code>eval_steps</code>.</p>

					</div>`,name:"load_best_model_at_end"},{anchor:"transformers.Seq2SeqTrainingArguments.metric_for_best_model",description:`<strong>metric_for_best_model</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Use in conjunction with <code>load_best_model_at_end</code> to specify the metric to use to compare two different
models. Must be the name of a metric returned by the evaluation with or without the prefix <code>&quot;eval_&quot;</code>. Will
default to <code>&quot;loss&quot;</code> if unspecified and <code>load_best_model_at_end=True</code> (to use the evaluation loss).</p>
<p>If you set this value, <code>greater_is_better</code> will default to <code>True</code>. Don&#x2019;t forget to set it to <code>False</code> if
your metric is better when lower.`,name:"metric_for_best_model"},{anchor:"transformers.Seq2SeqTrainingArguments.greater_is_better",description:`<strong>greater_is_better</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Use in conjunction with <code>load_best_model_at_end</code> and <code>metric_for_best_model</code> to specify if better models
should have a greater metric or not. Will default to:</p>
<ul>
<li><code>True</code> if <code>metric_for_best_model</code> is set to a value that isn&#x2019;t <code>&quot;loss&quot;</code> or <code>&quot;eval_loss&quot;</code>.</li>
<li><code>False</code> if <code>metric_for_best_model</code> is not set, or set to <code>&quot;loss&quot;</code> or <code>&quot;eval_loss&quot;</code>.</li>
</ul>`,name:"greater_is_better"},{anchor:"transformers.Seq2SeqTrainingArguments.ignore_data_skip",description:`<strong>ignore_data_skip</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When resuming training, whether or not to skip the epochs and batches to get the data loading at the same
stage as in the previous training. If set to <code>True</code>, the training will begin faster (as that skipping step
can take a long time) but will not yield the same results as the interrupted training would have.`,name:"ignore_data_skip"},{anchor:"transformers.Seq2SeqTrainingArguments.fsdp",description:`<strong>fsdp</strong> (<code>bool</code>, <code>str</code> or list of <code>FSDPOption</code>, <em>optional</em>, defaults to <code>&apos;&apos;</code>) &#x2014;
Use PyTorch Distributed Parallel Training (in distributed training only).</p>
<p>A list of options along the following:</p>
<ul>
<li><code>&quot;full_shard&quot;</code>: Shard parameters, gradients and optimizer states.</li>
<li><code>&quot;shard_grad_op&quot;</code>: Shard optimizer states and gradients.</li>
<li><code>&quot;offload&quot;</code>: Offload parameters and gradients to CPUs (only compatible with <code>&quot;full_shard&quot;</code> and
<code>&quot;shard_grad_op&quot;</code>).</li>
<li><code>&quot;auto_wrap&quot;</code>: Automatically recursively wrap layers with FSDP using <code>default_auto_wrap_policy</code>.</li>
</ul>`,name:"fsdp"},{anchor:"transformers.Seq2SeqTrainingArguments.fsdp_config",description:`<strong>fsdp_config</strong> (<code>str</code> or <code>dict</code>, <em>optional</em>) &#x2014;
Config to be used with fsdp (Pytorch Distributed Parallel Training). The value is either a location of
deepspeed json config file (e.g., <code>ds_config.json</code>) or an already loaded json file as <code>dict</code>.</p>
<p>A List of config and its options:</p>
<ul>
<li>
<p>min_num_params (<code>int</code>, <em>optional</em>, defaults to <code>0</code>):
FSDP&#x2019;s minimum number of parameters for Default Auto Wrapping. (useful only when <code>fsdp</code> field is
passed).</p>
</li>
<li>
<p>transformer_layer_cls_to_wrap (<code>List[str]</code>, <em>optional</em>):
List of transformer layer class names (case-sensitive) to wrap, e.g, <code>BertLayer</code>, <code>GPTJBlock</code>,
<code>T5Block</code> &#x2026; (useful only when <code>fsdp</code> flag is passed).</p>
</li>
<li>
<p>backward_prefetch (<code>str</code>, <em>optional</em>)
FSDP&#x2019;s backward prefetch mode. Controls when to prefetch next set of parameters (useful only when
<code>fsdp</code> field is passed).</p>
<p>A list of options along the following:</p>
<ul>
<li><code>&quot;backward_pre&quot;</code> : Prefetches the next set of parameters before the current set of parameter&#x2019;s
gradient
computation.</li>
<li><code>&quot;backward_post&quot;</code> : This prefetches the next set of parameters after the current set of
parameter&#x2019;s
gradient computation.</li>
</ul>
</li>
<li>
<p>forward_prefetch (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>)
FSDP&#x2019;s forward prefetch mode (useful only when <code>fsdp</code> field is passed).
If <code>&quot;True&quot;</code>, then FSDP explicitly prefetches the next upcoming all-gather while executing in the
forward pass.</p>
</li>
<li>
<p>limit_all_gathers (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>)
FSDP&#x2019;s limit_all_gathers (useful only when <code>fsdp</code> field is passed).
If <code>&quot;True&quot;</code>, FSDP explicitly synchronizes the CPU thread to prevent too many in-flight
all-gathers.</p>
</li>
<li>
<p>use_orig_params (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>)
If <code>&quot;True&quot;</code>, allows non-uniform <code>requires_grad</code> during init, which means support for interspersed
frozen and trainable paramteres. Useful in cases such as parameter-efficient fine-tuning. Please
refer this
[blog](<a href="https://dev-discuss.pytorch.org/t/rethinking-pytorch-fully-sharded-data-parallel-fsdp-from-first-principles/1019" rel="nofollow">https://dev-discuss.pytorch.org/t/rethinking-pytorch-fully-sharded-data-parallel-fsdp-from-first-principles/1019</a></p>
</li>
<li>
<p>sync_module_states (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>)
If <code>&quot;True&quot;</code>, each individually wrapped FSDP unit will broadcast module parameters from rank 0 to
ensure they are the same across all ranks after initialization</p>
</li>
<li>
<p>xla (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
Whether to use PyTorch/XLA Fully Sharded Data Parallel Training. This is an experimental feature
and its API may evolve in the future.</p>
</li>
<li>
<p>xla_fsdp_settings (<code>dict</code>, <em>optional</em>)
The value is a dictionary which stores the XLA FSDP wrapping parameters.</p>
<p>For a complete list of options, please see <a href="https://github.com/pytorch/xla/blob/master/torch_xla/distributed/fsdp/xla_fully_sharded_data_parallel.py" rel="nofollow">here</a>.</p>
</li>
<li>
<p>xla_fsdp_grad_ckpt (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
Will use gradient checkpointing over each nested XLA FSDP wrapped layer. This setting can only be
used when the xla flag is set to true, and an auto wrapping policy is specified through
fsdp_min_num_params or fsdp_transformer_layer_cls_to_wrap.</p>
</li>
<li>
<p>activation_checkpointing (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
If True, activation checkpointing is a technique to reduce memory usage by clearing activations of
certain layers and recomputing them during a backward pass. Effectively, this trades extra
computation time for reduced memory usage.</p>
</li>
</ul>`,name:"fsdp_config"},{anchor:"transformers.Seq2SeqTrainingArguments.deepspeed",description:`<strong>deepspeed</strong> (<code>str</code> or <code>dict</code>, <em>optional</em>) &#x2014;
Use <a href="https://github.com/microsoft/deepspeed" rel="nofollow">Deepspeed</a>. This is an experimental feature and its API may
evolve in the future. The value is either the location of DeepSpeed json config file (e.g.,
<code>ds_config.json</code>) or an already loaded json file as a <code>dict</code>&#x201D;`,name:"deepspeed"},{anchor:"transformers.Seq2SeqTrainingArguments.label_smoothing_factor",description:`<strong>label_smoothing_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The label smoothing factor to use. Zero means no label smoothing, otherwise the underlying onehot-encoded
labels are changed from 0s and 1s to <code>label_smoothing_factor/num_labels</code> and <code>1 - label_smoothing_factor + label_smoothing_factor/num_labels</code> respectively.`,name:"label_smoothing_factor"},{anchor:"transformers.Seq2SeqTrainingArguments.debug",description:`<strong>debug</strong> (<code>str</code> or list of <code>DebugOption</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
Enable one or more debug features. This is an experimental feature.</p>
<p>Possible options are:</p>
<ul>
<li><code>&quot;underflow_overflow&quot;</code>: detects overflow in model&#x2019;s input/outputs and reports the last frames that led to
the event</li>
<li><code>&quot;tpu_metrics_debug&quot;</code>: print debug metrics on TPU</li>
</ul>
<p>The options should be separated by whitespaces.`,name:"debug"},{anchor:"transformers.Seq2SeqTrainingArguments.optim",description:`<strong>optim</strong> (<code>str</code> or <code>training_args.OptimizerNames</code>, <em>optional</em>, defaults to <code>&quot;adamw_torch&quot;</code>) &#x2014;
The optimizer to use: adamw_hf, adamw_torch, adamw_torch_fused, adamw_apex_fused, adamw_anyprecision or
adafactor.`,name:"optim"},{anchor:"transformers.Seq2SeqTrainingArguments.optim_args",description:`<strong>optim_args</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Optional arguments that are supplied to AnyPrecisionAdamW.`,name:"optim_args"},{anchor:"transformers.Seq2SeqTrainingArguments.group_by_length",description:`<strong>group_by_length</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to group together samples of roughly the same length in the training dataset (to minimize
padding applied and be more efficient). Only useful if applying dynamic padding.`,name:"group_by_length"},{anchor:"transformers.Seq2SeqTrainingArguments.length_column_name",description:`<strong>length_column_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;length&quot;</code>) &#x2014;
Column name for precomputed lengths. If the column exists, grouping by length will use these values rather
than computing them on train startup. Ignored unless <code>group_by_length</code> is <code>True</code> and the dataset is an
instance of <code>Dataset</code>.`,name:"length_column_name"},{anchor:"transformers.Seq2SeqTrainingArguments.report_to",description:`<strong>report_to</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>, defaults to <code>&quot;all&quot;</code>) &#x2014;
The list of integrations to report the results and logs to. Supported platforms are <code>&quot;azure_ml&quot;</code>,
<code>&quot;clearml&quot;</code>, <code>&quot;codecarbon&quot;</code>, <code>&quot;comet_ml&quot;</code>, <code>&quot;dagshub&quot;</code>, <code>&quot;flyte&quot;</code>, <code>&quot;mlflow&quot;</code>, <code>&quot;neptune&quot;</code>,
<code>&quot;tensorboard&quot;</code>, and <code>&quot;wandb&quot;</code>. Use <code>&quot;all&quot;</code> to report to all integrations installed, <code>&quot;none&quot;</code> for no
integrations.`,name:"report_to"},{anchor:"transformers.Seq2SeqTrainingArguments.ddp_find_unused_parameters",description:`<strong>ddp_find_unused_parameters</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
When using distributed training, the value of the flag <code>find_unused_parameters</code> passed to
<code>DistributedDataParallel</code>. Will default to <code>False</code> if gradient checkpointing is used, <code>True</code> otherwise.`,name:"ddp_find_unused_parameters"},{anchor:"transformers.Seq2SeqTrainingArguments.ddp_bucket_cap_mb",description:`<strong>ddp_bucket_cap_mb</strong> (<code>int</code>, <em>optional</em>) &#x2014;
When using distributed training, the value of the flag <code>bucket_cap_mb</code> passed to <code>DistributedDataParallel</code>.`,name:"ddp_bucket_cap_mb"},{anchor:"transformers.Seq2SeqTrainingArguments.ddp_broadcast_buffers",description:`<strong>ddp_broadcast_buffers</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
When using distributed training, the value of the flag <code>broadcast_buffers</code> passed to
<code>DistributedDataParallel</code>. Will default to <code>False</code> if gradient checkpointing is used, <code>True</code> otherwise.`,name:"ddp_broadcast_buffers"},{anchor:"transformers.Seq2SeqTrainingArguments.dataloader_pin_memory",description:`<strong>dataloader_pin_memory</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether you want to pin memory in data loaders or not. Will default to <code>True</code>.`,name:"dataloader_pin_memory"},{anchor:"transformers.Seq2SeqTrainingArguments.skip_memory_metrics",description:`<strong>skip_memory_metrics</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to skip adding of memory profiler reports to metrics. This is skipped by default because it slows
down the training and evaluation speed.`,name:"skip_memory_metrics"},{anchor:"transformers.Seq2SeqTrainingArguments.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push the model to the Hub every time the model is saved. If this is activated,
<code>output_dir</code> will begin a git directory synced with the repo (determined by <code>hub_model_id</code>) and the content
will be pushed each time a save is triggered (depending on your <code>save_strategy</code>). Calling
<a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.save_model">save_model()</a> will also trigger a push.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>If <code>output_dir</code> exists, it needs to be a local clone of the repository to which the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> will be
pushed.</p>

					</div>`,name:"push_to_hub"},{anchor:"transformers.Seq2SeqTrainingArguments.resume_from_checkpoint",description:`<strong>resume_from_checkpoint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The path to a folder with a valid checkpoint for your model. This argument is not directly used by
<a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, it&#x2019;s intended to be used by your training/evaluation scripts instead. See the <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">example
scripts</a> for more details.`,name:"resume_from_checkpoint"},{anchor:"transformers.Seq2SeqTrainingArguments.hub_model_id",description:`<strong>hub_model_id</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the repository to keep in sync with the local <em>output_dir</em>. It can be a simple model ID in
which case the model will be pushed in your namespace. Otherwise it should be the whole repository name,
for instance <code>&quot;user_name/model&quot;</code>, which allows you to push to an organization you are a member of with
<code>&quot;organization_name/model&quot;</code>. Will default to <code>user_name/output_dir_name</code> with <em>output_dir_name</em> being the
name of <code>output_dir</code>.</p>
<p>Will default to the name of <code>output_dir</code>.`,name:"hub_model_id"},{anchor:"transformers.Seq2SeqTrainingArguments.hub_strategy",description:`<strong>hub_strategy</strong> (<code>str</code> or <code>HubStrategy</code>, <em>optional</em>, defaults to <code>&quot;every_save&quot;</code>) &#x2014;
Defines the scope of what is pushed to the Hub and when. Possible values are:</p>
<ul>
<li><code>&quot;end&quot;</code>: push the model, its configuration, the tokenizer (if passed along to the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>) and a
draft of a model card when the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.save_model">save_model()</a> method is called.</li>
<li><code>&quot;every_save&quot;</code>: push the model, its configuration, the tokenizer (if passed along to the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>) and
a draft of a model card each time there is a model save. The pushes are asynchronous to not block
training, and in case the save are very frequent, a new push is only attempted if the previous one is
finished. A last push is made with the final model at the end of training.</li>
<li><code>&quot;checkpoint&quot;</code>: like <code>&quot;every_save&quot;</code> but the latest checkpoint is also pushed in a subfolder named
last-checkpoint, allowing you to resume training easily with
<code>trainer.train(resume_from_checkpoint=&quot;last-checkpoint&quot;)</code>.</li>
<li><code>&quot;all_checkpoints&quot;</code>: like <code>&quot;checkpoint&quot;</code> but all checkpoints are pushed like they appear in the output
folder (so you will get one checkpoint folder per folder in your final repository)</li>
</ul>`,name:"hub_strategy"},{anchor:"transformers.Seq2SeqTrainingArguments.hub_token",description:`<strong>hub_token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use to push the model to the Hub. Will default to the token in the cache folder obtained with
<code>huggingface-cli login</code>.`,name:"hub_token"},{anchor:"transformers.Seq2SeqTrainingArguments.hub_private_repo",description:`<strong>hub_private_repo</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If True, the Hub repo will be set to private.`,name:"hub_private_repo"},{anchor:"transformers.Seq2SeqTrainingArguments.hub_always_push",description:`<strong>hub_always_push</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Unless this is <code>True</code>, the <code>Trainer</code> will skip pushing a checkpoint when the previous push is not finished.`,name:"hub_always_push"},{anchor:"transformers.Seq2SeqTrainingArguments.gradient_checkpointing",description:`<strong>gradient_checkpointing</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If True, use gradient checkpointing to save memory at the expense of slower backward pass.`,name:"gradient_checkpointing"},{anchor:"transformers.Seq2SeqTrainingArguments.gradient_checkpointing_args",description:`<strong>gradient_checkpointing_args</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Key word arguments to be passed to the <code>gradient_checkpointing_enable</code> method.`,name:"gradient_checkpointing_args"},{anchor:"transformers.Seq2SeqTrainingArguments.include_inputs_for_metrics",description:`<strong>include_inputs_for_metrics</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the inputs will be passed to the <code>compute_metrics</code> function. This is intended for metrics
that need inputs, predictions and references for scoring calculation in Metric class.`,name:"include_inputs_for_metrics"},{anchor:"transformers.Seq2SeqTrainingArguments.auto_find_batch_size",description:`<strong>auto_find_batch_size</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to find a batch size that will fit into memory automatically through exponential decay, avoiding
CUDA Out-of-Memory errors. Requires accelerate to be installed (<code>pip install accelerate</code>)`,name:"auto_find_batch_size"},{anchor:"transformers.Seq2SeqTrainingArguments.full_determinism",description:`<strong>full_determinism</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.enable_full_determinism">enable_full_determinism()</a> is called instead of <a href="/docs/transformers/main/en/internal/trainer_utils#transformers.set_seed">set_seed()</a> to ensure reproducible results in
distributed training. Important: this will negatively impact the performance, so only use it for debugging.`,name:"full_determinism"},{anchor:"transformers.Seq2SeqTrainingArguments.torchdynamo",description:`<strong>torchdynamo</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If set, the backend compiler for TorchDynamo. Possible choices are <code>&quot;eager&quot;</code>, <code>&quot;aot_eager&quot;</code>, <code>&quot;inductor&quot;</code>,
<code>&quot;nvfuser&quot;</code>, <code>&quot;aot_nvfuser&quot;</code>, <code>&quot;aot_cudagraphs&quot;</code>, <code>&quot;ofi&quot;</code>, <code>&quot;fx2trt&quot;</code>, <code>&quot;onnxrt&quot;</code> and <code>&quot;ipex&quot;</code>.`,name:"torchdynamo"},{anchor:"transformers.Seq2SeqTrainingArguments.ray_scope",description:`<strong>ray_scope</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;last&quot;</code>) &#x2014;
The scope to use when doing hyperparameter search with Ray. By default, <code>&quot;last&quot;</code> will be used. Ray will
then use the last checkpoint of all trials, compare those, and select the best one. However, other options
are also available. See the <a href="https://docs.ray.io/en/latest/tune/api_docs/analysis.html#ray.tune.ExperimentAnalysis.get_best_trial" rel="nofollow">Ray documentation</a> for
more options.`,name:"ray_scope"},{anchor:"transformers.Seq2SeqTrainingArguments.ddp_timeout",description:`<strong>ddp_timeout</strong> (<code>int</code>, <em>optional</em>, defaults to 1800) &#x2014;
The timeout for <code>torch.distributed.init_process_group</code> calls, used to avoid GPU socket timeouts when
performing slow operations in distributed runnings. Please refer the [PyTorch documentation]
(<a href="https://pytorch.org/docs/stable/distributed.html#torch.distributed.init_process_group" rel="nofollow">https://pytorch.org/docs/stable/distributed.html#torch.distributed.init_process_group</a>) for more
information.`,name:"ddp_timeout"},{anchor:"transformers.Seq2SeqTrainingArguments.use_mps_device",description:`<strong>use_mps_device</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This argument is deprecated.<code>mps</code> device will be used if it is available similar to <code>cuda</code> device.`,name:"use_mps_device"},{anchor:"transformers.Seq2SeqTrainingArguments.torch_compile",description:`<strong>torch_compile</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to compile the model using PyTorch 2.0
<a href="https://pytorch.org/get-started/pytorch-2.0/" rel="nofollow"><code>torch.compile</code></a>.</p>
<p>This will use the best defaults for the <a href="https://pytorch.org/docs/stable/generated/torch.compile.html?highlight=torch+compile#torch.compile" rel="nofollow"><code>torch.compile</code>
API</a>.
You can customize the defaults with the argument <code>torch_compile_backend</code> and <code>torch_compile_mode</code> but we
don&#x2019;t guarantee any of them will work as the support is progressively rolled in in PyTorch.</p>
<p>This flag and the whole compile API is experimental and subject to change in future releases.`,name:"torch_compile"},{anchor:"transformers.Seq2SeqTrainingArguments.torch_compile_backend",description:`<strong>torch_compile_backend</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The backend to use in <code>torch.compile</code>. If set to any value, <code>torch_compile</code> will be set to <code>True</code>.</p>
<p>Refer to the PyTorch doc for possible values and note that they may change across PyTorch versions.</p>
<p>This flag is experimental and subject to change in future releases.`,name:"torch_compile_backend"},{anchor:"transformers.Seq2SeqTrainingArguments.torch_compile_mode",description:`<strong>torch_compile_mode</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The mode to use in <code>torch.compile</code>. If set to any value, <code>torch_compile</code> will be set to <code>True</code>.</p>
<p>Refer to the PyTorch doc for possible values and note that they may change across PyTorch versions.</p>
<p>This flag is experimental and subject to change in future releases.`,name:"torch_compile_mode"},{anchor:"transformers.Seq2SeqTrainingArguments.split_batches",description:`<strong>split_batches</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the accelerator should split the batches yielded by the dataloaders across the devices
during distributed training. If</p>
<p>set to <code>True</code>, the actual batch size used will be the same on any kind of distributed processes, but it
must be a</p>
<p>round multiple of the number of processes you are using (such as GPUs).`,name:"split_batches"},{anchor:"transformers.Seq2SeqTrainingArguments.include_tokens_per_second",description:`<strong>include_tokens_per_second</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to compute the number of tokens per second per device for training speed metrics.</p>
<p>This will iterate over the entire training dataloader once beforehand,</p>
<p>and will slow down the entire process.`,name:"include_tokens_per_second"},{anchor:"transformers.Seq2SeqTrainingArguments.neftune_noise_alpha",description:`<strong>neftune_noise_alpha</strong> (<code>Optional[float]</code>) &#x2014;
If not <code>None</code>, this will activate NEFTune noise embeddings. This can drastically improve model performance
for instruction fine-tuning. Check out the <a href="https://arxiv.org/abs/2310.05914" rel="nofollow">original paper</a> and the
<a href="https://github.com/neelsjain/NEFTune" rel="nofollow">original code</a>. Support transformers <code>PreTrainedModel</code> and also
<code>PeftModel</code> from peft.`,name:"neftune_noise_alpha"},{anchor:"transformers.Seq2SeqTrainingArguments.sortish_sampler",description:`<strong>sortish_sampler</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a <em>sortish sampler</em> or not. Only possible if the underlying datasets are <em>Seq2SeqDataset</em>
for now but will become generally available in the near future.</p>
<p>It sorts the inputs according to lengths in order to minimize the padding size, with a bit of randomness
for the training set.`,name:"sortish_sampler"},{anchor:"transformers.Seq2SeqTrainingArguments.predict_with_generate",description:`<strong>predict_with_generate</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use generate to calculate generative metrics (ROUGE, BLEU).`,name:"predict_with_generate"},{anchor:"transformers.Seq2SeqTrainingArguments.generation_max_length",description:`<strong>generation_max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The <code>max_length</code> to use on each evaluation loop when <code>predict_with_generate=True</code>. Will default to the
<code>max_length</code> value of the model configuration.`,name:"generation_max_length"},{anchor:"transformers.Seq2SeqTrainingArguments.generation_num_beams",description:`<strong>generation_num_beams</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The <code>num_beams</code> to use on each evaluation loop when <code>predict_with_generate=True</code>. Will default to the
<code>num_beams</code> value of the model configuration.`,name:"generation_num_beams"},{anchor:"transformers.Seq2SeqTrainingArguments.generation_config",description:`<strong>generation_config</strong> (<code>str</code> or <code>Path</code> or <a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationConfig">GenerationConfig</a>, <em>optional</em>) &#x2014;
Allows to load a <a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationConfig">GenerationConfig</a> from the <code>from_pretrained</code> method. This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained model configuration hosted inside a model repo on
huggingface.co. Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or namespaced
under a user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>a path to a <em>directory</em> containing a configuration file saved using the
<a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationConfig.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a <a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationConfig">GenerationConfig</a> object.</li>
</ul>`,name:"generation_config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args_seq2seq.py#L30"}}),Xn=new k({props:{name:"to_dict",anchor:"transformers.Seq2SeqTrainingArguments.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/training_args_seq2seq.py#L87"}}),Gn=new L({props:{title:"Checkpoints",local:"checkpoints",headingTag:"h2"}}),to=new L({props:{title:"Logging",local:"logging",headingTag:"h2"}}),lo=new C({props:{code:"JTVCLi4uJTVEJTBBbG9nZ2VyJTIwJTNEJTIwbG9nZ2luZy5nZXRMb2dnZXIoX19uYW1lX18pJTBBJTBBJTIzJTIwU2V0dXAlMjBsb2dnaW5nJTBBbG9nZ2luZy5iYXNpY0NvbmZpZyglMEElMjAlMjAlMjAlMjBmb3JtYXQlM0QlMjIlMjUoYXNjdGltZSlzJTIwLSUyMCUyNShsZXZlbG5hbWUpcyUyMC0lMjAlMjUobmFtZSlzJTIwLSUyMCUyNShtZXNzYWdlKXMlMjIlMkMlMEElMjAlMjAlMjAlMjBkYXRlZm10JTNEJTIyJTI1bSUyRiUyNWQlMkYlMjVZJTIwJTI1SCUzQSUyNU0lM0ElMjVTJTIyJTJDJTBBJTIwJTIwJTIwJTIwaGFuZGxlcnMlM0QlNUJsb2dnaW5nLlN0cmVhbUhhbmRsZXIoc3lzLnN0ZG91dCklNUQlMkMlMEEpJTBBJTBBJTIzJTIwc2V0JTIwdGhlJTIwbWFpbiUyMGNvZGUlMjBhbmQlMjB0aGUlMjBtb2R1bGVzJTIwaXQlMjB1c2VzJTIwdG8lMjB0aGUlMjBzYW1lJTIwbG9nLWxldmVsJTIwYWNjb3JkaW5nJTIwdG8lMjB0aGUlMjBub2RlJTBBbG9nX2xldmVsJTIwJTNEJTIwdHJhaW5pbmdfYXJncy5nZXRfcHJvY2Vzc19sb2dfbGV2ZWwoKSUwQWxvZ2dlci5zZXRMZXZlbChsb2dfbGV2ZWwpJTBBZGF0YXNldHMudXRpbHMubG9nZ2luZy5zZXRfdmVyYm9zaXR5KGxvZ19sZXZlbCklMEF0cmFuc2Zvcm1lcnMudXRpbHMubG9nZ2luZy5zZXRfdmVyYm9zaXR5KGxvZ19sZXZlbCklMEElMEF0cmFpbmVyJTIwJTNEJTIwVHJhaW5lciguLi4p",highlighted:`[...]
logger = logging.getLogger(__name__)

<span class="hljs-comment"># Setup logging</span>
logging.basicConfig(
    <span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;%(asctime)s - %(levelname)s - %(name)s - %(message)s&quot;</span>,
    datefmt=<span class="hljs-string">&quot;%m/%d/%Y %H:%M:%S&quot;</span>,
    handlers=[logging.StreamHandler(sys.stdout)],
)

<span class="hljs-comment"># set the main code and the modules it uses to the same log-level according to the node</span>
log_level = training_args.get_process_log_level()
logger.setLevel(log_level)
datasets.utils.logging.set_verbosity(log_level)
transformers.utils.logging.set_verbosity(log_level)

trainer = Trainer(...)`,wrap:!1}}),mo=new C({props:{code:"bXlfYXBwLnB5JTIwLi4uJTIwLS1sb2dfbGV2ZWwlMjB3YXJuaW5nJTIwLS1sb2dfbGV2ZWxfcmVwbGljYSUyMGVycm9y",highlighted:"my_app.py ... --log_level warning --log_level_replica error",wrap:!1}}),uo=new C({props:{code:"bXlfYXBwLnB5JTIwLi4uJTIwLS1sb2dfbGV2ZWwlMjB3YXJuaW5nJTIwLS1sb2dfbGV2ZWxfcmVwbGljYSUyMGVycm9yJTIwLS1sb2dfb25fZWFjaF9ub2RlJTIwMA==",highlighted:"my_app.py ... --log_level warning --log_level_replica error --log_on_each_node 0",wrap:!1}}),fo=new C({props:{code:"bXlfYXBwLnB5JTIwLi4uJTIwLS1sb2dfbGV2ZWwlMjBlcnJvciUyMC0tbG9nX2xldmVsX3JlcGxpY2ElMjBlcnJvciUyMC0tbG9nX29uX2VhY2hfbm9kZSUyMDA=",highlighted:"my_app.py ... --log_level error --log_level_replica error --log_on_each_node 0",wrap:!1}}),bo=new L({props:{title:"Randomness",local:"randomness",headingTag:"h2"}}),To=new L({props:{title:"Specific GPUs Selection",local:"specific-gpus-selection",headingTag:"h2"}}),Mo=new C({props:{code:"cHl0aG9uJTIwLW0lMjB0b3JjaC5kaXN0cmlidXRlZC5sYXVuY2glMjAtLW5wcm9jX3Blcl9ub2RlJTNEMiUyMCUyMHRyYWluZXItcHJvZ3JhbS5weSUyMC4uLg==",highlighted:"python -m torch.distributed.launch --nproc_per_node=2  trainer-program.py ...",wrap:!1}}),ko=new C({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMC0tbnVtX3Byb2Nlc3NlcyUyMDIlMjB0cmFpbmVyLXByb2dyYW0ucHklMjAuLi4=",highlighted:"accelerate launch --num_processes 2 trainer-program.py ...",wrap:!1}}),Ao=new C({props:{code:"ZGVlcHNwZWVkJTIwLS1udW1fZ3B1cyUyMDIlMjB0cmFpbmVyLXByb2dyYW0ucHklMjAuLi4=",highlighted:"deepspeed --num_gpus 2 trainer-program.py ...",wrap:!1}}),So=new C({props:{code:"Q1VEQV9WSVNJQkxFX0RFVklDRVMlM0QwJTJDMiUyMHB5dGhvbiUyMC1tJTIwdG9yY2guZGlzdHJpYnV0ZWQubGF1bmNoJTIwdHJhaW5lci1wcm9ncmFtLnB5JTIwLi4u",highlighted:"CUDA_VISIBLE_DEVICES=0,2 python -m torch.distributed.launch trainer-program.py ...",wrap:!1}}),Fo=new C({props:{code:"Q1VEQV9WSVNJQkxFX0RFVklDRVMlM0QyJTJDMCUyMHB5dGhvbiUyMC1tJTIwdG9yY2guZGlzdHJpYnV0ZWQubGF1bmNoJTIwdHJhaW5lci1wcm9ncmFtLnB5JTIwLi4u",highlighted:"CUDA_VISIBLE_DEVICES=2,0 python -m torch.distributed.launch trainer-program.py ...",wrap:!1}}),Wo=new C({props:{code:"Q1VEQV9WSVNJQkxFX0RFVklDRVMlM0QyJTJDMCUyMHB5dGhvbiUyMHRyYWluZXItcHJvZ3JhbS5weSUyMC4uLg==",highlighted:"CUDA_VISIBLE_DEVICES=2,0 python trainer-program.py ...",wrap:!1}}),Ho=new C({props:{code:"Q1VEQV9WSVNJQkxFX0RFVklDRVMlM0QlMjBweXRob24lMjB0cmFpbmVyLXByb2dyYW0ucHklMjAuLi4=",highlighted:"CUDA_VISIBLE_DEVICES= python trainer-program.py ...",wrap:!1}}),Bo=new C({props:{code:"ZXhwb3J0JTIwQ1VEQV9WSVNJQkxFX0RFVklDRVMlM0QwJTJDMiUwQXB5dGhvbiUyMC1tJTIwdG9yY2guZGlzdHJpYnV0ZWQubGF1bmNoJTIwdHJhaW5lci1wcm9ncmFtLnB5JTIwLi4u",highlighted:`<span class="hljs-built_in">export</span> CUDA_VISIBLE_DEVICES=0,2
python -m torch.distributed.launch trainer-program.py ...`,wrap:!1}}),Go=new C({props:{code:"ZXhwb3J0JTIwQ1VEQV9ERVZJQ0VfT1JERVIlM0RQQ0lfQlVTX0lE",highlighted:'<span class="hljs-built_in">export</span> CUDA_DEVICE_ORDER=PCI_BUS_ID',wrap:!1}}),Yo=new C({props:{code:"ZXhwb3J0JTIwQ1VEQV9ERVZJQ0VfT1JERVIlM0RGQVNURVNUX0ZJUlNU",highlighted:'<span class="hljs-built_in">export</span> CUDA_DEVICE_ORDER=FASTEST_FIRST',wrap:!1}}),Ko=new C({props:{code:"ZXhwb3J0JTIwQ1VEQV9WSVNJQkxFX0RFVklDRVMlM0QxJTJDMA==",highlighted:'<span class="hljs-built_in">export</span> CUDA_VISIBLE_DEVICES=1,0',wrap:!1}}),na=new L({props:{title:"Trainer Integrations",local:"trainer-integrations",headingTag:"h2"}}),sa=new L({props:{title:"CUDA Extension Installation Notes",local:"cuda-extension-installation-notes",headingTag:"h3"}}),ca=new C({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRlZXBzcGVlZA==",highlighted:"pip install deepspeed",wrap:!1}}),ua=new L({props:{title:"Possible problem #1",local:"possible-problem-1",headingTag:"h4"}}),_a=new C({props:{code:"d2hpY2glMjBudmNj",highlighted:'<span class="hljs-built_in">which</span> nvcc',wrap:!1}}),ya=new L({props:{title:"Possible problem #2",local:"possible-problem-2",headingTag:"h4"}}),Ta=new C({props:{code:"JTJGdXNyJTJGbG9jYWwlMkZjdWRhLTEwLjIlMEElMkZ1c3IlMkZsb2NhbCUyRmN1ZGEtMTEuMA==",highlighted:`/usr/local/cuda-10.2
/usr/local/cuda-11.0`,wrap:!1}}),Ma=new C({props:{code:"ZWNobyUyMCUyNFBBVEglMEFlY2hvJTIwJTI0TERfTElCUkFSWV9QQVRI",highlighted:`<span class="hljs-built_in">echo</span> <span class="hljs-variable">$PATH</span>
<span class="hljs-built_in">echo</span> <span class="hljs-variable">$LD_LIBRARY_PATH</span>`,wrap:!1}}),ja=new C({props:{code:"ZXhwb3J0JTIwUEFUSCUzRCUyRnVzciUyRmxvY2FsJTJGY3VkYS0xMC4yJTJGYmluJTNBJTI0UEFUSCUwQWV4cG9ydCUyMExEX0xJQlJBUllfUEFUSCUzRCUyRnVzciUyRmxvY2FsJTJGY3VkYS0xMC4yJTJGbGliNjQlM0ElMjRMRF9MSUJSQVJZX1BBVEg=",highlighted:`<span class="hljs-built_in">export</span> PATH=/usr/local/cuda-10.2/bin:<span class="hljs-variable">$PATH</span>
<span class="hljs-built_in">export</span> LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:<span class="hljs-variable">$LD_LIBRARY_PATH</span>`,wrap:!1}}),Ja=new L({props:{title:"Possible problem #3",local:"possible-problem-3",headingTag:"h4"}}),Fa=new C({props:{code:"c3VkbyUyMGxuJTIwLXMlMjAlMkZ1c3IlMkZiaW4lMkZnY2MtNyUyMCUyMCUyRnVzciUyRmxvY2FsJTJGY3VkYS0xMC4yJTJGYmluJTJGZ2NjJTBBc3VkbyUyMGxuJTIwLXMlMjAlMkZ1c3IlMkZiaW4lMkZnJTJCJTJCLTclMjAlMjAlMkZ1c3IlMkZsb2NhbCUyRmN1ZGEtMTAuMiUyRmJpbiUyRmclMkIlMkI=",highlighted:`sudo <span class="hljs-built_in">ln</span> -s /usr/bin/gcc-7  /usr/local/cuda-10.2/bin/gcc
sudo <span class="hljs-built_in">ln</span> -s /usr/bin/g++-7  /usr/local/cuda-10.2/bin/g++`,wrap:!1}}),Wa=new L({props:{title:"PyTorch Fully Sharded Data parallel",local:"pytorch-fully-sharded-data-parallel",headingTag:"h3"}}),Za=new L({props:{title:"PyTorch/XLA Fully Sharded Data parallel",local:"pytorchxla-fully-sharded-data-parallel",headingTag:"h3"}}),Ka=new L({props:{title:"Using Trainer for accelerated PyTorch Training on Mac",local:"using-trainer-for-accelerated-pytorch-training-on-mac",headingTag:"h3"}}),xt=new $e({props:{warning:!1,$$slots:{default:[fy]},$$scope:{ctx:q}}}),rr=new C({props:{code:"ZXhwb3J0JTIwVEFTS19OQU1FJTNEbXJwYyUwQSUwQXB5dGhvbiUyMGV4YW1wbGVzJTJGcHl0b3JjaCUyRnRleHQtY2xhc3NpZmljYXRpb24lMkZydW5fZ2x1ZS5weSUyMCU1QyUwQSUyMCUyMC0tbW9kZWxfbmFtZV9vcl9wYXRoJTIwYmVydC1iYXNlLWNhc2VkJTIwJTVDJTBBJTIwJTIwLS10YXNrX25hbWUlMjAlMjRUQVNLX05BTUUlMjAlNUMlMEElMjAlMjAtLWRvX3RyYWluJTIwJTVDJTBBJTIwJTIwLS1kb19ldmFsJTIwJTVDJTBBJTIwJTIwLS1tYXhfc2VxX2xlbmd0aCUyMDEyOCUyMCU1QyUwQSUyMCUyMC0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTIwMzIlMjAlNUMlMEElMjAlMjAtLWxlYXJuaW5nX3JhdGUlMjAyZS01JTIwJTVDJTBBJTIwJTIwLS1udW1fdHJhaW5fZXBvY2hzJTIwMyUyMCU1QyUwQSUyMCUyMC0tb3V0cHV0X2RpciUyMCUyRnRtcCUyRiUyNFRBU0tfTkFNRSUyRiUyMCU1QyUwQSUyMCUyMC0tb3ZlcndyaXRlX291dHB1dF9kaXI=",highlighted:`<span class="hljs-built_in">export</span> TASK_NAME=mrpc

python examples/pytorch/text-classification/run_glue.py \\
  --model_name_or_path bert-base-cased \\
  --task_name <span class="hljs-variable">$TASK_NAME</span> \\
  --do_train \\
  --do_eval \\
  --max_seq_length 128 \\
  --per_device_train_batch_size 32 \\
  --learning_rate 2e-5 \\
  --num_train_epochs 3 \\
  --output_dir /tmp/<span class="hljs-variable">$TASK_NAME</span>/ \\
  --overwrite_output_dir`,wrap:!1}}),dr=new L({props:{title:"Using Accelerate Launcher with Trainer",local:"using-accelerate-launcher-with-trainer",headingTag:"h2"}}),ur=new C({props:{code:"Y29tcHV0ZV9lbnZpcm9ubWVudCUzQSUyMExPQ0FMX01BQ0hJTkUlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMEFkaXN0cmlidXRlZF90eXBlJTNBJTIwTVVMVElfR1BVJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTBBZG93bmNhc3RfYmYxNiUzQSUyMCdubyclMEFncHVfaWRzJTNBJTIwYWxsJTBBbWFjaGluZV9yYW5rJTNBJTIwMCUyMCUyM2NoYW5nZSUyMHJhbmslMjBhcyUyMHBlciUyMHRoZSUyMG5vZGUlMEFtYWluX3Byb2Nlc3NfaXAlM0ElMjAxOTIuMTY4LjIwLjElMEFtYWluX3Byb2Nlc3NfcG9ydCUzQSUyMDk4OTglMEFtYWluX3RyYWluaW5nX2Z1bmN0aW9uJTNBJTIwbWFpbiUwQW1peGVkX3ByZWNpc2lvbiUzQSUyMGZwMTYlMEFudW1fbWFjaGluZXMlM0ElMjAyJTBBbnVtX3Byb2Nlc3NlcyUzQSUyMDglMEFyZHp2X2JhY2tlbmQlM0ElMjBzdGF0aWMlMEFzYW1lX25ldHdvcmslM0ElMjB0cnVlJTBBdHB1X2VudiUzQSUyMCU1QiU1RCUwQXRwdV91c2VfY2x1c3RlciUzQSUyMGZhbHNlJTBBdHB1X3VzZV9zdWRvJTNBJTIwZmFsc2UlMEF1c2VfY3B1JTNBJTIwZmFsc2U=",highlighted:`<span class="hljs-attr">compute_environment:</span> <span class="hljs-string">LOCAL_MACHINE</span>                                                                                             
<span class="hljs-attr">distributed_type:</span> <span class="hljs-string">MULTI_GPU</span>                                                                                                    
<span class="hljs-attr">downcast_bf16:</span> <span class="hljs-string">&#x27;no&#x27;</span>
<span class="hljs-attr">gpu_ids:</span> <span class="hljs-string">all</span>
<span class="hljs-attr">machine_rank:</span> <span class="hljs-number">0</span> <span class="hljs-comment">#change rank as per the node</span>
<span class="hljs-attr">main_process_ip:</span> <span class="hljs-number">192.168</span><span class="hljs-number">.20</span><span class="hljs-number">.1</span>
<span class="hljs-attr">main_process_port:</span> <span class="hljs-number">9898</span>
<span class="hljs-attr">main_training_function:</span> <span class="hljs-string">main</span>
<span class="hljs-attr">mixed_precision:</span> <span class="hljs-string">fp16</span>
<span class="hljs-attr">num_machines:</span> <span class="hljs-number">2</span>
<span class="hljs-attr">num_processes:</span> <span class="hljs-number">8</span>
<span class="hljs-attr">rdzv_backend:</span> <span class="hljs-string">static</span>
<span class="hljs-attr">same_network:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">tpu_env:</span> []
<span class="hljs-attr">tpu_use_cluster:</span> <span class="hljs-literal">false</span>
<span class="hljs-attr">tpu_use_sudo:</span> <span class="hljs-literal">false</span>
<span class="hljs-attr">use_cpu:</span> <span class="hljs-literal">false</span>`,wrap:!1}}),hr=new C({props:{code:"Y29tcHV0ZV9lbnZpcm9ubWVudCUzQSUyMExPQ0FMX01BQ0hJTkUlMEFkaXN0cmlidXRlZF90eXBlJTNBJTIwRlNEUCUwQWRvd25jYXN0X2JmMTYlM0ElMjAnbm8nJTBBZnNkcF9jb25maWclM0ElMEElMjAlMjBmc2RwX2F1dG9fd3JhcF9wb2xpY3klM0ElMjBUUkFOU0ZPUk1FUl9CQVNFRF9XUkFQJTBBJTIwJTIwZnNkcF9iYWNrd2FyZF9wcmVmZXRjaF9wb2xpY3klM0ElMjBCQUNLV0FSRF9QUkUlMEElMjAlMjBmc2RwX2ZvcndhcmRfcHJlZmV0Y2glM0ElMjB0cnVlJTBBJTIwJTIwZnNkcF9vZmZsb2FkX3BhcmFtcyUzQSUyMGZhbHNlJTBBJTIwJTIwZnNkcF9zaGFyZGluZ19zdHJhdGVneSUzQSUyMDElMEElMjAlMjBmc2RwX3N0YXRlX2RpY3RfdHlwZSUzQSUyMEZVTExfU1RBVEVfRElDVCUwQSUyMCUyMGZzZHBfc3luY19tb2R1bGVfc3RhdGVzJTNBJTIwdHJ1ZSUwQSUyMCUyMGZzZHBfdHJhbnNmb3JtZXJfbGF5ZXJfY2xzX3RvX3dyYXAlM0ElMjBCZXJ0TGF5ZXIlMEElMjAlMjBmc2RwX3VzZV9vcmlnX3BhcmFtcyUzQSUyMHRydWUlMEFtYWNoaW5lX3JhbmslM0ElMjAwJTBBbWFpbl90cmFpbmluZ19mdW5jdGlvbiUzQSUyMG1haW4lMEFtaXhlZF9wcmVjaXNpb24lM0ElMjBiZjE2JTBBbnVtX21hY2hpbmVzJTNBJTIwMSUwQW51bV9wcm9jZXNzZXMlM0ElMjAyJTBBcmR6dl9iYWNrZW5kJTNBJTIwc3RhdGljJTBBc2FtZV9uZXR3b3JrJTNBJTIwdHJ1ZSUwQXRwdV9lbnYlM0ElMjAlNUIlNUQlMEF0cHVfdXNlX2NsdXN0ZXIlM0ElMjBmYWxzZSUwQXRwdV91c2Vfc3VkbyUzQSUyMGZhbHNlJTBBdXNlX2NwdSUzQSUyMGZhbHNl",highlighted:`<span class="hljs-attr">compute_environment:</span> <span class="hljs-string">LOCAL_MACHINE</span>
<span class="hljs-attr">distributed_type:</span> <span class="hljs-string">FSDP</span>
<span class="hljs-attr">downcast_bf16:</span> <span class="hljs-string">&#x27;no&#x27;</span>
<span class="hljs-attr">fsdp_config:</span>
  <span class="hljs-attr">fsdp_auto_wrap_policy:</span> <span class="hljs-string">TRANSFORMER_BASED_WRAP</span>
  <span class="hljs-attr">fsdp_backward_prefetch_policy:</span> <span class="hljs-string">BACKWARD_PRE</span>
  <span class="hljs-attr">fsdp_forward_prefetch:</span> <span class="hljs-literal">true</span>
  <span class="hljs-attr">fsdp_offload_params:</span> <span class="hljs-literal">false</span>
  <span class="hljs-attr">fsdp_sharding_strategy:</span> <span class="hljs-number">1</span>
  <span class="hljs-attr">fsdp_state_dict_type:</span> <span class="hljs-string">FULL_STATE_DICT</span>
  <span class="hljs-attr">fsdp_sync_module_states:</span> <span class="hljs-literal">true</span>
  <span class="hljs-attr">fsdp_transformer_layer_cls_to_wrap:</span> <span class="hljs-string">BertLayer</span>
  <span class="hljs-attr">fsdp_use_orig_params:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">machine_rank:</span> <span class="hljs-number">0</span>
<span class="hljs-attr">main_training_function:</span> <span class="hljs-string">main</span>
<span class="hljs-attr">mixed_precision:</span> <span class="hljs-string">bf16</span>
<span class="hljs-attr">num_machines:</span> <span class="hljs-number">1</span>
<span class="hljs-attr">num_processes:</span> <span class="hljs-number">2</span>
<span class="hljs-attr">rdzv_backend:</span> <span class="hljs-string">static</span>
<span class="hljs-attr">same_network:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">tpu_env:</span> []
<span class="hljs-attr">tpu_use_cluster:</span> <span class="hljs-literal">false</span>
<span class="hljs-attr">tpu_use_sudo:</span> <span class="hljs-literal">false</span>
<span class="hljs-attr">use_cpu:</span> <span class="hljs-literal">false</span>`,wrap:!1}}),gr=new C({props:{code:"Y29tcHV0ZV9lbnZpcm9ubWVudCUzQSUyMExPQ0FMX01BQ0hJTkUlMEFkZWVwc3BlZWRfY29uZmlnJTNBJTBBJTIwJTIwZGVlcHNwZWVkX2NvbmZpZ19maWxlJTNBJTIwJTJGaG9tZSUyRnVzZXIlMkZjb25maWdzJTJGZHNfemVybzNfY29uZmlnLmpzb24lMEElMjAlMjB6ZXJvM19pbml0X2ZsYWclM0ElMjB0cnVlJTBBZGlzdHJpYnV0ZWRfdHlwZSUzQSUyMERFRVBTUEVFRCUwQWRvd25jYXN0X2JmMTYlM0ElMjAnbm8nJTBBbWFjaGluZV9yYW5rJTNBJTIwMCUwQW1haW5fdHJhaW5pbmdfZnVuY3Rpb24lM0ElMjBtYWluJTBBbnVtX21hY2hpbmVzJTNBJTIwMSUwQW51bV9wcm9jZXNzZXMlM0ElMjA0JTBBcmR6dl9iYWNrZW5kJTNBJTIwc3RhdGljJTBBc2FtZV9uZXR3b3JrJTNBJTIwdHJ1ZSUwQXRwdV9lbnYlM0ElMjAlNUIlNUQlMEF0cHVfdXNlX2NsdXN0ZXIlM0ElMjBmYWxzZSUwQXRwdV91c2Vfc3VkbyUzQSUyMGZhbHNlJTBBdXNlX2NwdSUzQSUyMGZhbHNl",highlighted:`<span class="hljs-attr">compute_environment:</span> <span class="hljs-string">LOCAL_MACHINE</span>
<span class="hljs-attr">deepspeed_config:</span>
  <span class="hljs-attr">deepspeed_config_file:</span> <span class="hljs-string">/home/user/configs/ds_zero3_config.json</span>
  <span class="hljs-attr">zero3_init_flag:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">distributed_type:</span> <span class="hljs-string">DEEPSPEED</span>
<span class="hljs-attr">downcast_bf16:</span> <span class="hljs-string">&#x27;no&#x27;</span>
<span class="hljs-attr">machine_rank:</span> <span class="hljs-number">0</span>
<span class="hljs-attr">main_training_function:</span> <span class="hljs-string">main</span>
<span class="hljs-attr">num_machines:</span> <span class="hljs-number">1</span>
<span class="hljs-attr">num_processes:</span> <span class="hljs-number">4</span>
<span class="hljs-attr">rdzv_backend:</span> <span class="hljs-string">static</span>
<span class="hljs-attr">same_network:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">tpu_env:</span> []
<span class="hljs-attr">tpu_use_cluster:</span> <span class="hljs-literal">false</span>
<span class="hljs-attr">tpu_use_sudo:</span> <span class="hljs-literal">false</span>
<span class="hljs-attr">use_cpu:</span> <span class="hljs-literal">false</span>`,wrap:!1}}),fr=new C({props:{code:"Y29tcHV0ZV9lbnZpcm9ubWVudCUzQSUyMExPQ0FMX01BQ0hJTkUlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMEFkZWVwc3BlZWRfY29uZmlnJTNBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTBBJTIwJTIwZ3JhZGllbnRfYWNjdW11bGF0aW9uX3N0ZXBzJTNBJTIwMSUwQSUyMCUyMGdyYWRpZW50X2NsaXBwaW5nJTNBJTIwMC43JTBBJTIwJTIwb2ZmbG9hZF9vcHRpbWl6ZXJfZGV2aWNlJTNBJTIwY3B1JTBBJTIwJTIwb2ZmbG9hZF9wYXJhbV9kZXZpY2UlM0ElMjBjcHUlMEElMjAlMjB6ZXJvM19pbml0X2ZsYWclM0ElMjB0cnVlJTBBJTIwJTIwemVyb19zdGFnZSUzQSUyMDIlMEFkaXN0cmlidXRlZF90eXBlJTNBJTIwREVFUFNQRUVEJTBBZG93bmNhc3RfYmYxNiUzQSUyMCdubyclMEFtYWNoaW5lX3JhbmslM0ElMjAwJTBBbWFpbl90cmFpbmluZ19mdW5jdGlvbiUzQSUyMG1haW4lMEFtaXhlZF9wcmVjaXNpb24lM0ElMjBiZjE2JTBBbnVtX21hY2hpbmVzJTNBJTIwMSUwQW51bV9wcm9jZXNzZXMlM0ElMjA0JTBBcmR6dl9iYWNrZW5kJTNBJTIwc3RhdGljJTBBc2FtZV9uZXR3b3JrJTNBJTIwdHJ1ZSUwQXRwdV9lbnYlM0ElMjAlNUIlNUQlMEF0cHVfdXNlX2NsdXN0ZXIlM0ElMjBmYWxzZSUwQXRwdV91c2Vfc3VkbyUzQSUyMGZhbHNlJTBBdXNlX2NwdSUzQSUyMGZhbHNl",highlighted:`<span class="hljs-attr">compute_environment:</span> <span class="hljs-string">LOCAL_MACHINE</span>                                                                                             
<span class="hljs-attr">deepspeed_config:</span>                                                                                                              
  <span class="hljs-attr">gradient_accumulation_steps:</span> <span class="hljs-number">1</span>
  <span class="hljs-attr">gradient_clipping:</span> <span class="hljs-number">0.7</span>
  <span class="hljs-attr">offload_optimizer_device:</span> <span class="hljs-string">cpu</span>
  <span class="hljs-attr">offload_param_device:</span> <span class="hljs-string">cpu</span>
  <span class="hljs-attr">zero3_init_flag:</span> <span class="hljs-literal">true</span>
  <span class="hljs-attr">zero_stage:</span> <span class="hljs-number">2</span>
<span class="hljs-attr">distributed_type:</span> <span class="hljs-string">DEEPSPEED</span>
<span class="hljs-attr">downcast_bf16:</span> <span class="hljs-string">&#x27;no&#x27;</span>
<span class="hljs-attr">machine_rank:</span> <span class="hljs-number">0</span>
<span class="hljs-attr">main_training_function:</span> <span class="hljs-string">main</span>
<span class="hljs-attr">mixed_precision:</span> <span class="hljs-string">bf16</span>
<span class="hljs-attr">num_machines:</span> <span class="hljs-number">1</span>
<span class="hljs-attr">num_processes:</span> <span class="hljs-number">4</span>
<span class="hljs-attr">rdzv_backend:</span> <span class="hljs-string">static</span>
<span class="hljs-attr">same_network:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">tpu_env:</span> []
<span class="hljs-attr">tpu_use_cluster:</span> <span class="hljs-literal">false</span>
<span class="hljs-attr">tpu_use_sudo:</span> <span class="hljs-literal">false</span>
<span class="hljs-attr">use_cpu:</span> <span class="hljs-literal">false</span>`,wrap:!1}}),_r=new C({props:{code:"Y2QlMjB0cmFuc2Zvcm1lcnMlMEElMEFhY2NlbGVyYXRlJTIwbGF1bmNoJTIwJTVDJTBBLiUyRmV4YW1wbGVzJTJGcHl0b3JjaCUyRnRleHQtY2xhc3NpZmljYXRpb24lMkZydW5fZ2x1ZS5weSUyMCU1QyUwQS0tbW9kZWxfbmFtZV9vcl9wYXRoJTIwYmVydC1iYXNlLWNhc2VkJTIwJTVDJTBBLS10YXNrX25hbWUlMjAlMjRUQVNLX05BTUUlMjAlNUMlMEEtLWRvX3RyYWluJTIwJTVDJTBBLS1kb19ldmFsJTIwJTVDJTBBLS1tYXhfc2VxX2xlbmd0aCUyMDEyOCUyMCU1QyUwQS0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTIwMTYlMjAlNUMlMEEtLWxlYXJuaW5nX3JhdGUlMjA1ZS01JTIwJTVDJTBBLS1udW1fdHJhaW5fZXBvY2hzJTIwMyUyMCU1QyUwQS0tb3V0cHV0X2RpciUyMCUyRnRtcCUyRiUyNFRBU0tfTkFNRSUyRiUyMCU1QyUwQS0tb3ZlcndyaXRlX291dHB1dF9kaXI=",highlighted:`<span class="hljs-built_in">cd</span> transformers

accelerate launch \\
./examples/pytorch/text-classification/run_glue.py \\
--model_name_or_path bert-base-cased \\
--task_name <span class="hljs-variable">$TASK_NAME</span> \\
--do_train \\
--do_eval \\
--max_seq_length 128 \\
--per_device_train_batch_size 16 \\
--learning_rate 5e-5 \\
--num_train_epochs 3 \\
--output_dir /tmp/<span class="hljs-variable">$TASK_NAME</span>/ \\
--overwrite_output_dir`,wrap:!1}}),br=new C({props:{code:"Y2QlMjB0cmFuc2Zvcm1lcnMlMEElMEFhY2NlbGVyYXRlJTIwbGF1bmNoJTIwLS1udW1fcHJvY2Vzc2VzJTNEMiUyMCU1QyUwQS0tdXNlX2ZzZHAlMjAlNUMlMEEtLW1peGVkX3ByZWNpc2lvbiUzRGJmMTYlMjAlNUMlMEEtLWZzZHBfYXV0b193cmFwX3BvbGljeSUzRFRSQU5TRk9STUVSX0JBU0VEX1dSQVAlMjAlMjAlNUMlMEEtLWZzZHBfdHJhbnNmb3JtZXJfbGF5ZXJfY2xzX3RvX3dyYXAlM0QlMjJCZXJ0TGF5ZXIlMjIlMjAlNUMlMEEtLWZzZHBfc2hhcmRpbmdfc3RyYXRlZ3klM0QxJTIwJTVDJTBBLS1mc2RwX3N0YXRlX2RpY3RfdHlwZSUzREZVTExfU1RBVEVfRElDVCUyMCU1QyUwQS4lMkZleGFtcGxlcyUyRnB5dG9yY2glMkZ0ZXh0LWNsYXNzaWZpY2F0aW9uJTJGcnVuX2dsdWUucHklMEEtLW1vZGVsX25hbWVfb3JfcGF0aCUyMGJlcnQtYmFzZS1jYXNlZCUyMCU1QyUwQS0tdGFza19uYW1lJTIwJTI0VEFTS19OQU1FJTIwJTVDJTBBLS1kb190cmFpbiUyMCU1QyUwQS0tZG9fZXZhbCUyMCU1QyUwQS0tbWF4X3NlcV9sZW5ndGglMjAxMjglMjAlNUMlMEEtLXBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUyMDE2JTIwJTVDJTBBLS1sZWFybmluZ19yYXRlJTIwNWUtNSUyMCU1QyUwQS0tbnVtX3RyYWluX2Vwb2NocyUyMDMlMjAlNUMlMEEtLW91dHB1dF9kaXIlMjAlMkZ0bXAlMkYlMjRUQVNLX05BTUUlMkYlMjAlNUMlMEEtLW92ZXJ3cml0ZV9vdXRwdXRfZGly",highlighted:`<span class="hljs-built_in">cd</span> transformers

accelerate launch --num_processes=2 \\
--use_fsdp \\
--mixed_precision=bf16 \\
--fsdp_auto_wrap_policy=TRANSFORMER_BASED_WRAP  \\
--fsdp_transformer_layer_cls_to_wrap=<span class="hljs-string">&quot;BertLayer&quot;</span> \\
--fsdp_sharding_strategy=1 \\
--fsdp_state_dict_type=FULL_STATE_DICT \\
./examples/pytorch/text-classification/run_glue.py
--model_name_or_path bert-base-cased \\
--task_name <span class="hljs-variable">$TASK_NAME</span> \\
--do_train \\
--do_eval \\
--max_seq_length 128 \\
--per_device_train_batch_size 16 \\
--learning_rate 5e-5 \\
--num_train_epochs 3 \\
--output_dir /tmp/<span class="hljs-variable">$TASK_NAME</span>/ \\
--overwrite_output_dir`,wrap:!1}}),wr=new L({props:{title:"Boost your fine-tuning performances using NEFTune",local:"boost-your-fine-tuning-performances-using-neftune",headingTag:"h2"}}),kr=new C({props:{code:"JTBBJTBB",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Trainer, TrainingArguments

args = TrainingArguments(..., neftune_noise_alpha=<span class="hljs-number">0.1</span>)
trainer = Trainer(..., args=args)

...

trainer.train()`,wrap:!1}}),{c(){c=i("meta"),w=o(),b=i("p"),y=o(),p($.$$.fragment),m=o(),A=i("p"),A.innerHTML=Dh,al=o(),p(Le.$$.fragment),rl=o(),Jt=i("p"),Jt.innerHTML=Hh,sl=o(),Ut=i("p"),Ut.innerHTML=Rh,il=o(),St=i("p"),St.innerHTML=Bh,ll=o(),Pt=i("ul"),Pt.innerHTML=Eh,dl=o(),p(Fe.$$.fragment),cl=o(),Lt=i("p"),Lt.innerHTML=Vh,ml=o(),p(Ft.$$.fragment),pl=o(),Nt=i("p"),Nt.innerHTML=Zh,ul=o(),p(zt.$$.fragment),hl=o(),v=i("div"),p(Wt.$$.fragment),gm=o(),Pr=i("p"),Pr.textContent=Xh,fm=o(),Lr=i("p"),Lr.textContent=Gh,_m=o(),Fr=i("ul"),Fr.innerHTML=Yh,bm=o(),Ne=i("div"),p(Dt.$$.fragment),ym=o(),Nr=i("p"),Nr.innerHTML=Oh,vm=o(),ze=i("div"),p(Ht.$$.fragment),Tm=o(),zr=i("p"),zr.innerHTML=Qh,wm=o(),ee=i("div"),p(Rt.$$.fragment),xm=o(),Wr=i("p"),Wr.textContent=Kh,Mm=o(),Dr=i("p"),Dr.textContent=eg,$m=o(),We=i("div"),p(Bt.$$.fragment),km=o(),Hr=i("p"),Hr.textContent=tg,Am=o(),De=i("div"),p(Et.$$.fragment),qm=o(),Rr=i("p"),Rr.innerHTML=ng,jm=o(),te=i("div"),p(Vt.$$.fragment),Cm=o(),Br=i("p"),Br.textContent=og,Im=o(),Er=i("p"),Er.innerHTML=ag,Jm=o(),ne=i("div"),p(Zt.$$.fragment),Um=o(),Vr=i("p"),Vr.textContent=rg,Sm=o(),Zr=i("p"),Zr.innerHTML=sg,Pm=o(),He=i("div"),p(Xt.$$.fragment),Lm=o(),Xr=i("p"),Xr.textContent=ig,Fm=o(),H=i("div"),p(Gt.$$.fragment),Nm=o(),Gr=i("p"),Gr.textContent=lg,zm=o(),Yr=i("p"),Yr.innerHTML=dg,Wm=o(),Or=i("p"),Or.textContent=cg,Dm=o(),oe=i("div"),p(Yt.$$.fragment),Hm=o(),Qr=i("p"),Qr.innerHTML=mg,Rm=o(),Kr=i("p"),Kr.textContent=pg,Bm=o(),Re=i("div"),p(Ot.$$.fragment),Em=o(),es=i("p"),es.innerHTML=ug,Vm=o(),ae=i("div"),p(Qt.$$.fragment),Zm=o(),ts=i("p"),ts.textContent=hg,Xm=o(),ns=i("p"),ns.textContent=gg,Gm=o(),re=i("div"),p(Kt.$$.fragment),Ym=o(),os=i("p"),os.innerHTML=fg,Om=o(),as=i("p"),as.textContent=_g,Qm=o(),Be=i("div"),p(en.$$.fragment),Km=o(),rs=i("p"),rs.textContent=bg,ep=o(),se=i("div"),p(tn.$$.fragment),tp=o(),ss=i("p"),ss.innerHTML=yg,np=o(),is=i("p"),is.textContent=vg,op=o(),R=i("div"),p(nn.$$.fragment),ap=o(),ls=i("p"),ls.innerHTML=Tg,rp=o(),ds=i("p"),ds.innerHTML=wg,sp=o(),cs=i("p"),cs.textContent=xg,ip=o(),ie=i("div"),p(on.$$.fragment),lp=o(),ms=i("p"),ms.innerHTML=Mg,dp=o(),p(Ee.$$.fragment),cp=o(),le=i("div"),p(an.$$.fragment),mp=o(),ps=i("p"),ps.innerHTML=$g,pp=o(),p(Ve.$$.fragment),up=o(),Ze=i("div"),p(rn.$$.fragment),hp=o(),us=i("p"),us.innerHTML=kg,gp=o(),Xe=i("div"),p(sn.$$.fragment),fp=o(),hs=i("p"),hs.textContent=Ag,_p=o(),Ge=i("div"),p(ln.$$.fragment),bp=o(),gs=i("p"),gs.innerHTML=qg,yp=o(),de=i("div"),p(dn.$$.fragment),vp=o(),fs=i("p"),fs.innerHTML=jg,Tp=o(),_s=i("p"),_s.textContent=Cg,wp=o(),I=i("div"),p(cn.$$.fragment),xp=o(),bs=i("p"),bs.textContent=Ig,Mp=o(),ys=i("p"),ys.textContent=Jg,$p=o(),vs=i("p"),vs.textContent=Ug,kp=o(),Ts=i("p"),Ts.innerHTML=Sg,Ap=o(),p(Ye.$$.fragment),qp=o(),ws=i("p"),ws.innerHTML=Pg,jp=o(),xs=i("ul"),xs.innerHTML=Lg,Cp=o(),Ms=i("p"),Ms.textContent=Fg,Ip=o(),$s=i("p"),$s.textContent=Ng,Jp=o(),ks=i("p"),ks.innerHTML=zg,Up=o(),As=i("p"),As.innerHTML=Wg,Sp=o(),qs=i("p"),qs.innerHTML=Dg,Pp=o(),js=i("p"),js.innerHTML=Hg,Lp=o(),Cs=i("p"),Cs.innerHTML=Rg,Fp=o(),Is=i("p"),Is.textContent=Bg,Np=o(),Oe=i("div"),p(mn.$$.fragment),zp=o(),Js=i("p"),Js.textContent=Eg,Wp=o(),Qe=i("div"),p(pn.$$.fragment),Dp=o(),Us=i("p"),Us.innerHTML=Vg,Hp=o(),Ke=i("div"),p(un.$$.fragment),Rp=o(),Ss=i("p"),Ss.innerHTML=Zg,Bp=o(),ce=i("div"),p(hn.$$.fragment),Ep=o(),Ps=i("p"),Ps.innerHTML=Xg,Vp=o(),Ls=i("p"),Ls.innerHTML=Gg,Zp=o(),F=i("div"),p(gn.$$.fragment),Xp=o(),Fs=i("p"),Fs.textContent=Yg,Gp=o(),Ns=i("p"),Ns.innerHTML=Og,Yp=o(),p(et.$$.fragment),Op=o(),zs=i("p"),zs.innerHTML=Qg,Qp=o(),Ws=i("ul"),Ws.innerHTML=Kg,Kp=o(),me=i("div"),p(fn.$$.fragment),eu=o(),Ds=i("p"),Ds.innerHTML=ef,tu=o(),Hs=i("p"),Hs.textContent=tf,nu=o(),pe=i("div"),p(_n.$$.fragment),ou=o(),Rs=i("p"),Rs.innerHTML=nf,au=o(),Bs=i("p"),Bs.textContent=of,ru=o(),tt=i("div"),p(bn.$$.fragment),su=o(),Es=i("p"),Es.innerHTML=af,iu=o(),nt=i("div"),p(yn.$$.fragment),lu=o(),Vs=i("p"),Vs.innerHTML=rf,du=o(),B=i("div"),p(vn.$$.fragment),cu=o(),Zs=i("p"),Zs.innerHTML=sf,mu=o(),Xs=i("p"),Xs.textContent=lf,pu=o(),Gs=i("p"),Gs.innerHTML=df,uu=o(),ue=i("div"),p(Tn.$$.fragment),hu=o(),Ys=i("p"),Ys.innerHTML=cf,gu=o(),Os=i("p"),Os.textContent=mf,fu=o(),he=i("div"),p(wn.$$.fragment),_u=o(),Qs=i("p"),Qs.textContent=pf,bu=o(),Ks=i("p"),Ks.textContent=uf,yu=o(),ot=i("div"),p(xn.$$.fragment),vu=o(),ei=i("p"),ei.textContent=hf,Tu=o(),ge=i("div"),p(Mn.$$.fragment),wu=o(),ti=i("p"),ti.textContent=gf,xu=o(),ni=i("p"),ni.textContent=ff,gl=o(),p($n.$$.fragment),fl=o(),O=i("div"),p(kn.$$.fragment),Mu=o(),E=i("div"),p(An.$$.fragment),$u=o(),oi=i("p"),oi.textContent=_f,ku=o(),ai=i("p"),ai.innerHTML=bf,Au=o(),ri=i("p"),ri.textContent=yf,qu=o(),N=i("div"),p(qn.$$.fragment),ju=o(),si=i("p"),si.textContent=vf,Cu=o(),ii=i("p"),ii.innerHTML=Tf,Iu=o(),p(at.$$.fragment),Ju=o(),li=i("p"),li.innerHTML=wf,Uu=o(),di=i("ul"),di.innerHTML=xf,_l=o(),p(jn.$$.fragment),bl=o(),j=i("div"),p(Cn.$$.fragment),Su=o(),ci=i("p"),ci.innerHTML=Mf,Pu=o(),mi=i("p"),mi.innerHTML=$f,Lu=o(),W=i("div"),p(In.$$.fragment),Fu=o(),pi=i("p"),pi.textContent=kf,Nu=o(),ui=i("p"),ui.innerHTML=Af,zu=o(),hi=i("p"),hi.innerHTML=qf,Wu=o(),gi=i("p"),gi.innerHTML=jf,Du=o(),rt=i("div"),p(Jn.$$.fragment),Hu=o(),fi=i("p"),fi.textContent=Cf,Ru=o(),fe=i("div"),p(Un.$$.fragment),Bu=o(),_i=i("p"),_i.textContent=If,Eu=o(),bi=i("p"),bi.innerHTML=Jf,Vu=o(),_e=i("div"),p(Sn.$$.fragment),Zu=o(),yi=i("p"),yi.textContent=Uf,Xu=o(),p(st.$$.fragment),Gu=o(),be=i("div"),p(Pn.$$.fragment),Yu=o(),vi=i("p"),vi.textContent=Sf,Ou=o(),p(it.$$.fragment),Qu=o(),ye=i("div"),p(Ln.$$.fragment),Ku=o(),Ti=i("p"),Ti.textContent=Pf,eh=o(),p(lt.$$.fragment),th=o(),ve=i("div"),p(Fn.$$.fragment),nh=o(),wi=i("p"),wi.textContent=Lf,oh=o(),p(dt.$$.fragment),ah=o(),Te=i("div"),p(Nn.$$.fragment),rh=o(),xi=i("p"),xi.textContent=Ff,sh=o(),p(ct.$$.fragment),ih=o(),V=i("div"),p(zn.$$.fragment),lh=o(),Mi=i("p"),Mi.textContent=Nf,dh=o(),p(mt.$$.fragment),ch=o(),p(pt.$$.fragment),mh=o(),we=i("div"),p(Wn.$$.fragment),ph=o(),$i=i("p"),$i.textContent=zf,uh=o(),p(ut.$$.fragment),hh=o(),Z=i("div"),p(Dn.$$.fragment),gh=o(),ki=i("p"),ki.textContent=Wf,fh=o(),p(ht.$$.fragment),_h=o(),p(gt.$$.fragment),bh=o(),X=i("div"),p(Hn.$$.fragment),yh=o(),Ai=i("p"),Ai.textContent=Df,vh=o(),p(ft.$$.fragment),Th=o(),p(_t.$$.fragment),wh=o(),bt=i("div"),p(Rn.$$.fragment),xh=o(),qi=i("p"),qi.innerHTML=Hf,Mh=o(),yt=i("div"),p(Bn.$$.fragment),$h=o(),ji=i("p"),ji.textContent=Rf,kh=o(),vt=i("div"),p(En.$$.fragment),Ah=o(),Ci=i("p"),Ci.textContent=Bf,yl=o(),p(Vn.$$.fragment),vl=o(),D=i("div"),p(Zn.$$.fragment),qh=o(),Ii=i("p"),Ii.innerHTML=Ef,jh=o(),Ji=i("p"),Ji.innerHTML=Vf,Ch=o(),Tt=i("div"),p(Xn.$$.fragment),Ih=o(),Ui=i("p"),Ui.innerHTML=Zf,Tl=o(),p(Gn.$$.fragment),wl=o(),Yn=i("p"),Yn.innerHTML=Xf,xl=o(),On=i("p"),On.innerHTML=Gf,Ml=o(),Qn=i("ul"),Qn.innerHTML=Yf,$l=o(),Kn=i("p"),Kn.innerHTML=Of,kl=o(),eo=i("ul"),eo.innerHTML=Qf,Al=o(),p(to.$$.fragment),ql=o(),no=i("p"),no.innerHTML=Kf,jl=o(),oo=i("p"),oo.innerHTML=e_,Cl=o(),ao=i("ul"),ao.innerHTML=t_,Il=o(),ro=i("p"),ro.innerHTML=n_,Jl=o(),so=i("p"),so.innerHTML=o_,Ul=o(),io=i("p"),io.textContent=a_,Sl=o(),p(lo.$$.fragment),Pl=o(),co=i("p"),co.textContent=r_,Ll=o(),p(mo.$$.fragment),Fl=o(),po=i("p"),po.textContent=s_,Nl=o(),p(uo.$$.fragment),zl=o(),ho=i("p"),ho.textContent=i_,Wl=o(),go=i("p"),go.textContent=l_,Dl=o(),p(fo.$$.fragment),Hl=o(),_o=i("p"),_o.innerHTML=d_,Rl=o(),p(bo.$$.fragment),Bl=o(),yo=i("p"),yo.innerHTML=c_,El=o(),vo=i("p"),vo.innerHTML=m_,Vl=o(),p(To.$$.fragment),Zl=o(),wo=i("p"),wo.textContent=p_,Xl=o(),xo=i("p"),xo.innerHTML=u_,Gl=o(),p(Mo.$$.fragment),Yl=o(),$o=i("p"),$o.innerHTML=h_,Ol=o(),p(ko.$$.fragment),Ql=o(),p(Ao.$$.fragment),Kl=o(),qo=i("p"),qo.innerHTML=g_,ed=o(),jo=i("p"),jo.textContent=f_,td=o(),Co=i("p"),Co.textContent=__,nd=o(),Io=i("p"),Io.innerHTML=b_,od=o(),Jo=i("p"),Jo.innerHTML=y_,ad=o(),Uo=i("p"),Uo.textContent=v_,rd=o(),p(So.$$.fragment),sd=o(),Po=i("p"),Po.innerHTML=T_,id=o(),Lo=i("p"),Lo.textContent=w_,ld=o(),p(Fo.$$.fragment),dd=o(),No=i("p"),No.innerHTML=x_,cd=o(),zo=i("p"),zo.innerHTML=M_,md=o(),p(Wo.$$.fragment),pd=o(),Do=i("p"),Do.textContent=$_,ud=o(),p(Ho.$$.fragment),hd=o(),Ro=i("p"),Ro.textContent=k_,gd=o(),p(Bo.$$.fragment),fd=o(),Eo=i("p"),Eo.textContent=A_,_d=o(),Vo=i("p"),Vo.innerHTML=q_,bd=o(),Zo=i("p"),Zo.innerHTML=j_,yd=o(),Xo=i("ol"),Xo.innerHTML=C_,vd=o(),p(Go.$$.fragment),Td=o(),wt=i("ol"),wt.innerHTML=I_,wd=o(),p(Yo.$$.fragment),xd=o(),Oo=i("p"),Oo.innerHTML=J_,Md=o(),Qo=i("p"),Qo.textContent=U_,$d=o(),p(Ko.$$.fragment),kd=o(),ea=i("p"),ea.textContent=S_,Ad=o(),ta=i("p"),ta.innerHTML=P_,qd=o(),p(na.$$.fragment),jd=o(),oa=i("p"),oa.innerHTML=L_,Cd=o(),aa=i("p"),aa.innerHTML=F_,Id=o(),ra=i("p"),ra.innerHTML=N_,Jd=o(),Si=i("a"),Ud=o(),p(sa.$$.fragment),Sd=o(),ia=i("p"),ia.textContent=z_,Pd=o(),la=i("p"),la.innerHTML=W_,Ld=o(),da=i("p"),da.textContent=D_,Fd=o(),p(ca.$$.fragment),Nd=o(),ma=i("p"),ma.textContent=H_,zd=o(),pa=i("p"),pa.innerHTML=R_,Wd=o(),p(ua.$$.fragment),Dd=o(),ha=i("p"),ha.textContent=B_,Hd=o(),ga=i("p"),ga.innerHTML=E_,Rd=o(),fa=i("p"),fa.innerHTML=V_,Bd=o(),p(_a.$$.fragment),Ed=o(),ba=i("p"),ba.innerHTML=Z_,Vd=o(),p(ya.$$.fragment),Zd=o(),va=i("p"),va.textContent=X_,Xd=o(),p(Ta.$$.fragment),Gd=o(),wa=i("p"),wa.innerHTML=G_,Yd=o(),xa=i("p"),xa.textContent=Y_,Od=o(),p(Ma.$$.fragment),Qd=o(),$a=i("p"),$a.textContent=O_,Kd=o(),ka=i("p"),ka.innerHTML=Q_,ec=o(),Aa=i("p"),Aa.innerHTML=K_,tc=o(),qa=i("p"),qa.textContent=eb,nc=o(),p(ja.$$.fragment),oc=o(),Ca=i("p"),Ca.textContent=tb,ac=o(),Ia=i("p"),Ia.innerHTML=nb,rc=o(),p(Ja.$$.fragment),sc=o(),Ua=i("p"),Ua.innerHTML=ob,ic=o(),Sa=i("p"),Sa.textContent=ab,lc=o(),Pa=i("p"),Pa.textContent=rb,dc=o(),La=i("p"),La.innerHTML=sb,cc=o(),p(Fa.$$.fragment),mc=o(),Na=i("p"),Na.innerHTML=ib,pc=o(),za=i("p"),za.textContent=lb,uc=o(),p(Wa.$$.fragment),hc=o(),Da=i("p"),Da.innerHTML=db,gc=o(),Ha=i("p"),Ha.innerHTML=cb,fc=o(),Ra=i("p"),Ra.innerHTML=mb,_c=o(),Ba=i("ul"),Ba.innerHTML=pb,bc=o(),Ea=i("p"),Ea.innerHTML=ub,yc=o(),Va=i("ul"),Va.innerHTML=hb,vc=o(),p(Za.$$.fragment),Tc=o(),Xa=i("p"),Xa.innerHTML=gb,wc=o(),Ga=i("p"),Ga.innerHTML=fb,xc=o(),Ya=i("p"),Ya.innerHTML=_b,Mc=o(),Oa=i("p"),Oa.innerHTML=bb,$c=o(),Qa=i("ul"),Qa.innerHTML=yb,kc=o(),p(Ka.$$.fragment),Ac=o(),er=i("p"),er.innerHTML=vb,qc=o(),p(xt.$$.fragment),jc=o(),tr=i("p"),tr.innerHTML=Tb,Cc=o(),nr=i("ol"),nr.innerHTML=wb,Ic=o(),or=i("p"),or.innerHTML=xb,Jc=o(),ar=i("p"),ar.innerHTML=Mb,Uc=o(),p(rr.$$.fragment),Sc=o(),sr=i("p"),sr.innerHTML=$b,Pc=o(),ir=i("ol"),ir.innerHTML=kb,Lc=o(),lr=i("p"),lr.innerHTML=Ab,Fc=o(),p(dr.$$.fragment),Nc=o(),cr=i("p"),cr.textContent=qb,zc=o(),mr=i("ul"),mr.innerHTML=jb,Wc=o(),pr=i("p"),pr.textContent=Cb,Dc=o(),xe=i("ol"),Pi=i("li"),Pi.innerHTML=Ib,Jh=o(),P=i("li"),Li=i("p"),Li.innerHTML=Jb,Uh=o(),p(ur.$$.fragment),Sh=o(),Fi=i("p"),Fi.textContent=Ub,Ph=o(),p(hr.$$.fragment),Lh=o(),Ni=i("p"),Ni.textContent=Sb,Fh=o(),p(gr.$$.fragment),Nh=o(),zi=i("p"),zi.textContent=Pb,zh=o(),p(fr.$$.fragment),Wh=o(),Wi=i("li"),Wi.innerHTML=Lb,Hc=o(),p(_r.$$.fragment),Rc=o(),Mt=i("ol"),Mt.innerHTML=Fb,Bc=o(),p(br.$$.fragment),Ec=o(),yr=i("p"),yr.innerHTML=Nb,Vc=o(),vr=i("p"),vr.textContent=zb,Zc=o(),Tr=i("p"),Tr.innerHTML=Wb,Xc=o(),p(wr.$$.fragment),Gc=o(),xr=i("p"),xr.textContent=Db,Yc=o(),Mr=i("blockquote"),Mr.innerHTML=Hb,Oc=o(),$t=i("div"),$t.innerHTML=Rb,Qc=o(),$r=i("p"),$r.innerHTML=Bb,Kc=o(),p(kr.$$.fragment),em=o(),ol=i("p"),this.h()},l(e){const n=Gb("svelte-u9bgzb",document.head);c=l(n,"META",{name:!0,content:!0}),n.forEach(t),w=a(e),b=l(e,"P",{}),x(b).forEach(t),y=a(e),u($.$$.fragment,e),m=a(e),A=l(e,"P",{"data-svelte-h":!0}),d(A)!=="svelte-12p1nwh"&&(A.innerHTML=Dh),al=a(e),u(Le.$$.fragment,e),rl=a(e),Jt=l(e,"P",{"data-svelte-h":!0}),d(Jt)!=="svelte-1nug1nv"&&(Jt.innerHTML=Hh),sl=a(e),Ut=l(e,"P",{"data-svelte-h":!0}),d(Ut)!=="svelte-1afczgr"&&(Ut.innerHTML=Rh),il=a(e),St=l(e,"P",{"data-svelte-h":!0}),d(St)!=="svelte-qjp4pc"&&(St.innerHTML=Bh),ll=a(e),Pt=l(e,"UL",{"data-svelte-h":!0}),d(Pt)!=="svelte-1akoqi1"&&(Pt.innerHTML=Eh),dl=a(e),u(Fe.$$.fragment,e),cl=a(e),Lt=l(e,"P",{"data-svelte-h":!0}),d(Lt)!=="svelte-4zwrz1"&&(Lt.innerHTML=Vh),ml=a(e),u(Ft.$$.fragment,e),pl=a(e),Nt=l(e,"P",{"data-svelte-h":!0}),d(Nt)!=="svelte-k7qled"&&(Nt.innerHTML=Zh),ul=a(e),u(zt.$$.fragment,e),hl=a(e),v=l(e,"DIV",{class:!0});var T=x(v);u(Wt.$$.fragment,T),gm=a(T),Pr=l(T,"P",{"data-svelte-h":!0}),d(Pr)!=="svelte-xa06uv"&&(Pr.textContent=Xh),fm=a(T),Lr=l(T,"P",{"data-svelte-h":!0}),d(Lr)!=="svelte-1tbd587"&&(Lr.textContent=Gh),_m=a(T),Fr=l(T,"UL",{"data-svelte-h":!0}),d(Fr)!=="svelte-yvzbh4"&&(Fr.innerHTML=Yh),bm=a(T),Ne=l(T,"DIV",{class:!0});var Ar=x(Ne);u(Dt.$$.fragment,Ar),ym=a(Ar),Nr=l(Ar,"P",{"data-svelte-h":!0}),d(Nr)!=="svelte-39sh5j"&&(Nr.innerHTML=Oh),Ar.forEach(t),vm=a(T),ze=l(T,"DIV",{class:!0});var qr=x(ze);u(Ht.$$.fragment,qr),Tm=a(qr),zr=l(qr,"P",{"data-svelte-h":!0}),d(zr)!=="svelte-9kwitf"&&(zr.innerHTML=Qh),qr.forEach(t),wm=a(T),ee=l(T,"DIV",{class:!0});var Ae=x(ee);u(Rt.$$.fragment,Ae),xm=a(Ae),Wr=l(Ae,"P",{"data-svelte-h":!0}),d(Wr)!=="svelte-1feheyo"&&(Wr.textContent=Kh),Mm=a(Ae),Dr=l(Ae,"P",{"data-svelte-h":!0}),d(Dr)!=="svelte-1be1oij"&&(Dr.textContent=eg),Ae.forEach(t),$m=a(T),We=l(T,"DIV",{class:!0});var jr=x(We);u(Bt.$$.fragment,jr),km=a(jr),Hr=l(jr,"P",{"data-svelte-h":!0}),d(Hr)!=="svelte-1agg8ch"&&(Hr.textContent=tg),jr.forEach(t),Am=a(T),De=l(T,"DIV",{class:!0});var Cr=x(De);u(Et.$$.fragment,Cr),qm=a(Cr),Rr=l(Cr,"P",{"data-svelte-h":!0}),d(Rr)!=="svelte-1mh859w"&&(Rr.innerHTML=ng),Cr.forEach(t),jm=a(T),te=l(T,"DIV",{class:!0});var qe=x(te);u(Vt.$$.fragment,qe),Cm=a(qe),Br=l(qe,"P",{"data-svelte-h":!0}),d(Br)!=="svelte-1w438iv"&&(Br.textContent=og),Im=a(qe),Er=l(qe,"P",{"data-svelte-h":!0}),d(Er)!=="svelte-nadplw"&&(Er.innerHTML=ag),qe.forEach(t),Jm=a(T),ne=l(T,"DIV",{class:!0});var je=x(ne);u(Zt.$$.fragment,je),Um=a(je),Vr=l(je,"P",{"data-svelte-h":!0}),d(Vr)!=="svelte-wdco14"&&(Vr.textContent=rg),Sm=a(je),Zr=l(je,"P",{"data-svelte-h":!0}),d(Zr)!=="svelte-zasfqr"&&(Zr.innerHTML=sg),je.forEach(t),Pm=a(T),He=l(T,"DIV",{class:!0});var Ir=x(He);u(Xt.$$.fragment,Ir),Lm=a(Ir),Xr=l(Ir,"P",{"data-svelte-h":!0}),d(Xr)!=="svelte-qi4mtl"&&(Xr.textContent=ig),Ir.forEach(t),Fm=a(T),H=l(T,"DIV",{class:!0});var Q=x(H);u(Gt.$$.fragment,Q),Nm=a(Q),Gr=l(Q,"P",{"data-svelte-h":!0}),d(Gr)!=="svelte-1mcvryw"&&(Gr.textContent=lg),zm=a(Q),Yr=l(Q,"P",{"data-svelte-h":!0}),d(Yr)!=="svelte-1339kj6"&&(Yr.innerHTML=dg),Wm=a(Q),Or=l(Q,"P",{"data-svelte-h":!0}),d(Or)!=="svelte-1h30111"&&(Or.textContent=cg),Q.forEach(t),Dm=a(T),oe=l(T,"DIV",{class:!0});var Ce=x(oe);u(Yt.$$.fragment,Ce),Hm=a(Ce),Qr=l(Ce,"P",{"data-svelte-h":!0}),d(Qr)!=="svelte-1v5gmc1"&&(Qr.innerHTML=mg),Rm=a(Ce),Kr=l(Ce,"P",{"data-svelte-h":!0}),d(Kr)!=="svelte-1tyo99t"&&(Kr.textContent=pg),Ce.forEach(t),Bm=a(T),Re=l(T,"DIV",{class:!0});var Jr=x(Re);u(Ot.$$.fragment,Jr),Em=a(Jr),es=l(Jr,"P",{"data-svelte-h":!0}),d(es)!=="svelte-esvj26"&&(es.innerHTML=ug),Jr.forEach(t),Vm=a(T),ae=l(T,"DIV",{class:!0});var Ie=x(ae);u(Qt.$$.fragment,Ie),Zm=a(Ie),ts=l(Ie,"P",{"data-svelte-h":!0}),d(ts)!=="svelte-yguuq6"&&(ts.textContent=hg),Xm=a(Ie),ns=l(Ie,"P",{"data-svelte-h":!0}),d(ns)!=="svelte-452p7a"&&(ns.textContent=gg),Ie.forEach(t),Gm=a(T),re=l(T,"DIV",{class:!0});var Je=x(re);u(Kt.$$.fragment,Je),Ym=a(Je),os=l(Je,"P",{"data-svelte-h":!0}),d(os)!=="svelte-xesobz"&&(os.innerHTML=fg),Om=a(Je),as=l(Je,"P",{"data-svelte-h":!0}),d(as)!=="svelte-1v6sccr"&&(as.textContent=_g),Je.forEach(t),Qm=a(T),Be=l(T,"DIV",{class:!0});var Ur=x(Be);u(en.$$.fragment,Ur),Km=a(Ur),rs=l(Ur,"P",{"data-svelte-h":!0}),d(rs)!=="svelte-1enq7q"&&(rs.textContent=bg),Ur.forEach(t),ep=a(T),se=l(T,"DIV",{class:!0});var Ue=x(se);u(tn.$$.fragment,Ue),tp=a(Ue),ss=l(Ue,"P",{"data-svelte-h":!0}),d(ss)!=="svelte-upvtbd"&&(ss.innerHTML=yg),np=a(Ue),is=l(Ue,"P",{"data-svelte-h":!0}),d(is)!=="svelte-1v6sccr"&&(is.textContent=vg),Ue.forEach(t),op=a(T),R=l(T,"DIV",{class:!0});var K=x(R);u(nn.$$.fragment,K),ap=a(K),ls=l(K,"P",{"data-svelte-h":!0}),d(ls)!=="svelte-dkae9b"&&(ls.innerHTML=Tg),rp=a(K),ds=l(K,"P",{"data-svelte-h":!0}),d(ds)!=="svelte-2uvyde"&&(ds.innerHTML=wg),sp=a(K),cs=l(K,"P",{"data-svelte-h":!0}),d(cs)!=="svelte-1v6sccr"&&(cs.textContent=xg),K.forEach(t),ip=a(T),ie=l(T,"DIV",{class:!0});var Se=x(ie);u(on.$$.fragment,Se),lp=a(Se),ms=l(Se,"P",{"data-svelte-h":!0}),d(ms)!=="svelte-mf62ka"&&(ms.innerHTML=Mg),dp=a(Se),u(Ee.$$.fragment,Se),Se.forEach(t),cp=a(T),le=l(T,"DIV",{class:!0});var Pe=x(le);u(an.$$.fragment,Pe),mp=a(Pe),ps=l(Pe,"P",{"data-svelte-h":!0}),d(ps)!=="svelte-rjlxwe"&&(ps.innerHTML=$g),pp=a(Pe),u(Ve.$$.fragment,Pe),Pe.forEach(t),up=a(T),Ze=l(T,"DIV",{class:!0});var Sr=x(Ze);u(rn.$$.fragment,Sr),hp=a(Sr),us=l(Sr,"P",{"data-svelte-h":!0}),d(us)!=="svelte-rjlxwe"&&(us.innerHTML=kg),Sr.forEach(t),gp=a(T),Xe=l(T,"DIV",{class:!0});var nm=x(Xe);u(sn.$$.fragment,nm),fp=a(nm),hs=l(nm,"P",{"data-svelte-h":!0}),d(hs)!=="svelte-16imdke"&&(hs.textContent=Ag),nm.forEach(t),_p=a(T),Ge=l(T,"DIV",{class:!0});var om=x(Ge);u(ln.$$.fragment,om),bp=a(om),gs=l(om,"P",{"data-svelte-h":!0}),d(gs)!=="svelte-1s7jdq8"&&(gs.innerHTML=qg),om.forEach(t),yp=a(T),de=l(T,"DIV",{class:!0});var Di=x(de);u(dn.$$.fragment,Di),vp=a(Di),fs=l(Di,"P",{"data-svelte-h":!0}),d(fs)!=="svelte-19fk55y"&&(fs.innerHTML=jg),Tp=a(Di),_s=l(Di,"P",{"data-svelte-h":!0}),d(_s)!=="svelte-1tz9xhn"&&(_s.textContent=Cg),Di.forEach(t),wp=a(T),I=l(T,"DIV",{class:!0});var U=x(I);u(cn.$$.fragment,U),xp=a(U),bs=l(U,"P",{"data-svelte-h":!0}),d(bs)!=="svelte-1q4m3ey"&&(bs.textContent=Ig),Mp=a(U),ys=l(U,"P",{"data-svelte-h":!0}),d(ys)!=="svelte-5vrny9"&&(ys.textContent=Jg),$p=a(U),vs=l(U,"P",{"data-svelte-h":!0}),d(vs)!=="svelte-k63f70"&&(vs.textContent=Ug),kp=a(U),Ts=l(U,"P",{"data-svelte-h":!0}),d(Ts)!=="svelte-y2g1lw"&&(Ts.innerHTML=Sg),Ap=a(U),u(Ye.$$.fragment,U),qp=a(U),ws=l(U,"P",{"data-svelte-h":!0}),d(ws)!=="svelte-ny4g3p"&&(ws.innerHTML=Pg),jp=a(U),xs=l(U,"UL",{"data-svelte-h":!0}),d(xs)!=="svelte-9luch7"&&(xs.innerHTML=Lg),Cp=a(U),Ms=l(U,"P",{"data-svelte-h":!0}),d(Ms)!=="svelte-100tlvw"&&(Ms.textContent=Fg),Ip=a(U),$s=l(U,"P",{"data-svelte-h":!0}),d($s)!=="svelte-1d82c6u"&&($s.textContent=Ng),Jp=a(U),ks=l(U,"P",{"data-svelte-h":!0}),d(ks)!=="svelte-d1rr2j"&&(ks.innerHTML=zg),Up=a(U),As=l(U,"P",{"data-svelte-h":!0}),d(As)!=="svelte-m7v5wt"&&(As.innerHTML=Wg),Sp=a(U),qs=l(U,"P",{"data-svelte-h":!0}),d(qs)!=="svelte-1propb9"&&(qs.innerHTML=Dg),Pp=a(U),js=l(U,"P",{"data-svelte-h":!0}),d(js)!=="svelte-1lmh4zl"&&(js.innerHTML=Hg),Lp=a(U),Cs=l(U,"P",{"data-svelte-h":!0}),d(Cs)!=="svelte-1h5qcpr"&&(Cs.innerHTML=Rg),Fp=a(U),Is=l(U,"P",{"data-svelte-h":!0}),d(Is)!=="svelte-1ocu6t3"&&(Is.textContent=Bg),U.forEach(t),Np=a(T),Oe=l(T,"DIV",{class:!0});var am=x(Oe);u(mn.$$.fragment,am),zp=a(am),Js=l(am,"P",{"data-svelte-h":!0}),d(Js)!=="svelte-otcx5b"&&(Js.textContent=Eg),am.forEach(t),Wp=a(T),Qe=l(T,"DIV",{class:!0});var rm=x(Qe);u(pn.$$.fragment,rm),Dp=a(rm),Us=l(rm,"P",{"data-svelte-h":!0}),d(Us)!=="svelte-19inmpu"&&(Us.innerHTML=Vg),rm.forEach(t),Hp=a(T),Ke=l(T,"DIV",{class:!0});var sm=x(Ke);u(un.$$.fragment,sm),Rp=a(sm),Ss=l(sm,"P",{"data-svelte-h":!0}),d(Ss)!=="svelte-tkw811"&&(Ss.innerHTML=Zg),sm.forEach(t),Bp=a(T),ce=l(T,"DIV",{class:!0});var Hi=x(ce);u(hn.$$.fragment,Hi),Ep=a(Hi),Ps=l(Hi,"P",{"data-svelte-h":!0}),d(Ps)!=="svelte-1jtxon0"&&(Ps.innerHTML=Xg),Vp=a(Hi),Ls=l(Hi,"P",{"data-svelte-h":!0}),d(Ls)!=="svelte-1ojzwr1"&&(Ls.innerHTML=Gg),Hi.forEach(t),Zp=a(T),F=l(T,"DIV",{class:!0});var G=x(F);u(gn.$$.fragment,G),Xp=a(G),Fs=l(G,"P",{"data-svelte-h":!0}),d(Fs)!=="svelte-1b6cpoy"&&(Fs.textContent=Yg),Gp=a(G),Ns=l(G,"P",{"data-svelte-h":!0}),d(Ns)!=="svelte-o30dtk"&&(Ns.innerHTML=Og),Yp=a(G),u(et.$$.fragment,G),Op=a(G),zs=l(G,"P",{"data-svelte-h":!0}),d(zs)!=="svelte-1t1ea6f"&&(zs.innerHTML=Qg),Qp=a(G),Ws=l(G,"UL",{"data-svelte-h":!0}),d(Ws)!=="svelte-15ctb4a"&&(Ws.innerHTML=Kg),G.forEach(t),Kp=a(T),me=l(T,"DIV",{class:!0});var Ri=x(me);u(fn.$$.fragment,Ri),eu=a(Ri),Ds=l(Ri,"P",{"data-svelte-h":!0}),d(Ds)!=="svelte-1v5gmc1"&&(Ds.innerHTML=ef),tu=a(Ri),Hs=l(Ri,"P",{"data-svelte-h":!0}),d(Hs)!=="svelte-1tyo99t"&&(Hs.textContent=tf),Ri.forEach(t),nu=a(T),pe=l(T,"DIV",{class:!0});var Bi=x(pe);u(_n.$$.fragment,Bi),ou=a(Bi),Rs=l(Bi,"P",{"data-svelte-h":!0}),d(Rs)!=="svelte-1y56pc5"&&(Rs.innerHTML=nf),au=a(Bi),Bs=l(Bi,"P",{"data-svelte-h":!0}),d(Bs)!=="svelte-qjfexy"&&(Bs.textContent=of),Bi.forEach(t),ru=a(T),tt=l(T,"DIV",{class:!0});var im=x(tt);u(bn.$$.fragment,im),su=a(im),Es=l(im,"P",{"data-svelte-h":!0}),d(Es)!=="svelte-1jhnoxo"&&(Es.innerHTML=af),im.forEach(t),iu=a(T),nt=l(T,"DIV",{class:!0});var lm=x(nt);u(yn.$$.fragment,lm),lu=a(lm),Vs=l(lm,"P",{"data-svelte-h":!0}),d(Vs)!=="svelte-7re89v"&&(Vs.innerHTML=rf),lm.forEach(t),du=a(T),B=l(T,"DIV",{class:!0});var kt=x(B);u(vn.$$.fragment,kt),cu=a(kt),Zs=l(kt,"P",{"data-svelte-h":!0}),d(Zs)!=="svelte-9dohab"&&(Zs.innerHTML=sf),mu=a(kt),Xs=l(kt,"P",{"data-svelte-h":!0}),d(Xs)!=="svelte-5vrny9"&&(Xs.textContent=lf),pu=a(kt),Gs=l(kt,"P",{"data-svelte-h":!0}),d(Gs)!=="svelte-1tk52ex"&&(Gs.innerHTML=df),kt.forEach(t),uu=a(T),ue=l(T,"DIV",{class:!0});var Ei=x(ue);u(Tn.$$.fragment,Ei),hu=a(Ei),Ys=l(Ei,"P",{"data-svelte-h":!0}),d(Ys)!=="svelte-r8h4ov"&&(Ys.innerHTML=cf),gu=a(Ei),Os=l(Ei,"P",{"data-svelte-h":!0}),d(Os)!=="svelte-1e6bius"&&(Os.textContent=mf),Ei.forEach(t),fu=a(T),he=l(T,"DIV",{class:!0});var Vi=x(he);u(wn.$$.fragment,Vi),_u=a(Vi),Qs=l(Vi,"P",{"data-svelte-h":!0}),d(Qs)!=="svelte-1g3hgx9"&&(Qs.textContent=pf),bu=a(Vi),Ks=l(Vi,"P",{"data-svelte-h":!0}),d(Ks)!=="svelte-5vrny9"&&(Ks.textContent=uf),Vi.forEach(t),yu=a(T),ot=l(T,"DIV",{class:!0});var dm=x(ot);u(xn.$$.fragment,dm),vu=a(dm),ei=l(dm,"P",{"data-svelte-h":!0}),d(ei)!=="svelte-1cilnet"&&(ei.textContent=hf),dm.forEach(t),Tu=a(T),ge=l(T,"DIV",{class:!0});var Zi=x(ge);u(Mn.$$.fragment,Zi),wu=a(Zi),ti=l(Zi,"P",{"data-svelte-h":!0}),d(ti)!=="svelte-4qplkw"&&(ti.textContent=gf),xu=a(Zi),ni=l(Zi,"P",{"data-svelte-h":!0}),d(ni)!=="svelte-qjfexy"&&(ni.textContent=ff),Zi.forEach(t),T.forEach(t),gl=a(e),u($n.$$.fragment,e),fl=a(e),O=l(e,"DIV",{class:!0});var Xi=x(O);u(kn.$$.fragment,Xi),Mu=a(Xi),E=l(Xi,"DIV",{class:!0});var At=x(E);u(An.$$.fragment,At),$u=a(At),oi=l(At,"P",{"data-svelte-h":!0}),d(oi)!=="svelte-1mcvryw"&&(oi.textContent=_f),ku=a(At),ai=l(At,"P",{"data-svelte-h":!0}),d(ai)!=="svelte-1339kj6"&&(ai.innerHTML=bf),Au=a(At),ri=l(At,"P",{"data-svelte-h":!0}),d(ri)!=="svelte-1h30111"&&(ri.textContent=yf),At.forEach(t),qu=a(Xi),N=l(Xi,"DIV",{class:!0});var Y=x(N);u(qn.$$.fragment,Y),ju=a(Y),si=l(Y,"P",{"data-svelte-h":!0}),d(si)!=="svelte-1b6cpoy"&&(si.textContent=vf),Cu=a(Y),ii=l(Y,"P",{"data-svelte-h":!0}),d(ii)!=="svelte-o30dtk"&&(ii.innerHTML=Tf),Iu=a(Y),u(at.$$.fragment,Y),Ju=a(Y),li=l(Y,"P",{"data-svelte-h":!0}),d(li)!=="svelte-1t1ea6f"&&(li.innerHTML=wf),Uu=a(Y),di=l(Y,"UL",{"data-svelte-h":!0}),d(di)!=="svelte-15ctb4a"&&(di.innerHTML=xf),Y.forEach(t),Xi.forEach(t),_l=a(e),u(jn.$$.fragment,e),bl=a(e),j=l(e,"DIV",{class:!0});var J=x(j);u(Cn.$$.fragment,J),Su=a(J),ci=l(J,"P",{"data-svelte-h":!0}),d(ci)!=="svelte-avfxjl"&&(ci.innerHTML=Mf),Pu=a(J),mi=l(J,"P",{"data-svelte-h":!0}),d(mi)!=="svelte-1yoivqo"&&(mi.innerHTML=$f),Lu=a(J),W=l(J,"DIV",{class:!0});var Me=x(W);u(In.$$.fragment,Me),Fu=a(Me),pi=l(Me,"P",{"data-svelte-h":!0}),d(pi)!=="svelte-hj8f41"&&(pi.textContent=kf),Nu=a(Me),ui=l(Me,"P",{"data-svelte-h":!0}),d(ui)!=="svelte-1iq1lj0"&&(ui.innerHTML=Af),zu=a(Me),hi=l(Me,"P",{"data-svelte-h":!0}),d(hi)!=="svelte-18bal86"&&(hi.innerHTML=qf),Wu=a(Me),gi=l(Me,"P",{"data-svelte-h":!0}),d(gi)!=="svelte-oacj0p"&&(gi.innerHTML=jf),Me.forEach(t),Du=a(J),rt=l(J,"DIV",{class:!0});var cm=x(rt);u(Jn.$$.fragment,cm),Hu=a(cm),fi=l(cm,"P",{"data-svelte-h":!0}),d(fi)!=="svelte-9pbc1"&&(fi.textContent=Cf),cm.forEach(t),Ru=a(J),fe=l(J,"DIV",{class:!0});var Gi=x(fe);u(Un.$$.fragment,Gi),Bu=a(Gi),_i=l(Gi,"P",{"data-svelte-h":!0}),d(_i)!=="svelte-13fy4lg"&&(_i.textContent=If),Eu=a(Gi),bi=l(Gi,"P",{"data-svelte-h":!0}),d(bi)!=="svelte-1aa165w"&&(bi.innerHTML=Jf),Gi.forEach(t),Vu=a(J),_e=l(J,"DIV",{class:!0});var Yi=x(_e);u(Sn.$$.fragment,Yi),Zu=a(Yi),yi=l(Yi,"P",{"data-svelte-h":!0}),d(yi)!=="svelte-12p68tr"&&(yi.textContent=Uf),Xu=a(Yi),u(st.$$.fragment,Yi),Yi.forEach(t),Gu=a(J),be=l(J,"DIV",{class:!0});var Oi=x(be);u(Pn.$$.fragment,Oi),Yu=a(Oi),vi=l(Oi,"P",{"data-svelte-h":!0}),d(vi)!=="svelte-9ywrxl"&&(vi.textContent=Sf),Ou=a(Oi),u(it.$$.fragment,Oi),Oi.forEach(t),Qu=a(J),ye=l(J,"DIV",{class:!0});var Qi=x(ye);u(Ln.$$.fragment,Qi),Ku=a(Qi),Ti=l(Qi,"P",{"data-svelte-h":!0}),d(Ti)!=="svelte-1lwqsi8"&&(Ti.textContent=Pf),eh=a(Qi),u(lt.$$.fragment,Qi),Qi.forEach(t),th=a(J),ve=l(J,"DIV",{class:!0});var Ki=x(ve);u(Fn.$$.fragment,Ki),nh=a(Ki),wi=l(Ki,"P",{"data-svelte-h":!0}),d(wi)!=="svelte-mc54aq"&&(wi.textContent=Lf),oh=a(Ki),u(dt.$$.fragment,Ki),Ki.forEach(t),ah=a(J),Te=l(J,"DIV",{class:!0});var el=x(Te);u(Nn.$$.fragment,el),rh=a(el),xi=l(el,"P",{"data-svelte-h":!0}),d(xi)!=="svelte-18hco78"&&(xi.textContent=Ff),sh=a(el),u(ct.$$.fragment,el),el.forEach(t),ih=a(J),V=l(J,"DIV",{class:!0});var qt=x(V);u(zn.$$.fragment,qt),lh=a(qt),Mi=l(qt,"P",{"data-svelte-h":!0}),d(Mi)!=="svelte-y1tcex"&&(Mi.textContent=Nf),dh=a(qt),u(mt.$$.fragment,qt),ch=a(qt),u(pt.$$.fragment,qt),qt.forEach(t),mh=a(J),we=l(J,"DIV",{class:!0});var tl=x(we);u(Wn.$$.fragment,tl),ph=a(tl),$i=l(tl,"P",{"data-svelte-h":!0}),d($i)!=="svelte-1duj623"&&($i.textContent=zf),uh=a(tl),u(ut.$$.fragment,tl),tl.forEach(t),hh=a(J),Z=l(J,"DIV",{class:!0});var jt=x(Z);u(Dn.$$.fragment,jt),gh=a(jt),ki=l(jt,"P",{"data-svelte-h":!0}),d(ki)!=="svelte-lhuo6p"&&(ki.textContent=Wf),fh=a(jt),u(ht.$$.fragment,jt),_h=a(jt),u(gt.$$.fragment,jt),jt.forEach(t),bh=a(J),X=l(J,"DIV",{class:!0});var Ct=x(X);u(Hn.$$.fragment,Ct),yh=a(Ct),Ai=l(Ct,"P",{"data-svelte-h":!0}),d(Ai)!=="svelte-1h65v06"&&(Ai.textContent=Df),vh=a(Ct),u(ft.$$.fragment,Ct),Th=a(Ct),u(_t.$$.fragment,Ct),Ct.forEach(t),wh=a(J),bt=l(J,"DIV",{class:!0});var mm=x(bt);u(Rn.$$.fragment,mm),xh=a(mm),qi=l(mm,"P",{"data-svelte-h":!0}),d(qi)!=="svelte-1ciob6u"&&(qi.innerHTML=Hf),mm.forEach(t),Mh=a(J),yt=l(J,"DIV",{class:!0});var pm=x(yt);u(Bn.$$.fragment,pm),$h=a(pm),ji=l(pm,"P",{"data-svelte-h":!0}),d(ji)!=="svelte-5ayq1f"&&(ji.textContent=Rf),pm.forEach(t),kh=a(J),vt=l(J,"DIV",{class:!0});var um=x(vt);u(En.$$.fragment,um),Ah=a(um),Ci=l(um,"P",{"data-svelte-h":!0}),d(Ci)!=="svelte-lg45ly"&&(Ci.textContent=Bf),um.forEach(t),J.forEach(t),yl=a(e),u(Vn.$$.fragment,e),vl=a(e),D=l(e,"DIV",{class:!0});var It=x(D);u(Zn.$$.fragment,It),qh=a(It),Ii=l(It,"P",{"data-svelte-h":!0}),d(Ii)!=="svelte-avfxjl"&&(Ii.innerHTML=Ef),jh=a(It),Ji=l(It,"P",{"data-svelte-h":!0}),d(Ji)!=="svelte-1yoivqo"&&(Ji.innerHTML=Vf),Ch=a(It),Tt=l(It,"DIV",{class:!0});var hm=x(Tt);u(Xn.$$.fragment,hm),Ih=a(hm),Ui=l(hm,"P",{"data-svelte-h":!0}),d(Ui)!=="svelte-yrflrv"&&(Ui.innerHTML=Zf),hm.forEach(t),It.forEach(t),Tl=a(e),u(Gn.$$.fragment,e),wl=a(e),Yn=l(e,"P",{"data-svelte-h":!0}),d(Yn)!=="svelte-55eop"&&(Yn.innerHTML=Xf),xl=a(e),On=l(e,"P",{"data-svelte-h":!0}),d(On)!=="svelte-1ectae4"&&(On.innerHTML=Gf),Ml=a(e),Qn=l(e,"UL",{"data-svelte-h":!0}),d(Qn)!=="svelte-1w2oero"&&(Qn.innerHTML=Yf),$l=a(e),Kn=l(e,"P",{"data-svelte-h":!0}),d(Kn)!=="svelte-16jtodh"&&(Kn.innerHTML=Of),kl=a(e),eo=l(e,"UL",{"data-svelte-h":!0}),d(eo)!=="svelte-9cmlap"&&(eo.innerHTML=Qf),Al=a(e),u(to.$$.fragment,e),ql=a(e),no=l(e,"P",{"data-svelte-h":!0}),d(no)!=="svelte-1ychk8c"&&(no.innerHTML=Kf),jl=a(e),oo=l(e,"P",{"data-svelte-h":!0}),d(oo)!=="svelte-19z1lto"&&(oo.innerHTML=e_),Cl=a(e),ao=l(e,"UL",{"data-svelte-h":!0}),d(ao)!=="svelte-1gs5ihu"&&(ao.innerHTML=t_),Il=a(e),ro=l(e,"P",{"data-svelte-h":!0}),d(ro)!=="svelte-y64s0x"&&(ro.innerHTML=n_),Jl=a(e),so=l(e,"P",{"data-svelte-h":!0}),d(so)!=="svelte-qfjzzn"&&(so.innerHTML=o_),Ul=a(e),io=l(e,"P",{"data-svelte-h":!0}),d(io)!=="svelte-t0gca0"&&(io.textContent=a_),Sl=a(e),u(lo.$$.fragment,e),Pl=a(e),co=l(e,"P",{"data-svelte-h":!0}),d(co)!=="svelte-14wgcuj"&&(co.textContent=r_),Ll=a(e),u(mo.$$.fragment,e),Fl=a(e),po=l(e,"P",{"data-svelte-h":!0}),d(po)!=="svelte-cong9"&&(po.textContent=s_),Nl=a(e),u(uo.$$.fragment,e),zl=a(e),ho=l(e,"P",{"data-svelte-h":!0}),d(ho)!=="svelte-gqoin8"&&(ho.textContent=i_),Wl=a(e),go=l(e,"P",{"data-svelte-h":!0}),d(go)!=="svelte-at3v05"&&(go.textContent=l_),Dl=a(e),u(fo.$$.fragment,e),Hl=a(e),_o=l(e,"P",{"data-svelte-h":!0}),d(_o)!=="svelte-eroj03"&&(_o.innerHTML=d_),Rl=a(e),u(bo.$$.fragment,e),Bl=a(e),yo=l(e,"P",{"data-svelte-h":!0}),d(yo)!=="svelte-ihmd3g"&&(yo.innerHTML=c_),El=a(e),vo=l(e,"P",{"data-svelte-h":!0}),d(vo)!=="svelte-1ynnmq3"&&(vo.innerHTML=m_),Vl=a(e),u(To.$$.fragment,e),Zl=a(e),wo=l(e,"P",{"data-svelte-h":!0}),d(wo)!=="svelte-aegtz3"&&(wo.textContent=p_),Xl=a(e),xo=l(e,"P",{"data-svelte-h":!0}),d(xo)!=="svelte-dm16xb"&&(xo.innerHTML=u_),Gl=a(e),u(Mo.$$.fragment,e),Yl=a(e),$o=l(e,"P",{"data-svelte-h":!0}),d($o)!=="svelte-ay9pn2"&&($o.innerHTML=h_),Ol=a(e),u(ko.$$.fragment,e),Ql=a(e),u(Ao.$$.fragment,e),Kl=a(e),qo=l(e,"P",{"data-svelte-h":!0}),d(qo)!=="svelte-1yvlrqz"&&(qo.innerHTML=g_),ed=a(e),jo=l(e,"P",{"data-svelte-h":!0}),d(jo)!=="svelte-95qu2c"&&(jo.textContent=f_),td=a(e),Co=l(e,"P",{"data-svelte-h":!0}),d(Co)!=="svelte-1ix8sdw"&&(Co.textContent=__),nd=a(e),Io=l(e,"P",{"data-svelte-h":!0}),d(Io)!=="svelte-1w89bwu"&&(Io.innerHTML=b_),od=a(e),Jo=l(e,"P",{"data-svelte-h":!0}),d(Jo)!=="svelte-jnbgek"&&(Jo.innerHTML=y_),ad=a(e),Uo=l(e,"P",{"data-svelte-h":!0}),d(Uo)!=="svelte-8rwpsh"&&(Uo.textContent=v_),rd=a(e),u(So.$$.fragment,e),sd=a(e),Po=l(e,"P",{"data-svelte-h":!0}),d(Po)!=="svelte-psnjqi"&&(Po.innerHTML=T_),id=a(e),Lo=l(e,"P",{"data-svelte-h":!0}),d(Lo)!=="svelte-aa2f2r"&&(Lo.textContent=w_),ld=a(e),u(Fo.$$.fragment,e),dd=a(e),No=l(e,"P",{"data-svelte-h":!0}),d(No)!=="svelte-q3twea"&&(No.innerHTML=x_),cd=a(e),zo=l(e,"P",{"data-svelte-h":!0}),d(zo)!=="svelte-1skzhs8"&&(zo.innerHTML=M_),md=a(e),u(Wo.$$.fragment,e),pd=a(e),Do=l(e,"P",{"data-svelte-h":!0}),d(Do)!=="svelte-7zdyb3"&&(Do.textContent=$_),ud=a(e),u(Ho.$$.fragment,e),hd=a(e),Ro=l(e,"P",{"data-svelte-h":!0}),d(Ro)!=="svelte-tulmmy"&&(Ro.textContent=k_),gd=a(e),u(Bo.$$.fragment,e),fd=a(e),Eo=l(e,"P",{"data-svelte-h":!0}),d(Eo)!=="svelte-s8042f"&&(Eo.textContent=A_),_d=a(e),Vo=l(e,"P",{"data-svelte-h":!0}),d(Vo)!=="svelte-sdywfx"&&(Vo.innerHTML=q_),bd=a(e),Zo=l(e,"P",{"data-svelte-h":!0}),d(Zo)!=="svelte-1qsxvrx"&&(Zo.innerHTML=j_),yd=a(e),Xo=l(e,"OL",{"data-svelte-h":!0}),d(Xo)!=="svelte-1kz51cn"&&(Xo.innerHTML=C_),vd=a(e),u(Go.$$.fragment,e),Td=a(e),wt=l(e,"OL",{start:!0,"data-svelte-h":!0}),d(wt)!=="svelte-1djpz3l"&&(wt.innerHTML=I_),wd=a(e),u(Yo.$$.fragment,e),xd=a(e),Oo=l(e,"P",{"data-svelte-h":!0}),d(Oo)!=="svelte-szcwrk"&&(Oo.innerHTML=J_),Md=a(e),Qo=l(e,"P",{"data-svelte-h":!0}),d(Qo)!=="svelte-9mlq15"&&(Qo.textContent=U_),$d=a(e),u(Ko.$$.fragment,e),kd=a(e),ea=l(e,"P",{"data-svelte-h":!0}),d(ea)!=="svelte-1r0acxx"&&(ea.textContent=S_),Ad=a(e),ta=l(e,"P",{"data-svelte-h":!0}),d(ta)!=="svelte-1eya7y2"&&(ta.innerHTML=P_),qd=a(e),u(na.$$.fragment,e),jd=a(e),oa=l(e,"P",{"data-svelte-h":!0}),d(oa)!=="svelte-svtyeh"&&(oa.innerHTML=L_),Cd=a(e),aa=l(e,"P",{"data-svelte-h":!0}),d(aa)!=="svelte-dz9icu"&&(aa.innerHTML=F_),Id=a(e),ra=l(e,"P",{"data-svelte-h":!0}),d(ra)!=="svelte-1dpps5f"&&(ra.innerHTML=N_),Jd=a(e),Si=l(e,"A",{id:!0}),x(Si).forEach(t),Ud=a(e),u(sa.$$.fragment,e),Sd=a(e),ia=l(e,"P",{"data-svelte-h":!0}),d(ia)!=="svelte-1b35xlq"&&(ia.textContent=z_),Pd=a(e),la=l(e,"P",{"data-svelte-h":!0}),d(la)!=="svelte-o7gi5m"&&(la.innerHTML=W_),Ld=a(e),da=l(e,"P",{"data-svelte-h":!0}),d(da)!=="svelte-1v27qwc"&&(da.textContent=D_),Fd=a(e),u(ca.$$.fragment,e),Nd=a(e),ma=l(e,"P",{"data-svelte-h":!0}),d(ma)!=="svelte-uj3xld"&&(ma.textContent=H_),zd=a(e),pa=l(e,"P",{"data-svelte-h":!0}),d(pa)!=="svelte-49sfau"&&(pa.innerHTML=R_),Wd=a(e),u(ua.$$.fragment,e),Dd=a(e),ha=l(e,"P",{"data-svelte-h":!0}),d(ha)!=="svelte-1ffp4kp"&&(ha.textContent=B_),Hd=a(e),ga=l(e,"P",{"data-svelte-h":!0}),d(ga)!=="svelte-hm1f2i"&&(ga.innerHTML=E_),Rd=a(e),fa=l(e,"P",{"data-svelte-h":!0}),d(fa)!=="svelte-8hws2o"&&(fa.innerHTML=V_),Bd=a(e),u(_a.$$.fragment,e),Ed=a(e),ba=l(e,"P",{"data-svelte-h":!0}),d(ba)!=="svelte-1j5z7o5"&&(ba.innerHTML=Z_),Vd=a(e),u(ya.$$.fragment,e),Zd=a(e),va=l(e,"P",{"data-svelte-h":!0}),d(va)!=="svelte-lqn4cc"&&(va.textContent=X_),Xd=a(e),u(Ta.$$.fragment,e),Gd=a(e),wa=l(e,"P",{"data-svelte-h":!0}),d(wa)!=="svelte-wafl9j"&&(wa.innerHTML=G_),Yd=a(e),xa=l(e,"P",{"data-svelte-h":!0}),d(xa)!=="svelte-zce8ig"&&(xa.textContent=Y_),Od=a(e),u(Ma.$$.fragment,e),Qd=a(e),$a=l(e,"P",{"data-svelte-h":!0}),d($a)!=="svelte-1y2vy70"&&($a.textContent=O_),Kd=a(e),ka=l(e,"P",{"data-svelte-h":!0}),d(ka)!=="svelte-16f2xn7"&&(ka.innerHTML=Q_),ec=a(e),Aa=l(e,"P",{"data-svelte-h":!0}),d(Aa)!=="svelte-croqf5"&&(Aa.innerHTML=K_),tc=a(e),qa=l(e,"P",{"data-svelte-h":!0}),d(qa)!=="svelte-12x6lyt"&&(qa.textContent=eb),nc=a(e),u(ja.$$.fragment,e),oc=a(e),Ca=l(e,"P",{"data-svelte-h":!0}),d(Ca)!=="svelte-1njfrnl"&&(Ca.textContent=tb),ac=a(e),Ia=l(e,"P",{"data-svelte-h":!0}),d(Ia)!=="svelte-fzncb8"&&(Ia.innerHTML=nb),rc=a(e),u(Ja.$$.fragment,e),sc=a(e),Ua=l(e,"P",{"data-svelte-h":!0}),d(Ua)!=="svelte-1b06b2y"&&(Ua.innerHTML=ob),ic=a(e),Sa=l(e,"P",{"data-svelte-h":!0}),d(Sa)!=="svelte-1eni2dm"&&(Sa.textContent=ab),lc=a(e),Pa=l(e,"P",{"data-svelte-h":!0}),d(Pa)!=="svelte-12sejvd"&&(Pa.textContent=rb),dc=a(e),La=l(e,"P",{"data-svelte-h":!0}),d(La)!=="svelte-ickurv"&&(La.innerHTML=sb),cc=a(e),u(Fa.$$.fragment,e),mc=a(e),Na=l(e,"P",{"data-svelte-h":!0}),d(Na)!=="svelte-1evqfg"&&(Na.innerHTML=ib),pc=a(e),za=l(e,"P",{"data-svelte-h":!0}),d(za)!=="svelte-1e8ixef"&&(za.textContent=lb),uc=a(e),u(Wa.$$.fragment,e),hc=a(e),Da=l(e,"P",{"data-svelte-h":!0}),d(Da)!=="svelte-qnvjvw"&&(Da.innerHTML=db),gc=a(e),Ha=l(e,"P",{"data-svelte-h":!0}),d(Ha)!=="svelte-xouvv1"&&(Ha.innerHTML=cb),fc=a(e),Ra=l(e,"P",{"data-svelte-h":!0}),d(Ra)!=="svelte-1em5vys"&&(Ra.innerHTML=mb),_c=a(e),Ba=l(e,"UL",{"data-svelte-h":!0}),d(Ba)!=="svelte-jy5sta"&&(Ba.innerHTML=pb),bc=a(e),Ea=l(e,"P",{"data-svelte-h":!0}),d(Ea)!=="svelte-lrtyq1"&&(Ea.innerHTML=ub),yc=a(e),Va=l(e,"UL",{"data-svelte-h":!0}),d(Va)!=="svelte-1lhgyfl"&&(Va.innerHTML=hb),vc=a(e),u(Za.$$.fragment,e),Tc=a(e),Xa=l(e,"P",{"data-svelte-h":!0}),d(Xa)!=="svelte-11lx8au"&&(Xa.innerHTML=gb),wc=a(e),Ga=l(e,"P",{"data-svelte-h":!0}),d(Ga)!=="svelte-v0nlbv"&&(Ga.innerHTML=fb),xc=a(e),Ya=l(e,"P",{"data-svelte-h":!0}),d(Ya)!=="svelte-1em5vys"&&(Ya.innerHTML=_b),Mc=a(e),Oa=l(e,"P",{"data-svelte-h":!0}),d(Oa)!=="svelte-ipyd4l"&&(Oa.innerHTML=bb),$c=a(e),Qa=l(e,"UL",{"data-svelte-h":!0}),d(Qa)!=="svelte-wk5anb"&&(Qa.innerHTML=yb),kc=a(e),u(Ka.$$.fragment,e),Ac=a(e),er=l(e,"P",{"data-svelte-h":!0}),d(er)!=="svelte-gro02w"&&(er.innerHTML=vb),qc=a(e),u(xt.$$.fragment,e),jc=a(e),tr=l(e,"P",{"data-svelte-h":!0}),d(tr)!=="svelte-15ovuki"&&(tr.innerHTML=Tb),Cc=a(e),nr=l(e,"OL",{"data-svelte-h":!0}),d(nr)!=="svelte-oq3rck"&&(nr.innerHTML=wb),Ic=a(e),or=l(e,"P",{"data-svelte-h":!0}),d(or)!=="svelte-1kbpcbh"&&(or.innerHTML=xb),Jc=a(e),ar=l(e,"P",{"data-svelte-h":!0}),d(ar)!=="svelte-hzy396"&&(ar.innerHTML=Mb),Uc=a(e),u(rr.$$.fragment,e),Sc=a(e),sr=l(e,"P",{"data-svelte-h":!0}),d(sr)!=="svelte-64cgnu"&&(sr.innerHTML=$b),Pc=a(e),ir=l(e,"OL",{"data-svelte-h":!0}),d(ir)!=="svelte-7xuqdx"&&(ir.innerHTML=kb),Lc=a(e),lr=l(e,"P",{"data-svelte-h":!0}),d(lr)!=="svelte-b1fgcl"&&(lr.innerHTML=Ab),Fc=a(e),u(dr.$$.fragment,e),Nc=a(e),cr=l(e,"P",{"data-svelte-h":!0}),d(cr)!=="svelte-1hs3lj1"&&(cr.textContent=qb),zc=a(e),mr=l(e,"UL",{"data-svelte-h":!0}),d(mr)!=="svelte-1a0sr4"&&(mr.innerHTML=jb),Wc=a(e),pr=l(e,"P",{"data-svelte-h":!0}),d(pr)!=="svelte-lzqhuz"&&(pr.textContent=Cb),Dc=a(e),xe=l(e,"OL",{});var nl=x(xe);Pi=l(nl,"LI",{"data-svelte-h":!0}),d(Pi)!=="svelte-1fxe6k6"&&(Pi.innerHTML=Ib),Jh=a(nl),P=l(nl,"LI",{});var z=x(P);Li=l(z,"P",{"data-svelte-h":!0}),d(Li)!=="svelte-1inrfkf"&&(Li.innerHTML=Jb),Uh=a(z),u(ur.$$.fragment,z),Sh=a(z),Fi=l(z,"P",{"data-svelte-h":!0}),d(Fi)!=="svelte-1j5721n"&&(Fi.textContent=Ub),Ph=a(z),u(hr.$$.fragment,z),Lh=a(z),Ni=l(z,"P",{"data-svelte-h":!0}),d(Ni)!=="svelte-1mf14u2"&&(Ni.textContent=Sb),Fh=a(z),u(gr.$$.fragment,z),Nh=a(z),zi=l(z,"P",{"data-svelte-h":!0}),d(zi)!=="svelte-90l30h"&&(zi.textContent=Pb),zh=a(z),u(fr.$$.fragment,z),z.forEach(t),Wh=a(nl),Wi=l(nl,"LI",{"data-svelte-h":!0}),d(Wi)!=="svelte-1jrss5h"&&(Wi.innerHTML=Lb),nl.forEach(t),Hc=a(e),u(_r.$$.fragment,e),Rc=a(e),Mt=l(e,"OL",{start:!0,"data-svelte-h":!0}),d(Mt)!=="svelte-1f7pbxi"&&(Mt.innerHTML=Fb),Bc=a(e),u(br.$$.fragment,e),Ec=a(e),yr=l(e,"P",{"data-svelte-h":!0}),d(yr)!=="svelte-1quc4l2"&&(yr.innerHTML=Nb),Vc=a(e),vr=l(e,"P",{"data-svelte-h":!0}),d(vr)!=="svelte-15d4ygl"&&(vr.textContent=zb),Zc=a(e),Tr=l(e,"P",{"data-svelte-h":!0}),d(Tr)!=="svelte-f4ziqx"&&(Tr.innerHTML=Wb),Xc=a(e),u(wr.$$.fragment,e),Gc=a(e),xr=l(e,"P",{"data-svelte-h":!0}),d(xr)!=="svelte-he45gr"&&(xr.textContent=Db),Yc=a(e),Mr=l(e,"BLOCKQUOTE",{"data-svelte-h":!0}),d(Mr)!=="svelte-15ofg2l"&&(Mr.innerHTML=Hb),Oc=a(e),$t=l(e,"DIV",{style:!0,"data-svelte-h":!0}),d($t)!=="svelte-1wkjgyb"&&($t.innerHTML=Rb),Qc=a(e),$r=l(e,"P",{"data-svelte-h":!0}),d($r)!=="svelte-1x8xibn"&&($r.innerHTML=Bb),Kc=a(e),u(kr.$$.fragment,e),em=a(e),ol=l(e,"P",{}),x(ol).forEach(t),this.h()},h(){M(c,"name","hf:doc:metadata"),M(c,"content",by),M(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(wt,"start","2"),M(Si,"id","zero-install-notes"),M(Mt,"start","4"),Yb($t,"text-align","center")},m(e,n){r(document.head,c),s(e,w,n),s(e,b,n),s(e,y,n),h($,e,n),s(e,m,n),s(e,A,n),s(e,al,n),h(Le,e,n),s(e,rl,n),s(e,Jt,n),s(e,sl,n),s(e,Ut,n),s(e,il,n),s(e,St,n),s(e,ll,n),s(e,Pt,n),s(e,dl,n),h(Fe,e,n),s(e,cl,n),s(e,Lt,n),s(e,ml,n),h(Ft,e,n),s(e,pl,n),s(e,Nt,n),s(e,ul,n),h(zt,e,n),s(e,hl,n),s(e,v,n),h(Wt,v,null),r(v,gm),r(v,Pr),r(v,fm),r(v,Lr),r(v,_m),r(v,Fr),r(v,bm),r(v,Ne),h(Dt,Ne,null),r(Ne,ym),r(Ne,Nr),r(v,vm),r(v,ze),h(Ht,ze,null),r(ze,Tm),r(ze,zr),r(v,wm),r(v,ee),h(Rt,ee,null),r(ee,xm),r(ee,Wr),r(ee,Mm),r(ee,Dr),r(v,$m),r(v,We),h(Bt,We,null),r(We,km),r(We,Hr),r(v,Am),r(v,De),h(Et,De,null),r(De,qm),r(De,Rr),r(v,jm),r(v,te),h(Vt,te,null),r(te,Cm),r(te,Br),r(te,Im),r(te,Er),r(v,Jm),r(v,ne),h(Zt,ne,null),r(ne,Um),r(ne,Vr),r(ne,Sm),r(ne,Zr),r(v,Pm),r(v,He),h(Xt,He,null),r(He,Lm),r(He,Xr),r(v,Fm),r(v,H),h(Gt,H,null),r(H,Nm),r(H,Gr),r(H,zm),r(H,Yr),r(H,Wm),r(H,Or),r(v,Dm),r(v,oe),h(Yt,oe,null),r(oe,Hm),r(oe,Qr),r(oe,Rm),r(oe,Kr),r(v,Bm),r(v,Re),h(Ot,Re,null),r(Re,Em),r(Re,es),r(v,Vm),r(v,ae),h(Qt,ae,null),r(ae,Zm),r(ae,ts),r(ae,Xm),r(ae,ns),r(v,Gm),r(v,re),h(Kt,re,null),r(re,Ym),r(re,os),r(re,Om),r(re,as),r(v,Qm),r(v,Be),h(en,Be,null),r(Be,Km),r(Be,rs),r(v,ep),r(v,se),h(tn,se,null),r(se,tp),r(se,ss),r(se,np),r(se,is),r(v,op),r(v,R),h(nn,R,null),r(R,ap),r(R,ls),r(R,rp),r(R,ds),r(R,sp),r(R,cs),r(v,ip),r(v,ie),h(on,ie,null),r(ie,lp),r(ie,ms),r(ie,dp),h(Ee,ie,null),r(v,cp),r(v,le),h(an,le,null),r(le,mp),r(le,ps),r(le,pp),h(Ve,le,null),r(v,up),r(v,Ze),h(rn,Ze,null),r(Ze,hp),r(Ze,us),r(v,gp),r(v,Xe),h(sn,Xe,null),r(Xe,fp),r(Xe,hs),r(v,_p),r(v,Ge),h(ln,Ge,null),r(Ge,bp),r(Ge,gs),r(v,yp),r(v,de),h(dn,de,null),r(de,vp),r(de,fs),r(de,Tp),r(de,_s),r(v,wp),r(v,I),h(cn,I,null),r(I,xp),r(I,bs),r(I,Mp),r(I,ys),r(I,$p),r(I,vs),r(I,kp),r(I,Ts),r(I,Ap),h(Ye,I,null),r(I,qp),r(I,ws),r(I,jp),r(I,xs),r(I,Cp),r(I,Ms),r(I,Ip),r(I,$s),r(I,Jp),r(I,ks),r(I,Up),r(I,As),r(I,Sp),r(I,qs),r(I,Pp),r(I,js),r(I,Lp),r(I,Cs),r(I,Fp),r(I,Is),r(v,Np),r(v,Oe),h(mn,Oe,null),r(Oe,zp),r(Oe,Js),r(v,Wp),r(v,Qe),h(pn,Qe,null),r(Qe,Dp),r(Qe,Us),r(v,Hp),r(v,Ke),h(un,Ke,null),r(Ke,Rp),r(Ke,Ss),r(v,Bp),r(v,ce),h(hn,ce,null),r(ce,Ep),r(ce,Ps),r(ce,Vp),r(ce,Ls),r(v,Zp),r(v,F),h(gn,F,null),r(F,Xp),r(F,Fs),r(F,Gp),r(F,Ns),r(F,Yp),h(et,F,null),r(F,Op),r(F,zs),r(F,Qp),r(F,Ws),r(v,Kp),r(v,me),h(fn,me,null),r(me,eu),r(me,Ds),r(me,tu),r(me,Hs),r(v,nu),r(v,pe),h(_n,pe,null),r(pe,ou),r(pe,Rs),r(pe,au),r(pe,Bs),r(v,ru),r(v,tt),h(bn,tt,null),r(tt,su),r(tt,Es),r(v,iu),r(v,nt),h(yn,nt,null),r(nt,lu),r(nt,Vs),r(v,du),r(v,B),h(vn,B,null),r(B,cu),r(B,Zs),r(B,mu),r(B,Xs),r(B,pu),r(B,Gs),r(v,uu),r(v,ue),h(Tn,ue,null),r(ue,hu),r(ue,Ys),r(ue,gu),r(ue,Os),r(v,fu),r(v,he),h(wn,he,null),r(he,_u),r(he,Qs),r(he,bu),r(he,Ks),r(v,yu),r(v,ot),h(xn,ot,null),r(ot,vu),r(ot,ei),r(v,Tu),r(v,ge),h(Mn,ge,null),r(ge,wu),r(ge,ti),r(ge,xu),r(ge,ni),s(e,gl,n),h($n,e,n),s(e,fl,n),s(e,O,n),h(kn,O,null),r(O,Mu),r(O,E),h(An,E,null),r(E,$u),r(E,oi),r(E,ku),r(E,ai),r(E,Au),r(E,ri),r(O,qu),r(O,N),h(qn,N,null),r(N,ju),r(N,si),r(N,Cu),r(N,ii),r(N,Iu),h(at,N,null),r(N,Ju),r(N,li),r(N,Uu),r(N,di),s(e,_l,n),h(jn,e,n),s(e,bl,n),s(e,j,n),h(Cn,j,null),r(j,Su),r(j,ci),r(j,Pu),r(j,mi),r(j,Lu),r(j,W),h(In,W,null),r(W,Fu),r(W,pi),r(W,Nu),r(W,ui),r(W,zu),r(W,hi),r(W,Wu),r(W,gi),r(j,Du),r(j,rt),h(Jn,rt,null),r(rt,Hu),r(rt,fi),r(j,Ru),r(j,fe),h(Un,fe,null),r(fe,Bu),r(fe,_i),r(fe,Eu),r(fe,bi),r(j,Vu),r(j,_e),h(Sn,_e,null),r(_e,Zu),r(_e,yi),r(_e,Xu),h(st,_e,null),r(j,Gu),r(j,be),h(Pn,be,null),r(be,Yu),r(be,vi),r(be,Ou),h(it,be,null),r(j,Qu),r(j,ye),h(Ln,ye,null),r(ye,Ku),r(ye,Ti),r(ye,eh),h(lt,ye,null),r(j,th),r(j,ve),h(Fn,ve,null),r(ve,nh),r(ve,wi),r(ve,oh),h(dt,ve,null),r(j,ah),r(j,Te),h(Nn,Te,null),r(Te,rh),r(Te,xi),r(Te,sh),h(ct,Te,null),r(j,ih),r(j,V),h(zn,V,null),r(V,lh),r(V,Mi),r(V,dh),h(mt,V,null),r(V,ch),h(pt,V,null),r(j,mh),r(j,we),h(Wn,we,null),r(we,ph),r(we,$i),r(we,uh),h(ut,we,null),r(j,hh),r(j,Z),h(Dn,Z,null),r(Z,gh),r(Z,ki),r(Z,fh),h(ht,Z,null),r(Z,_h),h(gt,Z,null),r(j,bh),r(j,X),h(Hn,X,null),r(X,yh),r(X,Ai),r(X,vh),h(ft,X,null),r(X,Th),h(_t,X,null),r(j,wh),r(j,bt),h(Rn,bt,null),r(bt,xh),r(bt,qi),r(j,Mh),r(j,yt),h(Bn,yt,null),r(yt,$h),r(yt,ji),r(j,kh),r(j,vt),h(En,vt,null),r(vt,Ah),r(vt,Ci),s(e,yl,n),h(Vn,e,n),s(e,vl,n),s(e,D,n),h(Zn,D,null),r(D,qh),r(D,Ii),r(D,jh),r(D,Ji),r(D,Ch),r(D,Tt),h(Xn,Tt,null),r(Tt,Ih),r(Tt,Ui),s(e,Tl,n),h(Gn,e,n),s(e,wl,n),s(e,Yn,n),s(e,xl,n),s(e,On,n),s(e,Ml,n),s(e,Qn,n),s(e,$l,n),s(e,Kn,n),s(e,kl,n),s(e,eo,n),s(e,Al,n),h(to,e,n),s(e,ql,n),s(e,no,n),s(e,jl,n),s(e,oo,n),s(e,Cl,n),s(e,ao,n),s(e,Il,n),s(e,ro,n),s(e,Jl,n),s(e,so,n),s(e,Ul,n),s(e,io,n),s(e,Sl,n),h(lo,e,n),s(e,Pl,n),s(e,co,n),s(e,Ll,n),h(mo,e,n),s(e,Fl,n),s(e,po,n),s(e,Nl,n),h(uo,e,n),s(e,zl,n),s(e,ho,n),s(e,Wl,n),s(e,go,n),s(e,Dl,n),h(fo,e,n),s(e,Hl,n),s(e,_o,n),s(e,Rl,n),h(bo,e,n),s(e,Bl,n),s(e,yo,n),s(e,El,n),s(e,vo,n),s(e,Vl,n),h(To,e,n),s(e,Zl,n),s(e,wo,n),s(e,Xl,n),s(e,xo,n),s(e,Gl,n),h(Mo,e,n),s(e,Yl,n),s(e,$o,n),s(e,Ol,n),h(ko,e,n),s(e,Ql,n),h(Ao,e,n),s(e,Kl,n),s(e,qo,n),s(e,ed,n),s(e,jo,n),s(e,td,n),s(e,Co,n),s(e,nd,n),s(e,Io,n),s(e,od,n),s(e,Jo,n),s(e,ad,n),s(e,Uo,n),s(e,rd,n),h(So,e,n),s(e,sd,n),s(e,Po,n),s(e,id,n),s(e,Lo,n),s(e,ld,n),h(Fo,e,n),s(e,dd,n),s(e,No,n),s(e,cd,n),s(e,zo,n),s(e,md,n),h(Wo,e,n),s(e,pd,n),s(e,Do,n),s(e,ud,n),h(Ho,e,n),s(e,hd,n),s(e,Ro,n),s(e,gd,n),h(Bo,e,n),s(e,fd,n),s(e,Eo,n),s(e,_d,n),s(e,Vo,n),s(e,bd,n),s(e,Zo,n),s(e,yd,n),s(e,Xo,n),s(e,vd,n),h(Go,e,n),s(e,Td,n),s(e,wt,n),s(e,wd,n),h(Yo,e,n),s(e,xd,n),s(e,Oo,n),s(e,Md,n),s(e,Qo,n),s(e,$d,n),h(Ko,e,n),s(e,kd,n),s(e,ea,n),s(e,Ad,n),s(e,ta,n),s(e,qd,n),h(na,e,n),s(e,jd,n),s(e,oa,n),s(e,Cd,n),s(e,aa,n),s(e,Id,n),s(e,ra,n),s(e,Jd,n),s(e,Si,n),s(e,Ud,n),h(sa,e,n),s(e,Sd,n),s(e,ia,n),s(e,Pd,n),s(e,la,n),s(e,Ld,n),s(e,da,n),s(e,Fd,n),h(ca,e,n),s(e,Nd,n),s(e,ma,n),s(e,zd,n),s(e,pa,n),s(e,Wd,n),h(ua,e,n),s(e,Dd,n),s(e,ha,n),s(e,Hd,n),s(e,ga,n),s(e,Rd,n),s(e,fa,n),s(e,Bd,n),h(_a,e,n),s(e,Ed,n),s(e,ba,n),s(e,Vd,n),h(ya,e,n),s(e,Zd,n),s(e,va,n),s(e,Xd,n),h(Ta,e,n),s(e,Gd,n),s(e,wa,n),s(e,Yd,n),s(e,xa,n),s(e,Od,n),h(Ma,e,n),s(e,Qd,n),s(e,$a,n),s(e,Kd,n),s(e,ka,n),s(e,ec,n),s(e,Aa,n),s(e,tc,n),s(e,qa,n),s(e,nc,n),h(ja,e,n),s(e,oc,n),s(e,Ca,n),s(e,ac,n),s(e,Ia,n),s(e,rc,n),h(Ja,e,n),s(e,sc,n),s(e,Ua,n),s(e,ic,n),s(e,Sa,n),s(e,lc,n),s(e,Pa,n),s(e,dc,n),s(e,La,n),s(e,cc,n),h(Fa,e,n),s(e,mc,n),s(e,Na,n),s(e,pc,n),s(e,za,n),s(e,uc,n),h(Wa,e,n),s(e,hc,n),s(e,Da,n),s(e,gc,n),s(e,Ha,n),s(e,fc,n),s(e,Ra,n),s(e,_c,n),s(e,Ba,n),s(e,bc,n),s(e,Ea,n),s(e,yc,n),s(e,Va,n),s(e,vc,n),h(Za,e,n),s(e,Tc,n),s(e,Xa,n),s(e,wc,n),s(e,Ga,n),s(e,xc,n),s(e,Ya,n),s(e,Mc,n),s(e,Oa,n),s(e,$c,n),s(e,Qa,n),s(e,kc,n),h(Ka,e,n),s(e,Ac,n),s(e,er,n),s(e,qc,n),h(xt,e,n),s(e,jc,n),s(e,tr,n),s(e,Cc,n),s(e,nr,n),s(e,Ic,n),s(e,or,n),s(e,Jc,n),s(e,ar,n),s(e,Uc,n),h(rr,e,n),s(e,Sc,n),s(e,sr,n),s(e,Pc,n),s(e,ir,n),s(e,Lc,n),s(e,lr,n),s(e,Fc,n),h(dr,e,n),s(e,Nc,n),s(e,cr,n),s(e,zc,n),s(e,mr,n),s(e,Wc,n),s(e,pr,n),s(e,Dc,n),s(e,xe,n),r(xe,Pi),r(xe,Jh),r(xe,P),r(P,Li),r(P,Uh),h(ur,P,null),r(P,Sh),r(P,Fi),r(P,Ph),h(hr,P,null),r(P,Lh),r(P,Ni),r(P,Fh),h(gr,P,null),r(P,Nh),r(P,zi),r(P,zh),h(fr,P,null),r(xe,Wh),r(xe,Wi),s(e,Hc,n),h(_r,e,n),s(e,Rc,n),s(e,Mt,n),s(e,Bc,n),h(br,e,n),s(e,Ec,n),s(e,yr,n),s(e,Vc,n),s(e,vr,n),s(e,Zc,n),s(e,Tr,n),s(e,Xc,n),h(wr,e,n),s(e,Gc,n),s(e,xr,n),s(e,Yc,n),s(e,Mr,n),s(e,Oc,n),s(e,$t,n),s(e,Qc,n),s(e,$r,n),s(e,Kc,n),h(kr,e,n),s(e,em,n),s(e,ol,n),tm=!0},p(e,[n]){const T={};n&2&&(T.$$scope={dirty:n,ctx:e}),Le.$set(T);const Ar={};n&2&&(Ar.$$scope={dirty:n,ctx:e}),Fe.$set(Ar);const qr={};n&2&&(qr.$$scope={dirty:n,ctx:e}),Ee.$set(qr);const Ae={};n&2&&(Ae.$$scope={dirty:n,ctx:e}),Ve.$set(Ae);const jr={};n&2&&(jr.$$scope={dirty:n,ctx:e}),Ye.$set(jr);const Cr={};n&2&&(Cr.$$scope={dirty:n,ctx:e}),et.$set(Cr);const qe={};n&2&&(qe.$$scope={dirty:n,ctx:e}),at.$set(qe);const je={};n&2&&(je.$$scope={dirty:n,ctx:e}),st.$set(je);const Ir={};n&2&&(Ir.$$scope={dirty:n,ctx:e}),it.$set(Ir);const Q={};n&2&&(Q.$$scope={dirty:n,ctx:e}),lt.$set(Q);const Ce={};n&2&&(Ce.$$scope={dirty:n,ctx:e}),dt.$set(Ce);const Jr={};n&2&&(Jr.$$scope={dirty:n,ctx:e}),ct.$set(Jr);const Ie={};n&2&&(Ie.$$scope={dirty:n,ctx:e}),mt.$set(Ie);const Je={};n&2&&(Je.$$scope={dirty:n,ctx:e}),pt.$set(Je);const Ur={};n&2&&(Ur.$$scope={dirty:n,ctx:e}),ut.$set(Ur);const Ue={};n&2&&(Ue.$$scope={dirty:n,ctx:e}),ht.$set(Ue);const K={};n&2&&(K.$$scope={dirty:n,ctx:e}),gt.$set(K);const Se={};n&2&&(Se.$$scope={dirty:n,ctx:e}),ft.$set(Se);const Pe={};n&2&&(Pe.$$scope={dirty:n,ctx:e}),_t.$set(Pe);const Sr={};n&2&&(Sr.$$scope={dirty:n,ctx:e}),xt.$set(Sr)},i(e){tm||(g($.$$.fragment,e),g(Le.$$.fragment,e),g(Fe.$$.fragment,e),g(Ft.$$.fragment,e),g(zt.$$.fragment,e),g(Wt.$$.fragment,e),g(Dt.$$.fragment,e),g(Ht.$$.fragment,e),g(Rt.$$.fragment,e),g(Bt.$$.fragment,e),g(Et.$$.fragment,e),g(Vt.$$.fragment,e),g(Zt.$$.fragment,e),g(Xt.$$.fragment,e),g(Gt.$$.fragment,e),g(Yt.$$.fragment,e),g(Ot.$$.fragment,e),g(Qt.$$.fragment,e),g(Kt.$$.fragment,e),g(en.$$.fragment,e),g(tn.$$.fragment,e),g(nn.$$.fragment,e),g(on.$$.fragment,e),g(Ee.$$.fragment,e),g(an.$$.fragment,e),g(Ve.$$.fragment,e),g(rn.$$.fragment,e),g(sn.$$.fragment,e),g(ln.$$.fragment,e),g(dn.$$.fragment,e),g(cn.$$.fragment,e),g(Ye.$$.fragment,e),g(mn.$$.fragment,e),g(pn.$$.fragment,e),g(un.$$.fragment,e),g(hn.$$.fragment,e),g(gn.$$.fragment,e),g(et.$$.fragment,e),g(fn.$$.fragment,e),g(_n.$$.fragment,e),g(bn.$$.fragment,e),g(yn.$$.fragment,e),g(vn.$$.fragment,e),g(Tn.$$.fragment,e),g(wn.$$.fragment,e),g(xn.$$.fragment,e),g(Mn.$$.fragment,e),g($n.$$.fragment,e),g(kn.$$.fragment,e),g(An.$$.fragment,e),g(qn.$$.fragment,e),g(at.$$.fragment,e),g(jn.$$.fragment,e),g(Cn.$$.fragment,e),g(In.$$.fragment,e),g(Jn.$$.fragment,e),g(Un.$$.fragment,e),g(Sn.$$.fragment,e),g(st.$$.fragment,e),g(Pn.$$.fragment,e),g(it.$$.fragment,e),g(Ln.$$.fragment,e),g(lt.$$.fragment,e),g(Fn.$$.fragment,e),g(dt.$$.fragment,e),g(Nn.$$.fragment,e),g(ct.$$.fragment,e),g(zn.$$.fragment,e),g(mt.$$.fragment,e),g(pt.$$.fragment,e),g(Wn.$$.fragment,e),g(ut.$$.fragment,e),g(Dn.$$.fragment,e),g(ht.$$.fragment,e),g(gt.$$.fragment,e),g(Hn.$$.fragment,e),g(ft.$$.fragment,e),g(_t.$$.fragment,e),g(Rn.$$.fragment,e),g(Bn.$$.fragment,e),g(En.$$.fragment,e),g(Vn.$$.fragment,e),g(Zn.$$.fragment,e),g(Xn.$$.fragment,e),g(Gn.$$.fragment,e),g(to.$$.fragment,e),g(lo.$$.fragment,e),g(mo.$$.fragment,e),g(uo.$$.fragment,e),g(fo.$$.fragment,e),g(bo.$$.fragment,e),g(To.$$.fragment,e),g(Mo.$$.fragment,e),g(ko.$$.fragment,e),g(Ao.$$.fragment,e),g(So.$$.fragment,e),g(Fo.$$.fragment,e),g(Wo.$$.fragment,e),g(Ho.$$.fragment,e),g(Bo.$$.fragment,e),g(Go.$$.fragment,e),g(Yo.$$.fragment,e),g(Ko.$$.fragment,e),g(na.$$.fragment,e),g(sa.$$.fragment,e),g(ca.$$.fragment,e),g(ua.$$.fragment,e),g(_a.$$.fragment,e),g(ya.$$.fragment,e),g(Ta.$$.fragment,e),g(Ma.$$.fragment,e),g(ja.$$.fragment,e),g(Ja.$$.fragment,e),g(Fa.$$.fragment,e),g(Wa.$$.fragment,e),g(Za.$$.fragment,e),g(Ka.$$.fragment,e),g(xt.$$.fragment,e),g(rr.$$.fragment,e),g(dr.$$.fragment,e),g(ur.$$.fragment,e),g(hr.$$.fragment,e),g(gr.$$.fragment,e),g(fr.$$.fragment,e),g(_r.$$.fragment,e),g(br.$$.fragment,e),g(wr.$$.fragment,e),g(kr.$$.fragment,e),tm=!0)},o(e){f($.$$.fragment,e),f(Le.$$.fragment,e),f(Fe.$$.fragment,e),f(Ft.$$.fragment,e),f(zt.$$.fragment,e),f(Wt.$$.fragment,e),f(Dt.$$.fragment,e),f(Ht.$$.fragment,e),f(Rt.$$.fragment,e),f(Bt.$$.fragment,e),f(Et.$$.fragment,e),f(Vt.$$.fragment,e),f(Zt.$$.fragment,e),f(Xt.$$.fragment,e),f(Gt.$$.fragment,e),f(Yt.$$.fragment,e),f(Ot.$$.fragment,e),f(Qt.$$.fragment,e),f(Kt.$$.fragment,e),f(en.$$.fragment,e),f(tn.$$.fragment,e),f(nn.$$.fragment,e),f(on.$$.fragment,e),f(Ee.$$.fragment,e),f(an.$$.fragment,e),f(Ve.$$.fragment,e),f(rn.$$.fragment,e),f(sn.$$.fragment,e),f(ln.$$.fragment,e),f(dn.$$.fragment,e),f(cn.$$.fragment,e),f(Ye.$$.fragment,e),f(mn.$$.fragment,e),f(pn.$$.fragment,e),f(un.$$.fragment,e),f(hn.$$.fragment,e),f(gn.$$.fragment,e),f(et.$$.fragment,e),f(fn.$$.fragment,e),f(_n.$$.fragment,e),f(bn.$$.fragment,e),f(yn.$$.fragment,e),f(vn.$$.fragment,e),f(Tn.$$.fragment,e),f(wn.$$.fragment,e),f(xn.$$.fragment,e),f(Mn.$$.fragment,e),f($n.$$.fragment,e),f(kn.$$.fragment,e),f(An.$$.fragment,e),f(qn.$$.fragment,e),f(at.$$.fragment,e),f(jn.$$.fragment,e),f(Cn.$$.fragment,e),f(In.$$.fragment,e),f(Jn.$$.fragment,e),f(Un.$$.fragment,e),f(Sn.$$.fragment,e),f(st.$$.fragment,e),f(Pn.$$.fragment,e),f(it.$$.fragment,e),f(Ln.$$.fragment,e),f(lt.$$.fragment,e),f(Fn.$$.fragment,e),f(dt.$$.fragment,e),f(Nn.$$.fragment,e),f(ct.$$.fragment,e),f(zn.$$.fragment,e),f(mt.$$.fragment,e),f(pt.$$.fragment,e),f(Wn.$$.fragment,e),f(ut.$$.fragment,e),f(Dn.$$.fragment,e),f(ht.$$.fragment,e),f(gt.$$.fragment,e),f(Hn.$$.fragment,e),f(ft.$$.fragment,e),f(_t.$$.fragment,e),f(Rn.$$.fragment,e),f(Bn.$$.fragment,e),f(En.$$.fragment,e),f(Vn.$$.fragment,e),f(Zn.$$.fragment,e),f(Xn.$$.fragment,e),f(Gn.$$.fragment,e),f(to.$$.fragment,e),f(lo.$$.fragment,e),f(mo.$$.fragment,e),f(uo.$$.fragment,e),f(fo.$$.fragment,e),f(bo.$$.fragment,e),f(To.$$.fragment,e),f(Mo.$$.fragment,e),f(ko.$$.fragment,e),f(Ao.$$.fragment,e),f(So.$$.fragment,e),f(Fo.$$.fragment,e),f(Wo.$$.fragment,e),f(Ho.$$.fragment,e),f(Bo.$$.fragment,e),f(Go.$$.fragment,e),f(Yo.$$.fragment,e),f(Ko.$$.fragment,e),f(na.$$.fragment,e),f(sa.$$.fragment,e),f(ca.$$.fragment,e),f(ua.$$.fragment,e),f(_a.$$.fragment,e),f(ya.$$.fragment,e),f(Ta.$$.fragment,e),f(Ma.$$.fragment,e),f(ja.$$.fragment,e),f(Ja.$$.fragment,e),f(Fa.$$.fragment,e),f(Wa.$$.fragment,e),f(Za.$$.fragment,e),f(Ka.$$.fragment,e),f(xt.$$.fragment,e),f(rr.$$.fragment,e),f(dr.$$.fragment,e),f(ur.$$.fragment,e),f(hr.$$.fragment,e),f(gr.$$.fragment,e),f(fr.$$.fragment,e),f(_r.$$.fragment,e),f(br.$$.fragment,e),f(wr.$$.fragment,e),f(kr.$$.fragment,e),tm=!1},d(e){e&&(t(w),t(b),t(y),t(m),t(A),t(al),t(rl),t(Jt),t(sl),t(Ut),t(il),t(St),t(ll),t(Pt),t(dl),t(cl),t(Lt),t(ml),t(pl),t(Nt),t(ul),t(hl),t(v),t(gl),t(fl),t(O),t(_l),t(bl),t(j),t(yl),t(vl),t(D),t(Tl),t(wl),t(Yn),t(xl),t(On),t(Ml),t(Qn),t($l),t(Kn),t(kl),t(eo),t(Al),t(ql),t(no),t(jl),t(oo),t(Cl),t(ao),t(Il),t(ro),t(Jl),t(so),t(Ul),t(io),t(Sl),t(Pl),t(co),t(Ll),t(Fl),t(po),t(Nl),t(zl),t(ho),t(Wl),t(go),t(Dl),t(Hl),t(_o),t(Rl),t(Bl),t(yo),t(El),t(vo),t(Vl),t(Zl),t(wo),t(Xl),t(xo),t(Gl),t(Yl),t($o),t(Ol),t(Ql),t(Kl),t(qo),t(ed),t(jo),t(td),t(Co),t(nd),t(Io),t(od),t(Jo),t(ad),t(Uo),t(rd),t(sd),t(Po),t(id),t(Lo),t(ld),t(dd),t(No),t(cd),t(zo),t(md),t(pd),t(Do),t(ud),t(hd),t(Ro),t(gd),t(fd),t(Eo),t(_d),t(Vo),t(bd),t(Zo),t(yd),t(Xo),t(vd),t(Td),t(wt),t(wd),t(xd),t(Oo),t(Md),t(Qo),t($d),t(kd),t(ea),t(Ad),t(ta),t(qd),t(jd),t(oa),t(Cd),t(aa),t(Id),t(ra),t(Jd),t(Si),t(Ud),t(Sd),t(ia),t(Pd),t(la),t(Ld),t(da),t(Fd),t(Nd),t(ma),t(zd),t(pa),t(Wd),t(Dd),t(ha),t(Hd),t(ga),t(Rd),t(fa),t(Bd),t(Ed),t(ba),t(Vd),t(Zd),t(va),t(Xd),t(Gd),t(wa),t(Yd),t(xa),t(Od),t(Qd),t($a),t(Kd),t(ka),t(ec),t(Aa),t(tc),t(qa),t(nc),t(oc),t(Ca),t(ac),t(Ia),t(rc),t(sc),t(Ua),t(ic),t(Sa),t(lc),t(Pa),t(dc),t(La),t(cc),t(mc),t(Na),t(pc),t(za),t(uc),t(hc),t(Da),t(gc),t(Ha),t(fc),t(Ra),t(_c),t(Ba),t(bc),t(Ea),t(yc),t(Va),t(vc),t(Tc),t(Xa),t(wc),t(Ga),t(xc),t(Ya),t(Mc),t(Oa),t($c),t(Qa),t(kc),t(Ac),t(er),t(qc),t(jc),t(tr),t(Cc),t(nr),t(Ic),t(or),t(Jc),t(ar),t(Uc),t(Sc),t(sr),t(Pc),t(ir),t(Lc),t(lr),t(Fc),t(Nc),t(cr),t(zc),t(mr),t(Wc),t(pr),t(Dc),t(xe),t(Hc),t(Rc),t(Mt),t(Bc),t(Ec),t(yr),t(Vc),t(vr),t(Zc),t(Tr),t(Xc),t(Gc),t(xr),t(Yc),t(Mr),t(Oc),t($t),t(Qc),t($r),t(Kc),t(em),t(ol)),t(c),_($,e),_(Le,e),_(Fe,e),_(Ft,e),_(zt,e),_(Wt),_(Dt),_(Ht),_(Rt),_(Bt),_(Et),_(Vt),_(Zt),_(Xt),_(Gt),_(Yt),_(Ot),_(Qt),_(Kt),_(en),_(tn),_(nn),_(on),_(Ee),_(an),_(Ve),_(rn),_(sn),_(ln),_(dn),_(cn),_(Ye),_(mn),_(pn),_(un),_(hn),_(gn),_(et),_(fn),_(_n),_(bn),_(yn),_(vn),_(Tn),_(wn),_(xn),_(Mn),_($n,e),_(kn),_(An),_(qn),_(at),_(jn,e),_(Cn),_(In),_(Jn),_(Un),_(Sn),_(st),_(Pn),_(it),_(Ln),_(lt),_(Fn),_(dt),_(Nn),_(ct),_(zn),_(mt),_(pt),_(Wn),_(ut),_(Dn),_(ht),_(gt),_(Hn),_(ft),_(_t),_(Rn),_(Bn),_(En),_(Vn,e),_(Zn),_(Xn),_(Gn,e),_(to,e),_(lo,e),_(mo,e),_(uo,e),_(fo,e),_(bo,e),_(To,e),_(Mo,e),_(ko,e),_(Ao,e),_(So,e),_(Fo,e),_(Wo,e),_(Ho,e),_(Bo,e),_(Go,e),_(Yo,e),_(Ko,e),_(na,e),_(sa,e),_(ca,e),_(ua,e),_(_a,e),_(ya,e),_(Ta,e),_(Ma,e),_(ja,e),_(Ja,e),_(Fa,e),_(Wa,e),_(Za,e),_(Ka,e),_(xt,e),_(rr,e),_(dr,e),_(ur),_(hr),_(gr),_(fr),_(_r,e),_(br,e),_(wr,e),_(kr,e)}}}const by='{"title":"Trainer","local":"trainer","sections":[{"title":"Trainer","local":"transformers.Trainer","sections":[],"depth":2},{"title":"Seq2SeqTrainer","local":"transformers.Seq2SeqTrainer","sections":[],"depth":2},{"title":"TrainingArguments","local":"transformers.TrainingArguments","sections":[],"depth":2},{"title":"Seq2SeqTrainingArguments","local":"transformers.Seq2SeqTrainingArguments","sections":[],"depth":2},{"title":"Checkpoints","local":"checkpoints","sections":[],"depth":2},{"title":"Logging","local":"logging","sections":[],"depth":2},{"title":"Randomness","local":"randomness","sections":[],"depth":2},{"title":"Specific GPUs Selection","local":"specific-gpus-selection","sections":[],"depth":2},{"title":"Trainer Integrations","local":"trainer-integrations","sections":[{"title":"CUDA Extension Installation Notes","local":"cuda-extension-installation-notes","sections":[{"title":"Possible problem #1","local":"possible-problem-1","sections":[],"depth":4},{"title":"Possible problem #2","local":"possible-problem-2","sections":[],"depth":4},{"title":"Possible problem #3","local":"possible-problem-3","sections":[],"depth":4}],"depth":3},{"title":"PyTorch Fully Sharded Data parallel","local":"pytorch-fully-sharded-data-parallel","sections":[],"depth":3},{"title":"PyTorch/XLA Fully Sharded Data parallel","local":"pytorchxla-fully-sharded-data-parallel","sections":[],"depth":3},{"title":"Using Trainer for accelerated PyTorch Training on Mac","local":"using-trainer-for-accelerated-pytorch-training-on-mac","sections":[],"depth":3}],"depth":2},{"title":"Using Accelerate Launcher with Trainer","local":"using-accelerate-launcher-with-trainer","sections":[],"depth":2},{"title":"Boost your fine-tuning performances using NEFTune","local":"boost-your-fine-tuning-performances-using-neftune","sections":[],"depth":2}],"depth":1}';function yy(q){return Vb(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ay extends Zb{constructor(c){super(),Xb(this,c,yy,_y,Eb,{})}}export{Ay as component};
