import{S as qc,i as xc,s as yc,e as n,t as a,k as c,c as p,a as o,h as l,d as s,m as u,b as D,g as r,G as t,w,x as q,y as x,q as j,o as k,B as y,M as Dc,N as Sp,p as xl,v as Pc,n as yl,L as vc}from"../../chunks/vendor-hf-doc-builder.js";import{T as _a}from"../../chunks/Tip-hf-doc-builder.js";import{Y as Op}from"../../chunks/Youtube-hf-doc-builder.js";import{I as Ti}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as L}from"../../chunks/CodeBlock-hf-doc-builder.js";import{C as wc}from"../../chunks/CourseFloatingBanner-hf-doc-builder.js";import{F as Tc}from"../../chunks/FrameworkSwitchCourse-hf-doc-builder.js";function zc(G){let f,b;return f=new wc({props:{chapter:7,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/ja/chapter7/section4_tf.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/ja/chapter7/section4_tf.ipynb"}]}}),{c(){w(f.$$.fragment)},l(d){q(f.$$.fragment,d)},m(d,v){x(f,d,v),b=!0},i(d){b||(j(f.$$.fragment,d),b=!0)},o(d){k(f.$$.fragment,d),b=!1},d(d){y(f,d)}}}function Cc(G){let f,b;return f=new wc({props:{chapter:7,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/ja/chapter7/section4_pt.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/ja/chapter7/section4_pt.ipynb"}]}}),{c(){w(f.$$.fragment)},l(d){q(f.$$.fragment,d)},m(d,v){x(f,d,v),b=!0},i(d){b||(j(f.$$.fragment,d),b=!0)},o(d){k(f.$$.fragment,d),b=!1},d(d){y(f,d)}}}function Sc(G){let f,b,d,v,C;return{c(){f=n("p"),b=a("\u270F\uFE0F "),d=n("strong"),v=a("\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),C=a(" \u30D5\u30E9\u30F3\u30B9\u8A9E\u3067\u3088\u304F\u4F7F\u308F\u308C\u308B\u3082\u30461\u3064\u306E\u82F1\u5358\u8A9E\u306F \u201Cemail \u201C\u3067\u3059\u3002\u5B66\u7FD2\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304B\u3089\u3001\u3053\u306E\u5358\u8A9E\u3092\u4F7F\u3063\u305F\u6700\u521D\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u898B\u3064\u3051\u3066\u304F\u3060\u3055\u3044\u3002\u3069\u306E\u3088\u3046\u306B\u7FFB\u8A33\u3055\u308C\u307E\u3059\u304B\uFF1F\u540C\u3058\u82F1\u6587\u3092\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306F\u3069\u306E\u3088\u3046\u306B\u7FFB\u8A33\u3057\u3066\u3044\u308B\u3067\u3057\u3087\u3046\u304B\uFF1F")},l($){f=p($,"P",{});var P=o(f);b=l(P,"\u270F\uFE0F "),d=p(P,"STRONG",{});var T=o(d);v=l(T,"\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),T.forEach(s),C=l(P," \u30D5\u30E9\u30F3\u30B9\u8A9E\u3067\u3088\u304F\u4F7F\u308F\u308C\u308B\u3082\u30461\u3064\u306E\u82F1\u5358\u8A9E\u306F \u201Cemail \u201C\u3067\u3059\u3002\u5B66\u7FD2\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304B\u3089\u3001\u3053\u306E\u5358\u8A9E\u3092\u4F7F\u3063\u305F\u6700\u521D\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u898B\u3064\u3051\u3066\u304F\u3060\u3055\u3044\u3002\u3069\u306E\u3088\u3046\u306B\u7FFB\u8A33\u3055\u308C\u307E\u3059\u304B\uFF1F\u540C\u3058\u82F1\u6587\u3092\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306F\u3069\u306E\u3088\u3046\u306B\u7FFB\u8A33\u3057\u3066\u3044\u308B\u3067\u3057\u3087\u3046\u304B\uFF1F"),P.forEach(s)},m($,P){r($,f,P),t(f,b),t(f,d),t(d,v),t(f,C)},d($){$&&s(f)}}}function Oc(G){let f,b,d,v,C,$,P,T;return{c(){f=n("p"),b=a("\u{1F4A1} mBART\u3001mBART-50\u3001M2M100 \u306A\u3069\u306E\u591A\u8A00\u8A9E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306E "),d=n("code"),v=a("tokenizer.src_lang"),C=a(" \u3068 "),$=n("code"),P=a("tokenizer.tgt_lang"),T=a(" \u306B\u5165\u529B\u5143\u3068\u306A\u308B\u8A00\u8A9E\u3068\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u306A\u308B\u8A00\u8A9E\u306E\u6B63\u3057\u3044\u8A00\u8A9E\u30B3\u30FC\u30C9\u5024\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002")},l(g){f=p(g,"P",{});var E=o(f);b=l(E,"\u{1F4A1} mBART\u3001mBART-50\u3001M2M100 \u306A\u3069\u306E\u591A\u8A00\u8A9E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306E "),d=p(E,"CODE",{});var F=o(d);v=l(F,"tokenizer.src_lang"),F.forEach(s),C=l(E," \u3068 "),$=p(E,"CODE",{});var z=o($);P=l(z,"tokenizer.tgt_lang"),z.forEach(s),T=l(E," \u306B\u5165\u529B\u5143\u3068\u306A\u308B\u8A00\u8A9E\u3068\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u306A\u308B\u8A00\u8A9E\u306E\u6B63\u3057\u3044\u8A00\u8A9E\u30B3\u30FC\u30C9\u5024\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),E.forEach(s)},m(g,E){r(g,f,E),t(f,b),t(f,d),t(d,v),t(f,C),t(f,$),t($,P),t(f,T)},d(g){g&&s(f)}}}function Ac(G){let f,b,d,v,C,$,P,T;return{c(){f=n("p"),b=a("\u{1F4A1} T5\u30E2\u30C7\u30EB\uFF08\u5177\u4F53\u7684\u306B\u306F "),d=n("code"),v=a("t5-xxx"),C=a(" \u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u306E1\u3064\uFF09\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u5834\u5408\u3001\u30E2\u30C7\u30EB\u306F\u30C6\u30AD\u30B9\u30C8\u5165\u529B\u306B\u30BF\u30B9\u30AF\u3092\u793A\u3059\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3001\u4F8B\u3048\u3070 "),$=n("code"),P=a("translate: English to French:"),T=a(" \u306E\u3088\u3046\u306A\u3001\u30BF\u30B9\u30AF\u3092\u793A\u3059\u63A5\u982D\u8F9E\u3092\u6301\u3064\u30C6\u30AD\u30B9\u30C8\u5165\u529B\u3067\u3042\u308B\u3053\u3068\u3092\u671F\u5F85\u3057\u307E\u3059\u3002")},l(g){f=p(g,"P",{});var E=o(f);b=l(E,"\u{1F4A1} T5\u30E2\u30C7\u30EB\uFF08\u5177\u4F53\u7684\u306B\u306F "),d=p(E,"CODE",{});var F=o(d);v=l(F,"t5-xxx"),F.forEach(s),C=l(E," \u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u306E1\u3064\uFF09\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u5834\u5408\u3001\u30E2\u30C7\u30EB\u306F\u30C6\u30AD\u30B9\u30C8\u5165\u529B\u306B\u30BF\u30B9\u30AF\u3092\u793A\u3059\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3001\u4F8B\u3048\u3070 "),$=p(E,"CODE",{});var z=o($);P=l(z,"translate: English to French:"),z.forEach(s),T=l(E," \u306E\u3088\u3046\u306A\u3001\u30BF\u30B9\u30AF\u3092\u793A\u3059\u63A5\u982D\u8F9E\u3092\u6301\u3064\u30C6\u30AD\u30B9\u30C8\u5165\u529B\u3067\u3042\u308B\u3053\u3068\u3092\u671F\u5F85\u3057\u307E\u3059\u3002"),E.forEach(s)},m(g,E){r(g,f,E),t(f,b),t(f,d),t(d,v),t(f,C),t(f,$),t($,P),t(f,T)},d(g){g&&s(f)}}}function Lc(G){let f,b,d,v,C,$,P,T;return{c(){f=n("p"),b=a("\u26A0\uFE0F\u79C1\u9054\u306F\u30BF\u30FC\u30B2\u30C3\u30C8\u6587\u306E\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u306F\u30E2\u30C7\u30EB\u304C\u671F\u5F85\u3057\u3066\u3044\u306A\u3044\u306E\u3067\u3001\u6CE8\u610F\u3092\u6255\u3063\u3066\u3044\u307E\u305B\u3093\u3002\u305D\u306E\u4EE3\u308F\u308A\u3001\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u5FDC\u3059\u308B\u30E9\u30D9\u30EB\u306B"),d=n("code"),v=a("-100"),C=a("\u306B\u8A2D\u5B9A\u3057\u3001\u640D\u5931\u8A08\u7B97\u3067\u7121\u8996\u3055\u308C\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002\u79C1\u9054\u306F\u52D5\u7684\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3059\u308B\u306E\u3067\u3053\u306E\u51E6\u7406\u306F\u5F8C\u3067\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u304C\u884C\u3044\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u3053\u3053\u3067\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3059\u308B\u5834\u5408\u306F\u3001\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u5FDC\u3059\u308B\u5168\u3066\u306E\u30E9\u30D9\u30EB\u3092"),$=n("code"),P=a("-100"),T=a("\u306B\u8A2D\u5B9A\u3059\u308B\u3088\u3046\u306B\u524D\u51E6\u7406\u95A2\u6570\u3092\u9069\u5FDC\u3055\u305B\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002")},l(g){f=p(g,"P",{});var E=o(f);b=l(E,"\u26A0\uFE0F\u79C1\u9054\u306F\u30BF\u30FC\u30B2\u30C3\u30C8\u6587\u306E\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u306F\u30E2\u30C7\u30EB\u304C\u671F\u5F85\u3057\u3066\u3044\u306A\u3044\u306E\u3067\u3001\u6CE8\u610F\u3092\u6255\u3063\u3066\u3044\u307E\u305B\u3093\u3002\u305D\u306E\u4EE3\u308F\u308A\u3001\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u5FDC\u3059\u308B\u30E9\u30D9\u30EB\u306B"),d=p(E,"CODE",{});var F=o(d);v=l(F,"-100"),F.forEach(s),C=l(E,"\u306B\u8A2D\u5B9A\u3057\u3001\u640D\u5931\u8A08\u7B97\u3067\u7121\u8996\u3055\u308C\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002\u79C1\u9054\u306F\u52D5\u7684\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3059\u308B\u306E\u3067\u3053\u306E\u51E6\u7406\u306F\u5F8C\u3067\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u304C\u884C\u3044\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u3053\u3053\u3067\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3059\u308B\u5834\u5408\u306F\u3001\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u5FDC\u3059\u308B\u5168\u3066\u306E\u30E9\u30D9\u30EB\u3092"),$=p(E,"CODE",{});var z=o($);P=l(z,"-100"),z.forEach(s),T=l(E,"\u306B\u8A2D\u5B9A\u3059\u308B\u3088\u3046\u306B\u524D\u51E6\u7406\u95A2\u6570\u3092\u9069\u5FDC\u3055\u305B\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),E.forEach(s)},m(g,E){r(g,f,E),t(f,b),t(f,d),t(d,v),t(f,C),t(f,$),t($,P),t(f,T)},d(g){g&&s(f)}}}function Fc(G){let f,b,d,v,C,$,P,T,g,E,F,z,A,N,S,M,X,H;return v=new Ti({}),S=new L({props:{code:`from transformers import TFAutoModelForSeq2SeqLM

model = TFAutoModelForSeq2SeqLM.from_pretrained(model_checkpoint, from_pt=True)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSeq2SeqLM

model = TFAutoModelForSeq2SeqLM.from_pretrained(model_checkpoint, from_pt=<span class="hljs-literal">True</span>)`}}),X=new _a({props:{warning:!1,$$slots:{default:[Mc]},$$scope:{ctx:G}}}),{c(){f=n("h2"),b=n("a"),d=n("span"),w(v.$$.fragment),C=c(),$=n("span"),P=a("Keras\u3092\u4F7F\u3063\u305F\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574"),T=c(),g=n("p"),E=a("\u307E\u305A\u6700\u521D\u306B\u3001\u5FAE\u8ABF\u6574\u3092\u884C\u3046\u305F\u3081\u306E\u5B9F\u969B\u306E\u30E2\u30C7\u30EB\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u3053\u3067\u306F\u3001\u901A\u5E38\u306E "),F=n("code"),z=a("AutoModel"),A=a(" API \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),N=c(),w(S.$$.fragment),M=c(),w(X.$$.fragment),this.h()},l(U){f=p(U,"H2",{class:!0});var W=o(f);b=p(W,"A",{id:!0,class:!0,href:!0});var Q=o(b);d=p(Q,"SPAN",{});var J=o(d);q(v.$$.fragment,J),J.forEach(s),Q.forEach(s),C=u(W),$=p(W,"SPAN",{});var re=o($);P=l(re,"Keras\u3092\u4F7F\u3063\u305F\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574"),re.forEach(s),W.forEach(s),T=u(U),g=p(U,"P",{});var ne=o(g);E=l(ne,"\u307E\u305A\u6700\u521D\u306B\u3001\u5FAE\u8ABF\u6574\u3092\u884C\u3046\u305F\u3081\u306E\u5B9F\u969B\u306E\u30E2\u30C7\u30EB\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u3053\u3067\u306F\u3001\u901A\u5E38\u306E "),F=p(ne,"CODE",{});var Y=o(F);z=l(Y,"AutoModel"),Y.forEach(s),A=l(ne," API \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),ne.forEach(s),N=u(U),q(S.$$.fragment,U),M=u(U),q(X.$$.fragment,U),this.h()},h(){D(b,"id","keras"),D(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"),D(b,"href","#keras"),D(f,"class","relative group")},m(U,W){r(U,f,W),t(f,b),t(b,d),x(v,d,null),t(f,C),t(f,$),t($,P),r(U,T,W),r(U,g,W),t(g,E),t(g,F),t(F,z),t(g,A),r(U,N,W),x(S,U,W),r(U,M,W),x(X,U,W),H=!0},i(U){H||(j(v.$$.fragment,U),j(S.$$.fragment,U),j(X.$$.fragment,U),H=!0)},o(U){k(v.$$.fragment,U),k(S.$$.fragment,U),k(X.$$.fragment,U),H=!1},d(U){U&&s(f),y(v),U&&s(T),U&&s(g),U&&s(N),y(S,U),U&&s(M),y(X,U)}}}function Uc(G){let f,b,d,v,C,$,P,T,g,E,F,z,A,N,S,M,X,H,U,W,Q,J,re,ne,Y,ue,V,se,ee,pe,ie,le;return v=new Ti({}),ie=new L({props:{code:`from transformers import AutoModelForSeq2SeqLM

model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM

model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)`}}),{c(){f=n("h2"),b=n("a"),d=n("span"),w(v.$$.fragment),C=c(),$=n("span"),P=a("Trainer API \u3092\u7528\u3044\u3066\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3059\u308B"),T=c(),g=n("p"),E=a("\u5B9F\u969B\u306B "),F=n("code"),z=a("Trainer"),A=a(` \u3092\u4F7F\u7528\u3059\u308B\u30B3\u30FC\u30C9\u306F\u3001\u3053\u308C\u307E\u3067\u3068\u540C\u3058\u3067\u3059\u304C\u30011\u3064\u3060\u3051\u5C11\u3057\u5909\u66F4\u70B9\u304C\u3042\u308A\u307E\u3059\u3002
\u3053\u3053\u3067\u306F `),N=n("a"),S=n("code"),M=a("Seq2SeqTrainer"),X=a(` \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
\u3053\u308C\u306F `),H=n("code"),U=a("Trainer"),W=a(" \u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3067\u3042\u308A\u3001\u8A55\u4FA1\u3092\u9069\u5207\u306B\u51E6\u7406\u3059\u308B\u305F\u3081\u3067\u3001"),Q=n("code"),J=a("generate()"),re=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u5165\u529B\u304B\u3089\u51FA\u529B\u3092\u4E88\u6E2C\u3057\u307E\u3059\u3002\u8A73\u7D30\u306F\u3001\u6307\u6A19\u8A08\u7B97\u306E\u8A71\u3092\u3059\u308B\u3068\u304D\u306B\u8A73\u3057\u304F\u6398\u308A\u4E0B\u3052\u307E\u3059\u3002"),ne=c(),Y=n("p"),ue=a("\u307E\u305A\u6700\u521D\u306B\u3001\u5FAE\u8ABF\u6574\u3092\u884C\u3046\u305F\u3081\u306E\u5B9F\u969B\u306E\u30E2\u30C7\u30EB\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u3053\u3067\u306F\u3001\u901A\u5E38\u306E "),V=n("code"),se=a("AutoModel"),ee=a(" API \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),pe=c(),w(ie.$$.fragment),this.h()},l(R){f=p(R,"H2",{class:!0});var B=o(f);b=p(B,"A",{id:!0,class:!0,href:!0});var _e=o(b);d=p(_e,"SPAN",{});var fe=o(d);q(v.$$.fragment,fe),fe.forEach(s),_e.forEach(s),C=u(B),$=p(B,"SPAN",{});var oe=o($);P=l(oe,"Trainer API \u3092\u7528\u3044\u3066\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3059\u308B"),oe.forEach(s),B.forEach(s),T=u(R),g=p(R,"P",{});var te=o(g);E=l(te,"\u5B9F\u969B\u306B "),F=p(te,"CODE",{});var $e=o(F);z=l($e,"Trainer"),$e.forEach(s),A=l(te,` \u3092\u4F7F\u7528\u3059\u308B\u30B3\u30FC\u30C9\u306F\u3001\u3053\u308C\u307E\u3067\u3068\u540C\u3058\u3067\u3059\u304C\u30011\u3064\u3060\u3051\u5C11\u3057\u5909\u66F4\u70B9\u304C\u3042\u308A\u307E\u3059\u3002
\u3053\u3053\u3067\u306F `),N=p(te,"A",{href:!0,rel:!0});var be=o(N);S=p(be,"CODE",{});var es=o(S);M=l(es,"Seq2SeqTrainer"),es.forEach(s),be.forEach(s),X=l(te,` \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
\u3053\u308C\u306F `),H=p(te,"CODE",{});var Ae=o(H);U=l(Ae,"Trainer"),Ae.forEach(s),W=l(te," \u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3067\u3042\u308A\u3001\u8A55\u4FA1\u3092\u9069\u5207\u306B\u51E6\u7406\u3059\u308B\u305F\u3081\u3067\u3001"),Q=p(te,"CODE",{});var Le=o(Q);J=l(Le,"generate()"),Le.forEach(s),re=l(te," \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u5165\u529B\u304B\u3089\u51FA\u529B\u3092\u4E88\u6E2C\u3057\u307E\u3059\u3002\u8A73\u7D30\u306F\u3001\u6307\u6A19\u8A08\u7B97\u306E\u8A71\u3092\u3059\u308B\u3068\u304D\u306B\u8A73\u3057\u304F\u6398\u308A\u4E0B\u3052\u307E\u3059\u3002"),te.forEach(s),ne=u(R),Y=p(R,"P",{});var ae=o(Y);ue=l(ae,"\u307E\u305A\u6700\u521D\u306B\u3001\u5FAE\u8ABF\u6574\u3092\u884C\u3046\u305F\u3081\u306E\u5B9F\u969B\u306E\u30E2\u30C7\u30EB\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u3053\u3067\u306F\u3001\u901A\u5E38\u306E "),V=p(ae,"CODE",{});var Ne=o(V);se=l(Ne,"AutoModel"),Ne.forEach(s),ee=l(ae," API \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),ae.forEach(s),pe=u(R),q(ie.$$.fragment,R),this.h()},h(){D(b,"id","trainer-api"),D(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"),D(b,"href","#trainer-api"),D(f,"class","relative group"),D(N,"href","https://huggingface.co/transformers/main_classes/trainer.html#seq2seqtrainer"),D(N,"rel","nofollow")},m(R,B){r(R,f,B),t(f,b),t(b,d),x(v,d,null),t(f,C),t(f,$),t($,P),r(R,T,B),r(R,g,B),t(g,E),t(g,F),t(F,z),t(g,A),t(g,N),t(N,S),t(S,M),t(g,X),t(g,H),t(H,U),t(g,W),t(g,Q),t(Q,J),t(g,re),r(R,ne,B),r(R,Y,B),t(Y,ue),t(Y,V),t(V,se),t(Y,ee),r(R,pe,B),x(ie,R,B),le=!0},i(R){le||(j(v.$$.fragment,R),j(ie.$$.fragment,R),le=!0)},o(R){k(v.$$.fragment,R),k(ie.$$.fragment,R),le=!1},d(R){R&&s(f),y(v),R&&s(T),R&&s(g),R&&s(ne),R&&s(Y),R&&s(pe),y(ie,R)}}}function Mc(G){let f,b,d,v,C,$,P,T,g,E,F,z,A,N,S,M;return{c(){f=n("p"),b=a("\u{1F4A1} "),d=n("code"),v=a("Helsinki-NLP/opus-mt-en-fr"),C=a(`\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u306B\u306FPyTorch\u7528\u306E\u91CD\u307F\u3057\u304B\u3042\u308A\u307E\u305B\u3093\u3002
`),$=n("code"),P=a("from_pretrained()"),T=a(" \u30E1\u30BD\u30C3\u30C9\u3067 "),g=n("code"),E=a("from_pt=True"),F=a(" \u3068\u3044\u3046\u5F15\u6570\u3092\u6307\u5B9A\u305B\u305A\u306B\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3057\u3088\u3046\u3068\u3059\u308B\u3068\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3059\u3002"),z=c(),A=n("p"),N=n("code"),S=a("from_pt=True"),M=a(` \u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u30E9\u30A4\u30D6\u30E9\u30EA\u306FPyTorch \u306E\u91CD\u307F\u3092\u81EA\u52D5\u7684\u306B\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3001\u5909\u63DB\u3057\u307E\u3059\u3002
\u3053\u306E\u3088\u3046\u306B\u3001\u{1F917} Transformers\u3067\u306F\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u306E\u5207\u308A\u66FF\u3048\u304C\u975E\u5E38\u306B\u7C21\u5358\u3067\u3059\uFF01`)},l(X){f=p(X,"P",{});var H=o(f);b=l(H,"\u{1F4A1} "),d=p(H,"CODE",{});var U=o(d);v=l(U,"Helsinki-NLP/opus-mt-en-fr"),U.forEach(s),C=l(H,`\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u306B\u306FPyTorch\u7528\u306E\u91CD\u307F\u3057\u304B\u3042\u308A\u307E\u305B\u3093\u3002
`),$=p(H,"CODE",{});var W=o($);P=l(W,"from_pretrained()"),W.forEach(s),T=l(H," \u30E1\u30BD\u30C3\u30C9\u3067 "),g=p(H,"CODE",{});var Q=o(g);E=l(Q,"from_pt=True"),Q.forEach(s),F=l(H," \u3068\u3044\u3046\u5F15\u6570\u3092\u6307\u5B9A\u305B\u305A\u306B\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3057\u3088\u3046\u3068\u3059\u308B\u3068\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3059\u3002"),H.forEach(s),z=u(X),A=p(X,"P",{});var J=o(A);N=p(J,"CODE",{});var re=o(N);S=l(re,"from_pt=True"),re.forEach(s),M=l(J,` \u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u30E9\u30A4\u30D6\u30E9\u30EA\u306FPyTorch \u306E\u91CD\u307F\u3092\u81EA\u52D5\u7684\u306B\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3001\u5909\u63DB\u3057\u307E\u3059\u3002
\u3053\u306E\u3088\u3046\u306B\u3001\u{1F917} Transformers\u3067\u306F\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u306E\u5207\u308A\u66FF\u3048\u304C\u975E\u5E38\u306B\u7C21\u5358\u3067\u3059\uFF01`),J.forEach(s)},m(X,H){r(X,f,H),t(f,b),t(f,d),t(d,v),t(f,C),t(f,$),t($,P),t(f,T),t(f,g),t(g,E),t(f,F),r(X,z,H),r(X,A,H),t(A,N),t(N,S),t(A,M)},d(X){X&&s(f),X&&s(z),X&&s(A)}}}function Ic(G){let f,b;return f=new L({props:{code:`from transformers import DataCollatorForSeq2Seq

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

data_collator = DataCollatorForSeq2Seq(tokenizer, model=model, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)`}}),{c(){w(f.$$.fragment)},l(d){q(f.$$.fragment,d)},m(d,v){x(f,d,v),b=!0},i(d){b||(j(f.$$.fragment,d),b=!0)},o(d){k(f.$$.fragment,d),b=!1},d(d){y(f,d)}}}function Hc(G){let f,b;return f=new L({props:{code:`from transformers import DataCollatorForSeq2Seq

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

data_collator = DataCollatorForSeq2Seq(tokenizer, model=model)`}}),{c(){w(f.$$.fragment)},l(d){q(f.$$.fragment,d)},m(d,v){x(f,d,v),b=!0},i(d){b||(j(f.$$.fragment,d),b=!0)},o(d){k(f.$$.fragment,d),b=!1},d(d){y(f,d)}}}function Nc(G){let f,b,d,v,C,$,P,T,g,E,F;return E=new L({props:{code:`tf_train_dataset = tokenized_datasets["train"].to_tf_dataset(
    columns=["input_ids", "attention_mask", "labels"],
    collate_fn=data_collator,
    shuffle=True,
    batch_size=32,
)
tf_eval_dataset = tokenized_datasets["validation"].to_tf_dataset(
    columns=["input_ids", "attention_mask", "labels"],
    collate_fn=data_collator,
    shuffle=False,
    batch_size=16,
)`,highlighted:`tf_train_dataset = tokenized_datasets[<span class="hljs-string">&quot;train&quot;</span>].to_tf_dataset(
    columns=[<span class="hljs-string">&quot;input_ids&quot;</span>, <span class="hljs-string">&quot;attention_mask&quot;</span>, <span class="hljs-string">&quot;labels&quot;</span>],
    collate_fn=data_collator,
    shuffle=<span class="hljs-literal">True</span>,
    batch_size=<span class="hljs-number">32</span>,
)
tf_eval_dataset = tokenized_datasets[<span class="hljs-string">&quot;validation&quot;</span>].to_tf_dataset(
    columns=[<span class="hljs-string">&quot;input_ids&quot;</span>, <span class="hljs-string">&quot;attention_mask&quot;</span>, <span class="hljs-string">&quot;labels&quot;</span>],
    collate_fn=data_collator,
    shuffle=<span class="hljs-literal">False</span>,
    batch_size=<span class="hljs-number">16</span>,
)`}}),{c(){f=n("p"),b=a("\u3053\u306E "),d=n("code"),v=a("data_collator"),C=a(" \u3092\u4F7F\u3063\u3066\u3001\u5404\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092 "),$=n("code"),P=a("tf.data.Dataset"),T=a(" \u306B\u5909\u63DB\u3057\u3001\u5B66\u7FD2\u3067\u304D\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),g=c(),w(E.$$.fragment)},l(z){f=p(z,"P",{});var A=o(f);b=l(A,"\u3053\u306E "),d=p(A,"CODE",{});var N=o(d);v=l(N,"data_collator"),N.forEach(s),C=l(A," \u3092\u4F7F\u3063\u3066\u3001\u5404\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092 "),$=p(A,"CODE",{});var S=o($);P=l(S,"tf.data.Dataset"),S.forEach(s),T=l(A," \u306B\u5909\u63DB\u3057\u3001\u5B66\u7FD2\u3067\u304D\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),A.forEach(s),g=u(z),q(E.$$.fragment,z)},m(z,A){r(z,f,A),t(f,b),t(f,d),t(d,v),t(f,C),t(f,$),t($,P),t(f,T),r(z,g,A),x(E,z,A),F=!0},i(z){F||(j(E.$$.fragment,z),F=!0)},o(z){k(E.$$.fragment,z),F=!1},d(z){z&&s(f),z&&s(g),y(E,z)}}}function Bc(G){let f,b,d,v,C,$,P,T;return{c(){f=n("p"),b=a("\u3053\u306E "),d=n("code"),v=a("data_collator"),C=a(" \u3092 "),$=n("code"),P=a("Seq2SeqTrainer"),T=a(" \u306B\u6E21\u3057\u307E\u3059\u3002\u6B21\u306B\u3001\u6307\u6A19\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002")},l(g){f=p(g,"P",{});var E=o(f);b=l(E,"\u3053\u306E "),d=p(E,"CODE",{});var F=o(d);v=l(F,"data_collator"),F.forEach(s),C=l(E," \u3092 "),$=p(E,"CODE",{});var z=o($);P=l(z,"Seq2SeqTrainer"),z.forEach(s),T=l(E," \u306B\u6E21\u3057\u307E\u3059\u3002\u6B21\u306B\u3001\u6307\u6A19\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),E.forEach(s)},m(g,E){r(g,f,E),t(f,b),t(f,d),t(d,v),t(f,C),t(f,$),t($,P),t(f,T)},i:vc,o:vc,d(g){g&&s(f)}}}function gc(G){let f,b,d,v,C,$,P,T,g,E,F,z,A,N,S,M,X,H,U,W,Q,J,re,ne,Y,ue,V;return{c(){f=n("p"),b=n("code"),d=a("Seq2SeqTrainer"),v=a(" \u304C\u30B9\u30FC\u30D1\u30FC\u30AF\u30E9\u30B9 "),C=n("code"),$=a("Trainer"),P=a(" \u306B\u8FFD\u52A0\u3057\u305F\u6A5F\u80FD\u306F\u3001\u8A55\u4FA1\u3084\u4E88\u6E2C\u306E\u969B\u306B "),T=n("code"),g=a("generate()"),E=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u5B66\u7FD2\u6642\u306B\u306F\u3001\u30E2\u30C7\u30EB\u306F "),F=n("code"),z=a("decoder_input_ids"),A=a(" \u3092\u4F7F\u7528\u3057\u3001\u4E88\u6E2C\u3057\u3088\u3046\u3068\u3059\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u5F8C\u308D\u306E\u30C8\u30FC\u30AF\u30F3\u3092\u4F7F\u7528\u3057\u306A\u3044\u3088\u3046\u306B\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u3092\u3057\u3066\u3001\u5B66\u7FD2\u3092\u9AD8\u901F\u5316\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u63A8\u8AD6\u5B9F\u884C\u6642\u306B\u306F\u540C\u69D8\u306B\u3053\u308C\u3089\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u306E\u3067\u3001\u540C\u3058\u8A2D\u5B9A\u3067\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u306E\u306F\u826F\u3044\u30A2\u30A4\u30C7\u30A2\u3067\u3059\u3002"),N=c(),S=n("p"),M=n("a"),X=a("\u7B2C1\u7AE0"),H=a(" \u3067\u898B\u305F\u3088\u3046\u306B\u3001\u30C7\u30B3\u30FC\u30C0\u306F\u30C8\u30FC\u30AF\u30F3\u30921\u3064\u305A\u3064\u4E88\u6E2C\u3057\u3066\u63A8\u8AD6\u3092\u884C\u3044\u307E\u3059\u3002\u{1F917} Transformers\u3067\u306F "),U=n("code"),W=a("generate()"),Q=a(" \u30E1\u30BD\u30C3\u30C9\u304C\u88CF\u3067\u52D5\u3044\u3066\u3044\u307E\u3059\u3002"),J=n("code"),re=a("Seq2SeqTrainer"),ne=a(" \u3067\u306F\u3001 "),Y=n("code"),ue=a("predict_with_generate=True"),V=a(" \u3092\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3053\u306E\u624B\u6CD5\u3092\u4F7F\u3063\u3066\u8A55\u4FA1\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),this.h()},l(se){f=p(se,"P",{});var ee=o(f);b=p(ee,"CODE",{});var pe=o(b);d=l(pe,"Seq2SeqTrainer"),pe.forEach(s),v=l(ee," \u304C\u30B9\u30FC\u30D1\u30FC\u30AF\u30E9\u30B9 "),C=p(ee,"CODE",{});var ie=o(C);$=l(ie,"Trainer"),ie.forEach(s),P=l(ee," \u306B\u8FFD\u52A0\u3057\u305F\u6A5F\u80FD\u306F\u3001\u8A55\u4FA1\u3084\u4E88\u6E2C\u306E\u969B\u306B "),T=p(ee,"CODE",{});var le=o(T);g=l(le,"generate()"),le.forEach(s),E=l(ee," \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u5B66\u7FD2\u6642\u306B\u306F\u3001\u30E2\u30C7\u30EB\u306F "),F=p(ee,"CODE",{});var R=o(F);z=l(R,"decoder_input_ids"),R.forEach(s),A=l(ee," \u3092\u4F7F\u7528\u3057\u3001\u4E88\u6E2C\u3057\u3088\u3046\u3068\u3059\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u5F8C\u308D\u306E\u30C8\u30FC\u30AF\u30F3\u3092\u4F7F\u7528\u3057\u306A\u3044\u3088\u3046\u306B\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u3092\u3057\u3066\u3001\u5B66\u7FD2\u3092\u9AD8\u901F\u5316\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u63A8\u8AD6\u5B9F\u884C\u6642\u306B\u306F\u540C\u69D8\u306B\u3053\u308C\u3089\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u306E\u3067\u3001\u540C\u3058\u8A2D\u5B9A\u3067\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u306E\u306F\u826F\u3044\u30A2\u30A4\u30C7\u30A2\u3067\u3059\u3002"),ee.forEach(s),N=u(se),S=p(se,"P",{});var B=o(S);M=p(B,"A",{href:!0});var _e=o(M);X=l(_e,"\u7B2C1\u7AE0"),_e.forEach(s),H=l(B," \u3067\u898B\u305F\u3088\u3046\u306B\u3001\u30C7\u30B3\u30FC\u30C0\u306F\u30C8\u30FC\u30AF\u30F3\u30921\u3064\u305A\u3064\u4E88\u6E2C\u3057\u3066\u63A8\u8AD6\u3092\u884C\u3044\u307E\u3059\u3002\u{1F917} Transformers\u3067\u306F "),U=p(B,"CODE",{});var fe=o(U);W=l(fe,"generate()"),fe.forEach(s),Q=l(B," \u30E1\u30BD\u30C3\u30C9\u304C\u88CF\u3067\u52D5\u3044\u3066\u3044\u307E\u3059\u3002"),J=p(B,"CODE",{});var oe=o(J);re=l(oe,"Seq2SeqTrainer"),oe.forEach(s),ne=l(B," \u3067\u306F\u3001 "),Y=p(B,"CODE",{});var te=o(Y);ue=l(te,"predict_with_generate=True"),te.forEach(s),V=l(B," \u3092\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3053\u306E\u624B\u6CD5\u3092\u4F7F\u3063\u3066\u8A55\u4FA1\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),B.forEach(s),this.h()},h(){D(M,"href","/course/ja/chapter1/6")},m(se,ee){r(se,f,ee),t(f,b),t(b,d),t(f,v),t(f,C),t(C,$),t(f,P),t(f,T),t(T,g),t(f,E),t(f,F),t(F,z),t(f,A),r(se,N,ee),r(se,S,ee),t(S,M),t(M,X),t(S,H),t(S,U),t(U,W),t(S,Q),t(S,J),t(J,re),t(S,ne),t(S,Y),t(Y,ue),t(S,V)},d(se){se&&s(f),se&&s(N),se&&s(S)}}}function Rc(G){let f,b,d,v,C,$,P,T,g,E,F;return E=new L({props:{code:`import numpy as np


def compute_metrics(eval_preds):
    preds, labels = eval_preds
    # In case the model returns more than the prediction logits
    if isinstance(preds, tuple):
        preds = preds[0]

    decoded_preds = tokenizer.batch_decode(preds, skip_special_tokens=True)

    # Replace -100s in the labels as we can't decode them
    labels = np.where(labels != -100, labels, tokenizer.pad_token_id)
    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)

    # Some simple post-processing
    decoded_preds = [pred.strip() for pred in decoded_preds]
    decoded_labels = [[label.strip()] for label in decoded_labels]

    result = metric.compute(predictions=decoded_preds, references=decoded_labels)
    return {"bleu": result["score"]}`,highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np


<span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_metrics</span>(<span class="hljs-params">eval_preds</span>):
    preds, labels = eval_preds
    <span class="hljs-comment"># In case the model returns more than the prediction logits</span>
    <span class="hljs-keyword">if</span> <span class="hljs-built_in">isinstance</span>(preds, <span class="hljs-built_in">tuple</span>):
        preds = preds[<span class="hljs-number">0</span>]

    decoded_preds = tokenizer.batch_decode(preds, skip_special_tokens=<span class="hljs-literal">True</span>)

    <span class="hljs-comment"># Replace -100s in the labels as we can&#x27;t decode them</span>
    labels = np.where(labels != -<span class="hljs-number">100</span>, labels, tokenizer.pad_token_id)
    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=<span class="hljs-literal">True</span>)

    <span class="hljs-comment"># Some simple post-processing</span>
    decoded_preds = [pred.strip() <span class="hljs-keyword">for</span> pred <span class="hljs-keyword">in</span> decoded_preds]
    decoded_labels = [[label.strip()] <span class="hljs-keyword">for</span> label <span class="hljs-keyword">in</span> decoded_labels]

    result = metric.compute(predictions=decoded_preds, references=decoded_labels)
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;bleu&quot;</span>: result[<span class="hljs-string">&quot;score&quot;</span>]}`}}),{c(){f=n("p"),b=a("\u30E2\u30C7\u30EB\u306E\u51FA\u529B\u3092\u6307\u6A19\u304C\u4F7F\u7528\u3067\u304D\u308B\u30C6\u30AD\u30B9\u30C8\u306B\u5909\u63DB\u3059\u308B\u305F\u3081\u306B\u3001 "),d=n("code"),v=a("tokenizer.batch_decode()"),C=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002\u30E9\u30D9\u30EB\u306B\u542B\u307E\u308C\u308B\u3059\u3079\u3066\u306E "),$=n("code"),P=a("-100"),T=a(" \u3092\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\uFF08\u30C8\u30FC\u30AF\u30F3\u30CA\u30A4\u30B6\u30FC\u306F\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u3057\u3066\u81EA\u52D5\u7684\u306B\u540C\u3058\u3053\u3068\u3092\u884C\u3044\u307E\u3059\uFF09"),g=c(),w(E.$$.fragment)},l(z){f=p(z,"P",{});var A=o(f);b=l(A,"\u30E2\u30C7\u30EB\u306E\u51FA\u529B\u3092\u6307\u6A19\u304C\u4F7F\u7528\u3067\u304D\u308B\u30C6\u30AD\u30B9\u30C8\u306B\u5909\u63DB\u3059\u308B\u305F\u3081\u306B\u3001 "),d=p(A,"CODE",{});var N=o(d);v=l(N,"tokenizer.batch_decode()"),N.forEach(s),C=l(A," \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002\u30E9\u30D9\u30EB\u306B\u542B\u307E\u308C\u308B\u3059\u3079\u3066\u306E "),$=p(A,"CODE",{});var S=o($);P=l(S,"-100"),S.forEach(s),T=l(A," \u3092\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\uFF08\u30C8\u30FC\u30AF\u30F3\u30CA\u30A4\u30B6\u30FC\u306F\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u3057\u3066\u81EA\u52D5\u7684\u306B\u540C\u3058\u3053\u3068\u3092\u884C\u3044\u307E\u3059\uFF09"),A.forEach(s),g=u(z),q(E.$$.fragment,z)},m(z,A){r(z,f,A),t(f,b),t(f,d),t(d,v),t(f,C),t(f,$),t($,P),t(f,T),r(z,g,A),x(E,z,A),F=!0},i(z){F||(j(E.$$.fragment,z),F=!0)},o(z){k(E.$$.fragment,z),F=!1},d(z){z&&s(f),z&&s(g),y(E,z)}}}function Kc(G){let f,b,d,v,C,$,P,T,g,E,F,z,A,N;return A=new L({props:{code:`import numpy as np


def compute_metrics():
    all_preds = []
    all_labels = []
    sampled_dataset = tokenized_datasets["validation"].shuffle().select(range(200))
    tf_generate_dataset = sampled_dataset.to_tf_dataset(
        columns=["input_ids", "attention_mask", "labels"],
        collate_fn=data_collator,
        shuffle=False,
        batch_size=4,
    )
    for batch in tf_generate_dataset:
        predictions = model.generate(
            input_ids=batch["input_ids"], attention_mask=batch["attention_mask"]
        )
        decoded_preds = tokenizer.batch_decode(predictions, skip_special_tokens=True)
        labels = batch["labels"].numpy()
        labels = np.where(labels != -100, labels, tokenizer.pad_token_id)
        decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)
        decoded_preds = [pred.strip() for pred in decoded_preds]
        decoded_labels = [[label.strip()] for label in decoded_labels]
        all_preds.extend(decoded_preds)
        all_labels.extend(decoded_labels)

    result = metric.compute(predictions=all_preds, references=all_labels)
    return {"bleu": result["score"]}`,highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np


<span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_metrics</span>():
    all_preds = []
    all_labels = []
    sampled_dataset = tokenized_datasets[<span class="hljs-string">&quot;validation&quot;</span>].shuffle().select(<span class="hljs-built_in">range</span>(<span class="hljs-number">200</span>))
    tf_generate_dataset = sampled_dataset.to_tf_dataset(
        columns=[<span class="hljs-string">&quot;input_ids&quot;</span>, <span class="hljs-string">&quot;attention_mask&quot;</span>, <span class="hljs-string">&quot;labels&quot;</span>],
        collate_fn=data_collator,
        shuffle=<span class="hljs-literal">False</span>,
        batch_size=<span class="hljs-number">4</span>,
    )
    <span class="hljs-keyword">for</span> batch <span class="hljs-keyword">in</span> tf_generate_dataset:
        predictions = model.generate(
            input_ids=batch[<span class="hljs-string">&quot;input_ids&quot;</span>], attention_mask=batch[<span class="hljs-string">&quot;attention_mask&quot;</span>]
        )
        decoded_preds = tokenizer.batch_decode(predictions, skip_special_tokens=<span class="hljs-literal">True</span>)
        labels = batch[<span class="hljs-string">&quot;labels&quot;</span>].numpy()
        labels = np.where(labels != -<span class="hljs-number">100</span>, labels, tokenizer.pad_token_id)
        decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=<span class="hljs-literal">True</span>)
        decoded_preds = [pred.strip() <span class="hljs-keyword">for</span> pred <span class="hljs-keyword">in</span> decoded_preds]
        decoded_labels = [[label.strip()] <span class="hljs-keyword">for</span> label <span class="hljs-keyword">in</span> decoded_labels]
        all_preds.extend(decoded_preds)
        all_labels.extend(decoded_labels)

    result = metric.compute(predictions=all_preds, references=all_labels)
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;bleu&quot;</span>: result[<span class="hljs-string">&quot;score&quot;</span>]}`}}),{c(){f=n("p"),b=a("\u30E2\u30C7\u30EB\u306E\u51FA\u529B\u3092\u6307\u6A19\u304C\u4F7F\u7528\u3067\u304D\u308B\u30C6\u30AD\u30B9\u30C8\u306B\u5909\u63DB\u3059\u308B\u305F\u3081\u306B\u3001 "),d=n("code"),v=a("tokenizer.batch_decode()"),C=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u30E9\u30D9\u30EB\u306B\u542B\u307E\u308C\u308B "),$=n("code"),P=a("-100"),T=a(" \u3092\u3059\u3079\u3066\u524A\u9664\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306F\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u3057\u3066\u3082\u81EA\u52D5\u7684\u306B\u540C\u3058\u51E6\u7406\u3092\u884C\u3044\u307E\u3059\u3002"),g=c(),E=n("p"),F=a("\u30E2\u30C7\u30EB\u3068\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u53D7\u3051\u53D6\u308A\u3001\u305D\u308C\u306B\u5BFE\u3057\u3066\u6307\u6A19\u3092\u8A08\u7B97\u3059\u308B\u95A2\u6570\u3092\u5B9A\u7FA9\u3057\u307E\u3057\u3087\u3046\u3002\u9577\u3044\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u751F\u6210\u306B\u306F\u6642\u9593\u304C\u304B\u304B\u308B\u306E\u3067\u3001\u691C\u8A3C\u30BB\u30C3\u30C8\u3092\u30B5\u30D6\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u3057\u3066\u3001\u6642\u9593\u304C\u304B\u304B\u3089\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),z=c(),w(A.$$.fragment)},l(S){f=p(S,"P",{});var M=o(f);b=l(M,"\u30E2\u30C7\u30EB\u306E\u51FA\u529B\u3092\u6307\u6A19\u304C\u4F7F\u7528\u3067\u304D\u308B\u30C6\u30AD\u30B9\u30C8\u306B\u5909\u63DB\u3059\u308B\u305F\u3081\u306B\u3001 "),d=p(M,"CODE",{});var X=o(d);v=l(X,"tokenizer.batch_decode()"),X.forEach(s),C=l(M," \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u30E9\u30D9\u30EB\u306B\u542B\u307E\u308C\u308B "),$=p(M,"CODE",{});var H=o($);P=l(H,"-100"),H.forEach(s),T=l(M," \u3092\u3059\u3079\u3066\u524A\u9664\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306F\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u3057\u3066\u3082\u81EA\u52D5\u7684\u306B\u540C\u3058\u51E6\u7406\u3092\u884C\u3044\u307E\u3059\u3002"),M.forEach(s),g=u(S),E=p(S,"P",{});var U=o(E);F=l(U,"\u30E2\u30C7\u30EB\u3068\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u53D7\u3051\u53D6\u308A\u3001\u305D\u308C\u306B\u5BFE\u3057\u3066\u6307\u6A19\u3092\u8A08\u7B97\u3059\u308B\u95A2\u6570\u3092\u5B9A\u7FA9\u3057\u307E\u3057\u3087\u3046\u3002\u9577\u3044\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u751F\u6210\u306B\u306F\u6642\u9593\u304C\u304B\u304B\u308B\u306E\u3067\u3001\u691C\u8A3C\u30BB\u30C3\u30C8\u3092\u30B5\u30D6\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u3057\u3066\u3001\u6642\u9593\u304C\u304B\u304B\u3089\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),U.forEach(s),z=u(S),q(A.$$.fragment,S)},m(S,M){r(S,f,M),t(f,b),t(f,d),t(d,v),t(f,C),t(f,$),t($,P),t(f,T),r(S,g,M),r(S,E,M),t(E,F),r(S,z,M),x(A,S,M),N=!0},i(S){N||(j(A.$$.fragment,S),N=!0)},o(S){k(A.$$.fragment,S),N=!1},d(S){S&&s(f),S&&s(g),S&&s(E),S&&s(z),y(A,S)}}}function Gc(G){let f,b,d,v,C,$,P,T,g,E,F,z,A,N,S,M,X,H,U,W,Q,J,re,ne,Y,ue,V,se,ee,pe,ie,le,R,B,_e,fe,oe,te,$e,be,es,Ae,Le,ae,Ne,je,ss,ke,Fe,Ee,us,Be,we,Ue,ve,qe,Re,Ke,Pe,Ge,Xe,Z,js,Te,h,K,We,ks,de,ms,ts,me,_s,he,vs,Ye,Me,ge,ps,ds,ce,as,ze,et,os,Ss,gs,Os,is,it,Bs,xe,fs,Ze,Ie,Es,ws,Rs,ft,qs,He,st,cs,xs,Ks,ye,hs,ls,$s,tt,Se,ct,at;return A=new L({props:{code:`from transformers import Seq2SeqTrainingArguments

args = Seq2SeqTrainingArguments(
    f"marian-finetuned-kde4-en-to-fr",
    evaluation_strategy="no",
    save_strategy="epoch",
    learning_rate=2e-5,
    per_device_train_batch_size=32,
    per_device_eval_batch_size=64,
    weight_decay=0.01,
    save_total_limit=3,
    num_train_epochs=3,
    predict_with_generate=True,
    fp16=True,
    push_to_hub=True,
)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Seq2SeqTrainingArguments

args = Seq2SeqTrainingArguments(
    <span class="hljs-string">f&quot;marian-finetuned-kde4-en-to-fr&quot;</span>,
    evaluation_strategy=<span class="hljs-string">&quot;no&quot;</span>,
    save_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
    learning_rate=<span class="hljs-number">2e-5</span>,
    per_device_train_batch_size=<span class="hljs-number">32</span>,
    per_device_eval_batch_size=<span class="hljs-number">64</span>,
    weight_decay=<span class="hljs-number">0.01</span>,
    save_total_limit=<span class="hljs-number">3</span>,
    num_train_epochs=<span class="hljs-number">3</span>,
    predict_with_generate=<span class="hljs-literal">True</span>,
    fp16=<span class="hljs-literal">True</span>,
    push_to_hub=<span class="hljs-literal">True</span>,
)`}}),Ue=new _a({props:{$$slots:{default:[Wc]},$$scope:{ctx:G}}}),Z=new L({props:{code:`from transformers import Seq2SeqTrainer

trainer = Seq2SeqTrainer(
    model,
    args,
    train_dataset=tokenized_datasets["train"],
    eval_dataset=tokenized_datasets["validation"],
    data_collator=data_collator,
    tokenizer=tokenizer,
    compute_metrics=compute_metrics,
)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Seq2SeqTrainer

trainer = Seq2SeqTrainer(
    model,
    args,
    train_dataset=tokenized_datasets[<span class="hljs-string">&quot;train&quot;</span>],
    eval_dataset=tokenized_datasets[<span class="hljs-string">&quot;validation&quot;</span>],
    data_collator=data_collator,
    tokenizer=tokenizer,
    compute_metrics=compute_metrics,
)`}}),We=new L({props:{code:"trainer.evaluate(max_length=max_target_length)",highlighted:"trainer.evaluate(max_length=max_target_length)"}}),de=new L({props:{code:`{'eval_loss': 1.6964408159255981,
 'eval_bleu': 39.26865061007616,
 'eval_runtime': 965.8884,
 'eval_samples_per_second': 21.76,
 'eval_steps_per_second': 0.341}`,highlighted:`{<span class="hljs-string">&#x27;eval_loss&#x27;</span>: <span class="hljs-number">1.6964408159255981</span>,
 <span class="hljs-string">&#x27;eval_bleu&#x27;</span>: <span class="hljs-number">39.26865061007616</span>,
 <span class="hljs-string">&#x27;eval_runtime&#x27;</span>: <span class="hljs-number">965.8884</span>,
 <span class="hljs-string">&#x27;eval_samples_per_second&#x27;</span>: <span class="hljs-number">21.76</span>,
 <span class="hljs-string">&#x27;eval_steps_per_second&#x27;</span>: <span class="hljs-number">0.341</span>}`}}),Me=new L({props:{code:"trainer.train()",highlighted:"trainer.train()"}}),os=new L({props:{code:"trainer.evaluate(max_length=max_target_length)",highlighted:"trainer.evaluate(max_length=max_target_length)"}}),gs=new L({props:{code:`{'eval_loss': 0.8558505773544312,
 'eval_bleu': 52.94161337775576,
 'eval_runtime': 714.2576,
 'eval_samples_per_second': 29.426,
 'eval_steps_per_second': 0.461,
 'epoch': 3.0}`,highlighted:`{<span class="hljs-string">&#x27;eval_loss&#x27;</span>: <span class="hljs-number">0.8558505773544312</span>,
 <span class="hljs-string">&#x27;eval_bleu&#x27;</span>: <span class="hljs-number">52.94161337775576</span>,
 <span class="hljs-string">&#x27;eval_runtime&#x27;</span>: <span class="hljs-number">714.2576</span>,
 <span class="hljs-string">&#x27;eval_samples_per_second&#x27;</span>: <span class="hljs-number">29.426</span>,
 <span class="hljs-string">&#x27;eval_steps_per_second&#x27;</span>: <span class="hljs-number">0.461</span>,
 <span class="hljs-string">&#x27;epoch&#x27;</span>: <span class="hljs-number">3.0</span>}`}}),He=new L({props:{code:'trainer.push_to_hub(tags="translation", commit_message="Training complete")',highlighted:'trainer.push_to_hub(tags=<span class="hljs-string">&quot;translation&quot;</span>, commit_message=<span class="hljs-string">&quot;Training complete&quot;</span>)'}}),ye=new L({props:{code:"'https://huggingface.co/sgugger/marian-finetuned-kde4-en-to-fr/commit/3601d621e3baae2bc63d3311452535f8f58f6ef3'",highlighted:'<span class="hljs-string">&#x27;https://huggingface.co/sgugger/marian-finetuned-kde4-en-to-fr/commit/3601d621e3baae2bc63d3311452535f8f58f6ef3&#x27;</span>'}}),{c(){f=n("p"),b=a("\u3053\u308C\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001"),d=n("code"),v=a("Seq2SeqTrainingArguments"),C=a(" \u3092\u5B9A\u7FA9\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),$=n("code"),P=a("Trainer"),T=a(" \u3068\u540C\u69D8\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u542B\u3080 "),g=n("code"),E=a("TrainingArguments"),F=a(" \u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),z=c(),w(A.$$.fragment),N=c(),S=n("p"),M=a("\u901A\u5E38\u306E\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\uFF08\u5B66\u7FD2\u7387\u3001\u30A8\u30DD\u30C3\u30AF\u6570\u3001\u30D0\u30C3\u30C1\u30B5\u30A4\u30BA\u3001\u91CD\u307F\u6E1B\u8870\u306A\u3069\uFF09\u3068\u306F\u5225\u306B\u3001\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u898B\u305F\u3082\u306E\u3068\u6BD4\u8F03\u3057\u3066\u3001\u3044\u304F\u3064\u304B\u306E\u5909\u66F4\u70B9\u304C\u3042\u308A\u307E\u3059\u3002"),X=c(),H=n("ul"),U=n("li"),W=a("\u8A55\u4FA1\u306B\u306F\u6642\u9593\u304C\u304B\u304B\u308B\u306E\u3067\u3001\u5B9A\u671F\u7684\u306A\u8A55\u4FA1\u306F\u8A2D\u5B9A\u3057\u307E\u305B\u3093\u3002\u5B66\u7FD2\u524D\u3068\u5B66\u7FD2\u5F8C\u306B\u4E00\u5EA6\u3060\u3051\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3057\u307E\u3059\u3002"),Q=c(),J=n("li"),re=a("fp16=True` \u3092\u8A2D\u5B9A\u3057\u3001\u6700\u65B0\u306E GPU \u3092\u4F7F\u3063\u3066\u3044\u308B\u969B\u306B\u5B66\u7FD2\u3092\u9AD8\u901F\u5316\u3057\u307E\u3057\u305F\u3002"),ne=c(),Y=n("li"),ue=a("\u524D\u8FF0\u3057\u305F\u3088\u3046\u306B predict_with_generate=True` \u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002"),V=c(),se=n("li"),ee=a("\u5404\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u6642\u306B\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u305F\u3081\u306B\u3001"),pe=n("code"),ie=a("push_to_hub=True"),le=a("\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),R=c(),B=n("p"),_e=a("\u306A\u304A\u3001 "),fe=n("code"),oe=a("hub_model_id"),te=a(" \u5F15\u6570\u306B\u306F\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30D5\u30EB\u30CD\u30FC\u30E0\u3092\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002(\u7279\u306B\u3001\u7D44\u7E54\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u306F\u3001\u3053\u306E\u5F15\u6570\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059)\u3002\u4F8B\u3048\u3070\u3001\u30E2\u30C7\u30EB\u3092 "),$e=n("a"),be=n("code"),es=a("huggingface-course"),Ae=a(" organization`"),Le=a(" \u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u3001"),ae=n("code"),Ne=a("Seq2SeqTrainingArguments"),je=a(" \u306B "),ss=n("code"),ke=a('hub_model_id="huggingface-course/marian-finetuned-kde4-en-to-fr"'),Fe=a(` \u3092\u8FFD\u52A0\u3057\u3066\u3044\u307E\u3059\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u4F7F\u7528\u3059\u308B\u30EA\u30DD\u30B8\u30C8\u30EA\u306F\u3042\u306A\u305F\u306E\u540D\u524D\u7A7A\u9593\u5185\u306B\u3042\u308A\u3001\u8A2D\u5B9A\u3057\u305F\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u3061\u306A\u3093\u3060\u540D\u524D\u306B\u306A\u308A\u307E\u3059\u3002
\u3053\u306E\u4F8B\u3067\u306F `),Ee=n("code"),us=a('"sgugger/marian-finetuned-kde4-en-to-fr"'),Be=a(" \u3068\u306A\u308A\u307E\u3059\u3002(\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u5192\u982D\u3067\u30EA\u30F3\u30AF\u3057\u305F\u30E2\u30C7\u30EB\u3067\u3059)"),we=c(),w(Ue.$$.fragment),ve=c(),qe=n("p"),Re=a("\u6700\u5F8C\u306B\u3001\u3059\u3079\u3066\u3092 "),Ke=n("code"),Pe=a("Seq2SeqTrainer"),Ge=a(" \u306B\u6E21\u3059\u3060\u3051\u3067\u3059\u3002"),Xe=c(),w(Z.$$.fragment),js=c(),Te=n("p"),h=a("\u5B66\u7FD2\u3059\u308B\u524D\u306B\u3001\u307E\u305A\u30E2\u30C7\u30EB\u304C\u7372\u5F97\u3059\u308B\u30B9\u30B3\u30A2\u3092\u78BA\u8A8D\u3057\u3001\u5FAE\u8ABF\u6574\u306B\u3088\u3063\u3066\u4E8B\u614B\u3092\u60AA\u5316\u3055\u305B\u3066\u3044\u306A\u3044\u304B\u518D\u78BA\u8A8D\u3057\u307E\u3059\u3002\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u306F\u5C11\u3057\u6642\u9593\u304C\u304B\u304B\u308B\u306E\u3067\u3001\u5B9F\u884C\u4E2D\u306B\u30B3\u30FC\u30D2\u30FC\u3092\u98F2\u3080\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u3002"),K=c(),w(We.$$.fragment),ks=c(),w(de.$$.fragment),ms=c(),ts=n("p"),me=a("BLEU\u30B9\u30B3\u30A2\u304C39\u3068\u3044\u3046\u306E\u306F\u60AA\u304F\u306A\u3044\u7D50\u679C\u3067\u3001\u3053\u306E\u30E2\u30C7\u30EB\u304C\u3059\u3067\u306B\u82F1\u8A9E\u306E\u6587\u7AE0\u3092\u30D5\u30E9\u30F3\u30B9\u8A9E\u306B\u7FFB\u8A33\u3059\u308B\u306E\u304C\u5F97\u610F\u3067\u3042\u308B\u3053\u3068\u3092\u53CD\u6620\u3057\u3066\u3044\u307E\u3059\u3002"),_s=c(),he=n("p"),vs=a("\u6B21\u306B\u5B66\u7FD2\u3067\u3059\u304C\u3001\u3053\u308C\u306B\u3082\u5C11\u3057\u6642\u9593\u304C\u304B\u304B\u308A\u307E\u3059\u3002"),Ye=c(),w(Me.$$.fragment),ge=c(),ps=n("p"),ds=a("\u5B66\u7FD2\u304C\u884C\u308F\u308C\u3066\u3044\u308B\u9593\u3001\u30E2\u30C7\u30EB\u304C\u4FDD\u5B58\u3055\u308C\u308B\u305F\u3073\u306B\uFF08\u3053\u3053\u3067\u306F\u30A8\u30DD\u30C3\u30AF\u3054\u3068\u306B\uFF09\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067Hub\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3055\u308C\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u306E\u3088\u3046\u306B\u3057\u3066\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u5225\u306E\u30DE\u30B7\u30F3\u3067\u5B66\u7FD2\u3092\u518D\u958B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),ce=c(),as=n("p"),ze=a("\u5B66\u7FD2\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001\u518D\u3073\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3057\u307E\u3059\u3002BLEU\u30B9\u30B3\u30A2\u306B\u6539\u5584\u304C\u898B\u3089\u308C\u308B\u3053\u3068\u3092\u671F\u5F85\u3057\u307E\u3057\u3087\u3046\u3002"),et=c(),w(os.$$.fragment),Ss=c(),w(gs.$$.fragment),Os=c(),is=n("p"),it=a("\u307B\u307C14\u30DD\u30A4\u30F3\u30C8\u306E\u6539\u5584\u3067\u3059\u3002\u7D20\u6674\u3089\u3057\u3044\u3053\u3068\u3067\u3059\u3002"),Bs=c(),xe=n("p"),fs=a("\u6700\u5F8C\u306B\u3001"),Ze=n("code"),Ie=a("push_to_hub()"),Es=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u3063\u3066\u3001\u6700\u65B0\u7248\u306E\u30E2\u30C7\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002\u307E\u305F\u3001"),ws=n("code"),Rs=a("Trainer"),ft=a("\u306F\u3059\u3079\u3066\u306E\u8A55\u4FA1\u7D50\u679C\u3092\u542B\u3080\u30E2\u30C7\u30EB\u30AB\u30FC\u30C9\u3092\u8D77\u8349\u3057\u3001\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\u3053\u306E\u30E2\u30C7\u30EB\u30AB\u30FC\u30C9\u306B\u306F\u3001\u30E2\u30C7\u30EB\u30CF\u30D6\u304C\u63A8\u8AD6\u30C7\u30E2\u7528\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u9078\u3076\u306E\u306B\u5F79\u7ACB\u3064\u30E1\u30BF\u30C7\u30FC\u30BF\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u901A\u5E38\u306F\u30E2\u30C7\u30EB\u30AF\u30E9\u30B9\u304B\u3089\u6B63\u3057\u3044\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u63A8\u8AD6\u3067\u304D\u308B\u306E\u3067\u4F55\u3082\u8A00\u3046\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001\u4ECA\u56DE\u306F\u540C\u3058\u30E2\u30C7\u30EB\u30AF\u30E9\u30B9\u304C\u3042\u3089\u3086\u308B\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u554F\u984C\u306B\u4F7F\u3048\u308B\u306E\u3067\u3001\u7FFB\u8A33\u30E2\u30C7\u30EB\u3067\u3042\u308B\u3053\u3068\u3092\u6307\u5B9A\u3057\u3066\u3044\u307E\u3059\u3002"),qs=c(),w(He.$$.fragment),st=c(),cs=n("p"),xs=a("\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u306F\u3001\u4ECA\u884C\u3063\u305F\u30B3\u30DF\u30C3\u30C8\u306E URL \u3092\u8FD4\u3059\u306E\u3067\u3001\u305D\u308C\u3092\u691C\u67FB\u3057\u305F\u3044\u5834\u5408\u306F\u3001\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),Ks=c(),w(ye.$$.fragment),hs=c(),ls=n("p"),$s=a("\u3053\u306E\u6BB5\u968E\u3067\u3001\u30E2\u30C7\u30EB\u30CF\u30D6\u4E0A\u306E\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u4F7F\u3063\u3066\u3001\u30E2\u30C7\u30EB\u3092\u30C6\u30B9\u30C8\u3057\u305F\u308A\u3001\u53CB\u4EBA\u3068\u5171\u6709\u3057\u305F\u308A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u3067\u3001\u7FFB\u8A33\u30BF\u30B9\u30AF\u306E\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002\u304A\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01"),tt=c(),Se=n("p"),ct=a("\u3082\u3046\u5C11\u3057\u6DF1\u304F\u5B66\u7FD2\u30EB\u30FC\u30D7\u3092\u5B66\u3073\u305F\u3044\u5834\u5408\u306B\u3001\u{1F917} Accelerate\u3092\u4F7F\u3063\u3066\u540C\u3058\u3053\u3068\u3092\u3059\u308B\u65B9\u6CD5\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002"),this.h()},l(_){f=p(_,"P",{});var O=o(f);b=l(O,"\u3053\u308C\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001"),d=p(O,"CODE",{});var Zt=o(d);v=l(Zt,"Seq2SeqTrainingArguments"),Zt.forEach(s),C=l(O," \u3092\u5B9A\u7FA9\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),$=p(O,"CODE",{});var Gs=o($);P=l(Gs,"Trainer"),Gs.forEach(s),T=l(O," \u3068\u540C\u69D8\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u542B\u3080 "),g=p(O,"CODE",{});var Xs=o(g);E=l(Xs,"TrainingArguments"),Xs.forEach(s),F=l(O," \u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),O.forEach(s),z=u(_),q(A.$$.fragment,_),N=u(_),S=p(_,"P",{});var zt=o(S);M=l(zt,"\u901A\u5E38\u306E\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\uFF08\u5B66\u7FD2\u7387\u3001\u30A8\u30DD\u30C3\u30AF\u6570\u3001\u30D0\u30C3\u30C1\u30B5\u30A4\u30BA\u3001\u91CD\u307F\u6E1B\u8870\u306A\u3069\uFF09\u3068\u306F\u5225\u306B\u3001\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u898B\u305F\u3082\u306E\u3068\u6BD4\u8F03\u3057\u3066\u3001\u3044\u304F\u3064\u304B\u306E\u5909\u66F4\u70B9\u304C\u3042\u308A\u307E\u3059\u3002"),zt.forEach(s),X=u(_),H=p(_,"UL",{});var Je=o(H);U=p(Je,"LI",{});var As=o(U);W=l(As,"\u8A55\u4FA1\u306B\u306F\u6642\u9593\u304C\u304B\u304B\u308B\u306E\u3067\u3001\u5B9A\u671F\u7684\u306A\u8A55\u4FA1\u306F\u8A2D\u5B9A\u3057\u307E\u305B\u3093\u3002\u5B66\u7FD2\u524D\u3068\u5B66\u7FD2\u5F8C\u306B\u4E00\u5EA6\u3060\u3051\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3057\u307E\u3059\u3002"),As.forEach(s),Q=u(Je),J=p(Je,"LI",{});var ut=o(J);re=l(ut,"fp16=True` \u3092\u8A2D\u5B9A\u3057\u3001\u6700\u65B0\u306E GPU \u3092\u4F7F\u3063\u3066\u3044\u308B\u969B\u306B\u5B66\u7FD2\u3092\u9AD8\u901F\u5316\u3057\u307E\u3057\u305F\u3002"),ut.forEach(s),ne=u(Je),Y=p(Je,"LI",{});var ys=o(Y);ue=l(ys,"\u524D\u8FF0\u3057\u305F\u3088\u3046\u306B predict_with_generate=True` \u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002"),ys.forEach(s),V=u(Je),se=p(Je,"LI",{});var Ce=o(se);ee=l(Ce,"\u5404\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u6642\u306B\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u305F\u3081\u306B\u3001"),pe=p(Ce,"CODE",{});var Ve=o(pe);ie=l(Ve,"push_to_hub=True"),Ve.forEach(s),le=l(Ce,"\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),Ce.forEach(s),Je.forEach(s),R=u(_),B=p(_,"P",{});var De=o(B);_e=l(De,"\u306A\u304A\u3001 "),fe=p(De,"CODE",{});var Ws=o(fe);oe=l(Ws,"hub_model_id"),Ws.forEach(s),te=l(De," \u5F15\u6570\u306B\u306F\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30D5\u30EB\u30CD\u30FC\u30E0\u3092\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002(\u7279\u306B\u3001\u7D44\u7E54\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u306F\u3001\u3053\u306E\u5F15\u6570\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059)\u3002\u4F8B\u3048\u3070\u3001\u30E2\u30C7\u30EB\u3092 "),$e=p(De,"A",{href:!0,rel:!0});var mt=o($e);be=p(mt,"CODE",{});var lt=o(be);es=l(lt,"huggingface-course"),lt.forEach(s),Ae=l(mt," organization`"),mt.forEach(s),Le=l(De," \u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u3001"),ae=p(De,"CODE",{});var rt=o(ae);Ne=l(rt,"Seq2SeqTrainingArguments"),rt.forEach(s),je=l(De," \u306B "),ss=p(De,"CODE",{});var Ct=o(ss);ke=l(Ct,'hub_model_id="huggingface-course/marian-finetuned-kde4-en-to-fr"'),Ct.forEach(s),Fe=l(De,` \u3092\u8FFD\u52A0\u3057\u3066\u3044\u307E\u3059\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u4F7F\u7528\u3059\u308B\u30EA\u30DD\u30B8\u30C8\u30EA\u306F\u3042\u306A\u305F\u306E\u540D\u524D\u7A7A\u9593\u5185\u306B\u3042\u308A\u3001\u8A2D\u5B9A\u3057\u305F\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u3061\u306A\u3093\u3060\u540D\u524D\u306B\u306A\u308A\u307E\u3059\u3002
\u3053\u306E\u4F8B\u3067\u306F `),Ee=p(De,"CODE",{});var nt=o(Ee);us=l(nt,'"sgugger/marian-finetuned-kde4-en-to-fr"'),nt.forEach(s),Be=l(De," \u3068\u306A\u308A\u307E\u3059\u3002(\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u5192\u982D\u3067\u30EA\u30F3\u30AF\u3057\u305F\u30E2\u30C7\u30EB\u3067\u3059)"),De.forEach(s),we=u(_),q(Ue.$$.fragment,_),ve=u(_),qe=p(_,"P",{});var Ls=o(qe);Re=l(Ls,"\u6700\u5F8C\u306B\u3001\u3059\u3079\u3066\u3092 "),Ke=p(Ls,"CODE",{});var St=o(Ke);Pe=l(St,"Seq2SeqTrainer"),St.forEach(s),Ge=l(Ls," \u306B\u6E21\u3059\u3060\u3051\u3067\u3059\u3002"),Ls.forEach(s),Xe=u(_),q(Z.$$.fragment,_),js=u(_),Te=p(_,"P",{});var _t=o(Te);h=l(_t,"\u5B66\u7FD2\u3059\u308B\u524D\u306B\u3001\u307E\u305A\u30E2\u30C7\u30EB\u304C\u7372\u5F97\u3059\u308B\u30B9\u30B3\u30A2\u3092\u78BA\u8A8D\u3057\u3001\u5FAE\u8ABF\u6574\u306B\u3088\u3063\u3066\u4E8B\u614B\u3092\u60AA\u5316\u3055\u305B\u3066\u3044\u306A\u3044\u304B\u518D\u78BA\u8A8D\u3057\u307E\u3059\u3002\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u306F\u5C11\u3057\u6642\u9593\u304C\u304B\u304B\u308B\u306E\u3067\u3001\u5B9F\u884C\u4E2D\u306B\u30B3\u30FC\u30D2\u30FC\u3092\u98F2\u3080\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u3002"),_t.forEach(s),K=u(_),q(We.$$.fragment,_),ks=u(_),q(de.$$.fragment,_),ms=u(_),ts=p(_,"P",{});var Ds=o(ts);me=l(Ds,"BLEU\u30B9\u30B3\u30A2\u304C39\u3068\u3044\u3046\u306E\u306F\u60AA\u304F\u306A\u3044\u7D50\u679C\u3067\u3001\u3053\u306E\u30E2\u30C7\u30EB\u304C\u3059\u3067\u306B\u82F1\u8A9E\u306E\u6587\u7AE0\u3092\u30D5\u30E9\u30F3\u30B9\u8A9E\u306B\u7FFB\u8A33\u3059\u308B\u306E\u304C\u5F97\u610F\u3067\u3042\u308B\u3053\u3068\u3092\u53CD\u6620\u3057\u3066\u3044\u307E\u3059\u3002"),Ds.forEach(s),_s=u(_),he=p(_,"P",{});var Ps=o(he);vs=l(Ps,"\u6B21\u306B\u5B66\u7FD2\u3067\u3059\u304C\u3001\u3053\u308C\u306B\u3082\u5C11\u3057\u6642\u9593\u304C\u304B\u304B\u308A\u307E\u3059\u3002"),Ps.forEach(s),Ye=u(_),q(Me.$$.fragment,_),ge=u(_),ps=p(_,"P",{});var Ts=o(ps);ds=l(Ts,"\u5B66\u7FD2\u304C\u884C\u308F\u308C\u3066\u3044\u308B\u9593\u3001\u30E2\u30C7\u30EB\u304C\u4FDD\u5B58\u3055\u308C\u308B\u305F\u3073\u306B\uFF08\u3053\u3053\u3067\u306F\u30A8\u30DD\u30C3\u30AF\u3054\u3068\u306B\uFF09\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067Hub\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3055\u308C\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u306E\u3088\u3046\u306B\u3057\u3066\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u5225\u306E\u30DE\u30B7\u30F3\u3067\u5B66\u7FD2\u3092\u518D\u958B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Ts.forEach(s),ce=u(_),as=p(_,"P",{});var zs=o(as);ze=l(zs,"\u5B66\u7FD2\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001\u518D\u3073\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3057\u307E\u3059\u3002BLEU\u30B9\u30B3\u30A2\u306B\u6539\u5584\u304C\u898B\u3089\u308C\u308B\u3053\u3068\u3092\u671F\u5F85\u3057\u307E\u3057\u3087\u3046\u3002"),zs.forEach(s),et=u(_),q(os.$$.fragment,_),Ss=u(_),q(gs.$$.fragment,_),Os=u(_),is=p(_,"P",{});var rs=o(is);it=l(rs,"\u307B\u307C14\u30DD\u30A4\u30F3\u30C8\u306E\u6539\u5584\u3067\u3059\u3002\u7D20\u6674\u3089\u3057\u3044\u3053\u3068\u3067\u3059\u3002"),rs.forEach(s),Bs=u(_),xe=p(_,"P",{});var Oe=o(xe);fs=l(Oe,"\u6700\u5F8C\u306B\u3001"),Ze=p(Oe,"CODE",{});var pt=o(Ze);Ie=l(pt,"push_to_hub()"),pt.forEach(s),Es=l(Oe," \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u3063\u3066\u3001\u6700\u65B0\u7248\u306E\u30E2\u30C7\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002\u307E\u305F\u3001"),ws=p(Oe,"CODE",{});var ot=o(ws);Rs=l(ot,"Trainer"),ot.forEach(s),ft=l(Oe,"\u306F\u3059\u3079\u3066\u306E\u8A55\u4FA1\u7D50\u679C\u3092\u542B\u3080\u30E2\u30C7\u30EB\u30AB\u30FC\u30C9\u3092\u8D77\u8349\u3057\u3001\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\u3053\u306E\u30E2\u30C7\u30EB\u30AB\u30FC\u30C9\u306B\u306F\u3001\u30E2\u30C7\u30EB\u30CF\u30D6\u304C\u63A8\u8AD6\u30C7\u30E2\u7528\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u9078\u3076\u306E\u306B\u5F79\u7ACB\u3064\u30E1\u30BF\u30C7\u30FC\u30BF\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u901A\u5E38\u306F\u30E2\u30C7\u30EB\u30AF\u30E9\u30B9\u304B\u3089\u6B63\u3057\u3044\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u63A8\u8AD6\u3067\u304D\u308B\u306E\u3067\u4F55\u3082\u8A00\u3046\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001\u4ECA\u56DE\u306F\u540C\u3058\u30E2\u30C7\u30EB\u30AF\u30E9\u30B9\u304C\u3042\u3089\u3086\u308B\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u554F\u984C\u306B\u4F7F\u3048\u308B\u306E\u3067\u3001\u7FFB\u8A33\u30E2\u30C7\u30EB\u3067\u3042\u308B\u3053\u3068\u3092\u6307\u5B9A\u3057\u3066\u3044\u307E\u3059\u3002"),Oe.forEach(s),qs=u(_),q(He.$$.fragment,_),st=u(_),cs=p(_,"P",{});var Ot=o(cs);xs=l(Ot,"\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u306F\u3001\u4ECA\u884C\u3063\u305F\u30B3\u30DF\u30C3\u30C8\u306E URL \u3092\u8FD4\u3059\u306E\u3067\u3001\u305D\u308C\u3092\u691C\u67FB\u3057\u305F\u3044\u5834\u5408\u306F\u3001\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),Ot.forEach(s),Ks=u(_),q(ye.$$.fragment,_),hs=u(_),ls=p(_,"P",{});var Fs=o(ls);$s=l(Fs,"\u3053\u306E\u6BB5\u968E\u3067\u3001\u30E2\u30C7\u30EB\u30CF\u30D6\u4E0A\u306E\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u4F7F\u3063\u3066\u3001\u30E2\u30C7\u30EB\u3092\u30C6\u30B9\u30C8\u3057\u305F\u308A\u3001\u53CB\u4EBA\u3068\u5171\u6709\u3057\u305F\u308A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u3067\u3001\u7FFB\u8A33\u30BF\u30B9\u30AF\u306E\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002\u304A\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01"),Fs.forEach(s),tt=u(_),Se=p(_,"P",{});var Us=o(Se);ct=l(Us,"\u3082\u3046\u5C11\u3057\u6DF1\u304F\u5B66\u7FD2\u30EB\u30FC\u30D7\u3092\u5B66\u3073\u305F\u3044\u5834\u5408\u306B\u3001\u{1F917} Accelerate\u3092\u4F7F\u3063\u3066\u540C\u3058\u3053\u3068\u3092\u3059\u308B\u65B9\u6CD5\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002"),Us.forEach(s),this.h()},h(){D($e,"href","https://huggingface.co/huggingface-course"),D($e,"rel","nofollow")},m(_,O){r(_,f,O),t(f,b),t(f,d),t(d,v),t(f,C),t(f,$),t($,P),t(f,T),t(f,g),t(g,E),t(f,F),r(_,z,O),x(A,_,O),r(_,N,O),r(_,S,O),t(S,M),r(_,X,O),r(_,H,O),t(H,U),t(U,W),t(H,Q),t(H,J),t(J,re),t(H,ne),t(H,Y),t(Y,ue),t(H,V),t(H,se),t(se,ee),t(se,pe),t(pe,ie),t(se,le),r(_,R,O),r(_,B,O),t(B,_e),t(B,fe),t(fe,oe),t(B,te),t(B,$e),t($e,be),t(be,es),t($e,Ae),t(B,Le),t(B,ae),t(ae,Ne),t(B,je),t(B,ss),t(ss,ke),t(B,Fe),t(B,Ee),t(Ee,us),t(B,Be),r(_,we,O),x(Ue,_,O),r(_,ve,O),r(_,qe,O),t(qe,Re),t(qe,Ke),t(Ke,Pe),t(qe,Ge),r(_,Xe,O),x(Z,_,O),r(_,js,O),r(_,Te,O),t(Te,h),r(_,K,O),x(We,_,O),r(_,ks,O),x(de,_,O),r(_,ms,O),r(_,ts,O),t(ts,me),r(_,_s,O),r(_,he,O),t(he,vs),r(_,Ye,O),x(Me,_,O),r(_,ge,O),r(_,ps,O),t(ps,ds),r(_,ce,O),r(_,as,O),t(as,ze),r(_,et,O),x(os,_,O),r(_,Ss,O),x(gs,_,O),r(_,Os,O),r(_,is,O),t(is,it),r(_,Bs,O),r(_,xe,O),t(xe,fs),t(xe,Ze),t(Ze,Ie),t(xe,Es),t(xe,ws),t(ws,Rs),t(xe,ft),r(_,qs,O),x(He,_,O),r(_,st,O),r(_,cs,O),t(cs,xs),r(_,Ks,O),x(ye,_,O),r(_,hs,O),r(_,ls,O),t(ls,$s),r(_,tt,O),r(_,Se,O),t(Se,ct),at=!0},i(_){at||(j(A.$$.fragment,_),j(Ue.$$.fragment,_),j(Z.$$.fragment,_),j(We.$$.fragment,_),j(de.$$.fragment,_),j(Me.$$.fragment,_),j(os.$$.fragment,_),j(gs.$$.fragment,_),j(He.$$.fragment,_),j(ye.$$.fragment,_),at=!0)},o(_){k(A.$$.fragment,_),k(Ue.$$.fragment,_),k(Z.$$.fragment,_),k(We.$$.fragment,_),k(de.$$.fragment,_),k(Me.$$.fragment,_),k(os.$$.fragment,_),k(gs.$$.fragment,_),k(He.$$.fragment,_),k(ye.$$.fragment,_),at=!1},d(_){_&&s(f),_&&s(z),y(A,_),_&&s(N),_&&s(S),_&&s(X),_&&s(H),_&&s(R),_&&s(B),_&&s(we),y(Ue,_),_&&s(ve),_&&s(qe),_&&s(Xe),y(Z,_),_&&s(js),_&&s(Te),_&&s(K),y(We,_),_&&s(ks),y(de,_),_&&s(ms),_&&s(ts),_&&s(_s),_&&s(he),_&&s(Ye),y(Me,_),_&&s(ge),_&&s(ps),_&&s(ce),_&&s(as),_&&s(et),y(os,_),_&&s(Ss),y(gs,_),_&&s(Os),_&&s(is),_&&s(Bs),_&&s(xe),_&&s(qs),y(He,_),_&&s(st),_&&s(cs),_&&s(Ks),y(ye,_),_&&s(hs),_&&s(ls),_&&s(tt),_&&s(Se)}}}function Xc(G){let f,b,d,v,C,$,P,T,g,E,F,z,A,N,S,M,X,H,U,W,Q,J,re,ne,Y,ue,V,se,ee,pe,ie,le,R,B,_e,fe,oe,te,$e,be,es,Ae,Le,ae,Ne,je,ss,ke,Fe,Ee,us,Be,we,Ue,ve,qe,Re,Ke,Pe,Ge,Xe,Z,js,Te;return v=new L({props:{code:"print(compute_metrics())",highlighted:'<span class="hljs-built_in">print</span>(compute_metrics())'}}),$=new L({props:{code:"{'bleu': 33.26983701454733}",highlighted:'{&#x27;bleu&#x27;: <span class="hljs-number">33.26983701454733</span>}'}}),N=new L({props:{code:`from transformers import create_optimizer
from transformers.keras_callbacks import PushToHubCallback
import tensorflow as tf

# The number of training steps is the number of samples in the dataset, divided by the batch size then multiplied
# by the total number of epochs. Note that the tf_train_dataset here is a batched tf.data.Dataset,
# not the original Hugging Face Dataset, so its len() is already num_samples // batch_size.
num_epochs = 3
num_train_steps = len(tf_train_dataset) * num_epochs

optimizer, schedule = create_optimizer(
    init_lr=5e-5,
    num_warmup_steps=0,
    num_train_steps=num_train_steps,
    weight_decay_rate=0.01,
)
model.compile(optimizer=optimizer)

# Train in mixed-precision float16
tf.keras.mixed_precision.set_global_policy("mixed_float16")`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> create_optimizer
<span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> PushToHubCallback
<span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-comment"># The number of training steps is the number of samples in the dataset, divided by the batch size then multiplied</span>
<span class="hljs-comment"># by the total number of epochs. Note that the tf_train_dataset here is a batched tf.data.Dataset,</span>
<span class="hljs-comment"># not the original Hugging Face Dataset, so its len() is already num_samples // batch_size.</span>
num_epochs = <span class="hljs-number">3</span>
num_train_steps = <span class="hljs-built_in">len</span>(tf_train_dataset) * num_epochs

optimizer, schedule = create_optimizer(
    init_lr=<span class="hljs-number">5e-5</span>,
    num_warmup_steps=<span class="hljs-number">0</span>,
    num_train_steps=num_train_steps,
    weight_decay_rate=<span class="hljs-number">0.01</span>,
)
model.<span class="hljs-built_in">compile</span>(optimizer=optimizer)

<span class="hljs-comment"># Train in mixed-precision float16</span>
tf.keras.mixed_precision.set_global_policy(<span class="hljs-string">&quot;mixed_float16&quot;</span>)`}}),Y=new L({props:{code:`from transformers.keras_callbacks import PushToHubCallback

callback = PushToHubCallback(
    output_dir="marian-finetuned-kde4-en-to-fr", tokenizer=tokenizer
)

model.fit(
    tf_train_dataset,
    validation_data=tf_eval_dataset,
    callbacks=[callback],
    epochs=num_epochs,
)`,highlighted:`<span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> PushToHubCallback

callback = PushToHubCallback(
    output_dir=<span class="hljs-string">&quot;marian-finetuned-kde4-en-to-fr&quot;</span>, tokenizer=tokenizer
)

model.fit(
    tf_train_dataset,
    validation_data=tf_eval_dataset,
    callbacks=[callback],
    epochs=num_epochs,
)`}}),Ee=new _a({props:{$$slots:{default:[Yc]},$$scope:{ctx:G}}}),ve=new L({props:{code:"print(compute_metrics())",highlighted:'<span class="hljs-built_in">print</span>(compute_metrics())'}}),Re=new L({props:{code:"{'bleu': 57.334066271545865}",highlighted:'{&#x27;bleu&#x27;: <span class="hljs-number">57.334066271545865</span>}'}}),{c(){f=n("p"),b=a("\u305D\u306E\u524D\u306B\u3001\u4F55\u3082\u5B66\u7FD2\u3057\u3066\u3044\u306A\u3044\u30E2\u30C7\u30EB\u3067\u3069\u306E\u3088\u3046\u306A\u7D50\u679C\u304C\u5F97\u3089\u308C\u308B\u304B\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),d=c(),w(v.$$.fragment),C=c(),w($.$$.fragment),P=c(),T=n("p"),g=a("\u3053\u308C\u304C\u5B8C\u4E86\u3059\u308B\u3068\u3001\u30E2\u30C7\u30EB\u3092\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u3066\u5B66\u7FD2\u3059\u308B\u305F\u3081\u306B\u5FC5\u8981\u306A\u3082\u306E\u3092\u3059\u3079\u3066\u6E96\u5099\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),E=c(),F=n("p"),z=a("tf.keras.mixed_precision.set_global_policy(\u201Cmixed_float16\u201D)` \u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u308C\u306F\u3001Keras\u306Bfloat16\u3092\u4F7F\u7528\u3057\u3066\u5B66\u7FD2\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u305D\u308C\u3092\u30B5\u30DD\u30FC\u30C8\u3059\u308BGPU\uFF08Nvidia RTX 20xx/V100\u307E\u305F\u306F\u305D\u308C\u4EE5\u964D\uFF09\u3067\u5927\u5E45\u306A\u30B9\u30D4\u30FC\u30C9\u30A2\u30C3\u30D7\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),A=c(),w(N.$$.fragment),S=c(),M=n("p"),X=a("\u6B21\u306B\u3001"),H=n("a"),U=a("\u30BB\u30AF\u30B7\u30E7\u30F32"),W=a("\u3067\u898B\u305F\u3088\u3046\u306B\u3001\u5B66\u7FD2\u4E2D\u306B\u30E2\u30C7\u30EB\u3092Hub\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u305F\u3081\u306E"),Q=n("code"),J=a("PushToHubCallback"),re=a("\u3092\u5B9A\u7FA9\u3057\u3001\u305D\u306E\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\u3068\u3057\u30E2\u30C7\u30EB\u3092\u5358\u7D14\u306B\u30D5\u30A3\u30C8\u3059\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),ne=c(),w(Y.$$.fragment),ue=c(),V=n("p"),se=a("\u306A\u304A\u3001"),ee=n("code"),pe=a("hub_model_id"),ie=a(" \u5F15\u6570\u3067\u30D7\u30C3\u30B7\u30E5\u5148\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u540D\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002(\u7279\u306B\u3001\u7D44\u7E54\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u306F\u3053\u306E\u5F15\u6570\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059)\u3002\u4F8B\u3048\u3070\u3001\u30E2\u30C7\u30EB\u3092 "),le=n("a"),R=n("code"),B=a("huggingface-course"),_e=a(" organization"),fe=a(" \u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u3001"),oe=n("code"),te=a("Seq2SeqTrainingArguments"),$e=a(" \u306B "),be=n("code"),es=a('hub_model_id="huggingface-course/marian-finetuned-kde4-en-to-fr"'),Ae=a(" \u3092\u8FFD\u52A0\u3057\u3066\u3044\u307E\u3059\u3002"),Le=c(),ae=n("p"),Ne=a("\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u4F7F\u7528\u3059\u308B\u30EA\u30DD\u30B8\u30C8\u30EA\u306F\u3042\u306A\u305F\u306E\u540D\u524D\u7A7A\u9593\u5185\u306B\u3042\u308A\u3001\u8A2D\u5B9A\u3057\u305F\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u540D\u524D\u306B\u306A\u308A\u307E\u3059\u3002\u3053\u3053\u3067\u306F "),je=n("code"),ss=a('"sgugger/marian-finetuned-kde4-en-to-fr"'),ke=a(" (\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u521D\u306B\u30EA\u30F3\u30AF\u3057\u305F\u30E2\u30C7\u30EB\u3067\u3059)\u3068\u306A\u308A\u307E\u3059\u3002"),Fe=c(),w(Ee.$$.fragment),us=c(),Be=n("p"),we=a("\u6700\u5F8C\u306B\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u304C\u7D42\u4E86\u3057\u305F\u5F8C\u306E\u6307\u6A19\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Ue=c(),w(ve.$$.fragment),qe=c(),w(Re.$$.fragment),Ke=c(),Pe=n("p"),Ge=a("\u3053\u306E\u6BB5\u968E\u3067\u3001\u30E2\u30C7\u30EB\u30CF\u30D6\u4E0A\u306E\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u4F7F\u3063\u3066\u3001\u30E2\u30C7\u30EB\u3092\u30C6\u30B9\u30C8\u3057\u305F\u308A\u3001\u53CB\u4EBA\u3068\u5171\u6709\u3057\u305F\u308A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u3067\u3001\u7FFB\u8A33\u30BF\u30B9\u30AF\u306E\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u304C\u5B8C\u4E86\u3067\u3059\u3002"),Xe=c(),Z=n("p"),js=a("\u304A\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01"),this.h()},l(h){f=p(h,"P",{});var K=o(f);b=l(K,"\u305D\u306E\u524D\u306B\u3001\u4F55\u3082\u5B66\u7FD2\u3057\u3066\u3044\u306A\u3044\u30E2\u30C7\u30EB\u3067\u3069\u306E\u3088\u3046\u306A\u7D50\u679C\u304C\u5F97\u3089\u308C\u308B\u304B\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),K.forEach(s),d=u(h),q(v.$$.fragment,h),C=u(h),q($.$$.fragment,h),P=u(h),T=p(h,"P",{});var We=o(T);g=l(We,"\u3053\u308C\u304C\u5B8C\u4E86\u3059\u308B\u3068\u3001\u30E2\u30C7\u30EB\u3092\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u3066\u5B66\u7FD2\u3059\u308B\u305F\u3081\u306B\u5FC5\u8981\u306A\u3082\u306E\u3092\u3059\u3079\u3066\u6E96\u5099\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),We.forEach(s),E=u(h),F=p(h,"P",{});var ks=o(F);z=l(ks,"tf.keras.mixed_precision.set_global_policy(\u201Cmixed_float16\u201D)` \u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u308C\u306F\u3001Keras\u306Bfloat16\u3092\u4F7F\u7528\u3057\u3066\u5B66\u7FD2\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u305D\u308C\u3092\u30B5\u30DD\u30FC\u30C8\u3059\u308BGPU\uFF08Nvidia RTX 20xx/V100\u307E\u305F\u306F\u305D\u308C\u4EE5\u964D\uFF09\u3067\u5927\u5E45\u306A\u30B9\u30D4\u30FC\u30C9\u30A2\u30C3\u30D7\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),ks.forEach(s),A=u(h),q(N.$$.fragment,h),S=u(h),M=p(h,"P",{});var de=o(M);X=l(de,"\u6B21\u306B\u3001"),H=p(de,"A",{href:!0});var ms=o(H);U=l(ms,"\u30BB\u30AF\u30B7\u30E7\u30F32"),ms.forEach(s),W=l(de,"\u3067\u898B\u305F\u3088\u3046\u306B\u3001\u5B66\u7FD2\u4E2D\u306B\u30E2\u30C7\u30EB\u3092Hub\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u305F\u3081\u306E"),Q=p(de,"CODE",{});var ts=o(Q);J=l(ts,"PushToHubCallback"),ts.forEach(s),re=l(de,"\u3092\u5B9A\u7FA9\u3057\u3001\u305D\u306E\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\u3068\u3057\u30E2\u30C7\u30EB\u3092\u5358\u7D14\u306B\u30D5\u30A3\u30C8\u3059\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),de.forEach(s),ne=u(h),q(Y.$$.fragment,h),ue=u(h),V=p(h,"P",{});var me=o(V);se=l(me,"\u306A\u304A\u3001"),ee=p(me,"CODE",{});var _s=o(ee);pe=l(_s,"hub_model_id"),_s.forEach(s),ie=l(me," \u5F15\u6570\u3067\u30D7\u30C3\u30B7\u30E5\u5148\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u540D\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002(\u7279\u306B\u3001\u7D44\u7E54\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u306F\u3053\u306E\u5F15\u6570\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059)\u3002\u4F8B\u3048\u3070\u3001\u30E2\u30C7\u30EB\u3092 "),le=p(me,"A",{href:!0,rel:!0});var he=o(le);R=p(he,"CODE",{});var vs=o(R);B=l(vs,"huggingface-course"),vs.forEach(s),_e=l(he," organization"),he.forEach(s),fe=l(me," \u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u3001"),oe=p(me,"CODE",{});var Ye=o(oe);te=l(Ye,"Seq2SeqTrainingArguments"),Ye.forEach(s),$e=l(me," \u306B "),be=p(me,"CODE",{});var Me=o(be);es=l(Me,'hub_model_id="huggingface-course/marian-finetuned-kde4-en-to-fr"'),Me.forEach(s),Ae=l(me," \u3092\u8FFD\u52A0\u3057\u3066\u3044\u307E\u3059\u3002"),me.forEach(s),Le=u(h),ae=p(h,"P",{});var ge=o(ae);Ne=l(ge,"\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u4F7F\u7528\u3059\u308B\u30EA\u30DD\u30B8\u30C8\u30EA\u306F\u3042\u306A\u305F\u306E\u540D\u524D\u7A7A\u9593\u5185\u306B\u3042\u308A\u3001\u8A2D\u5B9A\u3057\u305F\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u540D\u524D\u306B\u306A\u308A\u307E\u3059\u3002\u3053\u3053\u3067\u306F "),je=p(ge,"CODE",{});var ps=o(je);ss=l(ps,'"sgugger/marian-finetuned-kde4-en-to-fr"'),ps.forEach(s),ke=l(ge," (\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u521D\u306B\u30EA\u30F3\u30AF\u3057\u305F\u30E2\u30C7\u30EB\u3067\u3059)\u3068\u306A\u308A\u307E\u3059\u3002"),ge.forEach(s),Fe=u(h),q(Ee.$$.fragment,h),us=u(h),Be=p(h,"P",{});var ds=o(Be);we=l(ds,"\u6700\u5F8C\u306B\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u304C\u7D42\u4E86\u3057\u305F\u5F8C\u306E\u6307\u6A19\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),ds.forEach(s),Ue=u(h),q(ve.$$.fragment,h),qe=u(h),q(Re.$$.fragment,h),Ke=u(h),Pe=p(h,"P",{});var ce=o(Pe);Ge=l(ce,"\u3053\u306E\u6BB5\u968E\u3067\u3001\u30E2\u30C7\u30EB\u30CF\u30D6\u4E0A\u306E\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u4F7F\u3063\u3066\u3001\u30E2\u30C7\u30EB\u3092\u30C6\u30B9\u30C8\u3057\u305F\u308A\u3001\u53CB\u4EBA\u3068\u5171\u6709\u3057\u305F\u308A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u3067\u3001\u7FFB\u8A33\u30BF\u30B9\u30AF\u306E\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u304C\u5B8C\u4E86\u3067\u3059\u3002"),ce.forEach(s),Xe=u(h),Z=p(h,"P",{});var as=o(Z);js=l(as,"\u304A\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01"),as.forEach(s),this.h()},h(){D(H,"href","/course/ja/chapter7/2"),D(le,"href","https://huggingface.co/huggingface-course"),D(le,"rel","nofollow")},m(h,K){r(h,f,K),t(f,b),r(h,d,K),x(v,h,K),r(h,C,K),x($,h,K),r(h,P,K),r(h,T,K),t(T,g),r(h,E,K),r(h,F,K),t(F,z),r(h,A,K),x(N,h,K),r(h,S,K),r(h,M,K),t(M,X),t(M,H),t(H,U),t(M,W),t(M,Q),t(Q,J),t(M,re),r(h,ne,K),x(Y,h,K),r(h,ue,K),r(h,V,K),t(V,se),t(V,ee),t(ee,pe),t(V,ie),t(V,le),t(le,R),t(R,B),t(le,_e),t(V,fe),t(V,oe),t(oe,te),t(V,$e),t(V,be),t(be,es),t(V,Ae),r(h,Le,K),r(h,ae,K),t(ae,Ne),t(ae,je),t(je,ss),t(ae,ke),r(h,Fe,K),x(Ee,h,K),r(h,us,K),r(h,Be,K),t(Be,we),r(h,Ue,K),x(ve,h,K),r(h,qe,K),x(Re,h,K),r(h,Ke,K),r(h,Pe,K),t(Pe,Ge),r(h,Xe,K),r(h,Z,K),t(Z,js),Te=!0},i(h){Te||(j(v.$$.fragment,h),j($.$$.fragment,h),j(N.$$.fragment,h),j(Y.$$.fragment,h),j(Ee.$$.fragment,h),j(ve.$$.fragment,h),j(Re.$$.fragment,h),Te=!0)},o(h){k(v.$$.fragment,h),k($.$$.fragment,h),k(N.$$.fragment,h),k(Y.$$.fragment,h),k(Ee.$$.fragment,h),k(ve.$$.fragment,h),k(Re.$$.fragment,h),Te=!1},d(h){h&&s(f),h&&s(d),y(v,h),h&&s(C),y($,h),h&&s(P),h&&s(T),h&&s(E),h&&s(F),h&&s(A),y(N,h),h&&s(S),h&&s(M),h&&s(ne),y(Y,h),h&&s(ue),h&&s(V),h&&s(Le),h&&s(ae),h&&s(Fe),y(Ee,h),h&&s(us),h&&s(Be),h&&s(Ue),y(ve,h),h&&s(qe),y(Re,h),h&&s(Ke),h&&s(Pe),h&&s(Xe),h&&s(Z)}}}function Wc(G){let f,b,d,v,C;return{c(){f=n("p"),b=a("\u{1F4A1} \u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30ED\u30FC\u30AB\u30EB\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306F\u3001"),d=n("code"),v=a("Seq2SeqTrainer"),C=a(" \u3092\u5B9A\u7FA9\u3059\u308B\u3068\u304D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3059\u308B\u306E\u3067\u3001\u65B0\u3057\u3044\u540D\u524D\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002")},l($){f=p($,"P",{});var P=o(f);b=l(P,"\u{1F4A1} \u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30ED\u30FC\u30AB\u30EB\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306F\u3001"),d=p(P,"CODE",{});var T=o(d);v=l(T,"Seq2SeqTrainer"),T.forEach(s),C=l(P," \u3092\u5B9A\u7FA9\u3059\u308B\u3068\u304D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3059\u308B\u306E\u3067\u3001\u65B0\u3057\u3044\u540D\u524D\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),P.forEach(s)},m($,P){r($,f,P),t(f,b),t(f,d),t(d,v),t(f,C)},d($){$&&s(f)}}}function Yc(G){let f,b,d,v,C;return{c(){f=n("p"),b=a("\u{1F4A1} \u4F7F\u7528\u3057\u3066\u3044\u308B\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30ED\u30FC\u30AB\u30EB\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306F\u3001"),d=n("code"),v=a("model.fit()"),C=a(" \u3092\u547C\u3073\u51FA\u3059\u3068\u304D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3059\u308B\u306E\u3067\u3001\u65B0\u3057\u3044\u540D\u524D\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002")},l($){f=p($,"P",{});var P=o(f);b=l(P,"\u{1F4A1} \u4F7F\u7528\u3057\u3066\u3044\u308B\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30ED\u30FC\u30AB\u30EB\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306F\u3001"),d=p(P,"CODE",{});var T=o(d);v=l(T,"model.fit()"),T.forEach(s),C=l(P," \u3092\u547C\u3073\u51FA\u3059\u3068\u304D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3059\u308B\u306E\u3067\u3001\u65B0\u3057\u3044\u540D\u524D\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),P.forEach(s)},m($,P){r($,f,P),t(f,b),t(f,d),t(d,v),t(f,C)},d($){$&&s(f)}}}function Ec(G){let f,b,d,v,C,$,P,T,g,E,F,z,A,N,S,M,X,H,U,W,Q,J,re,ne,Y,ue,V,se,ee,pe,ie,le,R,B,_e,fe,oe,te,$e,be,es,Ae,Le,ae,Ne,je,ss,ke,Fe,Ee,us,Be,we,Ue,ve,qe,Re,Ke,Pe,Ge,Xe,Z,js,Te,h,K,We,ks,de,ms,ts,me,_s,he,vs,Ye,Me,ge,ps,ds,ce,as,ze,et,os,Ss,gs,Os,is,it,Bs,xe,fs,Ze,Ie,Es,ws,Rs,ft,qs,He,st,cs,xs,Ks,ye,hs,ls,$s,tt,Se,ct,at,_,O,Zt,Gs,Xs,zt,Je,As,ut,ys,Ce,Ve,De,Ws,mt,lt,rt,Ct,nt,Ls,St,_t,Ds,Ps,Ts,zs,rs,Oe,pt,ot,Ot,Fs,Us,da,ha,Jt;return Y=new L({props:{code:`from torch.utils.data import DataLoader

tokenized_datasets.set_format("torch")
train_dataloader = DataLoader(
    tokenized_datasets["train"],
    shuffle=True,
    collate_fn=data_collator,
    batch_size=8,
)
eval_dataloader = DataLoader(
    tokenized_datasets["validation"], collate_fn=data_collator, batch_size=8
)`,highlighted:`<span class="hljs-keyword">from</span> torch.utils.data <span class="hljs-keyword">import</span> DataLoader

tokenized_datasets.set_format(<span class="hljs-string">&quot;torch&quot;</span>)
train_dataloader = DataLoader(
    tokenized_datasets[<span class="hljs-string">&quot;train&quot;</span>],
    shuffle=<span class="hljs-literal">True</span>,
    collate_fn=data_collator,
    batch_size=<span class="hljs-number">8</span>,
)
eval_dataloader = DataLoader(
    tokenized_datasets[<span class="hljs-string">&quot;validation&quot;</span>], collate_fn=data_collator, batch_size=<span class="hljs-number">8</span>
)`}}),pe=new L({props:{code:"model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)",highlighted:"model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)"}}),_e=new L({props:{code:`from transformers import AdamW

optimizer = AdamW(model.parameters(), lr=2e-5)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AdamW

optimizer = AdamW(model.parameters(), lr=<span class="hljs-number">2e-5</span>)`}}),je=new L({props:{code:`from accelerate import Accelerator

accelerator = Accelerator()
model, optimizer, train_dataloader, eval_dataloader = accelerator.prepare(
    model, optimizer, train_dataloader, eval_dataloader
)`,highlighted:`<span class="hljs-keyword">from</span> accelerate <span class="hljs-keyword">import</span> Accelerator

accelerator = Accelerator()
model, optimizer, train_dataloader, eval_dataloader = accelerator.prepare(
    model, optimizer, train_dataloader, eval_dataloader
)`}}),Ge=new L({props:{code:`from transformers import get_scheduler

num_train_epochs = 3
num_update_steps_per_epoch = len(train_dataloader)
num_training_steps = num_train_epochs * num_update_steps_per_epoch

lr_scheduler = get_scheduler(
    "linear",
    optimizer=optimizer,
    num_warmup_steps=0,
    num_training_steps=num_training_steps,
)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> get_scheduler

num_train_epochs = <span class="hljs-number">3</span>
num_update_steps_per_epoch = <span class="hljs-built_in">len</span>(train_dataloader)
num_training_steps = num_train_epochs * num_update_steps_per_epoch

lr_scheduler = get_scheduler(
    <span class="hljs-string">&quot;linear&quot;</span>,
    optimizer=optimizer,
    num_warmup_steps=<span class="hljs-number">0</span>,
    num_training_steps=num_training_steps,
)`}}),he=new L({props:{code:`from huggingface_hub import Repository, get_full_repo_name

model_name = "marian-finetuned-kde4-en-to-fr-accelerate"
repo_name = get_full_repo_name(model_name)
repo_name`,highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> Repository, get_full_repo_name

model_name = <span class="hljs-string">&quot;marian-finetuned-kde4-en-to-fr-accelerate&quot;</span>
repo_name = get_full_repo_name(model_name)
repo_name`}}),Ye=new L({props:{code:"'sgugger/marian-finetuned-kde4-en-to-fr-accelerate'",highlighted:'<span class="hljs-string">&#x27;sgugger/marian-finetuned-kde4-en-to-fr-accelerate&#x27;</span>'}}),ce=new L({props:{code:`output_dir = "marian-finetuned-kde4-en-to-fr-accelerate"
repo = Repository(output_dir, clone_from=repo_name)`,highlighted:`output_dir = <span class="hljs-string">&quot;marian-finetuned-kde4-en-to-fr-accelerate&quot;</span>
repo = Repository(output_dir, clone_from=repo_name)`}}),xs=new L({props:{code:`def postprocess(predictions, labels):
    predictions = predictions.cpu().numpy()
    labels = labels.cpu().numpy()

    decoded_preds = tokenizer.batch_decode(predictions, skip_special_tokens=True)

    # Replace -100 in the labels as we can't decode them.
    labels = np.where(labels != -100, labels, tokenizer.pad_token_id)
    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)

    # Some simple post-processing
    decoded_preds = [pred.strip() for pred in decoded_preds]
    decoded_labels = [[label.strip()] for label in decoded_labels]
    return decoded_preds, decoded_labels`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">postprocess</span>(<span class="hljs-params">predictions, labels</span>):
    predictions = predictions.cpu().numpy()
    labels = labels.cpu().numpy()

    decoded_preds = tokenizer.batch_decode(predictions, skip_special_tokens=<span class="hljs-literal">True</span>)

    <span class="hljs-comment"># Replace -100 in the labels as we can&#x27;t decode them.</span>
    labels = np.where(labels != -<span class="hljs-number">100</span>, labels, tokenizer.pad_token_id)
    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=<span class="hljs-literal">True</span>)

    <span class="hljs-comment"># Some simple post-processing</span>
    decoded_preds = [pred.strip() <span class="hljs-keyword">for</span> pred <span class="hljs-keyword">in</span> decoded_preds]
    decoded_labels = [[label.strip()] <span class="hljs-keyword">for</span> label <span class="hljs-keyword">in</span> decoded_labels]
    <span class="hljs-keyword">return</span> decoded_preds, decoded_labels`}}),Ds=new L({props:{code:`from tqdm.auto import tqdm
import torch

progress_bar = tqdm(range(num_training_steps))

for epoch in range(num_train_epochs):
    # Training
    model.train()
    for batch in train_dataloader:
        outputs = model(**batch)
        loss = outputs.loss
        accelerator.backward(loss)

        optimizer.step()
        lr_scheduler.step()
        optimizer.zero_grad()
        progress_bar.update(1)

    # Evaluation
    model.eval()
    for batch in tqdm(eval_dataloader):
        with torch.no_grad():
            generated_tokens = accelerator.unwrap_model(model).generate(
                batch["input_ids"],
                attention_mask=batch["attention_mask"],
                max_length=128,
            )
        labels = batch["labels"]

        # Necessary to pad predictions and labels for being gathered
        generated_tokens = accelerator.pad_across_processes(
            generated_tokens, dim=1, pad_index=tokenizer.pad_token_id
        )
        labels = accelerator.pad_across_processes(labels, dim=1, pad_index=-100)

        predictions_gathered = accelerator.gather(generated_tokens)
        labels_gathered = accelerator.gather(labels)

        decoded_preds, decoded_labels = postprocess(predictions_gathered, labels_gathered)
        metric.add_batch(predictions=decoded_preds, references=decoded_labels)

    results = metric.compute()
    print(f"epoch {epoch}, BLEU score: {results['score']:.2f}")

    # Save and upload
    accelerator.wait_for_everyone()
    unwrapped_model = accelerator.unwrap_model(model)
    unwrapped_model.save_pretrained(output_dir, save_function=accelerator.save)
    if accelerator.is_main_process:
        tokenizer.save_pretrained(output_dir)
        repo.push_to_hub(
            commit_message=f"Training in progress epoch {epoch}", blocking=False
        )`,highlighted:`<span class="hljs-keyword">from</span> tqdm.auto <span class="hljs-keyword">import</span> tqdm
<span class="hljs-keyword">import</span> torch

progress_bar = tqdm(<span class="hljs-built_in">range</span>(num_training_steps))

<span class="hljs-keyword">for</span> epoch <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(num_train_epochs):
    <span class="hljs-comment"># Training</span>
    model.train()
    <span class="hljs-keyword">for</span> batch <span class="hljs-keyword">in</span> train_dataloader:
        outputs = model(**batch)
        loss = outputs.loss
        accelerator.backward(loss)

        optimizer.step()
        lr_scheduler.step()
        optimizer.zero_grad()
        progress_bar.update(<span class="hljs-number">1</span>)

    <span class="hljs-comment"># Evaluation</span>
    model.<span class="hljs-built_in">eval</span>()
    <span class="hljs-keyword">for</span> batch <span class="hljs-keyword">in</span> tqdm(eval_dataloader):
        <span class="hljs-keyword">with</span> torch.no_grad():
            generated_tokens = accelerator.unwrap_model(model).generate(
                batch[<span class="hljs-string">&quot;input_ids&quot;</span>],
                attention_mask=batch[<span class="hljs-string">&quot;attention_mask&quot;</span>],
                max_length=<span class="hljs-number">128</span>,
            )
        labels = batch[<span class="hljs-string">&quot;labels&quot;</span>]

        <span class="hljs-comment"># Necessary to pad predictions and labels for being gathered</span>
        generated_tokens = accelerator.pad_across_processes(
            generated_tokens, dim=<span class="hljs-number">1</span>, pad_index=tokenizer.pad_token_id
        )
        labels = accelerator.pad_across_processes(labels, dim=<span class="hljs-number">1</span>, pad_index=-<span class="hljs-number">100</span>)

        predictions_gathered = accelerator.gather(generated_tokens)
        labels_gathered = accelerator.gather(labels)

        decoded_preds, decoded_labels = postprocess(predictions_gathered, labels_gathered)
        metric.add_batch(predictions=decoded_preds, references=decoded_labels)

    results = metric.compute()
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;epoch <span class="hljs-subst">{epoch}</span>, BLEU score: <span class="hljs-subst">{results[<span class="hljs-string">&#x27;score&#x27;</span>]:<span class="hljs-number">.2</span>f}</span>&quot;</span>)

    <span class="hljs-comment"># Save and upload</span>
    accelerator.wait_for_everyone()
    unwrapped_model = accelerator.unwrap_model(model)
    unwrapped_model.save_pretrained(output_dir, save_function=accelerator.save)
    <span class="hljs-keyword">if</span> accelerator.is_main_process:
        tokenizer.save_pretrained(output_dir)
        repo.push_to_hub(
            commit_message=<span class="hljs-string">f&quot;Training in progress epoch <span class="hljs-subst">{epoch}</span>&quot;</span>, blocking=<span class="hljs-literal">False</span>
        )`}}),Ts=new L({props:{code:`epoch 0, BLEU score: 53.47
epoch 1, BLEU score: 54.24
epoch 2, BLEU score: 54.44`,highlighted:`epoch <span class="hljs-number">0</span>, BLEU score: <span class="hljs-number">53.47</span>
epoch <span class="hljs-number">1</span>, BLEU score: <span class="hljs-number">54.24</span>
epoch <span class="hljs-number">2</span>, BLEU score: <span class="hljs-number">54.44</span>`}}),{c(){f=n("h2"),b=a("\u30AB\u30B9\u30BF\u30E0\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"),d=c(),v=n("p"),C=a("\u305D\u308C\u3067\u306F\u3001\u5FC5\u8981\u306A\u90E8\u5206\u3092\u7C21\u5358\u306B\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5168\u4F53\u50CF\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u3053\u308C\u306F\u3001"),$=n("a"),P=a("\u30BB\u30AF\u30B7\u30E7\u30F3 2"),T=a(" \u3068 "),g=n("a"),E=a("\u7B2C3\u7AE0"),F=a(" \u3067\u884C\u3063\u305F\u3053\u3068\u3068\u540C\u3058\u3088\u3046\u306B\u898B\u3048\u307E\u3059\u3002"),z=c(),A=n("h3"),N=a("\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u305F\u3081\u306E\u3059\u3079\u3066\u306E\u6E96\u5099"),S=c(),M=n("p"),X=a("\u4F55\u5EA6\u304B\u898B\u305F\u3053\u3068\u304C\u3042\u308B\u306F\u305A\u306A\u306E\u3067\u3001\u304B\u306A\u308A\u624B\u77ED\u306B\u30B3\u30FC\u30C9\u3092\u898B\u3066\u3044\u304D\u307E\u3057\u3087\u3046\u3002\u307E\u305A\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304B\u3089 "),H=n("code"),U=a("DataLoader"),W=a(" \u3092\u69CB\u7BC9\u3057\u307E\u3059\u3002\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092 "),Q=n("code"),J=a('"torch"'),re=a(" \u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306B\u8A2D\u5B9A\u3057\u3001PyTorch\u30C6\u30F3\u30BD\u30EB\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002"),ne=c(),w(Y.$$.fragment),ue=c(),V=n("p"),se=a("\u6B21\u306B\u3001\u30E2\u30C7\u30EB\u306E\u518D\u5B9A\u7FA9\u3092\u884C\u3044\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u4EE5\u524D\u306E\u5FAE\u8ABF\u6574\u3092\u7D99\u7D9A\u3059\u308B\u306E\u3067\u306F\u306A\u304F\u3001\u518D\u3073\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u304B\u3089\u958B\u59CB\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3067\u3059\u3002"),ee=c(),w(pe.$$.fragment),ie=c(),le=n("p"),R=a("\u305D\u308C\u304B\u3089\u3001\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002"),B=c(),w(_e.$$.fragment),fe=c(),oe=n("p"),te=a("\u3053\u308C\u3089\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u63C3\u3063\u305F\u3089\u3001\u305D\u308C\u3089\u3092 "),$e=n("code"),be=a("accelerator.prepare()"),es=a(" \u30E1\u30BD\u30C3\u30C9\u306B\u9001\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3082\u3057\u3001Colab\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067TPU\u306E\u5B66\u7FD2\u3092\u3057\u305F\u3044\u5834\u5408\u306F\u3001\u3053\u306E\u30B3\u30FC\u30C9\u3092\u5168\u3066\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306B\u79FB\u52D5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u305D\u3057\u3066\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306F\u3001"),Ae=n("code"),Le=a("Accelerator"),ae=a("\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3059\u308B\u30BB\u30EB\u3092\u5B9F\u884C\u3057\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),Ne=c(),w(je.$$.fragment),ss=c(),ke=n("p"),Fe=a("\u3053\u308C\u3067 "),Ee=n("code"),us=a("train_dataloader"),Be=a(" \u3092 "),we=n("code"),Ue=a("accelerator.prepare()"),ve=a(" \u306B\u9001\u3063\u305F\u306E\u3067\u3001\u305D\u306E\u9577\u3055\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u30B9\u30C6\u30C3\u30D7\u6570\u3092\u8A08\u7B97\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F "),qe=n("code"),Re=a("DataLoader"),Ke=a(" \u306E\u9577\u3055\u3092\u5909\u66F4\u3059\u308B\u306E\u3067\u3001\u5E38\u306B\u30C7\u30FC\u30BF\u30ED\u30FC\u30C0\u30FC\u3092\u6E96\u5099\u3057\u305F\u5F8C\u306B\u3053\u306E\u64CD\u4F5C\u3092\u884C\u3046\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u3092\u5FD8\u308C\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\u3053\u3053\u3067\u306F\u3001\u5B66\u7FD2\u7387\u30920\u306B\u8FD1\u3065\u3051\u308B\u53E4\u5178\u7684\u306A\u7DDA\u5F62\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),Pe=c(),w(Ge.$$.fragment),Xe=c(),Z=n("p"),js=a("\u6700\u5F8C\u306B\u3001\u79C1\u305F\u3061\u306E\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u305F\u3081\u306B\u3001\u4F5C\u696D\u30D5\u30A9\u30EB\u30C0\u306B "),Te=n("code"),h=a("Repository"),K=a(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u307E\u305A\u3001\u30CF\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9\u30CF\u30D6\u306B\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u307E\u3060\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u3044\u306A\u3044\u5834\u5408\uFF09\u3002\u30E2\u30C7\u30EB\u306B\u4ED8\u4E0E\u3057\u305F\u3044\u30E2\u30C7\u30EB ID \u304B\u3089\u30EA\u30DD\u30B8\u30C8\u30EA\u540D\u3092\u6C7A\u5B9A\u3057\u307E\u3059\u3002("),We=n("code"),ks=a("repo_name"),de=a(" \u306F\u81EA\u7531\u306B\u7F6E\u304D\u63DB\u3048\u3066\u304F\u3060\u3055\u3044\u3002\u30E6\u30FC\u30B6\u30FC\u540D\u304C\u542B\u307E\u308C\u3066\u3044\u308C\u3070\u3088\u304F\u3001\u3053\u308C\u306F\u95A2\u6570 "),ms=n("code"),ts=a("get_full_repo_name()"),me=a(" \u304C\u884C\u3046\u3053\u3068\u3067\u3059)"),_s=c(),w(he.$$.fragment),vs=c(),w(Ye.$$.fragment),Me=c(),ge=n("p"),ps=a("\u305D\u3057\u3066\u3001\u305D\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC\u306B\u30AF\u30ED\u30FC\u30F3\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u3053\u306E\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC\u306F\u4F5C\u696D\u4E2D\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),ds=c(),w(ce.$$.fragment),as=c(),ze=n("p"),et=a("\u3053\u308C\u3067 "),os=n("code"),Ss=a("repo.push_to_hub()"),gs=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u3067\u3001"),Os=n("code"),is=a("output_dir"),it=a(" \u306B\u4FDD\u5B58\u3057\u305F\u3082\u306E\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u6642\u306B\u4E2D\u9593\u30E2\u30C7\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Bs=c(),xe=n("h3"),fs=a("\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"),Ze=c(),Ie=n("p"),Es=a("\u3053\u308C\u3067\u5B8C\u5168\u306A\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u3092\u66F8\u304F\u6E96\u5099\u304C\u3067\u304D\u307E\u3057\u305F\u3002\u8A55\u4FA1\u30D1\u30FC\u30C8\u3092\u7C21\u7565\u5316\u3059\u308B\u305F\u3081\u3001\u3053\u306E"),ws=n("code"),Rs=a("postprocess()"),ft=a("\u95A2\u6570\u306F\u4E88\u6E2C\u5024\u3068\u30E9\u30D9\u30EB\u3092\u53D7\u3051\u53D6\u3063\u3066\u3001 "),qs=n("code"),He=a("metric"),st=a(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u6C42\u3081\u308B\u6587\u5B57\u5217\u306E\u30EA\u30B9\u30C8\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"),cs=c(),w(xs.$$.fragment),Ks=c(),ye=n("p"),hs=a("\u5B66\u7FD2\u30EB\u30FC\u30D7\u306F "),ls=n("a"),$s=a("\u30BB\u30AF\u30B7\u30E7\u30F3 2"),tt=a(" \u3084 "),Se=n("a"),ct=a("\u7B2C3\u7AE0"),at=a(" \u306E\u3082\u306E\u3068\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u304C\u3001\u8A55\u4FA1\u30D1\u30FC\u30C8\u3067\u5C11\u3057\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002\u3067\u306F\u3001\u305D\u306E\u90E8\u5206\u306B\u6CE8\u76EE\u3057\u3066\u307F\u307E\u3057\u3087\u3046!"),_=c(),O=n("p"),Zt=a("\u307E\u305A\u3001\u4E88\u6E2C\u306E\u8A08\u7B97\u306B\u306F "),Gs=n("code"),Xs=a("generate()"),zt=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u308C\u306F\u30D9\u30FC\u30B9\u30E2\u30C7\u30EB\u306B\u5BFE\u3059\u308B\u30E1\u30BD\u30C3\u30C9\u3067\u3059\u3002\u{1F917} Accelerate\u304C"),Je=n("code"),As=a("prepare()"),ut=a(" \u30E1\u30BD\u30C3\u30C9\u3067\u4F5C\u6210\u3057\u305F\u30E9\u30C3\u30D7\u30E2\u30C7\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u3053\u308C\u304C\u307E\u305A\u30E2\u30C7\u30EB\u3092\u30A2\u30F3\u30E9\u30C3\u30D7\u3057\u3066\u304B\u3089\u3001\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u308B\u7406\u7531\u3067\u3059\u3002"),ys=c(),Ce=n("p"),Ve=a("\u3082\u3046\u4E00\u3064\u306F\u3001"),De=n("a"),Ws=a("\u30C8\u30FC\u30AF\u30F3\u5206\u985E"),mt=a(" \u306E\u3088\u3046\u306B\u30012\u3064\u306E\u30D7\u30ED\u30BB\u30B9\u3067\u5165\u529B\u3068\u30E9\u30D9\u30EB\u3092\u7570\u306A\u308B\u5F62\u72B6\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u3066\u3044\u308B\u5834\u5408\u304C\u3042\u308B\u306E\u3067\u3001 "),lt=n("code"),rt=a("accelerator.pad_across_processes()"),Ct=a(" \u3067\u4E88\u6E2C\u5024\u3068\u30E9\u30D9\u30EB\u3092\u540C\u3058\u5F62\u72B6\u306B\u3057\u3066\u304B\u3089 "),nt=n("code"),Ls=a("gather()"),St=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u307E\u3059\u3002\u3082\u3057\u3053\u308C\u3092\u884C\u308F\u306A\u3051\u308C\u3070\u3001\u8A55\u4FA1\u306F\u30A8\u30E9\u30FC\u306B\u306A\u308B\u304B\u3001\u6C38\u9060\u306B\u30CF\u30F3\u30B0\u30A2\u30C3\u30D7\u3057\u307E\u3059\u3002"),_t=c(),w(Ds.$$.fragment),Ps=c(),w(Ts.$$.fragment),zs=c(),rs=n("p"),Oe=a("\u3053\u308C\u304C\u5B8C\u4E86\u3059\u308B\u3068\u3001"),pt=n("code"),ot=a("Seq2SeqTrainer"),Ot=a("\u3067\u5B66\u7FD2\u3057\u305F\u3082\u306E\u3068\u304B\u306A\u308A\u4F3C\u305F\u7D50\u679C\u3092\u6301\u3064\u30E2\u30C7\u30EB\u304C\u3067\u304D\u308B\u306F\u305A\u3067\u3059\u3002\u3053\u306E\u30B3\u30FC\u30C9\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u3055\u305B\u305F\u3082\u306E\u306F "),Fs=n("a"),Us=n("em"),da=a("huggingface-course/marian-finetuned-kde4-en-to-fr-accelerate"),ha=a(" \u3067\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307E\u305F\u3001\u5B66\u7FD2\u30EB\u30FC\u30D7\u306B\u624B\u3092\u52A0\u3048\u305F\u3044\u5834\u5408\u306F\u3001\u4E0A\u306B\u793A\u3057\u305F\u30B3\u30FC\u30C9\u3092\u7DE8\u96C6\u3059\u308B\u3053\u3068\u3067\u3001\u76F4\u63A5\u5B9F\u88C5\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059"),this.h()},l(m){f=p(m,"H2",{id:!0});var I=o(f);b=l(I,"\u30AB\u30B9\u30BF\u30E0\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"),I.forEach(s),d=u(m),v=p(m,"P",{});var Ys=o(v);C=l(Ys,"\u305D\u308C\u3067\u306F\u3001\u5FC5\u8981\u306A\u90E8\u5206\u3092\u7C21\u5358\u306B\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5168\u4F53\u50CF\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u3053\u308C\u306F\u3001"),$=p(Ys,"A",{href:!0});var Dl=o($);P=l(Dl,"\u30BB\u30AF\u30B7\u30E7\u30F3 2"),Dl.forEach(s),T=l(Ys," \u3068 "),g=p(Ys,"A",{href:!0});var $a=o(g);E=l($a,"\u7B2C3\u7AE0"),$a.forEach(s),F=l(Ys," \u3067\u884C\u3063\u305F\u3053\u3068\u3068\u540C\u3058\u3088\u3046\u306B\u898B\u3048\u307E\u3059\u3002"),Ys.forEach(s),z=u(m),A=p(m,"H3",{id:!0});var At=o(A);N=l(At,"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u305F\u3081\u306E\u3059\u3079\u3066\u306E\u6E96\u5099"),At.forEach(s),S=u(m),M=p(m,"P",{});var dt=o(M);X=l(dt,"\u4F55\u5EA6\u304B\u898B\u305F\u3053\u3068\u304C\u3042\u308B\u306F\u305A\u306A\u306E\u3067\u3001\u304B\u306A\u308A\u624B\u77ED\u306B\u30B3\u30FC\u30C9\u3092\u898B\u3066\u3044\u304D\u307E\u3057\u3087\u3046\u3002\u307E\u305A\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304B\u3089 "),H=p(dt,"CODE",{});var Lt=o(H);U=l(Lt,"DataLoader"),Lt.forEach(s),W=l(dt," \u3092\u69CB\u7BC9\u3057\u307E\u3059\u3002\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092 "),Q=p(dt,"CODE",{});var ba=o(Q);J=l(ba,'"torch"'),ba.forEach(s),re=l(dt," \u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306B\u8A2D\u5B9A\u3057\u3001PyTorch\u30C6\u30F3\u30BD\u30EB\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002"),dt.forEach(s),ne=u(m),q(Y.$$.fragment,m),ue=u(m),V=p(m,"P",{});var Vt=o(V);se=l(Vt,"\u6B21\u306B\u3001\u30E2\u30C7\u30EB\u306E\u518D\u5B9A\u7FA9\u3092\u884C\u3044\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u4EE5\u524D\u306E\u5FAE\u8ABF\u6574\u3092\u7D99\u7D9A\u3059\u308B\u306E\u3067\u306F\u306A\u304F\u3001\u518D\u3073\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u304B\u3089\u958B\u59CB\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3067\u3059\u3002"),Vt.forEach(s),ee=u(m),q(pe.$$.fragment,m),ie=u(m),le=p(m,"P",{});var Pl=o(le);R=l(Pl,"\u305D\u308C\u304B\u3089\u3001\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002"),Pl.forEach(s),B=u(m),q(_e.$$.fragment,m),fe=u(m),oe=p(m,"P",{});var ht=o(oe);te=l(ht,"\u3053\u308C\u3089\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u63C3\u3063\u305F\u3089\u3001\u305D\u308C\u3089\u3092 "),$e=p(ht,"CODE",{});var Ft=o($e);be=l(Ft,"accelerator.prepare()"),Ft.forEach(s),es=l(ht," \u30E1\u30BD\u30C3\u30C9\u306B\u9001\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3082\u3057\u3001Colab\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067TPU\u306E\u5B66\u7FD2\u3092\u3057\u305F\u3044\u5834\u5408\u306F\u3001\u3053\u306E\u30B3\u30FC\u30C9\u3092\u5168\u3066\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306B\u79FB\u52D5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u305D\u3057\u3066\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306F\u3001"),Ae=p(ht,"CODE",{});var ja=o(Ae);Le=l(ja,"Accelerator"),ja.forEach(s),ae=l(ht,"\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3059\u308B\u30BB\u30EB\u3092\u5B9F\u884C\u3057\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),ht.forEach(s),Ne=u(m),q(je.$$.fragment,m),ss=u(m),ke=p(m,"P",{});var bs=o(ke);Fe=l(bs,"\u3053\u308C\u3067 "),Ee=p(bs,"CODE",{});var ka=o(Ee);us=l(ka,"train_dataloader"),ka.forEach(s),Be=l(bs," \u3092 "),we=p(bs,"CODE",{});var Qt=o(we);Ue=l(Qt,"accelerator.prepare()"),Qt.forEach(s),ve=l(bs," \u306B\u9001\u3063\u305F\u306E\u3067\u3001\u305D\u306E\u9577\u3055\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u30B9\u30C6\u30C3\u30D7\u6570\u3092\u8A08\u7B97\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F "),qe=p(bs,"CODE",{});var Tl=o(qe);Re=l(Tl,"DataLoader"),Tl.forEach(s),Ke=l(bs," \u306E\u9577\u3055\u3092\u5909\u66F4\u3059\u308B\u306E\u3067\u3001\u5E38\u306B\u30C7\u30FC\u30BF\u30ED\u30FC\u30C0\u30FC\u3092\u6E96\u5099\u3057\u305F\u5F8C\u306B\u3053\u306E\u64CD\u4F5C\u3092\u884C\u3046\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u3092\u5FD8\u308C\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\u3053\u3053\u3067\u306F\u3001\u5B66\u7FD2\u7387\u30920\u306B\u8FD1\u3065\u3051\u308B\u53E4\u5178\u7684\u306A\u7DDA\u5F62\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),bs.forEach(s),Pe=u(m),q(Ge.$$.fragment,m),Xe=u(m),Z=p(m,"P",{});var Zs=o(Z);js=l(Zs,"\u6700\u5F8C\u306B\u3001\u79C1\u305F\u3061\u306E\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u305F\u3081\u306B\u3001\u4F5C\u696D\u30D5\u30A9\u30EB\u30C0\u306B "),Te=p(Zs,"CODE",{});var Ut=o(Te);h=l(Ut,"Repository"),Ut.forEach(s),K=l(Zs," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u307E\u305A\u3001\u30CF\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9\u30CF\u30D6\u306B\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u307E\u3060\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u3044\u306A\u3044\u5834\u5408\uFF09\u3002\u30E2\u30C7\u30EB\u306B\u4ED8\u4E0E\u3057\u305F\u3044\u30E2\u30C7\u30EB ID \u304B\u3089\u30EA\u30DD\u30B8\u30C8\u30EA\u540D\u3092\u6C7A\u5B9A\u3057\u307E\u3059\u3002("),We=p(Zs,"CODE",{});var va=o(We);ks=l(va,"repo_name"),va.forEach(s),de=l(Zs," \u306F\u81EA\u7531\u306B\u7F6E\u304D\u63DB\u3048\u3066\u304F\u3060\u3055\u3044\u3002\u30E6\u30FC\u30B6\u30FC\u540D\u304C\u542B\u307E\u308C\u3066\u3044\u308C\u3070\u3088\u304F\u3001\u3053\u308C\u306F\u95A2\u6570 "),ms=p(Zs,"CODE",{});var Mt=o(ms);ts=l(Mt,"get_full_repo_name()"),Mt.forEach(s),me=l(Zs," \u304C\u884C\u3046\u3053\u3068\u3067\u3059)"),Zs.forEach(s),_s=u(m),q(he.$$.fragment,m),vs=u(m),q(Ye.$$.fragment,m),Me=u(m),ge=p(m,"P",{});var ga=o(ge);ps=l(ga,"\u305D\u3057\u3066\u3001\u305D\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC\u306B\u30AF\u30ED\u30FC\u30F3\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u3053\u306E\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC\u306F\u4F5C\u696D\u4E2D\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),ga.forEach(s),ds=u(m),q(ce.$$.fragment,m),as=u(m),ze=p(m,"P",{});var Js=o(ze);et=l(Js,"\u3053\u308C\u3067 "),os=p(Js,"CODE",{});var zl=o(os);Ss=l(zl,"repo.push_to_hub()"),zl.forEach(s),gs=l(Js," \u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u3067\u3001"),Os=p(Js,"CODE",{});var Ea=o(Os);is=l(Ea,"output_dir"),Ea.forEach(s),it=l(Js," \u306B\u4FDD\u5B58\u3057\u305F\u3082\u306E\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u6642\u306B\u4E2D\u9593\u30E2\u30C7\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Js.forEach(s),Bs=u(m),xe=p(m,"H3",{id:!0});var It=o(xe);fs=l(It,"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"),It.forEach(s),Ze=u(m),Ie=p(m,"P",{});var $t=o(Ie);Es=l($t,"\u3053\u308C\u3067\u5B8C\u5168\u306A\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u3092\u66F8\u304F\u6E96\u5099\u304C\u3067\u304D\u307E\u3057\u305F\u3002\u8A55\u4FA1\u30D1\u30FC\u30C8\u3092\u7C21\u7565\u5316\u3059\u308B\u305F\u3081\u3001\u3053\u306E"),ws=p($t,"CODE",{});var Ht=o(ws);Rs=l(Ht,"postprocess()"),Ht.forEach(s),ft=l($t,"\u95A2\u6570\u306F\u4E88\u6E2C\u5024\u3068\u30E9\u30D9\u30EB\u3092\u53D7\u3051\u53D6\u3063\u3066\u3001 "),qs=p($t,"CODE",{});var wa=o(qs);He=l(wa,"metric"),wa.forEach(s),st=l($t," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u6C42\u3081\u308B\u6587\u5B57\u5217\u306E\u30EA\u30B9\u30C8\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"),$t.forEach(s),cs=u(m),q(xs.$$.fragment,m),Ks=u(m),ye=p(m,"P",{});var Vs=o(ye);hs=l(Vs,"\u5B66\u7FD2\u30EB\u30FC\u30D7\u306F "),ls=p(Vs,"A",{href:!0});var Cl=o(ls);$s=l(Cl,"\u30BB\u30AF\u30B7\u30E7\u30F3 2"),Cl.forEach(s),tt=l(Vs," \u3084 "),Se=p(Vs,"A",{href:!0});var qa=o(Se);ct=l(qa,"\u7B2C3\u7AE0"),qa.forEach(s),at=l(Vs," \u306E\u3082\u306E\u3068\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u304C\u3001\u8A55\u4FA1\u30D1\u30FC\u30C8\u3067\u5C11\u3057\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002\u3067\u306F\u3001\u305D\u306E\u90E8\u5206\u306B\u6CE8\u76EE\u3057\u3066\u307F\u307E\u3057\u3087\u3046!"),Vs.forEach(s),_=u(m),O=p(m,"P",{});var Ms=o(O);Zt=l(Ms,"\u307E\u305A\u3001\u4E88\u6E2C\u306E\u8A08\u7B97\u306B\u306F "),Gs=p(Ms,"CODE",{});var xa=o(Gs);Xs=l(xa,"generate()"),xa.forEach(s),zt=l(Ms," \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u308C\u306F\u30D9\u30FC\u30B9\u30E2\u30C7\u30EB\u306B\u5BFE\u3059\u308B\u30E1\u30BD\u30C3\u30C9\u3067\u3059\u3002\u{1F917} Accelerate\u304C"),Je=p(Ms,"CODE",{});var bt=o(Je);As=l(bt,"prepare()"),bt.forEach(s),ut=l(Ms," \u30E1\u30BD\u30C3\u30C9\u3067\u4F5C\u6210\u3057\u305F\u30E9\u30C3\u30D7\u30E2\u30C7\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u3053\u308C\u304C\u307E\u305A\u30E2\u30C7\u30EB\u3092\u30A2\u30F3\u30E9\u30C3\u30D7\u3057\u3066\u304B\u3089\u3001\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u308B\u7406\u7531\u3067\u3059\u3002"),Ms.forEach(s),ys=u(m),Ce=p(m,"P",{});var Qs=o(Ce);Ve=l(Qs,"\u3082\u3046\u4E00\u3064\u306F\u3001"),De=p(Qs,"A",{href:!0});var Nt=o(De);Ws=l(Nt,"\u30C8\u30FC\u30AF\u30F3\u5206\u985E"),Nt.forEach(s),mt=l(Qs," \u306E\u3088\u3046\u306B\u30012\u3064\u306E\u30D7\u30ED\u30BB\u30B9\u3067\u5165\u529B\u3068\u30E9\u30D9\u30EB\u3092\u7570\u306A\u308B\u5F62\u72B6\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u3066\u3044\u308B\u5834\u5408\u304C\u3042\u308B\u306E\u3067\u3001 "),lt=p(Qs,"CODE",{});var Sl=o(lt);rt=l(Sl,"accelerator.pad_across_processes()"),Sl.forEach(s),Ct=l(Qs," \u3067\u4E88\u6E2C\u5024\u3068\u30E9\u30D9\u30EB\u3092\u540C\u3058\u5F62\u72B6\u306B\u3057\u3066\u304B\u3089 "),nt=p(Qs,"CODE",{});var ya=o(nt);Ls=l(ya,"gather()"),ya.forEach(s),St=l(Qs," \u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u307E\u3059\u3002\u3082\u3057\u3053\u308C\u3092\u884C\u308F\u306A\u3051\u308C\u3070\u3001\u8A55\u4FA1\u306F\u30A8\u30E9\u30FC\u306B\u306A\u308B\u304B\u3001\u6C38\u9060\u306B\u30CF\u30F3\u30B0\u30A2\u30C3\u30D7\u3057\u307E\u3059\u3002"),Qs.forEach(s),_t=u(m),q(Ds.$$.fragment,m),Ps=u(m),q(Ts.$$.fragment,m),zs=u(m),rs=p(m,"P",{});var Is=o(rs);Oe=l(Is,"\u3053\u308C\u304C\u5B8C\u4E86\u3059\u308B\u3068\u3001"),pt=p(Is,"CODE",{});var Da=o(pt);ot=l(Da,"Seq2SeqTrainer"),Da.forEach(s),Ot=l(Is,"\u3067\u5B66\u7FD2\u3057\u305F\u3082\u306E\u3068\u304B\u306A\u308A\u4F3C\u305F\u7D50\u679C\u3092\u6301\u3064\u30E2\u30C7\u30EB\u304C\u3067\u304D\u308B\u306F\u305A\u3067\u3059\u3002\u3053\u306E\u30B3\u30FC\u30C9\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u3055\u305B\u305F\u3082\u306E\u306F "),Fs=p(Is,"A",{href:!0,rel:!0});var jt=o(Fs);Us=p(jt,"EM",{});var Ol=o(Us);da=l(Ol,"huggingface-course/marian-finetuned-kde4-en-to-fr-accelerate"),Ol.forEach(s),jt.forEach(s),ha=l(Is," \u3067\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307E\u305F\u3001\u5B66\u7FD2\u30EB\u30FC\u30D7\u306B\u624B\u3092\u52A0\u3048\u305F\u3044\u5834\u5408\u306F\u3001\u4E0A\u306B\u793A\u3057\u305F\u30B3\u30FC\u30C9\u3092\u7DE8\u96C6\u3059\u308B\u3053\u3068\u3067\u3001\u76F4\u63A5\u5B9F\u88C5\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059"),Is.forEach(s),this.h()},h(){D(f,"id",""),D($,"href","/course/ja/chapter7/2"),D(g,"href","/course/chapter3/4"),D(A,"id",""),D(xe,"id",""),D(ls,"href","/course/ja/chapter7/2"),D(Se,"href","/course/ja/chapter3"),D(De,"href","/course/ja/chapter7/2"),D(Fs,"href","https://huggingface.co/huggingface-course/marian-finetuned-kde4-en-to-fr-accelerate"),D(Fs,"rel","nofollow")},m(m,I){r(m,f,I),t(f,b),r(m,d,I),r(m,v,I),t(v,C),t(v,$),t($,P),t(v,T),t(v,g),t(g,E),t(v,F),r(m,z,I),r(m,A,I),t(A,N),r(m,S,I),r(m,M,I),t(M,X),t(M,H),t(H,U),t(M,W),t(M,Q),t(Q,J),t(M,re),r(m,ne,I),x(Y,m,I),r(m,ue,I),r(m,V,I),t(V,se),r(m,ee,I),x(pe,m,I),r(m,ie,I),r(m,le,I),t(le,R),r(m,B,I),x(_e,m,I),r(m,fe,I),r(m,oe,I),t(oe,te),t(oe,$e),t($e,be),t(oe,es),t(oe,Ae),t(Ae,Le),t(oe,ae),r(m,Ne,I),x(je,m,I),r(m,ss,I),r(m,ke,I),t(ke,Fe),t(ke,Ee),t(Ee,us),t(ke,Be),t(ke,we),t(we,Ue),t(ke,ve),t(ke,qe),t(qe,Re),t(ke,Ke),r(m,Pe,I),x(Ge,m,I),r(m,Xe,I),r(m,Z,I),t(Z,js),t(Z,Te),t(Te,h),t(Z,K),t(Z,We),t(We,ks),t(Z,de),t(Z,ms),t(ms,ts),t(Z,me),r(m,_s,I),x(he,m,I),r(m,vs,I),x(Ye,m,I),r(m,Me,I),r(m,ge,I),t(ge,ps),r(m,ds,I),x(ce,m,I),r(m,as,I),r(m,ze,I),t(ze,et),t(ze,os),t(os,Ss),t(ze,gs),t(ze,Os),t(Os,is),t(ze,it),r(m,Bs,I),r(m,xe,I),t(xe,fs),r(m,Ze,I),r(m,Ie,I),t(Ie,Es),t(Ie,ws),t(ws,Rs),t(Ie,ft),t(Ie,qs),t(qs,He),t(Ie,st),r(m,cs,I),x(xs,m,I),r(m,Ks,I),r(m,ye,I),t(ye,hs),t(ye,ls),t(ls,$s),t(ye,tt),t(ye,Se),t(Se,ct),t(ye,at),r(m,_,I),r(m,O,I),t(O,Zt),t(O,Gs),t(Gs,Xs),t(O,zt),t(O,Je),t(Je,As),t(O,ut),r(m,ys,I),r(m,Ce,I),t(Ce,Ve),t(Ce,De),t(De,Ws),t(Ce,mt),t(Ce,lt),t(lt,rt),t(Ce,Ct),t(Ce,nt),t(nt,Ls),t(Ce,St),r(m,_t,I),x(Ds,m,I),r(m,Ps,I),x(Ts,m,I),r(m,zs,I),r(m,rs,I),t(rs,Oe),t(rs,pt),t(pt,ot),t(rs,Ot),t(rs,Fs),t(Fs,Us),t(Us,da),t(rs,ha),Jt=!0},i(m){Jt||(j(Y.$$.fragment,m),j(pe.$$.fragment,m),j(_e.$$.fragment,m),j(je.$$.fragment,m),j(Ge.$$.fragment,m),j(he.$$.fragment,m),j(Ye.$$.fragment,m),j(ce.$$.fragment,m),j(xs.$$.fragment,m),j(Ds.$$.fragment,m),j(Ts.$$.fragment,m),Jt=!0)},o(m){k(Y.$$.fragment,m),k(pe.$$.fragment,m),k(_e.$$.fragment,m),k(je.$$.fragment,m),k(Ge.$$.fragment,m),k(he.$$.fragment,m),k(Ye.$$.fragment,m),k(ce.$$.fragment,m),k(xs.$$.fragment,m),k(Ds.$$.fragment,m),k(Ts.$$.fragment,m),Jt=!1},d(m){m&&s(f),m&&s(d),m&&s(v),m&&s(z),m&&s(A),m&&s(S),m&&s(M),m&&s(ne),y(Y,m),m&&s(ue),m&&s(V),m&&s(ee),y(pe,m),m&&s(ie),m&&s(le),m&&s(B),y(_e,m),m&&s(fe),m&&s(oe),m&&s(Ne),y(je,m),m&&s(ss),m&&s(ke),m&&s(Pe),y(Ge,m),m&&s(Xe),m&&s(Z),m&&s(_s),y(he,m),m&&s(vs),y(Ye,m),m&&s(Me),m&&s(ge),m&&s(ds),y(ce,m),m&&s(as),m&&s(ze),m&&s(Bs),m&&s(xe),m&&s(Ze),m&&s(Ie),m&&s(cs),y(xs,m),m&&s(Ks),m&&s(ye),m&&s(_),m&&s(O),m&&s(ys),m&&s(Ce),m&&s(_t),y(Ds,m),m&&s(Ps),y(Ts,m),m&&s(zs),m&&s(rs)}}}function Zc(G){let f,b,d,v,C;return{c(){f=n("p"),b=a("\u270F\uFE0F "),d=n("strong"),v=a("\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),C=a(" \u5148\u307B\u3069\u78BA\u8A8D\u3057\u305F\u300Cemail\u300D\u3068\u3044\u3046\u5358\u8A9E\u304C\u5165\u3063\u305F\u30B5\u30F3\u30D7\u30EB\u3067\u306F\u3001\u30E2\u30C7\u30EB\u306F\u4F55\u3092\u8FD4\u3059\u3067\u3057\u3087\u3046\u304B\uFF1F")},l($){f=p($,"P",{});var P=o(f);b=l(P,"\u270F\uFE0F "),d=p(P,"STRONG",{});var T=o(d);v=l(T,"\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),T.forEach(s),C=l(P," \u5148\u307B\u3069\u78BA\u8A8D\u3057\u305F\u300Cemail\u300D\u3068\u3044\u3046\u5358\u8A9E\u304C\u5165\u3063\u305F\u30B5\u30F3\u30D7\u30EB\u3067\u306F\u3001\u30E2\u30C7\u30EB\u306F\u4F55\u3092\u8FD4\u3059\u3067\u3057\u3087\u3046\u304B\uFF1F"),P.forEach(s)},m($,P){r($,f,P),t(f,b),t(f,d),t(d,v),t(f,C)},d($){$&&s(f)}}}function Jc(G){let f,b,d,v,C,$,P,T,g,E,F,z,A,N,S,M,X,H,U,W,Q,J,re,ne,Y,ue,V,se,ee,pe,ie,le,R,B,_e,fe,oe,te,$e,be,es,Ae,Le,ae,Ne,je,ss,ke,Fe,Ee,us,Be,we,Ue,ve,qe,Re,Ke,Pe,Ge,Xe,Z,js,Te,h,K,We,ks,de,ms,ts,me,_s,he,vs,Ye,Me,ge,ps,ds,ce,as,ze,et,os,Ss,gs,Os,is,it,Bs,xe,fs,Ze,Ie,Es,ws,Rs,ft,qs,He,st,cs,xs,Ks,ye,hs,ls,$s,tt,Se,ct,at,_,O,Zt,Gs,Xs,zt,Je,As,ut,ys,Ce,Ve,De,Ws,mt,lt,rt,Ct,nt,Ls,St,_t,Ds,Ps,Ts,zs,rs,Oe,pt,ot,Ot,Fs,Us,da,ha,Jt,m,I,Ys,Dl,$a,At,dt,Lt,ba,Vt,Pl,ht,Ft,ja,bs,ka,Qt,Tl,Zs,Ut,va,Mt,ga,Js,zl,Ea,It,$t,Ht,wa,Vs,Cl,qa,Ms,xa,bt,Qs,Nt,Sl,ya,Is,Da,jt,Ol,gr,Ap,Lp,Yr,sa,Fp,Pa,Up,Mp,Zr,Ta,Jr,Bt,Ip,Er,Hp,Np,za,Bp,Rp,Vr,ta,Qr,aa,Kp,wr,Gp,Xp,en,la,Wp,qr,Yp,Zp,sn,Ca,tn,Rt,Jp,xr,Vp,Qp,yr,eo,so,an,ra,to,Dr,ao,lo,ln,Al,ro,rn,Sa,nn,Ll,no,pn,Oa,on,Aa,fn,Fl,po,cn,kt,Pr,oo,io,Tr,fo,co,zr,uo,mo,un,La,mn,Ul,_o,_n,na,dn,pa,hn,Ml,ho,$n,Fa,bn,Il,$o,jn,vt,gt,Hl,Nl,bo,kn,Ua,jo,vn,Kt,ko,Bl,vo,go,Cr,Eo,wo,gn,oa,qo,Sr,xo,yo,En,ns,Do,Ma,Or,Po,To,Ar,zo,Co,Lr,So,Oo,Fr,Ao,Lo,Ur,Fo,Uo,Mr,Mo,Io,wn,Et,wt,Rl,Kl,Ho,qn,Ia,xn,Ha,yn,ia,No,Ir,Bo,Ro,Dn,Na,Pn,Ba,Tn,Gl,Ko,zn,Ra,Cn,Ka,Sn,Xl,Go,On,Ga,An,Xa,Ln,qt,xt,Wl,Wa,Xo,Fn,Ya,Un,Yl,Gt,Wo,Za,Yo,Zo,Ja,Jo,Vo,Mn,Zl,Qo,In,fa,ei,Va,si,ti,Hn,Qa,Nn,Xt,ai,Jl,li,ri,Hr,ni,pi,Bn,el,Rn,Vl,oi,Kn,Ql,ii,Gn,sl,Xn,tl,Wn,er,fi,Yn,Hs,ci,al,ui,mi,Nr,_i,di,Br,hi,$i,ll,bi,ji,Zn,sr,ki,Jn,rl,Vn,nl,Qn,pl,ep,ol,sp,tr,vi,tp,yt,Dt,ar,lr,gi,ap,il,Ei,lp,rr,wi,rp,fl,np,nr,qi,pp,cl,op,Pt,Tt,pr,or,ul,xi,ip,ir,yi,fp,ml,cp,_l,up,fr,Di,mp,dl,_p,hl,dp,cr,Pi,hp,ca,$p;d=new Tc({props:{fw:G[0]}});const zi=[Cc,zc],$l=[];function Ci(e,i){return e[0]==="pt"?0:1}T=Ci(G),g=$l[T]=zi[T](G),fe=new Op({props:{id:"1JvfrvZgi6c"}}),Es=new Ti({}),hs=new L({props:{code:`from datasets import load_dataset

raw_datasets = load_dataset("kde4", lang1="en", lang2="fr")`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

raw_datasets = load_dataset(<span class="hljs-string">&quot;kde4&quot;</span>, lang1=<span class="hljs-string">&quot;en&quot;</span>, lang2=<span class="hljs-string">&quot;fr&quot;</span>)`}}),As=new L({props:{code:"raw_datasets",highlighted:"raw_datasets"}}),ys=new L({props:{code:`DatasetDict({
    train: Dataset({
        features: ['id', 'translation'],
        num_rows: 210173
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;translation&#x27;</span>],
        num_rows: <span class="hljs-number">210173</span>
    })
})`}}),Ps=new L({props:{code:`split_datasets = raw_datasets["train"].train_test_split(train_size=0.9, seed=20)
split_datasets`,highlighted:`split_datasets = raw_datasets[<span class="hljs-string">&quot;train&quot;</span>].train_test_split(train_size=<span class="hljs-number">0.9</span>, seed=<span class="hljs-number">20</span>)
split_datasets`}}),zs=new L({props:{code:`DatasetDict({
    train: Dataset({
        features: ['id', 'translation'],
        num_rows: 189155
    })
    test: Dataset({
        features: ['id', 'translation'],
        num_rows: 21018
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;translation&#x27;</span>],
        num_rows: <span class="hljs-number">189155</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;translation&#x27;</span>],
        num_rows: <span class="hljs-number">21018</span>
    })
})`}}),m=new L({props:{code:'split_datasets["validation"] = split_datasets.pop("test")',highlighted:'split_datasets[<span class="hljs-string">&quot;validation&quot;</span>] = split_datasets.pop(<span class="hljs-string">&quot;test&quot;</span>)'}}),At=new L({props:{code:'split_datasets["train"][1]["translation"]',highlighted:'split_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">1</span>][<span class="hljs-string">&quot;translation&quot;</span>]'}}),Lt=new L({props:{code:`{'en': 'Default to expanded threads',
 'fr': 'Par d\xE9faut, d\xE9velopper les fils de discussion'}`,highlighted:`{<span class="hljs-string">&#x27;en&#x27;</span>: <span class="hljs-string">&#x27;Default to expanded threads&#x27;</span>,
 <span class="hljs-string">&#x27;fr&#x27;</span>: <span class="hljs-string">&#x27;Par d\xE9faut, d\xE9velopper les fils de discussion&#x27;</span>}`}}),Ft=new L({props:{code:`from transformers import pipeline

model_checkpoint = "Helsinki-NLP/opus-mt-en-fr"
translator = pipeline("translation", model=model_checkpoint)
translator("Default to expanded threads")`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

model_checkpoint = <span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-fr&quot;</span>
translator = pipeline(<span class="hljs-string">&quot;translation&quot;</span>, model=model_checkpoint)
translator(<span class="hljs-string">&quot;Default to expanded threads&quot;</span>)`}}),bs=new L({props:{code:"[{'translation_text': 'Par d\xE9faut pour les threads \xE9largis'}]",highlighted:'[{<span class="hljs-string">&#x27;translation_text&#x27;</span>: <span class="hljs-string">&#x27;Par d\xE9faut pour les threads \xE9largis&#x27;</span>}]'}}),Ut=new L({props:{code:'split_datasets["train"][172]["translation"]',highlighted:'split_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">172</span>][<span class="hljs-string">&quot;translation&quot;</span>]'}}),Mt=new L({props:{code:`{'en': 'Unable to import %1 using the OFX importer plugin. This file is not the correct format.',
 'fr': "Impossible d'importer %1 en utilisant le module d'extension d'importation OFX. Ce fichier n'a pas un format correct."}`,highlighted:`{<span class="hljs-string">&#x27;en&#x27;</span>: <span class="hljs-string">&#x27;Unable to import %1 using the OFX importer plugin. This file is not the correct format.&#x27;</span>,
 <span class="hljs-string">&#x27;fr&#x27;</span>: <span class="hljs-string">&quot;Impossible d&#x27;importer %1 en utilisant le module d&#x27;extension d&#x27;importation OFX. Ce fichier n&#x27;a pas un format correct.&quot;</span>}`}}),It=new L({props:{code:`translator(
    "Unable to import %1 using the OFX importer plugin. This file is not the correct format."
)`,highlighted:`translator(
    <span class="hljs-string">&quot;Unable to import %1 using the OFX importer plugin. This file is not the correct format.&quot;</span>
)`}}),Ht=new L({props:{code:`[{'translation_text': "Impossible d'importer %1 en utilisant le plugin d'importateur OFX. Ce fichier n'est pas le bon format."}]`,highlighted:'[{<span class="hljs-string">&#x27;translation_text&#x27;</span>: <span class="hljs-string">&quot;Impossible d&#x27;importer %1 en utilisant le plugin d&#x27;importateur OFX. Ce fichier n&#x27;est pas le bon format.&quot;</span>}]'}}),Ms=new Op({props:{id:"0Oxphw4Q9fo"}}),bt=new _a({props:{$$slots:{default:[Sc]},$$scope:{ctx:G}}}),Is=new Op({props:{id:"XAR8jnZZuUs"}}),Ta=new L({props:{code:`from transformers import AutoTokenizer

model_checkpoint = "Helsinki-NLP/opus-mt-en-fr"
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, return_tensors="tf")`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

model_checkpoint = <span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-fr&quot;</span>
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)`}}),ta=new _a({props:{$$slots:{default:[Oc]},$$scope:{ctx:G}}}),Ca=new L({props:{code:`with open(file_path) as f:
    content = f.read()`,highlighted:`<span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(file_path) <span class="hljs-keyword">as</span> f:
    content = f.<span class="hljs-built_in">read</span>()`}}),Sa=new L({props:{code:`en_sentence = split_datasets["train"][1]["translation"]["en"]
fr_sentence = split_datasets["train"][1]["translation"]["fr"]

inputs = tokenizer(en_sentence)
with tokenizer.as_target_tokenizer():
    targets = tokenizer(fr_sentence)`,highlighted:`en_sentence = split_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">1</span>][<span class="hljs-string">&quot;translation&quot;</span>][<span class="hljs-string">&quot;en&quot;</span>]
fr_sentence = split_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">1</span>][<span class="hljs-string">&quot;translation&quot;</span>][<span class="hljs-string">&quot;fr&quot;</span>]

inputs = tokenizer(en_sentence)
<span class="hljs-keyword">with</span> tokenizer.as_target_tokenizer():
    targets = tokenizer(fr_sentence)`}}),Oa=new L({props:{code:`wrong_targets = tokenizer(fr_sentence)
print(tokenizer.convert_ids_to_tokens(wrong_targets["input_ids"]))
print(tokenizer.convert_ids_to_tokens(targets["input_ids"]))`,highlighted:`wrong_targets = tokenizer(fr_sentence)
<span class="hljs-built_in">print</span>(tokenizer.convert_ids_to_tokens(wrong_targets[<span class="hljs-string">&quot;input_ids&quot;</span>]))
<span class="hljs-built_in">print</span>(tokenizer.convert_ids_to_tokens(targets[<span class="hljs-string">&quot;input_ids&quot;</span>]))`}}),Aa=new L({props:{code:`['\u2581Par', '\u2581d\xE9', 'f', 'aut', ',', '\u2581d\xE9', 've', 'lop', 'per', '\u2581les', '\u2581fil', 's', '\u2581de', '\u2581discussion', '</s>']
['\u2581Par', '\u2581d\xE9faut', ',', '\u2581d\xE9velopper', '\u2581les', '\u2581fils', '\u2581de', '\u2581discussion', '</s>']`,highlighted:`[<span class="hljs-string">&#x27;\u2581Par&#x27;</span>, <span class="hljs-string">&#x27;\u2581d\xE9&#x27;</span>, <span class="hljs-string">&#x27;f&#x27;</span>, <span class="hljs-string">&#x27;aut&#x27;</span>, <span class="hljs-string">&#x27;,&#x27;</span>, <span class="hljs-string">&#x27;\u2581d\xE9&#x27;</span>, <span class="hljs-string">&#x27;ve&#x27;</span>, <span class="hljs-string">&#x27;lop&#x27;</span>, <span class="hljs-string">&#x27;per&#x27;</span>, <span class="hljs-string">&#x27;\u2581les&#x27;</span>, <span class="hljs-string">&#x27;\u2581fil&#x27;</span>, <span class="hljs-string">&#x27;s&#x27;</span>, <span class="hljs-string">&#x27;\u2581de&#x27;</span>, <span class="hljs-string">&#x27;\u2581discussion&#x27;</span>, <span class="hljs-string">&#x27;&lt;/s&gt;&#x27;</span>]
[<span class="hljs-string">&#x27;\u2581Par&#x27;</span>, <span class="hljs-string">&#x27;\u2581d\xE9faut&#x27;</span>, <span class="hljs-string">&#x27;,&#x27;</span>, <span class="hljs-string">&#x27;\u2581d\xE9velopper&#x27;</span>, <span class="hljs-string">&#x27;\u2581les&#x27;</span>, <span class="hljs-string">&#x27;\u2581fils&#x27;</span>, <span class="hljs-string">&#x27;\u2581de&#x27;</span>, <span class="hljs-string">&#x27;\u2581discussion&#x27;</span>, <span class="hljs-string">&#x27;&lt;/s&gt;&#x27;</span>]`}}),La=new L({props:{code:`max_input_length = 128
max_target_length = 128


def preprocess_function(examples):
    inputs = [ex["en"] for ex in examples["translation"]]
    targets = [ex["fr"] for ex in examples["translation"]]
    model_inputs = tokenizer(inputs, max_length=max_input_length, truncation=True)

    # Set up the tokenizer for targets
    with tokenizer.as_target_tokenizer():
        labels = tokenizer(targets, max_length=max_target_length, truncation=True)

    model_inputs["labels"] = labels["input_ids"]
    return model_inputs`,highlighted:`max_input_length = <span class="hljs-number">128</span>
max_target_length = <span class="hljs-number">128</span>


<span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_function</span>(<span class="hljs-params">examples</span>):
    inputs = [ex[<span class="hljs-string">&quot;en&quot;</span>] <span class="hljs-keyword">for</span> ex <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;translation&quot;</span>]]
    targets = [ex[<span class="hljs-string">&quot;fr&quot;</span>] <span class="hljs-keyword">for</span> ex <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;translation&quot;</span>]]
    model_inputs = tokenizer(inputs, max_length=max_input_length, truncation=<span class="hljs-literal">True</span>)

    <span class="hljs-comment"># Set up the tokenizer for targets</span>
    <span class="hljs-keyword">with</span> tokenizer.as_target_tokenizer():
        labels = tokenizer(targets, max_length=max_target_length, truncation=<span class="hljs-literal">True</span>)

    model_inputs[<span class="hljs-string">&quot;labels&quot;</span>] = labels[<span class="hljs-string">&quot;input_ids&quot;</span>]
    <span class="hljs-keyword">return</span> model_inputs`}}),na=new _a({props:{$$slots:{default:[Ac]},$$scope:{ctx:G}}}),pa=new _a({props:{warning:!0,$$slots:{default:[Lc]},$$scope:{ctx:G}}}),Fa=new L({props:{code:`tokenized_datasets = split_datasets.map(
    preprocess_function,
    batched=True,
    remove_columns=split_datasets["train"].column_names,
)`,highlighted:`tokenized_datasets = split_datasets.<span class="hljs-built_in">map</span>(
    preprocess_function,
    batched=<span class="hljs-literal">True</span>,
    remove_columns=split_datasets[<span class="hljs-string">&quot;train&quot;</span>].column_names,
)`}});const Si=[Uc,Fc],bl=[];function Oi(e,i){return e[0]==="pt"?0:1}vt=Oi(G),gt=bl[vt]=Si[vt](G);const Ai=[Hc,Ic],jl=[];function Li(e,i){return e[0]==="pt"?0:1}Et=Li(G),wt=jl[Et]=Ai[Et](G),Ia=new L({props:{code:`batch = data_collator([tokenized_datasets["train"][i] for i in range(1, 3)])
batch.keys()`,highlighted:`batch = data_collator([tokenized_datasets[<span class="hljs-string">&quot;train&quot;</span>][i] <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">1</span>, <span class="hljs-number">3</span>)])
batch.keys()`}}),Ha=new L({props:{code:"dict_keys(['attention_mask', 'input_ids', 'labels', 'decoder_input_ids'])",highlighted:'dict_keys([<span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;labels&#x27;</span>, <span class="hljs-string">&#x27;decoder_input_ids&#x27;</span>])'}}),Na=new L({props:{code:'batch["labels"]',highlighted:'batch[<span class="hljs-string">&quot;labels&quot;</span>]'}}),Ba=new L({props:{code:`tensor([[  577,  5891,     2,  3184,    16,  2542,     5,  1710,     0,  -100,
          -100,  -100,  -100,  -100,  -100,  -100],
        [ 1211,     3,    49,  9409,  1211,     3, 29140,   817,  3124,   817,
           550,  7032,  5821,  7907, 12649,     0]])`,highlighted:`tensor([[  <span class="hljs-number">577</span>,  <span class="hljs-number">5891</span>,     <span class="hljs-number">2</span>,  <span class="hljs-number">3184</span>,    <span class="hljs-number">16</span>,  <span class="hljs-number">2542</span>,     <span class="hljs-number">5</span>,  <span class="hljs-number">1710</span>,     <span class="hljs-number">0</span>,  -<span class="hljs-number">100</span>,
          -<span class="hljs-number">100</span>,  -<span class="hljs-number">100</span>,  -<span class="hljs-number">100</span>,  -<span class="hljs-number">100</span>,  -<span class="hljs-number">100</span>,  -<span class="hljs-number">100</span>],
        [ <span class="hljs-number">1211</span>,     <span class="hljs-number">3</span>,    <span class="hljs-number">49</span>,  <span class="hljs-number">9409</span>,  <span class="hljs-number">1211</span>,     <span class="hljs-number">3</span>, <span class="hljs-number">29140</span>,   <span class="hljs-number">817</span>,  <span class="hljs-number">3124</span>,   <span class="hljs-number">817</span>,
           <span class="hljs-number">550</span>,  <span class="hljs-number">7032</span>,  <span class="hljs-number">5821</span>,  <span class="hljs-number">7907</span>, <span class="hljs-number">12649</span>,     <span class="hljs-number">0</span>]])`}}),Ra=new L({props:{code:'batch["decoder_input_ids"]',highlighted:'batch[<span class="hljs-string">&quot;decoder_input_ids&quot;</span>]'}}),Ka=new L({props:{code:`tensor([[59513,   577,  5891,     2,  3184,    16,  2542,     5,  1710,     0,
         59513, 59513, 59513, 59513, 59513, 59513],
        [59513,  1211,     3,    49,  9409,  1211,     3, 29140,   817,  3124,
           817,   550,  7032,  5821,  7907, 12649]])`,highlighted:`tensor([[<span class="hljs-number">59513</span>,   <span class="hljs-number">577</span>,  <span class="hljs-number">5891</span>,     <span class="hljs-number">2</span>,  <span class="hljs-number">3184</span>,    <span class="hljs-number">16</span>,  <span class="hljs-number">2542</span>,     <span class="hljs-number">5</span>,  <span class="hljs-number">1710</span>,     <span class="hljs-number">0</span>,
         <span class="hljs-number">59513</span>, <span class="hljs-number">59513</span>, <span class="hljs-number">59513</span>, <span class="hljs-number">59513</span>, <span class="hljs-number">59513</span>, <span class="hljs-number">59513</span>],
        [<span class="hljs-number">59513</span>,  <span class="hljs-number">1211</span>,     <span class="hljs-number">3</span>,    <span class="hljs-number">49</span>,  <span class="hljs-number">9409</span>,  <span class="hljs-number">1211</span>,     <span class="hljs-number">3</span>, <span class="hljs-number">29140</span>,   <span class="hljs-number">817</span>,  <span class="hljs-number">3124</span>,
           <span class="hljs-number">817</span>,   <span class="hljs-number">550</span>,  <span class="hljs-number">7032</span>,  <span class="hljs-number">5821</span>,  <span class="hljs-number">7907</span>, <span class="hljs-number">12649</span>]])`}}),Ga=new L({props:{code:`for i in range(1, 3):
    print(tokenized_datasets["train"][i]["labels"])`,highlighted:`<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">1</span>, <span class="hljs-number">3</span>):
    <span class="hljs-built_in">print</span>(tokenized_datasets[<span class="hljs-string">&quot;train&quot;</span>][i][<span class="hljs-string">&quot;labels&quot;</span>])`}}),Xa=new L({props:{code:`[577, 5891, 2, 3184, 16, 2542, 5, 1710, 0]
[1211, 3, 49, 9409, 1211, 3, 29140, 817, 3124, 817, 550, 7032, 5821, 7907, 12649, 0]`,highlighted:`[<span class="hljs-number">577</span>, <span class="hljs-number">5891</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3184</span>, <span class="hljs-number">16</span>, <span class="hljs-number">2542</span>, <span class="hljs-number">5</span>, <span class="hljs-number">1710</span>, <span class="hljs-number">0</span>]
[<span class="hljs-number">1211</span>, <span class="hljs-number">3</span>, <span class="hljs-number">49</span>, <span class="hljs-number">9409</span>, <span class="hljs-number">1211</span>, <span class="hljs-number">3</span>, <span class="hljs-number">29140</span>, <span class="hljs-number">817</span>, <span class="hljs-number">3124</span>, <span class="hljs-number">817</span>, <span class="hljs-number">550</span>, <span class="hljs-number">7032</span>, <span class="hljs-number">5821</span>, <span class="hljs-number">7907</span>, <span class="hljs-number">12649</span>, <span class="hljs-number">0</span>]`}});const Fi=[Bc,Nc],kl=[];function Ui(e,i){return e[0]==="pt"?0:1}qt=Ui(G),xt=kl[qt]=Fi[qt](G),Ya=new Op({props:{id:"M05L1DhFqcw"}});let Cs=G[0]==="pt"&&gc();Qa=new L({props:{code:"!pip install sacrebleu",highlighted:"!pip install sacrebleu"}}),el=new L({props:{code:`import evaluate

metric = evaluate.load("sacrebleu")`,highlighted:`<span class="hljs-keyword">import</span> evaluate

metric = evaluate.load(<span class="hljs-string">&quot;sacrebleu&quot;</span>)`}}),sl=new L({props:{code:`predictions = [
    "This plugin lets you translate web pages between several languages automatically."
]
references = [
    [
        "This plugin allows you to automatically translate web pages between several languages."
    ]
]
metric.compute(predictions=predictions, references=references)`,highlighted:`predictions = [
    <span class="hljs-string">&quot;This plugin lets you translate web pages between several languages automatically.&quot;</span>
]
references = [
    [
        <span class="hljs-string">&quot;This plugin allows you to automatically translate web pages between several languages.&quot;</span>
    ]
]
metric.compute(predictions=predictions, references=references)`}}),tl=new L({props:{code:`{'score': 46.750469682990165,
 'counts': [11, 6, 4, 3],
 'totals': [12, 11, 10, 9],
 'precisions': [91.67, 54.54, 40.0, 33.33],
 'bp': 0.9200444146293233,
 'sys_len': 12,
 'ref_len': 13}`,highlighted:`{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">46.750469682990165</span>,
 <span class="hljs-string">&#x27;counts&#x27;</span>: [<span class="hljs-number">11</span>, <span class="hljs-number">6</span>, <span class="hljs-number">4</span>, <span class="hljs-number">3</span>],
 <span class="hljs-string">&#x27;totals&#x27;</span>: [<span class="hljs-number">12</span>, <span class="hljs-number">11</span>, <span class="hljs-number">10</span>, <span class="hljs-number">9</span>],
 <span class="hljs-string">&#x27;precisions&#x27;</span>: [<span class="hljs-number">91.67</span>, <span class="hljs-number">54.54</span>, <span class="hljs-number">40.0</span>, <span class="hljs-number">33.33</span>],
 <span class="hljs-string">&#x27;bp&#x27;</span>: <span class="hljs-number">0.9200444146293233</span>,
 <span class="hljs-string">&#x27;sys_len&#x27;</span>: <span class="hljs-number">12</span>,
 <span class="hljs-string">&#x27;ref_len&#x27;</span>: <span class="hljs-number">13</span>}`}}),rl=new L({props:{code:`predictions = ["This This This This"]
references = [
    [
        "This plugin allows you to automatically translate web pages between several languages."
    ]
]
metric.compute(predictions=predictions, references=references)`,highlighted:`predictions = [<span class="hljs-string">&quot;This This This This&quot;</span>]
references = [
    [
        <span class="hljs-string">&quot;This plugin allows you to automatically translate web pages between several languages.&quot;</span>
    ]
]
metric.compute(predictions=predictions, references=references)`}}),nl=new L({props:{code:`{'score': 1.683602693167689,
 'counts': [1, 0, 0, 0],
 'totals': [4, 3, 2, 1],
 'precisions': [25.0, 16.67, 12.5, 12.5],
 'bp': 0.10539922456186433,
 'sys_len': 4,
 'ref_len': 13}`,highlighted:`{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">1.683602693167689</span>,
 <span class="hljs-string">&#x27;counts&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
 <span class="hljs-string">&#x27;totals&#x27;</span>: [<span class="hljs-number">4</span>, <span class="hljs-number">3</span>, <span class="hljs-number">2</span>, <span class="hljs-number">1</span>],
 <span class="hljs-string">&#x27;precisions&#x27;</span>: [<span class="hljs-number">25.0</span>, <span class="hljs-number">16.67</span>, <span class="hljs-number">12.5</span>, <span class="hljs-number">12.5</span>],
 <span class="hljs-string">&#x27;bp&#x27;</span>: <span class="hljs-number">0.10539922456186433</span>,
 <span class="hljs-string">&#x27;sys_len&#x27;</span>: <span class="hljs-number">4</span>,
 <span class="hljs-string">&#x27;ref_len&#x27;</span>: <span class="hljs-number">13</span>}`}}),pl=new L({props:{code:`predictions = ["This plugin"]
references = [
    [
        "This plugin allows you to automatically translate web pages between several languages."
    ]
]
metric.compute(predictions=predictions, references=references)`,highlighted:`predictions = [<span class="hljs-string">&quot;This plugin&quot;</span>]
references = [
    [
        <span class="hljs-string">&quot;This plugin allows you to automatically translate web pages between several languages.&quot;</span>
    ]
]
metric.compute(predictions=predictions, references=references)`}}),ol=new L({props:{code:`{'score': 0.0,
 'counts': [2, 1, 0, 0],
 'totals': [2, 1, 0, 0],
 'precisions': [100.0, 100.0, 0.0, 0.0],
 'bp': 0.004086771438464067,
 'sys_len': 2,
 'ref_len': 13}`,highlighted:`{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0</span>,
 <span class="hljs-string">&#x27;counts&#x27;</span>: [<span class="hljs-number">2</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
 <span class="hljs-string">&#x27;totals&#x27;</span>: [<span class="hljs-number">2</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
 <span class="hljs-string">&#x27;precisions&#x27;</span>: [<span class="hljs-number">100.0</span>, <span class="hljs-number">100.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">0.0</span>],
 <span class="hljs-string">&#x27;bp&#x27;</span>: <span class="hljs-number">0.004086771438464067</span>,
 <span class="hljs-string">&#x27;sys_len&#x27;</span>: <span class="hljs-number">2</span>,
 <span class="hljs-string">&#x27;ref_len&#x27;</span>: <span class="hljs-number">13</span>}`}});const Mi=[Kc,Rc],vl=[];function Ii(e,i){return e[0]==="tf"?0:1}yt=Ii(G),Dt=vl[yt]=Mi[yt](G),fl=new L({props:{code:`from huggingface_hub import notebook_login

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

notebook_login()`}}),cl=new L({props:{code:"huggingface-cli login",highlighted:"huggingface-cli login"}});const Hi=[Xc,Gc],gl=[];function Ni(e,i){return e[0]==="tf"?0:1}Pt=Ni(G),Tt=gl[Pt]=Hi[Pt](G);let Qe=G[0]==="pt"&&Ec();return ml=new L({props:{code:`from transformers import pipeline

# Replace this with your own checkpoint
model_checkpoint = "huggingface-course/marian-finetuned-kde4-en-to-fr"
translator = pipeline("translation", model=model_checkpoint)
translator("Default to expanded threads")`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-comment"># Replace this with your own checkpoint</span>
model_checkpoint = <span class="hljs-string">&quot;huggingface-course/marian-finetuned-kde4-en-to-fr&quot;</span>
translator = pipeline(<span class="hljs-string">&quot;translation&quot;</span>, model=model_checkpoint)
translator(<span class="hljs-string">&quot;Default to expanded threads&quot;</span>)`}}),_l=new L({props:{code:"[{'translation_text': 'Par d\xE9faut, d\xE9velopper les fils de discussion'}]",highlighted:'[{<span class="hljs-string">&#x27;translation_text&#x27;</span>: <span class="hljs-string">&#x27;Par d\xE9faut, d\xE9velopper les fils de discussion&#x27;</span>}]'}}),dl=new L({props:{code:`translator(
    "Unable to import %1 using the OFX importer plugin. This file is not the correct format."
)`,highlighted:`translator(
    <span class="hljs-string">&quot;Unable to import %1 using the OFX importer plugin. This file is not the correct format.&quot;</span>
)`}}),hl=new L({props:{code:`[{'translation_text': "Impossible d'importer %1 en utilisant le module externe d'importation OFX. Ce fichier n'est pas le bon format."}]`,highlighted:'[{<span class="hljs-string">&#x27;translation_text&#x27;</span>: <span class="hljs-string">&quot;Impossible d&#x27;importer %1 en utilisant le module externe d&#x27;importation OFX. Ce fichier n&#x27;est pas le bon format.&quot;</span>}]'}}),ca=new _a({props:{$$slots:{default:[Zc]},$$scope:{ctx:G}}}),{c(){f=n("meta"),b=c(),w(d.$$.fragment),v=c(),C=n("h1"),$=a("\u7FFB\u8A33"),P=c(),g.c(),E=c(),F=n("p"),z=a("\u3067\u306F\u3001\u7FFB\u8A33\u30BF\u30B9\u30AF\u306B\u98DB\u3073\u8FBC\u3093\u3067\u307F\u307E\u3057\u3087\u3046\u3002\u3053\u308C\u3082"),A=n("a"),N=a("\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF"),S=a("\u3067\u3001\u3042\u308B\u914D\u5217\u304B\u3089\u5225\u306E\u914D\u5217\u3078\u3068\u3044\u3046\u5B9A\u5F0F\u5316\u304C\u53EF\u80FD\u306A\u554F\u984C\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u305D\u306E\u610F\u5473\u3067\u306F\u3001\u3053\u306E\u554F\u984C\u306F"),M=n("a"),X=a("\u8981\u7D04"),H=a("\u306B\u304B\u306A\u308A\u8FD1\u304F\u3001\u4ECA\u56DE\u5F97\u308B\u77E5\u8B58\u306F\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306A\u4ED6\u306E\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u554F\u984C\u306B\u9069\u5FDC\u3055\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),U=c(),W=n("ul"),Q=n("li"),J=n("p"),re=n("strong"),ne=a("\u30B9\u30BF\u30A4\u30EB\u8EE2\u9001"),Y=a(": \u3042\u308B\u30B9\u30BF\u30A4\u30EB\u3067\u66F8\u304B\u308C\u305F\u6587\u7AE0\u3092\u5225\u306E\u30B9\u30BF\u30A4\u30EB\u306B"),ue=n("em"),V=a("\u7FFB\u8A33"),se=a("\u3059\u308B\u30E2\u30C7\u30EB\u306E\u4F5C\u6210(\u4F8B\uFF1A\u30D5\u30A9\u30FC\u30DE\u30EB\u306A\u6587\u7AE0\u304B\u3089\u30AB\u30B8\u30E5\u30A2\u30EB\u306A\u6587\u7AE0\u3001\u30B7\u30A7\u30A4\u30AF\u30B9\u30D4\u30A2\u82F1\u8A9E\u304B\u3089\u73FE\u4EE3\u82F1\u8A9E\u306A\u3069\uFF09"),ee=c(),pe=n("li"),ie=n("p"),le=n("strong"),R=a("\u8CEA\u554F\u5FDC\u7B54\u751F\u6210"),B=a(": \u4E0E\u3048\u3089\u308C\u305F\u6587\u8108\u306B\u6CBF\u3063\u3066\u3001\u8CEA\u554F\u306B\u5BFE\u3059\u308B\u7B54\u3048\u3092\u751F\u6210\u3059\u308B\u30E2\u30C7\u30EB\u3092\u4F5C\u6210\u3059\u308B\u3002"),_e=c(),w(fe.$$.fragment),oe=c(),te=n("p"),$e=a("2\u8A00\u8A9E\uFF08\u307E\u305F\u306F\u305D\u308C\u4EE5\u4E0A\uFF09\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u5341\u5206\u306A\u5927\u304D\u3055\u306E\u30B3\u30FC\u30D1\u30B9\u304C\u3042\u308C\u3070\u3001"),be=n("a"),es=a("\u56E0\u679C\u8A00\u8A9E\u30E2\u30C7\u30EA\u30F3\u30B0"),Ae=a("\u3067\u8AAC\u660E\u3059\u308B\u3088\u3046\u306B\u3001\u65B0\u3057\u3044\u7FFB\u8A33\u30E2\u30C7\u30EB\u3092\u30BC\u30ED\u304B\u3089\u5B66\u7FD2\u3055\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3057\u304B\u3057\u3001mT5\u3084mBART\u306E\u3088\u3046\u306A\u591A\u8A00\u8A9E\u7FFB\u8A33\u30E2\u30C7\u30EB\u3092\u7279\u5B9A\u306E\u8A00\u8A9E\u30DA\u30A2\u306B\u5408\u3046\u3088\u3046\u306B\u5FAE\u8ABF\u6574\u3057\u305F\u308A\u3001\u3042\u308B\u8A00\u8A9E\u304B\u3089\u5225\u306E\u8A00\u8A9E\u3078\u306E\u7FFB\u8A33\u306B\u7279\u5316\u3057\u305F\u30E2\u30C7\u30EB\u3092\u7279\u5B9A\u306E\u30B3\u30FC\u30D1\u30B9\u306B\u5408\u3046\u3088\u3046\u306B\u5FAE\u8ABF\u6574\u3059\u308B\u65B9\u304C\u3001\u3088\u308A\u901F\u304F\u7FFB\u8A33\u30E2\u30C7\u30EB\u3092\u4F5C\u6210\u3067\u304D\u307E\u3059\u3002"),Le=c(),ae=n("p"),Ne=a("\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u306F\u3001\uFF08\u591A\u304F\u306EHugging Face\u793E\u54E1\u306F\u4E21\u65B9\u306E\u8A00\u8A9E\u3092\u8A71\u3059\u305F\u3081\uFF09\u82F1\u8A9E\u304B\u3089\u30D5\u30E9\u30F3\u30B9\u8A9E\u306B\u7FFB\u8A33\u3059\u308B\u3088\u3046\u306B\u4E8B\u524D\u306B\u5B66\u7FD2\u3057\u305FMarian\u30E2\u30C7\u30EB\u3092\u3001"),je=n("a"),ss=a("KDE4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),ke=a("\u3067\u5FAE\u8ABF\u6574\u3057\u307E\u3059\u3002\u3053\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F "),Fe=n("a"),Ee=a("KDE apps"),us=a(" \u306E\u30ED\u30FC\u30AB\u30E9\u30A4\u30BA\u30D5\u30A1\u30A4\u30EB\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u3059\u3002"),Be=c(),we=n("p"),Ue=a("\u79C1\u305F\u3061\u304C\u4F7F\u3046\u30E2\u30C7\u30EB\u306F\u3001\u5B9F\u969B\u306BKDE4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u542B\u3080"),ve=n("a"),qe=a("Opus dataset"),Re=a(" \u304B\u3089\u53D6\u5F97\u3057\u305F\u30D5\u30E9\u30F3\u30B9\u8A9E\u3068\u82F1\u8A9E\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u5927\u898F\u6A21\u306A\u30B3\u30FC\u30D1\u30B9\u3067\u4E8B\u524D\u5B66\u7FD2\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u79C1\u305F\u3061\u304C\u4F7F\u3046\u4E8B\u524D\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306F\u3001\u4E8B\u524D\u5B66\u7FD2\u4E2D\u306B\u305D\u306E\u30C7\u30FC\u30BF\u3092\u898B\u3066\u3044\u305F\u3068\u3057\u3066\u3082\u3001\u5FAE\u8ABF\u6574\u306E\u5F8C\u3001\u3088\u308A\u826F\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3053\u3068\u304C\u5206\u304B\u308B\u3067\u3057\u3087\u3046\u3002"),Ke=c(),Pe=n("p"),Ge=a("\u3053\u308C\u304C\u7D42\u308F\u308C\u3070\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306A\u4E88\u6E2C\u304C\u53EF\u80FD\u306A\u30E2\u30C7\u30EB\u304C\u5B8C\u6210\u3057\u307E\u3059\u3002"),Xe=c(),Z=n("iframe"),Te=c(),h=n("a"),K=n("img"),ks=c(),de=n("img"),ts=c(),me=n("p"),_s=a("\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3068\u540C\u69D8\u306B\u3001\u4EE5\u4E0B\u306E\u30B3\u30FC\u30C9\u3067\u5B66\u7FD2\u3057\u3066\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u5B9F\u969B\u306E\u30E2\u30C7\u30EB\u3092"),he=n("a"),vs=a("\u3053\u3053"),Ye=a("\u3067\u898B\u3064\u3051\u3001\u305D\u306E\u4E88\u6E2C\u7D50\u679C\u3092\u30C0\u30D6\u30EB\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u4E8B\u304C\u3067\u304D\u307E\u3059\u3002"),Me=c(),ge=n("h2"),ps=a("\u30C7\u30FC\u30BF\u306E\u6E96\u5099"),ds=c(),ce=n("p"),as=a("\u7FFB\u8A33\u30E2\u30C7\u30EB\u3092\u30BC\u30ED\u304B\u3089\u8ABF\u6574\u30FB\u5B66\u7FD2\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u305D\u306E\u30BF\u30B9\u30AF\u306B\u9069\u3057\u305F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C\u5FC5\u8981\u3067\u3059\u3002\u524D\u8FF0\u3057\u305F\u3088\u3046\u306B\u3001\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u306F "),ze=n("a"),et=a("KDE4 dataset"),os=a(" \u3092\u4F7F\u7528\u3057\u307E\u3059\u304C\u3001\u7FFB\u8A33\u3057\u305F\u30442\u3064\u306E\u8A00\u8A9E\u306E\u6587\u306E\u30DA\u30A2\u304C\u3042\u308C\u3070\u3001\u81EA\u5206\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B\u3088\u3046\u306B\u30B3\u30FC\u30C9\u3092\u9069\u5FDC\u3055\u305B\u308B\u3053\u3068\u306F\u975E\u5E38\u306B\u7C21\u5358\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30E0\u30C7\u30FC\u30BF\u3092 "),Ss=n("code"),gs=a("Dataset"),Os=a(" \u306B\u30ED\u30FC\u30C9\u3059\u308B\u65B9\u6CD5\u3092\u601D\u3044\u51FA\u3057\u305F\u3044\u5834\u5408\u306F\u3001"),is=n("a"),it=a("5\u7AE0"),Bs=a(" \u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),xe=c(),fs=n("h3"),Ze=n("a"),Ie=n("span"),w(Es.$$.fragment),ws=c(),Rs=n("span"),ft=a("KDE4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),qs=c(),He=n("p"),st=a("\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001 "),cs=n("code"),xs=a("load_dataset()"),Ks=a(" \u95A2\u6570\u3092\u4F7F\u7528\u3057\u3066\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002"),ye=c(),w(hs.$$.fragment),ls=c(),$s=n("p"),tt=a("\u7570\u306A\u308B\u8A00\u8A9E\u306E\u30DA\u30A2\u3092\u6271\u3044\u305F\u3044\u5834\u5408\u306F\u3001\u305D\u306E\u30B3\u30FC\u30C9\u3067\u6307\u5B9A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u306F\u3001\u5168\u90E8\u306792\u306E\u8A00\u8A9E\u304C\u5229\u7528\u3067\u304D\u307E\u3059\u3002\u305D\u306E"),Se=n("a"),ct=a("\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u30AB\u30FC\u30C9"),at=a("\u306E\u8A00\u8A9E\u30BF\u30B0\u3092\u5C55\u958B\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u8A00\u8A9E\u3092\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),_=c(),O=n("img"),Gs=c(),Xs=n("p"),zt=a("\u305D\u308C\u3067\u306F\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Je=c(),w(As.$$.fragment),ut=c(),w(ys.$$.fragment),Ce=c(),Ve=n("p"),De=a("210,173\u7D44\u306E\u6587\u304C\u3042\u308A\u307E\u3059\u304C\u30011\u56DE\u306E\u5206\u5272\u3067\u3001\u72EC\u81EA\u306E\u691C\u8A3C\u30BB\u30C3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Ws=n("a"),mt=a("\u7B2C5\u7AE0"),lt=a(" \u3067\u898B\u305F\u3088\u3046\u306B\u3001 "),rt=n("code"),Ct=a("Dataset"),nt=a(" \u306B\u306F "),Ls=n("code"),St=a("train_test_split()"),_t=a(" \u30E1\u30BD\u30C3\u30C9\u304C\u3042\u308A\u3001\u3053\u308C\u3092\u5229\u7528\u3057\u3066\u691C\u8A3C\u30BB\u30C3\u30C8\u306E\u4F5C\u6210\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u518D\u73FE\u6027\u3092\u9AD8\u3081\u308B\u305F\u3081\u306B\u30B7\u30FC\u30C9\u3092\u7528\u610F\u3057\u307E\u3059\u3002"),Ds=c(),w(Ps.$$.fragment),Ts=c(),w(zs.$$.fragment),rs=c(),Oe=n("p"),pt=a("\u4EE5\u4E0B\u306E\u3088\u3046\u306B "),ot=n("code"),Ot=a('"test"'),Fs=a(" \u30AD\u30FC\u3092 "),Us=n("code"),da=a('"validation"'),ha=a(" \u306B\u5909\u66F4\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Jt=c(),w(m.$$.fragment),I=c(),Ys=n("p"),Dl=a("\u3067\u306F\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E1\u3064\u306E\u8981\u7D20\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),$a=c(),w(At.$$.fragment),dt=c(),w(Lt.$$.fragment),ba=c(),Vt=n("p"),Pl=a(`\u5FC5\u8981\u306A\u8A00\u8A9E\u306E\u30DA\u30A2\u3067\u69CB\u6210\u3055\u308C\u308B2\u3064\u306E\u6587\u306E\u8F9E\u66F8\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3057\u305F\u3002\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u30B5\u30A4\u30A8\u30F3\u30B9\u306E\u5C02\u9580\u7528\u8A9E\u3092\u96C6\u3081\u305F\u3053\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u7279\u6B8A\u6027\u306F\u3001\u3059\u3079\u3066\u30D5\u30E9\u30F3\u30B9\u8A9E\u3067\u5B8C\u5168\u306B\u7FFB\u8A33\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u3067\u3059\u3002\u3057\u304B\u3057\u3001\u30D5\u30E9\u30F3\u30B9\u306E\u30A8\u30F3\u30B8\u30CB\u30A2\u306F\u6020\u60F0\u306A\u306E\u3067\u3001\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u30B5\u30A4\u30A8\u30F3\u30B9\u7279\u6709\u306E\u5358\u8A9E\u306F\u307B\u3068\u3093\u3069\u82F1\u8A9E\u5358\u8A9E\u306E\u307E\u307E\u3067\u4F1A\u8A71\u3057\u3066\u3044\u308B\u3053\u3068\u304C\u591A\u3044\u3067\u3059\u3002\u4F8B\u3048\u3070\u3001\u201Cthreads \u201C\u3068\u3044\u3046\u5358\u8A9E\u306F\u3001\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u6587\u7AE0\u3001\u7279\u306B\u6280\u8853\u7684\u306A\u4F1A\u8A71\u3067\u306F\u3088\u304F\u51FA\u3066\u304D\u307E\u3059\u304C\u3001\u3053\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u306F\u3001\u3088\u308A\u6B63\u3057\u3044 \u201Cfils de discussion \u201C\u306B\u7FFB\u8A33\u3057\u3066\u3044\u307E\u3059\u3002
\u3057\u304B\u3057\u3001\u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001\u3088\u308A\u5927\u304D\u306A\u30D5\u30E9\u30F3\u30B9\u8A9E\u3068\u82F1\u8A9E\u306E\u30B3\u30FC\u30D1\u30B9\u3067\u4E8B\u524D\u5B66\u7FD2\u3055\u308C\u3066\u3044\u308B\u306E\u3067\u3001\u3053\u306E\u5358\u8A9E\u3092\u305D\u306E\u307E\u307E\u306B\u3057\u3066\u304A\u304F\u3068\u3044\u3046\u7C21\u5358\u306A\u9078\u629E\u80A2\u3092\u3068\u3063\u3066\u3044\u307E\u3059\u3002`),ht=c(),w(Ft.$$.fragment),ja=c(),w(bs.$$.fragment),ka=c(),Qt=n("p"),Tl=a(`\u3053\u306E\u52D5\u4F5C\u306E\u3082\u3046\u4E00\u3064\u306E\u4F8B\u306F\u3001\u300Cplugin\u300D\u3068\u3044\u3046\u5358\u8A9E\u3067\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u306F\u6B63\u5F0F\u306A\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u5358\u8A9E\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001\u307B\u3068\u3093\u3069\u306E\u30D5\u30E9\u30F3\u30B9\u8A9E\u3092\u6BCD\u56FD\u8A9E\u3068\u3059\u308B\u4EBA\u304C\u7406\u89E3\u3067\u304D\u3001\u308F\u3056\u308F\u3056\u7FFB\u8A33\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002
KDE4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u306F\u3001\u3053\u306E\u5358\u8A9E\u306F\u3088\u308A\u6B63\u5F0F\u306A\u300Cmodule d\u2019extension\u300D\u3068\u30D5\u30E9\u30F3\u30B9\u8A9E\u3067\u7FFB\u8A33\u3055\u308C\u3066\u3044\u307E\u3059\u3002`),Zs=c(),w(Ut.$$.fragment),va=c(),w(Mt.$$.fragment),ga=c(),Js=n("p"),zl=a("\u3057\u304B\u3057\u3001\u79C1\u9054\u306E\u4E8B\u524D\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306F\u3001\u30B3\u30F3\u30D1\u30AF\u30C8\u3067\u89AA\u3057\u307F\u3084\u3059\u3044\u82F1\u5358\u8A9E\u306B\u56FA\u57F7\u3057\u307E\u3059\u3002"),Ea=c(),w(It.$$.fragment),$t=c(),w(Ht.$$.fragment),wa=c(),Vs=n("p"),Cl=a("\u3053\u306E\u3088\u3046\u306A\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u7279\u6B8A\u6027\u3092\u3001\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u304C\u62FE\u3044\u4E0A\u3052\u3066\u304F\u308C\u308B\u304B\u3069\u3046\u304B\u3001\u8208\u5473\u6DF1\u3044\u3068\u3053\u308D\u3067\u3059\u3002(\u30CD\u30BF\u30D0\u30EC\u6CE8\u610F\uFF1A\u62FE\u3063\u3066\u304F\u308C\u307E\u3059)"),qa=c(),w(Ms.$$.fragment),xa=c(),w(bt.$$.fragment),Qs=c(),Nt=n("h3"),Sl=a("\u30C7\u30FC\u30BF\u3092\u52A0\u5DE5\u3059\u308B"),ya=c(),w(Is.$$.fragment),Da=c(),jt=n("p"),Ol=a("\u3082\u3046\u304A\u5206\u304B\u308A\u3060\u3068\u601D\u3044\u307E\u3059\u304C\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u5168\u3066\u30C8\u30FC\u30AF\u30F3ID\u306E\u30BB\u30C3\u30C8\u306B\u5909\u63DB\u3057\u3001\u30E2\u30C7\u30EB\u304C\u610F\u5473\u3092\u7406\u89E3\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30BF\u30B9\u30AF\u306E\u305F\u3081\u306B\u3001\u5165\u529B\u3068\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u4E21\u65B9\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u6700\u521D\u306E\u30BF\u30B9\u30AF\u306F "),gr=n("code"),Ap=a("tokenizer"),Lp=a(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F5C\u6210\u3059\u308B\u3053\u3068\u3067\u3059\u3002"),Yr=c(),sa=n("p"),Fp=a("\u5148\u306B\u8FF0\u3079\u305F\u3088\u3046\u306B\u3001\u4ECA\u56DE\u306F\u82F1\u8A9E\u304B\u3089\u30D5\u30E9\u30F3\u30B9\u8A9E\u306B\u7FFB\u8A33\u3059\u308B\u3088\u3046\u306B\u4E8B\u524D\u5B66\u7FD2\u3057\u305FMarian\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u3082\u3057\u3053\u306E\u30B3\u30FC\u30C9\u3092\u4ED6\u306E\u8A00\u8A9E\u306E\u30DA\u30A2\u3067\u8A66\u3059\u5834\u5408\u306F\u3001\u30E2\u30C7\u30EB\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u9069\u5FDC\u3055\u305B\u3066\u304F\u3060\u3055\u3044\u3002"),Pa=n("a"),Up=a("Helsinki-NLP"),Mp=a(" \u3068\u3044\u3046\u7D44\u7E54\u304C\u591A\u8A00\u8A9E\u30671000\u4EE5\u4E0A\u306E\u30E2\u30C7\u30EB\u3092\u63D0\u4F9B\u3057\u3066\u3044\u307E\u3059\u3002"),Zr=c(),w(Ta.$$.fragment),Jr=c(),Bt=n("p"),Ip=a("\u307E\u305F\u3001"),Er=n("code"),Hp=a("model_checkpoint"),Np=a(" \u3092 "),za=n("a"),Bp=a("Hub"),Rp=a(" \u306B\u3042\u308B\u597D\u304D\u306A\u30E2\u30C7\u30EB\u3084\u3001\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u3084\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4FDD\u5B58\u3057\u305F\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u306B\u7F6E\u304D\u63DB\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Vr=c(),w(ta.$$.fragment),Qr=c(),aa=n("p"),Kp=a("\u30C7\u30FC\u30BF\u306E\u6E96\u5099\u306F\u3068\u3066\u3082\u7C21\u5358\u3067\u3059\u3002\u5165\u529B\u8A00\u8A9E\u306F\u901A\u5E38\u901A\u308A\u51E6\u7406\u3057\u307E\u3059\u304C\u3001\u30BF\u30FC\u30B2\u30C3\u30C8\u8A00\u8A9E\u306B\u3064\u3044\u3066\u306F\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC "),wr=n("code"),Gp=a("as_target_tokenizer()"),Xp=a(" \u306E\u4E2D\u306B\u30E9\u30C3\u30D7\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),en=c(),la=n("p"),Wp=a("Python \u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC\u306F "),qr=n("code"),Yp=a("with"),Zp=a(" \u6587\u3067\u5C0E\u5165\u3055\u308C\u30012\u3064\u306E\u95A2\u9023\u3059\u308B\u64CD\u4F5C\u3092\u30DA\u30A2\u3067\u5B9F\u884C\u3059\u308B\u3068\u304D\u306B\u4FBF\u5229\u3067\u3059\u3002\u6700\u3082\u4E00\u822C\u7684\u306A\u4F8B\u306F\u3001\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3093\u3060\u308A\u8AAD\u307F\u8FBC\u3093\u3060\u308A\u3059\u308B\u3068\u304D\u3067\u3001\u6B21\u306E\u3088\u3046\u306A\u547D\u4EE4\u306E\u5185\u90E8\u3067\u5B9F\u884C\u3055\u308C\u308B\u3053\u3068\u304C\u3088\u304F\u3042\u308A\u307E\u3059\u3002"),sn=c(),w(Ca.$$.fragment),tn=c(),Rt=n("p"),Jp=a("\u4E0A\u306E\u4F8B\u3067\u306F\u3001\u95A2\u9023\u3059\u308B2\u3064\u306E\u64CD\u4F5C\u3092\u30DA\u30A2\u3068\u3057\u3066\u5B9F\u884C\u3059\u308B\u3053\u3068\u3067\u3001\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u52D5\u4F5C\u3068\u9589\u3058\u308B\u52D5\u4F5C\u3092\u5B9F\u73FE\u3057\u3066\u3044\u307E\u3059\u3002\u30AA\u30FC\u30D7\u30F3\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB "),xr=n("code"),Vp=a("f"),Qp=a(" \u306B\u5BFE\u5FDC\u3059\u308B\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u3001 "),yr=n("code"),eo=a("with"),so=a(" \u306E\u4E0B\u306B\u3042\u308B\u30A4\u30F3\u30C7\u30F3\u30C8\u3055\u308C\u305F\u30D6\u30ED\u30C3\u30AF\u306E\u4E2D\u306B\u306E\u307F\u5B58\u5728\u3057\u3001\u30D5\u30A1\u30A4\u30EB\u306E\u30AA\u30FC\u30D7\u30F3\u306F\u305D\u306E\u30D6\u30ED\u30C3\u30AF\u306E\u524D\u306B\u3001\u30D5\u30A7\u30A4\u30EB\u306E\u30AF\u30ED\u30FC\u30BA\u306F\u30D6\u30ED\u30C3\u30AF\u306E\u6700\u5F8C\u306B\u884C\u308F\u308C\u307E\u3059\u3002"),an=c(),ra=n("p"),to=a("\u79C1\u9054\u306E\u30B1\u30FC\u30B9\u3067\u306F\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC "),Dr=n("code"),ao=a("as_target_tokenizer()"),lo=a(" \u306F\u3001\u30A4\u30F3\u30C7\u30F3\u30C8\u3055\u308C\u305F\u30D6\u30ED\u30C3\u30AF\u304C\u5B9F\u884C\u3055\u308C\u308B\u524D\u306B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u51FA\u529B\u8A00\u8A9E (\u3053\u3053\u3067\u306F\u30D5\u30E9\u30F3\u30B9\u8A9E) \u306B\u8A2D\u5B9A\u3057\u3001\u305D\u306E\u5F8C\u3001\u5165\u529B\u8A00\u8A9E (\u3053\u3053\u3067\u306F\u82F1\u8A9E) \u306B\u8A2D\u5B9A\u3057\u306A\u304A\u3057\u307E\u3059\u3002"),ln=c(),Al=n("p"),ro=a("\u3064\u307E\u308A\u3001\u30B5\u30F3\u30D7\u30EB\u306E\u524D\u51E6\u7406\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),rn=c(),w(Sa.$$.fragment),nn=c(),Ll=n("p"),no=a("\u3082\u3057\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30DE\u30CD\u30FC\u30B8\u30E3\u306E\u5185\u90E8\u3067\u30BF\u30FC\u30B2\u30C3\u30C8\u8A00\u8A9E\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u51E6\u7406\u3092\u5FD8\u308C\u308B\u3068\u3001\u5165\u529B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u3088\u3063\u3066\u30C8\u30FC\u30AF\u30F3\u5316\u3055\u308C\u3066\u3057\u307E\u3044\u3001Marian \u30E2\u30C7\u30EB\u306E\u5834\u5408\u3001\u5168\u304F\u3046\u307E\u304F\u3044\u304D\u307E\u305B\u3093\u3002"),pn=c(),w(Oa.$$.fragment),on=c(),w(Aa.$$.fragment),fn=c(),Fl=n("p"),po=a("\u3053\u306E\u3088\u3046\u306B\u3001\u82F1\u8A9E\u7528\u306E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4F7F\u3063\u3066\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u6587\u7AE0\u3092\u524D\u51E6\u7406\u3059\u308B\u3068\u3001\u30C8\u30FC\u30AF\u30F3\u306E\u6570\u304C\u591A\u304F\u306A\u308A\u307E\u3059\u3002\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306F\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u5358\u8A9E\u3092\u77E5\u3089\u306A\u3044\u304B\u3089\u3067\u3059\uFF08\u300Cdiscussion\u300D\u306E\u3088\u3046\u306B\u82F1\u8A9E\u3068\u5171\u901A\u3059\u308B\u5358\u8A9E\u306F\u9664\u304D\u307E\u3059\uFF09\u3002"),cn=c(),kt=n("p"),Pr=n("code"),oo=a("inputs"),io=a("\u3068"),Tr=n("code"),fo=a("targets"),co=a("\u306F\u3069\u3061\u3089\u3082\u901A\u5E38\u306E\u30AD\u30FC\uFF08\u5165\u529BID\u3001\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u306A\u3069\uFF09\u3092\u6301\u3064\u8F9E\u66F8\u306A\u306E\u3067\u3001\u6700\u5F8C\u306E\u30B9\u30C6\u30C3\u30D7\u306F\u5165\u529B\u306E\u4E2D\u306B "),zr=n("code"),uo=a('"labels"'),mo=a(" \u30AD\u30FC\u3092\u8A2D\u5B9A\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u3053\u308C\u306F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306B\u9069\u7528\u3059\u308B\u524D\u51E6\u7406\u95A2\u6570\u3067\u884C\u3044\u307E\u3059\u3002"),un=c(),w(La.$$.fragment),mn=c(),Ul=n("p"),_o=a("\u5165\u529B\u3068\u51FA\u529B\u306B\u540C\u69D8\u306A\u6700\u5927\u9577\u3092\u8A2D\u5B9A\u3057\u3066\u3044\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u6271\u3046\u30C6\u30AD\u30B9\u30C8\u306F\u304B\u306A\u308A\u77ED\u3044\u3068\u601D\u308F\u308C\u308B\u306E\u3067\u3001128\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"),_n=c(),w(na.$$.fragment),dn=c(),w(pa.$$.fragment),hn=c(),Ml=n("p"),ho=a("\u3053\u308C\u3067\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u3059\u3079\u3066\u306E\u5206\u5272\u306B\u5BFE\u3057\u3066\u3001\u3053\u306E\u524D\u51E6\u7406\u3092\u4E00\u5EA6\u306B\u9069\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002"),$n=c(),w(Fa.$$.fragment),bn=c(),Il=n("p"),$o=a("\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u304C\u7D42\u308F\u3063\u305F\u306E\u3067\u3001\u6B21\u306F\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3044\u307E\u3059\uFF01"),jn=c(),gt.c(),Hl=c(),Nl=n("p"),bo=a("\u306A\u304A\u3001\u4ECA\u56DE\u306F\u7FFB\u8A33\u30BF\u30B9\u30AF\u3067\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3057\u3066\u304A\u308A\u3001\u5B9F\u969B\u306B\u3059\u3067\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u306E\u3067\u3001\u91CD\u307F\u306E\u6B20\u843D\u3084\u65B0\u305F\u306B\u521D\u671F\u5316\u3055\u308C\u305F\u3082\u306E\u306B\u3064\u3044\u3066\u306E\u8B66\u544A\u306F\u51FA\u3066\u3044\u307E\u305B\u3093\u3002"),kn=c(),Ua=n("h3"),jo=a("\u30C7\u30FC\u30BF\u306E\u7167\u5408"),vn=c(),Kt=n("p"),ko=a("\u52D5\u7684\u30D0\u30C3\u30C1\u51E6\u7406\u7528\u306E\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u884C\u3046\u305F\u3081\u306B\u3001\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002\u3053\u306E\u5834\u5408\u3001"),Bl=n("a"),vo=a("\u7B2C3\u7AE0"),go=a(" \u306E\u3088\u3046\u306A "),Cr=n("code"),Eo=a("DataCollatorWithPadding"),wo=a(" \u3092\u4F7F\u3046\u308F\u3051\u306B\u306F\u3044\u304D\u307E\u305B\u3093\u3002"),gn=c(),oa=n("p"),qo=a("\u306A\u305C\u306A\u3089\u3001\u305D\u308C\u306F\u5165\u529B\uFF08\u5165\u529BID\u3001\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u3001\u30C8\u30FC\u30AF\u30F3\u30BF\u30A4\u30D7ID\uFF09\u3060\u3051\u3092\u30D1\u30C7\u30A3\u30F3\u30B0\u3059\u308B\u3082\u306E\u3060\u304B\u3089\u3067\u3059\u3002\u79C1\u305F\u3061\u306E\u30E9\u30D9\u30EB\u3082\u3001\u30E9\u30D9\u30EB\u3067\u906D\u9047\u3059\u308B\u6700\u5927\u9577\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u308B\u3079\u304D\u3067\u3059\u3002\u305D\u3057\u3066\u3001\u524D\u8FF0\u3057\u305F\u3088\u3046\u306B\u3001\u3053\u308C\u3089\u306E\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u305F\u5024\u304C\u640D\u5931\u8A08\u7B97\u3067\u7121\u8996\u3055\u308C\u308B\u3088\u3046\u306B\u3001\u30E9\u30D9\u30EB\u3092\u30D1\u30C7\u30A3\u30F3\u30B0\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u308B\u30D1\u30C7\u30A3\u30F3\u30B0\u5024\u306F\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306E\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u3067\u306F\u306A\u304F\u3001"),Sr=n("code"),xo=a("-100"),yo=a("\u3067\u3042\u308B\u3079\u304D\u3067\u3059\u3002"),En=c(),ns=n("p"),Do=a("\u3053\u308C\u306F\u3059\u3079\u3066 "),Ma=n("a"),Or=n("code"),Po=a("DataCollatorForSeq2Seq"),To=a(" \u306B\u3088\u3063\u3066\u884C\u308F\u308C\u307E\u3059\u3002"),Ar=n("code"),zo=a("DataCollatorWithPadding"),Co=a(" \u3068\u540C\u69D8\u306B\u3001\u5165\u529B\u306E\u524D\u51E6\u7406\u306B\u4F7F\u7528\u3057\u305F "),Lr=n("code"),So=a("tokenizer"),Oo=a(" \u3092\u53D7\u3051\u53D6\u308A\u307E\u3059\u304C\u3001 "),Fr=n("code"),Ao=a("model"),Lo=a(" \u3082\u53D7\u3051\u53D6\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u3053\u306E\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u304C\u30C7\u30B3\u30FC\u30C0\u30FC\u306E\u5165\u529B ID \u3092\u6E96\u5099\u3059\u308B\u5F79\u5272\u3082\u62C5\u3046\u304B\u3089\u3067\u3059\u3002\u3053\u306E ID \u306F\u3001\u30E9\u30D9\u30EB\u3092\u30B7\u30D5\u30C8\u3057\u305F\u3082\u306E\u3067\u3001\u5148\u982D\u306B\u7279\u5225\u306A\u30C8\u30FC\u30AF\u30F3\u304C\u4ED8\u52A0\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u30B7\u30D5\u30C8\u306F\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u306B\u3088\u3063\u3066\u82E5\u5E72\u7570\u306A\u308B\u306E\u3067\u3001 "),Ur=n("code"),Fo=a("DataCollatorForSeq2Seq"),Uo=a(" \u306F "),Mr=n("code"),Mo=a("model"),Io=a(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u77E5\u3063\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),wn=c(),wt.c(),Rl=c(),Kl=n("p"),Ho=a("\u3044\u304F\u3064\u304B\u306E\u30B5\u30F3\u30D7\u30EB\u3067\u3053\u308C\u3092\u30C6\u30B9\u30C8\u3059\u308B\u5834\u5408\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306E\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u304B\u3089\u53D6\u5F97\u3057\u305F\u30B5\u30F3\u30D7\u30EB\u306E\u30EA\u30B9\u30C8\u306B\u5BFE\u3057\u3066\u547C\u3073\u51FA\u3059\u3060\u3051\u3067\u3059\u3002"),qn=c(),w(Ia.$$.fragment),xn=c(),w(Ha.$$.fragment),yn=c(),ia=n("p"),No=a("\u30E9\u30D9\u30EB\u304C\u30D0\u30C3\u30C1\u306E\u6700\u5927\u9577\u306B\u306A\u308B\u3088\u3046\u306B"),Ir=n("code"),Bo=a("-100"),Ro=a(" \u3092\u4F7F\u3063\u3066\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002"),Dn=c(),w(Na.$$.fragment),Pn=c(),w(Ba.$$.fragment),Tn=c(),Gl=n("p"),Ko=a("\u307E\u305F\u3001\u30C7\u30B3\u30FC\u30C0\u30FC\u306E\u5165\u529BID\u3092\u898B\u308B\u3068\u3001\u30E9\u30D9\u30EB\u3092\u30B7\u30D5\u30C8\u3055\u305B\u305F\u3082\u306E\u3067\u3042\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002"),zn=c(),w(Ra.$$.fragment),Cn=c(),w(Ka.$$.fragment),Sn=c(),Xl=n("p"),Go=a("\u4EE5\u4E0B\u306F\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E1\u756A\u76EE\u30682\u756A\u76EE\u306E\u8981\u7D20\u306B\u5BFE\u3059\u308B\u30E9\u30D9\u30EB\u3067\u3059\u3002"),On=c(),w(Ga.$$.fragment),An=c(),w(Xa.$$.fragment),Ln=c(),xt.c(),Wl=c(),Wa=n("h3"),Xo=a("\u6307\u6A19"),Fn=c(),w(Ya.$$.fragment),Un=c(),Cs&&Cs.c(),Yl=c(),Gt=n("p"),Wo=a("\u7FFB\u8A33\u306B\u4F7F\u308F\u308C\u308B\u4F1D\u7D71\u7684\u306A\u6307\u6A19\u306F\u3001"),Za=n("a"),Yo=a("BLEU score"),Zo=a(" \u3067\u3059\u3002\u3053\u308C\u306FKishore Papineni\u3089\u306B\u3088\u3063\u3066\u3001"),Ja=n("a"),Jo=a("a 2002 article"),Vo=a(" \u3067\u7D39\u4ECB\u3055\u308C\u305F\u6307\u6A19\u3067\u3001\u7FFB\u8A33\u6587\u304C\u305D\u306E\u30E9\u30D9\u30EB\u306B\u3069\u308C\u3060\u3051\u8FD1\u3044\u304B\u3092\u8A55\u4FA1\u3059\u308B\u3082\u306E\u3067\u3059\u3002"),Mn=c(),Zl=n("p"),Qo=a("\u30E2\u30C7\u30EB\u306E\u751F\u6210\u3057\u305F\u51FA\u529B\u6587\u306E\u660E\u77AD\u5EA6\u3084\u6587\u6CD5\u7684\u306A\u6B63\u3057\u3055\u306F\u6E2C\u5B9A\u3057\u307E\u305B\u3093\u304C\u3001\u751F\u6210\u3057\u305F\u51FA\u529B\u306B\u542B\u307E\u308C\u308B\u3059\u3079\u3066\u306E\u5358\u8A9E\u304C\u30BF\u30FC\u30B2\u30C3\u30C8\u306B\u3082\u73FE\u308C\u308B\u3088\u3046\u306B\u3001\u7D71\u8A08\u7684\u306A\u30EB\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u307E\u305F\u3001\u540C\u3058\u5358\u8A9E\u306E\u7E70\u308A\u8FD4\u3057\u304C\u5143\u6587\u7AE0\u306B\u306A\u3044\u5834\u5408\u306F\u30DA\u30CA\u30EB\u30C6\u30A3\u3092\u4E0E\u3048\u308B\u30EB\u30FC\u30EB\uFF08\u30E2\u30C7\u30EB\u304C\u300Cthe the the the\u300D\u306E\u3088\u3046\u306A\u6587\u7AE0\u3092\u51FA\u529B\u3057\u306A\u3044\u3088\u3046\u306B\uFF09\u3084\u3001\u30BF\u30FC\u30B2\u30C3\u30C8\u3088\u308A\u77ED\u3044\u6587\u7AE0\u3092\u51FA\u529B\u3059\u308B\u3068\u30DA\u30CA\u30EB\u30C6\u30A3\u3092\u4E0E\u3048\u308B\u30EB\u30FC\u30EB\uFF08\u30E2\u30C7\u30EB\u304C\u300Cthe\u300D\u306E\u3088\u3046\u306A\u6587\u7AE0\u3092\u51FA\u529B\u3057\u306A\u3044\u3088\u3046\u306B\uFF09\u306A\u3069\u304C\u3042\u308A\u307E\u3059\u3002"),In=c(),fa=n("p"),ei=a("BLEU\u306E\u5F31\u70B9\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u304C\u3059\u3067\u306B\u30C8\u30FC\u30AF\u30F3\u5316\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u3092\u524D\u63D0\u3068\u3057\u3066\u3044\u308B\u305F\u3081\u3001\u7570\u306A\u308B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4F7F\u7528\u3059\u308B\u30E2\u30C7\u30EB\u9593\u3067\u30B9\u30B3\u30A2\u3092\u6BD4\u8F03\u3059\u308B\u3053\u3068\u304C\u56F0\u96E3\u306A\u70B9\u3067\u3059\u3002\u305D\u3053\u3067\u3001\u73FE\u5728\u7FFB\u8A33\u30E2\u30C7\u30EB\u306E\u30D9\u30F3\u30C1\u30DE\u30FC\u30AF\u3068\u3057\u3066\u6700\u3082\u3088\u304F\u4F7F\u308F\u308C\u3066\u3044\u308B\u306E\u304C"),Va=n("a"),si=a("SacreBLEU"),ti=a("\u3067\u3059\u3002\u30C8\u30FC\u30AF\u30F3\u5316\u30B9\u30C6\u30C3\u30D7\u3092\u6A19\u6E96\u5316\u3059\u308B\u3053\u3068\u3067\u3001\u3053\u306E\u5F31\u70B9\uFF08\u304A\u3088\u3073\u305D\u306E\u4ED6\u306E\u5F31\u70B9\uFF09\u3092\u89E3\u6C7A\u3057\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u6307\u6A19\u3092\u4F7F\u3046\u306B\u306F\u3001\u307E\u305ASacreBLEU\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Hn=c(),w(Qa.$$.fragment),Nn=c(),Xt=n("p"),ai=a("\u305D\u3057\u3066\u3001"),Jl=n("a"),li=a("\u7B2C3\u7AE0"),ri=a(" \u3067\u884C\u3063\u305F\u3088\u3046\u306B "),Hr=n("code"),ni=a("evaluate.load()"),pi=a(" \u3067\u8AAD\u307F\u8FBC\u3080\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),Bn=c(),w(el.$$.fragment),Rn=c(),Vl=n("p"),oi=a("\u3053\u306E\u6307\u6A19\u306F\u30C6\u30AD\u30B9\u30C8\u3092\u5165\u529B\u3068\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u3057\u3066\u53D7\u3051\u53D6\u308A\u307E\u3059\u3002\u540C\u3058\u6587\u3067\u3082\u8907\u6570\u306E\u7FFB\u8A33\u304C\u3042\u308B\u3053\u3068\u304C\u591A\u3044\u306E\u3067\u3001\u8907\u6570\u306E\u7FFB\u8A33\u3092\u53D7\u3051\u5165\u308C\u308B\u3088\u3046\u306B\u8A2D\u8A08\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u79C1\u305F\u3061\u304C\u4F7F\u3063\u3066\u3044\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F1\u3064\u3057\u304B\u63D0\u4F9B\u3057\u3066\u3044\u307E\u305B\u3093\u304C\u3001NLP\u3067\u306F\u8907\u6570\u306E\u6587\u3092\u30E9\u30D9\u30EB\u3068\u3057\u3066\u4E0E\u3048\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C\u73CD\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002\u3064\u307E\u308A\u3001\u4E88\u6E2C\u306F\u6587\u306E\u30EA\u30B9\u30C8\u3067\u3042\u308B\u3079\u304D\u3067\u3059\u304C\u3001\u305D\u306E\u53C2\u7167\u306F\u6587\u306E\u30EA\u30B9\u30C8\u306E\u30EA\u30B9\u30C8\u3067\u3042\u308B\u3079\u304D\u306A\u306E\u3067\u3059\u3002"),Kn=c(),Ql=n("p"),ii=a("\u4F8B\u3092\u3084\u3063\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Gn=c(),w(sl.$$.fragment),Xn=c(),w(tl.$$.fragment),Wn=c(),er=n("p"),fi=a("\u3053\u306E\u7D50\u679C\u3001BLEU\u30B9\u30B3\u30A2\u306F46.75\u3068\u306A\u308A\u307E\u3057\u305F\u3002\u3053\u308C\u306F\u304B\u306A\u308A\u826F\u3044\u7D50\u679C\u3067\u3059\u3002"),Yn=c(),Hs=n("p"),ci=a("\u53C2\u8003\u307E\u3067\u306B\u3001"),al=n("a"),ui=a("\u201CAttention Is All You Need\u201D \u8AD6\u6587"),mi=a(" \u306E\u30AA\u30EA\u30B8\u30CA\u30EB\u306ETransformer\u30E2\u30C7\u30EB\u306F\u3001\u82F1\u8A9E\u3068\u30D5\u30E9\u30F3\u30B9\u8A9E\u9593\u306E\u540C\u69D8\u306E\u7FFB\u8A33\u30BF\u30B9\u30AF\u3067BLEU\u30B9\u30B3\u30A241.8\u3092\u9054\u6210\u3057\u307E\u3057\u305F\uFF01\uFF08"),Nr=n("code"),_i=a("count"),di=a("\u3084"),Br=n("code"),hi=a("bp"),$i=a("\u306A\u3069\u306E\u500B\u3005\u306E\u6307\u6A19\u306E\u8A73\u7D30\u306F"),ll=n("a"),bi=a("SacreBLEU\u30EA\u30DD\u30B8\u30C8\u30EA"),ji=a("\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044)\u3002"),Zn=c(),sr=n("p"),ki=a("\u4E00\u65B9\u3001\u7FFB\u8A33\u30E2\u30C7\u30EB\u304B\u3089\u3088\u304F\u51FA\u3066\u304F\u308B2\u3064\u306E\u60AA\u3044\u30BF\u30A4\u30D7\u306E\u4E88\u6E2C\uFF08\u5358\u8A9E\u306E\u7E70\u308A\u8FD4\u3057\u304C\u591A\u3044\u3001\u307E\u305F\u306F\u77ED\u3059\u304E\u308B\uFF09\u3067\u8A66\u3059\u3068\u3001\u304B\u306A\u308A\u60AA\u3044BLEU\u30B9\u30B3\u30A2\u304C\u5F97\u3089\u308C\u307E\u3059\u3002"),Jn=c(),w(rl.$$.fragment),Vn=c(),w(nl.$$.fragment),Qn=c(),w(pl.$$.fragment),ep=c(),w(ol.$$.fragment),sp=c(),tr=n("p"),vi=a("\u30B9\u30B3\u30A2\u306F0\u304B\u3089100\u307E\u3067\u3042\u308A\u3001\u9AD8\u3051\u308C\u3070\u9AD8\u3044\u307B\u3069\u826F\u3044\u30B9\u30B3\u30A2\u3067\u3059\u3002"),tp=c(),Dt.c(),ar=c(),lr=n("p"),gi=a("\u3053\u308C\u3067\u3001\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3059\u308B\u6E96\u5099\u304C\u6574\u3044\u307E\u3057\u305F\uFF01"),ap=c(),il=n("h3"),Ei=a("\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574"),lp=c(),rr=n("p"),wi=a("\u6700\u521D\u306E\u30B9\u30C6\u30C3\u30D7\u306F\u3001\u30CF\u30AE\u30F3\u30B0 \u30D5\u30A7\u30A4\u30B9\u306B\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u3001\u7D50\u679C\u3092Model Hub\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u305D\u306E\u305F\u3081\u306E\u4FBF\u5229\u306A\u6A5F\u80FD\u304C\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u306B\u3042\u308A\u307E\u3059\u3002"),rp=c(),w(fl.$$.fragment),np=c(),nr=n("p"),qi=a(`\u3053\u308C\u306F\u3001\u30CF\u30AE\u30F3\u30B0 \u30D5\u30A7\u30A4\u30B9\u306E\u30ED\u30B0\u30A4\u30F3\u60C5\u5831\u3092\u5165\u529B\u3059\u308B\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067\u4F5C\u696D\u3057\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u3001\u30BF\u30FC\u30DF\u30CA\u30EB\u3067\u6B21\u306E\u884C\u3092\u5165\u529B\u3059\u308B\u3060\u3051\u3067\u3059\u3002`),pp=c(),w(cl.$$.fragment),op=c(),Tt.c(),pr=c(),Qe&&Qe.c(),or=c(),ul=n("h2"),xi=a("\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u3046"),ip=c(),ir=n("p"),yi=a("\u30E2\u30C7\u30EB\u30CF\u30D6\u3067\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3067\u4F7F\u7528\u3059\u308B\u65B9\u6CD5\u306F\u65E2\u306B\u7D39\u4ECB\u3057\u307E\u3057\u305F\u3002\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u3067\u4F7F\u7528\u3059\u308B\u5834\u5408\u306F\u3001\u30E2\u30C7\u30EB\u8B58\u5225\u5B50\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002"),fp=c(),w(ml.$$.fragment),cp=c(),w(_l.$$.fragment),up=c(),fr=n("p"),Di=a("\u4E88\u60F3\u901A\u308A\u3001\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u306F\u3001\u5FAE\u8ABF\u6574\u3057\u305F\u30B3\u30FC\u30D1\u30B9\u306B\u77E5\u8B58\u3092\u9069\u5FDC\u3055\u305B\u3001\u82F1\u8A9E\u306E\u300Cthreads\u300D\u3092\u305D\u306E\u307E\u307E\u306B\u305B\u305A\u3001\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u6B63\u5F0F\u306A\u30D0\u30FC\u30B8\u30E7\u30F3\u306B\u7FFB\u8A33\u3059\u308B\u3088\u3046\u306B\u306A\u3063\u305F\u306E\u3067\u3059\u3002\u300Cplugin\u300D\u306B\u3064\u3044\u3066\u3082\u540C\u3058\u3067\u3059\u3002"),mp=c(),w(dl.$$.fragment),_p=c(),w(hl.$$.fragment),dp=c(),cr=n("p"),Pi=a("\u30C9\u30E1\u30A4\u30F3\u9069\u5FDC\u306E\u597D\u4F8B\u304C\u307E\u305F\u4E00\u3064\u5897\u3048\u307E\u3057\u305F\u306D\uFF01"),hp=c(),w(ca.$$.fragment),this.h()},l(e){const i=Dc('[data-svelte="svelte-1phssyn"]',document.head);f=p(i,"META",{name:!0,content:!0}),i.forEach(s),b=u(e),q(d.$$.fragment,e),v=u(e),C=p(e,"H1",{id:!0});var Rr=o(C);$=l(Rr,"\u7FFB\u8A33"),Rr.forEach(s),P=u(e),g.l(e),E=u(e),F=p(e,"P",{});var Wt=o(F);z=l(Wt,"\u3067\u306F\u3001\u7FFB\u8A33\u30BF\u30B9\u30AF\u306B\u98DB\u3073\u8FBC\u3093\u3067\u307F\u307E\u3057\u3087\u3046\u3002\u3053\u308C\u3082"),A=p(Wt,"A",{href:!0});var Kr=o(A);N=l(Kr,"\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF"),Kr.forEach(s),S=l(Wt,"\u3067\u3001\u3042\u308B\u914D\u5217\u304B\u3089\u5225\u306E\u914D\u5217\u3078\u3068\u3044\u3046\u5B9A\u5F0F\u5316\u304C\u53EF\u80FD\u306A\u554F\u984C\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u305D\u306E\u610F\u5473\u3067\u306F\u3001\u3053\u306E\u554F\u984C\u306F"),M=p(Wt,"A",{href:!0});var Gr=o(M);X=l(Gr,"\u8981\u7D04"),Gr.forEach(s),H=l(Wt,"\u306B\u304B\u306A\u308A\u8FD1\u304F\u3001\u4ECA\u56DE\u5F97\u308B\u77E5\u8B58\u306F\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306A\u4ED6\u306E\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u554F\u984C\u306B\u9069\u5FDC\u3055\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Wt.forEach(s),U=u(e),W=p(e,"UL",{});var El=o(W);Q=p(El,"LI",{});var Xr=o(Q);J=p(Xr,"P",{});var ea=o(J);re=p(ea,"STRONG",{});var ur=o(re);ne=l(ur,"\u30B9\u30BF\u30A4\u30EB\u8EE2\u9001"),ur.forEach(s),Y=l(ea,": \u3042\u308B\u30B9\u30BF\u30A4\u30EB\u3067\u66F8\u304B\u308C\u305F\u6587\u7AE0\u3092\u5225\u306E\u30B9\u30BF\u30A4\u30EB\u306B"),ue=p(ea,"EM",{});var mr=o(ue);V=l(mr,"\u7FFB\u8A33"),mr.forEach(s),se=l(ea,"\u3059\u308B\u30E2\u30C7\u30EB\u306E\u4F5C\u6210(\u4F8B\uFF1A\u30D5\u30A9\u30FC\u30DE\u30EB\u306A\u6587\u7AE0\u304B\u3089\u30AB\u30B8\u30E5\u30A2\u30EB\u306A\u6587\u7AE0\u3001\u30B7\u30A7\u30A4\u30AF\u30B9\u30D4\u30A2\u82F1\u8A9E\u304B\u3089\u73FE\u4EE3\u82F1\u8A9E\u306A\u3069\uFF09"),ea.forEach(s),Xr.forEach(s),ee=u(El),pe=p(El,"LI",{});var _r=o(pe);ie=p(_r,"P",{});var wl=o(ie);le=p(wl,"STRONG",{});var Wr=o(le);R=l(Wr,"\u8CEA\u554F\u5FDC\u7B54\u751F\u6210"),Wr.forEach(s),B=l(wl,": \u4E0E\u3048\u3089\u308C\u305F\u6587\u8108\u306B\u6CBF\u3063\u3066\u3001\u8CEA\u554F\u306B\u5BFE\u3059\u308B\u7B54\u3048\u3092\u751F\u6210\u3059\u308B\u30E2\u30C7\u30EB\u3092\u4F5C\u6210\u3059\u308B\u3002"),wl.forEach(s),_r.forEach(s),El.forEach(s),_e=u(e),q(fe.$$.fragment,e),oe=u(e),te=p(e,"P",{});var bp=o(te);$e=l(bp,"2\u8A00\u8A9E\uFF08\u307E\u305F\u306F\u305D\u308C\u4EE5\u4E0A\uFF09\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u5341\u5206\u306A\u5927\u304D\u3055\u306E\u30B3\u30FC\u30D1\u30B9\u304C\u3042\u308C\u3070\u3001"),be=p(bp,"A",{href:!0});var Bi=o(be);es=l(Bi,"\u56E0\u679C\u8A00\u8A9E\u30E2\u30C7\u30EA\u30F3\u30B0"),Bi.forEach(s),Ae=l(bp,"\u3067\u8AAC\u660E\u3059\u308B\u3088\u3046\u306B\u3001\u65B0\u3057\u3044\u7FFB\u8A33\u30E2\u30C7\u30EB\u3092\u30BC\u30ED\u304B\u3089\u5B66\u7FD2\u3055\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3057\u304B\u3057\u3001mT5\u3084mBART\u306E\u3088\u3046\u306A\u591A\u8A00\u8A9E\u7FFB\u8A33\u30E2\u30C7\u30EB\u3092\u7279\u5B9A\u306E\u8A00\u8A9E\u30DA\u30A2\u306B\u5408\u3046\u3088\u3046\u306B\u5FAE\u8ABF\u6574\u3057\u305F\u308A\u3001\u3042\u308B\u8A00\u8A9E\u304B\u3089\u5225\u306E\u8A00\u8A9E\u3078\u306E\u7FFB\u8A33\u306B\u7279\u5316\u3057\u305F\u30E2\u30C7\u30EB\u3092\u7279\u5B9A\u306E\u30B3\u30FC\u30D1\u30B9\u306B\u5408\u3046\u3088\u3046\u306B\u5FAE\u8ABF\u6574\u3059\u308B\u65B9\u304C\u3001\u3088\u308A\u901F\u304F\u7FFB\u8A33\u30E2\u30C7\u30EB\u3092\u4F5C\u6210\u3067\u304D\u307E\u3059\u3002"),bp.forEach(s),Le=u(e),ae=p(e,"P",{});var dr=o(ae);Ne=l(dr,"\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u306F\u3001\uFF08\u591A\u304F\u306EHugging Face\u793E\u54E1\u306F\u4E21\u65B9\u306E\u8A00\u8A9E\u3092\u8A71\u3059\u305F\u3081\uFF09\u82F1\u8A9E\u304B\u3089\u30D5\u30E9\u30F3\u30B9\u8A9E\u306B\u7FFB\u8A33\u3059\u308B\u3088\u3046\u306B\u4E8B\u524D\u306B\u5B66\u7FD2\u3057\u305FMarian\u30E2\u30C7\u30EB\u3092\u3001"),je=p(dr,"A",{href:!0,rel:!0});var Ri=o(je);ss=l(Ri,"KDE4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),Ri.forEach(s),ke=l(dr,"\u3067\u5FAE\u8ABF\u6574\u3057\u307E\u3059\u3002\u3053\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F "),Fe=p(dr,"A",{href:!0,rel:!0});var Ki=o(Fe);Ee=l(Ki,"KDE apps"),Ki.forEach(s),us=l(dr," \u306E\u30ED\u30FC\u30AB\u30E9\u30A4\u30BA\u30D5\u30A1\u30A4\u30EB\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u3059\u3002"),dr.forEach(s),Be=u(e),we=p(e,"P",{});var jp=o(we);Ue=l(jp,"\u79C1\u305F\u3061\u304C\u4F7F\u3046\u30E2\u30C7\u30EB\u306F\u3001\u5B9F\u969B\u306BKDE4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u542B\u3080"),ve=p(jp,"A",{href:!0,rel:!0});var Gi=o(ve);qe=l(Gi,"Opus dataset"),Gi.forEach(s),Re=l(jp," \u304B\u3089\u53D6\u5F97\u3057\u305F\u30D5\u30E9\u30F3\u30B9\u8A9E\u3068\u82F1\u8A9E\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u5927\u898F\u6A21\u306A\u30B3\u30FC\u30D1\u30B9\u3067\u4E8B\u524D\u5B66\u7FD2\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u79C1\u305F\u3061\u304C\u4F7F\u3046\u4E8B\u524D\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306F\u3001\u4E8B\u524D\u5B66\u7FD2\u4E2D\u306B\u305D\u306E\u30C7\u30FC\u30BF\u3092\u898B\u3066\u3044\u305F\u3068\u3057\u3066\u3082\u3001\u5FAE\u8ABF\u6574\u306E\u5F8C\u3001\u3088\u308A\u826F\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3053\u3068\u304C\u5206\u304B\u308B\u3067\u3057\u3087\u3046\u3002"),jp.forEach(s),Ke=u(e),Pe=p(e,"P",{});var Xi=o(Pe);Ge=l(Xi,"\u3053\u308C\u304C\u7D42\u308F\u308C\u3070\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306A\u4E88\u6E2C\u304C\u53EF\u80FD\u306A\u30E2\u30C7\u30EB\u304C\u5B8C\u6210\u3057\u307E\u3059\u3002"),Xi.forEach(s),Xe=u(e),Z=p(e,"IFRAME",{src:!0,frameborder:!0,height:!0,title:!0,class:!0,allow:!0,sandbox:!0}),o(Z).forEach(s),Te=u(e),h=p(e,"A",{class:!0,href:!0});var kp=o(h);K=p(kp,"IMG",{class:!0,src:!0,alt:!0}),ks=u(kp),de=p(kp,"IMG",{class:!0,src:!0,alt:!0}),kp.forEach(s),ts=u(e),me=p(e,"P",{});var vp=o(me);_s=l(vp,"\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3068\u540C\u69D8\u306B\u3001\u4EE5\u4E0B\u306E\u30B3\u30FC\u30C9\u3067\u5B66\u7FD2\u3057\u3066\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u5B9F\u969B\u306E\u30E2\u30C7\u30EB\u3092"),he=p(vp,"A",{href:!0,rel:!0});var Wi=o(he);vs=l(Wi,"\u3053\u3053"),Wi.forEach(s),Ye=l(vp,"\u3067\u898B\u3064\u3051\u3001\u305D\u306E\u4E88\u6E2C\u7D50\u679C\u3092\u30C0\u30D6\u30EB\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u4E8B\u304C\u3067\u304D\u307E\u3059\u3002"),vp.forEach(s),Me=u(e),ge=p(e,"H2",{id:!0});var Yi=o(ge);ps=l(Yi,"\u30C7\u30FC\u30BF\u306E\u6E96\u5099"),Yi.forEach(s),ds=u(e),ce=p(e,"P",{});var ua=o(ce);as=l(ua,"\u7FFB\u8A33\u30E2\u30C7\u30EB\u3092\u30BC\u30ED\u304B\u3089\u8ABF\u6574\u30FB\u5B66\u7FD2\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u305D\u306E\u30BF\u30B9\u30AF\u306B\u9069\u3057\u305F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C\u5FC5\u8981\u3067\u3059\u3002\u524D\u8FF0\u3057\u305F\u3088\u3046\u306B\u3001\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u306F "),ze=p(ua,"A",{href:!0,rel:!0});var Zi=o(ze);et=l(Zi,"KDE4 dataset"),Zi.forEach(s),os=l(ua," \u3092\u4F7F\u7528\u3057\u307E\u3059\u304C\u3001\u7FFB\u8A33\u3057\u305F\u30442\u3064\u306E\u8A00\u8A9E\u306E\u6587\u306E\u30DA\u30A2\u304C\u3042\u308C\u3070\u3001\u81EA\u5206\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B\u3088\u3046\u306B\u30B3\u30FC\u30C9\u3092\u9069\u5FDC\u3055\u305B\u308B\u3053\u3068\u306F\u975E\u5E38\u306B\u7C21\u5358\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30E0\u30C7\u30FC\u30BF\u3092 "),Ss=p(ua,"CODE",{});var Ji=o(Ss);gs=l(Ji,"Dataset"),Ji.forEach(s),Os=l(ua," \u306B\u30ED\u30FC\u30C9\u3059\u308B\u65B9\u6CD5\u3092\u601D\u3044\u51FA\u3057\u305F\u3044\u5834\u5408\u306F\u3001"),is=p(ua,"A",{href:!0});var Vi=o(is);it=l(Vi,"5\u7AE0"),Vi.forEach(s),Bs=l(ua," \u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),ua.forEach(s),xe=u(e),fs=p(e,"H3",{class:!0});var gp=o(fs);Ze=p(gp,"A",{id:!0,class:!0,href:!0});var Qi=o(Ze);Ie=p(Qi,"SPAN",{});var ef=o(Ie);q(Es.$$.fragment,ef),ef.forEach(s),Qi.forEach(s),ws=u(gp),Rs=p(gp,"SPAN",{});var sf=o(Rs);ft=l(sf,"KDE4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),sf.forEach(s),gp.forEach(s),qs=u(e),He=p(e,"P",{});var Ep=o(He);st=l(Ep,"\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001 "),cs=p(Ep,"CODE",{});var tf=o(cs);xs=l(tf,"load_dataset()"),tf.forEach(s),Ks=l(Ep," \u95A2\u6570\u3092\u4F7F\u7528\u3057\u3066\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002"),Ep.forEach(s),ye=u(e),q(hs.$$.fragment,e),ls=u(e),$s=p(e,"P",{});var wp=o($s);tt=l(wp,"\u7570\u306A\u308B\u8A00\u8A9E\u306E\u30DA\u30A2\u3092\u6271\u3044\u305F\u3044\u5834\u5408\u306F\u3001\u305D\u306E\u30B3\u30FC\u30C9\u3067\u6307\u5B9A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u306F\u3001\u5168\u90E8\u306792\u306E\u8A00\u8A9E\u304C\u5229\u7528\u3067\u304D\u307E\u3059\u3002\u305D\u306E"),Se=p(wp,"A",{href:!0,rel:!0});var af=o(Se);ct=l(af,"\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u30AB\u30FC\u30C9"),af.forEach(s),at=l(wp,"\u306E\u8A00\u8A9E\u30BF\u30B0\u3092\u5C55\u958B\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u8A00\u8A9E\u3092\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),wp.forEach(s),_=u(e),O=p(e,"IMG",{src:!0,alt:!0,width:!0}),Gs=u(e),Xs=p(e,"P",{});var lf=o(Xs);zt=l(lf,"\u305D\u308C\u3067\u306F\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),lf.forEach(s),Je=u(e),q(As.$$.fragment,e),ut=u(e),q(ys.$$.fragment,e),Ce=u(e),Ve=p(e,"P",{});var ma=o(Ve);De=l(ma,"210,173\u7D44\u306E\u6587\u304C\u3042\u308A\u307E\u3059\u304C\u30011\u56DE\u306E\u5206\u5272\u3067\u3001\u72EC\u81EA\u306E\u691C\u8A3C\u30BB\u30C3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Ws=p(ma,"A",{href:!0});var rf=o(Ws);mt=l(rf,"\u7B2C5\u7AE0"),rf.forEach(s),lt=l(ma," \u3067\u898B\u305F\u3088\u3046\u306B\u3001 "),rt=p(ma,"CODE",{});var nf=o(rt);Ct=l(nf,"Dataset"),nf.forEach(s),nt=l(ma," \u306B\u306F "),Ls=p(ma,"CODE",{});var pf=o(Ls);St=l(pf,"train_test_split()"),pf.forEach(s),_t=l(ma," \u30E1\u30BD\u30C3\u30C9\u304C\u3042\u308A\u3001\u3053\u308C\u3092\u5229\u7528\u3057\u3066\u691C\u8A3C\u30BB\u30C3\u30C8\u306E\u4F5C\u6210\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u518D\u73FE\u6027\u3092\u9AD8\u3081\u308B\u305F\u3081\u306B\u30B7\u30FC\u30C9\u3092\u7528\u610F\u3057\u307E\u3059\u3002"),ma.forEach(s),Ds=u(e),q(Ps.$$.fragment,e),Ts=u(e),q(zs.$$.fragment,e),rs=u(e),Oe=p(e,"P",{});var hr=o(Oe);pt=l(hr,"\u4EE5\u4E0B\u306E\u3088\u3046\u306B "),ot=p(hr,"CODE",{});var of=o(ot);Ot=l(of,'"test"'),of.forEach(s),Fs=l(hr," \u30AD\u30FC\u3092 "),Us=p(hr,"CODE",{});var ff=o(Us);da=l(ff,'"validation"'),ff.forEach(s),ha=l(hr," \u306B\u5909\u66F4\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),hr.forEach(s),Jt=u(e),q(m.$$.fragment,e),I=u(e),Ys=p(e,"P",{});var cf=o(Ys);Dl=l(cf,"\u3067\u306F\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E1\u3064\u306E\u8981\u7D20\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),cf.forEach(s),$a=u(e),q(At.$$.fragment,e),dt=u(e),q(Lt.$$.fragment,e),ba=u(e),Vt=p(e,"P",{});var uf=o(Vt);Pl=l(uf,`\u5FC5\u8981\u306A\u8A00\u8A9E\u306E\u30DA\u30A2\u3067\u69CB\u6210\u3055\u308C\u308B2\u3064\u306E\u6587\u306E\u8F9E\u66F8\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3057\u305F\u3002\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u30B5\u30A4\u30A8\u30F3\u30B9\u306E\u5C02\u9580\u7528\u8A9E\u3092\u96C6\u3081\u305F\u3053\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u7279\u6B8A\u6027\u306F\u3001\u3059\u3079\u3066\u30D5\u30E9\u30F3\u30B9\u8A9E\u3067\u5B8C\u5168\u306B\u7FFB\u8A33\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u3067\u3059\u3002\u3057\u304B\u3057\u3001\u30D5\u30E9\u30F3\u30B9\u306E\u30A8\u30F3\u30B8\u30CB\u30A2\u306F\u6020\u60F0\u306A\u306E\u3067\u3001\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u30B5\u30A4\u30A8\u30F3\u30B9\u7279\u6709\u306E\u5358\u8A9E\u306F\u307B\u3068\u3093\u3069\u82F1\u8A9E\u5358\u8A9E\u306E\u307E\u307E\u3067\u4F1A\u8A71\u3057\u3066\u3044\u308B\u3053\u3068\u304C\u591A\u3044\u3067\u3059\u3002\u4F8B\u3048\u3070\u3001\u201Cthreads \u201C\u3068\u3044\u3046\u5358\u8A9E\u306F\u3001\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u6587\u7AE0\u3001\u7279\u306B\u6280\u8853\u7684\u306A\u4F1A\u8A71\u3067\u306F\u3088\u304F\u51FA\u3066\u304D\u307E\u3059\u304C\u3001\u3053\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u306F\u3001\u3088\u308A\u6B63\u3057\u3044 \u201Cfils de discussion \u201C\u306B\u7FFB\u8A33\u3057\u3066\u3044\u307E\u3059\u3002
\u3057\u304B\u3057\u3001\u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001\u3088\u308A\u5927\u304D\u306A\u30D5\u30E9\u30F3\u30B9\u8A9E\u3068\u82F1\u8A9E\u306E\u30B3\u30FC\u30D1\u30B9\u3067\u4E8B\u524D\u5B66\u7FD2\u3055\u308C\u3066\u3044\u308B\u306E\u3067\u3001\u3053\u306E\u5358\u8A9E\u3092\u305D\u306E\u307E\u307E\u306B\u3057\u3066\u304A\u304F\u3068\u3044\u3046\u7C21\u5358\u306A\u9078\u629E\u80A2\u3092\u3068\u3063\u3066\u3044\u307E\u3059\u3002`),uf.forEach(s),ht=u(e),q(Ft.$$.fragment,e),ja=u(e),q(bs.$$.fragment,e),ka=u(e),Qt=p(e,"P",{});var mf=o(Qt);Tl=l(mf,`\u3053\u306E\u52D5\u4F5C\u306E\u3082\u3046\u4E00\u3064\u306E\u4F8B\u306F\u3001\u300Cplugin\u300D\u3068\u3044\u3046\u5358\u8A9E\u3067\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u306F\u6B63\u5F0F\u306A\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u5358\u8A9E\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001\u307B\u3068\u3093\u3069\u306E\u30D5\u30E9\u30F3\u30B9\u8A9E\u3092\u6BCD\u56FD\u8A9E\u3068\u3059\u308B\u4EBA\u304C\u7406\u89E3\u3067\u304D\u3001\u308F\u3056\u308F\u3056\u7FFB\u8A33\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002
KDE4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u306F\u3001\u3053\u306E\u5358\u8A9E\u306F\u3088\u308A\u6B63\u5F0F\u306A\u300Cmodule d\u2019extension\u300D\u3068\u30D5\u30E9\u30F3\u30B9\u8A9E\u3067\u7FFB\u8A33\u3055\u308C\u3066\u3044\u307E\u3059\u3002`),mf.forEach(s),Zs=u(e),q(Ut.$$.fragment,e),va=u(e),q(Mt.$$.fragment,e),ga=u(e),Js=p(e,"P",{});var _f=o(Js);zl=l(_f,"\u3057\u304B\u3057\u3001\u79C1\u9054\u306E\u4E8B\u524D\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306F\u3001\u30B3\u30F3\u30D1\u30AF\u30C8\u3067\u89AA\u3057\u307F\u3084\u3059\u3044\u82F1\u5358\u8A9E\u306B\u56FA\u57F7\u3057\u307E\u3059\u3002"),_f.forEach(s),Ea=u(e),q(It.$$.fragment,e),$t=u(e),q(Ht.$$.fragment,e),wa=u(e),Vs=p(e,"P",{});var df=o(Vs);Cl=l(df,"\u3053\u306E\u3088\u3046\u306A\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u7279\u6B8A\u6027\u3092\u3001\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u304C\u62FE\u3044\u4E0A\u3052\u3066\u304F\u308C\u308B\u304B\u3069\u3046\u304B\u3001\u8208\u5473\u6DF1\u3044\u3068\u3053\u308D\u3067\u3059\u3002(\u30CD\u30BF\u30D0\u30EC\u6CE8\u610F\uFF1A\u62FE\u3063\u3066\u304F\u308C\u307E\u3059)"),df.forEach(s),qa=u(e),q(Ms.$$.fragment,e),xa=u(e),q(bt.$$.fragment,e),Qs=u(e),Nt=p(e,"H3",{id:!0});var hf=o(Nt);Sl=l(hf,"\u30C7\u30FC\u30BF\u3092\u52A0\u5DE5\u3059\u308B"),hf.forEach(s),ya=u(e),q(Is.$$.fragment,e),Da=u(e),jt=p(e,"P",{});var qp=o(jt);Ol=l(qp,"\u3082\u3046\u304A\u5206\u304B\u308A\u3060\u3068\u601D\u3044\u307E\u3059\u304C\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u5168\u3066\u30C8\u30FC\u30AF\u30F3ID\u306E\u30BB\u30C3\u30C8\u306B\u5909\u63DB\u3057\u3001\u30E2\u30C7\u30EB\u304C\u610F\u5473\u3092\u7406\u89E3\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30BF\u30B9\u30AF\u306E\u305F\u3081\u306B\u3001\u5165\u529B\u3068\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u4E21\u65B9\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u6700\u521D\u306E\u30BF\u30B9\u30AF\u306F "),gr=p(qp,"CODE",{});var $f=o(gr);Ap=l($f,"tokenizer"),$f.forEach(s),Lp=l(qp," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F5C\u6210\u3059\u308B\u3053\u3068\u3067\u3059\u3002"),qp.forEach(s),Yr=u(e),sa=p(e,"P",{});var xp=o(sa);Fp=l(xp,"\u5148\u306B\u8FF0\u3079\u305F\u3088\u3046\u306B\u3001\u4ECA\u56DE\u306F\u82F1\u8A9E\u304B\u3089\u30D5\u30E9\u30F3\u30B9\u8A9E\u306B\u7FFB\u8A33\u3059\u308B\u3088\u3046\u306B\u4E8B\u524D\u5B66\u7FD2\u3057\u305FMarian\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u3082\u3057\u3053\u306E\u30B3\u30FC\u30C9\u3092\u4ED6\u306E\u8A00\u8A9E\u306E\u30DA\u30A2\u3067\u8A66\u3059\u5834\u5408\u306F\u3001\u30E2\u30C7\u30EB\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u9069\u5FDC\u3055\u305B\u3066\u304F\u3060\u3055\u3044\u3002"),Pa=p(xp,"A",{href:!0,rel:!0});var bf=o(Pa);Up=l(bf,"Helsinki-NLP"),bf.forEach(s),Mp=l(xp," \u3068\u3044\u3046\u7D44\u7E54\u304C\u591A\u8A00\u8A9E\u30671000\u4EE5\u4E0A\u306E\u30E2\u30C7\u30EB\u3092\u63D0\u4F9B\u3057\u3066\u3044\u307E\u3059\u3002"),xp.forEach(s),Zr=u(e),q(Ta.$$.fragment,e),Jr=u(e),Bt=p(e,"P",{});var $r=o(Bt);Ip=l($r,"\u307E\u305F\u3001"),Er=p($r,"CODE",{});var jf=o(Er);Hp=l(jf,"model_checkpoint"),jf.forEach(s),Np=l($r," \u3092 "),za=p($r,"A",{href:!0,rel:!0});var kf=o(za);Bp=l(kf,"Hub"),kf.forEach(s),Rp=l($r," \u306B\u3042\u308B\u597D\u304D\u306A\u30E2\u30C7\u30EB\u3084\u3001\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u3084\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4FDD\u5B58\u3057\u305F\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u306B\u7F6E\u304D\u63DB\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),$r.forEach(s),Vr=u(e),q(ta.$$.fragment,e),Qr=u(e),aa=p(e,"P",{});var yp=o(aa);Kp=l(yp,"\u30C7\u30FC\u30BF\u306E\u6E96\u5099\u306F\u3068\u3066\u3082\u7C21\u5358\u3067\u3059\u3002\u5165\u529B\u8A00\u8A9E\u306F\u901A\u5E38\u901A\u308A\u51E6\u7406\u3057\u307E\u3059\u304C\u3001\u30BF\u30FC\u30B2\u30C3\u30C8\u8A00\u8A9E\u306B\u3064\u3044\u3066\u306F\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC "),wr=p(yp,"CODE",{});var vf=o(wr);Gp=l(vf,"as_target_tokenizer()"),vf.forEach(s),Xp=l(yp," \u306E\u4E2D\u306B\u30E9\u30C3\u30D7\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),yp.forEach(s),en=u(e),la=p(e,"P",{});var Dp=o(la);Wp=l(Dp,"Python \u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC\u306F "),qr=p(Dp,"CODE",{});var gf=o(qr);Yp=l(gf,"with"),gf.forEach(s),Zp=l(Dp," \u6587\u3067\u5C0E\u5165\u3055\u308C\u30012\u3064\u306E\u95A2\u9023\u3059\u308B\u64CD\u4F5C\u3092\u30DA\u30A2\u3067\u5B9F\u884C\u3059\u308B\u3068\u304D\u306B\u4FBF\u5229\u3067\u3059\u3002\u6700\u3082\u4E00\u822C\u7684\u306A\u4F8B\u306F\u3001\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3093\u3060\u308A\u8AAD\u307F\u8FBC\u3093\u3060\u308A\u3059\u308B\u3068\u304D\u3067\u3001\u6B21\u306E\u3088\u3046\u306A\u547D\u4EE4\u306E\u5185\u90E8\u3067\u5B9F\u884C\u3055\u308C\u308B\u3053\u3068\u304C\u3088\u304F\u3042\u308A\u307E\u3059\u3002"),Dp.forEach(s),sn=u(e),q(Ca.$$.fragment,e),tn=u(e),Rt=p(e,"P",{});var br=o(Rt);Jp=l(br,"\u4E0A\u306E\u4F8B\u3067\u306F\u3001\u95A2\u9023\u3059\u308B2\u3064\u306E\u64CD\u4F5C\u3092\u30DA\u30A2\u3068\u3057\u3066\u5B9F\u884C\u3059\u308B\u3053\u3068\u3067\u3001\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u52D5\u4F5C\u3068\u9589\u3058\u308B\u52D5\u4F5C\u3092\u5B9F\u73FE\u3057\u3066\u3044\u307E\u3059\u3002\u30AA\u30FC\u30D7\u30F3\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB "),xr=p(br,"CODE",{});var Ef=o(xr);Vp=l(Ef,"f"),Ef.forEach(s),Qp=l(br," \u306B\u5BFE\u5FDC\u3059\u308B\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u3001 "),yr=p(br,"CODE",{});var wf=o(yr);eo=l(wf,"with"),wf.forEach(s),so=l(br," \u306E\u4E0B\u306B\u3042\u308B\u30A4\u30F3\u30C7\u30F3\u30C8\u3055\u308C\u305F\u30D6\u30ED\u30C3\u30AF\u306E\u4E2D\u306B\u306E\u307F\u5B58\u5728\u3057\u3001\u30D5\u30A1\u30A4\u30EB\u306E\u30AA\u30FC\u30D7\u30F3\u306F\u305D\u306E\u30D6\u30ED\u30C3\u30AF\u306E\u524D\u306B\u3001\u30D5\u30A7\u30A4\u30EB\u306E\u30AF\u30ED\u30FC\u30BA\u306F\u30D6\u30ED\u30C3\u30AF\u306E\u6700\u5F8C\u306B\u884C\u308F\u308C\u307E\u3059\u3002"),br.forEach(s),an=u(e),ra=p(e,"P",{});var Pp=o(ra);to=l(Pp,"\u79C1\u9054\u306E\u30B1\u30FC\u30B9\u3067\u306F\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC "),Dr=p(Pp,"CODE",{});var qf=o(Dr);ao=l(qf,"as_target_tokenizer()"),qf.forEach(s),lo=l(Pp," \u306F\u3001\u30A4\u30F3\u30C7\u30F3\u30C8\u3055\u308C\u305F\u30D6\u30ED\u30C3\u30AF\u304C\u5B9F\u884C\u3055\u308C\u308B\u524D\u306B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u51FA\u529B\u8A00\u8A9E (\u3053\u3053\u3067\u306F\u30D5\u30E9\u30F3\u30B9\u8A9E) \u306B\u8A2D\u5B9A\u3057\u3001\u305D\u306E\u5F8C\u3001\u5165\u529B\u8A00\u8A9E (\u3053\u3053\u3067\u306F\u82F1\u8A9E) \u306B\u8A2D\u5B9A\u3057\u306A\u304A\u3057\u307E\u3059\u3002"),Pp.forEach(s),ln=u(e),Al=p(e,"P",{});var xf=o(Al);ro=l(xf,"\u3064\u307E\u308A\u3001\u30B5\u30F3\u30D7\u30EB\u306E\u524D\u51E6\u7406\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),xf.forEach(s),rn=u(e),q(Sa.$$.fragment,e),nn=u(e),Ll=p(e,"P",{});var yf=o(Ll);no=l(yf,"\u3082\u3057\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30DE\u30CD\u30FC\u30B8\u30E3\u306E\u5185\u90E8\u3067\u30BF\u30FC\u30B2\u30C3\u30C8\u8A00\u8A9E\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u51E6\u7406\u3092\u5FD8\u308C\u308B\u3068\u3001\u5165\u529B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u3088\u3063\u3066\u30C8\u30FC\u30AF\u30F3\u5316\u3055\u308C\u3066\u3057\u307E\u3044\u3001Marian \u30E2\u30C7\u30EB\u306E\u5834\u5408\u3001\u5168\u304F\u3046\u307E\u304F\u3044\u304D\u307E\u305B\u3093\u3002"),yf.forEach(s),pn=u(e),q(Oa.$$.fragment,e),on=u(e),q(Aa.$$.fragment,e),fn=u(e),Fl=p(e,"P",{});var Df=o(Fl);po=l(Df,"\u3053\u306E\u3088\u3046\u306B\u3001\u82F1\u8A9E\u7528\u306E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4F7F\u3063\u3066\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u6587\u7AE0\u3092\u524D\u51E6\u7406\u3059\u308B\u3068\u3001\u30C8\u30FC\u30AF\u30F3\u306E\u6570\u304C\u591A\u304F\u306A\u308A\u307E\u3059\u3002\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306F\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u5358\u8A9E\u3092\u77E5\u3089\u306A\u3044\u304B\u3089\u3067\u3059\uFF08\u300Cdiscussion\u300D\u306E\u3088\u3046\u306B\u82F1\u8A9E\u3068\u5171\u901A\u3059\u308B\u5358\u8A9E\u306F\u9664\u304D\u307E\u3059\uFF09\u3002"),Df.forEach(s),cn=u(e),kt=p(e,"P",{});var ql=o(kt);Pr=p(ql,"CODE",{});var Pf=o(Pr);oo=l(Pf,"inputs"),Pf.forEach(s),io=l(ql,"\u3068"),Tr=p(ql,"CODE",{});var Tf=o(Tr);fo=l(Tf,"targets"),Tf.forEach(s),co=l(ql,"\u306F\u3069\u3061\u3089\u3082\u901A\u5E38\u306E\u30AD\u30FC\uFF08\u5165\u529BID\u3001\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u306A\u3069\uFF09\u3092\u6301\u3064\u8F9E\u66F8\u306A\u306E\u3067\u3001\u6700\u5F8C\u306E\u30B9\u30C6\u30C3\u30D7\u306F\u5165\u529B\u306E\u4E2D\u306B "),zr=p(ql,"CODE",{});var zf=o(zr);uo=l(zf,'"labels"'),zf.forEach(s),mo=l(ql," \u30AD\u30FC\u3092\u8A2D\u5B9A\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u3053\u308C\u306F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306B\u9069\u7528\u3059\u308B\u524D\u51E6\u7406\u95A2\u6570\u3067\u884C\u3044\u307E\u3059\u3002"),ql.forEach(s),un=u(e),q(La.$$.fragment,e),mn=u(e),Ul=p(e,"P",{});var Cf=o(Ul);_o=l(Cf,"\u5165\u529B\u3068\u51FA\u529B\u306B\u540C\u69D8\u306A\u6700\u5927\u9577\u3092\u8A2D\u5B9A\u3057\u3066\u3044\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u6271\u3046\u30C6\u30AD\u30B9\u30C8\u306F\u304B\u306A\u308A\u77ED\u3044\u3068\u601D\u308F\u308C\u308B\u306E\u3067\u3001128\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"),Cf.forEach(s),_n=u(e),q(na.$$.fragment,e),dn=u(e),q(pa.$$.fragment,e),hn=u(e),Ml=p(e,"P",{});var Sf=o(Ml);ho=l(Sf,"\u3053\u308C\u3067\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u3059\u3079\u3066\u306E\u5206\u5272\u306B\u5BFE\u3057\u3066\u3001\u3053\u306E\u524D\u51E6\u7406\u3092\u4E00\u5EA6\u306B\u9069\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002"),Sf.forEach(s),$n=u(e),q(Fa.$$.fragment,e),bn=u(e),Il=p(e,"P",{});var Of=o(Il);$o=l(Of,"\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u304C\u7D42\u308F\u3063\u305F\u306E\u3067\u3001\u6B21\u306F\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3044\u307E\u3059\uFF01"),Of.forEach(s),jn=u(e),gt.l(e),Hl=u(e),Nl=p(e,"P",{});var Af=o(Nl);bo=l(Af,"\u306A\u304A\u3001\u4ECA\u56DE\u306F\u7FFB\u8A33\u30BF\u30B9\u30AF\u3067\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3057\u3066\u304A\u308A\u3001\u5B9F\u969B\u306B\u3059\u3067\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u306E\u3067\u3001\u91CD\u307F\u306E\u6B20\u843D\u3084\u65B0\u305F\u306B\u521D\u671F\u5316\u3055\u308C\u305F\u3082\u306E\u306B\u3064\u3044\u3066\u306E\u8B66\u544A\u306F\u51FA\u3066\u3044\u307E\u305B\u3093\u3002"),Af.forEach(s),kn=u(e),Ua=p(e,"H3",{id:!0});var Lf=o(Ua);jo=l(Lf,"\u30C7\u30FC\u30BF\u306E\u7167\u5408"),Lf.forEach(s),vn=u(e),Kt=p(e,"P",{});var jr=o(Kt);ko=l(jr,"\u52D5\u7684\u30D0\u30C3\u30C1\u51E6\u7406\u7528\u306E\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u884C\u3046\u305F\u3081\u306B\u3001\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002\u3053\u306E\u5834\u5408\u3001"),Bl=p(jr,"A",{href:!0});var Ff=o(Bl);vo=l(Ff,"\u7B2C3\u7AE0"),Ff.forEach(s),go=l(jr," \u306E\u3088\u3046\u306A "),Cr=p(jr,"CODE",{});var Uf=o(Cr);Eo=l(Uf,"DataCollatorWithPadding"),Uf.forEach(s),wo=l(jr," \u3092\u4F7F\u3046\u308F\u3051\u306B\u306F\u3044\u304D\u307E\u305B\u3093\u3002"),jr.forEach(s),gn=u(e),oa=p(e,"P",{});var Tp=o(oa);qo=l(Tp,"\u306A\u305C\u306A\u3089\u3001\u305D\u308C\u306F\u5165\u529B\uFF08\u5165\u529BID\u3001\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u3001\u30C8\u30FC\u30AF\u30F3\u30BF\u30A4\u30D7ID\uFF09\u3060\u3051\u3092\u30D1\u30C7\u30A3\u30F3\u30B0\u3059\u308B\u3082\u306E\u3060\u304B\u3089\u3067\u3059\u3002\u79C1\u305F\u3061\u306E\u30E9\u30D9\u30EB\u3082\u3001\u30E9\u30D9\u30EB\u3067\u906D\u9047\u3059\u308B\u6700\u5927\u9577\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u308B\u3079\u304D\u3067\u3059\u3002\u305D\u3057\u3066\u3001\u524D\u8FF0\u3057\u305F\u3088\u3046\u306B\u3001\u3053\u308C\u3089\u306E\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u305F\u5024\u304C\u640D\u5931\u8A08\u7B97\u3067\u7121\u8996\u3055\u308C\u308B\u3088\u3046\u306B\u3001\u30E9\u30D9\u30EB\u3092\u30D1\u30C7\u30A3\u30F3\u30B0\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u308B\u30D1\u30C7\u30A3\u30F3\u30B0\u5024\u306F\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306E\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u3067\u306F\u306A\u304F\u3001"),Sr=p(Tp,"CODE",{});var Mf=o(Sr);xo=l(Mf,"-100"),Mf.forEach(s),yo=l(Tp,"\u3067\u3042\u308B\u3079\u304D\u3067\u3059\u3002"),Tp.forEach(s),En=u(e),ns=p(e,"P",{});var Ns=o(ns);Do=l(Ns,"\u3053\u308C\u306F\u3059\u3079\u3066 "),Ma=p(Ns,"A",{href:!0,rel:!0});var If=o(Ma);Or=p(If,"CODE",{});var Hf=o(Or);Po=l(Hf,"DataCollatorForSeq2Seq"),Hf.forEach(s),If.forEach(s),To=l(Ns," \u306B\u3088\u3063\u3066\u884C\u308F\u308C\u307E\u3059\u3002"),Ar=p(Ns,"CODE",{});var Nf=o(Ar);zo=l(Nf,"DataCollatorWithPadding"),Nf.forEach(s),Co=l(Ns," \u3068\u540C\u69D8\u306B\u3001\u5165\u529B\u306E\u524D\u51E6\u7406\u306B\u4F7F\u7528\u3057\u305F "),Lr=p(Ns,"CODE",{});var Bf=o(Lr);So=l(Bf,"tokenizer"),Bf.forEach(s),Oo=l(Ns," \u3092\u53D7\u3051\u53D6\u308A\u307E\u3059\u304C\u3001 "),Fr=p(Ns,"CODE",{});var Rf=o(Fr);Ao=l(Rf,"model"),Rf.forEach(s),Lo=l(Ns," \u3082\u53D7\u3051\u53D6\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u3053\u306E\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u304C\u30C7\u30B3\u30FC\u30C0\u30FC\u306E\u5165\u529B ID \u3092\u6E96\u5099\u3059\u308B\u5F79\u5272\u3082\u62C5\u3046\u304B\u3089\u3067\u3059\u3002\u3053\u306E ID \u306F\u3001\u30E9\u30D9\u30EB\u3092\u30B7\u30D5\u30C8\u3057\u305F\u3082\u306E\u3067\u3001\u5148\u982D\u306B\u7279\u5225\u306A\u30C8\u30FC\u30AF\u30F3\u304C\u4ED8\u52A0\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u30B7\u30D5\u30C8\u306F\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u306B\u3088\u3063\u3066\u82E5\u5E72\u7570\u306A\u308B\u306E\u3067\u3001 "),Ur=p(Ns,"CODE",{});var Kf=o(Ur);Fo=l(Kf,"DataCollatorForSeq2Seq"),Kf.forEach(s),Uo=l(Ns," \u306F "),Mr=p(Ns,"CODE",{});var Gf=o(Mr);Mo=l(Gf,"model"),Gf.forEach(s),Io=l(Ns," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u77E5\u3063\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Ns.forEach(s),wn=u(e),wt.l(e),Rl=u(e),Kl=p(e,"P",{});var Xf=o(Kl);Ho=l(Xf,"\u3044\u304F\u3064\u304B\u306E\u30B5\u30F3\u30D7\u30EB\u3067\u3053\u308C\u3092\u30C6\u30B9\u30C8\u3059\u308B\u5834\u5408\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306E\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u304B\u3089\u53D6\u5F97\u3057\u305F\u30B5\u30F3\u30D7\u30EB\u306E\u30EA\u30B9\u30C8\u306B\u5BFE\u3057\u3066\u547C\u3073\u51FA\u3059\u3060\u3051\u3067\u3059\u3002"),Xf.forEach(s),qn=u(e),q(Ia.$$.fragment,e),xn=u(e),q(Ha.$$.fragment,e),yn=u(e),ia=p(e,"P",{});var zp=o(ia);No=l(zp,"\u30E9\u30D9\u30EB\u304C\u30D0\u30C3\u30C1\u306E\u6700\u5927\u9577\u306B\u306A\u308B\u3088\u3046\u306B"),Ir=p(zp,"CODE",{});var Wf=o(Ir);Bo=l(Wf,"-100"),Wf.forEach(s),Ro=l(zp," \u3092\u4F7F\u3063\u3066\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002"),zp.forEach(s),Dn=u(e),q(Na.$$.fragment,e),Pn=u(e),q(Ba.$$.fragment,e),Tn=u(e),Gl=p(e,"P",{});var Yf=o(Gl);Ko=l(Yf,"\u307E\u305F\u3001\u30C7\u30B3\u30FC\u30C0\u30FC\u306E\u5165\u529BID\u3092\u898B\u308B\u3068\u3001\u30E9\u30D9\u30EB\u3092\u30B7\u30D5\u30C8\u3055\u305B\u305F\u3082\u306E\u3067\u3042\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002"),Yf.forEach(s),zn=u(e),q(Ra.$$.fragment,e),Cn=u(e),q(Ka.$$.fragment,e),Sn=u(e),Xl=p(e,"P",{});var Zf=o(Xl);Go=l(Zf,"\u4EE5\u4E0B\u306F\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E1\u756A\u76EE\u30682\u756A\u76EE\u306E\u8981\u7D20\u306B\u5BFE\u3059\u308B\u30E9\u30D9\u30EB\u3067\u3059\u3002"),Zf.forEach(s),On=u(e),q(Ga.$$.fragment,e),An=u(e),q(Xa.$$.fragment,e),Ln=u(e),xt.l(e),Wl=u(e),Wa=p(e,"H3",{id:!0});var Jf=o(Wa);Xo=l(Jf,"\u6307\u6A19"),Jf.forEach(s),Fn=u(e),q(Ya.$$.fragment,e),Un=u(e),Cs&&Cs.l(e),Yl=u(e),Gt=p(e,"P",{});var kr=o(Gt);Wo=l(kr,"\u7FFB\u8A33\u306B\u4F7F\u308F\u308C\u308B\u4F1D\u7D71\u7684\u306A\u6307\u6A19\u306F\u3001"),Za=p(kr,"A",{href:!0,rel:!0});var Vf=o(Za);Yo=l(Vf,"BLEU score"),Vf.forEach(s),Zo=l(kr," \u3067\u3059\u3002\u3053\u308C\u306FKishore Papineni\u3089\u306B\u3088\u3063\u3066\u3001"),Ja=p(kr,"A",{href:!0,rel:!0});var Qf=o(Ja);Jo=l(Qf,"a 2002 article"),Qf.forEach(s),Vo=l(kr," \u3067\u7D39\u4ECB\u3055\u308C\u305F\u6307\u6A19\u3067\u3001\u7FFB\u8A33\u6587\u304C\u305D\u306E\u30E9\u30D9\u30EB\u306B\u3069\u308C\u3060\u3051\u8FD1\u3044\u304B\u3092\u8A55\u4FA1\u3059\u308B\u3082\u306E\u3067\u3059\u3002"),kr.forEach(s),Mn=u(e),Zl=p(e,"P",{});var ec=o(Zl);Qo=l(ec,"\u30E2\u30C7\u30EB\u306E\u751F\u6210\u3057\u305F\u51FA\u529B\u6587\u306E\u660E\u77AD\u5EA6\u3084\u6587\u6CD5\u7684\u306A\u6B63\u3057\u3055\u306F\u6E2C\u5B9A\u3057\u307E\u305B\u3093\u304C\u3001\u751F\u6210\u3057\u305F\u51FA\u529B\u306B\u542B\u307E\u308C\u308B\u3059\u3079\u3066\u306E\u5358\u8A9E\u304C\u30BF\u30FC\u30B2\u30C3\u30C8\u306B\u3082\u73FE\u308C\u308B\u3088\u3046\u306B\u3001\u7D71\u8A08\u7684\u306A\u30EB\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u307E\u305F\u3001\u540C\u3058\u5358\u8A9E\u306E\u7E70\u308A\u8FD4\u3057\u304C\u5143\u6587\u7AE0\u306B\u306A\u3044\u5834\u5408\u306F\u30DA\u30CA\u30EB\u30C6\u30A3\u3092\u4E0E\u3048\u308B\u30EB\u30FC\u30EB\uFF08\u30E2\u30C7\u30EB\u304C\u300Cthe the the the\u300D\u306E\u3088\u3046\u306A\u6587\u7AE0\u3092\u51FA\u529B\u3057\u306A\u3044\u3088\u3046\u306B\uFF09\u3084\u3001\u30BF\u30FC\u30B2\u30C3\u30C8\u3088\u308A\u77ED\u3044\u6587\u7AE0\u3092\u51FA\u529B\u3059\u308B\u3068\u30DA\u30CA\u30EB\u30C6\u30A3\u3092\u4E0E\u3048\u308B\u30EB\u30FC\u30EB\uFF08\u30E2\u30C7\u30EB\u304C\u300Cthe\u300D\u306E\u3088\u3046\u306A\u6587\u7AE0\u3092\u51FA\u529B\u3057\u306A\u3044\u3088\u3046\u306B\uFF09\u306A\u3069\u304C\u3042\u308A\u307E\u3059\u3002"),ec.forEach(s),In=u(e),fa=p(e,"P",{});var Cp=o(fa);ei=l(Cp,"BLEU\u306E\u5F31\u70B9\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u304C\u3059\u3067\u306B\u30C8\u30FC\u30AF\u30F3\u5316\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u3092\u524D\u63D0\u3068\u3057\u3066\u3044\u308B\u305F\u3081\u3001\u7570\u306A\u308B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4F7F\u7528\u3059\u308B\u30E2\u30C7\u30EB\u9593\u3067\u30B9\u30B3\u30A2\u3092\u6BD4\u8F03\u3059\u308B\u3053\u3068\u304C\u56F0\u96E3\u306A\u70B9\u3067\u3059\u3002\u305D\u3053\u3067\u3001\u73FE\u5728\u7FFB\u8A33\u30E2\u30C7\u30EB\u306E\u30D9\u30F3\u30C1\u30DE\u30FC\u30AF\u3068\u3057\u3066\u6700\u3082\u3088\u304F\u4F7F\u308F\u308C\u3066\u3044\u308B\u306E\u304C"),Va=p(Cp,"A",{href:!0,rel:!0});var sc=o(Va);si=l(sc,"SacreBLEU"),sc.forEach(s),ti=l(Cp,"\u3067\u3059\u3002\u30C8\u30FC\u30AF\u30F3\u5316\u30B9\u30C6\u30C3\u30D7\u3092\u6A19\u6E96\u5316\u3059\u308B\u3053\u3068\u3067\u3001\u3053\u306E\u5F31\u70B9\uFF08\u304A\u3088\u3073\u305D\u306E\u4ED6\u306E\u5F31\u70B9\uFF09\u3092\u89E3\u6C7A\u3057\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u6307\u6A19\u3092\u4F7F\u3046\u306B\u306F\u3001\u307E\u305ASacreBLEU\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Cp.forEach(s),Hn=u(e),q(Qa.$$.fragment,e),Nn=u(e),Xt=p(e,"P",{});var vr=o(Xt);ai=l(vr,"\u305D\u3057\u3066\u3001"),Jl=p(vr,"A",{href:!0});var tc=o(Jl);li=l(tc,"\u7B2C3\u7AE0"),tc.forEach(s),ri=l(vr," \u3067\u884C\u3063\u305F\u3088\u3046\u306B "),Hr=p(vr,"CODE",{});var ac=o(Hr);ni=l(ac,"evaluate.load()"),ac.forEach(s),pi=l(vr," \u3067\u8AAD\u307F\u8FBC\u3080\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),vr.forEach(s),Bn=u(e),q(el.$$.fragment,e),Rn=u(e),Vl=p(e,"P",{});var lc=o(Vl);oi=l(lc,"\u3053\u306E\u6307\u6A19\u306F\u30C6\u30AD\u30B9\u30C8\u3092\u5165\u529B\u3068\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u3057\u3066\u53D7\u3051\u53D6\u308A\u307E\u3059\u3002\u540C\u3058\u6587\u3067\u3082\u8907\u6570\u306E\u7FFB\u8A33\u304C\u3042\u308B\u3053\u3068\u304C\u591A\u3044\u306E\u3067\u3001\u8907\u6570\u306E\u7FFB\u8A33\u3092\u53D7\u3051\u5165\u308C\u308B\u3088\u3046\u306B\u8A2D\u8A08\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u79C1\u305F\u3061\u304C\u4F7F\u3063\u3066\u3044\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F1\u3064\u3057\u304B\u63D0\u4F9B\u3057\u3066\u3044\u307E\u305B\u3093\u304C\u3001NLP\u3067\u306F\u8907\u6570\u306E\u6587\u3092\u30E9\u30D9\u30EB\u3068\u3057\u3066\u4E0E\u3048\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C\u73CD\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002\u3064\u307E\u308A\u3001\u4E88\u6E2C\u306F\u6587\u306E\u30EA\u30B9\u30C8\u3067\u3042\u308B\u3079\u304D\u3067\u3059\u304C\u3001\u305D\u306E\u53C2\u7167\u306F\u6587\u306E\u30EA\u30B9\u30C8\u306E\u30EA\u30B9\u30C8\u3067\u3042\u308B\u3079\u304D\u306A\u306E\u3067\u3059\u3002"),lc.forEach(s),Kn=u(e),Ql=p(e,"P",{});var rc=o(Ql);ii=l(rc,"\u4F8B\u3092\u3084\u3063\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),rc.forEach(s),Gn=u(e),q(sl.$$.fragment,e),Xn=u(e),q(tl.$$.fragment,e),Wn=u(e),er=p(e,"P",{});var nc=o(er);fi=l(nc,"\u3053\u306E\u7D50\u679C\u3001BLEU\u30B9\u30B3\u30A2\u306F46.75\u3068\u306A\u308A\u307E\u3057\u305F\u3002\u3053\u308C\u306F\u304B\u306A\u308A\u826F\u3044\u7D50\u679C\u3067\u3059\u3002"),nc.forEach(s),Yn=u(e),Hs=p(e,"P",{});var Yt=o(Hs);ci=l(Yt,"\u53C2\u8003\u307E\u3067\u306B\u3001"),al=p(Yt,"A",{href:!0,rel:!0});var pc=o(al);ui=l(pc,"\u201CAttention Is All You Need\u201D \u8AD6\u6587"),pc.forEach(s),mi=l(Yt," \u306E\u30AA\u30EA\u30B8\u30CA\u30EB\u306ETransformer\u30E2\u30C7\u30EB\u306F\u3001\u82F1\u8A9E\u3068\u30D5\u30E9\u30F3\u30B9\u8A9E\u9593\u306E\u540C\u69D8\u306E\u7FFB\u8A33\u30BF\u30B9\u30AF\u3067BLEU\u30B9\u30B3\u30A241.8\u3092\u9054\u6210\u3057\u307E\u3057\u305F\uFF01\uFF08"),Nr=p(Yt,"CODE",{});var oc=o(Nr);_i=l(oc,"count"),oc.forEach(s),di=l(Yt,"\u3084"),Br=p(Yt,"CODE",{});var ic=o(Br);hi=l(ic,"bp"),ic.forEach(s),$i=l(Yt,"\u306A\u3069\u306E\u500B\u3005\u306E\u6307\u6A19\u306E\u8A73\u7D30\u306F"),ll=p(Yt,"A",{href:!0,rel:!0});var fc=o(ll);bi=l(fc,"SacreBLEU\u30EA\u30DD\u30B8\u30C8\u30EA"),fc.forEach(s),ji=l(Yt,"\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044)\u3002"),Yt.forEach(s),Zn=u(e),sr=p(e,"P",{});var cc=o(sr);ki=l(cc,"\u4E00\u65B9\u3001\u7FFB\u8A33\u30E2\u30C7\u30EB\u304B\u3089\u3088\u304F\u51FA\u3066\u304F\u308B2\u3064\u306E\u60AA\u3044\u30BF\u30A4\u30D7\u306E\u4E88\u6E2C\uFF08\u5358\u8A9E\u306E\u7E70\u308A\u8FD4\u3057\u304C\u591A\u3044\u3001\u307E\u305F\u306F\u77ED\u3059\u304E\u308B\uFF09\u3067\u8A66\u3059\u3068\u3001\u304B\u306A\u308A\u60AA\u3044BLEU\u30B9\u30B3\u30A2\u304C\u5F97\u3089\u308C\u307E\u3059\u3002"),cc.forEach(s),Jn=u(e),q(rl.$$.fragment,e),Vn=u(e),q(nl.$$.fragment,e),Qn=u(e),q(pl.$$.fragment,e),ep=u(e),q(ol.$$.fragment,e),sp=u(e),tr=p(e,"P",{});var uc=o(tr);vi=l(uc,"\u30B9\u30B3\u30A2\u306F0\u304B\u3089100\u307E\u3067\u3042\u308A\u3001\u9AD8\u3051\u308C\u3070\u9AD8\u3044\u307B\u3069\u826F\u3044\u30B9\u30B3\u30A2\u3067\u3059\u3002"),uc.forEach(s),tp=u(e),Dt.l(e),ar=u(e),lr=p(e,"P",{});var mc=o(lr);gi=l(mc,"\u3053\u308C\u3067\u3001\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3059\u308B\u6E96\u5099\u304C\u6574\u3044\u307E\u3057\u305F\uFF01"),mc.forEach(s),ap=u(e),il=p(e,"H3",{id:!0});var _c=o(il);Ei=l(_c,"\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574"),_c.forEach(s),lp=u(e),rr=p(e,"P",{});var dc=o(rr);wi=l(dc,"\u6700\u521D\u306E\u30B9\u30C6\u30C3\u30D7\u306F\u3001\u30CF\u30AE\u30F3\u30B0 \u30D5\u30A7\u30A4\u30B9\u306B\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u3001\u7D50\u679C\u3092Model Hub\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u305D\u306E\u305F\u3081\u306E\u4FBF\u5229\u306A\u6A5F\u80FD\u304C\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u306B\u3042\u308A\u307E\u3059\u3002"),dc.forEach(s),rp=u(e),q(fl.$$.fragment,e),np=u(e),nr=p(e,"P",{});var hc=o(nr);qi=l(hc,`\u3053\u308C\u306F\u3001\u30CF\u30AE\u30F3\u30B0 \u30D5\u30A7\u30A4\u30B9\u306E\u30ED\u30B0\u30A4\u30F3\u60C5\u5831\u3092\u5165\u529B\u3059\u308B\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067\u4F5C\u696D\u3057\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u3001\u30BF\u30FC\u30DF\u30CA\u30EB\u3067\u6B21\u306E\u884C\u3092\u5165\u529B\u3059\u308B\u3060\u3051\u3067\u3059\u3002`),hc.forEach(s),pp=u(e),q(cl.$$.fragment,e),op=u(e),Tt.l(e),pr=u(e),Qe&&Qe.l(e),or=u(e),ul=p(e,"H2",{id:!0});var $c=o(ul);xi=l($c,"\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u3046"),$c.forEach(s),ip=u(e),ir=p(e,"P",{});var bc=o(ir);yi=l(bc,"\u30E2\u30C7\u30EB\u30CF\u30D6\u3067\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3067\u4F7F\u7528\u3059\u308B\u65B9\u6CD5\u306F\u65E2\u306B\u7D39\u4ECB\u3057\u307E\u3057\u305F\u3002\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u3067\u4F7F\u7528\u3059\u308B\u5834\u5408\u306F\u3001\u30E2\u30C7\u30EB\u8B58\u5225\u5B50\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002"),bc.forEach(s),fp=u(e),q(ml.$$.fragment,e),cp=u(e),q(_l.$$.fragment,e),up=u(e),fr=p(e,"P",{});var jc=o(fr);Di=l(jc,"\u4E88\u60F3\u901A\u308A\u3001\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u306F\u3001\u5FAE\u8ABF\u6574\u3057\u305F\u30B3\u30FC\u30D1\u30B9\u306B\u77E5\u8B58\u3092\u9069\u5FDC\u3055\u305B\u3001\u82F1\u8A9E\u306E\u300Cthreads\u300D\u3092\u305D\u306E\u307E\u307E\u306B\u305B\u305A\u3001\u30D5\u30E9\u30F3\u30B9\u8A9E\u306E\u6B63\u5F0F\u306A\u30D0\u30FC\u30B8\u30E7\u30F3\u306B\u7FFB\u8A33\u3059\u308B\u3088\u3046\u306B\u306A\u3063\u305F\u306E\u3067\u3059\u3002\u300Cplugin\u300D\u306B\u3064\u3044\u3066\u3082\u540C\u3058\u3067\u3059\u3002"),jc.forEach(s),mp=u(e),q(dl.$$.fragment,e),_p=u(e),q(hl.$$.fragment,e),dp=u(e),cr=p(e,"P",{});var kc=o(cr);Pi=l(kc,"\u30C9\u30E1\u30A4\u30F3\u9069\u5FDC\u306E\u597D\u4F8B\u304C\u307E\u305F\u4E00\u3064\u5897\u3048\u307E\u3057\u305F\u306D\uFF01"),kc.forEach(s),hp=u(e),q(ca.$$.fragment,e),this.h()},h(){D(f,"name","hf:doc:metadata"),D(f,"content",JSON.stringify(Vc)),D(C,"id",""),D(A,"href","/course/chapter1/ja/7"),D(M,"href","/course/chapter7/ja/6"),D(be,"href","/course/chapter7/ja/6"),D(je,"href","https://huggingface.co/datasets/kde4"),D(je,"rel","nofollow"),D(Fe,"href","https://apps.kde.org/"),D(Fe,"rel","nofollow"),D(ve,"href","https://opus.nlpl.eu/"),D(ve,"rel","nofollow"),Sp(Z.src,js="https://hf.space/gradioiframe/course-demos/marian-finetuned-kde4-en-to-fr/+")||D(Z,"src",js),D(Z,"frameborder","0"),D(Z,"height","350"),D(Z,"title","Gradio app"),D(Z,"class","block dark:hidden container p-0 flex-grow space-iframe"),D(Z,"allow","accelerometer; ambient-light-sensor; autoplay; battery; camera; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking"),D(Z,"sandbox","allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads"),D(K,"class","block dark:hidden lg:w-3/5"),Sp(K.src,We="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter7/modeleval-marian-finetuned-kde4-en-to-fr.png")||D(K,"src",We),D(K,"alt","One-hot encoded labels for question answering."),D(de,"class","hidden dark:block lg:w-3/5"),Sp(de.src,ms="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter7/modeleval-marian-finetuned-kde4-en-to-fr-dark.png")||D(de,"src",ms),D(de,"alt","One-hot encoded labels for question answering."),D(h,"class","flex justify-center"),D(h,"href","/huggingface-course/marian-finetuned-kde4-en-to-fr"),D(he,"href","https://huggingface.co/huggingface-course/marian-finetuned-kde4-en-to-fr?text=This+plugin+allows+you+to+automatically+translate+web+pages+between+several+languages."),D(he,"rel","nofollow"),D(ge,"id",""),D(ze,"href","https://huggingface.co/datasets/kde4"),D(ze,"rel","nofollow"),D(is,"href","/course/ja/chapter5"),D(Ze,"id","kde4"),D(Ze,"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"),D(Ze,"href","#kde4"),D(fs,"class","relative group"),D(Se,"href","https://huggingface.co/datasets/kde4"),D(Se,"rel","nofollow"),Sp(O.src,Zt="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter7/language_tags.png")||D(O,"src",Zt),D(O,"alt","Language available for the KDE4 dataset."),D(O,"width","100%"),D(Ws,"href","/course/ja/chapter5"),D(Nt,"id",""),D(Pa,"href","https://huggingface.co/Helsinki-NLP"),D(Pa,"rel","nofollow"),D(za,"href","https://huggingface.co/models"),D(za,"rel","nofollow"),D(Ua,"id",""),D(Bl,"href","/course/ja/chapter3"),D(Ma,"href","https://huggingface.co/transformers/main_classes/data_collator.html#datacollatorforseq2seq"),D(Ma,"rel","nofollow"),D(Wa,"id",""),D(Za,"href","https://en.wikipedia.org/wiki/BLEU"),D(Za,"rel","nofollow"),D(Ja,"href","https://aclanthology.org/P02-1040.pdf"),D(Ja,"rel","nofollow"),D(Va,"href","https://github.com/mjpost/sacrebleu"),D(Va,"rel","nofollow"),D(Jl,"href","/course/ja/chapter3"),D(al,"href","https://arxiv.org/pdf/1706.03762.pdf"),D(al,"rel","nofollow"),D(ll,"href","https://github.com/mjpost/sacrebleu/blob/078c440168c6adc89ba75fe6d63f0d922d42bcfe/sacrebleu/metrics/bleu.py#L74"),D(ll,"rel","nofollow"),D(il,"id",""),D(ul,"id","")},m(e,i){t(document.head,f),r(e,b,i),x(d,e,i),r(e,v,i),r(e,C,i),t(C,$),r(e,P,i),$l[T].m(e,i),r(e,E,i),r(e,F,i),t(F,z),t(F,A),t(A,N),t(F,S),t(F,M),t(M,X),t(F,H),r(e,U,i),r(e,W,i),t(W,Q),t(Q,J),t(J,re),t(re,ne),t(J,Y),t(J,ue),t(ue,V),t(J,se),t(W,ee),t(W,pe),t(pe,ie),t(ie,le),t(le,R),t(ie,B),r(e,_e,i),x(fe,e,i),r(e,oe,i),r(e,te,i),t(te,$e),t(te,be),t(be,es),t(te,Ae),r(e,Le,i),r(e,ae,i),t(ae,Ne),t(ae,je),t(je,ss),t(ae,ke),t(ae,Fe),t(Fe,Ee),t(ae,us),r(e,Be,i),r(e,we,i),t(we,Ue),t(we,ve),t(ve,qe),t(we,Re),r(e,Ke,i),r(e,Pe,i),t(Pe,Ge),r(e,Xe,i),r(e,Z,i),r(e,Te,i),r(e,h,i),t(h,K),t(h,ks),t(h,de),r(e,ts,i),r(e,me,i),t(me,_s),t(me,he),t(he,vs),t(me,Ye),r(e,Me,i),r(e,ge,i),t(ge,ps),r(e,ds,i),r(e,ce,i),t(ce,as),t(ce,ze),t(ze,et),t(ce,os),t(ce,Ss),t(Ss,gs),t(ce,Os),t(ce,is),t(is,it),t(ce,Bs),r(e,xe,i),r(e,fs,i),t(fs,Ze),t(Ze,Ie),x(Es,Ie,null),t(fs,ws),t(fs,Rs),t(Rs,ft),r(e,qs,i),r(e,He,i),t(He,st),t(He,cs),t(cs,xs),t(He,Ks),r(e,ye,i),x(hs,e,i),r(e,ls,i),r(e,$s,i),t($s,tt),t($s,Se),t(Se,ct),t($s,at),r(e,_,i),r(e,O,i),r(e,Gs,i),r(e,Xs,i),t(Xs,zt),r(e,Je,i),x(As,e,i),r(e,ut,i),x(ys,e,i),r(e,Ce,i),r(e,Ve,i),t(Ve,De),t(Ve,Ws),t(Ws,mt),t(Ve,lt),t(Ve,rt),t(rt,Ct),t(Ve,nt),t(Ve,Ls),t(Ls,St),t(Ve,_t),r(e,Ds,i),x(Ps,e,i),r(e,Ts,i),x(zs,e,i),r(e,rs,i),r(e,Oe,i),t(Oe,pt),t(Oe,ot),t(ot,Ot),t(Oe,Fs),t(Oe,Us),t(Us,da),t(Oe,ha),r(e,Jt,i),x(m,e,i),r(e,I,i),r(e,Ys,i),t(Ys,Dl),r(e,$a,i),x(At,e,i),r(e,dt,i),x(Lt,e,i),r(e,ba,i),r(e,Vt,i),t(Vt,Pl),r(e,ht,i),x(Ft,e,i),r(e,ja,i),x(bs,e,i),r(e,ka,i),r(e,Qt,i),t(Qt,Tl),r(e,Zs,i),x(Ut,e,i),r(e,va,i),x(Mt,e,i),r(e,ga,i),r(e,Js,i),t(Js,zl),r(e,Ea,i),x(It,e,i),r(e,$t,i),x(Ht,e,i),r(e,wa,i),r(e,Vs,i),t(Vs,Cl),r(e,qa,i),x(Ms,e,i),r(e,xa,i),x(bt,e,i),r(e,Qs,i),r(e,Nt,i),t(Nt,Sl),r(e,ya,i),x(Is,e,i),r(e,Da,i),r(e,jt,i),t(jt,Ol),t(jt,gr),t(gr,Ap),t(jt,Lp),r(e,Yr,i),r(e,sa,i),t(sa,Fp),t(sa,Pa),t(Pa,Up),t(sa,Mp),r(e,Zr,i),x(Ta,e,i),r(e,Jr,i),r(e,Bt,i),t(Bt,Ip),t(Bt,Er),t(Er,Hp),t(Bt,Np),t(Bt,za),t(za,Bp),t(Bt,Rp),r(e,Vr,i),x(ta,e,i),r(e,Qr,i),r(e,aa,i),t(aa,Kp),t(aa,wr),t(wr,Gp),t(aa,Xp),r(e,en,i),r(e,la,i),t(la,Wp),t(la,qr),t(qr,Yp),t(la,Zp),r(e,sn,i),x(Ca,e,i),r(e,tn,i),r(e,Rt,i),t(Rt,Jp),t(Rt,xr),t(xr,Vp),t(Rt,Qp),t(Rt,yr),t(yr,eo),t(Rt,so),r(e,an,i),r(e,ra,i),t(ra,to),t(ra,Dr),t(Dr,ao),t(ra,lo),r(e,ln,i),r(e,Al,i),t(Al,ro),r(e,rn,i),x(Sa,e,i),r(e,nn,i),r(e,Ll,i),t(Ll,no),r(e,pn,i),x(Oa,e,i),r(e,on,i),x(Aa,e,i),r(e,fn,i),r(e,Fl,i),t(Fl,po),r(e,cn,i),r(e,kt,i),t(kt,Pr),t(Pr,oo),t(kt,io),t(kt,Tr),t(Tr,fo),t(kt,co),t(kt,zr),t(zr,uo),t(kt,mo),r(e,un,i),x(La,e,i),r(e,mn,i),r(e,Ul,i),t(Ul,_o),r(e,_n,i),x(na,e,i),r(e,dn,i),x(pa,e,i),r(e,hn,i),r(e,Ml,i),t(Ml,ho),r(e,$n,i),x(Fa,e,i),r(e,bn,i),r(e,Il,i),t(Il,$o),r(e,jn,i),bl[vt].m(e,i),r(e,Hl,i),r(e,Nl,i),t(Nl,bo),r(e,kn,i),r(e,Ua,i),t(Ua,jo),r(e,vn,i),r(e,Kt,i),t(Kt,ko),t(Kt,Bl),t(Bl,vo),t(Kt,go),t(Kt,Cr),t(Cr,Eo),t(Kt,wo),r(e,gn,i),r(e,oa,i),t(oa,qo),t(oa,Sr),t(Sr,xo),t(oa,yo),r(e,En,i),r(e,ns,i),t(ns,Do),t(ns,Ma),t(Ma,Or),t(Or,Po),t(ns,To),t(ns,Ar),t(Ar,zo),t(ns,Co),t(ns,Lr),t(Lr,So),t(ns,Oo),t(ns,Fr),t(Fr,Ao),t(ns,Lo),t(ns,Ur),t(Ur,Fo),t(ns,Uo),t(ns,Mr),t(Mr,Mo),t(ns,Io),r(e,wn,i),jl[Et].m(e,i),r(e,Rl,i),r(e,Kl,i),t(Kl,Ho),r(e,qn,i),x(Ia,e,i),r(e,xn,i),x(Ha,e,i),r(e,yn,i),r(e,ia,i),t(ia,No),t(ia,Ir),t(Ir,Bo),t(ia,Ro),r(e,Dn,i),x(Na,e,i),r(e,Pn,i),x(Ba,e,i),r(e,Tn,i),r(e,Gl,i),t(Gl,Ko),r(e,zn,i),x(Ra,e,i),r(e,Cn,i),x(Ka,e,i),r(e,Sn,i),r(e,Xl,i),t(Xl,Go),r(e,On,i),x(Ga,e,i),r(e,An,i),x(Xa,e,i),r(e,Ln,i),kl[qt].m(e,i),r(e,Wl,i),r(e,Wa,i),t(Wa,Xo),r(e,Fn,i),x(Ya,e,i),r(e,Un,i),Cs&&Cs.m(e,i),r(e,Yl,i),r(e,Gt,i),t(Gt,Wo),t(Gt,Za),t(Za,Yo),t(Gt,Zo),t(Gt,Ja),t(Ja,Jo),t(Gt,Vo),r(e,Mn,i),r(e,Zl,i),t(Zl,Qo),r(e,In,i),r(e,fa,i),t(fa,ei),t(fa,Va),t(Va,si),t(fa,ti),r(e,Hn,i),x(Qa,e,i),r(e,Nn,i),r(e,Xt,i),t(Xt,ai),t(Xt,Jl),t(Jl,li),t(Xt,ri),t(Xt,Hr),t(Hr,ni),t(Xt,pi),r(e,Bn,i),x(el,e,i),r(e,Rn,i),r(e,Vl,i),t(Vl,oi),r(e,Kn,i),r(e,Ql,i),t(Ql,ii),r(e,Gn,i),x(sl,e,i),r(e,Xn,i),x(tl,e,i),r(e,Wn,i),r(e,er,i),t(er,fi),r(e,Yn,i),r(e,Hs,i),t(Hs,ci),t(Hs,al),t(al,ui),t(Hs,mi),t(Hs,Nr),t(Nr,_i),t(Hs,di),t(Hs,Br),t(Br,hi),t(Hs,$i),t(Hs,ll),t(ll,bi),t(Hs,ji),r(e,Zn,i),r(e,sr,i),t(sr,ki),r(e,Jn,i),x(rl,e,i),r(e,Vn,i),x(nl,e,i),r(e,Qn,i),x(pl,e,i),r(e,ep,i),x(ol,e,i),r(e,sp,i),r(e,tr,i),t(tr,vi),r(e,tp,i),vl[yt].m(e,i),r(e,ar,i),r(e,lr,i),t(lr,gi),r(e,ap,i),r(e,il,i),t(il,Ei),r(e,lp,i),r(e,rr,i),t(rr,wi),r(e,rp,i),x(fl,e,i),r(e,np,i),r(e,nr,i),t(nr,qi),r(e,pp,i),x(cl,e,i),r(e,op,i),gl[Pt].m(e,i),r(e,pr,i),Qe&&Qe.m(e,i),r(e,or,i),r(e,ul,i),t(ul,xi),r(e,ip,i),r(e,ir,i),t(ir,yi),r(e,fp,i),x(ml,e,i),r(e,cp,i),x(_l,e,i),r(e,up,i),r(e,fr,i),t(fr,Di),r(e,mp,i),x(dl,e,i),r(e,_p,i),x(hl,e,i),r(e,dp,i),r(e,cr,i),t(cr,Pi),r(e,hp,i),x(ca,e,i),$p=!0},p(e,[i]){const Rr={};i&1&&(Rr.fw=e[0]),d.$set(Rr);let Wt=T;T=Ci(e),T!==Wt&&(yl(),k($l[Wt],1,1,()=>{$l[Wt]=null}),xl(),g=$l[T],g||(g=$l[T]=zi[T](e),g.c()),j(g,1),g.m(E.parentNode,E));const Kr={};i&2&&(Kr.$$scope={dirty:i,ctx:e}),bt.$set(Kr);const Gr={};i&2&&(Gr.$$scope={dirty:i,ctx:e}),ta.$set(Gr);const El={};i&2&&(El.$$scope={dirty:i,ctx:e}),na.$set(El);const Xr={};i&2&&(Xr.$$scope={dirty:i,ctx:e}),pa.$set(Xr);let ea=vt;vt=Oi(e),vt!==ea&&(yl(),k(bl[ea],1,1,()=>{bl[ea]=null}),xl(),gt=bl[vt],gt||(gt=bl[vt]=Si[vt](e),gt.c()),j(gt,1),gt.m(Hl.parentNode,Hl));let ur=Et;Et=Li(e),Et!==ur&&(yl(),k(jl[ur],1,1,()=>{jl[ur]=null}),xl(),wt=jl[Et],wt||(wt=jl[Et]=Ai[Et](e),wt.c()),j(wt,1),wt.m(Rl.parentNode,Rl));let mr=qt;qt=Ui(e),qt!==mr&&(yl(),k(kl[mr],1,1,()=>{kl[mr]=null}),xl(),xt=kl[qt],xt||(xt=kl[qt]=Fi[qt](e),xt.c()),j(xt,1),xt.m(Wl.parentNode,Wl)),e[0]==="pt"?Cs||(Cs=gc(),Cs.c(),Cs.m(Yl.parentNode,Yl)):Cs&&(Cs.d(1),Cs=null);let _r=yt;yt=Ii(e),yt!==_r&&(yl(),k(vl[_r],1,1,()=>{vl[_r]=null}),xl(),Dt=vl[yt],Dt||(Dt=vl[yt]=Mi[yt](e),Dt.c()),j(Dt,1),Dt.m(ar.parentNode,ar));let wl=Pt;Pt=Ni(e),Pt!==wl&&(yl(),k(gl[wl],1,1,()=>{gl[wl]=null}),xl(),Tt=gl[Pt],Tt||(Tt=gl[Pt]=Hi[Pt](e),Tt.c()),j(Tt,1),Tt.m(pr.parentNode,pr)),e[0]==="pt"?Qe?i&1&&j(Qe,1):(Qe=Ec(),Qe.c(),j(Qe,1),Qe.m(or.parentNode,or)):Qe&&(yl(),k(Qe,1,1,()=>{Qe=null}),xl());const Wr={};i&2&&(Wr.$$scope={dirty:i,ctx:e}),ca.$set(Wr)},i(e){$p||(j(d.$$.fragment,e),j(g),j(fe.$$.fragment,e),j(Es.$$.fragment,e),j(hs.$$.fragment,e),j(As.$$.fragment,e),j(ys.$$.fragment,e),j(Ps.$$.fragment,e),j(zs.$$.fragment,e),j(m.$$.fragment,e),j(At.$$.fragment,e),j(Lt.$$.fragment,e),j(Ft.$$.fragment,e),j(bs.$$.fragment,e),j(Ut.$$.fragment,e),j(Mt.$$.fragment,e),j(It.$$.fragment,e),j(Ht.$$.fragment,e),j(Ms.$$.fragment,e),j(bt.$$.fragment,e),j(Is.$$.fragment,e),j(Ta.$$.fragment,e),j(ta.$$.fragment,e),j(Ca.$$.fragment,e),j(Sa.$$.fragment,e),j(Oa.$$.fragment,e),j(Aa.$$.fragment,e),j(La.$$.fragment,e),j(na.$$.fragment,e),j(pa.$$.fragment,e),j(Fa.$$.fragment,e),j(gt),j(wt),j(Ia.$$.fragment,e),j(Ha.$$.fragment,e),j(Na.$$.fragment,e),j(Ba.$$.fragment,e),j(Ra.$$.fragment,e),j(Ka.$$.fragment,e),j(Ga.$$.fragment,e),j(Xa.$$.fragment,e),j(xt),j(Ya.$$.fragment,e),j(Qa.$$.fragment,e),j(el.$$.fragment,e),j(sl.$$.fragment,e),j(tl.$$.fragment,e),j(rl.$$.fragment,e),j(nl.$$.fragment,e),j(pl.$$.fragment,e),j(ol.$$.fragment,e),j(Dt),j(fl.$$.fragment,e),j(cl.$$.fragment,e),j(Tt),j(Qe),j(ml.$$.fragment,e),j(_l.$$.fragment,e),j(dl.$$.fragment,e),j(hl.$$.fragment,e),j(ca.$$.fragment,e),$p=!0)},o(e){k(d.$$.fragment,e),k(g),k(fe.$$.fragment,e),k(Es.$$.fragment,e),k(hs.$$.fragment,e),k(As.$$.fragment,e),k(ys.$$.fragment,e),k(Ps.$$.fragment,e),k(zs.$$.fragment,e),k(m.$$.fragment,e),k(At.$$.fragment,e),k(Lt.$$.fragment,e),k(Ft.$$.fragment,e),k(bs.$$.fragment,e),k(Ut.$$.fragment,e),k(Mt.$$.fragment,e),k(It.$$.fragment,e),k(Ht.$$.fragment,e),k(Ms.$$.fragment,e),k(bt.$$.fragment,e),k(Is.$$.fragment,e),k(Ta.$$.fragment,e),k(ta.$$.fragment,e),k(Ca.$$.fragment,e),k(Sa.$$.fragment,e),k(Oa.$$.fragment,e),k(Aa.$$.fragment,e),k(La.$$.fragment,e),k(na.$$.fragment,e),k(pa.$$.fragment,e),k(Fa.$$.fragment,e),k(gt),k(wt),k(Ia.$$.fragment,e),k(Ha.$$.fragment,e),k(Na.$$.fragment,e),k(Ba.$$.fragment,e),k(Ra.$$.fragment,e),k(Ka.$$.fragment,e),k(Ga.$$.fragment,e),k(Xa.$$.fragment,e),k(xt),k(Ya.$$.fragment,e),k(Qa.$$.fragment,e),k(el.$$.fragment,e),k(sl.$$.fragment,e),k(tl.$$.fragment,e),k(rl.$$.fragment,e),k(nl.$$.fragment,e),k(pl.$$.fragment,e),k(ol.$$.fragment,e),k(Dt),k(fl.$$.fragment,e),k(cl.$$.fragment,e),k(Tt),k(Qe),k(ml.$$.fragment,e),k(_l.$$.fragment,e),k(dl.$$.fragment,e),k(hl.$$.fragment,e),k(ca.$$.fragment,e),$p=!1},d(e){s(f),e&&s(b),y(d,e),e&&s(v),e&&s(C),e&&s(P),$l[T].d(e),e&&s(E),e&&s(F),e&&s(U),e&&s(W),e&&s(_e),y(fe,e),e&&s(oe),e&&s(te),e&&s(Le),e&&s(ae),e&&s(Be),e&&s(we),e&&s(Ke),e&&s(Pe),e&&s(Xe),e&&s(Z),e&&s(Te),e&&s(h),e&&s(ts),e&&s(me),e&&s(Me),e&&s(ge),e&&s(ds),e&&s(ce),e&&s(xe),e&&s(fs),y(Es),e&&s(qs),e&&s(He),e&&s(ye),y(hs,e),e&&s(ls),e&&s($s),e&&s(_),e&&s(O),e&&s(Gs),e&&s(Xs),e&&s(Je),y(As,e),e&&s(ut),y(ys,e),e&&s(Ce),e&&s(Ve),e&&s(Ds),y(Ps,e),e&&s(Ts),y(zs,e),e&&s(rs),e&&s(Oe),e&&s(Jt),y(m,e),e&&s(I),e&&s(Ys),e&&s($a),y(At,e),e&&s(dt),y(Lt,e),e&&s(ba),e&&s(Vt),e&&s(ht),y(Ft,e),e&&s(ja),y(bs,e),e&&s(ka),e&&s(Qt),e&&s(Zs),y(Ut,e),e&&s(va),y(Mt,e),e&&s(ga),e&&s(Js),e&&s(Ea),y(It,e),e&&s($t),y(Ht,e),e&&s(wa),e&&s(Vs),e&&s(qa),y(Ms,e),e&&s(xa),y(bt,e),e&&s(Qs),e&&s(Nt),e&&s(ya),y(Is,e),e&&s(Da),e&&s(jt),e&&s(Yr),e&&s(sa),e&&s(Zr),y(Ta,e),e&&s(Jr),e&&s(Bt),e&&s(Vr),y(ta,e),e&&s(Qr),e&&s(aa),e&&s(en),e&&s(la),e&&s(sn),y(Ca,e),e&&s(tn),e&&s(Rt),e&&s(an),e&&s(ra),e&&s(ln),e&&s(Al),e&&s(rn),y(Sa,e),e&&s(nn),e&&s(Ll),e&&s(pn),y(Oa,e),e&&s(on),y(Aa,e),e&&s(fn),e&&s(Fl),e&&s(cn),e&&s(kt),e&&s(un),y(La,e),e&&s(mn),e&&s(Ul),e&&s(_n),y(na,e),e&&s(dn),y(pa,e),e&&s(hn),e&&s(Ml),e&&s($n),y(Fa,e),e&&s(bn),e&&s(Il),e&&s(jn),bl[vt].d(e),e&&s(Hl),e&&s(Nl),e&&s(kn),e&&s(Ua),e&&s(vn),e&&s(Kt),e&&s(gn),e&&s(oa),e&&s(En),e&&s(ns),e&&s(wn),jl[Et].d(e),e&&s(Rl),e&&s(Kl),e&&s(qn),y(Ia,e),e&&s(xn),y(Ha,e),e&&s(yn),e&&s(ia),e&&s(Dn),y(Na,e),e&&s(Pn),y(Ba,e),e&&s(Tn),e&&s(Gl),e&&s(zn),y(Ra,e),e&&s(Cn),y(Ka,e),e&&s(Sn),e&&s(Xl),e&&s(On),y(Ga,e),e&&s(An),y(Xa,e),e&&s(Ln),kl[qt].d(e),e&&s(Wl),e&&s(Wa),e&&s(Fn),y(Ya,e),e&&s(Un),Cs&&Cs.d(e),e&&s(Yl),e&&s(Gt),e&&s(Mn),e&&s(Zl),e&&s(In),e&&s(fa),e&&s(Hn),y(Qa,e),e&&s(Nn),e&&s(Xt),e&&s(Bn),y(el,e),e&&s(Rn),e&&s(Vl),e&&s(Kn),e&&s(Ql),e&&s(Gn),y(sl,e),e&&s(Xn),y(tl,e),e&&s(Wn),e&&s(er),e&&s(Yn),e&&s(Hs),e&&s(Zn),e&&s(sr),e&&s(Jn),y(rl,e),e&&s(Vn),y(nl,e),e&&s(Qn),y(pl,e),e&&s(ep),y(ol,e),e&&s(sp),e&&s(tr),e&&s(tp),vl[yt].d(e),e&&s(ar),e&&s(lr),e&&s(ap),e&&s(il),e&&s(lp),e&&s(rr),e&&s(rp),y(fl,e),e&&s(np),e&&s(nr),e&&s(pp),y(cl,e),e&&s(op),gl[Pt].d(e),e&&s(pr),Qe&&Qe.d(e),e&&s(or),e&&s(ul),e&&s(ip),e&&s(ir),e&&s(fp),y(ml,e),e&&s(cp),y(_l,e),e&&s(up),e&&s(fr),e&&s(mp),y(dl,e),e&&s(_p),y(hl,e),e&&s(dp),e&&s(cr),e&&s(hp),y(ca,e)}}}const Vc={local:"",sections:[{local:"",sections:[{local:"kde4",title:"KDE4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"},{local:"",title:"\u30C7\u30FC\u30BF\u3092\u52A0\u5DE5\u3059\u308B"}],title:"\u30C7\u30FC\u30BF\u306E\u6E96\u5099"},{local:"trainer-api",title:"Trainer API \u3092\u7528\u3044\u3066\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3059\u308B"},{local:"keras",sections:[{local:"",title:"\u30C7\u30FC\u30BF\u306E\u7167\u5408"},{local:"",title:"\u6307\u6A19"},{local:"",title:"\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574"}],title:"Keras\u3092\u4F7F\u3063\u305F\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574"},{local:"",sections:[{local:"",title:"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u305F\u3081\u306E\u3059\u3079\u3066\u306E\u6E96\u5099"},{local:"",title:"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"}],title:"\u30AB\u30B9\u30BF\u30E0\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"},{local:"",title:"\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u3046"}],title:"\u7FFB\u8A33"};function Qc(G,f,b){let d="pt";return Pc(()=>{const v=new URLSearchParams(window.location.search);b(0,d=v.get("fw")||"pt")}),[d]}class pu extends qc{constructor(f){super();xc(this,f,Qc,Jc,yc,{})}}export{pu as default,Vc as metadata};
