import{S as jo,i as yo,s as Eo,e as o,k as _,w as y,t as a,M as qo,c as l,d as s,m as $,a as n,x as E,h as r,b as v,G as t,g as f,y as q,q as S,o as T,B as A,v as So,L as $a}from"../../chunks/vendor-hf-doc-builder.js";import{T as _a}from"../../chunks/Tip-hf-doc-builder.js";import{Y as To}from"../../chunks/Youtube-hf-doc-builder.js";import{I as ts}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as X}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as Ao}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";import{F as yr,M as ss}from"../../chunks/Markdown-hf-doc-builder.js";function zo(K){let p,m,i,b,k,j,x,M,w,C,D,H,G,F,O,se,Q,L,J,W,V,Y,B,R,h,z,ae,N,I,re,U,Me,he,ue,Fe,ke,de,ie,ge,Pe,pe,be,ce,Te,Z,ve,fe,ne,Le,Ae,ee,_e,g,P,we,je,oe,le,ye,qe,$e,Ce,me,Se,De,te,ze,Ee,xe,He;return{c(){p=a(`\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C \uC124\uBA85\uD558\uB294 \uC791\uC5C5\uC740 \uB2E4\uC74C \uBAA8\uB378 \uC544\uD0A4\uD14D\uCC98\uC5D0\uC11C \uC9C0\uC6D0\uB429\uB2C8\uB2E4:

`),m=o("p"),i=o("a"),b=a("BART"),k=a(", "),j=o("a"),x=a("BigBird-Pegasus"),M=a(", "),w=o("a"),C=a("Blenderbot"),D=a(", "),H=o("a"),G=a("BlenderbotSmall"),F=a(", "),O=o("a"),se=a("Encoder decoder"),Q=a(", "),L=o("a"),J=a("FairSeq Machine-Translation"),W=a(", "),V=o("a"),Y=a("GPTSAN-japanese"),B=a(", "),R=o("a"),h=a("LED"),z=a(", "),ae=o("a"),N=a("LongT5"),I=a(", "),re=o("a"),U=a("M2M100"),Me=a(", "),he=o("a"),ue=a("Marian"),Fe=a(", "),ke=o("a"),de=a("mBART"),ie=a(", "),ge=o("a"),Pe=a("MT5"),pe=a(", "),be=o("a"),ce=a("MVP"),Te=a(", "),Z=o("a"),ve=a("NLLB"),fe=a(", "),ne=o("a"),Le=a("NLLB-MOE"),Ae=a(", "),ee=o("a"),_e=a("Pegasus"),g=a(", "),P=o("a"),we=a("PEGASUS-X"),je=a(", "),oe=o("a"),le=a("PLBart"),ye=a(", "),qe=o("a"),$e=a("ProphetNet"),Ce=a(", "),me=o("a"),Se=a("SwitchTransformers"),De=a(", "),te=o("a"),ze=a("T5"),Ee=a(", "),xe=o("a"),He=a("XLM-ProphetNet"),this.h()},l(c){p=r(c,`\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C \uC124\uBA85\uD558\uB294 \uC791\uC5C5\uC740 \uB2E4\uC74C \uBAA8\uB378 \uC544\uD0A4\uD14D\uCC98\uC5D0\uC11C \uC9C0\uC6D0\uB429\uB2C8\uB2E4:

`),m=l(c,"P",{});var d=n(m);i=l(d,"A",{href:!0});var Oe=n(i);b=r(Oe,"BART"),Oe.forEach(s),k=r(d,", "),j=l(d,"A",{href:!0});var Ue=n(j);x=r(Ue,"BigBird-Pegasus"),Ue.forEach(s),M=r(d,", "),w=l(d,"A",{href:!0});var et=n(w);C=r(et,"Blenderbot"),et.forEach(s),D=r(d,", "),H=l(d,"A",{href:!0});var Ge=n(H);G=r(Ge,"BlenderbotSmall"),Ge.forEach(s),F=r(d,", "),O=l(d,"A",{href:!0});var Je=n(O);se=r(Je,"Encoder decoder"),Je.forEach(s),Q=r(d,", "),L=l(d,"A",{href:!0});var Ke=n(L);J=r(Ke,"FairSeq Machine-Translation"),Ke.forEach(s),W=r(d,", "),V=l(d,"A",{href:!0});var lt=n(V);Y=r(lt,"GPTSAN-japanese"),lt.forEach(s),B=r(d,", "),R=l(d,"A",{href:!0});var Xe=n(R);h=r(Xe,"LED"),Xe.forEach(s),z=r(d,", "),ae=l(d,"A",{href:!0});var Be=n(ae);N=r(Be,"LongT5"),Be.forEach(s),I=r(d,", "),re=l(d,"A",{href:!0});var Ie=n(re);U=r(Ie,"M2M100"),Ie.forEach(s),Me=r(d,", "),he=l(d,"A",{href:!0});var Qe=n(he);ue=r(Qe,"Marian"),Qe.forEach(s),Fe=r(d,", "),ke=l(d,"A",{href:!0});var nt=n(ke);de=r(nt,"mBART"),nt.forEach(s),ie=r(d,", "),ge=l(d,"A",{href:!0});var tt=n(ge);Pe=r(tt,"MT5"),tt.forEach(s),pe=r(d,", "),be=l(d,"A",{href:!0});var it=n(be);ce=r(it,"MVP"),it.forEach(s),Te=r(d,", "),Z=l(d,"A",{href:!0});var Ne=n(Z);ve=r(Ne,"NLLB"),Ne.forEach(s),fe=r(d,", "),ne=l(d,"A",{href:!0});var Re=n(ne);Le=r(Re,"NLLB-MOE"),Re.forEach(s),Ae=r(d,", "),ee=l(d,"A",{href:!0});var pt=n(ee);_e=r(pt,"Pegasus"),pt.forEach(s),g=r(d,", "),P=l(d,"A",{href:!0});var ct=n(P);we=r(ct,"PEGASUS-X"),ct.forEach(s),je=r(d,", "),oe=l(d,"A",{href:!0});var Ze=n(oe);le=r(Ze,"PLBart"),Ze.forEach(s),ye=r(d,", "),qe=l(d,"A",{href:!0});var Rt=n(qe);$e=r(Rt,"ProphetNet"),Rt.forEach(s),Ce=r(d,", "),me=l(d,"A",{href:!0});var Ut=n(me);Se=r(Ut,"SwitchTransformers"),Ut.forEach(s),De=r(d,", "),te=l(d,"A",{href:!0});var St=n(te);ze=r(St,"T5"),St.forEach(s),Ee=r(d,", "),xe=l(d,"A",{href:!0});var We=n(xe);He=r(We,"XLM-ProphetNet"),We.forEach(s),d.forEach(s),this.h()},h(){v(i,"href","../model_doc/bart"),v(j,"href","../model_doc/bigbird_pegasus"),v(w,"href","../model_doc/blenderbot"),v(H,"href","../model_doc/blenderbot-small"),v(O,"href","../model_doc/encoder-decoder"),v(L,"href","../model_doc/fsmt"),v(V,"href","../model_doc/gptsan-japanese"),v(R,"href","../model_doc/led"),v(ae,"href","../model_doc/longt5"),v(re,"href","../model_doc/m2m_100"),v(he,"href","../model_doc/marian"),v(ke,"href","../model_doc/mbart"),v(ge,"href","../model_doc/mt5"),v(be,"href","../model_doc/mvp"),v(Z,"href","../model_doc/nllb"),v(ne,"href","../model_doc/nllb-moe"),v(ee,"href","../model_doc/pegasus"),v(P,"href","../model_doc/pegasus_x"),v(oe,"href","../model_doc/plbart"),v(qe,"href","../model_doc/prophetnet"),v(me,"href","../model_doc/switch_transformers"),v(te,"href","../model_doc/t5"),v(xe,"href","../model_doc/xlm-prophetnet")},m(c,d){f(c,p,d),f(c,m,d),t(m,i),t(i,b),t(m,k),t(m,j),t(j,x),t(m,M),t(m,w),t(w,C),t(m,D),t(m,H),t(H,G),t(m,F),t(m,O),t(O,se),t(m,Q),t(m,L),t(L,J),t(m,W),t(m,V),t(V,Y),t(m,B),t(m,R),t(R,h),t(m,z),t(m,ae),t(ae,N),t(m,I),t(m,re),t(re,U),t(m,Me),t(m,he),t(he,ue),t(m,Fe),t(m,ke),t(ke,de),t(m,ie),t(m,ge),t(ge,Pe),t(m,pe),t(m,be),t(be,ce),t(m,Te),t(m,Z),t(Z,ve),t(m,fe),t(m,ne),t(ne,Le),t(m,Ae),t(m,ee),t(ee,_e),t(m,g),t(m,P),t(P,we),t(m,je),t(m,oe),t(oe,le),t(m,ye),t(m,qe),t(qe,$e),t(m,Ce),t(m,me),t(me,Se),t(m,De),t(m,te),t(te,ze),t(m,Ee),t(m,xe),t(xe,He)},d(c){c&&s(p),c&&s(m)}}}function xo(K){let p,m;return p=new X({props:{code:`from transformers import DataCollatorForSeq2Seq

data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model=checkpoint)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DataCollatorForSeq2Seq

<span class="hljs-meta">&gt;&gt;&gt; </span>data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model=checkpoint)`}}),{c(){y(p.$$.fragment)},l(i){E(p.$$.fragment,i)},m(i,b){q(p,i,b),m=!0},p:$a,i(i){m||(S(p.$$.fragment,i),m=!0)},o(i){T(p.$$.fragment,i),m=!1},d(i){A(p,i)}}}function Po(K){let p,m;return p=new ss({props:{$$slots:{default:[xo]},$$scope:{ctx:K}}}),{c(){y(p.$$.fragment)},l(i){E(p.$$.fragment,i)},m(i,b){q(p,i,b),m=!0},p(i,b){const k={};b&2&&(k.$$scope={dirty:b,ctx:i}),p.$set(k)},i(i){m||(S(p.$$.fragment,i),m=!0)},o(i){T(p.$$.fragment,i),m=!1},d(i){A(p,i)}}}function Co(K){let p,m;return p=new X({props:{code:`from transformers import DataCollatorForSeq2Seq

data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model=checkpoint, return_tensors="tf")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DataCollatorForSeq2Seq

<span class="hljs-meta">&gt;&gt;&gt; </span>data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model=checkpoint, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)`}}),{c(){y(p.$$.fragment)},l(i){E(p.$$.fragment,i)},m(i,b){q(p,i,b),m=!0},p:$a,i(i){m||(S(p.$$.fragment,i),m=!0)},o(i){T(p.$$.fragment,i),m=!1},d(i){A(p,i)}}}function Do(K){let p,m;return p=new ss({props:{$$slots:{default:[Co]},$$scope:{ctx:K}}}),{c(){y(p.$$.fragment)},l(i){E(p.$$.fragment,i)},m(i,b){q(p,i,b),m=!0},p(i,b){const k={};b&2&&(k.$$scope={dirty:b,ctx:i}),p.$set(k)},i(i){m||(S(p.$$.fragment,i),m=!0)},o(i){T(p.$$.fragment,i),m=!1},d(i){A(p,i)}}}function Mo(K){let p,m,i,b,k,j,x,M;return{c(){p=o("p"),m=a("\uBAA8\uB378\uC744 "),i=o("code"),b=a("Trainer"),k=a("\uB85C \uD30C\uC778\uD29C\uB2DD \uD558\uB294 \uAC83\uC774 \uC775\uC219\uD558\uC9C0 \uC54A\uB2E4\uBA74, "),j=o("a"),x=a("\uC5EC\uAE30"),M=a("\uC5D0\uC11C \uAE30\uBCF8 \uD29C\uD1A0\uB9AC\uC5BC\uC744 \uD655\uC778\uD574\uBCF4\uC138\uC694!"),this.h()},l(w){p=l(w,"P",{});var C=n(p);m=r(C,"\uBAA8\uB378\uC744 "),i=l(C,"CODE",{});var D=n(i);b=r(D,"Trainer"),D.forEach(s),k=r(C,"\uB85C \uD30C\uC778\uD29C\uB2DD \uD558\uB294 \uAC83\uC774 \uC775\uC219\uD558\uC9C0 \uC54A\uB2E4\uBA74, "),j=l(C,"A",{href:!0});var H=n(j);x=r(H,"\uC5EC\uAE30"),H.forEach(s),M=r(C,"\uC5D0\uC11C \uAE30\uBCF8 \uD29C\uD1A0\uB9AC\uC5BC\uC744 \uD655\uC778\uD574\uBCF4\uC138\uC694!"),C.forEach(s),this.h()},h(){v(j,"href","../training#train-with-pytorch-trainer")},m(w,C){f(w,p,C),t(p,m),t(p,i),t(i,b),t(p,k),t(p,j),t(j,x),t(p,M)},d(w){w&&s(p)}}}function Fo(K){let p,m,i,b,k,j,x,M,w,C,D,H,G,F,O,se,Q,L,J,W,V,Y,B,R,h,z,ae,N,I,re,U,Me,he,ue,Fe,ke,de,ie,ge,Pe,pe,be,ce,Te,Z,ve,fe,ne,Le,Ae,ee,_e;return p=new _a({props:{$$slots:{default:[Mo]},$$scope:{ctx:K}}}),w=new X({props:{code:`from transformers import AutoModelForSeq2SeqLM, Seq2SeqTrainingArguments, Seq2SeqTrainer

model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM, Seq2SeqTrainingArguments, Seq2SeqTrainer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)`}}),ce=new X({props:{code:`training_args = Seq2SeqTrainingArguments(
    output_dir="my_awesome_billsum_model",
    evaluation_strategy="epoch",
    learning_rate=2e-5,
    per_device_train_batch_size=16,
    per_device_eval_batch_size=16,
    weight_decay=0.01,
    save_total_limit=3,
    num_train_epochs=4,
    predict_with_generate=True,
    fp16=True,
    push_to_hub=True,
)

trainer = Seq2SeqTrainer(
    model=model,
    args=training_args,
    train_dataset=tokenized_billsum["train"],
    eval_dataset=tokenized_billsum["test"],
    tokenizer=tokenizer,
    data_collator=data_collator,
    compute_metrics=compute_metrics,
)

