import{s as hl,o as Tl,n as zt}from"../chunks/scheduler.36a0863c.js";import{S as yl,i as gl,g as u,s as n,r as f,A as Ul,h as c,f as l,c as o,j as Rt,u as w,x as d,k as wl,y as Gt,a,v as J,d as h,t as T,w as y}from"../chunks/index.9c13489a.js";import{C as U}from"../chunks/CodeBlock.05d8ec32.js";import{F as Jl,M as Zt}from"../chunks/Markdown.88297c0b.js";import{H as j}from"../chunks/Heading.7a254a62.js";function _l(_){let i,M='Lo script di esempio scarica e pre-processa un dataset dalla libreria 🤗 <a href="https://huggingface.co/docs/datasets/" rel="nofollow">Datasets</a>. Successivamente, lo script esegue il fine-tuning su un dataset usando il <a href="https://huggingface.co/docs/transformers/main_classes/trainer" rel="nofollow">Trainer</a> su un’architettura che supporta la summarization. Il seguente esempio mostra come eseguire il fine-tuning di <a href="https://huggingface.co/t5-small" rel="nofollow">T5-small</a> sul dataset <a href="https://huggingface.co/datasets/cnn_dailymail" rel="nofollow">CNN/DailyMail</a>. Il modello T5 richiede un parametro addizionale <code>source_prefix</code> a causa del modo in cui è stato addestrato. Questo prefisso permette a T5 di sapere che si tratta di un task di summarization.',r,m,p;return m=new U({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjB0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW91dHB1dF9kaXIlMjAlMkZ0bXAlMkZ0c3Qtc3VtbWFyaXphdGlvbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdmVyd3JpdGVfb3V0cHV0X2RpciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJlZGljdF93aXRoX2dlbmVyYXRl",highlighted:`python examples/pytorch/summarization/run_summarization.py \\
    --model_name_or_path t5-small \\
    --do_train \\
    --do_eval \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --source_prefix <span class="hljs-string">&quot;summarize: &quot;</span> \\
    --output_dir /tmp/tst-summarization \\
    --per_device_train_batch_size=4 \\
    --per_device_eval_batch_size=4 \\
    --overwrite_output_dir \\
    --predict_with_generate`,wrap:!1}}),{c(){i=u("p"),i.innerHTML=M,r=n(),f(m.$$.fragment)},l(s){i=c(s,"P",{"data-svelte-h":!0}),d(i)!=="svelte-1xzw9qe"&&(i.innerHTML=M),r=o(s),w(m.$$.fragment,s)},m(s,g){a(s,i,g),a(s,r,g),J(m,s,g),p=!0},p:zt,i(s){p||(h(m.$$.fragment,s),p=!0)},o(s){T(m.$$.fragment,s),p=!1},d(s){s&&(l(i),l(r)),y(m,s)}}}function jl(_){let i,M;return i=new Zt({props:{$$slots:{default:[_l]},$$scope:{ctx:_}}}),{c(){f(i.$$.fragment)},l(r){w(i.$$.fragment,r)},m(r,m){J(i,r,m),M=!0},p(r,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:r}),i.$set(p)},i(r){M||(h(i.$$.fragment,r),M=!0)},o(r){T(i.$$.fragment,r),M=!1},d(r){y(i,r)}}}function bl(_){let i,M='Lo script di esempio scarica e pre-processa un dataset dalla libreria 🤗 <a href="https://huggingface.co/docs/datasets/" rel="nofollow">Datasets</a>. Successivamente, lo script esegue il fine-tuning su un dataset usando Keras su un’architettura che supporta la summarization. Il seguente esempio mostra come eseguire il fine-tuning di <a href="https://huggingface.co/t5-small" rel="nofollow">T5-small</a> sul dataset <a href="https://huggingface.co/datasets/cnn_dailymail" rel="nofollow">CNN/DailyMail</a>. Il modello T5 richiede un parametro addizionale <code>source_prefix</code> a causa del modo in cui è stato addestrato. Questo prefisso permette a T5 di sapere che si tratta di un task di summarization.',r,m,p;return m=new U({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZ0ZW5zb3JmbG93JTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjB0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9uYW1lJTIwY25uX2RhaWx5bWFpbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9jb25maWclMjAlMjIzLjAuMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3V0cHV0X2RpciUyMCUyRnRtcCUyRnRzdC1zdW1tYXJpemF0aW9uJTIwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlMjA4JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUyMDE2JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1udW1fdHJhaW5fZXBvY2hzJTIwMyUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWw=",highlighted:`python examples/tensorflow/summarization/run_summarization.py  \\
    --model_name_or_path t5-small \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --output_dir /tmp/tst-summarization  \\
    --per_device_train_batch_size 8 \\
    --per_device_eval_batch_size 16 \\
    --num_train_epochs 3 \\
    --do_train \\
    --do_eval`,wrap:!1}}),{c(){i=u("p"),i.innerHTML=M,r=n(),f(m.$$.fragment)},l(s){i=c(s,"P",{"data-svelte-h":!0}),d(i)!=="svelte-29bmoe"&&(i.innerHTML=M),r=o(s),w(m.$$.fragment,s)},m(s,g){a(s,i,g),a(s,r,g),J(m,s,g),p=!0},p:zt,i(s){p||(h(m.$$.fragment,s),p=!0)},o(s){T(m.$$.fragment,s),p=!1},d(s){s&&(l(i),l(r)),y(m,s)}}}function vl(_){let i,M;return i=new Zt({props:{$$slots:{default:[bl]},$$scope:{ctx:_}}}),{c(){f(i.$$.fragment)},l(r){w(i.$$.fragment,r)},m(r,m){J(i,r,m),M=!0},p(r,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:r}),i.$set(p)},i(r){M||(h(i.$$.fragment,r),M=!0)},o(r){T(i.$$.fragment,r),M=!1},d(r){y(i,r)}}}function $l(_){let i,M='Le Tensor Processing Units (TPU) sono state progettate per migliorare le prestazioni. PyTorch supporta le TPU con il compilatore per deep learning <a href="https://www.tensorflow.org/xla" rel="nofollow">XLA</a> (guarda <a href="https://github.com/pytorch/xla/blob/master/README.md" rel="nofollow">questo link</a> per maggiori dettagli). Per usare una TPU, avvia lo script <code>xla_spawn.py</code> e usa l’argomento <code>num_cores</code> per impostare il numero di core TPU che intendi usare.',r,m,p;return m=new U({props:{code:"cHl0aG9uJTIweGxhX3NwYXduLnB5JTIwLS1udW1fY29yZXMlMjA4JTIwJTVDJTBBJTIwJTIwJTIwJTIwc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjB0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW91dHB1dF9kaXIlMjAlMkZ0bXAlMkZ0c3Qtc3VtbWFyaXphdGlvbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdmVyd3JpdGVfb3V0cHV0X2RpciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJlZGljdF93aXRoX2dlbmVyYXRl",highlighted:`python xla_spawn.py --num_cores 8 \\
    summarization/run_summarization.py \\
    --model_name_or_path t5-small \\
    --do_train \\
    --do_eval \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --source_prefix <span class="hljs-string">&quot;summarize: &quot;</span> \\
    --output_dir /tmp/tst-summarization \\
    --per_device_train_batch_size=4 \\
    --per_device_eval_batch_size=4 \\
    --overwrite_output_dir \\
    --predict_with_generate`,wrap:!1}}),{c(){i=u("p"),i.innerHTML=M,r=n(),f(m.$$.fragment)},l(s){i=c(s,"P",{"data-svelte-h":!0}),d(i)!=="svelte-1ndgg9f"&&(i.innerHTML=M),r=o(s),w(m.$$.fragment,s)},m(s,g){a(s,i,g),a(s,r,g),J(m,s,g),p=!0},p:zt,i(s){p||(h(m.$$.fragment,s),p=!0)},o(s){T(m.$$.fragment,s),p=!1},d(s){s&&(l(i),l(r)),y(m,s)}}}function Cl(_){let i,M;return i=new Zt({props:{$$slots:{default:[$l]},$$scope:{ctx:_}}}),{c(){f(i.$$.fragment)},l(r){w(i.$$.fragment,r)},m(r,m){J(i,r,m),M=!0},p(r,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:r}),i.$set(p)},i(r){M||(h(i.$$.fragment,r),M=!0)},o(r){T(i.$$.fragment,r),M=!1},d(r){y(i,r)}}}function Xl(_){let i,M='Le Tensor Processing Units (TPU) sono state progettate per migliorare le prestazioni. Gli script TensorFlow utilizzano una <a href="https://www.tensorflow.org/guide/distributed_training#tpustrategy" rel="nofollow"><code>TPUStrategy</code></a> per eseguire l’addestramento su TPU. Per usare una TPU, passa il nome della risorsa TPU all’argomento <code>tpu</code>.',r,m,p;return m=new U({props:{code:"cHl0aG9uJTIwcnVuX3N1bW1hcml6YXRpb24ucHklMjAlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXRwdSUyMG5hbWVfb2ZfdHB1X3Jlc291cmNlJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjB0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9uYW1lJTIwY25uX2RhaWx5bWFpbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9jb25maWclMjAlMjIzLjAuMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3V0cHV0X2RpciUyMCUyRnRtcCUyRnRzdC1zdW1tYXJpemF0aW9uJTIwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlMjA4JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUyMDE2JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1udW1fdHJhaW5fZXBvY2hzJTIwMyUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWw=",highlighted:`python run_summarization.py  \\
    --tpu name_of_tpu_resource \\
    --model_name_or_path t5-small \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --output_dir /tmp/tst-summarization  \\
    --per_device_train_batch_size 8 \\
    --per_device_eval_batch_size 16 \\
    --num_train_epochs 3 \\
    --do_train \\
    --do_eval`,wrap:!1}}),{c(){i=u("p"),i.innerHTML=M,r=n(),f(m.$$.fragment)},l(s){i=c(s,"P",{"data-svelte-h":!0}),d(i)!=="svelte-11qd6ng"&&(i.innerHTML=M),r=o(s),w(m.$$.fragment,s)},m(s,g){a(s,i,g),a(s,r,g),J(m,s,g),p=!0},p:zt,i(s){p||(h(m.$$.fragment,s),p=!0)},o(s){T(m.$$.fragment,s),p=!1},d(s){s&&(l(i),l(r)),y(m,s)}}}function Il(_){let i,M;return i=new Zt({props:{$$slots:{default:[Xl]},$$scope:{ctx:_}}}),{c(){f(i.$$.fragment)},l(r){w(i.$$.fragment,r)},m(r,m){J(i,r,m),M=!0},p(r,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:r}),i.$set(p)},i(r){M||(h(i.$$.fragment,r),M=!0)},o(r){T(i.$$.fragment,r),M=!1},d(r){y(i,r)}}}function Al(_){let i,M,r,m,p,s,g,Vt='Insieme ai <a href="./noteboks/README">notebooks</a> 🤗 Transformers, ci sono anche esempi di script che dimostrano come addestrare un modello per un task con <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch" rel="nofollow">PyTorch</a>, <a href="https://github.com/huggingface/transformers/tree/main/examples/tensorflow" rel="nofollow">TensorFlow</a>, o <a href="https://github.com/huggingface/transformers/tree/main/examples/flax" rel="nofollow">JAX/Flax</a>.',Ie,C,xt='Troverai anche script che abbiamo usato nei nostri <a href="https://github.com/huggingface/transformers/tree/main/examples/research_projects" rel="nofollow">progetti di ricerca</a> e <a href="https://github.com/huggingface/transformers/tree/main/examples/legacy" rel="nofollow">precedenti esempi</a> a cui contribuisce per lo più la comunità. Questi script non sono attivamente mantenuti e richiedono una specifica versione di 🤗 Transformers che sarà molto probabilmente incompatibile con l’ultima versione della libreria.',Ae,X,Nt="Non è dato per scontato che gli script di esempio funzionino senza apportare modifiche per ogni problema, bensì potrebbe essere necessario adattare lo script al tuo caso specifico. Per aiutarti in ciò, la maggioranza degli script espone le modalità di pre-processamento dei dati, consentendoti di modificare lo script come preferisci.",We,I,Bt='Per qualsiasi feature che vorresti implementare in uno script d’esempio, per favore discutine nel <a href="https://discuss.huggingface.co/" rel="nofollow">forum</a> o in un’<a href="https://github.com/huggingface/transformers/issues" rel="nofollow">issue</a> prima di inviare una Pull Request. Mentre accogliamo con piacere la correzione di bug, è più improbabile che faremo la stessa con una PR che aggiunge funzionalità sacrificando la leggibilità.',ze,A,Ft='Questa guida ti mostrerà come eseguire uno script di esempio relativo al task di summarization in <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/summarization" rel="nofollow">PyTorch</a> e <a href="https://github.com/huggingface/transformers/tree/main/examples/tensorflow/summarization" rel="nofollow">TensorFlow</a>. Tutti gli esempi funzioneranno con entrambi i framework a meno che non sia specificato altrimenti.',Ze,W,Le,z,Yt="Per eseguire con successo l’ultima versione degli script di esempio, devi <strong>installare 🤗 Transformers dalla fonte</strong> in un nuovo ambiente virtuale:",Re,Z,Ge,L,St="Per le precedenti versioni degli script di esempio, clicca sul pulsante di seguito:",Ve,R,Et='<summary>Esempi per versioni precedenti di 🤗 Transformers</summary> <ul><li><a href="https://github.com/huggingface/transformers/tree/v4.5.1/examples">v4.5.1</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v4.4.2/examples">v4.4.2</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v4.3.3/examples">v4.3.3</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v4.2.2/examples">v4.2.2</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v4.1.1/examples">v4.1.1</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v4.0.1/examples">v4.0.1</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v3.5.1/examples">v3.5.1</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v3.4.0/examples">v3.4.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v3.3.1/examples">v3.3.1</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v3.2.0/examples">v3.2.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v3.1.0/examples">v3.1.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v3.0.2/examples">v3.0.2</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.11.0/examples">v2.11.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.10.0/examples">v2.10.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.9.1/examples">v2.9.1</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.8.0/examples">v2.8.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.7.0/examples">v2.7.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.6.0/examples">v2.6.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.5.1/examples">v2.5.1</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.4.0/examples">v2.4.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.3.0/examples">v2.3.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.2.0/examples">v2.2.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.1.0/examples">v2.1.1</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v2.0.0/examples">v2.0.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v1.2.0/examples">v1.2.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v1.1.0/examples">v1.1.0</a></li> <li><a href="https://github.com/huggingface/transformers/tree/v1.0.0/examples">v1.0.0</a></li></ul>',xe,G,Ht="Successivamente, cambia la tua attuale copia di 🤗 Transformers specificandone la versione, ad esempio v3.5.1:",Ne,V,Be,x,kt="Dopo aver configurato correttamente la versione della libreria, naviga nella cartella degli esempi di tua scelta e installa i requisiti:",Fe,N,Ye,B,Se,b,Ee,F,He,Y,Qt='Il <a href="https://huggingface.co/docs/transformers/main_classes/trainer" rel="nofollow">Trainer</a> supporta l’addestramento distribuito e la precisione mista, che significa che puoi anche usarla in uno script. Per abilitare entrambe le funzionalità:',ke,S,Pt="<li>Aggiunto l’argomento <code>fp16</code> per abilitare la precisione mista.</li> <li>Imposta un numero di GPU da usare con l’argomento <code>nproc_per_node</code>.</li>",Qe,E,Pe,H,qt='Gli script TensorFlow utilizzano una <a href="https://www.tensorflow.org/guide/distributed_training#mirroredstrategy" rel="nofollow"><code>MirroredStrategy</code></a> per il training distribuito e non devi aggiungere alcun argomento addizionale allo script di training. Lo script TensorFlow userà multiple GPU in modo predefinito se quest’ultime sono disponibili:',qe,k,De,v,Oe,Q,Ke,P,Dt='🤗 <a href="https://huggingface.co/docs/accelerate" rel="nofollow">Accelerate</a> è una libreria compatibile solo con PyTorch che offre un metodo unificato per addestrare modelli su diverse tipologie di configurazioni (CPU, multiple GPU, TPU) mantenendo una completa visibilità rispetto al ciclo di training di PyTorch. Assicurati di aver effettuato l’installazione di 🤗 Accelerate, nel caso non lo avessi fatto:',et,$,Ce,Ot="Nota: dato che Accelerate è in rapido sviluppo, è necessario installare la versione proveniente da git per eseguire gli script:",Lt,q,tt,D,Kt="Invece che usare lo script <code>run_summarization.py</code>, devi usare lo script <code>run_summarization_no_trainer.py</code>. Gli script supportati in 🤗 Accelerate avranno un file chiamato <code>task_no_trainer.py</code> nella rispettiva cartella. Per iniziare, esegui il seguente comando per creare e salvare un file di configurazione:",lt,O,at,K,el="Testa la tua configurazione per assicurarti della sua correttezza:",it,ee,rt,te,tl="Ora sei pronto per avviare l’addestramento:",st,le,nt,ae,ot,ie,ll="Lo script di summarization supporta dataset personalizzati purché siano file CSV o JSON Line. Quando usi il tuo dataset, devi specificare diversi argomenti aggiuntivi:",mt,re,al="<li><code>train_file</code> e <code>validation_file</code> specificano dove si trovano i file di addestramento e validazione.</li> <li><code>text_column</code> è il file di input da riassumere.</li> <li><code>summary_column</code> è il file di destinazione per l’output.</li>",pt,se,il="Uno script di summarization usando un dataset personalizzato sarebbe simile a questo:",ut,ne,ct,oe,Mt,me,rl="È spesso una buona idea avviare il tuo script su un numero inferiore di esempi tratti dal dataset, per assicurarti che tutto funzioni come previsto prima di eseguire lo script sull’intero dataset, che potrebbe necessitare di ore. Usa i seguenti argomenti per limitare il dataset ad un massimo numero di esempi:",dt,pe,sl="<li><code>max_train_samples</code></li> <li><code>max_eval_samples</code></li> <li><code>max_predict_samples</code></li>",ft,ue,wt,ce,nl="Non tutti gli esempi di script supportano l’argomento <code>max_predict_samples</code>. Se non sei sicuro circa il supporto di questo argomento da parte del tuo script, aggiungi l’argomento <code>-h</code> per controllare:",Jt,Me,ht,de,Tt,fe,ol="Un’altra utile opzione è riavviare un addestramento da un checkpoint precedente. Questo garantirà che tu possa riprendere da dove hai interrotto senza ricominciare se l’addestramento viene interrotto. Ci sono due metodi per riavviare l’addestramento da un checkpoint:",yt,we,ml="Il primo metodo usa l’argomento <code>output_dir previous_output_dir</code> per riavviare l’addestramento dall’ultima versione del checkpoint contenuto in <code>output_dir</code>. In questo caso, dovresti rimuovere <code>overwrite_output_dir</code>:",gt,Je,Ut,he,pl="Il secondo metodo usa l’argomento <code>resume_from_checkpoint path_to_specific_checkpoint</code> per riavviare un addestramento da una specifica cartella di checkpoint.",_t,Te,jt,ye,bt,ge,ul='Tutti gli script possono caricare il tuo modello finale al <a href="https://huggingface.co/models" rel="nofollow">Model Hub</a>. Prima di iniziare, assicurati di aver effettuato l’accesso su Hugging Face:',vt,Ue,$t,_e,cl="Poi, aggiungi l’argomento <code>push_to_hub</code> allo script. Questo argomento consentirà di creare un repository con il tuo username Hugging Face e la cartella specificata in <code>output_dir</code>.",Ct,je,Ml="Per dare uno specifico nome al repository, usa l’argomento <code>push_to_hub_model_id</code>. Il repository verrà automaticamente elencata sotto al tuo namespace.",Xt,be,dl="Il seguente esempio mostra come caricare un modello specificando il nome del repository:",It,ve,At,Xe,Wt;return p=new j({props:{title:"Addestramento con script",local:"addestramento-con-script",headingTag:"h1"}}),W=new j({props:{title:"Installazione",local:"installazione",headingTag:"h2"}}),Z=new U({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRnRyYW5zZm9ybWVycyUwQWNkJTIwdHJhbnNmb3JtZXJzJTBBcGlwJTIwaW5zdGFsbCUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/transformers
<span class="hljs-built_in">cd</span> transformers
pip install .`,wrap:!1}}),V=new U({props:{code:"Z2l0JTIwY2hlY2tvdXQlMjB0YWdzJTJGdjMuNS4x",highlighted:"git checkout tags/v3.5.1",wrap:!1}}),N=new U({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1yJTIwcmVxdWlyZW1lbnRzLnR4dA==",highlighted:"pip install -r requirements.txt",wrap:!1}}),B=new j({props:{title:"Esegui uno script",local:"esegui-uno-script",headingTag:"h2"}}),b=new Jl({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[vl],pytorch:[jl]},$$scope:{ctx:_}}}),F=new j({props:{title:"Addestramento distribuito e precisione mista",local:"addestramento-distribuito-e-precisione-mista",headingTag:"h2"}}),E=new U({props:{code:"dG9yY2hydW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLW5wcm9jX3Blcl9ub2RlJTIwOCUyMHB5dG9yY2glMkZzdW1tYXJpemF0aW9uJTJGcnVuX3N1bW1hcml6YXRpb24ucHklMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZwMTYlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW1vZGVsX25hbWVfb3JfcGF0aCUyMHQ1LXNtYWxsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kb190cmFpbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fZXZhbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9uYW1lJTIwY25uX2RhaWx5bWFpbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9jb25maWclMjAlMjIzLjAuMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tc291cmNlX3ByZWZpeCUyMCUyMnN1bW1hcml6ZSUzQSUyMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3V0cHV0X2RpciUyMCUyRnRtcCUyRnRzdC1zdW1tYXJpemF0aW9uJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW92ZXJ3cml0ZV9vdXRwdXRfZGlyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wcmVkaWN0X3dpdGhfZ2VuZXJhdGU=",highlighted:`torchrun \\
    --nproc_per_node 8 pytorch/summarization/run_summarization.py \\
    --fp16 \\
    --model_name_or_path t5-small \\
    --do_train \\
    --do_eval \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --source_prefix <span class="hljs-string">&quot;summarize: &quot;</span> \\
    --output_dir /tmp/tst-summarization \\
    --per_device_train_batch_size=4 \\
    --per_device_eval_batch_size=4 \\
    --overwrite_output_dir \\
    --predict_with_generate`,wrap:!1}}),k=new j({props:{title:"Esegui uno script su TPU",local:"esegui-uno-script-su-tpu",headingTag:"h2"}}),v=new Jl({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Il],pytorch:[Cl]},$$scope:{ctx:_}}}),Q=new j({props:{title:"Esegui uno script con 🤗 Accelerate",local:"esegui-uno-script-con--accelerate",headingTag:"h2"}}),q=new U({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGYWNjZWxlcmF0ZQ==",highlighted:"pip install git+https://github.com/huggingface/accelerate",wrap:!1}}),O=new U({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config",wrap:!1}}),ee=new U({props:{code:"YWNjZWxlcmF0ZSUyMHRlc3Q=",highlighted:'accelerate <span class="hljs-built_in">test</span>',wrap:!1}}),le=new U({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHJ1bl9zdW1tYXJpemF0aW9uX25vX3RyYWluZXIucHklMjAlNUMlMEElMjAlMjAlMjAlMjAtLW1vZGVsX25hbWVfb3JfcGF0aCUyMHQ1LXNtYWxsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0X25hbWUlMjBjbm5fZGFpbHltYWlsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0X2NvbmZpZyUyMCUyMjMuMC4wJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1zb3VyY2VfcHJlZml4JTIwJTIyc3VtbWFyaXplJTNBJTIwJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwfiUyRnRtcCUyRnRzdC1zdW1tYXJpemF0aW9u",highlighted:`accelerate launch run_summarization_no_trainer.py \\
    --model_name_or_path t5-small \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --source_prefix <span class="hljs-string">&quot;summarize: &quot;</span> \\
    --output_dir ~/tmp/tst-summarization`,wrap:!1}}),ae=new j({props:{title:"Uso di un dataset personalizzato",local:"uso-di-un-dataset-personalizzato",headingTag:"h2"}}),ne=new U({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjB0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXRyYWluX2ZpbGUlMjBwYXRoX3RvX2Nzdl9vcl9qc29ubGluZXNfZmlsZSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tdmFsaWRhdGlvbl9maWxlJTIwcGF0aF90b19jc3Zfb3JfanNvbmxpbmVzX2ZpbGUlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXRleHRfY29sdW1uJTIwdGV4dF9jb2x1bW5fbmFtZSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tc3VtbWFyeV9jb2x1bW4lMjBzdW1tYXJ5X2NvbHVtbl9uYW1lJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1zb3VyY2VfcHJlZml4JTIwJTIyc3VtbWFyaXplJTNBJTIwJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwJTJGdG1wJTJGdHN0LXN1bW1hcml6YXRpb24lMjAlNUMlMEElMjAlMjAlMjAlMjAtLW92ZXJ3cml0ZV9vdXRwdXRfZGlyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXByZWRpY3Rfd2l0aF9nZW5lcmF0ZQ==",highlighted:`python examples/pytorch/summarization/run_summarization.py \\
    --model_name_or_path t5-small \\
    --do_train \\
    --do_eval \\
    --train_file path_to_csv_or_jsonlines_file \\
    --validation_file path_to_csv_or_jsonlines_file \\
    --text_column text_column_name \\
    --summary_column summary_column_name \\
    --source_prefix <span class="hljs-string">&quot;summarize: &quot;</span> \\
    --output_dir /tmp/tst-summarization \\
    --overwrite_output_dir \\
    --per_device_train_batch_size=4 \\
    --per_device_eval_batch_size=4 \\
    --predict_with_generate`,wrap:!1}}),oe=new j({props:{title:"Testare uno script",local:"testare-uno-script",headingTag:"h2"}}),ue=new U({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjB0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbWF4X3RyYWluX3NhbXBsZXMlMjA1MCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbWF4X2V2YWxfc2FtcGxlcyUyMDUwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tYXhfcHJlZGljdF9zYW1wbGVzJTIwNTAlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX3RyYWluJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kb19ldmFsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0X25hbWUlMjBjbm5fZGFpbHltYWlsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0X2NvbmZpZyUyMCUyMjMuMC4wJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1zb3VyY2VfcHJlZml4JTIwJTIyc3VtbWFyaXplJTNBJTIwJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwJTJGdG1wJTJGdHN0LXN1bW1hcml6YXRpb24lMjAlNUMlMEElMjAlMjAlMjAlMjAtLXBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3ZlcndyaXRlX291dHB1dF9kaXIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXByZWRpY3Rfd2l0aF9nZW5lcmF0ZQ==",highlighted:`python examples/pytorch/summarization/run_summarization.py \\
    --model_name_or_path t5-small \\
    --max_train_samples 50 \\
    --max_eval_samples 50 \\
    --max_predict_samples 50 \\
    --do_train \\
    --do_eval \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --source_prefix <span class="hljs-string">&quot;summarize: &quot;</span> \\
    --output_dir /tmp/tst-summarization \\
    --per_device_train_batch_size=4 \\
    --per_device_eval_batch_size=4 \\
    --overwrite_output_dir \\
    --predict_with_generate`,wrap:!1}}),Me=new U({props:{code:"ZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwLWg=",highlighted:"examples/pytorch/summarization/run_summarization.py -h",wrap:!1}}),de=new j({props:{title:"Riavviare addestramento da un checkpoint",local:"riavviare-addestramento-da-un-checkpoint",headingTag:"h2"}}),Je=new U({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjB0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW91dHB1dF9kaXIlMjAlMkZ0bXAlMkZ0c3Qtc3VtbWFyaXphdGlvbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwcHJldmlvdXNfb3V0cHV0X2RpciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJlZGljdF93aXRoX2dlbmVyYXRl",highlighted:`python examples/pytorch/summarization/run_summarization.py
    --model_name_or_path t5-small \\
    --do_train \\
    --do_eval \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --source_prefix <span class="hljs-string">&quot;summarize: &quot;</span> \\
    --output_dir /tmp/tst-summarization \\
    --per_device_train_batch_size=4 \\
    --per_device_eval_batch_size=4 \\
    --output_dir previous_output_dir \\
    --predict_with_generate`,wrap:!1}}),Te=new U({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjB0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW91dHB1dF9kaXIlMjAlMkZ0bXAlMkZ0c3Qtc3VtbWFyaXphdGlvbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdmVyd3JpdGVfb3V0cHV0X2RpciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcmVzdW1lX2Zyb21fY2hlY2twb2ludCUyMHBhdGhfdG9fc3BlY2lmaWNfY2hlY2twb2ludCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJlZGljdF93aXRoX2dlbmVyYXRl",highlighted:`python examples/pytorch/summarization/run_summarization.py
    --model_name_or_path t5-small \\
    --do_train \\
    --do_eval \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --source_prefix <span class="hljs-string">&quot;summarize: &quot;</span> \\
    --output_dir /tmp/tst-summarization \\
    --per_device_train_batch_size=4 \\
    --per_device_eval_batch_size=4 \\
    --overwrite_output_dir \\
    --resume_from_checkpoint path_to_specific_checkpoint \\
    --predict_with_generate`,wrap:!1}}),ye=new j({props:{title:"Condividi il tuo modello",local:"condividi-il-tuo-modello",headingTag:"h2"}}),Ue=new U({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}}),ve=new U({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjB0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXB1c2hfdG9faHViJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wdXNoX3RvX2h1Yl9tb2RlbF9pZCUyMGZpbmV0dW5lZC10NS1jbm5fZGFpbHltYWlsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwJTJGdG1wJTJGdHN0LXN1bW1hcml6YXRpb24lMjAlNUMlMEElMjAlMjAlMjAlMjAtLXBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3ZlcndyaXRlX291dHB1dF9kaXIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXByZWRpY3Rfd2l0aF9nZW5lcmF0ZQ==",highlighted:`python examples/pytorch/summarization/run_summarization.py
    --model_name_or_path t5-small \\
    --do_train \\
    --do_eval \\
    --dataset_name cnn_dailymail \\
    --dataset_config <span class="hljs-string">&quot;3.0.0&quot;</span> \\
    --source_prefix <span class="hljs-string">&quot;summarize: &quot;</span> \\
    --push_to_hub \\
    --push_to_hub_model_id finetuned-t5-cnn_dailymail \\
    --output_dir /tmp/tst-summarization \\
    --per_device_train_batch_size=4 \\
    --per_device_eval_batch_size=4 \\
    --overwrite_output_dir \\
    --predict_with_generate`,wrap:!1}}),{c(){i=u("meta"),M=n(),r=u("p"),m=n(),f(p.$$.fragment),s=n(),g=u("p"),g.innerHTML=Vt,Ie=n(),C=u("p"),C.innerHTML=xt,Ae=n(),X=u("p"),X.textContent=Nt,We=n(),I=u("p"),I.innerHTML=Bt,ze=n(),A=u("p"),A.innerHTML=Ft,Ze=n(),f(W.$$.fragment),Le=n(),z=u("p"),z.innerHTML=Yt,Re=n(),f(Z.$$.fragment),Ge=n(),L=u("p"),L.textContent=St,Ve=n(),R=u("details"),R.innerHTML=Et,xe=n(),G=u("p"),G.textContent=Ht,Ne=n(),f(V.$$.fragment),Be=n(),x=u("p"),x.textContent=kt,Fe=n(),f(N.$$.fragment),Ye=n(),f(B.$$.fragment),Se=n(),f(b.$$.fragment),Ee=n(),f(F.$$.fragment),He=n(),Y=u("p"),Y.innerHTML=Qt,ke=n(),S=u("ul"),S.innerHTML=Pt,Qe=n(),f(E.$$.fragment),Pe=n(),H=u("p"),H.innerHTML=qt,qe=n(),f(k.$$.fragment),De=n(),f(v.$$.fragment),Oe=n(),f(Q.$$.fragment),Ke=n(),P=u("p"),P.innerHTML=Dt,et=n(),$=u("blockquote"),Ce=u("p"),Ce.textContent=Ot,Lt=n(),f(q.$$.fragment),tt=n(),D=u("p"),D.innerHTML=Kt,lt=n(),f(O.$$.fragment),at=n(),K=u("p"),K.textContent=el,it=n(),f(ee.$$.fragment),rt=n(),te=u("p"),te.textContent=tl,st=n(),f(le.$$.fragment),nt=n(),f(ae.$$.fragment),ot=n(),ie=u("p"),ie.textContent=ll,mt=n(),re=u("ul"),re.innerHTML=al,pt=n(),se=u("p"),se.textContent=il,ut=n(),f(ne.$$.fragment),ct=n(),f(oe.$$.fragment),Mt=n(),me=u("p"),me.textContent=rl,dt=n(),pe=u("ul"),pe.innerHTML=sl,ft=n(),f(ue.$$.fragment),wt=n(),ce=u("p"),ce.innerHTML=nl,Jt=n(),f(Me.$$.fragment),ht=n(),f(de.$$.fragment),Tt=n(),fe=u("p"),fe.textContent=ol,yt=n(),we=u("p"),we.innerHTML=ml,gt=n(),f(Je.$$.fragment),Ut=n(),he=u("p"),he.innerHTML=pl,_t=n(),f(Te.$$.fragment),jt=n(),f(ye.$$.fragment),bt=n(),ge=u("p"),ge.innerHTML=ul,vt=n(),f(Ue.$$.fragment),$t=n(),_e=u("p"),_e.innerHTML=cl,Ct=n(),je=u("p"),je.innerHTML=Ml,Xt=n(),be=u("p"),be.textContent=dl,It=n(),f(ve.$$.fragment),At=n(),Xe=u("p"),this.h()},l(e){const t=Ul("svelte-u9bgzb",document.head);i=c(t,"META",{name:!0,content:!0}),t.forEach(l),M=o(e),r=c(e,"P",{}),Rt(r).forEach(l),m=o(e),w(p.$$.fragment,e),s=o(e),g=c(e,"P",{"data-svelte-h":!0}),d(g)!=="svelte-dlbwfe"&&(g.innerHTML=Vt),Ie=o(e),C=c(e,"P",{"data-svelte-h":!0}),d(C)!=="svelte-p3vgrn"&&(C.innerHTML=xt),Ae=o(e),X=c(e,"P",{"data-svelte-h":!0}),d(X)!=="svelte-3iprul"&&(X.textContent=Nt),We=o(e),I=c(e,"P",{"data-svelte-h":!0}),d(I)!=="svelte-skpcg4"&&(I.innerHTML=Bt),ze=o(e),A=c(e,"P",{"data-svelte-h":!0}),d(A)!=="svelte-1dty626"&&(A.innerHTML=Ft),Ze=o(e),w(W.$$.fragment,e),Le=o(e),z=c(e,"P",{"data-svelte-h":!0}),d(z)!=="svelte-1miqfm2"&&(z.innerHTML=Yt),Re=o(e),w(Z.$$.fragment,e),Ge=o(e),L=c(e,"P",{"data-svelte-h":!0}),d(L)!=="svelte-b2rskv"&&(L.textContent=St),Ve=o(e),R=c(e,"DETAILS",{"data-svelte-h":!0}),d(R)!=="svelte-ytnfkk"&&(R.innerHTML=Et),xe=o(e),G=c(e,"P",{"data-svelte-h":!0}),d(G)!=="svelte-cm69sz"&&(G.textContent=Ht),Ne=o(e),w(V.$$.fragment,e),Be=o(e),x=c(e,"P",{"data-svelte-h":!0}),d(x)!=="svelte-2jautu"&&(x.textContent=kt),Fe=o(e),w(N.$$.fragment,e),Ye=o(e),w(B.$$.fragment,e),Se=o(e),w(b.$$.fragment,e),Ee=o(e),w(F.$$.fragment,e),He=o(e),Y=c(e,"P",{"data-svelte-h":!0}),d(Y)!=="svelte-143nmbm"&&(Y.innerHTML=Qt),ke=o(e),S=c(e,"UL",{"data-svelte-h":!0}),d(S)!=="svelte-1ld4sku"&&(S.innerHTML=Pt),Qe=o(e),w(E.$$.fragment,e),Pe=o(e),H=c(e,"P",{"data-svelte-h":!0}),d(H)!=="svelte-3o4ent"&&(H.innerHTML=qt),qe=o(e),w(k.$$.fragment,e),De=o(e),w(v.$$.fragment,e),Oe=o(e),w(Q.$$.fragment,e),Ke=o(e),P=c(e,"P",{"data-svelte-h":!0}),d(P)!=="svelte-10zit0a"&&(P.innerHTML=Dt),et=o(e),$=c(e,"BLOCKQUOTE",{});var $e=Rt($);Ce=c($e,"P",{"data-svelte-h":!0}),d(Ce)!=="svelte-1ehqze5"&&(Ce.textContent=Ot),Lt=o($e),w(q.$$.fragment,$e),$e.forEach(l),tt=o(e),D=c(e,"P",{"data-svelte-h":!0}),d(D)!=="svelte-1b94v6a"&&(D.innerHTML=Kt),lt=o(e),w(O.$$.fragment,e),at=o(e),K=c(e,"P",{"data-svelte-h":!0}),d(K)!=="svelte-13dqlnm"&&(K.textContent=el),it=o(e),w(ee.$$.fragment,e),rt=o(e),te=c(e,"P",{"data-svelte-h":!0}),d(te)!=="svelte-azupwy"&&(te.textContent=tl),st=o(e),w(le.$$.fragment,e),nt=o(e),w(ae.$$.fragment,e),ot=o(e),ie=c(e,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-3m0es0"&&(ie.textContent=ll),mt=o(e),re=c(e,"UL",{"data-svelte-h":!0}),d(re)!=="svelte-1msqo4o"&&(re.innerHTML=al),pt=o(e),se=c(e,"P",{"data-svelte-h":!0}),d(se)!=="svelte-1cj93yk"&&(se.textContent=il),ut=o(e),w(ne.$$.fragment,e),ct=o(e),w(oe.$$.fragment,e),Mt=o(e),me=c(e,"P",{"data-svelte-h":!0}),d(me)!=="svelte-1sqi69s"&&(me.textContent=rl),dt=o(e),pe=c(e,"UL",{"data-svelte-h":!0}),d(pe)!=="svelte-14g5f8g"&&(pe.innerHTML=sl),ft=o(e),w(ue.$$.fragment,e),wt=o(e),ce=c(e,"P",{"data-svelte-h":!0}),d(ce)!=="svelte-lpiiy4"&&(ce.innerHTML=nl),Jt=o(e),w(Me.$$.fragment,e),ht=o(e),w(de.$$.fragment,e),Tt=o(e),fe=c(e,"P",{"data-svelte-h":!0}),d(fe)!=="svelte-1ojfq0o"&&(fe.textContent=ol),yt=o(e),we=c(e,"P",{"data-svelte-h":!0}),d(we)!=="svelte-er6rqd"&&(we.innerHTML=ml),gt=o(e),w(Je.$$.fragment,e),Ut=o(e),he=c(e,"P",{"data-svelte-h":!0}),d(he)!=="svelte-vzkarm"&&(he.innerHTML=pl),_t=o(e),w(Te.$$.fragment,e),jt=o(e),w(ye.$$.fragment,e),bt=o(e),ge=c(e,"P",{"data-svelte-h":!0}),d(ge)!=="svelte-5tj2pz"&&(ge.innerHTML=ul),vt=o(e),w(Ue.$$.fragment,e),$t=o(e),_e=c(e,"P",{"data-svelte-h":!0}),d(_e)!=="svelte-gmt2gy"&&(_e.innerHTML=cl),Ct=o(e),je=c(e,"P",{"data-svelte-h":!0}),d(je)!=="svelte-3hq370"&&(je.innerHTML=Ml),Xt=o(e),be=c(e,"P",{"data-svelte-h":!0}),d(be)!=="svelte-1doeu81"&&(be.textContent=dl),It=o(e),w(ve.$$.fragment,e),At=o(e),Xe=c(e,"P",{}),Rt(Xe).forEach(l),this.h()},h(){wl(i,"name","hf:doc:metadata"),wl(i,"content",Wl)},m(e,t){Gt(document.head,i),a(e,M,t),a(e,r,t),a(e,m,t),J(p,e,t),a(e,s,t),a(e,g,t),a(e,Ie,t),a(e,C,t),a(e,Ae,t),a(e,X,t),a(e,We,t),a(e,I,t),a(e,ze,t),a(e,A,t),a(e,Ze,t),J(W,e,t),a(e,Le,t),a(e,z,t),a(e,Re,t),J(Z,e,t),a(e,Ge,t),a(e,L,t),a(e,Ve,t),a(e,R,t),a(e,xe,t),a(e,G,t),a(e,Ne,t),J(V,e,t),a(e,Be,t),a(e,x,t),a(e,Fe,t),J(N,e,t),a(e,Ye,t),J(B,e,t),a(e,Se,t),J(b,e,t),a(e,Ee,t),J(F,e,t),a(e,He,t),a(e,Y,t),a(e,ke,t),a(e,S,t),a(e,Qe,t),J(E,e,t),a(e,Pe,t),a(e,H,t),a(e,qe,t),J(k,e,t),a(e,De,t),J(v,e,t),a(e,Oe,t),J(Q,e,t),a(e,Ke,t),a(e,P,t),a(e,et,t),a(e,$,t),Gt($,Ce),Gt($,Lt),J(q,$,null),a(e,tt,t),a(e,D,t),a(e,lt,t),J(O,e,t),a(e,at,t),a(e,K,t),a(e,it,t),J(ee,e,t),a(e,rt,t),a(e,te,t),a(e,st,t),J(le,e,t),a(e,nt,t),J(ae,e,t),a(e,ot,t),a(e,ie,t),a(e,mt,t),a(e,re,t),a(e,pt,t),a(e,se,t),a(e,ut,t),J(ne,e,t),a(e,ct,t),J(oe,e,t),a(e,Mt,t),a(e,me,t),a(e,dt,t),a(e,pe,t),a(e,ft,t),J(ue,e,t),a(e,wt,t),a(e,ce,t),a(e,Jt,t),J(Me,e,t),a(e,ht,t),J(de,e,t),a(e,Tt,t),a(e,fe,t),a(e,yt,t),a(e,we,t),a(e,gt,t),J(Je,e,t),a(e,Ut,t),a(e,he,t),a(e,_t,t),J(Te,e,t),a(e,jt,t),J(ye,e,t),a(e,bt,t),a(e,ge,t),a(e,vt,t),J(Ue,e,t),a(e,$t,t),a(e,_e,t),a(e,Ct,t),a(e,je,t),a(e,Xt,t),a(e,be,t),a(e,It,t),J(ve,e,t),a(e,At,t),a(e,Xe,t),Wt=!0},p(e,[t]){const $e={};t&2&&($e.$$scope={dirty:t,ctx:e}),b.$set($e);const fl={};t&2&&(fl.$$scope={dirty:t,ctx:e}),v.$set(fl)},i(e){Wt||(h(p.$$.fragment,e),h(W.$$.fragment,e),h(Z.$$.fragment,e),h(V.$$.fragment,e),h(N.$$.fragment,e),h(B.$$.fragment,e),h(b.$$.fragment,e),h(F.$$.fragment,e),h(E.$$.fragment,e),h(k.$$.fragment,e),h(v.$$.fragment,e),h(Q.$$.fragment,e),h(q.$$.fragment,e),h(O.$$.fragment,e),h(ee.$$.fragment,e),h(le.$$.fragment,e),h(ae.$$.fragment,e),h(ne.$$.fragment,e),h(oe.$$.fragment,e),h(ue.$$.fragment,e),h(Me.$$.fragment,e),h(de.$$.fragment,e),h(Je.$$.fragment,e),h(Te.$$.fragment,e),h(ye.$$.fragment,e),h(Ue.$$.fragment,e),h(ve.$$.fragment,e),Wt=!0)},o(e){T(p.$$.fragment,e),T(W.$$.fragment,e),T(Z.$$.fragment,e),T(V.$$.fragment,e),T(N.$$.fragment,e),T(B.$$.fragment,e),T(b.$$.fragment,e),T(F.$$.fragment,e),T(E.$$.fragment,e),T(k.$$.fragment,e),T(v.$$.fragment,e),T(Q.$$.fragment,e),T(q.$$.fragment,e),T(O.$$.fragment,e),T(ee.$$.fragment,e),T(le.$$.fragment,e),T(ae.$$.fragment,e),T(ne.$$.fragment,e),T(oe.$$.fragment,e),T(ue.$$.fragment,e),T(Me.$$.fragment,e),T(de.$$.fragment,e),T(Je.$$.fragment,e),T(Te.$$.fragment,e),T(ye.$$.fragment,e),T(Ue.$$.fragment,e),T(ve.$$.fragment,e),Wt=!1},d(e){e&&(l(M),l(r),l(m),l(s),l(g),l(Ie),l(C),l(Ae),l(X),l(We),l(I),l(ze),l(A),l(Ze),l(Le),l(z),l(Re),l(Ge),l(L),l(Ve),l(R),l(xe),l(G),l(Ne),l(Be),l(x),l(Fe),l(Ye),l(Se),l(Ee),l(He),l(Y),l(ke),l(S),l(Qe),l(Pe),l(H),l(qe),l(De),l(Oe),l(Ke),l(P),l(et),l($),l(tt),l(D),l(lt),l(at),l(K),l(it),l(rt),l(te),l(st),l(nt),l(ot),l(ie),l(mt),l(re),l(pt),l(se),l(ut),l(ct),l(Mt),l(me),l(dt),l(pe),l(ft),l(wt),l(ce),l(Jt),l(ht),l(Tt),l(fe),l(yt),l(we),l(gt),l(Ut),l(he),l(_t),l(jt),l(bt),l(ge),l(vt),l($t),l(_e),l(Ct),l(je),l(Xt),l(be),l(It),l(At),l(Xe)),l(i),y(p,e),y(W,e),y(Z,e),y(V,e),y(N,e),y(B,e),y(b,e),y(F,e),y(E,e),y(k,e),y(v,e),y(Q,e),y(q),y(O,e),y(ee,e),y(le,e),y(ae,e),y(ne,e),y(oe,e),y(ue,e),y(Me,e),y(de,e),y(Je,e),y(Te,e),y(ye,e),y(Ue,e),y(ve,e)}}}const Wl='{"title":"Addestramento con script","local":"addestramento-con-script","sections":[{"title":"Installazione","local":"installazione","sections":[],"depth":2},{"title":"Esegui uno script","local":"esegui-uno-script","sections":[],"depth":2},{"title":"Addestramento distribuito e precisione mista","local":"addestramento-distribuito-e-precisione-mista","sections":[],"depth":2},{"title":"Esegui uno script su TPU","local":"esegui-uno-script-su-tpu","sections":[],"depth":2},{"title":"Esegui uno script con 🤗 Accelerate","local":"esegui-uno-script-con--accelerate","sections":[],"depth":2},{"title":"Uso di un dataset personalizzato","local":"uso-di-un-dataset-personalizzato","sections":[],"depth":2},{"title":"Testare uno script","local":"testare-uno-script","sections":[],"depth":2},{"title":"Riavviare addestramento da un checkpoint","local":"riavviare-addestramento-da-un-checkpoint","sections":[],"depth":2},{"title":"Condividi il tuo modello","local":"condividi-il-tuo-modello","sections":[],"depth":2}],"depth":1}';function zl(_){return Tl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xl extends yl{constructor(i){super(),gl(this,i,zl,Al,hl,{})}}export{xl as component};
