import{s as Tl,o as hl,n as Ze}from"../chunks/scheduler.56730f09.js";import{S as dl,i as Ul,g as o,s,r as w,A as _l,h as f,f as l,c as M,j as Le,u as J,x as c,k as Jl,y as Ge,a,v as y,d as T,t as h,w as d}from"../chunks/index.1f144517.js";import{C as _}from"../chunks/CodeBlock.738eeccb.js";import{F as yl,M as xe}from"../chunks/Markdown.c541024b.js";import{H as g}from"../chunks/Heading.57d46534.js";function jl(j){let i,u=`예제 스크립트는 🤗 <a href="https://huggingface.co/docs/datasets/" rel="nofollow">Datasets</a> 라이브러리에서 데이터 세트를 다운로드하고 전처리합니다.
그런 다음 스크립트는 요약 기능을 지원하는 아키텍처에서 <a href="https://huggingface.co/docs/transformers/main_classes/trainer" rel="nofollow">Trainer</a>를 사용하여 데이터 세트를 미세 조정합니다.
다음 예는 <a href="https://huggingface.co/datasets/cnn_dailymail" rel="nofollow">CNN/DailyMail</a> 데이터 세트에서 <a href="https://huggingface.co/t5-small" rel="nofollow">T5-small</a>을 미세 조정합니다.
T5 모델은 훈련 방식에 따라 추가 <code>source_prefix</code> 인수가 필요하며, 이 프롬프트는 요약 작업임을 T5에 알려줍니다.`,r,m,p;return m=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(){i=o("p"),i.innerHTML=u,r=s(),w(m.$$.fragment)},l(n){i=f(n,"P",{"data-svelte-h":!0}),c(i)!=="svelte-h1sv3m"&&(i.innerHTML=u),r=M(n),J(m.$$.fragment,n)},m(n,U){a(n,i,U),a(n,r,U),y(m,n,U),p=!0},p:Ze,i(n){p||(T(m.$$.fragment,n),p=!0)},o(n){h(m.$$.fragment,n),p=!1},d(n){n&&(l(i),l(r)),d(m,n)}}}function gl(j){let i,u;return i=new xe({props:{$$slots:{default:[jl]},$$scope:{ctx:j}}}),{c(){w(i.$$.fragment)},l(r){J(i.$$.fragment,r)},m(r,m){y(i,r,m),u=!0},p(r,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:r}),i.$set(p)},i(r){u||(T(i.$$.fragment,r),u=!0)},o(r){h(i.$$.fragment,r),u=!1},d(r){d(i,r)}}}function $l(j){let i,u=`예제 스크립트는 🤗 <a href="https://huggingface.co/docs/datasets/" rel="nofollow">Datasets</a> 라이브러리에서 데이터 세트를 다운로드하고 전처리합니다.
그런 다음 스크립트는 요약 기능을 지원하는 아키텍처에서 Keras를 사용하여 데이터 세트를 미세 조정합니다.
다음 예는 <a href="https://huggingface.co/datasets/cnn_dailymail" rel="nofollow">CNN/DailyMail</a> 데이터 세트에서 <a href="https://huggingface.co/t5-small" rel="nofollow">T5-small</a>을 미세 조정합니다.
T5 모델은 훈련 방식에 따라 추가 <code>source_prefix</code> 인수가 필요하며, 이 프롬프트는 요약 작업임을 T5에 알려줍니다.`,r,m,p;return m=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(){i=o("p"),i.innerHTML=u,r=s(),w(m.$$.fragment)},l(n){i=f(n,"P",{"data-svelte-h":!0}),c(i)!=="svelte-1dpi2fx"&&(i.innerHTML=u),r=M(n),J(m.$$.fragment,n)},m(n,U){a(n,i,U),a(n,r,U),y(m,n,U),p=!0},p:Ze,i(n){p||(T(m.$$.fragment,n),p=!0)},o(n){h(m.$$.fragment,n),p=!1},d(n){n&&(l(i),l(r)),d(m,n)}}}function Cl(j){let i,u;return i=new xe({props:{$$slots:{default:[$l]},$$scope:{ctx:j}}}),{c(){w(i.$$.fragment)},l(r){J(i.$$.fragment,r)},m(r,m){y(i,r,m),u=!0},p(r,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:r}),i.$set(p)},i(r){u||(T(i.$$.fragment,r),u=!0)},o(r){h(i.$$.fragment,r),u=!1},d(r){d(i,r)}}}function Xl(j){let i,u=`Tensor Processing Units (TPUs)는 성능을 가속화하기 위해 특별히 설계되었습니다.
PyTorch는 <a href="https://www.tensorflow.org/xla" rel="nofollow">XLA</a> 딥러닝 컴파일러와 함께 TPU를 지원합니다(자세한 내용은 <a href="https://github.com/pytorch/xla/blob/master/README.md" rel="nofollow">여기</a> 참조).
TPU를 사용하려면 <code>xla_spawn.py</code> 스크립트를 실행하고 <code>num_cores</code> 인수를 사용하여 사용하려는 TPU 코어 수를 설정합니다.`,r,m,p;return m=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(){i=o("p"),i.innerHTML=u,r=s(),w(m.$$.fragment)},l(n){i=f(n,"P",{"data-svelte-h":!0}),c(i)!=="svelte-1uupy1q"&&(i.innerHTML=u),r=M(n),J(m.$$.fragment,n)},m(n,U){a(n,i,U),a(n,r,U),y(m,n,U),p=!0},p:Ze,i(n){p||(T(m.$$.fragment,n),p=!0)},o(n){h(m.$$.fragment,n),p=!1},d(n){n&&(l(i),l(r)),d(m,n)}}}function bl(j){let i,u;return i=new xe({props:{$$slots:{default:[Xl]},$$scope:{ctx:j}}}),{c(){w(i.$$.fragment)},l(r){J(i.$$.fragment,r)},m(r,m){y(i,r,m),u=!0},p(r,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:r}),i.$set(p)},i(r){u||(T(i.$$.fragment,r),u=!0)},o(r){h(i.$$.fragment,r),u=!1},d(r){d(i,r)}}}function Il(j){let i,u=`Tensor Processing Units (TPUs)는 성능을 가속화하기 위해 특별히 설계되었습니다.
TensorFlow 스크립트는 TPU를 훈련에 사용하기 위해 <a href="https://www.tensorflow.org/guide/distributed_training#tpustrategy" rel="nofollow"><code>TPUStrategy</code></a>를 활용합니다.
TPU를 사용하려면 TPU 리소스의 이름을 <code>tpu</code> 인수에 전달합니다.`,r,m,p;return m=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(){i=o("p"),i.innerHTML=u,r=s(),w(m.$$.fragment)},l(n){i=f(n,"P",{"data-svelte-h":!0}),c(i)!=="svelte-14rbp0b"&&(i.innerHTML=u),r=M(n),J(m.$$.fragment,n)},m(n,U){a(n,i,U),a(n,r,U),y(m,n,U),p=!0},p:Ze,i(n){p||(T(m.$$.fragment,n),p=!0)},o(n){h(m.$$.fragment,n),p=!1},d(n){n&&(l(i),l(r)),d(m,n)}}}function Al(j){let i,u;return i=new xe({props:{$$slots:{default:[Il]},$$scope:{ctx:j}}}),{c(){w(i.$$.fragment)},l(r){J(i.$$.fragment,r)},m(r,m){y(i,r,m),u=!0},p(r,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:r}),i.$set(p)},i(r){u||(T(i.$$.fragment,r),u=!0)},o(r){h(i.$$.fragment,r),u=!1},d(r){d(i,r)}}}function vl(j){let i,u,r,m,p,n,U,Ve='🤗 Transformers 노트북과 함께 <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>, 또는 <a href="https://github.com/huggingface/transformers/tree/main/examples/flax" rel="nofollow">JAX/Flax</a>를 사용해 특정 태스크에 대한 모델을 훈련하는 방법을 보여주는 예제 스크립트도 있습니다.',At,b,Ne=`또한 <a href="https://github.com/huggingface/transformers/tree/main/examples/research_projects" rel="nofollow">연구 프로젝트</a> 및 <a href="https://github.com/huggingface/transformers/tree/main/examples/legacy" rel="nofollow">레거시 예제</a>에서 대부분 커뮤니티에서 제공한 스크립트를 찾을 수 있습니다.
이러한 스크립트는 적극적으로 유지 관리되지 않으며 최신 버전의 라이브러리와 호환되지 않을 가능성이 높은 특정 버전의 🤗 Transformers를 필요로 합니다.`,vt,I,Be=`예제 스크립트가 모든 문제에서 바로 작동하는 것은 아니며, 해결하려는 문제에 맞게 스크립트를 변경해야 할 수도 있습니다.
이를 위해 대부분의 스크립트에는 데이터 전처리 방법이 나와있어 필요에 따라 수정할 수 있습니다.`,Wt,A,Fe=`예제 스크립트에 구현하고 싶은 기능이 있으면 pull request를 제출하기 전에 <a href="https://discuss.huggingface.co/" rel="nofollow">포럼</a> 또는 <a href="https://github.com/huggingface/transformers/issues" rel="nofollow">이슈</a>에서 논의해 주세요.
버그 수정은 환영하지만 가독성을 희생하면서까지 더 많은 기능을 추가하는 pull request는 병합(merge)하지 않을 가능성이 높습니다.`,Zt,v,ze=`이 가이드에서는 <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/summarization" rel="nofollow">PyTorch</a> 및 <a href="https://github.com/huggingface/transformers/tree/main/examples/tensorflow/summarization" rel="nofollow">TensorFlow</a>에서 요약 훈련하는
스크립트 예제를 실행하는 방법을 설명합니다.
특별한 설명이 없는 한 모든 예제는 두 프레임워크 모두에서 작동할 것으로 예상됩니다.`,xt,W,Rt,Z,Ye="최신 버전의 예제 스크립트를 성공적으로 실행하려면 새 가상 환경에서 <strong>소스로부터 🤗 Transformers를 설치</strong>해야 합니다:",Lt,x,Gt,R,Se="이전 버전의 예제 스크립트를 보려면 아래 토글을 클릭하세요:",Vt,L,He='<summary>이전 버전의 🤗 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>',Nt,G,Ee="그리고 다음과 같이 복제(clone)해온 🤗 Transformers 버전을 특정 버전(예: v3.5.1)으로 전환하세요:",Bt,V,Ft,N,Qe="올바른 라이브러리 버전을 설정한 후 원하는 예제 폴더로 이동하여 예제별로 라이브러리에 대한 요구 사항(requirements)을 설치합니다:",zt,B,Yt,F,St,$,Ht,z,Et,Y,ke=`<a href="https://huggingface.co/docs/transformers/main_classes/trainer" rel="nofollow">Trainer</a> 클래스는 분산 훈련과 혼합 정밀도(mixed precision)를 지원하므로 스크립트에서도 사용할 수 있습니다.
이 두 가지 기능을 모두 활성화하려면 다음 두 가지를 설정해야 합니다:`,Qt,S,Pe="<li><code>fp16</code> 인수를 추가해 혼합 정밀도(mixed precision)를 활성화합니다.</li> <li><code>nproc_per_node</code> 인수를 추가해 사용할 GPU 개수를 설정합니다.</li>",kt,H,Pt,E,De=`TensorFlow 스크립트는 분산 훈련을 위해 <a href="https://www.tensorflow.org/guide/distributed_training#mirroredstrategy" rel="nofollow"><code>MirroredStrategy</code></a>를 활용하며, 훈련 스크립트에 인수를 추가할 필요가 없습니다.
다중 GPU 환경이라면, TensorFlow 스크립트는 기본적으로 여러 개의 GPU를 사용합니다.`,Dt,Q,qt,C,Ot,k,Kt,P,qe=`🤗 <a href="https://huggingface.co/docs/accelerate" rel="nofollow">Accelerate</a>는 PyTorch 훈련 과정에 대한 완전한 가시성을 유지하면서 여러 유형의 설정(CPU 전용, 다중 GPU, TPU)에서 모델을 훈련할 수 있는 통합 방법을 제공하는 PyTorch 전용 라이브러리입니다.
🤗 Accelerate가 설치되어 있는지 확인하세요:`,te,X,bt,Oe="참고: Accelerate는 빠르게 개발 중이므로 스크립트를 실행하려면 accelerate를 설치해야 합니다.",Re,D,ee,q,Ke=`<code>run_summarization.py</code> 스크립트 대신 <code>run_summarization_no_trainer.py</code> 스크립트를 사용해야 합니다.
🤗 Accelerate 클래스가 지원되는 스크립트는 폴더에 <code>task_no_trainer.py</code> 파일이 있습니다.
다음 명령을 실행하여 구성 파일을 생성하고 저장합니다:`,le,O,ae,K,tl="설정을 테스트하여 올바르게 구성되었는지 확인합니다:",ie,tt,re,et,el="이제 훈련을 시작할 준비가 되었습니다:",ne,lt,se,at,Me,it,ll=`요약 스크립트는 사용자 지정 데이터 세트가 CSV 또는 JSON 파일인 경우 지원합니다.
사용자 지정 데이터 세트를 사용하는 경우에는 몇 가지 추가 인수를 지정해야 합니다:`,me,rt,al="<li><code>train_file</code>과 <code>validation_file</code>은 훈련 및 검증 파일의 경로를 지정합니다.</li> <li><code>text_column</code>은 요약할 입력 텍스트입니다.</li> <li><code>summary_column</code>은 출력할 대상 텍스트입니다.</li>",pe,nt,il="사용자 지정 데이터 세트를 사용하는 요약 스크립트는 다음과 같습니다:",oe,st,fe,Mt,ue,mt,rl="전체 데이터 세트를 대상으로 훈련을 완료하는데 꽤 오랜 시간이 걸리기 때문에, 작은 데이터 세트에서 모든 것이 예상대로 실행되는지 확인하는 것이 좋습니다.",ce,pt,nl="다음 인수를 사용하여 데이터 세트를 최대 샘플 수로 잘라냅니다:",we,ot,sl="<li><code>max_train_samples</code></li> <li><code>max_eval_samples</code></li> <li><code>max_predict_samples</code></li>",Je,ft,ye,ut,Ml=`모든 예제 스크립트가 <code>max_predict_samples</code> 인수를 지원하지는 않습니다.
스크립트가 이 인수를 지원하는지 확실하지 않은 경우 <code>-h</code> 인수를 추가하여 확인하세요:`,Te,ct,he,wt,de,Jt,ml=`또 다른 유용한 옵션은 이전 체크포인트에서 훈련을 재개하는 것입니다.
이렇게 하면 훈련이 중단되더라도 처음부터 다시 시작하지 않고 중단한 부분부터 다시 시작할 수 있습니다.
체크포인트에서 훈련을 재개하는 방법에는 두 가지가 있습니다.`,Ue,yt,pl=`첫 번째는 <code>output_dir previous_output_dir</code> 인수를 사용하여 <code>output_dir</code>에 저장된 최신 체크포인트부터 훈련을 재개하는 방법입니다.
이 경우 <code>overwrite_output_dir</code>을 제거해야 합니다:`,_e,Tt,je,ht,ol="두 번째는 <code>resume_from_checkpoint path_to_specific_checkpoint</code> 인수를 사용하여 특정 체크포인트 폴더에서 훈련을 재개하는 방법입니다.",ge,dt,$e,Ut,Ce,_t,fl=`모든 스크립트는 최종 모델을 <a href="https://huggingface.co/models" rel="nofollow">Model Hub</a>에 업로드할 수 있습니다.
시작하기 전에 Hugging Face에 로그인했는지 확인하세요:`,Xe,jt,be,gt,ul=`그런 다음 스크립트에 <code>push_to_hub</code> 인수를 추가합니다.
이 인수는 Hugging Face 사용자 이름과 <code>output_dir</code>에 지정된 폴더 이름으로 저장소를 생성합니다.`,Ie,$t,cl=`저장소에 특정 이름을 지정하려면 <code>push_to_hub_model_id</code> 인수를 사용하여 추가합니다.
저장소는 네임스페이스 아래에 자동으로 나열됩니다.
다음 예는 특정 저장소 이름으로 모델을 업로드하는 방법입니다:`,Ae,Ct,ve,It,We;return p=new g({props:{title:"스크립트로 실행하기",local:"train-with-a-script",headingTag:"h1"}}),W=new g({props:{title:"설정하기",local:"setup",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}}),V=new _({props:{code:"Z2l0JTIwY2hlY2tvdXQlMjB0YWdzJTJGdjMuNS4x",highlighted:"git checkout tags/v3.5.1",wrap:!1}}),B=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1yJTIwcmVxdWlyZW1lbnRzLnR4dA==",highlighted:"pip install -r requirements.txt",wrap:!1}}),F=new g({props:{title:"스크립트 실행하기",local:"run-a-script",headingTag:"h2"}}),$=new yl({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Cl],pytorch:[gl]},$$scope:{ctx:j}}}),z=new g({props:{title:"혼합 정밀도(mixed precision)로 분산 훈련하기",local:"distributed-training-and-mixed-precision",headingTag:"h2"}}),H=new _({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}}),Q=new g({props:{title:"TPU 위에서 스크립트 실행하기",local:"run-a-script-on-a-tpu",headingTag:"h2"}}),C=new yl({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Al],pytorch:[bl]},$$scope:{ctx:j}}}),k=new g({props:{title:"🤗 Accelerate로 스크립트 실행하기",local:"run-a-script-with-accelerate",headingTag:"h2"}}),D=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}}),tt=new _({props:{code:"YWNjZWxlcmF0ZSUyMHRlc3Q=",highlighted:'accelerate <span class="hljs-built_in">test</span>',wrap:!1}}),lt=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}}),at=new g({props:{title:"사용자 정의 데이터 세트 사용하기",local:"use-a-custom-dataset",headingTag:"h2"}}),st=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}}),Mt=new g({props:{title:"스크립트 테스트하기",local:"test-a-script",headingTag:"h2"}}),ft=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}}),ct=new _({props:{code:"ZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwLWg=",highlighted:"examples/pytorch/summarization/run_summarization.py -h",wrap:!1}}),wt=new g({props:{title:"체크포인트(checkpoint)에서 훈련 이어서 하기",local:"resume-training-from-checkpoint",headingTag:"h2"}}),Tt=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}}),dt=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}}),Ut=new g({props:{title:"모델 공유하기",local:"share-your-model",headingTag:"h2"}}),jt=new _({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}}),Ct=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(){i=o("meta"),u=s(),r=o("p"),m=s(),w(p.$$.fragment),n=s(),U=o("p"),U.innerHTML=Ve,At=s(),b=o("p"),b.innerHTML=Ne,vt=s(),I=o("p"),I.textContent=Be,Wt=s(),A=o("p"),A.innerHTML=Fe,Zt=s(),v=o("p"),v.innerHTML=ze,xt=s(),w(W.$$.fragment),Rt=s(),Z=o("p"),Z.innerHTML=Ye,Lt=s(),w(x.$$.fragment),Gt=s(),R=o("p"),R.textContent=Se,Vt=s(),L=o("details"),L.innerHTML=He,Nt=s(),G=o("p"),G.textContent=Ee,Bt=s(),w(V.$$.fragment),Ft=s(),N=o("p"),N.textContent=Qe,zt=s(),w(B.$$.fragment),Yt=s(),w(F.$$.fragment),St=s(),w($.$$.fragment),Ht=s(),w(z.$$.fragment),Et=s(),Y=o("p"),Y.innerHTML=ke,Qt=s(),S=o("ul"),S.innerHTML=Pe,kt=s(),w(H.$$.fragment),Pt=s(),E=o("p"),E.innerHTML=De,Dt=s(),w(Q.$$.fragment),qt=s(),w(C.$$.fragment),Ot=s(),w(k.$$.fragment),Kt=s(),P=o("p"),P.innerHTML=qe,te=s(),X=o("blockquote"),bt=o("p"),bt.textContent=Oe,Re=s(),w(D.$$.fragment),ee=s(),q=o("p"),q.innerHTML=Ke,le=s(),w(O.$$.fragment),ae=s(),K=o("p"),K.textContent=tl,ie=s(),w(tt.$$.fragment),re=s(),et=o("p"),et.textContent=el,ne=s(),w(lt.$$.fragment),se=s(),w(at.$$.fragment),Me=s(),it=o("p"),it.textContent=ll,me=s(),rt=o("ul"),rt.innerHTML=al,pe=s(),nt=o("p"),nt.textContent=il,oe=s(),w(st.$$.fragment),fe=s(),w(Mt.$$.fragment),ue=s(),mt=o("p"),mt.textContent=rl,ce=s(),pt=o("p"),pt.textContent=nl,we=s(),ot=o("ul"),ot.innerHTML=sl,Je=s(),w(ft.$$.fragment),ye=s(),ut=o("p"),ut.innerHTML=Ml,Te=s(),w(ct.$$.fragment),he=s(),w(wt.$$.fragment),de=s(),Jt=o("p"),Jt.textContent=ml,Ue=s(),yt=o("p"),yt.innerHTML=pl,_e=s(),w(Tt.$$.fragment),je=s(),ht=o("p"),ht.innerHTML=ol,ge=s(),w(dt.$$.fragment),$e=s(),w(Ut.$$.fragment),Ce=s(),_t=o("p"),_t.innerHTML=fl,Xe=s(),w(jt.$$.fragment),be=s(),gt=o("p"),gt.innerHTML=ul,Ie=s(),$t=o("p"),$t.innerHTML=cl,Ae=s(),w(Ct.$$.fragment),ve=s(),It=o("p"),this.h()},l(t){const e=_l("svelte-u9bgzb",document.head);i=f(e,"META",{name:!0,content:!0}),e.forEach(l),u=M(t),r=f(t,"P",{}),Le(r).forEach(l),m=M(t),J(p.$$.fragment,t),n=M(t),U=f(t,"P",{"data-svelte-h":!0}),c(U)!=="svelte-cb9dpp"&&(U.innerHTML=Ve),At=M(t),b=f(t,"P",{"data-svelte-h":!0}),c(b)!=="svelte-xygtck"&&(b.innerHTML=Ne),vt=M(t),I=f(t,"P",{"data-svelte-h":!0}),c(I)!=="svelte-19ose0k"&&(I.textContent=Be),Wt=M(t),A=f(t,"P",{"data-svelte-h":!0}),c(A)!=="svelte-mixhy4"&&(A.innerHTML=Fe),Zt=M(t),v=f(t,"P",{"data-svelte-h":!0}),c(v)!=="svelte-1980krf"&&(v.innerHTML=ze),xt=M(t),J(W.$$.fragment,t),Rt=M(t),Z=f(t,"P",{"data-svelte-h":!0}),c(Z)!=="svelte-1ducwvi"&&(Z.innerHTML=Ye),Lt=M(t),J(x.$$.fragment,t),Gt=M(t),R=f(t,"P",{"data-svelte-h":!0}),c(R)!=="svelte-i8u7rm"&&(R.textContent=Se),Vt=M(t),L=f(t,"DETAILS",{"data-svelte-h":!0}),c(L)!=="svelte-1pp84xd"&&(L.innerHTML=He),Nt=M(t),G=f(t,"P",{"data-svelte-h":!0}),c(G)!=="svelte-18cv2w9"&&(G.textContent=Ee),Bt=M(t),J(V.$$.fragment,t),Ft=M(t),N=f(t,"P",{"data-svelte-h":!0}),c(N)!=="svelte-1avflzf"&&(N.textContent=Qe),zt=M(t),J(B.$$.fragment,t),Yt=M(t),J(F.$$.fragment,t),St=M(t),J($.$$.fragment,t),Ht=M(t),J(z.$$.fragment,t),Et=M(t),Y=f(t,"P",{"data-svelte-h":!0}),c(Y)!=="svelte-1vvgf5c"&&(Y.innerHTML=ke),Qt=M(t),S=f(t,"UL",{"data-svelte-h":!0}),c(S)!=="svelte-1wysnl1"&&(S.innerHTML=Pe),kt=M(t),J(H.$$.fragment,t),Pt=M(t),E=f(t,"P",{"data-svelte-h":!0}),c(E)!=="svelte-ps369g"&&(E.innerHTML=De),Dt=M(t),J(Q.$$.fragment,t),qt=M(t),J(C.$$.fragment,t),Ot=M(t),J(k.$$.fragment,t),Kt=M(t),P=f(t,"P",{"data-svelte-h":!0}),c(P)!=="svelte-1mmj90o"&&(P.innerHTML=qe),te=M(t),X=f(t,"BLOCKQUOTE",{});var Xt=Le(X);bt=f(Xt,"P",{"data-svelte-h":!0}),c(bt)!=="svelte-18nhjp2"&&(bt.textContent=Oe),Re=M(Xt),J(D.$$.fragment,Xt),Xt.forEach(l),ee=M(t),q=f(t,"P",{"data-svelte-h":!0}),c(q)!=="svelte-dnc8lj"&&(q.innerHTML=Ke),le=M(t),J(O.$$.fragment,t),ae=M(t),K=f(t,"P",{"data-svelte-h":!0}),c(K)!=="svelte-1wr3wvk"&&(K.textContent=tl),ie=M(t),J(tt.$$.fragment,t),re=M(t),et=f(t,"P",{"data-svelte-h":!0}),c(et)!=="svelte-dp0etk"&&(et.textContent=el),ne=M(t),J(lt.$$.fragment,t),se=M(t),J(at.$$.fragment,t),Me=M(t),it=f(t,"P",{"data-svelte-h":!0}),c(it)!=="svelte-8q6g2t"&&(it.textContent=ll),me=M(t),rt=f(t,"UL",{"data-svelte-h":!0}),c(rt)!=="svelte-1o9guy1"&&(rt.innerHTML=al),pe=M(t),nt=f(t,"P",{"data-svelte-h":!0}),c(nt)!=="svelte-1gh72vz"&&(nt.textContent=il),oe=M(t),J(st.$$.fragment,t),fe=M(t),J(Mt.$$.fragment,t),ue=M(t),mt=f(t,"P",{"data-svelte-h":!0}),c(mt)!=="svelte-e7bxnz"&&(mt.textContent=rl),ce=M(t),pt=f(t,"P",{"data-svelte-h":!0}),c(pt)!=="svelte-4bvtew"&&(pt.textContent=nl),we=M(t),ot=f(t,"UL",{"data-svelte-h":!0}),c(ot)!=="svelte-14g5f8g"&&(ot.innerHTML=sl),Je=M(t),J(ft.$$.fragment,t),ye=M(t),ut=f(t,"P",{"data-svelte-h":!0}),c(ut)!=="svelte-11kw235"&&(ut.innerHTML=Ml),Te=M(t),J(ct.$$.fragment,t),he=M(t),J(wt.$$.fragment,t),de=M(t),Jt=f(t,"P",{"data-svelte-h":!0}),c(Jt)!=="svelte-13nxa0f"&&(Jt.textContent=ml),Ue=M(t),yt=f(t,"P",{"data-svelte-h":!0}),c(yt)!=="svelte-1w6ffz1"&&(yt.innerHTML=pl),_e=M(t),J(Tt.$$.fragment,t),je=M(t),ht=f(t,"P",{"data-svelte-h":!0}),c(ht)!=="svelte-y9guuv"&&(ht.innerHTML=ol),ge=M(t),J(dt.$$.fragment,t),$e=M(t),J(Ut.$$.fragment,t),Ce=M(t),_t=f(t,"P",{"data-svelte-h":!0}),c(_t)!=="svelte-4xiptz"&&(_t.innerHTML=fl),Xe=M(t),J(jt.$$.fragment,t),be=M(t),gt=f(t,"P",{"data-svelte-h":!0}),c(gt)!=="svelte-1cbnpsr"&&(gt.innerHTML=ul),Ie=M(t),$t=f(t,"P",{"data-svelte-h":!0}),c($t)!=="svelte-gowp8l"&&($t.innerHTML=cl),Ae=M(t),J(Ct.$$.fragment,t),ve=M(t),It=f(t,"P",{}),Le(It).forEach(l),this.h()},h(){Jl(i,"name","hf:doc:metadata"),Jl(i,"content",Wl)},m(t,e){Ge(document.head,i),a(t,u,e),a(t,r,e),a(t,m,e),y(p,t,e),a(t,n,e),a(t,U,e),a(t,At,e),a(t,b,e),a(t,vt,e),a(t,I,e),a(t,Wt,e),a(t,A,e),a(t,Zt,e),a(t,v,e),a(t,xt,e),y(W,t,e),a(t,Rt,e),a(t,Z,e),a(t,Lt,e),y(x,t,e),a(t,Gt,e),a(t,R,e),a(t,Vt,e),a(t,L,e),a(t,Nt,e),a(t,G,e),a(t,Bt,e),y(V,t,e),a(t,Ft,e),a(t,N,e),a(t,zt,e),y(B,t,e),a(t,Yt,e),y(F,t,e),a(t,St,e),y($,t,e),a(t,Ht,e),y(z,t,e),a(t,Et,e),a(t,Y,e),a(t,Qt,e),a(t,S,e),a(t,kt,e),y(H,t,e),a(t,Pt,e),a(t,E,e),a(t,Dt,e),y(Q,t,e),a(t,qt,e),y(C,t,e),a(t,Ot,e),y(k,t,e),a(t,Kt,e),a(t,P,e),a(t,te,e),a(t,X,e),Ge(X,bt),Ge(X,Re),y(D,X,null),a(t,ee,e),a(t,q,e),a(t,le,e),y(O,t,e),a(t,ae,e),a(t,K,e),a(t,ie,e),y(tt,t,e),a(t,re,e),a(t,et,e),a(t,ne,e),y(lt,t,e),a(t,se,e),y(at,t,e),a(t,Me,e),a(t,it,e),a(t,me,e),a(t,rt,e),a(t,pe,e),a(t,nt,e),a(t,oe,e),y(st,t,e),a(t,fe,e),y(Mt,t,e),a(t,ue,e),a(t,mt,e),a(t,ce,e),a(t,pt,e),a(t,we,e),a(t,ot,e),a(t,Je,e),y(ft,t,e),a(t,ye,e),a(t,ut,e),a(t,Te,e),y(ct,t,e),a(t,he,e),y(wt,t,e),a(t,de,e),a(t,Jt,e),a(t,Ue,e),a(t,yt,e),a(t,_e,e),y(Tt,t,e),a(t,je,e),a(t,ht,e),a(t,ge,e),y(dt,t,e),a(t,$e,e),y(Ut,t,e),a(t,Ce,e),a(t,_t,e),a(t,Xe,e),y(jt,t,e),a(t,be,e),a(t,gt,e),a(t,Ie,e),a(t,$t,e),a(t,Ae,e),y(Ct,t,e),a(t,ve,e),a(t,It,e),We=!0},p(t,[e]){const Xt={};e&2&&(Xt.$$scope={dirty:e,ctx:t}),$.$set(Xt);const wl={};e&2&&(wl.$$scope={dirty:e,ctx:t}),C.$set(wl)},i(t){We||(T(p.$$.fragment,t),T(W.$$.fragment,t),T(x.$$.fragment,t),T(V.$$.fragment,t),T(B.$$.fragment,t),T(F.$$.fragment,t),T($.$$.fragment,t),T(z.$$.fragment,t),T(H.$$.fragment,t),T(Q.$$.fragment,t),T(C.$$.fragment,t),T(k.$$.fragment,t),T(D.$$.fragment,t),T(O.$$.fragment,t),T(tt.$$.fragment,t),T(lt.$$.fragment,t),T(at.$$.fragment,t),T(st.$$.fragment,t),T(Mt.$$.fragment,t),T(ft.$$.fragment,t),T(ct.$$.fragment,t),T(wt.$$.fragment,t),T(Tt.$$.fragment,t),T(dt.$$.fragment,t),T(Ut.$$.fragment,t),T(jt.$$.fragment,t),T(Ct.$$.fragment,t),We=!0)},o(t){h(p.$$.fragment,t),h(W.$$.fragment,t),h(x.$$.fragment,t),h(V.$$.fragment,t),h(B.$$.fragment,t),h(F.$$.fragment,t),h($.$$.fragment,t),h(z.$$.fragment,t),h(H.$$.fragment,t),h(Q.$$.fragment,t),h(C.$$.fragment,t),h(k.$$.fragment,t),h(D.$$.fragment,t),h(O.$$.fragment,t),h(tt.$$.fragment,t),h(lt.$$.fragment,t),h(at.$$.fragment,t),h(st.$$.fragment,t),h(Mt.$$.fragment,t),h(ft.$$.fragment,t),h(ct.$$.fragment,t),h(wt.$$.fragment,t),h(Tt.$$.fragment,t),h(dt.$$.fragment,t),h(Ut.$$.fragment,t),h(jt.$$.fragment,t),h(Ct.$$.fragment,t),We=!1},d(t){t&&(l(u),l(r),l(m),l(n),l(U),l(At),l(b),l(vt),l(I),l(Wt),l(A),l(Zt),l(v),l(xt),l(Rt),l(Z),l(Lt),l(Gt),l(R),l(Vt),l(L),l(Nt),l(G),l(Bt),l(Ft),l(N),l(zt),l(Yt),l(St),l(Ht),l(Et),l(Y),l(Qt),l(S),l(kt),l(Pt),l(E),l(Dt),l(qt),l(Ot),l(Kt),l(P),l(te),l(X),l(ee),l(q),l(le),l(ae),l(K),l(ie),l(re),l(et),l(ne),l(se),l(Me),l(it),l(me),l(rt),l(pe),l(nt),l(oe),l(fe),l(ue),l(mt),l(ce),l(pt),l(we),l(ot),l(Je),l(ye),l(ut),l(Te),l(he),l(de),l(Jt),l(Ue),l(yt),l(_e),l(je),l(ht),l(ge),l($e),l(Ce),l(_t),l(Xe),l(be),l(gt),l(Ie),l($t),l(Ae),l(ve),l(It)),l(i),d(p,t),d(W,t),d(x,t),d(V,t),d(B,t),d(F,t),d($,t),d(z,t),d(H,t),d(Q,t),d(C,t),d(k,t),d(D),d(O,t),d(tt,t),d(lt,t),d(at,t),d(st,t),d(Mt,t),d(ft,t),d(ct,t),d(wt,t),d(Tt,t),d(dt,t),d(Ut,t),d(jt,t),d(Ct,t)}}}const Wl='{"title":"스크립트로 실행하기","local":"train-with-a-script","sections":[{"title":"설정하기","local":"setup","sections":[],"depth":2},{"title":"스크립트 실행하기","local":"run-a-script","sections":[],"depth":2},{"title":"혼합 정밀도(mixed precision)로 분산 훈련하기","local":"distributed-training-and-mixed-precision","sections":[],"depth":2},{"title":"TPU 위에서 스크립트 실행하기","local":"run-a-script-on-a-tpu","sections":[],"depth":2},{"title":"🤗 Accelerate로 스크립트 실행하기","local":"run-a-script-with-accelerate","sections":[],"depth":2},{"title":"사용자 정의 데이터 세트 사용하기","local":"use-a-custom-dataset","sections":[],"depth":2},{"title":"스크립트 테스트하기","local":"test-a-script","sections":[],"depth":2},{"title":"체크포인트(checkpoint)에서 훈련 이어서 하기","local":"resume-training-from-checkpoint","sections":[],"depth":2},{"title":"모델 공유하기","local":"share-your-model","sections":[],"depth":2}],"depth":1}';function Zl(j){return hl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nl extends dl{constructor(i){super(),Ul(this,i,Zl,vl,Tl,{})}}export{Nl as component};
