import{s as Tl,o as dl,n as Ze}from"../chunks/scheduler.56730f09.js";import{S as hl,i as Ul,g as o,s,r as w,A as _l,h as f,f as l,c as M,j as Re,u as J,x as c,k as Jl,y as Le,a,v as y,d as T,t as d,w as h}from"../chunks/index.1f144517.js";import{C as _}from"../chunks/CodeBlock.738eeccb.js";import{F as yl,M as Ge}from"../chunks/Markdown.c541024b.js";import{H as j}from"../chunks/Heading.57d46534.js";function gl(g){let n,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/google-t5/t5-small" rel="nofollow">T5-small</a>을 미세 조정합니다.
T5 모델은 훈련 방식에 따라 추가 <code>source_prefix</code> 인수가 필요하며, 이 프롬프트는 요약 작업임을 T5에 알려줍니다.`,i,m,p;return m=new _({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjBnb29nbGUtdDUlMkZ0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW91dHB1dF9kaXIlMjAlMkZ0bXAlMkZ0c3Qtc3VtbWFyaXphdGlvbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdmVyd3JpdGVfb3V0cHV0X2RpciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJlZGljdF93aXRoX2dlbmVyYXRl",highlighted:`python examples/pytorch/summarization/run_summarization.py \\
    --model_name_or_path google-t5/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(){n=o("p"),n.innerHTML=u,i=s(),w(m.$$.fragment)},l(r){n=f(r,"P",{"data-svelte-h":!0}),c(n)!=="svelte-3keakm"&&(n.innerHTML=u),i=M(r),J(m.$$.fragment,r)},m(r,U){a(r,n,U),a(r,i,U),y(m,r,U),p=!0},p:Ze,i(r){p||(T(m.$$.fragment,r),p=!0)},o(r){d(m.$$.fragment,r),p=!1},d(r){r&&(l(n),l(i)),h(m,r)}}}function jl(g){let n,u;return n=new Ge({props:{$$slots:{default:[gl]},$$scope:{ctx:g}}}),{c(){w(n.$$.fragment)},l(i){J(n.$$.fragment,i)},m(i,m){y(n,i,m),u=!0},p(i,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:i}),n.$set(p)},i(i){u||(T(n.$$.fragment,i),u=!0)},o(i){d(n.$$.fragment,i),u=!1},d(i){h(n,i)}}}function $l(g){let n,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/google-t5/t5-small" rel="nofollow">T5-small</a>을 미세 조정합니다.
T5 모델은 훈련 방식에 따라 추가 <code>source_prefix</code> 인수가 필요하며, 이 프롬프트는 요약 작업임을 T5에 알려줍니다.`,i,m,p;return m=new _({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZ0ZW5zb3JmbG93JTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjBnb29nbGUtdDUlMkZ0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9uYW1lJTIwY25uX2RhaWx5bWFpbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9jb25maWclMjAlMjIzLjAuMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3V0cHV0X2RpciUyMCUyRnRtcCUyRnRzdC1zdW1tYXJpemF0aW9uJTIwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlMjA4JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUyMDE2JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1udW1fdHJhaW5fZXBvY2hzJTIwMyUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWw=",highlighted:`python examples/tensorflow/summarization/run_summarization.py  \\
    --model_name_or_path google-t5/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(){n=o("p"),n.innerHTML=u,i=s(),w(m.$$.fragment)},l(r){n=f(r,"P",{"data-svelte-h":!0}),c(n)!=="svelte-12wph1d"&&(n.innerHTML=u),i=M(r),J(m.$$.fragment,r)},m(r,U){a(r,n,U),a(r,i,U),y(m,r,U),p=!0},p:Ze,i(r){p||(T(m.$$.fragment,r),p=!0)},o(r){d(m.$$.fragment,r),p=!1},d(r){r&&(l(n),l(i)),h(m,r)}}}function bl(g){let n,u;return n=new Ge({props:{$$slots:{default:[$l]},$$scope:{ctx:g}}}),{c(){w(n.$$.fragment)},l(i){J(n.$$.fragment,i)},m(i,m){y(n,i,m),u=!0},p(i,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:i}),n.$set(p)},i(i){u||(T(n.$$.fragment,i),u=!0)},o(i){d(n.$$.fragment,i),u=!1},d(i){h(n,i)}}}function Cl(g){let n,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 코어 수를 설정합니다.`,i,m,p;return m=new _({props:{code:"cHl0aG9uJTIweGxhX3NwYXduLnB5JTIwLS1udW1fY29yZXMlMjA4JTIwJTVDJTBBJTIwJTIwJTIwJTIwc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjBnb29nbGUtdDUlMkZ0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW91dHB1dF9kaXIlMjAlMkZ0bXAlMkZ0c3Qtc3VtbWFyaXphdGlvbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdmVyd3JpdGVfb3V0cHV0X2RpciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJlZGljdF93aXRoX2dlbmVyYXRl",highlighted:`python xla_spawn.py --num_cores 8 \\
    summarization/run_summarization.py \\
    --model_name_or_path google-t5/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(){n=o("p"),n.innerHTML=u,i=s(),w(m.$$.fragment)},l(r){n=f(r,"P",{"data-svelte-h":!0}),c(n)!=="svelte-1uupy1q"&&(n.innerHTML=u),i=M(r),J(m.$$.fragment,r)},m(r,U){a(r,n,U),a(r,i,U),y(m,r,U),p=!0},p:Ze,i(r){p||(T(m.$$.fragment,r),p=!0)},o(r){d(m.$$.fragment,r),p=!1},d(r){r&&(l(n),l(i)),h(m,r)}}}function Xl(g){let n,u;return n=new Ge({props:{$$slots:{default:[Cl]},$$scope:{ctx:g}}}),{c(){w(n.$$.fragment)},l(i){J(n.$$.fragment,i)},m(i,m){y(n,i,m),u=!0},p(i,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:i}),n.$set(p)},i(i){u||(T(n.$$.fragment,i),u=!0)},o(i){d(n.$$.fragment,i),u=!1},d(i){h(n,i)}}}function Il(g){let n,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> 인수에 전달합니다.`,i,m,p;return m=new _({props:{code:"cHl0aG9uJTIwcnVuX3N1bW1hcml6YXRpb24ucHklMjAlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXRwdSUyMG5hbWVfb2ZfdHB1X3Jlc291cmNlJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjBnb29nbGUtdDUlMkZ0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9uYW1lJTIwY25uX2RhaWx5bWFpbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9jb25maWclMjAlMjIzLjAuMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3V0cHV0X2RpciUyMCUyRnRtcCUyRnRzdC1zdW1tYXJpemF0aW9uJTIwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlMjA4JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUyMDE2JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1udW1fdHJhaW5fZXBvY2hzJTIwMyUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWw=",highlighted:`python run_summarization.py  \\
    --tpu name_of_tpu_resource \\
    --model_name_or_path google-t5/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(){n=o("p"),n.innerHTML=u,i=s(),w(m.$$.fragment)},l(r){n=f(r,"P",{"data-svelte-h":!0}),c(n)!=="svelte-14rbp0b"&&(n.innerHTML=u),i=M(r),J(m.$$.fragment,r)},m(r,U){a(r,n,U),a(r,i,U),y(m,r,U),p=!0},p:Ze,i(r){p||(T(m.$$.fragment,r),p=!0)},o(r){d(m.$$.fragment,r),p=!1},d(r){r&&(l(n),l(i)),h(m,r)}}}function Al(g){let n,u;return n=new Ge({props:{$$slots:{default:[Il]},$$scope:{ctx:g}}}),{c(){w(n.$$.fragment)},l(i){J(n.$$.fragment,i)},m(i,m){y(n,i,m),u=!0},p(i,m){const p={};m&2&&(p.$$scope={dirty:m,ctx:i}),n.$set(p)},i(i){u||(T(n.$$.fragment,i),u=!0)},o(i){d(n.$$.fragment,i),u=!1},d(i){h(n,i)}}}function vl(g){let n,u,i,m,p,r,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,X,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>에서 요약 훈련하는
스크립트 예제를 실행하는 방법을 설명합니다.
특별한 설명이 없는 한 모든 예제는 두 프레임워크 모두에서 작동할 것으로 예상됩니다.`,Gt,W,xt,Z,Ye="최신 버전의 예제 스크립트를 성공적으로 실행하려면 새 가상 환경에서 <strong>소스로부터 🤗 Transformers를 설치</strong>해야 합니다:",Rt,G,Lt,x,Se="이전 버전의 예제 스크립트를 보려면 아래 토글을 클릭하세요:",Vt,R,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,L,Ee="그리고 다음과 같이 복제(clone)해온 🤗 Transformers 버전을 특정 버전(예: v3.5.1)으로 전환하세요:",Bt,V,Ft,N,ke="올바른 라이브러리 버전을 설정한 후 원하는 예제 폴더로 이동하여 예제별로 라이브러리에 대한 요구 사항(requirements)을 설치합니다:",zt,B,Yt,F,St,$,Ht,z,Et,Y,Qe=`<a href="https://huggingface.co/docs/transformers/main_classes/trainer" rel="nofollow">Trainer</a> 클래스는 분산 훈련과 혼합 정밀도(mixed precision)를 지원하므로 스크립트에서도 사용할 수 있습니다.
이 두 가지 기능을 모두 활성화하려면 다음 두 가지를 설정해야 합니다:`,kt,S,Pe="<li><code>fp16</code> 인수를 추가해 혼합 정밀도(mixed precision)를 활성화합니다.</li> <li><code>nproc_per_node</code> 인수를 추가해 사용할 GPU 개수를 설정합니다.</li>",Qt,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,k,qt,b,Ot,Q,Kt,P,qe=`🤗 <a href="https://huggingface.co/docs/accelerate" rel="nofollow">Accelerate</a>는 PyTorch 훈련 과정에 대한 완전한 가시성을 유지하면서 여러 유형의 설정(CPU 전용, 다중 GPU, TPU)에서 모델을 훈련할 수 있는 통합 방법을 제공하는 PyTorch 전용 라이브러리입니다.
🤗 Accelerate가 설치되어 있는지 확인하세요:`,te,C,Xt,Oe="참고: Accelerate는 빠르게 개발 중이므로 스크립트를 실행하려면 accelerate를 설치해야 합니다.",xe,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="설정을 테스트하여 올바르게 구성되었는지 확인합니다:",ne,tt,ie,et,el="이제 훈련을 시작할 준비가 되었습니다:",re,lt,se,at,Me,nt,ll=`요약 스크립트는 사용자 지정 데이터 세트가 CSV 또는 JSON 파일인 경우 지원합니다.
사용자 지정 데이터 세트를 사용하는 경우에는 몇 가지 추가 인수를 지정해야 합니다:`,me,it,al="<li><code>train_file</code>과 <code>validation_file</code>은 훈련 및 검증 파일의 경로를 지정합니다.</li> <li><code>text_column</code>은 요약할 입력 텍스트입니다.</li> <li><code>summary_column</code>은 출력할 대상 텍스트입니다.</li>",pe,rt,nl="사용자 지정 데이터 세트를 사용하는 요약 스크립트는 다음과 같습니다:",oe,st,fe,Mt,ue,mt,il="전체 데이터 세트를 대상으로 훈련을 완료하는데 꽤 오랜 시간이 걸리기 때문에, 작은 데이터 세트에서 모든 것이 예상대로 실행되는지 확인하는 것이 좋습니다.",ce,pt,rl="다음 인수를 사용하여 데이터 세트를 최대 샘플 수로 잘라냅니다:",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,de,wt,he,Jt,ml=`또 다른 유용한 옵션은 이전 체크포인트에서 훈련을 재개하는 것입니다.
이렇게 하면 훈련이 중단되더라도 처음부터 다시 시작하지 않고 중단한 부분부터 다시 시작할 수 있습니다.
체크포인트에서 훈련을 재개하는 방법에는 두 가지가 있습니다.`,Ue,yt,pl=`첫 번째는 <code>output_dir previous_output_dir</code> 인수를 사용하여 <code>output_dir</code>에 저장된 최신 체크포인트부터 훈련을 재개하는 방법입니다.
이 경우 <code>overwrite_output_dir</code>을 제거해야 합니다:`,_e,Tt,ge,dt,ol="두 번째는 <code>resume_from_checkpoint path_to_specific_checkpoint</code> 인수를 사용하여 특정 체크포인트 폴더에서 훈련을 재개하는 방법입니다.",je,ht,$e,Ut,be,_t,fl=`모든 스크립트는 최종 모델을 <a href="https://huggingface.co/models" rel="nofollow">Model Hub</a>에 업로드할 수 있습니다.
시작하기 전에 Hugging Face에 로그인했는지 확인하세요:`,Ce,gt,Xe,jt,ul=`그런 다음 스크립트에 <code>push_to_hub</code> 인수를 추가합니다.
이 인수는 Hugging Face 사용자 이름과 <code>output_dir</code>에 지정된 폴더 이름으로 저장소를 생성합니다.`,Ie,$t,cl=`저장소에 특정 이름을 지정하려면 <code>push_to_hub_model_id</code> 인수를 사용하여 추가합니다.
저장소는 네임스페이스 아래에 자동으로 나열됩니다.
다음 예는 특정 저장소 이름으로 모델을 업로드하는 방법입니다:`,Ae,bt,ve,It,We;return p=new j({props:{title:"스크립트로 실행하기",local:"train-with-a-script",headingTag:"h1"}}),W=new j({props:{title:"설정하기",local:"setup",headingTag:"h2"}}),G=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 j({props:{title:"스크립트 실행하기",local:"run-a-script",headingTag:"h2"}}),$=new yl({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[bl],pytorch:[jl]},$$scope:{ctx:g}}}),z=new j({props:{title:"혼합 정밀도(mixed precision)로 분산 훈련하기",local:"distributed-training-and-mixed-precision",headingTag:"h2"}}),H=new _({props:{code:"dG9yY2hydW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLW5wcm9jX3Blcl9ub2RlJTIwOCUyMHB5dG9yY2glMkZzdW1tYXJpemF0aW9uJTJGcnVuX3N1bW1hcml6YXRpb24ucHklMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZwMTYlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW1vZGVsX25hbWVfb3JfcGF0aCUyMGdvb2dsZS10NSUyRnQ1LXNtYWxsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kb190cmFpbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fZXZhbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9uYW1lJTIwY25uX2RhaWx5bWFpbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9jb25maWclMjAlMjIzLjAuMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tc291cmNlX3ByZWZpeCUyMCUyMnN1bW1hcml6ZSUzQSUyMCUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3V0cHV0X2RpciUyMCUyRnRtcCUyRnRzdC1zdW1tYXJpemF0aW9uJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW92ZXJ3cml0ZV9vdXRwdXRfZGlyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wcmVkaWN0X3dpdGhfZ2VuZXJhdGU=",highlighted:`torchrun \\
    --nproc_per_node 8 pytorch/summarization/run_summarization.py \\
    --fp16 \\
    --model_name_or_path google-t5/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:"TPU 위에서 스크립트 실행하기",local:"run-a-script-on-a-tpu",headingTag:"h2"}}),b=new yl({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Al],pytorch:[Xl]},$$scope:{ctx:g}}}),Q=new j({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:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHJ1bl9zdW1tYXJpemF0aW9uX25vX3RyYWluZXIucHklMjAlNUMlMEElMjAlMjAlMjAlMjAtLW1vZGVsX25hbWVfb3JfcGF0aCUyMGdvb2dsZS10NSUyRnQ1LXNtYWxsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0X25hbWUlMjBjbm5fZGFpbHltYWlsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0X2NvbmZpZyUyMCUyMjMuMC4wJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1zb3VyY2VfcHJlZml4JTIwJTIyc3VtbWFyaXplJTNBJTIwJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwfiUyRnRtcCUyRnRzdC1zdW1tYXJpemF0aW9u",highlighted:`accelerate launch run_summarization_no_trainer.py \\
    --model_name_or_path google-t5/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 j({props:{title:"사용자 정의 데이터 세트 사용하기",local:"use-a-custom-dataset",headingTag:"h2"}}),st=new _({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjBnb29nbGUtdDUlMkZ0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXRyYWluX2ZpbGUlMjBwYXRoX3RvX2Nzdl9vcl9qc29ubGluZXNfZmlsZSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tdmFsaWRhdGlvbl9maWxlJTIwcGF0aF90b19jc3Zfb3JfanNvbmxpbmVzX2ZpbGUlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXRleHRfY29sdW1uJTIwdGV4dF9jb2x1bW5fbmFtZSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tc3VtbWFyeV9jb2x1bW4lMjBzdW1tYXJ5X2NvbHVtbl9uYW1lJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1zb3VyY2VfcHJlZml4JTIwJTIyc3VtbWFyaXplJTNBJTIwJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwJTJGdG1wJTJGdHN0LXN1bW1hcml6YXRpb24lMjAlNUMlMEElMjAlMjAlMjAlMjAtLW92ZXJ3cml0ZV9vdXRwdXRfZGlyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXByZWRpY3Rfd2l0aF9nZW5lcmF0ZQ==",highlighted:`python examples/pytorch/summarization/run_summarization.py \\
    --model_name_or_path google-t5/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 j({props:{title:"스크립트 테스트하기",local:"test-a-script",headingTag:"h2"}}),ft=new _({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjBnb29nbGUtdDUlMkZ0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbWF4X3RyYWluX3NhbXBsZXMlMjA1MCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbWF4X2V2YWxfc2FtcGxlcyUyMDUwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1tYXhfcHJlZGljdF9zYW1wbGVzJTIwNTAlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX3RyYWluJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kb19ldmFsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0X25hbWUlMjBjbm5fZGFpbHltYWlsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0X2NvbmZpZyUyMCUyMjMuMC4wJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1zb3VyY2VfcHJlZml4JTIwJTIyc3VtbWFyaXplJTNBJTIwJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwJTJGdG1wJTJGdHN0LXN1bW1hcml6YXRpb24lMjAlNUMlMEElMjAlMjAlMjAlMjAtLXBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3ZlcndyaXRlX291dHB1dF9kaXIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXByZWRpY3Rfd2l0aF9nZW5lcmF0ZQ==",highlighted:`python examples/pytorch/summarization/run_summarization.py \\
    --model_name_or_path google-t5/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 j({props:{title:"체크포인트(checkpoint)에서 훈련 이어서 하기",local:"resume-training-from-checkpoint",headingTag:"h2"}}),Tt=new _({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjBnb29nbGUtdDUlMkZ0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW91dHB1dF9kaXIlMjAlMkZ0bXAlMkZ0c3Qtc3VtbWFyaXphdGlvbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwcHJldmlvdXNfb3V0cHV0X2RpciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJlZGljdF93aXRoX2dlbmVyYXRl",highlighted:`python examples/pytorch/summarization/run_summarization.py
    --model_name_or_path google-t5/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}}),ht=new _({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjBnb29nbGUtdDUlMkZ0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW91dHB1dF9kaXIlMjAlMkZ0bXAlMkZ0c3Qtc3VtbWFyaXphdGlvbiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdmVyd3JpdGVfb3V0cHV0X2RpciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcmVzdW1lX2Zyb21fY2hlY2twb2ludCUyMHBhdGhfdG9fc3BlY2lmaWNfY2hlY2twb2ludCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJlZGljdF93aXRoX2dlbmVyYXRl",highlighted:`python examples/pytorch/summarization/run_summarization.py
    --model_name_or_path google-t5/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 j({props:{title:"모델 공유하기",local:"share-your-model",headingTag:"h2"}}),gt=new _({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}}),bt=new _({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGc3VtbWFyaXphdGlvbiUyRnJ1bl9zdW1tYXJpemF0aW9uLnB5JTBBJTIwJTIwJTIwJTIwLS1tb2RlbF9uYW1lX29yX3BhdGglMjBnb29nbGUtdDUlMkZ0NS1zbWFsbCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZG9fdHJhaW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRvX2V2YWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfbmFtZSUyMGNubl9kYWlseW1haWwlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXRfY29uZmlnJTIwJTIyMy4wLjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNvdXJjZV9wcmVmaXglMjAlMjJzdW1tYXJpemUlM0ElMjAlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXB1c2hfdG9faHViJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wdXNoX3RvX2h1Yl9tb2RlbF9pZCUyMGZpbmV0dW5lZC10NS1jbm5fZGFpbHltYWlsJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1vdXRwdXRfZGlyJTIwJTJGdG1wJTJGdHN0LXN1bW1hcml6YXRpb24lMjAlNUMlMEElMjAlMjAlMjAlMjAtLXBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNENCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3ZlcndyaXRlX291dHB1dF9kaXIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXByZWRpY3Rfd2l0aF9nZW5lcmF0ZQ==",highlighted:`python examples/pytorch/summarization/run_summarization.py
    --model_name_or_path google-t5/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(){n=o("meta"),u=s(),i=o("p"),m=s(),w(p.$$.fragment),r=s(),U=o("p"),U.innerHTML=Ve,At=s(),X=o("p"),X.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,Gt=s(),w(W.$$.fragment),xt=s(),Z=o("p"),Z.innerHTML=Ye,Rt=s(),w(G.$$.fragment),Lt=s(),x=o("p"),x.textContent=Se,Vt=s(),R=o("details"),R.innerHTML=He,Nt=s(),L=o("p"),L.textContent=Ee,Bt=s(),w(V.$$.fragment),Ft=s(),N=o("p"),N.textContent=ke,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=Qe,kt=s(),S=o("ul"),S.innerHTML=Pe,Qt=s(),w(H.$$.fragment),Pt=s(),E=o("p"),E.innerHTML=De,Dt=s(),w(k.$$.fragment),qt=s(),w(b.$$.fragment),Ot=s(),w(Q.$$.fragment),Kt=s(),P=o("p"),P.innerHTML=qe,te=s(),C=o("blockquote"),Xt=o("p"),Xt.textContent=Oe,xe=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,ne=s(),w(tt.$$.fragment),ie=s(),et=o("p"),et.textContent=el,re=s(),w(lt.$$.fragment),se=s(),w(at.$$.fragment),Me=s(),nt=o("p"),nt.textContent=ll,me=s(),it=o("ul"),it.innerHTML=al,pe=s(),rt=o("p"),rt.textContent=nl,oe=s(),w(st.$$.fragment),fe=s(),w(Mt.$$.fragment),ue=s(),mt=o("p"),mt.textContent=il,ce=s(),pt=o("p"),pt.textContent=rl,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),de=s(),w(wt.$$.fragment),he=s(),Jt=o("p"),Jt.textContent=ml,Ue=s(),yt=o("p"),yt.innerHTML=pl,_e=s(),w(Tt.$$.fragment),ge=s(),dt=o("p"),dt.innerHTML=ol,je=s(),w(ht.$$.fragment),$e=s(),w(Ut.$$.fragment),be=s(),_t=o("p"),_t.innerHTML=fl,Ce=s(),w(gt.$$.fragment),Xe=s(),jt=o("p"),jt.innerHTML=ul,Ie=s(),$t=o("p"),$t.innerHTML=cl,Ae=s(),w(bt.$$.fragment),ve=s(),It=o("p"),this.h()},l(t){const e=_l("svelte-u9bgzb",document.head);n=f(e,"META",{name:!0,content:!0}),e.forEach(l),u=M(t),i=f(t,"P",{}),Re(i).forEach(l),m=M(t),J(p.$$.fragment,t),r=M(t),U=f(t,"P",{"data-svelte-h":!0}),c(U)!=="svelte-cb9dpp"&&(U.innerHTML=Ve),At=M(t),X=f(t,"P",{"data-svelte-h":!0}),c(X)!=="svelte-xygtck"&&(X.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),Gt=M(t),J(W.$$.fragment,t),xt=M(t),Z=f(t,"P",{"data-svelte-h":!0}),c(Z)!=="svelte-1ducwvi"&&(Z.innerHTML=Ye),Rt=M(t),J(G.$$.fragment,t),Lt=M(t),x=f(t,"P",{"data-svelte-h":!0}),c(x)!=="svelte-i8u7rm"&&(x.textContent=Se),Vt=M(t),R=f(t,"DETAILS",{"data-svelte-h":!0}),c(R)!=="svelte-1pp84xd"&&(R.innerHTML=He),Nt=M(t),L=f(t,"P",{"data-svelte-h":!0}),c(L)!=="svelte-18cv2w9"&&(L.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=ke),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=Qe),kt=M(t),S=f(t,"UL",{"data-svelte-h":!0}),c(S)!=="svelte-1wysnl1"&&(S.innerHTML=Pe),Qt=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(k.$$.fragment,t),qt=M(t),J(b.$$.fragment,t),Ot=M(t),J(Q.$$.fragment,t),Kt=M(t),P=f(t,"P",{"data-svelte-h":!0}),c(P)!=="svelte-1mmj90o"&&(P.innerHTML=qe),te=M(t),C=f(t,"BLOCKQUOTE",{});var Ct=Re(C);Xt=f(Ct,"P",{"data-svelte-h":!0}),c(Xt)!=="svelte-18nhjp2"&&(Xt.textContent=Oe),xe=M(Ct),J(D.$$.fragment,Ct),Ct.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),ne=M(t),J(tt.$$.fragment,t),ie=M(t),et=f(t,"P",{"data-svelte-h":!0}),c(et)!=="svelte-dp0etk"&&(et.textContent=el),re=M(t),J(lt.$$.fragment,t),se=M(t),J(at.$$.fragment,t),Me=M(t),nt=f(t,"P",{"data-svelte-h":!0}),c(nt)!=="svelte-8q6g2t"&&(nt.textContent=ll),me=M(t),it=f(t,"UL",{"data-svelte-h":!0}),c(it)!=="svelte-1o9guy1"&&(it.innerHTML=al),pe=M(t),rt=f(t,"P",{"data-svelte-h":!0}),c(rt)!=="svelte-1gh72vz"&&(rt.textContent=nl),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=il),ce=M(t),pt=f(t,"P",{"data-svelte-h":!0}),c(pt)!=="svelte-4bvtew"&&(pt.textContent=rl),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),de=M(t),J(wt.$$.fragment,t),he=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),ge=M(t),dt=f(t,"P",{"data-svelte-h":!0}),c(dt)!=="svelte-y9guuv"&&(dt.innerHTML=ol),je=M(t),J(ht.$$.fragment,t),$e=M(t),J(Ut.$$.fragment,t),be=M(t),_t=f(t,"P",{"data-svelte-h":!0}),c(_t)!=="svelte-4xiptz"&&(_t.innerHTML=fl),Ce=M(t),J(gt.$$.fragment,t),Xe=M(t),jt=f(t,"P",{"data-svelte-h":!0}),c(jt)!=="svelte-1cbnpsr"&&(jt.innerHTML=ul),Ie=M(t),$t=f(t,"P",{"data-svelte-h":!0}),c($t)!=="svelte-gowp8l"&&($t.innerHTML=cl),Ae=M(t),J(bt.$$.fragment,t),ve=M(t),It=f(t,"P",{}),Re(It).forEach(l),this.h()},h(){Jl(n,"name","hf:doc:metadata"),Jl(n,"content",Wl)},m(t,e){Le(document.head,n),a(t,u,e),a(t,i,e),a(t,m,e),y(p,t,e),a(t,r,e),a(t,U,e),a(t,At,e),a(t,X,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,Gt,e),y(W,t,e),a(t,xt,e),a(t,Z,e),a(t,Rt,e),y(G,t,e),a(t,Lt,e),a(t,x,e),a(t,Vt,e),a(t,R,e),a(t,Nt,e),a(t,L,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,kt,e),a(t,S,e),a(t,Qt,e),y(H,t,e),a(t,Pt,e),a(t,E,e),a(t,Dt,e),y(k,t,e),a(t,qt,e),y(b,t,e),a(t,Ot,e),y(Q,t,e),a(t,Kt,e),a(t,P,e),a(t,te,e),a(t,C,e),Le(C,Xt),Le(C,xe),y(D,C,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,ne,e),y(tt,t,e),a(t,ie,e),a(t,et,e),a(t,re,e),y(lt,t,e),a(t,se,e),y(at,t,e),a(t,Me,e),a(t,nt,e),a(t,me,e),a(t,it,e),a(t,pe,e),a(t,rt,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,de,e),y(wt,t,e),a(t,he,e),a(t,Jt,e),a(t,Ue,e),a(t,yt,e),a(t,_e,e),y(Tt,t,e),a(t,ge,e),a(t,dt,e),a(t,je,e),y(ht,t,e),a(t,$e,e),y(Ut,t,e),a(t,be,e),a(t,_t,e),a(t,Ce,e),y(gt,t,e),a(t,Xe,e),a(t,jt,e),a(t,Ie,e),a(t,$t,e),a(t,Ae,e),y(bt,t,e),a(t,ve,e),a(t,It,e),We=!0},p(t,[e]){const Ct={};e&2&&(Ct.$$scope={dirty:e,ctx:t}),$.$set(Ct);const wl={};e&2&&(wl.$$scope={dirty:e,ctx:t}),b.$set(wl)},i(t){We||(T(p.$$.fragment,t),T(W.$$.fragment,t),T(G.$$.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(k.$$.fragment,t),T(b.$$.fragment,t),T(Q.$$.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(ht.$$.fragment,t),T(Ut.$$.fragment,t),T(gt.$$.fragment,t),T(bt.$$.fragment,t),We=!0)},o(t){d(p.$$.fragment,t),d(W.$$.fragment,t),d(G.$$.fragment,t),d(V.$$.fragment,t),d(B.$$.fragment,t),d(F.$$.fragment,t),d($.$$.fragment,t),d(z.$$.fragment,t),d(H.$$.fragment,t),d(k.$$.fragment,t),d(b.$$.fragment,t),d(Q.$$.fragment,t),d(D.$$.fragment,t),d(O.$$.fragment,t),d(tt.$$.fragment,t),d(lt.$$.fragment,t),d(at.$$.fragment,t),d(st.$$.fragment,t),d(Mt.$$.fragment,t),d(ft.$$.fragment,t),d(ct.$$.fragment,t),d(wt.$$.fragment,t),d(Tt.$$.fragment,t),d(ht.$$.fragment,t),d(Ut.$$.fragment,t),d(gt.$$.fragment,t),d(bt.$$.fragment,t),We=!1},d(t){t&&(l(u),l(i),l(m),l(r),l(U),l(At),l(X),l(vt),l(I),l(Wt),l(A),l(Zt),l(v),l(Gt),l(xt),l(Z),l(Rt),l(Lt),l(x),l(Vt),l(R),l(Nt),l(L),l(Bt),l(Ft),l(N),l(zt),l(Yt),l(St),l(Ht),l(Et),l(Y),l(kt),l(S),l(Qt),l(Pt),l(E),l(Dt),l(qt),l(Ot),l(Kt),l(P),l(te),l(C),l(ee),l(q),l(le),l(ae),l(K),l(ne),l(ie),l(et),l(re),l(se),l(Me),l(nt),l(me),l(it),l(pe),l(rt),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(de),l(he),l(Jt),l(Ue),l(yt),l(_e),l(ge),l(dt),l(je),l($e),l(be),l(_t),l(Ce),l(Xe),l(jt),l(Ie),l($t),l(Ae),l(ve),l(It)),l(n),h(p,t),h(W,t),h(G,t),h(V,t),h(B,t),h(F,t),h($,t),h(z,t),h(H,t),h(k,t),h(b,t),h(Q,t),h(D),h(O,t),h(tt,t),h(lt,t),h(at,t),h(st,t),h(Mt,t),h(ft,t),h(ct,t),h(wt,t),h(Tt,t),h(ht,t),h(Ut,t),h(gt,t),h(bt,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(g){return dl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nl extends hl{constructor(n){super(),Ul(this,n,Zl,vl,Tl,{})}}export{Nl as component};
