import{s as wl,o as Jl,n as Wt}from"../chunks/scheduler.d586627e.js";import{S as Tl,i as hl,g as u,s as i,r as f,A as yl,h as c,f as l,c as m,j as dl,u as w,x as M,k as Ml,y as Ul,a,v as J,d as T,t as h,w as y}from"../chunks/index.8589a59c.js";import{C as _}from"../chunks/CodeBlock.47c46d2c.js";import{F as fl,M as xt}from"../chunks/Markdown.67fc2fa9.js";import{H as g}from"../chunks/Heading.a70e045b.js";function _l(j){let o,d='O script de exemplo baixa e pré-processa um conjunto de dados da biblioteca 🤗 <a href="https://huggingface.co/docs/datasets/" rel="nofollow">Datasets</a>. Em seguida, o script ajusta um conjunto de dados com o <a href="https://huggingface.co/docs/transformers/main_classes/trainer" rel="nofollow">Trainer</a> em uma arquitetura que oferece suporte à sumarização. O exemplo a seguir mostra como ajustar <a href="https://huggingface.co/t5-small" rel="nofollow">T5-small</a> no conjunto de dados <a href="https://huggingface.co/datasets/cnn_dailymail" rel="nofollow">CNN/DailyMail</a>. O modelo T5 requer um argumento <code>source_prefix</code> adicional devido à forma como foi treinado. Este prompt informa ao T5 que esta é uma tarefa de sumarização.',r,n,p;return n=new _({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(){o=u("p"),o.innerHTML=d,r=i(),f(n.$$.fragment)},l(s){o=c(s,"P",{"data-svelte-h":!0}),M(o)!=="svelte-1r56mov"&&(o.innerHTML=d),r=m(s),w(n.$$.fragment,s)},m(s,U){a(s,o,U),a(s,r,U),J(n,s,U),p=!0},p:Wt,i(s){p||(T(n.$$.fragment,s),p=!0)},o(s){h(n.$$.fragment,s),p=!1},d(s){s&&(l(o),l(r)),y(n,s)}}}function jl(j){let o,d;return o=new xt({props:{$$slots:{default:[_l]},$$scope:{ctx:j}}}),{c(){f(o.$$.fragment)},l(r){w(o.$$.fragment,r)},m(r,n){J(o,r,n),d=!0},p(r,n){const p={};n&2&&(p.$$scope={dirty:n,ctx:r}),o.$set(p)},i(r){d||(T(o.$$.fragment,r),d=!0)},o(r){h(o.$$.fragment,r),d=!1},d(r){y(o,r)}}}function gl(j){let o,d='Este outro script de exemplo baixa e pré-processa um conjunto de dados da biblioteca 🤗 <a href="https://huggingface.co/docs/datasets/" rel="nofollow">Datasets</a>. Em seguida, o script ajusta um conjunto de dados usando Keras em uma arquitetura que oferece suporte à sumarização. O exemplo a seguir mostra como ajustar <a href="https://huggingface.co/t5-small" rel="nofollow">T5-small</a> no conjunto de dados <a href="https://huggingface.co/datasets/cnn_dailymail" rel="nofollow">CNN/DailyMail</a>. O modelo T5 requer um argumento <code>source_prefix</code> adicional devido à forma como foi treinado. Este prompt informa ao T5 que esta é uma tarefa de sumarização.',r,n,p;return n=new _({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(){o=u("p"),o.innerHTML=d,r=i(),f(n.$$.fragment)},l(s){o=c(s,"P",{"data-svelte-h":!0}),M(o)!=="svelte-tke5ep"&&(o.innerHTML=d),r=m(s),w(n.$$.fragment,s)},m(s,U){a(s,o,U),a(s,r,U),J(n,s,U),p=!0},p:Wt,i(s){p||(T(n.$$.fragment,s),p=!0)},o(s){h(n.$$.fragment,s),p=!1},d(s){s&&(l(o),l(r)),y(n,s)}}}function bl(j){let o,d;return o=new xt({props:{$$slots:{default:[gl]},$$scope:{ctx:j}}}),{c(){f(o.$$.fragment)},l(r){w(o.$$.fragment,r)},m(r,n){J(o,r,n),d=!0},p(r,n){const p={};n&2&&(p.$$scope={dirty:n,ctx:r}),o.$set(p)},i(r){d||(T(o.$$.fragment,r),d=!0)},o(r){h(o.$$.fragment,r),d=!1},d(r){y(o,r)}}}function $l(j){let o,d='As Unidades de Processamento de Tensor (TPUs) são projetadas especificamente para acelerar o desempenho. O PyTorch oferece suporte a TPUs com o compilador de aprendizado profundo <a href="https://www.tensorflow.org/xla" rel="nofollow">XLA</a> (consulte <a href="https://github.com/pytorch/xla/blob/master/README.md" rel="nofollow">aqui</a> para mais detalhes). Para usar uma TPU, inicie o script <code>xla_spawn.py</code> e use o argumento <code>num_cores</code> para definir o número de núcleos de TPU que você deseja usar.',r,n,p;return n=new _({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(){o=u("p"),o.innerHTML=d,r=i(),f(n.$$.fragment)},l(s){o=c(s,"P",{"data-svelte-h":!0}),M(o)!=="svelte-1b34dtk"&&(o.innerHTML=d),r=m(s),w(n.$$.fragment,s)},m(s,U){a(s,o,U),a(s,r,U),J(n,s,U),p=!0},p:Wt,i(s){p||(T(n.$$.fragment,s),p=!0)},o(s){h(n.$$.fragment,s),p=!1},d(s){s&&(l(o),l(r)),y(n,s)}}}function Cl(j){let o,d;return o=new xt({props:{$$slots:{default:[$l]},$$scope:{ctx:j}}}),{c(){f(o.$$.fragment)},l(r){w(o.$$.fragment,r)},m(r,n){J(o,r,n),d=!0},p(r,n){const p={};n&2&&(p.$$scope={dirty:n,ctx:r}),o.$set(p)},i(r){d||(T(o.$$.fragment,r),d=!0)},o(r){h(o.$$.fragment,r),d=!1},d(r){y(o,r)}}}function vl(j){let o,d='As Unidades de Processamento de Tensor (TPUs) são projetadas especificamente para acelerar o desempenho. Os scripts do TensorFlow utilizam uma <a href="https://www.tensorflow.org/guide/distributed_training#tpustrategy" rel="nofollow"><code>TPUStrategy</code></a> para treinamento em TPUs. Para usar uma TPU, passe o nome do recurso TPU para o argumento <code>tpu</code>.',r,n,p;return n=new _({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(){o=u("p"),o.innerHTML=d,r=i(),f(n.$$.fragment)},l(s){o=c(s,"P",{"data-svelte-h":!0}),M(o)!=="svelte-1w2p7mg"&&(o.innerHTML=d),r=m(s),w(n.$$.fragment,s)},m(s,U){a(s,o,U),a(s,r,U),J(n,s,U),p=!0},p:Wt,i(s){p||(T(n.$$.fragment,s),p=!0)},o(s){h(n.$$.fragment,s),p=!1},d(s){s&&(l(o),l(r)),y(n,s)}}}function Xl(j){let o,d;return o=new xt({props:{$$slots:{default:[vl]},$$scope:{ctx:j}}}),{c(){f(o.$$.fragment)},l(r){w(o.$$.fragment,r)},m(r,n){J(o,r,n),d=!0},p(r,n){const p={};n&2&&(p.$$scope={dirty:n,ctx:r}),o.$set(p)},i(r){d||(T(o.$$.fragment,r),d=!0)},o(r){h(o.$$.fragment,r),d=!1},d(r){y(o,r)}}}function Al(j){let o,d,r,n,p,s,U,Zt='Junto com os 🤗 Transformers <a href="./noteboks/README">notebooks</a>, também há scripts de exemplo demonstrando como treinar um modelo para uma tarefa com <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> ou <a href="https://github.com/huggingface/transformers/tree/main/examples/flax" rel="nofollow">JAX/Flax</a>.',ve,C,zt='Você também encontrará scripts que usamos em nossos <a href="https://github.com/huggingface/transformers/tree/main/examples/research_projects" rel="nofollow">projetos de pesquisa</a> e <a href="https://github.com/huggingface/transformers/tree/main/examples/legacy" rel="nofollow">exemplos legados</a> que são principalmente contribuições da comunidade. Esses scripts não são mantidos ativamente e exigem uma versão específica de 🤗 Transformers que provavelmente será incompatível com a versão mais recente da biblioteca.',Xe,v,Rt="Não se espera que os scripts de exemplo funcionem imediatamente em todos os problemas, você pode precisar adaptar o script ao problema que está tentando resolver. Para ajudá-lo com isso, a maioria dos scripts expõe totalmente como os dados são pré-processados, permitindo que você os edite conforme necessário para seu caso de uso.",Ae,X,Lt='Para qualquer recurso que você gostaria de implementar em um script de exemplo, discuta-o no <a href="https://discuss.huggingface.co/" rel="nofollow">fórum</a> ou em uma <a href="https://github.com/huggingface/transformers/issues" rel="nofollow">issue</a> antes de enviar um Pull Request. Embora recebamos correções de bugs, é improvável que mesclaremos um Pull Request que adicione mais funcionalidades ao custo de legibilidade.',Ie,A,Vt='Este guia mostrará como executar um exemplo de script de treinamento de sumarização em <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>. Espera-se que todos os exemplos funcionem com ambas as estruturas, a menos que especificado de outra forma.',We,I,xe,W,Nt="Para executar com êxito a versão mais recente dos scripts de exemplo, você precisa <strong>instalar o 🤗 Transformers da fonte</strong> em um novo ambiente virtual:",Ze,x,ze,Z,Gt="Para versões mais antigas dos scripts de exemplo, clique no botão abaixo:",Re,z,Bt='<summary>Exemplos para versões antigas dos 🤗 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>',Le,R,Ft="Em seguida, mude seu clone atual dos 🤗 Transformers para uma versão específica, como v3.5.1, por exemplo:",Ve,L,Ne,V,Yt="Depois de configurar a versão correta da biblioteca, navegue até a pasta de exemplo de sua escolha e instale os requisitos específicos do exemplo:",Ge,N,Be,G,Fe,b,Ye,B,Ee,F,Et='O <a href="https://huggingface.co/docs/transformers/main_classes/trainer" rel="nofollow">Trainer</a> oferece suporte a treinamento distribuído e precisão mista, o que significa que você também pode usá-lo em um script. Para habilitar esses dois recursos:',He,Y,Ht="<li>Adicione o argumento <code>fp16</code> para habilitar a precisão mista.</li> <li>Defina o número de GPUs a serem usadas com o argumento <code>nproc_per_node</code>.</li>",Se,E,ke,H,St='Os scripts do TensorFlow utilizam um <a href="https://www.tensorflow.org/guide/distributed_training#mirroredstrategy" rel="nofollow"><code>MirroredStrategy</code></a> para treinamento distribuído, e você não precisa adicionar argumentos adicionais ao script de treinamento. O script do TensorFlow usará várias GPUs por padrão, se estiverem disponíveis.',Qe,S,qe,$,Pe,k,De,Q,kt='🤗 <a href="https://huggingface.co/docs/accelerate" rel="nofollow">Accelerate</a> é uma biblioteca somente do PyTorch que oferece um método unificado para treinar um modelo em vários tipos de configurações (CPU, multiplas GPUs, TPUs), mantendo visibilidade no loop de treinamento do PyTorch. Certifique-se de ter o 🤗 Accelerate instalado se ainda não o tiver:',Oe,q,Qt="<p>Nota: Como o Accelerate está se desenvolvendo rapidamente, a versão git do Accelerate deve ser instalada para executar os scripts</p>",Ke,P,et,D,qt="Em vez do script <code>run_summarization.py</code>, você precisa usar o script <code>run_summarization_no_trainer.py</code>. Os scripts suportados pelo 🤗 Accelerate terão um arquivo <code>task_no_trainer.py</code> na pasta. Comece executando o seguinte comando para criar e salvar um arquivo de configuração:",tt,O,lt,K,Pt="Teste sua configuração para garantir que ela esteja corretamente configurada :",at,ee,ot,te,Dt="Agora você está pronto para iniciar o treinamento:",rt,le,st,ae,it,oe,Ot="O script de resumo oferece suporte a conjuntos de dados personalizados, desde que sejam um arquivo CSV ou JSON. Ao usar seu próprio conjunto de dados, você precisa especificar vários argumentos adicionais:",mt,re,Kt="<li><code>train_file</code> e <code>validation_file</code> especificam o caminho para seus arquivos de treinamento e validação respectivamente.</li> <li><code>text_column</code> é o texto de entrada para sumarização.</li> <li><code>summary_column</code> é o texto de destino para saída.</li>",nt,se,el="Um script para sumarização usando um conjunto de dados customizado ficaria assim:",pt,ie,ut,me,ct,ne,tl="Geralmente, é uma boa ideia executar seu script em um número menor de exemplos de conjuntos de dados para garantir que tudo funcione conforme o esperado antes de se comprometer com um conjunto de dados inteiro, que pode levar horas para ser concluído. Use os seguintes argumentos para truncar o conjunto de dados para um número máximo de amostras:",dt,pe,ll="<li><code>max_train_samples</code></li> <li><code>max_eval_samples</code></li> <li><code>max_predict_samples</code></li>",Mt,ue,ft,ce,al="Nem todos os scripts de exemplo suportam o argumento <code>max_predict_samples</code>. Se você não tiver certeza se seu script suporta este argumento, adicione o argumento <code>-h</code> para verificar:",wt,de,Jt,Me,Tt,fe,ol="Outra opção útil para habilitar é retomar o treinamento de um checkpoint anterior. Isso garantirá que você possa continuar de onde parou sem recomeçar se o seu treinamento for interrompido. Existem dois métodos para retomar o treinamento a partir de um checkpoint.",ht,we,rl="O primeiro método usa o argumento <code>output_dir previous_output_dir</code> para retomar o treinamento do último checkpoint armazenado em <code>output_dir</code>. Neste caso, você deve remover <code>overwrite_output_dir</code>:",yt,Je,Ut,Te,sl="O segundo método usa o argumento <code>resume_from_checkpoint path_to_specific_checkpoint</code> para retomar o treinamento de uma pasta de checkpoint específica.",_t,he,jt,ye,gt,Ue,il='Todos os scripts podem enviar seu modelo final para o <a href="https://huggingface.co/models" rel="nofollow">Model Hub</a>. Certifique-se de estar conectado ao Hugging Face antes de começar:',bt,_e,$t,je,ml="Em seguida, adicione o argumento <code>push_to_hub</code> ao script. Este argumento criará um repositório com seu nome de usuário do Hugging Face e o nome da pasta especificado em <code>output_dir</code>.",Ct,ge,nl="Para dar um nome específico ao seu repositório, use o argumento <code>push_to_hub_model_id</code> para adicioná-lo. O repositório será listado automaticamente em seu namespace.",vt,be,pl="O exemplo a seguir mostra como fazer upload de um modelo com um nome de repositório específico:",Xt,$e,At,Ce,It;return p=new g({props:{title:"Treinamento a partir de um script",local:"treinamento-a-partir-de-um-script",headingTag:"h1"}}),I=new g({props:{title:"Configuração",local:"configuração",headingTag:"h2"}}),x=new _({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}}),L=new _({props:{code:"Z2l0JTIwY2hlY2tvdXQlMjB0YWdzJTJGdjMuNS4x",highlighted:"git checkout tags/v3.5.1",wrap:!1}}),N=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1yJTIwcmVxdWlyZW1lbnRzLnR4dA==",highlighted:"pip install -r requirements.txt",wrap:!1}}),G=new g({props:{title:"Executando um script",local:"executando-um-script",headingTag:"h2"}}),b=new fl({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[bl],pytorch:[jl]},$$scope:{ctx:j}}}),B=new g({props:{title:"Treinamento distribuído e precisão mista",local:"treinamento-distribuído-e-precisão-mista",headingTag:"h2"}}),E=new _({props:{code:"cHl0aG9uJTIwLW0lMjB0b3JjaC5kaXN0cmlidXRlZC5sYXVuY2glMjAlNUMlMEElMjAlMjAlMjAlMjAtLW5wcm9jX3Blcl9ub2RlJTIwOCUyMHB5dG9yY2glMkZzdW1tYXJpemF0aW9uJTJGcnVuX3N1bW1hcml6YXRpb24ucHklMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZwMTYlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW1vZGVsX25hbWVfb3JfcGF0aCUyMHQ1LXNtYWxsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kb190cmFpbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fZXZhbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9uYW1lJTIwY25uX2RhaWx5bWFpbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9jb25maWclMjAlMjIzLjAuMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tc291cmNlX3ByZWZpeCUyMCUyMnN1bW1hcml6ZSUzQSUyMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3V0cHV0X2RpciUyMCUyRnRtcCUyRnRzdC1zdW1tYXJpemF0aW9uJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW92ZXJ3cml0ZV9vdXRwdXRfZGlyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wcmVkaWN0X3dpdGhfZ2VuZXJhdGU=",highlighted:`python -m torch.distributed.launch \\
    --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}}),S=new g({props:{title:"Executando um script em uma TPU",local:"executando-um-script-em-uma-tpu",headingTag:"h2"}}),$=new fl({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Xl],pytorch:[Cl]},$$scope:{ctx:j}}}),k=new g({props:{title:"Execute um script com 🤗 Accelerate",local:"execute-um-script-com--accelerate",headingTag:"h2"}}),P=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGYWNjZWxlcmF0ZQ==",highlighted:"pip install git+https://github.com/huggingface/accelerate",wrap:!1}}),O=new _({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config",wrap:!1}}),ee=new _({props:{code:"YWNjZWxlcmF0ZSUyMHRlc3Q=",highlighted:'accelerate <span class="hljs-built_in">test</span>',wrap:!1}}),le=new _({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 g({props:{title:"Usando um conjunto de dados personalizado",local:"usando-um-conjunto-de-dados-personalizado",headingTag:"h2"}}),ie=new _({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}}),me=new g({props:{title:"Testando um script",local:"testando-um-script",headingTag:"h2"}}),ue=new _({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}}),de=new _({props:{code:"ZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwLWg=",highlighted:"examples/pytorch/summarization/run_summarization.py -h",wrap:!1}}),Me=new g({props:{title:"Retomar o treinamento a partir de um checkpoint",local:"retomar-o-treinamento-a-partir-de-um-checkpoint",headingTag:"h2"}}),Je=new _({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}}),he=new _({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 g({props:{title:"Compartilhando seu modelo",local:"compartilhando-seu-modelo",headingTag:"h2"}}),_e=new _({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}}),$e=new _({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(){o=u("meta"),d=i(),r=u("p"),n=i(),f(p.$$.fragment),s=i(),U=u("p"),U.innerHTML=Zt,ve=i(),C=u("p"),C.innerHTML=zt,Xe=i(),v=u("p"),v.textContent=Rt,Ae=i(),X=u("p"),X.innerHTML=Lt,Ie=i(),A=u("p"),A.innerHTML=Vt,We=i(),f(I.$$.fragment),xe=i(),W=u("p"),W.innerHTML=Nt,Ze=i(),f(x.$$.fragment),ze=i(),Z=u("p"),Z.textContent=Gt,Re=i(),z=u("details"),z.innerHTML=Bt,Le=i(),R=u("p"),R.textContent=Ft,Ve=i(),f(L.$$.fragment),Ne=i(),V=u("p"),V.textContent=Yt,Ge=i(),f(N.$$.fragment),Be=i(),f(G.$$.fragment),Fe=i(),f(b.$$.fragment),Ye=i(),f(B.$$.fragment),Ee=i(),F=u("p"),F.innerHTML=Et,He=i(),Y=u("ul"),Y.innerHTML=Ht,Se=i(),f(E.$$.fragment),ke=i(),H=u("p"),H.innerHTML=St,Qe=i(),f(S.$$.fragment),qe=i(),f($.$$.fragment),Pe=i(),f(k.$$.fragment),De=i(),Q=u("p"),Q.innerHTML=kt,Oe=i(),q=u("blockquote"),q.innerHTML=Qt,Ke=i(),f(P.$$.fragment),et=i(),D=u("p"),D.innerHTML=qt,tt=i(),f(O.$$.fragment),lt=i(),K=u("p"),K.textContent=Pt,at=i(),f(ee.$$.fragment),ot=i(),te=u("p"),te.textContent=Dt,rt=i(),f(le.$$.fragment),st=i(),f(ae.$$.fragment),it=i(),oe=u("p"),oe.textContent=Ot,mt=i(),re=u("ul"),re.innerHTML=Kt,nt=i(),se=u("p"),se.textContent=el,pt=i(),f(ie.$$.fragment),ut=i(),f(me.$$.fragment),ct=i(),ne=u("p"),ne.textContent=tl,dt=i(),pe=u("ul"),pe.innerHTML=ll,Mt=i(),f(ue.$$.fragment),ft=i(),ce=u("p"),ce.innerHTML=al,wt=i(),f(de.$$.fragment),Jt=i(),f(Me.$$.fragment),Tt=i(),fe=u("p"),fe.textContent=ol,ht=i(),we=u("p"),we.innerHTML=rl,yt=i(),f(Je.$$.fragment),Ut=i(),Te=u("p"),Te.innerHTML=sl,_t=i(),f(he.$$.fragment),jt=i(),f(ye.$$.fragment),gt=i(),Ue=u("p"),Ue.innerHTML=il,bt=i(),f(_e.$$.fragment),$t=i(),je=u("p"),je.innerHTML=ml,Ct=i(),ge=u("p"),ge.innerHTML=nl,vt=i(),be=u("p"),be.textContent=pl,Xt=i(),f($e.$$.fragment),At=i(),Ce=u("p"),this.h()},l(e){const t=yl("svelte-u9bgzb",document.head);o=c(t,"META",{name:!0,content:!0}),t.forEach(l),d=m(e),r=c(e,"P",{}),dl(r).forEach(l),n=m(e),w(p.$$.fragment,e),s=m(e),U=c(e,"P",{"data-svelte-h":!0}),M(U)!=="svelte-1qz4uma"&&(U.innerHTML=Zt),ve=m(e),C=c(e,"P",{"data-svelte-h":!0}),M(C)!=="svelte-193tgo3"&&(C.innerHTML=zt),Xe=m(e),v=c(e,"P",{"data-svelte-h":!0}),M(v)!=="svelte-8z8nq0"&&(v.textContent=Rt),Ae=m(e),X=c(e,"P",{"data-svelte-h":!0}),M(X)!=="svelte-w3fb29"&&(X.innerHTML=Lt),Ie=m(e),A=c(e,"P",{"data-svelte-h":!0}),M(A)!=="svelte-tmubfg"&&(A.innerHTML=Vt),We=m(e),w(I.$$.fragment,e),xe=m(e),W=c(e,"P",{"data-svelte-h":!0}),M(W)!=="svelte-c4dhuj"&&(W.innerHTML=Nt),Ze=m(e),w(x.$$.fragment,e),ze=m(e),Z=c(e,"P",{"data-svelte-h":!0}),M(Z)!=="svelte-4fhjsu"&&(Z.textContent=Gt),Re=m(e),z=c(e,"DETAILS",{"data-svelte-h":!0}),M(z)!=="svelte-1c3acog"&&(z.innerHTML=Bt),Le=m(e),R=c(e,"P",{"data-svelte-h":!0}),M(R)!=="svelte-v80c9w"&&(R.textContent=Ft),Ve=m(e),w(L.$$.fragment,e),Ne=m(e),V=c(e,"P",{"data-svelte-h":!0}),M(V)!=="svelte-1w5msn7"&&(V.textContent=Yt),Ge=m(e),w(N.$$.fragment,e),Be=m(e),w(G.$$.fragment,e),Fe=m(e),w(b.$$.fragment,e),Ye=m(e),w(B.$$.fragment,e),Ee=m(e),F=c(e,"P",{"data-svelte-h":!0}),M(F)!=="svelte-1vdz8vp"&&(F.innerHTML=Et),He=m(e),Y=c(e,"UL",{"data-svelte-h":!0}),M(Y)!=="svelte-1sfer6l"&&(Y.innerHTML=Ht),Se=m(e),w(E.$$.fragment,e),ke=m(e),H=c(e,"P",{"data-svelte-h":!0}),M(H)!=="svelte-1ozm0fq"&&(H.innerHTML=St),Qe=m(e),w(S.$$.fragment,e),qe=m(e),w($.$$.fragment,e),Pe=m(e),w(k.$$.fragment,e),De=m(e),Q=c(e,"P",{"data-svelte-h":!0}),M(Q)!=="svelte-kfoy5a"&&(Q.innerHTML=kt),Oe=m(e),q=c(e,"BLOCKQUOTE",{"data-svelte-h":!0}),M(q)!=="svelte-1si1pwr"&&(q.innerHTML=Qt),Ke=m(e),w(P.$$.fragment,e),et=m(e),D=c(e,"P",{"data-svelte-h":!0}),M(D)!=="svelte-1p6qhuk"&&(D.innerHTML=qt),tt=m(e),w(O.$$.fragment,e),lt=m(e),K=c(e,"P",{"data-svelte-h":!0}),M(K)!=="svelte-v0yg1a"&&(K.textContent=Pt),at=m(e),w(ee.$$.fragment,e),ot=m(e),te=c(e,"P",{"data-svelte-h":!0}),M(te)!=="svelte-10n12rp"&&(te.textContent=Dt),rt=m(e),w(le.$$.fragment,e),st=m(e),w(ae.$$.fragment,e),it=m(e),oe=c(e,"P",{"data-svelte-h":!0}),M(oe)!=="svelte-1tr1qyx"&&(oe.textContent=Ot),mt=m(e),re=c(e,"UL",{"data-svelte-h":!0}),M(re)!=="svelte-u3lbwq"&&(re.innerHTML=Kt),nt=m(e),se=c(e,"P",{"data-svelte-h":!0}),M(se)!=="svelte-l4fums"&&(se.textContent=el),pt=m(e),w(ie.$$.fragment,e),ut=m(e),w(me.$$.fragment,e),ct=m(e),ne=c(e,"P",{"data-svelte-h":!0}),M(ne)!=="svelte-vgh2yq"&&(ne.textContent=tl),dt=m(e),pe=c(e,"UL",{"data-svelte-h":!0}),M(pe)!=="svelte-14g5f8g"&&(pe.innerHTML=ll),Mt=m(e),w(ue.$$.fragment,e),ft=m(e),ce=c(e,"P",{"data-svelte-h":!0}),M(ce)!=="svelte-1wibhqw"&&(ce.innerHTML=al),wt=m(e),w(de.$$.fragment,e),Jt=m(e),w(Me.$$.fragment,e),Tt=m(e),fe=c(e,"P",{"data-svelte-h":!0}),M(fe)!=="svelte-1lboxzr"&&(fe.textContent=ol),ht=m(e),we=c(e,"P",{"data-svelte-h":!0}),M(we)!=="svelte-1f0pc55"&&(we.innerHTML=rl),yt=m(e),w(Je.$$.fragment,e),Ut=m(e),Te=c(e,"P",{"data-svelte-h":!0}),M(Te)!=="svelte-uyp5k"&&(Te.innerHTML=sl),_t=m(e),w(he.$$.fragment,e),jt=m(e),w(ye.$$.fragment,e),gt=m(e),Ue=c(e,"P",{"data-svelte-h":!0}),M(Ue)!=="svelte-1hmop2a"&&(Ue.innerHTML=il),bt=m(e),w(_e.$$.fragment,e),$t=m(e),je=c(e,"P",{"data-svelte-h":!0}),M(je)!=="svelte-pdghl6"&&(je.innerHTML=ml),Ct=m(e),ge=c(e,"P",{"data-svelte-h":!0}),M(ge)!=="svelte-c00xox"&&(ge.innerHTML=nl),vt=m(e),be=c(e,"P",{"data-svelte-h":!0}),M(be)!=="svelte-14hz8jj"&&(be.textContent=pl),Xt=m(e),w($e.$$.fragment,e),At=m(e),Ce=c(e,"P",{}),dl(Ce).forEach(l),this.h()},h(){Ml(o,"name","hf:doc:metadata"),Ml(o,"content",Il)},m(e,t){Ul(document.head,o),a(e,d,t),a(e,r,t),a(e,n,t),J(p,e,t),a(e,s,t),a(e,U,t),a(e,ve,t),a(e,C,t),a(e,Xe,t),a(e,v,t),a(e,Ae,t),a(e,X,t),a(e,Ie,t),a(e,A,t),a(e,We,t),J(I,e,t),a(e,xe,t),a(e,W,t),a(e,Ze,t),J(x,e,t),a(e,ze,t),a(e,Z,t),a(e,Re,t),a(e,z,t),a(e,Le,t),a(e,R,t),a(e,Ve,t),J(L,e,t),a(e,Ne,t),a(e,V,t),a(e,Ge,t),J(N,e,t),a(e,Be,t),J(G,e,t),a(e,Fe,t),J(b,e,t),a(e,Ye,t),J(B,e,t),a(e,Ee,t),a(e,F,t),a(e,He,t),a(e,Y,t),a(e,Se,t),J(E,e,t),a(e,ke,t),a(e,H,t),a(e,Qe,t),J(S,e,t),a(e,qe,t),J($,e,t),a(e,Pe,t),J(k,e,t),a(e,De,t),a(e,Q,t),a(e,Oe,t),a(e,q,t),a(e,Ke,t),J(P,e,t),a(e,et,t),a(e,D,t),a(e,tt,t),J(O,e,t),a(e,lt,t),a(e,K,t),a(e,at,t),J(ee,e,t),a(e,ot,t),a(e,te,t),a(e,rt,t),J(le,e,t),a(e,st,t),J(ae,e,t),a(e,it,t),a(e,oe,t),a(e,mt,t),a(e,re,t),a(e,nt,t),a(e,se,t),a(e,pt,t),J(ie,e,t),a(e,ut,t),J(me,e,t),a(e,ct,t),a(e,ne,t),a(e,dt,t),a(e,pe,t),a(e,Mt,t),J(ue,e,t),a(e,ft,t),a(e,ce,t),a(e,wt,t),J(de,e,t),a(e,Jt,t),J(Me,e,t),a(e,Tt,t),a(e,fe,t),a(e,ht,t),a(e,we,t),a(e,yt,t),J(Je,e,t),a(e,Ut,t),a(e,Te,t),a(e,_t,t),J(he,e,t),a(e,jt,t),J(ye,e,t),a(e,gt,t),a(e,Ue,t),a(e,bt,t),J(_e,e,t),a(e,$t,t),a(e,je,t),a(e,Ct,t),a(e,ge,t),a(e,vt,t),a(e,be,t),a(e,Xt,t),J($e,e,t),a(e,At,t),a(e,Ce,t),It=!0},p(e,[t]){const ul={};t&2&&(ul.$$scope={dirty:t,ctx:e}),b.$set(ul);const cl={};t&2&&(cl.$$scope={dirty:t,ctx:e}),$.$set(cl)},i(e){It||(T(p.$$.fragment,e),T(I.$$.fragment,e),T(x.$$.fragment,e),T(L.$$.fragment,e),T(N.$$.fragment,e),T(G.$$.fragment,e),T(b.$$.fragment,e),T(B.$$.fragment,e),T(E.$$.fragment,e),T(S.$$.fragment,e),T($.$$.fragment,e),T(k.$$.fragment,e),T(P.$$.fragment,e),T(O.$$.fragment,e),T(ee.$$.fragment,e),T(le.$$.fragment,e),T(ae.$$.fragment,e),T(ie.$$.fragment,e),T(me.$$.fragment,e),T(ue.$$.fragment,e),T(de.$$.fragment,e),T(Me.$$.fragment,e),T(Je.$$.fragment,e),T(he.$$.fragment,e),T(ye.$$.fragment,e),T(_e.$$.fragment,e),T($e.$$.fragment,e),It=!0)},o(e){h(p.$$.fragment,e),h(I.$$.fragment,e),h(x.$$.fragment,e),h(L.$$.fragment,e),h(N.$$.fragment,e),h(G.$$.fragment,e),h(b.$$.fragment,e),h(B.$$.fragment,e),h(E.$$.fragment,e),h(S.$$.fragment,e),h($.$$.fragment,e),h(k.$$.fragment,e),h(P.$$.fragment,e),h(O.$$.fragment,e),h(ee.$$.fragment,e),h(le.$$.fragment,e),h(ae.$$.fragment,e),h(ie.$$.fragment,e),h(me.$$.fragment,e),h(ue.$$.fragment,e),h(de.$$.fragment,e),h(Me.$$.fragment,e),h(Je.$$.fragment,e),h(he.$$.fragment,e),h(ye.$$.fragment,e),h(_e.$$.fragment,e),h($e.$$.fragment,e),It=!1},d(e){e&&(l(d),l(r),l(n),l(s),l(U),l(ve),l(C),l(Xe),l(v),l(Ae),l(X),l(Ie),l(A),l(We),l(xe),l(W),l(Ze),l(ze),l(Z),l(Re),l(z),l(Le),l(R),l(Ve),l(Ne),l(V),l(Ge),l(Be),l(Fe),l(Ye),l(Ee),l(F),l(He),l(Y),l(Se),l(ke),l(H),l(Qe),l(qe),l(Pe),l(De),l(Q),l(Oe),l(q),l(Ke),l(et),l(D),l(tt),l(lt),l(K),l(at),l(ot),l(te),l(rt),l(st),l(it),l(oe),l(mt),l(re),l(nt),l(se),l(pt),l(ut),l(ct),l(ne),l(dt),l(pe),l(Mt),l(ft),l(ce),l(wt),l(Jt),l(Tt),l(fe),l(ht),l(we),l(yt),l(Ut),l(Te),l(_t),l(jt),l(gt),l(Ue),l(bt),l($t),l(je),l(Ct),l(ge),l(vt),l(be),l(Xt),l(At),l(Ce)),l(o),y(p,e),y(I,e),y(x,e),y(L,e),y(N,e),y(G,e),y(b,e),y(B,e),y(E,e),y(S,e),y($,e),y(k,e),y(P,e),y(O,e),y(ee,e),y(le,e),y(ae,e),y(ie,e),y(me,e),y(ue,e),y(de,e),y(Me,e),y(Je,e),y(he,e),y(ye,e),y(_e,e),y($e,e)}}}const Il='{"title":"Treinamento a partir de um script","local":"treinamento-a-partir-de-um-script","sections":[{"title":"Configuração","local":"configuração","sections":[],"depth":2},{"title":"Executando um script","local":"executando-um-script","sections":[],"depth":2},{"title":"Treinamento distribuído e precisão mista","local":"treinamento-distribuído-e-precisão-mista","sections":[],"depth":2},{"title":"Executando um script em uma TPU","local":"executando-um-script-em-uma-tpu","sections":[],"depth":2},{"title":"Execute um script com 🤗 Accelerate","local":"execute-um-script-com--accelerate","sections":[],"depth":2},{"title":"Usando um conjunto de dados personalizado","local":"usando-um-conjunto-de-dados-personalizado","sections":[],"depth":2},{"title":"Testando um script","local":"testando-um-script","sections":[],"depth":2},{"title":"Retomar o treinamento a partir de um checkpoint","local":"retomar-o-treinamento-a-partir-de-um-checkpoint","sections":[],"depth":2},{"title":"Compartilhando seu modelo","local":"compartilhando-seu-modelo","sections":[],"depth":2}],"depth":1}';function Wl(j){return Jl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Vl extends Tl{constructor(o){super(),hl(this,o,Wl,Al,wl,{})}}export{Vl as component};