trainer.train()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>training_args = Seq2SeqTrainingArguments(
<span class="hljs-meta">... </span>    output_dir=<span class="hljs-string">&quot;my_awesome_billsum_model&quot;</span>,
<span class="hljs-meta">... </span>    evaluation_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
<span class="hljs-meta">... </span>    learning_rate=<span class="hljs-number">2e-5</span>,
<span class="hljs-meta">... </span>    per_device_train_batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    per_device_eval_batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    weight_decay=<span class="hljs-number">0.01</span>,
<span class="hljs-meta">... </span>    save_total_limit=<span class="hljs-number">3</span>,
<span class="hljs-meta">... </span>    num_train_epochs=<span class="hljs-number">4</span>,
<span class="hljs-meta">... </span>    predict_with_generate=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    fp16=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    push_to_hub=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer = Seq2SeqTrainer(
<span class="hljs-meta">... </span>    model=model,
<span class="hljs-meta">... </span>    args=training_args,
<span class="hljs-meta">... </span>    train_dataset=tokenized_billsum[<span class="hljs-string">&quot;train&quot;</span>],
<span class="hljs-meta">... </span>    eval_dataset=tokenized_billsum[<span class="hljs-string">&quot;test&quot;</span>],
<span class="hljs-meta">... </span>    tokenizer=tokenizer,
<span class="hljs-meta">... </span>    data_collator=data_collator,
<span class="hljs-meta">... </span>    compute_metrics=compute_metrics,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.train()`}}),ee=new X({props:{code:"trainer.push_to_hub()",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.push_to_hub()'}}),{c(){y(p.$$.fragment),m=_(),i=o("p"),b=a("\uC774\uC81C \uBAA8\uB378 \uD559\uC2B5\uC744 \uC2DC\uC791\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4! "),k=o("code"),j=a("AutoModelForSeq2SeqLM"),x=a("\uB85C T5\uB97C \uAC00\uC838\uC624\uC138\uC694:"),M=_(),y(w.$$.fragment),C=_(),D=o("p"),H=a("\uC774\uC81C \uC138 \uB2E8\uACC4\uB9CC \uB0A8\uC558\uC2B5\uB2C8\uB2E4:"),G=_(),F=o("ol"),O=o("li"),se=o("code"),Q=a("Seq2SeqTrainingArguments"),L=a(`\uC5D0\uC11C \uD559\uC2B5 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC815\uC758\uD558\uC138\uC694.
\uC720\uC77C\uD55C \uD544\uC218 \uB9E4\uAC1C\uBCC0\uC218\uB294 \uBAA8\uB378\uC744 \uC800\uC7A5\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD558\uB294 `),J=o("code"),W=a("output_dir"),V=a(`\uC785\uB2C8\uB2E4.
`),Y=o("code"),B=a("push_to_hub=True"),R=a(`\uB97C \uC124\uC815\uD558\uC5EC \uC774 \uBAA8\uB378\uC744 Hub\uC5D0 \uD478\uC2DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uBAA8\uB378\uC744 \uC5C5\uB85C\uB4DC\uD558\uB824\uBA74 Hugging Face\uC5D0 \uB85C\uADF8\uC778\uD574\uC57C \uD569\uB2C8\uB2E4.)
`),h=o("code"),z=a("Trainer"),ae=a("\uB294 \uAC01 \uC5D0\uD3ED\uC774 \uB05D\uB0A0 \uB54C\uB9C8\uB2E4 ROUGE \uC9C0\uD45C\uB97C \uD3C9\uAC00\uD558\uACE0 \uD559\uC2B5 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC800\uC7A5\uD569\uB2C8\uB2E4."),N=_(),I=o("li"),re=a("\uBAA8\uB378, \uB370\uC774\uD130\uC14B, \uD1A0\uD06C\uB098\uC774\uC800, \uB370\uC774\uD130 \uCF5C\uB808\uC774\uD130 \uBC0F "),U=o("code"),Me=a("compute_metrics"),he=a(" \uD568\uC218\uC640 \uD568\uAED8 \uD559\uC2B5 \uC778\uC218\uB97C "),ue=o("code"),Fe=a("Seq2SeqTrainer"),ke=a("\uC5D0 \uC804\uB2EC\uD558\uC138\uC694."),de=_(),ie=o("li"),ge=o("code"),Pe=a("train()"),pe=a("\uC744 \uD638\uCD9C\uD558\uC5EC \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD558\uC138\uC694."),be=_(),y(ce.$$.fragment),Te=_(),Z=o("p"),ve=a("\uD559\uC2B5\uC774 \uC644\uB8CC\uB418\uBA74, \uB204\uAD6C\uB098 \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D "),fe=o("code"),ne=a("push_to_hub()"),Le=a(" \uBA54\uC18C\uB4DC\uB85C Hub\uC5D0 \uACF5\uC720\uD569\uB2C8\uB2E4:"),Ae=_(),y(ee.$$.fragment)},l(g){E(p.$$.fragment,g),m=$(g),i=l(g,"P",{});var P=n(i);b=r(P,"\uC774\uC81C \uBAA8\uB378 \uD559\uC2B5\uC744 \uC2DC\uC791\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4! "),k=l(P,"CODE",{});var we=n(k);j=r(we,"AutoModelForSeq2SeqLM"),we.forEach(s),x=r(P,"\uB85C T5\uB97C \uAC00\uC838\uC624\uC138\uC694:"),P.forEach(s),M=$(g),E(w.$$.fragment,g),C=$(g),D=l(g,"P",{});var je=n(D);H=r(je,"\uC774\uC81C \uC138 \uB2E8\uACC4\uB9CC \uB0A8\uC558\uC2B5\uB2C8\uB2E4:"),je.forEach(s),G=$(g),F=l(g,"OL",{});var oe=n(F);O=l(oe,"LI",{});var le=n(O);se=l(le,"CODE",{});var ye=n(se);Q=r(ye,"Seq2SeqTrainingArguments"),ye.forEach(s),L=r(le,`\uC5D0\uC11C \uD559\uC2B5 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC815\uC758\uD558\uC138\uC694.
\uC720\uC77C\uD55C \uD544\uC218 \uB9E4\uAC1C\uBCC0\uC218\uB294 \uBAA8\uB378\uC744 \uC800\uC7A5\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD558\uB294 `),J=l(le,"CODE",{});var qe=n(J);W=r(qe,"output_dir"),qe.forEach(s),V=r(le,`\uC785\uB2C8\uB2E4.
`),Y=l(le,"CODE",{});var $e=n(Y);B=r($e,"push_to_hub=True"),$e.forEach(s),R=r(le,`\uB97C \uC124\uC815\uD558\uC5EC \uC774 \uBAA8\uB378\uC744 Hub\uC5D0 \uD478\uC2DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uBAA8\uB378\uC744 \uC5C5\uB85C\uB4DC\uD558\uB824\uBA74 Hugging Face\uC5D0 \uB85C\uADF8\uC778\uD574\uC57C \uD569\uB2C8\uB2E4.)
`),h=l(le,"CODE",{});var Ce=n(h);z=r(Ce,"Trainer"),Ce.forEach(s),ae=r(le,"\uB294 \uAC01 \uC5D0\uD3ED\uC774 \uB05D\uB0A0 \uB54C\uB9C8\uB2E4 ROUGE \uC9C0\uD45C\uB97C \uD3C9\uAC00\uD558\uACE0 \uD559\uC2B5 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC800\uC7A5\uD569\uB2C8\uB2E4."),le.forEach(s),N=$(oe),I=l(oe,"LI",{});var me=n(I);re=r(me,"\uBAA8\uB378, \uB370\uC774\uD130\uC14B, \uD1A0\uD06C\uB098\uC774\uC800, \uB370\uC774\uD130 \uCF5C\uB808\uC774\uD130 \uBC0F "),U=l(me,"CODE",{});var Se=n(U);Me=r(Se,"compute_metrics"),Se.forEach(s),he=r(me," \uD568\uC218\uC640 \uD568\uAED8 \uD559\uC2B5 \uC778\uC218\uB97C "),ue=l(me,"CODE",{});var De=n(ue);Fe=r(De,"Seq2SeqTrainer"),De.forEach(s),ke=r(me,"\uC5D0 \uC804\uB2EC\uD558\uC138\uC694."),me.forEach(s),de=$(oe),ie=l(oe,"LI",{});var te=n(ie);ge=l(te,"CODE",{});var ze=n(ge);Pe=r(ze,"train()"),ze.forEach(s),pe=r(te,"\uC744 \uD638\uCD9C\uD558\uC5EC \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD558\uC138\uC694."),te.forEach(s),oe.forEach(s),be=$(g),E(ce.$$.fragment,g),Te=$(g),Z=l(g,"P",{});var Ee=n(Z);ve=r(Ee,"\uD559\uC2B5\uC774 \uC644\uB8CC\uB418\uBA74, \uB204\uAD6C\uB098 \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D "),fe=l(Ee,"CODE",{});var xe=n(fe);ne=r(xe,"push_to_hub()"),xe.forEach(s),Le=r(Ee," \uBA54\uC18C\uB4DC\uB85C Hub\uC5D0 \uACF5\uC720\uD569\uB2C8\uB2E4:"),Ee.forEach(s),Ae=$(g),E(ee.$$.fragment,g)},m(g,P){q(p,g,P),f(g,m,P),f(g,i,P),t(i,b),t(i,k),t(k,j),t(i,x),f(g,M,P),q(w,g,P),f(g,C,P),f(g,D,P),t(D,H),f(g,G,P),f(g,F,P),t(F,O),t(O,se),t(se,Q),t(O,L),t(O,J),t(J,W),t(O,V),t(O,Y),t(Y,B),t(O,R),t(O,h),t(h,z),t(O,ae),t(F,N),t(F,I),t(I,re),t(I,U),t(U,Me),t(I,he),t(I,ue),t(ue,Fe),t(I,ke),t(F,de),t(F,ie),t(ie,ge),t(ge,Pe),t(ie,pe),f(g,be,P),q(ce,g,P),f(g,Te,P),f(g,Z,P),t(Z,ve),t(Z,fe),t(fe,ne),t(Z,Le),f(g,Ae,P),q(ee,g,P),_e=!0},p(g,P){const we={};P&2&&(we.$$scope={dirty:P,ctx:g}),p.$set(we)},i(g){_e||(S(p.$$.fragment,g),S(w.$$.fragment,g),S(ce.$$.fragment,g),S(ee.$$.fragment,g),_e=!0)},o(g){T(p.$$.fragment,g),T(w.$$.fragment,g),T(ce.$$.fragment,g),T(ee.$$.fragment,g),_e=!1},d(g){A(p,g),g&&s(m),g&&s(i),g&&s(M),A(w,g),g&&s(C),g&&s(D),g&&s(G),g&&s(F),g&&s(be),A(ce,g),g&&s(Te),g&&s(Z),g&&s(Ae),A(ee,g)}}}function Lo(K){let p,m;return p=new ss({props:{$$slots:{default:[Fo]},$$scope:{ctx:K}}}),{c(){y(p.$$.fragment)},l(i){E(p.$$.fragment,i)},m(i,b){q(p,i,b),m=!0},p(i,b){const k={};b&2&&(k.$$scope={dirty:b,ctx:i}),p.$set(k)},i(i){m||(S(p.$$.fragment,i),m=!0)},o(i){T(p.$$.fragment,i),m=!1},d(i){A(p,i)}}}function Oo(K){let p,m,i,b,k;return{c(){p=o("p"),m=a("Keras\uB85C \uBAA8\uB378 \uD30C\uC778\uD29C\uB2DD\uC744 \uD558\uB294 \uAC83\uC774 \uC775\uC219\uD558\uC9C0 \uC54A\uB2E4\uBA74, "),i=o("a"),b=a("\uC5EC\uAE30"),k=a("\uC5D0\uC11C \uAE30\uBCF8\uC801\uC778 \uD29C\uD1A0\uB9AC\uC5BC\uC744 \uD655\uC778\uD558\uC138\uC694!"),this.h()},l(j){p=l(j,"P",{});var x=n(p);m=r(x,"Keras\uB85C \uBAA8\uB378 \uD30C\uC778\uD29C\uB2DD\uC744 \uD558\uB294 \uAC83\uC774 \uC775\uC219\uD558\uC9C0 \uC54A\uB2E4\uBA74, "),i=l(x,"A",{href:!0});var M=n(i);b=r(M,"\uC5EC\uAE30"),M.forEach(s),k=r(x,"\uC5D0\uC11C \uAE30\uBCF8\uC801\uC778 \uD29C\uD1A0\uB9AC\uC5BC\uC744 \uD655\uC778\uD558\uC138\uC694!"),x.forEach(s),this.h()},h(){v(i,"href","../training#train-a-tensorflow-model-with-keras")},m(j,x){f(j,p,x),t(p,m),t(p,i),t(i,b),t(p,k)},d(j){j&&s(p)}}}function Io(K){let p,m,i,b,k,j,x,M,w,C,D,H,G,F,O,se,Q,L,J,W,V,Y,B,R,h,z,ae,N,I,re,U,Me,he,ue,Fe,ke,de,ie,ge,Pe,pe,be,ce,Te,Z,ve,fe,ne,Le,Ae,ee,_e,g,P,we,je,oe,le,ye,qe,$e,Ce,me,Se,De,te,ze,Ee,xe,He;return p=new _a({props:{$$slots:{default:[Oo]},$$scope:{ctx:K}}}),i=new X({props:{code:`from transformers import create_optimizer, AdamWeightDecay

optimizer = AdamWeightDecay(learning_rate=2e-5, weight_decay_rate=0.01)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> create_optimizer, AdamWeightDecay

<span class="hljs-meta">&gt;&gt;&gt; </span>optimizer = AdamWeightDecay(learning_rate=<span class="hljs-number">2e-5</span>, weight_decay_rate=<span class="hljs-number">0.01</span>)`}}),D=new X({props:{code:`from transformers import TFAutoModelForSeq2SeqLM

model = TFAutoModelForSeq2SeqLM.from_pretrained(checkpoint)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSeq2SeqLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForSeq2SeqLM.from_pretrained(checkpoint)`}}),V=new X({props:{code:`tf_train_set = model.prepare_tf_dataset(
    tokenized_billsum["train"],
    shuffle=True,
    batch_size=16,
    collate_fn=data_collator,
)

tf_test_set = model.prepare_tf_dataset(
    tokenized_billsum["test"],
    shuffle=False,
    batch_size=16,
    collate_fn=data_collator,
)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tf_train_set = model.prepare_tf_dataset(
<span class="hljs-meta">... </span>    tokenized_billsum[<span class="hljs-string">&quot;train&quot;</span>],
<span class="hljs-meta">... </span>    shuffle=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    collate_fn=data_collator,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tf_test_set = model.prepare_tf_dataset(
<span class="hljs-meta">... </span>    tokenized_billsum[<span class="hljs-string">&quot;test&quot;</span>],
<span class="hljs-meta">... </span>    shuffle=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    collate_fn=data_collator,
<span class="hljs-meta">... </span>)`}}),I=new X({props:{code:`import tensorflow as tf

model.compile(optimizer=optimizer)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>model.<span class="hljs-built_in">compile</span>(optimizer=optimizer)`}}),Z=new X({props:{code:`from transformers.keras_callbacks import KerasMetricCallback

metric_callback = KerasMetricCallback(metric_fn=compute_metrics, eval_dataset=tf_validation_set)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> KerasMetricCallback

<span class="hljs-meta">&gt;&gt;&gt; </span>metric_callback = KerasMetricCallback(metric_fn=compute_metrics, eval_dataset=tf_validation_set)`}}),_e=new X({props:{code:`from transformers.keras_callbacks import PushToHubCallback

push_to_hub_callback = PushToHubCallback(
    output_dir="my_awesome_billsum_model",
    tokenizer=tokenizer,
)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> PushToHubCallback

<span class="hljs-meta">&gt;&gt;&gt; </span>push_to_hub_callback = PushToHubCallback(
<span class="hljs-meta">... </span>    output_dir=<span class="hljs-string">&quot;my_awesome_billsum_model&quot;</span>,
<span class="hljs-meta">... </span>    tokenizer=tokenizer,
<span class="hljs-meta">... </span>)`}}),oe=new X({props:{code:"callbacks = [metric_callback, push_to_hub_callback]",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>callbacks = [metric_callback, push_to_hub_callback]'}}),te=new X({props:{code:"model.fit(x=tf_train_set, validation_data=tf_test_set, epochs=3, callbacks=callbacks)",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model.fit(x=tf_train_set, validation_data=tf_test_set, epochs=<span class="hljs-number">3</span>, callbacks=callbacks)'}}),{c(){y(p.$$.fragment),m=a(`
TensorFlow\uC5D0\uC11C \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD558\uB824\uBA74, \uBA3C\uC800 \uC635\uD2F0\uB9C8\uC774\uC800, \uD559\uC2B5\uB960 \uC2A4\uCF00\uC904 \uADF8\uB9AC\uACE0 \uBA87 \uAC00\uC9C0 \uD559\uC2B5 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC124\uC815\uD558\uC138\uC694:

	`),y(i.$$.fragment),b=_(),k=o("p"),j=a("\uADF8\uB7F0 \uB2E4\uC74C "),x=o("code"),M=a("TFAutoModelForSeq2SeqLM"),w=a("\uC744 \uC0AC\uC6A9\uD558\uC5EC T5\uB97C \uAC00\uC838\uC624\uC138\uC694:"),C=_(),y(D.$$.fragment),H=_(),G=o("p"),F=o("code"),O=a("prepare_tf_dataset()"),se=a("\uC744 \uC0AC\uC6A9\uD558\uC5EC \uB370\uC774\uD130\uC14B\uC744 "),Q=o("code"),L=a("tf.data.Dataset"),J=a(" \uD615\uC2DD\uC73C\uB85C \uBCC0\uD658\uD558\uC138\uC694:"),W=_(),y(V.$$.fragment),Y=_(),B=o("p"),R=o("a"),h=o("code"),z=a("compile"),ae=a("\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uD559\uC2B5\uD560 \uC218 \uC788\uB3C4\uB85D \uAD6C\uC131\uD558\uC138\uC694:"),N=_(),y(I.$$.fragment),re=_(),U=o("p"),Me=a(`\uD559\uC2B5\uC744 \uC2DC\uC791\uD558\uAE30 \uC804\uC5D0 \uC124\uC815\uD574\uC57C \uD560 \uB9C8\uC9C0\uB9C9 \uB450 \uAC00\uC9C0\uB294 \uC608\uCE21\uC5D0\uC11C ROUGE \uC810\uC218\uB97C \uACC4\uC0B0\uD558\uACE0 \uBAA8\uB378\uC744 Hub\uC5D0 \uD478\uC2DC\uD558\uB294 \uBC29\uBC95\uC744 \uC81C\uACF5\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4.
\uB450 \uC791\uC5C5 \uBAA8\uB450 `),he=o("a"),ue=a("Keras callbacks"),Fe=a("\uC73C\uB85C \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ke=_(),de=o("p"),ie=o("code"),ge=a("KerasMetricCallback"),Pe=a("\uC5D0 "),pe=o("code"),be=a("compute_metrics"),ce=a(" \uD568\uC218\uB97C \uC804\uB2EC\uD558\uC138\uC694:"),Te=_(),y(Z.$$.fragment),ve=_(),fe=o("p"),ne=o("code"),Le=a("PushToHubCallback"),Ae=a("\uC5D0\uC11C \uBAA8\uB378\uACFC \uD1A0\uD06C\uB098\uC774\uC800\uB97C \uD478\uC2DC\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD558\uC138\uC694:"),ee=_(),y(_e.$$.fragment),g=_(),P=o("p"),we=a("\uADF8\uB7F0 \uB2E4\uC74C \uCF5C\uBC31\uC744 \uBC88\uB4E4\uB85C \uBB36\uC5B4\uC90D\uB2C8\uB2E4:"),je=_(),y(oe.$$.fragment),le=_(),ye=o("p"),qe=a(`\uB4DC\uB514\uC5B4 \uBAA8\uB378 \uD559\uC2B5\uC744 \uC2DC\uC791\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4!
\uD559\uC2B5 \uBC0F \uAC80\uC99D \uB370\uC774\uD130\uC14B, \uC5D0\uD3ED \uC218 \uBC0F \uCF5C\uBC31\uACFC \uD568\uAED8 `),$e=o("a"),Ce=o("code"),me=a("fit"),Se=a("\uC744 \uD638\uCD9C\uD558\uC5EC \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD558\uC138\uC694."),De=_(),y(te.$$.fragment),ze=_(),Ee=o("p"),xe=a("\uD559\uC2B5\uC774 \uC644\uB8CC\uB418\uBA74 \uBAA8\uB378\uC774 \uC790\uB3D9\uC73C\uB85C Hub\uC5D0 \uC5C5\uB85C\uB4DC\uB418\uC5B4 \uB204\uAD6C\uB098 \uC0AC\uC6A9\uD560 \uC218 \uC788\uAC8C \uB429\uB2C8\uB2E4!"),this.h()},l(c){E(p.$$.fragment,c),m=r(c,`
TensorFlow\uC5D0\uC11C \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD558\uB824\uBA74, \uBA3C\uC800 \uC635\uD2F0\uB9C8\uC774\uC800, \uD559\uC2B5\uB960 \uC2A4\uCF00\uC904 \uADF8\uB9AC\uACE0 \uBA87 \uAC00\uC9C0 \uD559\uC2B5 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC124\uC815\uD558\uC138\uC694:

	`),E(i.$$.fragment,c),b=$(c),k=l(c,"P",{});var d=n(k);j=r(d,"\uADF8\uB7F0 \uB2E4\uC74C "),x=l(d,"CODE",{});var Oe=n(x);M=r(Oe,"TFAutoModelForSeq2SeqLM"),Oe.forEach(s),w=r(d,"\uC744 \uC0AC\uC6A9\uD558\uC5EC T5\uB97C \uAC00\uC838\uC624\uC138\uC694:"),d.forEach(s),C=$(c),E(D.$$.fragment,c),H=$(c),G=l(c,"P",{});var Ue=n(G);F=l(Ue,"CODE",{});var et=n(F);O=r(et,"prepare_tf_dataset()"),et.forEach(s),se=r(Ue,"\uC744 \uC0AC\uC6A9\uD558\uC5EC \uB370\uC774\uD130\uC14B\uC744 "),Q=l(Ue,"CODE",{});var Ge=n(Q);L=r(Ge,"tf.data.Dataset"),Ge.forEach(s),J=r(Ue," \uD615\uC2DD\uC73C\uB85C \uBCC0\uD658\uD558\uC138\uC694:"),Ue.forEach(s),W=$(c),E(V.$$.fragment,c),Y=$(c),B=l(c,"P",{});var Je=n(B);R=l(Je,"A",{href:!0,rel:!0});var Ke=n(R);h=l(Ke,"CODE",{});var lt=n(h);z=r(lt,"compile"),lt.forEach(s),Ke.forEach(s),ae=r(Je,"\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uD559\uC2B5\uD560 \uC218 \uC788\uB3C4\uB85D \uAD6C\uC131\uD558\uC138\uC694:"),Je.forEach(s),N=$(c),E(I.$$.fragment,c),re=$(c),U=l(c,"P",{});var Xe=n(U);Me=r(Xe,`\uD559\uC2B5\uC744 \uC2DC\uC791\uD558\uAE30 \uC804\uC5D0 \uC124\uC815\uD574\uC57C \uD560 \uB9C8\uC9C0\uB9C9 \uB450 \uAC00\uC9C0\uB294 \uC608\uCE21\uC5D0\uC11C ROUGE \uC810\uC218\uB97C \uACC4\uC0B0\uD558\uACE0 \uBAA8\uB378\uC744 Hub\uC5D0 \uD478\uC2DC\uD558\uB294 \uBC29\uBC95\uC744 \uC81C\uACF5\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4.
\uB450 \uC791\uC5C5 \uBAA8\uB450 `),he=l(Xe,"A",{href:!0});var Be=n(he);ue=r(Be,"Keras callbacks"),Be.forEach(s),Fe=r(Xe,"\uC73C\uB85C \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Xe.forEach(s),ke=$(c),de=l(c,"P",{});var Ie=n(de);ie=l(Ie,"CODE",{});var Qe=n(ie);ge=r(Qe,"KerasMetricCallback"),Qe.forEach(s),Pe=r(Ie,"\uC5D0 "),pe=l(Ie,"CODE",{});var nt=n(pe);be=r(nt,"compute_metrics"),nt.forEach(s),ce=r(Ie," \uD568\uC218\uB97C \uC804\uB2EC\uD558\uC138\uC694:"),Ie.forEach(s),Te=$(c),E(Z.$$.fragment,c),ve=$(c),fe=l(c,"P",{});var tt=n(fe);ne=l(tt,"CODE",{});var it=n(ne);Le=r(it,"PushToHubCallback"),it.forEach(s),Ae=r(tt,"\uC5D0\uC11C \uBAA8\uB378\uACFC \uD1A0\uD06C\uB098\uC774\uC800\uB97C \uD478\uC2DC\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD558\uC138\uC694:"),tt.forEach(s),ee=$(c),E(_e.$$.fragment,c),g=$(c),P=l(c,"P",{});var Ne=n(P);we=r(Ne,"\uADF8\uB7F0 \uB2E4\uC74C \uCF5C\uBC31\uC744 \uBC88\uB4E4\uB85C \uBB36\uC5B4\uC90D\uB2C8\uB2E4:"),Ne.forEach(s),je=$(c),E(oe.$$.fragment,c),le=$(c),ye=l(c,"P",{});var Re=n(ye);qe=r(Re,`\uB4DC\uB514\uC5B4 \uBAA8\uB378 \uD559\uC2B5\uC744 \uC2DC\uC791\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4!
\uD559\uC2B5 \uBC0F \uAC80\uC99D \uB370\uC774\uD130\uC14B, \uC5D0\uD3ED \uC218 \uBC0F \uCF5C\uBC31\uACFC \uD568\uAED8 `),$e=l(Re,"A",{href:!0,rel:!0});var pt=n($e);Ce=l(pt,"CODE",{});var ct=n(Ce);me=r(ct,"fit"),ct.forEach(s),pt.forEach(s),Se=r(Re,"\uC744 \uD638\uCD9C\uD558\uC5EC \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD558\uC138\uC694."),Re.forEach(s),De=$(c),E(te.$$.fragment,c),ze=$(c),Ee=l(c,"P",{});var Ze=n(Ee);xe=r(Ze,"\uD559\uC2B5\uC774 \uC644\uB8CC\uB418\uBA74 \uBAA8\uB378\uC774 \uC790\uB3D9\uC73C\uB85C Hub\uC5D0 \uC5C5\uB85C\uB4DC\uB418\uC5B4 \uB204\uAD6C\uB098 \uC0AC\uC6A9\uD560 \uC218 \uC788\uAC8C \uB429\uB2C8\uB2E4!"),Ze.forEach(s),this.h()},h(){v(R,"href","https://keras.io/api/models/model_training_apis/#compile-method"),v(R,"rel","nofollow"),v(he,"href","../main_classes/keras_callbacks"),v($e,"href","https://keras.io/api/models/model_training_apis/#fit-method"),v($e,"rel","nofollow")},m(c,d){q(p,c,d),f(c,m,d),q(i,c,d),f(c,b,d),f(c,k,d),t(k,j),t(k,x),t(x,M),t(k,w),f(c,C,d),q(D,c,d),f(c,H,d),f(c,G,d),t(G,F),t(F,O),t(G,se),t(G,Q),t(Q,L),t(G,J),f(c,W,d),q(V,c,d),f(c,Y,d),f(c,B,d),t(B,R),t(R,h),t(h,z),t(B,ae),f(c,N,d),q(I,c,d),f(c,re,d),f(c,U,d),t(U,Me),t(U,he),t(he,ue),t(U,Fe),f(c,ke,d),f(c,de,d),t(de,ie),t(ie,ge),t(de,Pe),t(de,pe),t(pe,be),t(de,ce),f(c,Te,d),q(Z,c,d),f(c,ve,d),f(c,fe,d),t(fe,ne),t(ne,Le),t(fe,Ae),f(c,ee,d),q(_e,c,d),f(c,g,d),f(c,P,d),t(P,we),f(c,je,d),q(oe,c,d),f(c,le,d),f(c,ye,d),t(ye,qe),t(ye,$e),t($e,Ce),t(Ce,me),t(ye,Se),f(c,De,d),q(te,c,d),f(c,ze,d),f(c,Ee,d),t(Ee,xe),He=!0},p(c,d){const Oe={};d&2&&(Oe.$$scope={dirty:d,ctx:c}),p.$set(Oe)},i(c){He||(S(p.$$.fragment,c),S(i.$$.fragment,c),S(D.$$.fragment,c),S(V.$$.fragment,c),S(I.$$.fragment,c),S(Z.$$.fragment,c),S(_e.$$.fragment,c),S(oe.$$.fragment,c),S(te.$$.fragment,c),He=!0)},o(c){T(p.$$.fragment,c),T(i.$$.fragment,c),T(D.$$.fragment,c),T(V.$$.fragment,c),T(I.$$.fragment,c),T(Z.$$.fragment,c),T(_e.$$.fragment,c),T(oe.$$.fragment,c),T(te.$$.fragment,c),He=!1},d(c){A(p,c),c&&s(m),A(i,c),c&&s(b),c&&s(k),c&&s(C),A(D,c),c&&s(H),c&&s(G),c&&s(W),A(V,c),c&&s(Y),c&&s(B),c&&s(N),A(I,c),c&&s(re),c&&s(U),c&&s(ke),c&&s(de),c&&s(Te),A(Z,c),c&&s(ve),c&&s(fe),c&&s(ee),A(_e,c),c&&s(g),c&&s(P),c&&s(je),A(oe,c),c&&s(le),c&&s(ye),c&&s(De),A(te,c),c&&s(ze),c&&s(Ee)}}}function Bo(K){let p,m;return p=new ss({props:{$$slots:{default:[Io]},$$scope:{ctx:K}}}),{c(){y(p.$$.fragment)},l(i){E(p.$$.fragment,i)},m(i,b){q(p,i,b),m=!0},p(i,b){const k={};b&2&&(k.$$scope={dirty:b,ctx:i}),p.$set(k)},i(i){m||(S(p.$$.fragment,i),m=!0)},o(i){T(p.$$.fragment,i),m=!1},d(i){A(p,i)}}}function No(K){let p,m,i,b,k,j,x,M;return{c(){p=o("p"),m=a("\uC694\uC57D\uC744 \uC704\uD574 \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uC5D0 \uB300\uD55C \uB354 \uC790\uC138\uD55C \uC608\uC81C\uB97C \uBCF4\uB824\uBA74 "),i=o("a"),b=a("PyTorch notebook"),k=a(`
\uB610\uB294 `),j=o("a"),x=a("TensorFlow notebook"),M=a("\uC744 \uCC38\uACE0\uD558\uC138\uC694."),this.h()},l(w){p=l(w,"P",{});var C=n(p);m=r(C,"\uC694\uC57D\uC744 \uC704\uD574 \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uC5D0 \uB300\uD55C \uB354 \uC790\uC138\uD55C \uC608\uC81C\uB97C \uBCF4\uB824\uBA74 "),i=l(C,"A",{href:!0,rel:!0});var D=n(i);b=r(D,"PyTorch notebook"),D.forEach(s),k=r(C,`
\uB610\uB294 `),j=l(C,"A",{href:!0,rel:!0});var H=n(j);x=r(H,"TensorFlow notebook"),H.forEach(s),M=r(C,"\uC744 \uCC38\uACE0\uD558\uC138\uC694."),C.forEach(s),this.h()},h(){v(i,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/summarization.ipynb"),v(i,"rel","nofollow"),v(j,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/summarization-tf.ipynb"),v(j,"rel","nofollow")},m(w,C){f(w,p,C),t(p,m),t(p,i),t(i,b),t(p,k),t(p,j),t(j,x),t(p,M)},d(w){w&&s(p)}}}function Ho(K){let p,m,i,b,k,j,x,M,w,C,D,H,G,F,O,se,Q,L,J,W,V,Y,B,R;return x=new X({props:{code:`from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("stevhliu/my_awesome_billsum_model")
inputs = tokenizer(text, return_tensors="pt").input_ids`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_billsum_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids`}}),L=new X({props:{code:`from transformers import AutoModelForSeq2SeqLM

model = AutoModelForSeq2SeqLM.from_pretrained("stevhliu/my_awesome_billsum_model")
outputs = model.generate(inputs, max_new_tokens=100, do_sample=False)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_billsum_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(inputs, max_new_tokens=<span class="hljs-number">100</span>, do_sample=<span class="hljs-literal">False</span>)`}}),B=new X({props:{code:"tokenizer.decode(outputs[0], skip_special_tokens=True)",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(outputs[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27;the inflation reduction act lowers prescription drug costs, health care costs, and energy costs. it&#x27;</span>s the most aggressive action on tackling the climate crisis <span class="hljs-keyword">in</span> american history. it will ask the ultra-wealthy <span class="hljs-keyword">and</span> corporations to pay their fair share.<span class="hljs-string">&#x27;</span>`}}),{c(){p=o("p"),m=a("\uD14D\uC2A4\uD2B8\uB97C \uD1A0\uD06C\uB098\uC774\uC988\uD558\uACE0 "),i=o("code"),b=a("input_ids"),k=a("\uB97C PyTorch \uD150\uC11C\uB85C \uBC18\uD658\uD569\uB2C8\uB2E4:"),j=_(),y(x.$$.fragment),M=_(),w=o("p"),C=a("\uC694\uC57D\uBB38\uC744 \uC0DD\uC131\uD558\uB824\uBA74 "),D=o("code"),H=a("generate()"),G=a(` \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.
\uD14D\uC2A4\uD2B8 \uC0DD\uC131\uC5D0 \uB300\uD55C \uB2E4\uC591\uD55C \uC804\uB7B5\uACFC \uC0DD\uC131\uC744 \uC81C\uC5B4\uD558\uAE30 \uC704\uD55C \uB9E4\uAC1C\uBCC0\uC218\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 `),F=o("a"),O=a("\uD14D\uC2A4\uD2B8 \uC0DD\uC131"),se=a(" API\uB97C \uCC38\uC870\uD558\uC138\uC694."),Q=_(),y(L.$$.fragment),J=_(),W=o("p"),V=a("\uC0DD\uC131\uB41C \uD1A0\uD070 ID\uB97C \uD14D\uC2A4\uD2B8\uB85C \uB514\uCF54\uB529\uD569\uB2C8\uB2E4:"),Y=_(),y(B.$$.fragment),this.h()},l(h){p=l(h,"P",{});var z=n(p);m=r(z,"\uD14D\uC2A4\uD2B8\uB97C \uD1A0\uD06C\uB098\uC774\uC988\uD558\uACE0 "),i=l(z,"CODE",{});var ae=n(i);b=r(ae,"input_ids"),ae.forEach(s),k=r(z,"\uB97C PyTorch \uD150\uC11C\uB85C \uBC18\uD658\uD569\uB2C8\uB2E4:"),z.forEach(s),j=$(h),E(x.$$.fragment,h),M=$(h),w=l(h,"P",{});var N=n(w);C=r(N,"\uC694\uC57D\uBB38\uC744 \uC0DD\uC131\uD558\uB824\uBA74 "),D=l(N,"CODE",{});var I=n(D);H=r(I,"generate()"),I.forEach(s),G=r(N,` \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.
\uD14D\uC2A4\uD2B8 \uC0DD\uC131\uC5D0 \uB300\uD55C \uB2E4\uC591\uD55C \uC804\uB7B5\uACFC \uC0DD\uC131\uC744 \uC81C\uC5B4\uD558\uAE30 \uC704\uD55C \uB9E4\uAC1C\uBCC0\uC218\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 `),F=l(N,"A",{href:!0});var re=n(F);O=r(re,"\uD14D\uC2A4\uD2B8 \uC0DD\uC131"),re.forEach(s),se=r(N," API\uB97C \uCC38\uC870\uD558\uC138\uC694."),N.forEach(s),Q=$(h),E(L.$$.fragment,h),J=$(h),W=l(h,"P",{});var U=n(W);V=r(U,"\uC0DD\uC131\uB41C \uD1A0\uD070 ID\uB97C \uD14D\uC2A4\uD2B8\uB85C \uB514\uCF54\uB529\uD569\uB2C8\uB2E4:"),U.forEach(s),Y=$(h),E(B.$$.fragment,h),this.h()},h(){v(F,"href","../main_classes/text_generation")},m(h,z){f(h,p,z),t(p,m),t(p,i),t(i,b),t(p,k),f(h,j,z),q(x,h,z),f(h,M,z),f(h,w,z),t(w,C),t(w,D),t(D,H),t(w,G),t(w,F),t(F,O),t(w,se),f(h,Q,z),q(L,h,z),f(h,J,z),f(h,W,z),t(W,V),f(h,Y,z),q(B,h,z),R=!0},p:$a,i(h){R||(S(x.$$.fragment,h),S(L.$$.fragment,h),S(B.$$.fragment,h),R=!0)},o(h){T(x.$$.fragment,h),T(L.$$.fragment,h),T(B.$$.fragment,h),R=!1},d(h){h&&s(p),h&&s(j),A(x,h),h&&s(M),h&&s(w),h&&s(Q),A(L,h),h&&s(J),h&&s(W),h&&s(Y),A(B,h)}}}function Go(K){let p,m;return p=new ss({props:{$$slots:{default:[Ho]},$$scope:{ctx:K}}}),{c(){y(p.$$.fragment)},l(i){E(p.$$.fragment,i)},m(i,b){q(p,i,b),m=!0},p(i,b){const k={};b&2&&(k.$$scope={dirty:b,ctx:i}),p.$set(k)},i(i){m||(S(p.$$.fragment,i),m=!0)},o(i){T(p.$$.fragment,i),m=!1},d(i){A(p,i)}}}function Ro(K){let p,m,i,b,k,j,x,M,w,C,D,H,G,F,O,se,Q,L,J,W,V,Y,B,R;return x=new X({props:{code:`from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("stevhliu/my_awesome_billsum_model")
inputs = tokenizer(text, return_tensors="tf").input_ids`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_billsum_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>).input_ids`}}),L=new X({props:{code:`from transformers import TFAutoModelForSeq2SeqLM

model = TFAutoModelForSeq2SeqLM.from_pretrained("stevhliu/my_awesome_billsum_model")
outputs = model.generate(inputs, max_new_tokens=100, do_sample=False)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSeq2SeqLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_billsum_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(inputs, max_new_tokens=<span class="hljs-number">100</span>, do_sample=<span class="hljs-literal">False</span>)`}}),B=new X({props:{code:"tokenizer.decode(outputs[0], skip_special_tokens=True)",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(outputs[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27;the inflation reduction act lowers prescription drug costs, health care costs, and energy costs. it&#x27;</span>s the most aggressive action on tackling the climate crisis <span class="hljs-keyword">in</span> american history. it will ask the ultra-wealthy <span class="hljs-keyword">and</span> corporations to pay their fair share.<span class="hljs-string">&#x27;</span>`}}),{c(){p=o("p"),m=a("\uD14D\uC2A4\uD2B8\uB97C \uD1A0\uD06C\uB098\uC774\uC988\uD558\uACE0 "),i=o("code"),b=a("input_ids"),k=a("\uB97C TensorFlow \uD150\uC11C\uB85C \uBC18\uD658\uD569\uB2C8\uB2E4:"),j=_(),y(x.$$.fragment),M=_(),w=o("p"),C=a("\uC694\uC57D\uBB38\uC744 \uC0DD\uC131\uD558\uB824\uBA74 "),D=o("code"),H=a("generate()"),G=a(` \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.
\uD14D\uC2A4\uD2B8 \uC0DD\uC131\uC5D0 \uB300\uD55C \uB2E4\uC591\uD55C \uC804\uB7B5\uACFC \uC0DD\uC131\uC744 \uC81C\uC5B4\uD558\uAE30 \uC704\uD55C \uB9E4\uAC1C\uBCC0\uC218\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 `),F=o("a"),O=a("\uD14D\uC2A4\uD2B8 \uC0DD\uC131"),se=a(" API\uB97C \uCC38\uC870\uD558\uC138\uC694."),Q=_(),y(L.$$.fragment),J=_(),W=o("p"),V=a("\uC0DD\uC131\uB41C \uD1A0\uD070 ID\uB97C \uD14D\uC2A4\uD2B8\uB85C \uB514\uCF54\uB529\uD569\uB2C8\uB2E4:"),Y=_(),y(B.$$.fragment),this.h()},l(h){p=l(h,"P",{});var z=n(p);m=r(z,"\uD14D\uC2A4\uD2B8\uB97C \uD1A0\uD06C\uB098\uC774\uC988\uD558\uACE0 "),i=l(z,"CODE",{});var ae=n(i);b=r(ae,"input_ids"),ae.forEach(s),k=r(z,"\uB97C TensorFlow \uD150\uC11C\uB85C \uBC18\uD658\uD569\uB2C8\uB2E4:"),z.forEach(s),j=$(h),E(x.$$.fragment,h),M=$(h),w=l(h,"P",{});var N=n(w);C=r(N,"\uC694\uC57D\uBB38\uC744 \uC0DD\uC131\uD558\uB824\uBA74 "),D=l(N,"CODE",{});var I=n(D);H=r(I,"generate()"),I.forEach(s),G=r(N,` \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.
\uD14D\uC2A4\uD2B8 \uC0DD\uC131\uC5D0 \uB300\uD55C \uB2E4\uC591\uD55C \uC804\uB7B5\uACFC \uC0DD\uC131\uC744 \uC81C\uC5B4\uD558\uAE30 \uC704\uD55C \uB9E4\uAC1C\uBCC0\uC218\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 `),F=l(N,"A",{href:!0});var re=n(F);O=r(re,"\uD14D\uC2A4\uD2B8 \uC0DD\uC131"),re.forEach(s),se=r(N," API\uB97C \uCC38\uC870\uD558\uC138\uC694."),N.forEach(s),Q=$(h),E(L.$$.fragment,h),J=$(h),W=l(h,"P",{});var U=n(W);V=r(U,"\uC0DD\uC131\uB41C \uD1A0\uD070 ID\uB97C \uD14D\uC2A4\uD2B8\uB85C \uB514\uCF54\uB529\uD569\uB2C8\uB2E4:"),U.forEach(s),Y=$(h),E(B.$$.fragment,h),this.h()},h(){v(F,"href","../main_classes/text_generation")},m(h,z){f(h,p,z),t(p,m),t(p,i),t(i,b),t(p,k),f(h,j,z),q(x,h,z),f(h,M,z),f(h,w,z),t(w,C),t(w,D),t(D,H),t(w,G),t(w,F),t(F,O),t(w,se),f(h,Q,z),q(L,h,z),f(h,J,z),f(h,W,z),t(W,V),f(h,Y,z),q(B,h,z),R=!0},p:$a,i(h){R||(S(x.$$.fragment,h),S(L.$$.fragment,h),S(B.$$.fragment,h),R=!0)},o(h){T(x.$$.fragment,h),T(L.$$.fragment,h),T(B.$$.fragment,h),R=!1},d(h){h&&s(p),h&&s(j),A(x,h),h&&s(M),h&&s(w),h&&s(Q),A(L,h),h&&s(J),h&&s(W),h&&s(Y),A(B,h)}}}function Uo(K){let p,m;return p=new ss({props:{$$slots:{default:[Ro]},$$scope:{ctx:K}}}),{c(){y(p.$$.fragment)},l(i){E(p.$$.fragment,i)},m(i,b){q(p,i,b),m=!0},p(i,b){const k={};b&2&&(k.$$scope={dirty:b,ctx:i}),p.$set(k)},i(i){m||(S(p.$$.fragment,i),m=!0)},o(i){T(p.$$.fragment,i),m=!1},d(i){A(p,i)}}}function Ko(K){let p,m,i,b,k,j,x,M,w,C,D,H,G,F,O,se,Q,L,J,W,V,Y,B,R,h,z,ae,N,I,re,U,Me,he,ue,Fe,ke,de,ie,ge,Pe,pe,be,ce,Te,Z,ve,fe,ne,Le,Ae,ee,_e,g,P,we,je,oe,le,ye,qe,$e,Ce,me,Se,De,te,ze,Ee,xe,He,c,d,Oe,Ue,et,Ge,Je,Ke,lt,Xe,Be,Ie,Qe,nt,tt,it,Ne,Re,pt,ct,Ze,Rt,Ut,St,We,ut,as,Tt,ga,rs,ba,xs,st,va,os,ka,wa,ls,ja,ya,Ps,At,Cs,Kt,Ea,Ds,at,ns,qa,Sa,zt,Ta,is,Aa,za,xa,Xt,ps,Pa,Ca,Ms,xt,Fs,Ve,Da,cs,Ma,Fa,fs,La,Oa,ms,Ia,Ba,Ls,Pt,Os,rt,Na,hs,Ha,Ga,us,Ra,Ua,Is,dt,Bs,ft,_t,ds,Ct,Ka,_s,Xa,Ns,Ye,Wa,Dt,Va,Ya,Mt,Ja,Qa,Ft,Za,er,Hs,Lt,Gs,$t,tr,$s,sr,ar,Rs,Ot,Us,gt,rr,gs,or,lr,Ks,mt,bt,bs,It,nr,vs,ir,Xs,vt,Ws,kt,Vs,ht,wt,ks,Bt,pr,ws,cr,Ys,Wt,fr,Js,Vt,mr,Qs,Nt,Zs,ot,hr,js,ur,dr,ys,_r,$r,ea,Ht,ta,jt,gr,Es,br,vr,sa,yt,aa;return j=new ts({}),D=new Ao({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/summarization.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/summarization.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/summarization.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/summarization.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/summarization.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/summarization.ipynb"}]}}),G=new To({props:{id:"yHnr5Dk2zCI"}}),pe=new _a({props:{$$slots:{default:[zo]},$$scope:{ctx:K}}}),ve=new X({props:{code:"pip install transformers datasets evaluate rouge_score",highlighted:"pip install transformers datasets evaluate rouge_score"}}),ee=new X({props:{code:`from huggingface_hub import notebook_login

notebook_login()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login

<span class="hljs-meta">&gt;&gt;&gt; </span>notebook_login()`}}),je=new ts({}),Se=new X({props:{code:`from datasets import load_dataset

billsum = load_dataset("billsum", split="ca_test")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>billsum = load_dataset(<span class="hljs-string">&quot;billsum&quot;</span>, split=<span class="hljs-string">&quot;ca_test&quot;</span>)`}}),c=new X({props:{code:"billsum = billsum.train_test_split(test_size=0.2)",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>billsum = billsum.train_test_split(test_size=<span class="hljs-number">0.2</span>)'}}),Ge=new X({props:{code:'billsum["train"][0]',highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>billsum[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]
{<span class="hljs-string">&#x27;summary&#x27;</span>: <span class="hljs-string">&#x27;Existing law authorizes state agencies to enter into contracts for the acquisition of goods or services upon approval by the Department of General Services. Existing law sets forth various requirements and prohibitions for those contracts, including, but not limited to, a prohibition on entering into contracts for the acquisition of goods or services of $100,000 or more with a contractor that discriminates between spouses and domestic partners or same-sex and different-sex couples in the provision of benefits. Existing law provides that a contract entered into in violation of those requirements and prohibitions is void and authorizes the state or any person acting on behalf of the state to bring a civil action seeking a determination that a contract is in violation and therefore void. Under existing law, a willful violation of those requirements and prohibitions is a misdemeanor.\\nThis bill would also prohibit a state agency from entering into contracts for the acquisition of goods or services of $100,000 or more with a contractor that discriminates between employees on the basis of gender identity in the provision of benefits, as specified. By expanding the scope of a crime, this bill would impose a state-mandated local program.\\nThe California Constitution requires the state to reimburse local agencies and school districts for certain costs mandated by the state. Statutory provisions establish procedures for making that reimbursement.\\nThis bill would provide that no reimbursement is required by this act for a specified reason.&#x27;</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;The people of the State of California do enact as follows:\\n\\n\\nSECTION 1.\\nSection 10295.35 is added to the Public Contract Code, to read:\\n10295.35.\\n(a) (1) Notwithstanding any other law, a state agency shall not enter into any contract for the acquisition of goods or services in the amount of one hundred thousand dollars ($100,000) or more with a contractor that, in the provision of benefits, discriminates between employees on the basis of an employee\u2019s or dependent\u2019s actual or perceived gender identity, including, but not limited to, the employee\u2019s or dependent\u2019s identification as transgender.\\n(2) For purposes of this section, \u201Ccontract\u201D includes contracts with a cumulative amount of one hundred thousand dollars ($100,000) or more per contractor in each fiscal year.\\n(3) For purposes of this section, an employee health plan is discriminatory if the plan is not consistent with Section 1365.5 of the Health and Safety Code and Section 10140 of the Insurance Code.\\n(4) The requirements of this section shall apply only to those portions of a contractor\u2019s operations that occur under any of the following conditions:\\n(A) Within the state.\\n(B) On real property outside the state if the property is owned by the state or if the state has a right to occupy the property, and if the contractor\u2019s presence at that location is connected to a contract with the state.\\n(C) Elsewhere in the United States where work related to a state contract is being performed.\\n(b) Contractors shall treat as confidential, to the maximum extent allowed by law or by the requirement of the contractor\u2019s insurance provider, any request by an employee or applicant for employment benefits or any documentation of eligibility for benefits submitted by an employee or applicant for employment.\\n(c) After taking all reasonable measures to find a contractor that complies with this section, as determined by the state agency, the requirements of this section may be waived under any of the following circumstances:\\n(1) There is only one prospective contractor willing to enter into a specific contract with the state agency.\\n(2) The contract is necessary to respond to an emergency, as determined by the state agency, that endangers the public health, welfare, or safety, or the contract is necessary for the provision of essential services, and no entity that complies with the requirements of this section capable of responding to the emergency is immediately available.\\n(3) The requirements of this section violate, or are inconsistent with, the terms or conditions of a grant, subvention, or agreement, if the agency has made a good faith attempt to change the terms or conditions of any grant, subvention, or agreement to authorize application of this section.\\n(4) The contractor is providing wholesale or bulk water, power, or natural gas, the conveyance or transmission of the same, or ancillary services, as required for ensuring reliable services in accordance with good utility practice, if the purchase of the same cannot practically be accomplished through the standard competitive bidding procedures and the contractor is not providing direct retail services to end users.\\n(d) (1) A contractor shall not be deemed to discriminate in the provision of benefits if the contractor, in providing the benefits, pays the actual costs incurred in obtaining the benefit.\\n(2) If a contractor is unable to provide a certain benefit, despite taking reasonable measures to do so, the contractor shall not be deemed to discriminate in the provision of benefits.\\n(e) (1) Every contract subject to this chapter shall contain a statement by which the contractor certifies that the contractor is in compliance with this section.\\n(2) The department or other contracting agency shall enforce this section pursuant to its existing enforcement powers.\\n(3) (A) If a contractor falsely certifies that it is in compliance with this section, the contract with that contractor shall be subject to Article 9 (commencing with Section 10420), unless, within a time period specified by the department or other contracting agency, the contractor provides to the department or agency proof that it has complied, or is in the process of complying, with this section.\\n(B) The application of the remedies or penalties contained in Article 9 (commencing with Section 10420) to a contract subject to this chapter shall not preclude the application of any existing remedies otherwise available to the department or other contracting agency under its existing enforcement powers.\\n(f) Nothing in this section is intended to regulate the contracting practices of any local jurisdiction.\\n(g) This section shall be construed so as not to conflict with applicable federal laws, rules, or regulations. In the event that a court or agency of competent jurisdiction holds that federal law, rule, or regulation invalidates any clause, sentence, paragraph, or section of this code or the application thereof to any person or circumstances, it is the intent of the state that the court or agency sever that clause, sentence, paragraph, or section so that the remainder of this section shall remain in effect.\\nSEC. 2.\\nSection 10295.35 of the Public Contract Code shall not be construed to create any new enforcement authority or responsibility in the Department of General Services or any other contracting agency.\\nSEC. 3.\\nNo reimbursement is required by this act pursuant to Section 6 of Article XIII\\u2009B of the California Constitution because the only costs that may be incurred by a local agency or school district will be incurred because this act creates a new crime or infraction, eliminates a crime or infraction, or changes the penalty for a crime or infraction, within the meaning of Section 17556 of the Government Code, or changes the definition of a crime within the meaning of Section 6 of Article XIII\\u2009B of the California Constitution.&#x27;</span>,
 <span class="hljs-string">&#x27;title&#x27;</span>: <span class="hljs-string">&#x27;An act to add Section 10295.35 to the Public Contract Code, relating to public contracts.&#x27;</span>}`}}),Tt=new ts({}),At=new X({props:{code:`from transformers import AutoTokenizer

checkpoint = "t5-small"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;t5-small&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(checkpoint)`}}),xt=new X({props:{code:`prefix = "summarize: "


def preprocess_function(examples):
    inputs = [prefix + doc for doc in examples["text"]]
    model_inputs = tokenizer(inputs, max_length=1024, truncation=True)

    labels = tokenizer(text_target=examples["summary"], max_length=128, truncation=True)

    model_inputs["labels"] = labels["input_ids"]
    return model_inputs`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>prefix = <span class="hljs-string">&quot;summarize: &quot;</span>


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_function</span>(<span class="hljs-params">examples</span>):
<span class="hljs-meta">... </span>    inputs = [prefix + doc <span class="hljs-keyword">for</span> doc <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;text&quot;</span>]]
<span class="hljs-meta">... </span>    model_inputs = tokenizer(inputs, max_length=<span class="hljs-number">1024</span>, truncation=<span class="hljs-literal">True</span>)

<span class="hljs-meta">... </span>    labels = tokenizer(text_target=examples[<span class="hljs-string">&quot;summary&quot;</span>], max_length=<span class="hljs-number">128</span>, truncation=<span class="hljs-literal">True</span>)

<span class="hljs-meta">... </span>    model_inputs[<span class="hljs-string">&quot;labels&quot;</span>] = labels[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> model_inputs`}}),Pt=new X({props:{code:"tokenized_billsum = billsum.map(preprocess_function, batched=True)",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tokenized_billsum = billsum.<span class="hljs-built_in">map</span>(preprocess_function, batched=<span class="hljs-literal">True</span>)'}}),dt=new yr({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Do],pytorch:[Po]},$$scope:{ctx:K}}}),Ct=new ts({}),Lt=new X({props:{code:`import evaluate

rouge = evaluate.load("rouge")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> evaluate

<span class="hljs-meta">&gt;&gt;&gt; </span>rouge = evaluate.load(<span class="hljs-string">&quot;rouge&quot;</span>)`}}),Ot=new X({props:{code:`import numpy as np


def compute_metrics(eval_pred):
    predictions, labels = eval_pred
    decoded_preds = tokenizer.batch_decode(predictions, skip_special_tokens=True)
    labels = np.where(labels != -100, labels, tokenizer.pad_token_id)
    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)

    result = rouge.compute(predictions=decoded_preds, references=decoded_labels, use_stemmer=True)

    prediction_lens = [np.count_nonzero(pred != tokenizer.pad_token_id) for pred in predictions]
    result["gen_len"] = np.mean(prediction_lens)

    return {k: round(v, 4) for k, v in result.items()}`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_metrics</span>(<span class="hljs-params">eval_pred</span>):
<span class="hljs-meta">... </span>    predictions, labels = eval_pred
<span class="hljs-meta">... </span>    decoded_preds = tokenizer.batch_decode(predictions, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">... </span>    labels = np.where(labels != -<span class="hljs-number">100</span>, labels, tokenizer.pad_token_id)
<span class="hljs-meta">... </span>    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=<span class="hljs-literal">True</span>)

<span class="hljs-meta">... </span>    result = rouge.compute(predictions=decoded_preds, references=decoded_labels, use_stemmer=<span class="hljs-literal">True</span>)

<span class="hljs-meta">... </span>    prediction_lens = [np.count_nonzero(pred != tokenizer.pad_token_id) <span class="hljs-keyword">for</span> pred <span class="hljs-keyword">in</span> predictions]
<span class="hljs-meta">... </span>    result[<span class="hljs-string">&quot;gen_len&quot;</span>] = np.mean(prediction_lens)

<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> {k: <span class="hljs-built_in">round</span>(v, <span class="hljs-number">4</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> result.items()}`}}),It=new ts({}),vt=new yr({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Bo],pytorch:[Lo]},$$scope:{ctx:K}}}),kt=new _a({props:{$$slots:{default:[No]},$$scope:{ctx:K}}}),Bt=new ts({}),Nt=new X({props:{code:`text = "summarize: The Inflation Reduction Act lowers prescription drug costs, health care costs, and energy costs. It's the most aggressive action on tackling the climate crisis in American history, which will lift up American workers and create good-paying, union jobs across the country. It'll lower the deficit and ask the ultra-wealthy and corporations to pay their fair share. And no one making under $400,000 per year will pay a penny more in taxes."`,highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;summarize: The Inflation Reduction Act lowers prescription drug costs, health care costs, and energy costs. It&#x27;s the most aggressive action on tackling the climate crisis in American history, which will lift up American workers and create good-paying, union jobs across the country. It&#x27;ll lower the deficit and ask the ultra-wealthy and corporations to pay their fair share. And no one making under $400,000 per year will pay a penny more in taxes.&quot;</span>'}}),Ht=new X({props:{code:`from transformers import pipeline

summarizer = pipeline("summarization", model="stevhliu/my_awesome_billsum_model")
summarizer(text)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>summarizer = pipeline(<span class="hljs-string">&quot;summarization&quot;</span>, model=<span class="hljs-string">&quot;stevhliu/my_awesome_billsum_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>summarizer(text)
[{<span class="hljs-string">&quot;summary_text&quot;</span>: <span class="hljs-string">&quot;The Inflation Reduction Act lowers prescription drug costs, health care costs, and energy costs. It&#x27;s the most aggressive action on tackling the climate crisis in American history, which will lift up American workers and create good-paying, union jobs across the country.&quot;</span>}]`}}),yt=new yr({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Uo],pytorch:[Go]},$$scope:{ctx:K}}}),{c(){p=o("meta"),m=_(),i=o("h1"),b=o("a"),k=o("span"),y(j.$$.fragment),x=_(),M=o("span"),w=a("\uC694\uC57D"),C=_(),y(D.$$.fragment),H=_(),y(G.$$.fragment),F=_(),O=o("p"),se=a(`\uC694\uC57D\uC740 \uBB38\uC11C\uB098 \uAE30\uC0AC\uC5D0\uC11C \uC911\uC694\uD55C \uC815\uBCF4\uB97C \uBAA8\uB450 \uD3EC\uD568\uD558\uB418 \uC9E7\uAC8C \uB9CC\uB4DC\uB294 \uC77C\uC785\uB2C8\uB2E4.
\uBC88\uC5ED\uACFC \uB9C8\uCC2C\uAC00\uC9C0\uB85C, \uC2DC\uD000\uC2A4-\uD22C-\uC2DC\uD000\uC2A4 \uBB38\uC81C\uB85C \uAD6C\uC131\uD560 \uC218 \uC788\uB294 \uB300\uD45C\uC801\uC778 \uC791\uC5C5 \uC911 \uD558\uB098\uC785\uB2C8\uB2E4.
\uC694\uC57D\uC5D0\uB294 \uC544\uB798\uC640 \uAC19\uC774 \uC720\uD615\uC774 \uC788\uC2B5\uB2C8\uB2E4:`),Q=_(),L=o("ul"),J=o("li"),W=a("\uCD94\uCD9C(Extractive) \uC694\uC57D: \uBB38\uC11C\uC5D0\uC11C \uAC00\uC7A5 \uAD00\uB828\uC131 \uB192\uC740 \uC815\uBCF4\uB97C \uCD94\uCD9C\uD569\uB2C8\uB2E4."),V=_(),Y=o("li"),B=a("\uC0DD\uC131(Abstractive) \uC694\uC57D: \uAC00\uC7A5 \uAD00\uB828\uC131 \uB192\uC740 \uC815\uBCF4\uB97C \uD3EC\uCC29\uD574\uB0B4\uB294 \uC0C8\uB85C\uC6B4 \uD14D\uC2A4\uD2B8\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4."),R=_(),h=o("p"),z=a("\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C \uC18C\uAC1C\uD560 \uB0B4\uC6A9\uC740 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4:"),ae=_(),N=o("ol"),I=o("li"),re=a("\uC0DD\uC131 \uC694\uC57D\uC744 \uC704\uD55C "),U=o("a"),Me=a("BillSum"),he=a(" \uB370\uC774\uD130\uC14B \uC911 \uCE98\uB9AC\uD3EC\uB2C8\uC544 \uC8FC \uBC95\uC548 \uD558\uC704 \uC9D1\uD569\uC73C\uB85C "),ue=o("a"),Fe=a("T5"),ke=a("\uB97C \uD30C\uC778\uD29C\uB2DD\uD569\uB2C8\uB2E4."),de=_(),ie=o("li"),ge=a("\uD30C\uC778\uD29C\uB2DD\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uD569\uB2C8\uB2E4."),Pe=_(),y(pe.$$.fragment),be=_(),ce=o("p"),Te=a("\uC2DC\uC791\uD558\uAE30 \uC804\uC5D0 \uD544\uC694\uD55C \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uBAA8\uB450 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694:"),Z=_(),y(ve.$$.fragment),fe=_(),ne=o("p"),Le=a(`Hugging Face \uACC4\uC815\uC5D0 \uB85C\uADF8\uC778\uD558\uBA74 \uBAA8\uB378\uC744 \uC5C5\uB85C\uB4DC\uD558\uACE0 \uCEE4\uBBA4\uB2C8\uD2F0\uC5D0 \uACF5\uC720\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uD1A0\uD070\uC744 \uC785\uB825\uD558\uC5EC \uB85C\uADF8\uC778\uD558\uC138\uC694.`),Ae=_(),y(ee.$$.fragment),_e=_(),g=o("h2"),P=o("a"),we=o("span"),y(je.$$.fragment),oe=_(),le=o("span"),ye=a("BillSum \uB370\uC774\uD130\uC14B \uAC00\uC838\uC624\uAE30"),qe=_(),$e=o("p"),Ce=a("\u{1F917} Datasets \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC5D0\uC11C BillSum \uB370\uC774\uD130\uC14B\uC758 \uC791\uC740 \uBC84\uC804\uC778 \uCE98\uB9AC\uD3EC\uB2C8\uC544 \uC8FC \uBC95\uC548 \uD558\uC704 \uC9D1\uD569\uC744 \uAC00\uC838\uC624\uC138\uC694:"),me=_(),y(Se.$$.fragment),De=_(),te=o("p"),ze=o("code"),Ee=a("train_test_split"),xe=a(" \uBA54\uC18C\uB4DC\uB85C \uB370\uC774\uD130\uC14B\uC744 \uD559\uC2B5\uC6A9\uC640 \uD14C\uC2A4\uD2B8\uC6A9\uC73C\uB85C \uB098\uB204\uC138\uC694:"),He=_(),y(c.$$.fragment),d=_(),Oe=o("p"),Ue=a("\uADF8\uB7F0 \uB2E4\uC74C \uC608\uC2DC\uB97C \uD558\uB098 \uC0B4\uD3B4\uBCF4\uC138\uC694:"),et=_(),y(Ge.$$.fragment),Je=_(),Ke=o("p"),lt=a("\uC5EC\uAE30\uC11C \uB2E4\uC74C \uB450 \uAC1C\uC758 \uD544\uB4DC\uB97C \uC0AC\uC6A9\uD558\uAC8C \uB429\uB2C8\uB2E4:"),Xe=_(),Be=o("ul"),Ie=o("li"),Qe=o("code"),nt=a("text"),tt=a(": \uBAA8\uB378\uC758 \uC785\uB825\uC774 \uB420 \uBC95\uC548 \uD14D\uC2A4\uD2B8\uC785\uB2C8\uB2E4."),it=_(),Ne=o("li"),Re=o("code"),pt=a("summary"),ct=a(": "),Ze=o("code"),Rt=a("text"),Ut=a("\uC758 \uAC04\uB7B5\uD55C \uBC84\uC804\uC73C\uB85C \uBAA8\uB378\uC758 \uD0C0\uAC9F\uC774 \uB429\uB2C8\uB2E4."),St=_(),We=o("h2"),ut=o("a"),as=o("span"),y(Tt.$$.fragment),ga=_(),rs=o("span"),ba=a("\uC804\uCC98\uB9AC"),xs=_(),st=o("p"),va=a("\uB2E4\uC74C\uC73C\uB85C "),os=o("code"),ka=a("text"),wa=a("\uC640 "),ls=o("code"),ja=a("summary"),ya=a("\uB97C \uCC98\uB9AC\uD558\uAE30 \uC704\uD55C T5 \uD1A0\uD06C\uB098\uC774\uC800\uB97C \uAC00\uC838\uC635\uB2C8\uB2E4:"),Ps=_(),y(At.$$.fragment),Cs=_(),Kt=o("p"),Ea=a("\uC0DD\uC131\uD558\uB824\uB294 \uC804\uCC98\uB9AC \uD568\uC218\uB294 \uC544\uB798 \uC870\uAC74\uC744 \uB9CC\uC871\uD574\uC57C \uD569\uB2C8\uB2E4:"),Ds=_(),at=o("ol"),ns=o("li"),qa=a("\uC785\uB825 \uC55E\uC5D0 \uD504\uB86C\uD504\uD2B8\uB97C \uBD99\uC5EC T5\uAC00 \uC694\uC57D \uC791\uC5C5\uC784\uC744 \uC778\uC2DD\uD560 \uC218 \uC788\uB3C4\uB85D \uD569\uB2C8\uB2E4. \uC5EC\uB7EC NLP \uC791\uC5C5\uC744 \uC218\uD589\uD560 \uC218 \uC788\uB294 \uC77C\uBD80 \uBAA8\uB378\uC740 \uD2B9\uC815 \uC791\uC5C5\uC5D0 \uB300\uD55C \uD504\uB86C\uD504\uD2B8\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."),Sa=_(),zt=o("li"),Ta=a("\uB808\uC774\uBE14\uC744 \uD1A0\uD070\uD654\uD560 \uB54C "),is=o("code"),Aa=a("text_target"),za=a(" \uC778\uC218\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4."),xa=_(),Xt=o("li"),ps=o("code"),Pa=a("max_length"),Ca=a(" \uB9E4\uAC1C\uBCC0\uC218\uB85C \uC124\uC815\uB41C \uCD5C\uB300 \uAE38\uC774\uB97C \uB118\uC9C0 \uC54A\uB3C4\uB85D \uAE34 \uC2DC\uD000\uC2A4\uB97C \uC798\uB77C\uB0C5\uB2C8\uB2E4."),Ms=_(),y(xt.$$.fragment),Fs=_(),Ve=o("p"),Da=a("\uC804\uCCB4 \uB370\uC774\uD130\uC14B\uC5D0 \uC804\uCC98\uB9AC \uD568\uC218\uB97C \uC801\uC6A9\uD558\uB824\uBA74 \u{1F917} Datasets\uC758 "),cs=o("code"),Ma=a("map"),Fa=a(` \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.
`),fs=o("code"),La=a("batched=True"),Oa=a("\uB85C \uC124\uC815\uD558\uC5EC \uB370\uC774\uD130\uC14B\uC758 \uC5EC\uB7EC \uC694\uC18C\uB97C \uD55C \uBC88\uC5D0 \uCC98\uB9AC\uD558\uBA74 "),ms=o("code"),Ia=a("map"),Ba=a(" \uD568\uC218\uC758 \uC18D\uB3C4\uB97C \uB192\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ls=_(),y(Pt.$$.fragment),Os=_(),rt=o("p"),Na=a("\uC774\uC81C "),hs=o("code"),Ha=a("DataCollatorForSeq2Seq"),Ga=a(`\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC608\uC81C \uBC30\uCE58\uB97C \uB9CC\uB4DC\uC138\uC694.
\uC804\uCCB4 \uB370\uC774\uD130\uC14B\uC744 \uCD5C\uB300 \uAE38\uC774\uB85C \uD328\uB529\uD558\uB294 \uAC83\uBCF4\uB2E4 \uBC30\uCE58\uB9C8\uB2E4 \uAC00\uC7A5 \uAE34 \uBB38\uC7A5 \uAE38\uC774\uC5D0 \uB9DE\uCDB0 `),us=o("em"),Ra=a("\uB3D9\uC801 \uD328\uB529"),Ua=a("\uD558\uB294 \uAC83\uC774 \uB354 \uD6A8\uC728\uC801\uC785\uB2C8\uB2E4."),Is=_(),y(dt.$$.fragment),Bs=_(),ft=o("h2"),_t=o("a"),ds=o("span"),y(Ct.$$.fragment),Ka=_(),_s=o("span"),Xa=a("\uD3C9\uAC00"),Ns=_(),Ye=o("p"),Wa=a(`\uD559\uC2B5 \uC911\uC5D0 \uD3C9\uAC00 \uC9C0\uD45C\uB97C \uD3EC\uD568\uD558\uBA74 \uBAA8\uB378\uC758 \uC131\uB2A5\uC744 \uD3C9\uAC00\uD558\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB418\uB294 \uACBD\uC6B0\uAC00 \uB9CE\uC2B5\uB2C8\uB2E4.
\u{1F917} `),Dt=o("a"),Va=a("Evaluate"),Ya=a(` \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uC0AC\uC6A9\uD558\uBA74 \uD3C9\uAC00 \uBC29\uBC95\uC744 \uBE60\uB974\uAC8C \uBD88\uB7EC\uC62C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uC774 \uC791\uC5C5\uC5D0\uC11C\uB294 `),Mt=o("a"),Ja=a("ROUGE"),Qa=a(` \uD3C9\uAC00 \uC9C0\uD45C\uB97C \uAC00\uC838\uC635\uB2C8\uB2E4.
(\uD3C9\uAC00 \uC9C0\uD45C\uB97C \uBD88\uB7EC\uC624\uACE0 \uACC4\uC0B0\uD558\uB294 \uBC29\uBC95\uC740 \u{1F917} Evaluate `),Ft=o("a"),Za=a("\uB458\uB7EC\uBCF4\uAE30"),er=a("\uB97C \uCC38\uC870\uD558\uC138\uC694.)"),Hs=_(),y(Lt.$$.fragment),Gs=_(),$t=o("p"),tr=a("\uADF8\uB7F0 \uB2E4\uC74C \uC608\uCE21\uAC12\uACFC \uB808\uC774\uBE14\uC744 "),$s=o("code"),sr=a("compute"),ar=a("\uC5D0 \uC804\uB2EC\uD558\uC5EC ROUGE \uC9C0\uD45C\uB97C \uACC4\uC0B0\uD558\uB294 \uD568\uC218\uB97C \uB9CC\uB4ED\uB2C8\uB2E4:"),Rs=_(),y(Ot.$$.fragment),Us=_(),gt=o("p"),rr=a("\uC774\uC81C "),gs=o("code"),or=a("compute_metrics"),lr=a(" \uD568\uC218\uB97C \uC0AC\uC6A9\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC73C\uBA70, \uD559\uC2B5\uC744 \uC124\uC815\uD560 \uB54C \uC774 \uD568\uC218\uB85C \uB418\uB3CC\uC544\uC62C \uAC83\uC785\uB2C8\uB2E4."),Ks=_(),mt=o("h2"),bt=o("a"),bs=o("span"),y(It.$$.fragment),nr=_(),vs=o("span"),ir=a("\uD559\uC2B5"),Xs=_(),y(vt.$$.fragment),Ws=_(),y(kt.$$.fragment),Vs=_(),ht=o("h2"),wt=o("a"),ks=o("span"),y(Bt.$$.fragment),pr=_(),ws=o("span"),cr=a("\uCD94\uB860"),Ys=_(),Wt=o("p"),fr=a("\uC88B\uC544\uC694, \uC774\uC81C \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD588\uC73C\uB2C8 \uCD94\uB860\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"),Js=_(),Vt=o("p"),mr=a("\uC694\uC57D\uD560 \uD14D\uC2A4\uD2B8\uB97C \uC791\uC131\uD574\uBCF4\uC138\uC694. T5\uC758 \uACBD\uC6B0 \uC791\uC5C5\uC5D0 \uB530\uB77C \uC785\uB825 \uC55E\uC5D0 \uC811\uB450\uC0AC\uB97C \uBD99\uC5EC\uC57C \uD569\uB2C8\uB2E4. \uC694\uC57D\uC758 \uACBD\uC6B0, \uC544\uB798\uC640 \uAC19\uC740 \uC811\uB450\uC0AC\uB97C \uC785\uB825 \uC55E\uC5D0 \uBD99\uC5EC\uC57C \uD569\uB2C8\uB2E4:"),Qs=_(),y(Nt.$$.fragment),Zs=_(),ot=o("p"),hr=a("\uCD94\uB860\uC744 \uC704\uD574 \uD30C\uC778\uD29C\uB2DD\uD55C \uBAA8\uB378\uC744 \uC2DC\uD5D8\uD574 \uBCF4\uB294 \uAC00\uC7A5 \uAC04\uB2E8\uD55C \uBC29\uBC95\uC740 "),js=o("code"),ur=a("pipeline()"),dr=a(`\uC5D0\uC11C \uC0AC\uC6A9\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4.
\uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC694\uC57D\uC744 \uC218\uD589\uD560 `),ys=o("code"),_r=a("pipeline()"),$r=a("\uC744 \uC778\uC2A4\uD134\uC2A4\uD654\uD558\uACE0 \uD14D\uC2A4\uD2B8\uB97C \uC804\uB2EC\uD558\uC138\uC694:"),ea=_(),y(Ht.$$.fragment),ta=_(),jt=o("p"),gr=a("\uC6D0\uD55C\uB2E4\uBA74 \uC218\uB3D9\uC73C\uB85C \uB2E4\uC74C\uACFC \uAC19\uC740 \uC791\uC5C5\uC744 \uC218\uD589\uD558\uC5EC "),Es=o("code"),br=a("pipeline()"),vr=a("\uC758 \uACB0\uACFC\uC640 \uB3D9\uC77C\uD55C \uACB0\uACFC\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),sa=_(),y(yt.$$.fragment),this.h()},l(e){const u=qo('[data-svelte="svelte-1phssyn"]',document.head);p=l(u,"META",{name:!0,content:!0}),u.forEach(s),m=$(e),i=l(e,"H1",{class:!0});var Gt=n(i);b=l(Gt,"A",{id:!0,class:!0,href:!0});var qs=n(b);k=l(qs,"SPAN",{});var Ss=n(k);E(j.$$.fragment,Ss),Ss.forEach(s),qs.forEach(s),x=$(Gt),M=l(Gt,"SPAN",{});var Ts=n(M);w=r(Ts,"\uC694\uC57D"),Ts.forEach(s),Gt.forEach(s),C=$(e),E(D.$$.fragment,e),H=$(e),E(G.$$.fragment,e),F=$(e),O=l(e,"P",{});var As=n(O);se=r(As,`\uC694\uC57D\uC740 \uBB38\uC11C\uB098 \uAE30\uC0AC\uC5D0\uC11C \uC911\uC694\uD55C \uC815\uBCF4\uB97C \uBAA8\uB450 \uD3EC\uD568\uD558\uB418 \uC9E7\uAC8C \uB9CC\uB4DC\uB294 \uC77C\uC785\uB2C8\uB2E4.
\uBC88\uC5ED\uACFC \uB9C8\uCC2C\uAC00\uC9C0\uB85C, \uC2DC\uD000\uC2A4-\uD22C-\uC2DC\uD000\uC2A4 \uBB38\uC81C\uB85C \uAD6C\uC131\uD560 \uC218 \uC788\uB294 \uB300\uD45C\uC801\uC778 \uC791\uC5C5 \uC911 \uD558\uB098\uC785\uB2C8\uB2E4.
\uC694\uC57D\uC5D0\uB294 \uC544\uB798\uC640 \uAC19\uC774 \uC720\uD615\uC774 \uC788\uC2B5\uB2C8\uB2E4:`),As.forEach(s),Q=$(e),L=l(e,"UL",{});var ra=n(L);J=l(ra,"LI",{});var Er=n(J);W=r(Er,"\uCD94\uCD9C(Extractive) \uC694\uC57D: \uBB38\uC11C\uC5D0\uC11C \uAC00\uC7A5 \uAD00\uB828\uC131 \uB192\uC740 \uC815\uBCF4\uB97C \uCD94\uCD9C\uD569\uB2C8\uB2E4."),Er.forEach(s),V=$(ra),Y=l(ra,"LI",{});var qr=n(Y);B=r(qr,"\uC0DD\uC131(Abstractive) \uC694\uC57D: \uAC00\uC7A5 \uAD00\uB828\uC131 \uB192\uC740 \uC815\uBCF4\uB97C \uD3EC\uCC29\uD574\uB0B4\uB294 \uC0C8\uB85C\uC6B4 \uD14D\uC2A4\uD2B8\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4."),qr.forEach(s),ra.forEach(s),R=$(e),h=l(e,"P",{});var Sr=n(h);z=r(Sr,"\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C \uC18C\uAC1C\uD560 \uB0B4\uC6A9\uC740 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4:"),Sr.forEach(s),ae=$(e),N=l(e,"OL",{});var oa=n(N);I=l(oa,"LI",{});var Yt=n(I);re=r(Yt,"\uC0DD\uC131 \uC694\uC57D\uC744 \uC704\uD55C "),U=l(Yt,"A",{href:!0,rel:!0});var Tr=n(U);Me=r(Tr,"BillSum"),Tr.forEach(s),he=r(Yt," \uB370\uC774\uD130\uC14B \uC911 \uCE98\uB9AC\uD3EC\uB2C8\uC544 \uC8FC \uBC95\uC548 \uD558\uC704 \uC9D1\uD569\uC73C\uB85C "),ue=l(Yt,"A",{href:!0,rel:!0});var Ar=n(ue);Fe=r(Ar,"T5"),Ar.forEach(s),ke=r(Yt,"\uB97C \uD30C\uC778\uD29C\uB2DD\uD569\uB2C8\uB2E4."),Yt.forEach(s),de=$(oa),ie=l(oa,"LI",{});var zr=n(ie);ge=r(zr,"\uD30C\uC778\uD29C\uB2DD\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uD569\uB2C8\uB2E4."),zr.forEach(s),oa.forEach(s),Pe=$(e),E(pe.$$.fragment,e),be=$(e),ce=l(e,"P",{});var xr=n(ce);Te=r(xr,"\uC2DC\uC791\uD558\uAE30 \uC804\uC5D0 \uD544\uC694\uD55C \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uBAA8\uB450 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694:"),xr.forEach(s),Z=$(e),E(ve.$$.fragment,e),fe=$(e),ne=l(e,"P",{});var Pr=n(ne);Le=r(Pr,`Hugging Face \uACC4\uC815\uC5D0 \uB85C\uADF8\uC778\uD558\uBA74 \uBAA8\uB378\uC744 \uC5C5\uB85C\uB4DC\uD558\uACE0 \uCEE4\uBBA4\uB2C8\uD2F0\uC5D0 \uACF5\uC720\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uD1A0\uD070\uC744 \uC785\uB825\uD558\uC5EC \uB85C\uADF8\uC778\uD558\uC138\uC694.`),Pr.forEach(s),Ae=$(e),E(ee.$$.fragment,e),_e=$(e),g=l(e,"H2",{class:!0});var la=n(g);P=l(la,"A",{id:!0,class:!0,href:!0});var Cr=n(P);we=l(Cr,"SPAN",{});var Dr=n(we);E(je.$$.fragment,Dr),Dr.forEach(s),Cr.forEach(s),oe=$(la),le=l(la,"SPAN",{});var Mr=n(le);ye=r(Mr,"BillSum \uB370\uC774\uD130\uC14B \uAC00\uC838\uC624\uAE30"),Mr.forEach(s),la.forEach(s),qe=$(e),$e=l(e,"P",{});var Fr=n($e);Ce=r(Fr,"\u{1F917} Datasets \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC5D0\uC11C BillSum \uB370\uC774\uD130\uC14B\uC758 \uC791\uC740 \uBC84\uC804\uC778 \uCE98\uB9AC\uD3EC\uB2C8\uC544 \uC8FC \uBC95\uC548 \uD558\uC704 \uC9D1\uD569\uC744 \uAC00\uC838\uC624\uC138\uC694:"),Fr.forEach(s),me=$(e),E(Se.$$.fragment,e),De=$(e),te=l(e,"P",{});var kr=n(te);ze=l(kr,"CODE",{});var Lr=n(ze);Ee=r(Lr,"train_test_split"),Lr.forEach(s),xe=r(kr," \uBA54\uC18C\uB4DC\uB85C \uB370\uC774\uD130\uC14B\uC744 \uD559\uC2B5\uC6A9\uC640 \uD14C\uC2A4\uD2B8\uC6A9\uC73C\uB85C \uB098\uB204\uC138\uC694:"),kr.forEach(s),He=$(e),E(c.$$.fragment,e),d=$(e),Oe=l(e,"P",{});var Or=n(Oe);Ue=r(Or,"\uADF8\uB7F0 \uB2E4\uC74C \uC608\uC2DC\uB97C \uD558\uB098 \uC0B4\uD3B4\uBCF4\uC138\uC694:"),Or.forEach(s),et=$(e),E(Ge.$$.fragment,e),Je=$(e),Ke=l(e,"P",{});var Ir=n(Ke);lt=r(Ir,"\uC5EC\uAE30\uC11C \uB2E4\uC74C \uB450 \uAC1C\uC758 \uD544\uB4DC\uB97C \uC0AC\uC6A9\uD558\uAC8C \uB429\uB2C8\uB2E4:"),Ir.forEach(s),Xe=$(e),Be=l(e,"UL",{});var na=n(Be);Ie=l(na,"LI",{});var wr=n(Ie);Qe=l(wr,"CODE",{});var Br=n(Qe);nt=r(Br,"text"),Br.forEach(s),tt=r(wr,": \uBAA8\uB378\uC758 \uC785\uB825\uC774 \uB420 \uBC95\uC548 \uD14D\uC2A4\uD2B8\uC785\uB2C8\uB2E4."),wr.forEach(s),it=$(na),Ne=l(na,"LI",{});var zs=n(Ne);Re=l(zs,"CODE",{});var Nr=n(Re);pt=r(Nr,"summary"),Nr.forEach(s),ct=r(zs,": "),Ze=l(zs,"CODE",{});var Hr=n(Ze);Rt=r(Hr,"text"),Hr.forEach(s),Ut=r(zs,"\uC758 \uAC04\uB7B5\uD55C \uBC84\uC804\uC73C\uB85C \uBAA8\uB378\uC758 \uD0C0\uAC9F\uC774 \uB429\uB2C8\uB2E4."),zs.forEach(s),na.forEach(s),St=$(e),We=l(e,"H2",{class:!0});var ia=n(We);ut=l(ia,"A",{id:!0,class:!0,href:!0});var Gr=n(ut);as=l(Gr,"SPAN",{});var Rr=n(as);E(Tt.$$.fragment,Rr),Rr.forEach(s),Gr.forEach(s),ga=$(ia),rs=l(ia,"SPAN",{});var Ur=n(rs);ba=r(Ur,"\uC804\uCC98\uB9AC"),Ur.forEach(s),ia.forEach(s),xs=$(e),st=l(e,"P",{});var Jt=n(st);va=r(Jt,"\uB2E4\uC74C\uC73C\uB85C "),os=l(Jt,"CODE",{});var Kr=n(os);ka=r(Kr,"text"),Kr.forEach(s),wa=r(Jt,"\uC640 "),ls=l(Jt,"CODE",{});var Xr=n(ls);ja=r(Xr,"summary"),Xr.forEach(s),ya=r(Jt,"\uB97C \uCC98\uB9AC\uD558\uAE30 \uC704\uD55C T5 \uD1A0\uD06C\uB098\uC774\uC800\uB97C \uAC00\uC838\uC635\uB2C8\uB2E4:"),Jt.forEach(s),Ps=$(e),E(At.$$.fragment,e),Cs=$(e),Kt=l(e,"P",{});var Wr=n(Kt);Ea=r(Wr,"\uC0DD\uC131\uD558\uB824\uB294 \uC804\uCC98\uB9AC \uD568\uC218\uB294 \uC544\uB798 \uC870\uAC74\uC744 \uB9CC\uC871\uD574\uC57C \uD569\uB2C8\uB2E4:"),Wr.forEach(s),Ds=$(e),at=l(e,"OL",{});var Qt=n(at);ns=l(Qt,"LI",{});var Vr=n(ns);qa=r(Vr,"\uC785\uB825 \uC55E\uC5D0 \uD504\uB86C\uD504\uD2B8\uB97C \uBD99\uC5EC T5\uAC00 \uC694\uC57D \uC791\uC5C5\uC784\uC744 \uC778\uC2DD\uD560 \uC218 \uC788\uB3C4\uB85D \uD569\uB2C8\uB2E4. \uC5EC\uB7EC NLP \uC791\uC5C5\uC744 \uC218\uD589\uD560 \uC218 \uC788\uB294 \uC77C\uBD80 \uBAA8\uB378\uC740 \uD2B9\uC815 \uC791\uC5C5\uC5D0 \uB300\uD55C \uD504\uB86C\uD504\uD2B8\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."),Vr.forEach(s),Sa=$(Qt),zt=l(Qt,"LI",{});var pa=n(zt);Ta=r(pa,"\uB808\uC774\uBE14\uC744 \uD1A0\uD070\uD654\uD560 \uB54C "),is=l(pa,"CODE",{});var Yr=n(is);Aa=r(Yr,"text_target"),Yr.forEach(s),za=r(pa," \uC778\uC218\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4."),pa.forEach(s),xa=$(Qt),Xt=l(Qt,"LI",{});var jr=n(Xt);ps=l(jr,"CODE",{});var Jr=n(ps);Pa=r(Jr,"max_length"),Jr.forEach(s),Ca=r(jr," \uB9E4\uAC1C\uBCC0\uC218\uB85C \uC124\uC815\uB41C \uCD5C\uB300 \uAE38\uC774\uB97C \uB118\uC9C0 \uC54A\uB3C4\uB85D \uAE34 \uC2DC\uD000\uC2A4\uB97C \uC798\uB77C\uB0C5\uB2C8\uB2E4."),jr.forEach(s),Qt.forEach(s),Ms=$(e),E(xt.$$.fragment,e),Fs=$(e),Ve=l(e,"P",{});var Et=n(Ve);Da=r(Et,"\uC804\uCCB4 \uB370\uC774\uD130\uC14B\uC5D0 \uC804\uCC98\uB9AC \uD568\uC218\uB97C \uC801\uC6A9\uD558\uB824\uBA74 \u{1F917} Datasets\uC758 "),cs=l(Et,"CODE",{});var Qr=n(cs);Ma=r(Qr,"map"),Qr.forEach(s),Fa=r(Et,` \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.
`),fs=l(Et,"CODE",{});var Zr=n(fs);La=r(Zr,"batched=True"),Zr.forEach(s),Oa=r(Et,"\uB85C \uC124\uC815\uD558\uC5EC \uB370\uC774\uD130\uC14B\uC758 \uC5EC\uB7EC \uC694\uC18C\uB97C \uD55C \uBC88\uC5D0 \uCC98\uB9AC\uD558\uBA74 "),ms=l(Et,"CODE",{});var eo=n(ms);Ia=r(eo,"map"),eo.forEach(s),Ba=r(Et," \uD568\uC218\uC758 \uC18D\uB3C4\uB97C \uB192\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Et.forEach(s),Ls=$(e),E(Pt.$$.fragment,e),Os=$(e),rt=l(e,"P",{});var Zt=n(rt);Na=r(Zt,"\uC774\uC81C "),hs=l(Zt,"CODE",{});var to=n(hs);Ha=r(to,"DataCollatorForSeq2Seq"),to.forEach(s),Ga=r(Zt,`\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC608\uC81C \uBC30\uCE58\uB97C \uB9CC\uB4DC\uC138\uC694.
\uC804\uCCB4 \uB370\uC774\uD130\uC14B\uC744 \uCD5C\uB300 \uAE38\uC774\uB85C \uD328\uB529\uD558\uB294 \uAC83\uBCF4\uB2E4 \uBC30\uCE58\uB9C8\uB2E4 \uAC00\uC7A5 \uAE34 \uBB38\uC7A5 \uAE38\uC774\uC5D0 \uB9DE\uCDB0 `),us=l(Zt,"EM",{});var so=n(us);Ra=r(so,"\uB3D9\uC801 \uD328\uB529"),so.forEach(s),Ua=r(Zt,"\uD558\uB294 \uAC83\uC774 \uB354 \uD6A8\uC728\uC801\uC785\uB2C8\uB2E4."),Zt.forEach(s),Is=$(e),E(dt.$$.fragment,e),Bs=$(e),ft=l(e,"H2",{class:!0});var ca=n(ft);_t=l(ca,"A",{id:!0,class:!0,href:!0});var ao=n(_t);ds=l(ao,"SPAN",{});var ro=n(ds);E(Ct.$$.fragment,ro),ro.forEach(s),ao.forEach(s),Ka=$(ca),_s=l(ca,"SPAN",{});var oo=n(_s);Xa=r(oo,"\uD3C9\uAC00"),oo.forEach(s),ca.forEach(s),Ns=$(e),Ye=l(e,"P",{});var qt=n(Ye);Wa=r(qt,`\uD559\uC2B5 \uC911\uC5D0 \uD3C9\uAC00 \uC9C0\uD45C\uB97C \uD3EC\uD568\uD558\uBA74 \uBAA8\uB378\uC758 \uC131\uB2A5\uC744 \uD3C9\uAC00\uD558\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB418\uB294 \uACBD\uC6B0\uAC00 \uB9CE\uC2B5\uB2C8\uB2E4.
\u{1F917} `),Dt=l(qt,"A",{href:!0,rel:!0});var lo=n(Dt);Va=r(lo,"Evaluate"),lo.forEach(s),Ya=r(qt,` \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uC0AC\uC6A9\uD558\uBA74 \uD3C9\uAC00 \uBC29\uBC95\uC744 \uBE60\uB974\uAC8C \uBD88\uB7EC\uC62C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uC774 \uC791\uC5C5\uC5D0\uC11C\uB294 `),Mt=l(qt,"A",{href:!0,rel:!0});var no=n(Mt);Ja=r(no,"ROUGE"),no.forEach(s),Qa=r(qt,` \uD3C9\uAC00 \uC9C0\uD45C\uB97C \uAC00\uC838\uC635\uB2C8\uB2E4.
(\uD3C9\uAC00 \uC9C0\uD45C\uB97C \uBD88\uB7EC\uC624\uACE0 \uACC4\uC0B0\uD558\uB294 \uBC29\uBC95\uC740 \u{1F917} Evaluate `),Ft=l(qt,"A",{href:!0,rel:!0});var io=n(Ft);Za=r(io,"\uB458\uB7EC\uBCF4\uAE30"),io.forEach(s),er=r(qt,"\uB97C \uCC38\uC870\uD558\uC138\uC694.)"),qt.forEach(s),Hs=$(e),E(Lt.$$.fragment,e),Gs=$(e),$t=l(e,"P",{});var fa=n($t);tr=r(fa,"\uADF8\uB7F0 \uB2E4\uC74C \uC608\uCE21\uAC12\uACFC \uB808\uC774\uBE14\uC744 "),$s=l(fa,"CODE",{});var po=n($s);sr=r(po,"compute"),po.forEach(s),ar=r(fa,"\uC5D0 \uC804\uB2EC\uD558\uC5EC ROUGE \uC9C0\uD45C\uB97C \uACC4\uC0B0\uD558\uB294 \uD568\uC218\uB97C \uB9CC\uB4ED\uB2C8\uB2E4:"),fa.forEach(s),Rs=$(e),E(Ot.$$.fragment,e),Us=$(e),gt=l(e,"P",{});var ma=n(gt);rr=r(ma,"\uC774\uC81C "),gs=l(ma,"CODE",{});var co=n(gs);or=r(co,"compute_metrics"),co.forEach(s),lr=r(ma," \uD568\uC218\uB97C \uC0AC\uC6A9\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC73C\uBA70, \uD559\uC2B5\uC744 \uC124\uC815\uD560 \uB54C \uC774 \uD568\uC218\uB85C \uB418\uB3CC\uC544\uC62C \uAC83\uC785\uB2C8\uB2E4."),ma.forEach(s),Ks=$(e),mt=l(e,"H2",{class:!0});var ha=n(mt);bt=l(ha,"A",{id:!0,class:!0,href:!0});var fo=n(bt);bs=l(fo,"SPAN",{});var mo=n(bs);E(It.$$.fragment,mo),mo.forEach(s),fo.forEach(s),nr=$(ha),vs=l(ha,"SPAN",{});var ho=n(vs);ir=r(ho,"\uD559\uC2B5"),ho.forEach(s),ha.forEach(s),Xs=$(e),E(vt.$$.fragment,e),Ws=$(e),E(kt.$$.fragment,e),Vs=$(e),ht=l(e,"H2",{class:!0});var ua=n(ht);wt=l(ua,"A",{id:!0,class:!0,href:!0});var uo=n(wt);ks=l(uo,"SPAN",{});var _o=n(ks);E(Bt.$$.fragment,_o),_o.forEach(s),uo.forEach(s),pr=$(ua),ws=l(ua,"SPAN",{});var $o=n(ws);cr=r($o,"\uCD94\uB860"),$o.forEach(s),ua.forEach(s),Ys=$(e),Wt=l(e,"P",{});var go=n(Wt);fr=r(go,"\uC88B\uC544\uC694, \uC774\uC81C \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD588\uC73C\uB2C8 \uCD94\uB860\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"),go.forEach(s),Js=$(e),Vt=l(e,"P",{});var bo=n(Vt);mr=r(bo,"\uC694\uC57D\uD560 \uD14D\uC2A4\uD2B8\uB97C \uC791\uC131\uD574\uBCF4\uC138\uC694. T5\uC758 \uACBD\uC6B0 \uC791\uC5C5\uC5D0 \uB530\uB77C \uC785\uB825 \uC55E\uC5D0 \uC811\uB450\uC0AC\uB97C \uBD99\uC5EC\uC57C \uD569\uB2C8\uB2E4. \uC694\uC57D\uC758 \uACBD\uC6B0, \uC544\uB798\uC640 \uAC19\uC740 \uC811\uB450\uC0AC\uB97C \uC785\uB825 \uC55E\uC5D0 \uBD99\uC5EC\uC57C \uD569\uB2C8\uB2E4:"),bo.forEach(s),Qs=$(e),E(Nt.$$.fragment,e),Zs=$(e),ot=l(e,"P",{});var es=n(ot);hr=r(es,"\uCD94\uB860\uC744 \uC704\uD574 \uD30C\uC778\uD29C\uB2DD\uD55C \uBAA8\uB378\uC744 \uC2DC\uD5D8\uD574 \uBCF4\uB294 \uAC00\uC7A5 \uAC04\uB2E8\uD55C \uBC29\uBC95\uC740 "),js=l(es,"CODE",{});var vo=n(js);ur=r(vo,"pipeline()"),vo.forEach(s),dr=r(es,`\uC5D0\uC11C \uC0AC\uC6A9\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4.
\uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC694\uC57D\uC744 \uC218\uD589\uD560 `),ys=l(es,"CODE",{});var ko=n(ys);_r=r(ko,"pipeline()"),ko.forEach(s),$r=r(es,"\uC744 \uC778\uC2A4\uD134\uC2A4\uD654\uD558\uACE0 \uD14D\uC2A4\uD2B8\uB97C \uC804\uB2EC\uD558\uC138\uC694:"),es.forEach(s),ea=$(e),E(Ht.$$.fragment,e),ta=$(e),jt=l(e,"P",{});var da=n(jt);gr=r(da,"\uC6D0\uD55C\uB2E4\uBA74 \uC218\uB3D9\uC73C\uB85C \uB2E4\uC74C\uACFC \uAC19\uC740 \uC791\uC5C5\uC744 \uC218\uD589\uD558\uC5EC "),Es=l(da,"CODE",{});var wo=n(Es);br=r(wo,"pipeline()"),wo.forEach(s),vr=r(da,"\uC758 \uACB0\uACFC\uC640 \uB3D9\uC77C\uD55C \uACB0\uACFC\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),da.forEach(s),sa=$(e),E(yt.$$.fragment,e),this.h()},h(){v(p,"name","hf:doc:metadata"),v(p,"content",JSON.stringify(Xo)),v(b,"id","summarization"),v(b,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(b,"href","#summarization"),v(i,"class","relative group"),v(U,"href","https://huggingface.co/datasets/billsum"),v(U,"rel","nofollow"),v(ue,"href","https://huggingface.co/t5-small"),v(ue,"rel","nofollow"),v(P,"id","load-billsum-dataset"),v(P,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(P,"href","#load-billsum-dataset"),v(g,"class","relative group"),v(ut,"id","preprocess"),v(ut,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(ut,"href","#preprocess"),v(We,"class","relative group"),v(_t,"id","evaluate"),v(_t,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(_t,"href","#evaluate"),v(ft,"class","relative group"),v(Dt,"href","https://huggingface.co/docs/evaluate/index"),v(Dt,"rel","nofollow"),v(Mt,"href","https://huggingface.co/spaces/evaluate-metric/rouge"),v(Mt,"rel","nofollow"),v(Ft,"href","https://huggingface.co/docs/evaluate/a_quick_tour"),v(Ft,"rel","nofollow"),v(bt,"id","train"),v(bt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(bt,"href","#train"),v(mt,"class","relative group"),v(wt,"id","inference"),v(wt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(wt,"href","#inference"),v(ht,"class","relative group")},m(e,u){t(document.head,p),f(e,m,u),f(e,i,u),t(i,b),t(b,k),q(j,k,null),t(i,x),t(i,M),t(M,w),f(e,C,u),q(D,e,u),f(e,H,u),q(G,e,u),f(e,F,u),f(e,O,u),t(O,se),f(e,Q,u),f(e,L,u),t(L,J),t(J,W),t(L,V),t(L,Y),t(Y,B),f(e,R,u),f(e,h,u),t(h,z),f(e,ae,u),f(e,N,u),t(N,I),t(I,re),t(I,U),t(U,Me),t(I,he),t(I,ue),t(ue,Fe),t(I,ke),t(N,de),t(N,ie),t(ie,ge),f(e,Pe,u),q(pe,e,u),f(e,be,u),f(e,ce,u),t(ce,Te),f(e,Z,u),q(ve,e,u),f(e,fe,u),f(e,ne,u),t(ne,Le),f(e,Ae,u),q(ee,e,u),f(e,_e,u),f(e,g,u),t(g,P),t(P,we),q(je,we,null),t(g,oe),t(g,le),t(le,ye),f(e,qe,u),f(e,$e,u),t($e,Ce),f(e,me,u),q(Se,e,u),f(e,De,u),f(e,te,u),t(te,ze),t(ze,Ee),t(te,xe),f(e,He,u),q(c,e,u),f(e,d,u),f(e,Oe,u),t(Oe,Ue),f(e,et,u),q(Ge,e,u),f(e,Je,u),f(e,Ke,u),t(Ke,lt),f(e,Xe,u),f(e,Be,u),t(Be,Ie),t(Ie,Qe),t(Qe,nt),t(Ie,tt),t(Be,it),t(Be,Ne),t(Ne,Re),t(Re,pt),t(Ne,ct),t(Ne,Ze),t(Ze,Rt),t(Ne,Ut),f(e,St,u),f(e,We,u),t(We,ut),t(ut,as),q(Tt,as,null),t(We,ga),t(We,rs),t(rs,ba),f(e,xs,u),f(e,st,u),t(st,va),t(st,os),t(os,ka),t(st,wa),t(st,ls),t(ls,ja),t(st,ya),f(e,Ps,u),q(At,e,u),f(e,Cs,u),f(e,Kt,u),t(Kt,Ea),f(e,Ds,u),f(e,at,u),t(at,ns),t(ns,qa),t(at,Sa),t(at,zt),t(zt,Ta),t(zt,is),t(is,Aa),t(zt,za),t(at,xa),t(at,Xt),t(Xt,ps),t(ps,Pa),t(Xt,Ca),f(e,Ms,u),q(xt,e,u),f(e,Fs,u),f(e,Ve,u),t(Ve,Da),t(Ve,cs),t(cs,Ma),t(Ve,Fa),t(Ve,fs),t(fs,La),t(Ve,Oa),t(Ve,ms),t(ms,Ia),t(Ve,Ba),f(e,Ls,u),q(Pt,e,u),f(e,Os,u),f(e,rt,u),t(rt,Na),t(rt,hs),t(hs,Ha),t(rt,Ga),t(rt,us),t(us,Ra),t(rt,Ua),f(e,Is,u),q(dt,e,u),f(e,Bs,u),f(e,ft,u),t(ft,_t),t(_t,ds),q(Ct,ds,null),t(ft,Ka),t(ft,_s),t(_s,Xa),f(e,Ns,u),f(e,Ye,u),t(Ye,Wa),t(Ye,Dt),t(Dt,Va),t(Ye,Ya),t(Ye,Mt),t(Mt,Ja),t(Ye,Qa),t(Ye,Ft),t(Ft,Za),t(Ye,er),f(e,Hs,u),q(Lt,e,u),f(e,Gs,u),f(e,$t,u),t($t,tr),t($t,$s),t($s,sr),t($t,ar),f(e,Rs,u),q(Ot,e,u),f(e,Us,u),f(e,gt,u),t(gt,rr),t(gt,gs),t(gs,or),t(gt,lr),f(e,Ks,u),f(e,mt,u),t(mt,bt),t(bt,bs),q(It,bs,null),t(mt,nr),t(mt,vs),t(vs,ir),f(e,Xs,u),q(vt,e,u),f(e,Ws,u),q(kt,e,u),f(e,Vs,u),f(e,ht,u),t(ht,wt),t(wt,ks),q(Bt,ks,null),t(ht,pr),t(ht,ws),t(ws,cr),f(e,Ys,u),f(e,Wt,u),t(Wt,fr),f(e,Js,u),f(e,Vt,u),t(Vt,mr),f(e,Qs,u),q(Nt,e,u),f(e,Zs,u),f(e,ot,u),t(ot,hr),t(ot,js),t(js,ur),t(ot,dr),t(ot,ys),t(ys,_r),t(ot,$r),f(e,ea,u),q(Ht,e,u),f(e,ta,u),f(e,jt,u),t(jt,gr),t(jt,Es),t(Es,br),t(jt,vr),f(e,sa,u),q(yt,e,u),aa=!0},p(e,[u]){const Gt={};u&2&&(Gt.$$scope={dirty:u,ctx:e}),pe.$set(Gt);const qs={};u&2&&(qs.$$scope={dirty:u,ctx:e}),dt.$set(qs);const Ss={};u&2&&(Ss.$$scope={dirty:u,ctx:e}),vt.$set(Ss);const Ts={};u&2&&(Ts.$$scope={dirty:u,ctx:e}),kt.$set(Ts);const As={};u&2&&(As.$$scope={dirty:u,ctx:e}),yt.$set(As)},i(e){aa||(S(j.$$.fragment,e),S(D.$$.fragment,e),S(G.$$.fragment,e),S(pe.$$.fragment,e),S(ve.$$.fragment,e),S(ee.$$.fragment,e),S(je.$$.fragment,e),S(Se.$$.fragment,e),S(c.$$.fragment,e),S(Ge.$$.fragment,e),S(Tt.$$.fragment,e),S(At.$$.fragment,e),S(xt.$$.fragment,e),S(Pt.$$.fragment,e),S(dt.$$.fragment,e),S(Ct.$$.fragment,e),S(Lt.$$.fragment,e),S(Ot.$$.fragment,e),S(It.$$.fragment,e),S(vt.$$.fragment,e),S(kt.$$.fragment,e),S(Bt.$$.fragment,e),S(Nt.$$.fragment,e),S(Ht.$$.fragment,e),S(yt.$$.fragment,e),aa=!0)},o(e){T(j.$$.fragment,e),T(D.$$.fragment,e),T(G.$$.fragment,e),T(pe.$$.fragment,e),T(ve.$$.fragment,e),T(ee.$$.fragment,e),T(je.$$.fragment,e),T(Se.$$.fragment,e),T(c.$$.fragment,e),T(Ge.$$.fragment,e),T(Tt.$$.fragment,e),T(At.$$.fragment,e),T(xt.$$.fragment,e),T(Pt.$$.fragment,e),T(dt.$$.fragment,e),T(Ct.$$.fragment,e),T(Lt.$$.fragment,e),T(Ot.$$.fragment,e),T(It.$$.fragment,e),T(vt.$$.fragment,e),T(kt.$$.fragment,e),T(Bt.$$.fragment,e),T(Nt.$$.fragment,e),T(Ht.$$.fragment,e),T(yt.$$.fragment,e),aa=!1},d(e){s(p),e&&s(m),e&&s(i),A(j),e&&s(C),A(D,e),e&&s(H),A(G,e),e&&s(F),e&&s(O),e&&s(Q),e&&s(L),e&&s(R),e&&s(h),e&&s(ae),e&&s(N),e&&s(Pe),A(pe,e),e&&s(be),e&&s(ce),e&&s(Z),A(ve,e),e&&s(fe),e&&s(ne),e&&s(Ae),A(ee,e),e&&s(_e),e&&s(g),A(je),e&&s(qe),e&&s($e),e&&s(me),A(Se,e),e&&s(De),e&&s(te),e&&s(He),A(c,e),e&&s(d),e&&s(Oe),e&&s(et),A(Ge,e),e&&s(Je),e&&s(Ke),e&&s(Xe),e&&s(Be),e&&s(St),e&&s(We),A(Tt),e&&s(xs),e&&s(st),e&&s(Ps),A(At,e),e&&s(Cs),e&&s(Kt),e&&s(Ds),e&&s(at),e&&s(Ms),A(xt,e),e&&s(Fs),e&&s(Ve),e&&s(Ls),A(Pt,e),e&&s(Os),e&&s(rt),e&&s(Is),A(dt,e),e&&s(Bs),e&&s(ft),A(Ct),e&&s(Ns),e&&s(Ye),e&&s(Hs),A(Lt,e),e&&s(Gs),e&&s($t),e&&s(Rs),A(Ot,e),e&&s(Us),e&&s(gt),e&&s(Ks),e&&s(mt),A(It),e&&s(Xs),A(vt,e),e&&s(Ws),A(kt,e),e&&s(Vs),e&&s(ht),A(Bt),e&&s(Ys),e&&s(Wt),e&&s(Js),e&&s(Vt),e&&s(Qs),A(Nt,e),e&&s(Zs),e&&s(ot),e&&s(ea),A(Ht,e),e&&s(ta),e&&s(jt),e&&s(sa),A(yt,e)}}}const Xo={local:"summarization",sections:[{local:"load-billsum-dataset",title:"BillSum \uB370\uC774\uD130\uC14B \uAC00\uC838\uC624\uAE30"},{local:"preprocess",title:"\uC804\uCC98\uB9AC"},{local:"evaluate",title:"\uD3C9\uAC00"},{local:"train",title:"\uD559\uC2B5"},{local:"inference",title:"\uCD94\uB860"}],title:"\uC694\uC57D"};function Wo(K){return So(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class sl extends jo{constructor(p){super();yo(this,p,Wo,Ko,Eo,{})}}export{sl as default,Xo as metadata};
