import{S as pf,i as mf,s as cf,e as n,t,k as c,w as k,c as r,a as p,h as l,d as a,m as u,x as w,b as v,g as o,G as e,y as E,q as _,o as b,B as y,Y as ef,M as uf,Z as af,N as mo,p as lr,v as df,n as nr}from"../../chunks/vendor-hf-doc-builder.js";import{T as zt}from"../../chunks/Tip-hf-doc-builder.js";import{Y as wu}from"../../chunks/Youtube-hf-doc-builder.js";import{I as Eu}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as z}from"../../chunks/CodeBlock-hf-doc-builder.js";import{C as nf}from"../../chunks/CourseFloatingBanner-hf-doc-builder.js";import{F as hf}from"../../chunks/FrameworkSwitchCourse-hf-doc-builder.js";function ff(B){let d,j;return d=new nf({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/section5_tf.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/ja/chapter7/section5_tf.ipynb"}]}}),{c(){k(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,x){E(d,h,x),j=!0},i(h){j||(_(d.$$.fragment,h),j=!0)},o(h){b(d.$$.fragment,h),j=!1},d(h){y(d,h)}}}function _f(B){let d,j;return d=new nf({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/section5_pt.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/ja/chapter7/section5_pt.ipynb"}]}}),{c(){k(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,x){E(d,h,x),j=!0},i(h){j||(_(d.$$.fragment,h),j=!0)},o(h){b(d.$$.fragment,h),j=!1},d(h){y(d,h)}}}function bf(B){let d,j,h,x,R,q,P,S,$,O,A;return{c(){d=n("p"),j=t("\u270F\uFE0F "),h=n("strong"),x=t("\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),R=c(),q=n("code"),P=t("Dataset.shuffle()"),S=t(" \u30B3\u30DE\u30F3\u30C9\u306E\u30E9\u30F3\u30C0\u30E0\u30B7\u30FC\u30C9\u3092\u5909\u66F4\u3057\u3066\u3001\u30B3\u30FC\u30D1\u30B9\u306E\u4ED6\u306E\u30EC\u30D3\u30E5\u30FC\u3082\u8ABF\u3079\u3066\u307F\u3066\u304F\u3060\u3055\u3044\u3002\u3082\u3057\u3042\u306A\u305F\u304C\u30B9\u30DA\u30A4\u30F3\u8A9E\u3092\u8A71\u305B\u308B\u306A\u3089\u3001"),$=n("code"),O=t("spanish_dataset"),A=t(" \u306B\u3042\u308B\u3044\u304F\u3064\u304B\u306E\u30EC\u30D3\u30E5\u30FC\u3092\u898B\u3066\u3001\u30BF\u30A4\u30C8\u30EB\u3082\u59A5\u5F53\u306A\u8981\u7D04\u306B\u898B\u3048\u308B\u304B\u3069\u3046\u304B\u78BA\u304B\u3081\u3066\u307F\u3066\u304F\u3060\u3055\u3044\u3002")},l(C){d=r(C,"P",{});var L=p(d);j=l(L,"\u270F\uFE0F "),h=r(L,"STRONG",{});var F=p(h);x=l(F,"\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),F.forEach(a),R=u(L),q=r(L,"CODE",{});var X=p(q);P=l(X,"Dataset.shuffle()"),X.forEach(a),S=l(L," \u30B3\u30DE\u30F3\u30C9\u306E\u30E9\u30F3\u30C0\u30E0\u30B7\u30FC\u30C9\u3092\u5909\u66F4\u3057\u3066\u3001\u30B3\u30FC\u30D1\u30B9\u306E\u4ED6\u306E\u30EC\u30D3\u30E5\u30FC\u3082\u8ABF\u3079\u3066\u307F\u3066\u304F\u3060\u3055\u3044\u3002\u3082\u3057\u3042\u306A\u305F\u304C\u30B9\u30DA\u30A4\u30F3\u8A9E\u3092\u8A71\u305B\u308B\u306A\u3089\u3001"),$=r(L,"CODE",{});var Z=p($);O=l(Z,"spanish_dataset"),Z.forEach(a),A=l(L," \u306B\u3042\u308B\u3044\u304F\u3064\u304B\u306E\u30EC\u30D3\u30E5\u30FC\u3092\u898B\u3066\u3001\u30BF\u30A4\u30C8\u30EB\u3082\u59A5\u5F53\u306A\u8981\u7D04\u306B\u898B\u3048\u308B\u304B\u3069\u3046\u304B\u78BA\u304B\u3081\u3066\u307F\u3066\u304F\u3060\u3055\u3044\u3002"),L.forEach(a)},m(C,L){o(C,d,L),e(d,j),e(d,h),e(h,x),e(d,R),e(d,q),e(q,P),e(d,S),e(d,$),e($,O),e(d,A)},d(C){C&&a(d)}}}function gf(B){let d,j,h,x,R,q,P,S;return{c(){d=n("p"),j=t("\u270F\uFE0F "),h=n("strong"),x=t("\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),R=t(" \u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3092\u7D42\u3048\u305F\u3089\u3001\u540C\u3058\u624B\u6CD5\u3067mBART\u3092\u5FAE\u8ABF\u6574\u3057\u3066\u3001mT5\u304CmBART\u3068\u6BD4\u8F03\u3057\u3066\u3069\u306E\u7A0B\u5EA6\u512A\u308C\u3066\u3044\u308B\u304B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u30DC\u30FC\u30CA\u30B9\u30DD\u30A4\u30F3\u30C8\u3068\u3057\u3066\u3001\u82F1\u8A9E\u306E\u30EC\u30D3\u30E5\u30FC\u3060\u3051\u3067T5\u3092\u5FAE\u8ABF\u6574\u3057\u3066\u307F\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002T5\u306B\u306F\u7279\u5225\u306A\u63A5\u982D\u8F9E\u30D7\u30ED\u30F3\u30D7\u30C8\u304C\u3042\u308B\u306E\u3067\u3001\u4EE5\u4E0B\u306E\u524D\u51E6\u7406\u30B9\u30C6\u30C3\u30D7\u3067\u306F\u5165\u529B\u4F8B\u306E\u524D\u306B"),q=n("code"),P=t("summarize:"),S=t("\u3092\u4ED8\u3051\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002")},l($){d=r($,"P",{});var O=p(d);j=l(O,"\u270F\uFE0F "),h=r(O,"STRONG",{});var A=p(h);x=l(A,"\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),A.forEach(a),R=l(O," \u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3092\u7D42\u3048\u305F\u3089\u3001\u540C\u3058\u624B\u6CD5\u3067mBART\u3092\u5FAE\u8ABF\u6574\u3057\u3066\u3001mT5\u304CmBART\u3068\u6BD4\u8F03\u3057\u3066\u3069\u306E\u7A0B\u5EA6\u512A\u308C\u3066\u3044\u308B\u304B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u30DC\u30FC\u30CA\u30B9\u30DD\u30A4\u30F3\u30C8\u3068\u3057\u3066\u3001\u82F1\u8A9E\u306E\u30EC\u30D3\u30E5\u30FC\u3060\u3051\u3067T5\u3092\u5FAE\u8ABF\u6574\u3057\u3066\u307F\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002T5\u306B\u306F\u7279\u5225\u306A\u63A5\u982D\u8F9E\u30D7\u30ED\u30F3\u30D7\u30C8\u304C\u3042\u308B\u306E\u3067\u3001\u4EE5\u4E0B\u306E\u524D\u51E6\u7406\u30B9\u30C6\u30C3\u30D7\u3067\u306F\u5165\u529B\u4F8B\u306E\u524D\u306B"),q=r(O,"CODE",{});var C=p(q);P=l(C,"summarize:"),C.forEach(a),S=l(O,"\u3092\u4ED8\u3051\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),O.forEach(a)},m($,O){o($,d,O),e(d,j),e(d,h),e(h,x),e(d,R),e(d,q),e(q,P),e(d,S)},d($){$&&a(d)}}}function jf(B){let d,j;return{c(){d=n("p"),j=t("\u{1F4A1} NLP\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u521D\u671F\u6BB5\u968E\u3067\u306F\u3001\u300C\u5C0F\u3055\u306A\u300D\u30E2\u30C7\u30EB\u306E\u30AF\u30E9\u30B9\u3092\u5C11\u91CF\u306E\u30C7\u30FC\u30BF\u30B5\u30F3\u30D7\u30EB\u3067\u5B66\u7FD2\u3055\u305B\u308B\u306E\u304C\u3088\u3044\u65B9\u6CD5\u3067\u3059\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u30A8\u30F3\u30C9\u30FB\u30C4\u30FC\u30FB\u30A8\u30F3\u30C9\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306B\u5411\u3051\u305F\u30C7\u30D0\u30C3\u30B0\u3068\u53CD\u5FA9\u3092\u3088\u308A\u901F\u304F\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u7D50\u679C\u306B\u81EA\u4FE1\u304C\u6301\u3066\u305F\u3089\u3001\u30E2\u30C7\u30EB\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u5909\u66F4\u3059\u308B\u3060\u3051\u3067\u3001\u3044\u3064\u3067\u3082\u30E2\u30C7\u30EB\u3092\u30B9\u30B1\u30FC\u30EB\u30A2\u30C3\u30D7\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002")},l(h){d=r(h,"P",{});var x=p(d);j=l(x,"\u{1F4A1} NLP\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u521D\u671F\u6BB5\u968E\u3067\u306F\u3001\u300C\u5C0F\u3055\u306A\u300D\u30E2\u30C7\u30EB\u306E\u30AF\u30E9\u30B9\u3092\u5C11\u91CF\u306E\u30C7\u30FC\u30BF\u30B5\u30F3\u30D7\u30EB\u3067\u5B66\u7FD2\u3055\u305B\u308B\u306E\u304C\u3088\u3044\u65B9\u6CD5\u3067\u3059\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u30A8\u30F3\u30C9\u30FB\u30C4\u30FC\u30FB\u30A8\u30F3\u30C9\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306B\u5411\u3051\u305F\u30C7\u30D0\u30C3\u30B0\u3068\u53CD\u5FA9\u3092\u3088\u308A\u901F\u304F\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u7D50\u679C\u306B\u81EA\u4FE1\u304C\u6301\u3066\u305F\u3089\u3001\u30E2\u30C7\u30EB\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u5909\u66F4\u3059\u308B\u3060\u3051\u3067\u3001\u3044\u3064\u3067\u3082\u30E2\u30C7\u30EB\u3092\u30B9\u30B1\u30FC\u30EB\u30A2\u30C3\u30D7\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),x.forEach(a)},m(h,x){o(h,d,x),e(d,j)},d(h){h&&a(d)}}}function vf(B){let d,j,h,x,R,q,P,S,$,O,A;return{c(){d=n("p"),j=t("\u{1F4A1} \u4E0A\u306E "),h=n("code"),x=t("Dataset.map()"),R=t(" \u95A2\u6570\u3067 "),q=n("code"),P=t("batched=True"),S=t(" \u3092\u4F7F\u3063\u3066\u3044\u308B\u3053\u3068\u306B\u304A\u6C17\u3065\u304D\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002\u3053\u308C\u306F\u30B5\u30F3\u30D7\u30EB\u30921,000\u306E\u30D0\u30C3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8\uFF09\u3067\u30A8\u30F3\u30B3\u30FC\u30C9\u3057\u3001\u{1F917} Transformers\u306E\u9AD8\u901F\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u304C\u6301\u3064\u30DE\u30EB\u30C1\u30B9\u30EC\u30C3\u30C9\u6A5F\u80FD\u3092\u5229\u7528\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B\u3082\u306E\u3067\u3059\u3002\u53EF\u80FD\u3067\u3042\u308C\u3070\u3001\u524D\u51E6\u7406\u3092\u6700\u5927\u9650\u306B\u6D3B\u7528\u3059\u308B\u305F\u3081\u306B "),$=n("code"),O=t("batched=True"),A=t(" \u3092\u4F7F\u3063\u3066\u307F\u3066\u304F\u3060\u3055\u3044!")},l(C){d=r(C,"P",{});var L=p(d);j=l(L,"\u{1F4A1} \u4E0A\u306E "),h=r(L,"CODE",{});var F=p(h);x=l(F,"Dataset.map()"),F.forEach(a),R=l(L," \u95A2\u6570\u3067 "),q=r(L,"CODE",{});var X=p(q);P=l(X,"batched=True"),X.forEach(a),S=l(L," \u3092\u4F7F\u3063\u3066\u3044\u308B\u3053\u3068\u306B\u304A\u6C17\u3065\u304D\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002\u3053\u308C\u306F\u30B5\u30F3\u30D7\u30EB\u30921,000\u306E\u30D0\u30C3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8\uFF09\u3067\u30A8\u30F3\u30B3\u30FC\u30C9\u3057\u3001\u{1F917} Transformers\u306E\u9AD8\u901F\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u304C\u6301\u3064\u30DE\u30EB\u30C1\u30B9\u30EC\u30C3\u30C9\u6A5F\u80FD\u3092\u5229\u7528\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B\u3082\u306E\u3067\u3059\u3002\u53EF\u80FD\u3067\u3042\u308C\u3070\u3001\u524D\u51E6\u7406\u3092\u6700\u5927\u9650\u306B\u6D3B\u7528\u3059\u308B\u305F\u3081\u306B "),$=r(L,"CODE",{});var Z=p($);O=l(Z,"batched=True"),Z.forEach(a),A=l(L," \u3092\u4F7F\u3063\u3066\u307F\u3066\u304F\u3060\u3055\u3044!"),L.forEach(a)},m(C,L){o(C,d,L),e(d,j),e(d,h),e(h,x),e(d,R),e(d,q),e(q,P),e(d,S),e(d,$),e($,O),e(d,A)},d(C){C&&a(d)}}}function $f(B){let d,j,h,x,R,q,P,S;return{c(){d=n("p"),j=t("\u{1F64B} \u3082\u3057\u3042\u306A\u305F\u304C\u9069\u5408\u7387\u3084\u518D\u73FE\u7387\u306B\u3064\u3044\u3066\u521D\u3081\u3066\u805E\u3044\u305F\u3068\u3057\u3066\u3082\u5FC3\u914D\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\u3059\u3079\u3066\u3092\u660E\u3089\u304B\u306B\u3059\u308B\u305F\u3081\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u660E\u78BA\u306A\u4F8B\u3092\u4E00\u7DD2\u306B\u898B\u3066\u3044\u304D\u307E\u3057\u3087\u3046\u3002\u3053\u308C\u3089\u306E\u6307\u6A19\u306F\u901A\u5E38\u5206\u985E\u30BF\u30B9\u30AF\u3067\u906D\u9047\u3059\u308B\u306E\u3067\u3001\u305D\u306E\u5206\u985E\u30BF\u30B9\u30AF\u306E\u5834\u5408\u306B\u9069\u5408\u7387\u3068\u518D\u73FE\u7387\u304C\u3069\u306E\u3088\u3046\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B\u304B\u3092\u7406\u89E3\u3057\u305F\u3044\u5834\u5408\u306F\u3001 "),h=n("code"),x=t("scikit-learn"),R=c(),q=n("a"),P=t("guides"),S=t(" \u3092\u30C1\u30A7\u30C3\u30AF\u30A2\u30A6\u30C8\u3059\u308B\u3053\u3068\u3092\u304A\u52E7\u3081\u3057\u307E\u3059\u3002"),this.h()},l($){d=r($,"P",{});var O=p(d);j=l(O,"\u{1F64B} \u3082\u3057\u3042\u306A\u305F\u304C\u9069\u5408\u7387\u3084\u518D\u73FE\u7387\u306B\u3064\u3044\u3066\u521D\u3081\u3066\u805E\u3044\u305F\u3068\u3057\u3066\u3082\u5FC3\u914D\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\u3059\u3079\u3066\u3092\u660E\u3089\u304B\u306B\u3059\u308B\u305F\u3081\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u660E\u78BA\u306A\u4F8B\u3092\u4E00\u7DD2\u306B\u898B\u3066\u3044\u304D\u307E\u3057\u3087\u3046\u3002\u3053\u308C\u3089\u306E\u6307\u6A19\u306F\u901A\u5E38\u5206\u985E\u30BF\u30B9\u30AF\u3067\u906D\u9047\u3059\u308B\u306E\u3067\u3001\u305D\u306E\u5206\u985E\u30BF\u30B9\u30AF\u306E\u5834\u5408\u306B\u9069\u5408\u7387\u3068\u518D\u73FE\u7387\u304C\u3069\u306E\u3088\u3046\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B\u304B\u3092\u7406\u89E3\u3057\u305F\u3044\u5834\u5408\u306F\u3001 "),h=r(O,"CODE",{});var A=p(h);x=l(A,"scikit-learn"),A.forEach(a),R=u(O),q=r(O,"A",{href:!0,rel:!0});var C=p(q);P=l(C,"guides"),C.forEach(a),S=l(O," \u3092\u30C1\u30A7\u30C3\u30AF\u30A2\u30A6\u30C8\u3059\u308B\u3053\u3068\u3092\u304A\u52E7\u3081\u3057\u307E\u3059\u3002"),O.forEach(a),this.h()},h(){v(q,"href","https://scikit-learn.org/stable/auto_examples/model_selection/plot_precision_recall.html"),v(q,"rel","nofollow")},m($,O){o($,d,O),e(d,j),e(d,h),e(h,x),e(d,R),e(d,q),e(q,P),e(d,S)},d($){$&&a(d)}}}function kf(B){let d,j,h,x,R,q,P,S;return{c(){d=n("p"),j=t("\u270F\uFE0F "),h=n("strong"),x=t("\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),R=t(" \u751F\u6210\u3068\u53C2\u7167\u8981\u7D04\u306E\u72EC\u81EA\u306E\u4F8B\u3092\u4F5C\u6210\u3057\u3001\u7D50\u679C\u306EROUGE\u30B9\u30B3\u30A2\u304C\u7CBE\u5EA6\u3068\u30EA\u30B3\u30FC\u30EB\u306E\u516C\u5F0F\u3092\u57FA\u306B\u3057\u305F\u624B\u52D5\u8A08\u7B97\u3068\u4E00\u81F4\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30DC\u30FC\u30CA\u30B9\u30DD\u30A4\u30F3\u30C8\u3068\u3057\u3066\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u30D3\u30C3\u30B0\u30E9\u30E0\u306B\u5206\u5272\u3057\u3001"),q=n("code"),P=t("rouge2"),S=t(" \u6307\u6A19\u306E\u9069\u5408\u7387\u3068\u5236\u9650\u7387\u3092\u6BD4\u8F03\u3057\u307E\u3059\u3002")},l($){d=r($,"P",{});var O=p(d);j=l(O,"\u270F\uFE0F "),h=r(O,"STRONG",{});var A=p(h);x=l(A,"\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),A.forEach(a),R=l(O," \u751F\u6210\u3068\u53C2\u7167\u8981\u7D04\u306E\u72EC\u81EA\u306E\u4F8B\u3092\u4F5C\u6210\u3057\u3001\u7D50\u679C\u306EROUGE\u30B9\u30B3\u30A2\u304C\u7CBE\u5EA6\u3068\u30EA\u30B3\u30FC\u30EB\u306E\u516C\u5F0F\u3092\u57FA\u306B\u3057\u305F\u624B\u52D5\u8A08\u7B97\u3068\u4E00\u81F4\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30DC\u30FC\u30CA\u30B9\u30DD\u30A4\u30F3\u30C8\u3068\u3057\u3066\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u30D3\u30C3\u30B0\u30E9\u30E0\u306B\u5206\u5272\u3057\u3001"),q=r(O,"CODE",{});var C=p(q);P=l(C,"rouge2"),C.forEach(a),S=l(O," \u6307\u6A19\u306E\u9069\u5408\u7387\u3068\u5236\u9650\u7387\u3092\u6BD4\u8F03\u3057\u307E\u3059\u3002"),O.forEach(a)},m($,O){o($,d,O),e(d,j),e(d,h),e(h,x),e(d,R),e(d,q),e(q,P),e(d,S)},d($){$&&a(d)}}}function wf(B){let d,j,h,x,R,q,P,S,$,O,A,C,L,F,X,Z,H,M,W;return x=new Eu({}),M=new z({props:{code:`from transformers import TFAutoModelForSeq2SeqLM

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

model = TFAutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)`}}),{c(){d=n("h2"),j=n("a"),h=n("span"),k(x.$$.fragment),R=c(),q=n("span"),P=t("Keras\u3067mT5\u3092\u5FAE\u8ABF\u6574\u3059\u308B"),S=c(),$=n("p"),O=t("\u8981\u7D04\u306E\u305F\u3081\u306E\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u306F\u3001\u3053\u306E\u7AE0\u3067\u53D6\u308A\u4E0A\u3052\u305F\u4ED6\u306E\u30BF\u30B9\u30AF\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u3002\u307E\u305A\u6700\u521D\u306B\u884C\u3046\u3079\u304D\u3053\u3068\u306F\u3001"),A=n("code"),C=t("mt5-small"),L=t("\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u304B\u3089\u4E8B\u524D\u306B\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u8981\u7D04\u306F\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF\u306A\u306E\u3067\u3001"),F=n("code"),X=t("AutoModelForSeq2SeqLM"),Z=t("\u30AF\u30E9\u30B9\u3067\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3059\u308C\u3070\u3001\u81EA\u52D5\u7684\u306B\u91CD\u307F\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),H=c(),k(M.$$.fragment),this.h()},l(T){d=r(T,"H2",{class:!0});var G=p(d);j=r(G,"A",{id:!0,class:!0,href:!0});var rs=p(j);h=r(rs,"SPAN",{});var ss=p(h);w(x.$$.fragment,ss),ss.forEach(a),rs.forEach(a),R=u(G),q=r(G,"SPAN",{});var ls=p(q);P=l(ls,"Keras\u3067mT5\u3092\u5FAE\u8ABF\u6574\u3059\u308B"),ls.forEach(a),G.forEach(a),S=u(T),$=r(T,"P",{});var Q=p($);O=l(Q,"\u8981\u7D04\u306E\u305F\u3081\u306E\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u306F\u3001\u3053\u306E\u7AE0\u3067\u53D6\u308A\u4E0A\u3052\u305F\u4ED6\u306E\u30BF\u30B9\u30AF\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u3002\u307E\u305A\u6700\u521D\u306B\u884C\u3046\u3079\u304D\u3053\u3068\u306F\u3001"),A=r(Q,"CODE",{});var Y=p(A);C=l(Y,"mt5-small"),Y.forEach(a),L=l(Q,"\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u304B\u3089\u4E8B\u524D\u306B\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u8981\u7D04\u306F\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF\u306A\u306E\u3067\u3001"),F=r(Q,"CODE",{});var J=p(F);X=l(J,"AutoModelForSeq2SeqLM"),J.forEach(a),Z=l(Q,"\u30AF\u30E9\u30B9\u3067\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3059\u308C\u3070\u3001\u81EA\u52D5\u7684\u306B\u91CD\u307F\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Q.forEach(a),H=u(T),w(M.$$.fragment,T),this.h()},h(){v(j,"id","kerasmt5"),v(j,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(j,"href","#kerasmt5"),v(d,"class","relative group")},m(T,G){o(T,d,G),e(d,j),e(j,h),E(x,h,null),e(d,R),e(d,q),e(q,P),o(T,S,G),o(T,$,G),e($,O),e($,A),e(A,C),e($,L),e($,F),e(F,X),e($,Z),o(T,H,G),E(M,T,G),W=!0},i(T){W||(_(x.$$.fragment,T),_(M.$$.fragment,T),W=!0)},o(T){b(x.$$.fragment,T),b(M.$$.fragment,T),W=!1},d(T){T&&a(d),y(x),T&&a(S),T&&a($),T&&a(H),y(M,T)}}}function Ef(B){let d,j,h,x,R,q,P,S,$,O,A,C,L,F,X,Z,H,M,W;return x=new Eu({}),M=new z({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(){d=n("h2"),j=n("a"),h=n("span"),k(x.$$.fragment),R=c(),q=n("span"),P=t("Trainer API \u3092\u4F7F\u3063\u3066 mT5 \u3092\u5FAE\u8ABF\u6574\u3059\u308B"),S=c(),$=n("p"),O=t("\u8981\u7D04\u306E\u305F\u3081\u306E\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u306F\u3001\u3053\u306E\u7AE0\u3067\u53D6\u308A\u4E0A\u3052\u305F\u4ED6\u306E\u30BF\u30B9\u30AF\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u3002\u307E\u305A\u6700\u521D\u306B\u884C\u3046\u3079\u304D\u3053\u3068\u306F\u3001"),A=n("code"),C=t("mt5-small"),L=t(" \u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u304B\u3089\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u8981\u7D04\u306F\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF\u306A\u306E\u3067\u3001"),F=n("code"),X=t("AutoModelForSeq2SeqLM"),Z=t(" \u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u306F\u81EA\u52D5\u7684\u306B\u91CD\u307F\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u3057\u307E\u3059\u3002"),H=c(),k(M.$$.fragment),this.h()},l(T){d=r(T,"H2",{class:!0});var G=p(d);j=r(G,"A",{id:!0,class:!0,href:!0});var rs=p(j);h=r(rs,"SPAN",{});var ss=p(h);w(x.$$.fragment,ss),ss.forEach(a),rs.forEach(a),R=u(G),q=r(G,"SPAN",{});var ls=p(q);P=l(ls,"Trainer API \u3092\u4F7F\u3063\u3066 mT5 \u3092\u5FAE\u8ABF\u6574\u3059\u308B"),ls.forEach(a),G.forEach(a),S=u(T),$=r(T,"P",{});var Q=p($);O=l(Q,"\u8981\u7D04\u306E\u305F\u3081\u306E\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u306F\u3001\u3053\u306E\u7AE0\u3067\u53D6\u308A\u4E0A\u3052\u305F\u4ED6\u306E\u30BF\u30B9\u30AF\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u3002\u307E\u305A\u6700\u521D\u306B\u884C\u3046\u3079\u304D\u3053\u3068\u306F\u3001"),A=r(Q,"CODE",{});var Y=p(A);C=l(Y,"mt5-small"),Y.forEach(a),L=l(Q," \u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u304B\u3089\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u8981\u7D04\u306F\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF\u306A\u306E\u3067\u3001"),F=r(Q,"CODE",{});var J=p(F);X=l(J,"AutoModelForSeq2SeqLM"),J.forEach(a),Z=l(Q," \u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u30E2\u30C7\u30EB\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u306F\u81EA\u52D5\u7684\u306B\u91CD\u307F\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u3057\u307E\u3059\u3002"),Q.forEach(a),H=u(T),w(M.$$.fragment,T),this.h()},h(){v(j,"id","trainer-api-mt5"),v(j,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(j,"href","#trainer-api-mt5"),v(d,"class","relative group")},m(T,G){o(T,d,G),e(d,j),e(j,h),E(x,h,null),e(d,R),e(d,q),e(q,P),o(T,S,G),o(T,$,G),e($,O),e($,A),e(A,C),e($,L),e($,F),e(F,X),e($,Z),o(T,H,G),E(M,T,G),W=!0},i(T){W||(_(x.$$.fragment,T),_(M.$$.fragment,T),W=!0)},o(T){b(x.$$.fragment,T),b(M.$$.fragment,T),W=!1},d(T){T&&a(d),y(x),T&&a(S),T&&a($),T&&a(H),y(M,T)}}}function yf(B){let d,j,h,x,R;return{c(){d=n("p"),j=t("\u{1F4A1} \u4E0B\u6D41\u306E\u30BF\u30B9\u30AF\u3067\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u306B\u95A2\u3059\u308B\u8B66\u544A\u304C\u8868\u793A\u3055\u308C\u306A\u3044\u3053\u3068\u3092\u4E0D\u601D\u8B70\u306B\u601D\u3046\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u304C\u3001\u305D\u308C\u306F\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF\u3067\u306F\u3001\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u306E\u3059\u3079\u3066\u306E\u91CD\u307F\u304C\u4FDD\u6301\u3055\u308C\u308B\u304B\u3089\u3067\u3059\u3002\u3053\u308C\u3092"),h=n("a"),x=t("\u7B2C3\u7AE0"),R=t("\u306E\u30C6\u30AD\u30B9\u30C8\u5206\u985E\u30E2\u30C7\u30EB\u3068\u6BD4\u8F03\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u30C6\u30AD\u30B9\u30C8\u5206\u985E\u30E2\u30C7\u30EB\u3067\u306F\u3001\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u306E\u5148\u982D\u3092\u30E9\u30F3\u30C0\u30E0\u306B\u521D\u671F\u5316\u3057\u305F\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u306B\u7F6E\u304D\u63DB\u3048\u3066\u3044\u307E\u3059\u3002"),this.h()},l(q){d=r(q,"P",{});var P=p(d);j=l(P,"\u{1F4A1} \u4E0B\u6D41\u306E\u30BF\u30B9\u30AF\u3067\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u306B\u95A2\u3059\u308B\u8B66\u544A\u304C\u8868\u793A\u3055\u308C\u306A\u3044\u3053\u3068\u3092\u4E0D\u601D\u8B70\u306B\u601D\u3046\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u304C\u3001\u305D\u308C\u306F\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF\u3067\u306F\u3001\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u306E\u3059\u3079\u3066\u306E\u91CD\u307F\u304C\u4FDD\u6301\u3055\u308C\u308B\u304B\u3089\u3067\u3059\u3002\u3053\u308C\u3092"),h=r(P,"A",{href:!0});var S=p(h);x=l(S,"\u7B2C3\u7AE0"),S.forEach(a),R=l(P,"\u306E\u30C6\u30AD\u30B9\u30C8\u5206\u985E\u30E2\u30C7\u30EB\u3068\u6BD4\u8F03\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u30C6\u30AD\u30B9\u30C8\u5206\u985E\u30E2\u30C7\u30EB\u3067\u306F\u3001\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u306E\u5148\u982D\u3092\u30E9\u30F3\u30C0\u30E0\u306B\u521D\u671F\u5316\u3057\u305F\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u306B\u7F6E\u304D\u63DB\u3048\u3066\u3044\u307E\u3059\u3002"),P.forEach(a),this.h()},h(){v(h,"href","/course/ja/chapter3")},m(q,P){o(q,d,P),e(d,j),e(d,h),e(h,x),e(d,R)},d(q){q&&a(d)}}}function tf(B){let d,j,h,x,R,q,P,S,$,O,A,C,L,F,X,Z,H,M,W,T,G,rs,ss,ls,Q,Y,J,es,$s,as,Ds,ms,K,os,qs,ts,cs,gs,us,ds,ps,ks,f,U,V,g,N,Ss,Ts,zs,_s,hs,js,Ys,is,Fs,Hs,$e,Gs,le,Js,Xs,Bs,Fe,de,vs,ne,Zs,he,Es,fe;return O=new z({props:{code:`from transformers import Seq2SeqTrainingArguments

batch_size = 8
num_train_epochs = 8
# Show the training loss with every epoch
logging_steps = len(tokenized_datasets["train"]) // batch_size
model_name = model_checkpoint.split("/")[-1]

args = Seq2SeqTrainingArguments(
    output_dir=f"{model_name}-finetuned-amazon-en-es",
    evaluation_strategy="epoch",
    learning_rate=5.6e-5,
    per_device_train_batch_size=batch_size,
    per_device_eval_batch_size=batch_size,
    weight_decay=0.01,
    save_total_limit=3,
    num_train_epochs=num_train_epochs,
    predict_with_generate=True,
    logging_steps=logging_steps,
    push_to_hub=True,
)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Seq2SeqTrainingArguments

batch_size = <span class="hljs-number">8</span>
num_train_epochs = <span class="hljs-number">8</span>
<span class="hljs-comment"># Show the training loss with every epoch</span>
logging_steps = <span class="hljs-built_in">len</span>(tokenized_datasets[<span class="hljs-string">&quot;train&quot;</span>]) // batch_size
model_name = model_checkpoint.split(<span class="hljs-string">&quot;/&quot;</span>)[-<span class="hljs-number">1</span>]

args = Seq2SeqTrainingArguments(
    output_dir=<span class="hljs-string">f&quot;<span class="hljs-subst">{model_name}</span>-finetuned-amazon-en-es&quot;</span>,
    evaluation_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
    learning_rate=<span class="hljs-number">5.6e-5</span>,
    per_device_train_batch_size=batch_size,
    per_device_eval_batch_size=batch_size,
    weight_decay=<span class="hljs-number">0.01</span>,
    save_total_limit=<span class="hljs-number">3</span>,
    num_train_epochs=num_train_epochs,
    predict_with_generate=<span class="hljs-literal">True</span>,
    logging_steps=logging_steps,
    push_to_hub=<span class="hljs-literal">True</span>,
)`}}),Es=new z({props:{code:`import numpy as np


def compute_metrics(eval_pred):
    predictions, labels = eval_pred
    # Decode generated summaries into text
    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)
    # Decode reference summaries into text
    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)
    # ROUGE expects a newline after each sentence
    decoded_preds = ["\\n".join(sent_tokenize(pred.strip())) for pred in decoded_preds]
    decoded_labels = ["\\n".join(sent_tokenize(label.strip())) for label in decoded_labels]
    # Compute ROUGE scores
    result = rouge_score.compute(
        predictions=decoded_preds, references=decoded_labels, use_stemmer=True
    )
    # Extract the median scores
    result = {key: value.mid.fmeasure * 100 for key, value in result.items()}
    return {k: round(v, 4) for k, v in result.items()}`,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_pred</span>):
    predictions, labels = eval_pred
    <span class="hljs-comment"># Decode generated summaries into text</span>
    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)
    <span class="hljs-comment"># Decode reference summaries into text</span>
    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=<span class="hljs-literal">True</span>)
    <span class="hljs-comment"># ROUGE expects a newline after each sentence</span>
    decoded_preds = [<span class="hljs-string">&quot;\\n&quot;</span>.join(sent_tokenize(pred.strip())) <span class="hljs-keyword">for</span> pred <span class="hljs-keyword">in</span> decoded_preds]
    decoded_labels = [<span class="hljs-string">&quot;\\n&quot;</span>.join(sent_tokenize(label.strip())) <span class="hljs-keyword">for</span> label <span class="hljs-keyword">in</span> decoded_labels]
    <span class="hljs-comment"># Compute ROUGE scores</span>
    result = rouge_score.compute(
        predictions=decoded_preds, references=decoded_labels, use_stemmer=<span class="hljs-literal">True</span>
    )
    <span class="hljs-comment"># Extract the median scores</span>
    result = {key: value.mid.fmeasure * <span class="hljs-number">100</span> <span class="hljs-keyword">for</span> key, value <span class="hljs-keyword">in</span> result.items()}
    <span class="hljs-keyword">return</span> {k: <span class="hljs-built_in">round</span>(v, <span class="hljs-number">4</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> result.items()}`}}),{c(){d=n("p"),j=t("\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u4E2D\u306BROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u305F\u3081\u306B\u3001\u8981\u7D04\u3092\u751F\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u5E78\u3044\u306A\u3053\u3068\u306B\u3001\u{1F917} Transformers\u306F\u5C02\u7528\u306E "),h=n("code"),x=t("Seq2SeqTrainingArguments"),R=t(" \u3068 "),q=n("code"),P=t("Seq2SeqTrainer"),S=t(` \u30AF\u30E9\u30B9\u3092\u63D0\u4F9B\u3057\u3001\u79C1\u305F\u3061\u306E\u305F\u3081\u306B\u81EA\u52D5\u7684\u306B\u3053\u308C\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF01
\u3053\u306E\u30AF\u30E9\u30B9\u304C\u3069\u306E\u3088\u3046\u306B\u6A5F\u80FD\u3059\u308B\u304B\u3092\u898B\u3066\u307F\u308B\u305F\u3081\u306B\u3001\u307E\u305A\u5B9F\u9A13\u7528\u306B\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\u3068\u305D\u306E\u4ED6\u306E\u5F15\u6570\u3092\u5B9A\u7FA9\u3057\u307E\u3057\u3087\u3046\u3002`),$=c(),k(O.$$.fragment),A=c(),C=n("p"),L=t("\u3053\u3053\u3067\u306F\u3001 "),F=n("code"),X=t("predict_with_generate"),Z=t(" \u5F15\u6570\u3092\u8A2D\u5B9A\u3057\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u306E ROUGE \u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u8A55\u4FA1\u4E2D\u306B\u8981\u7D04\u3092\u751F\u6210\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3057\u305F\u3002"),H=n("a"),M=t("\u7B2C1\u7AE0"),W=t(" \u3067\u8AAC\u660E\u3057\u305F\u3088\u3046\u306B\u3001\u30C7\u30B3\u30FC\u30C0\u306F\u30C8\u30FC\u30AF\u30F3\u3092\u4E00\u3064\u305A\u3064\u4E88\u6E2C\u3057\u3066\u63A8\u8AD6\u3092\u884C\u3044\u307E\u3059\u304C\u3001\u3053\u308C\u306F\u30E2\u30C7\u30EB\u306E "),T=n("code"),G=t("generate()"),rs=t(" \u30E1\u30BD\u30C3\u30C9\u306B\u3088\u3063\u3066\u5B9F\u88C5\u3055\u308C\u3066\u3044\u307E\u3059\u3002"),ss=n("code"),ls=t("predict_with_generate=True"),Q=t(" \u3092\u8A2D\u5B9A\u3059\u308B\u3068\u3001 "),Y=n("code"),J=t("Seq2SeqTrainer"),es=t(" \u304C\u305D\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u8A55\u4FA1\u3092\u884C\u3046\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002\u307E\u305F\u3001\u5B66\u7FD2\u7387\u3001\u30A8\u30DD\u30C3\u30AF\u56DE\u6570\u3001\u91CD\u307F\u6E1B\u8870\u306A\u3069\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u8ABF\u6574\u3057\u3001 "),$s=n("code"),as=t("save_total_limit"),Ds=t(" \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8A2D\u5B9A\u3057\u3066\u3001\u5B66\u7FD2\u4E2D\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u30923\u3064\u307E\u3067\u3057\u304B\u4FDD\u5B58\u3057\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3057\u305F\u3002\u3053\u308C\u306FmT5\u306E\u300C\u5C0F\u3055\u3044\u300D\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u3055\u3048\u3001\u30CF\u30FC\u30C9\u30C7\u30A3\u30B9\u30AF\u306E\u5BB9\u91CF\u3092\u7D041GB\u4F7F\u7528\u3057\u3066\u304A\u308A\u3001\u4FDD\u5B58\u3059\u308B\u30B3\u30D4\u30FC\u3092\u5236\u9650\u3059\u308C\u3070\u3001\u5C11\u3057\u5BB9\u91CF\u3092\u7BC0\u7D04\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u304B\u3089\u3067\u3059\u3002"),ms=c(),K=n("p"),os=n("code"),qs=t("push_to_hub=True"),ts=t(" \u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u5B66\u7FD2\u5F8C\u306B\u30E2\u30C7\u30EB\u3092 Hub \u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30E6\u30FC\u30B6\u30FC\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u306E\u4E0B\u306E\u3001 "),cs=n("code"),gs=t("output_dir"),us=t(" \u3067\u5B9A\u7FA9\u3055\u308C\u305F\u5834\u6240\u306B\u30EA\u30DD\u30B8\u30C8\u30EA\u304C\u4F5C\u6210\u3055\u308C\u307E\u3059\u3002\u306A\u304A\u3001 "),ds=n("code"),ps=t("hub_model_id"),ks=t(" \u5F15\u6570\u3067\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u540D\u524D\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 "),f=n("a"),U=n("code"),V=t("huggingface-course"),g=t(" organization"),N=t(" \u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u3001"),Ss=n("code"),Ts=t("Seq2SeqTrainingArguments"),zs=t(" \u306B "),_s=n("code"),hs=t('hub_model_id="huggingface-course/mt5-finetuned-amazon-en-es"'),js=t(" \u3092\u8FFD\u52A0\u3057\u3066\u3044\u307E\u3059\u3002"),Ys=c(),is=n("p"),Fs=t("\u6B21\u306B\u5FC5\u8981\u306A\u3053\u3068\u306F\u3001\u5B66\u7FD2\u4E2D\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3067\u304D\u308B\u3088\u3046\u306B\u3001 "),Hs=n("code"),$e=t("compute_metrics()"),Gs=t(` \u95A2\u6570\u3092\u30C8\u30EC\u30FC\u30CA\u30FC\u306B\u63D0\u4F9B\u3059\u308B\u3053\u3068\u3067\u3059\u3002
\u8981\u7D04\u30BF\u30B9\u30AF\u3067\u306F\u3001\u4E88\u6E2C\u30BF\u30B9\u30AF\u306E\u3088\u3046\u306B\u30B7\u30F3\u30D7\u30EB\u306B `),le=n("code"),Js=t("rouge_score.compute()"),Xs=t(" \u3092\u547C\u3076\u306E\u3068\u5C11\u3057\u7570\u306A\u308A\u307E\u3059\u3002\u306A\u305C\u306A\u3089\u3001ROUGE \u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u524D\u306B\u3001\u51FA\u529B\u3068\u30E9\u30D9\u30EB\u3092\u30C6\u30AD\u30B9\u30C8\u306B\u30C7\u30B3\u30FC\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u304B\u3089\u3067\u3059\u3002\u4EE5\u4E0B\u306E\u95A2\u6570\u306F\u307E\u3055\u306B\u305D\u308C\u3092\u884C\u3046\u3082\u306E\u3067\u3001\u3055\u3089\u306B "),Bs=n("code"),Fe=t("nltk"),de=t(" \u306E "),vs=n("code"),ne=t("sent_tokenize()"),Zs=t(" \u95A2\u6570\u3092\u5229\u7528\u3057\u3066\u3001\u8981\u7D04\u6587\u7AE0\u3092\u6539\u884C\u3067\u533A\u5207\u308B\u3088\u3046\u306B\u3057\u3066\u3044\u307E\u3059\u3002"),he=c(),k(Es.$$.fragment),this.h()},l(I){d=r(I,"P",{});var ns=p(d);j=l(ns,"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u4E2D\u306BROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u305F\u3081\u306B\u3001\u8981\u7D04\u3092\u751F\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u5E78\u3044\u306A\u3053\u3068\u306B\u3001\u{1F917} Transformers\u306F\u5C02\u7528\u306E "),h=r(ns,"CODE",{});var ke=p(h);x=l(ke,"Seq2SeqTrainingArguments"),ke.forEach(a),R=l(ns," \u3068 "),q=r(ns,"CODE",{});var He=p(q);P=l(He,"Seq2SeqTrainer"),He.forEach(a),S=l(ns,` \u30AF\u30E9\u30B9\u3092\u63D0\u4F9B\u3057\u3001\u79C1\u305F\u3061\u306E\u305F\u3081\u306B\u81EA\u52D5\u7684\u306B\u3053\u308C\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF01
\u3053\u306E\u30AF\u30E9\u30B9\u304C\u3069\u306E\u3088\u3046\u306B\u6A5F\u80FD\u3059\u308B\u304B\u3092\u898B\u3066\u307F\u308B\u305F\u3081\u306B\u3001\u307E\u305A\u5B9F\u9A13\u7528\u306B\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\u3068\u305D\u306E\u4ED6\u306E\u5F15\u6570\u3092\u5B9A\u7FA9\u3057\u307E\u3057\u3087\u3046\u3002`),ns.forEach(a),$=u(I),w(O.$$.fragment,I),A=u(I),C=r(I,"P",{});var bs=p(C);L=l(bs,"\u3053\u3053\u3067\u306F\u3001 "),F=r(bs,"CODE",{});var we=p(F);X=l(we,"predict_with_generate"),we.forEach(a),Z=l(bs," \u5F15\u6570\u3092\u8A2D\u5B9A\u3057\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u306E ROUGE \u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u8A55\u4FA1\u4E2D\u306B\u8981\u7D04\u3092\u751F\u6210\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3057\u305F\u3002"),H=r(bs,"A",{href:!0});var Be=p(H);M=l(Be,"\u7B2C1\u7AE0"),Be.forEach(a),W=l(bs," \u3067\u8AAC\u660E\u3057\u305F\u3088\u3046\u306B\u3001\u30C7\u30B3\u30FC\u30C0\u306F\u30C8\u30FC\u30AF\u30F3\u3092\u4E00\u3064\u305A\u3064\u4E88\u6E2C\u3057\u3066\u63A8\u8AD6\u3092\u884C\u3044\u307E\u3059\u304C\u3001\u3053\u308C\u306F\u30E2\u30C7\u30EB\u306E "),T=r(bs,"CODE",{});var re=p(T);G=l(re,"generate()"),re.forEach(a),rs=l(bs," \u30E1\u30BD\u30C3\u30C9\u306B\u3088\u3063\u3066\u5B9F\u88C5\u3055\u308C\u3066\u3044\u307E\u3059\u3002"),ss=r(bs,"CODE",{});var Ee=p(ss);ls=l(Ee,"predict_with_generate=True"),Ee.forEach(a),Q=l(bs," \u3092\u8A2D\u5B9A\u3059\u308B\u3068\u3001 "),Y=r(bs,"CODE",{});var Us=p(Y);J=l(Us,"Seq2SeqTrainer"),Us.forEach(a),es=l(bs," \u304C\u305D\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u8A55\u4FA1\u3092\u884C\u3046\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002\u307E\u305F\u3001\u5B66\u7FD2\u7387\u3001\u30A8\u30DD\u30C3\u30AF\u56DE\u6570\u3001\u91CD\u307F\u6E1B\u8870\u306A\u3069\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u8ABF\u6574\u3057\u3001 "),$s=r(bs,"CODE",{});var We=p($s);as=l(We,"save_total_limit"),We.forEach(a),Ds=l(bs," \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8A2D\u5B9A\u3057\u3066\u3001\u5B66\u7FD2\u4E2D\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u30923\u3064\u307E\u3067\u3057\u304B\u4FDD\u5B58\u3057\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3057\u305F\u3002\u3053\u308C\u306FmT5\u306E\u300C\u5C0F\u3055\u3044\u300D\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u3055\u3048\u3001\u30CF\u30FC\u30C9\u30C7\u30A3\u30B9\u30AF\u306E\u5BB9\u91CF\u3092\u7D041GB\u4F7F\u7528\u3057\u3066\u304A\u308A\u3001\u4FDD\u5B58\u3059\u308B\u30B3\u30D4\u30FC\u3092\u5236\u9650\u3059\u308C\u3070\u3001\u5C11\u3057\u5BB9\u91CF\u3092\u7BC0\u7D04\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u304B\u3089\u3067\u3059\u3002"),bs.forEach(a),ms=u(I),K=r(I,"P",{});var fs=p(K);os=r(fs,"CODE",{});var Qs=p(os);qs=l(Qs,"push_to_hub=True"),Qs.forEach(a),ts=l(fs," \u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u5B66\u7FD2\u5F8C\u306B\u30E2\u30C7\u30EB\u3092 Hub \u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30E6\u30FC\u30B6\u30FC\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u306E\u4E0B\u306E\u3001 "),cs=r(fs,"CODE",{});var ys=p(cs);gs=l(ys,"output_dir"),ys.forEach(a),us=l(fs," \u3067\u5B9A\u7FA9\u3055\u308C\u305F\u5834\u6240\u306B\u30EA\u30DD\u30B8\u30C8\u30EA\u304C\u4F5C\u6210\u3055\u308C\u307E\u3059\u3002\u306A\u304A\u3001 "),ds=r(fs,"CODE",{});var Ms=p(ds);ps=l(Ms,"hub_model_id"),Ms.forEach(a),ks=l(fs," \u5F15\u6570\u3067\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u540D\u524D\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 "),f=r(fs,"A",{href:!0,rel:!0});var _e=p(f);U=r(_e,"CODE",{});var ye=p(U);V=l(ye,"huggingface-course"),ye.forEach(a),g=l(_e," organization"),_e.forEach(a),N=l(fs," \u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u5834\u5408\u3001"),Ss=r(fs,"CODE",{});var ca=p(Ss);Ts=l(ca,"Seq2SeqTrainingArguments"),ca.forEach(a),zs=l(fs," \u306B "),_s=r(fs,"CODE",{});var xe=p(_s);hs=l(xe,'hub_model_id="huggingface-course/mt5-finetuned-amazon-en-es"'),xe.forEach(a),js=l(fs," \u3092\u8FFD\u52A0\u3057\u3066\u3044\u307E\u3059\u3002"),fs.forEach(a),Ys=u(I),is=r(I,"P",{});var Os=p(is);Fs=l(Os,"\u6B21\u306B\u5FC5\u8981\u306A\u3053\u3068\u306F\u3001\u5B66\u7FD2\u4E2D\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3067\u304D\u308B\u3088\u3046\u306B\u3001 "),Hs=r(Os,"CODE",{});var ua=p(Hs);$e=l(ua,"compute_metrics()"),ua.forEach(a),Gs=l(Os,` \u95A2\u6570\u3092\u30C8\u30EC\u30FC\u30CA\u30FC\u306B\u63D0\u4F9B\u3059\u308B\u3053\u3068\u3067\u3059\u3002
\u8981\u7D04\u30BF\u30B9\u30AF\u3067\u306F\u3001\u4E88\u6E2C\u30BF\u30B9\u30AF\u306E\u3088\u3046\u306B\u30B7\u30F3\u30D7\u30EB\u306B `),le=r(Os,"CODE",{});var be=p(le);Js=l(be,"rouge_score.compute()"),be.forEach(a),Xs=l(Os," \u3092\u547C\u3076\u306E\u3068\u5C11\u3057\u7570\u306A\u308A\u307E\u3059\u3002\u306A\u305C\u306A\u3089\u3001ROUGE \u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u524D\u306B\u3001\u51FA\u529B\u3068\u30E9\u30D9\u30EB\u3092\u30C6\u30AD\u30B9\u30C8\u306B\u30C7\u30B3\u30FC\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u304B\u3089\u3067\u3059\u3002\u4EE5\u4E0B\u306E\u95A2\u6570\u306F\u307E\u3055\u306B\u305D\u308C\u3092\u884C\u3046\u3082\u306E\u3067\u3001\u3055\u3089\u306B "),Bs=r(Os,"CODE",{});var Ke=p(Bs);Fe=l(Ke,"nltk"),Ke.forEach(a),de=l(Os," \u306E "),vs=r(Os,"CODE",{});var ge=p(vs);ne=l(ge,"sent_tokenize()"),ge.forEach(a),Zs=l(Os," \u95A2\u6570\u3092\u5229\u7528\u3057\u3066\u3001\u8981\u7D04\u6587\u7AE0\u3092\u6539\u884C\u3067\u533A\u5207\u308B\u3088\u3046\u306B\u3057\u3066\u3044\u307E\u3059\u3002"),Os.forEach(a),he=u(I),w(Es.$$.fragment,I),this.h()},h(){v(H,"href","/course/ja/chapter1"),v(f,"href","https://huggingface.co/huggingface-course"),v(f,"rel","nofollow")},m(I,ns){o(I,d,ns),e(d,j),e(d,h),e(h,x),e(d,R),e(d,q),e(q,P),e(d,S),o(I,$,ns),E(O,I,ns),o(I,A,ns),o(I,C,ns),e(C,L),e(C,F),e(F,X),e(C,Z),e(C,H),e(H,M),e(C,W),e(C,T),e(T,G),e(C,rs),e(C,ss),e(ss,ls),e(C,Q),e(C,Y),e(Y,J),e(C,es),e(C,$s),e($s,as),e(C,Ds),o(I,ms,ns),o(I,K,ns),e(K,os),e(os,qs),e(K,ts),e(K,cs),e(cs,gs),e(K,us),e(K,ds),e(ds,ps),e(K,ks),e(K,f),e(f,U),e(U,V),e(f,g),e(K,N),e(K,Ss),e(Ss,Ts),e(K,zs),e(K,_s),e(_s,hs),e(K,js),o(I,Ys,ns),o(I,is,ns),e(is,Fs),e(is,Hs),e(Hs,$e),e(is,Gs),e(is,le),e(le,Js),e(is,Xs),e(is,Bs),e(Bs,Fe),e(is,de),e(is,vs),e(vs,ne),e(is,Zs),o(I,he,ns),E(Es,I,ns),fe=!0},i(I){fe||(_(O.$$.fragment,I),_(Es.$$.fragment,I),fe=!0)},o(I){b(O.$$.fragment,I),b(Es.$$.fragment,I),fe=!1},d(I){I&&a(d),I&&a($),y(O,I),I&&a(A),I&&a(C),I&&a(ms),I&&a(K),I&&a(Ys),I&&a(is),I&&a(he),y(Es,I)}}}function xf(B){let d,j;return d=new z({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(){k(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,x){E(d,h,x),j=!0},i(h){j||(_(d.$$.fragment,h),j=!0)},o(h){b(d.$$.fragment,h),j=!1},d(h){y(d,h)}}}function qf(B){let d,j;return d=new z({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(){k(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,x){E(d,h,x),j=!0},i(h){j||(_(d.$$.fragment,h),j=!0)},o(h){b(d.$$.fragment,h),j=!1},d(h){y(d,h)}}}function Tf(B){let d,j,h,x,R,q,P,S,$,O,A,C,L,F,X,Z,H,M,W,T,G,rs,ss,ls,Q,Y,J,es,$s,as,Ds,ms,K,os,qs,ts,cs,gs,us,ds,ps,ks;return L=new z({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=8,
)
tf_eval_dataset = tokenized_datasets["validation"].to_tf_dataset(
    columns=["input_ids", "attention_mask", "labels"],
    collate_fn=data_collator,
    shuffle=False,
    batch_size=8,
)`,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">8</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">8</span>,
)`}}),M=new z({props:{code:`from transformers import create_optimizer
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_train_epochs = 8
num_train_steps = len(tf_train_dataset) * num_train_epochs
model_name = model_checkpoint.split("/")[-1]

optimizer, schedule = create_optimizer(
    init_lr=5.6e-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">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_train_epochs = <span class="hljs-number">8</span>
num_train_steps = <span class="hljs-built_in">len</span>(tf_train_dataset) * num_train_epochs
model_name = model_checkpoint.split(<span class="hljs-string">&quot;/&quot;</span>)[-<span class="hljs-number">1</span>]

optimizer, schedule = create_optimizer(
    init_lr=<span class="hljs-number">5.6e-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 z({props:{code:`from transformers.keras_callbacks import PushToHubCallback

callback = PushToHubCallback(
    output_dir=f"{model_name}-finetuned-amazon-en-es", tokenizer=tokenizer
)

model.fit(
    tf_train_dataset, validation_data=tf_eval_dataset, callbacks=[callback], epochs=8
)`,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">f&quot;<span class="hljs-subst">{model_name}</span>-finetuned-amazon-en-es&quot;</span>, tokenizer=tokenizer
)

model.fit(
    tf_train_dataset, validation_data=tf_eval_dataset, callbacks=[callback], epochs=<span class="hljs-number">8</span>
)`}}),os=new z({props:{code:`from tqdm import tqdm
import numpy as np

all_preds = []
all_labels = []
for batch in tqdm(tf_eval_dataset):
    predictions = model.generate(**batch)
    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 = ["\\n".join(sent_tokenize(pred.strip())) for pred in decoded_preds]
    decoded_labels = ["\\n".join(sent_tokenize(label.strip())) for label in decoded_labels]
    all_preds.extend(decoded_preds)
    all_labels.extend(decoded_labels)`,highlighted:`<span class="hljs-keyword">from</span> tqdm <span class="hljs-keyword">import</span> tqdm
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

all_preds = []
all_labels = []
<span class="hljs-keyword">for</span> batch <span class="hljs-keyword">in</span> tqdm(tf_eval_dataset):
    predictions = model.generate(**batch)
    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 = [<span class="hljs-string">&quot;\\n&quot;</span>.join(sent_tokenize(pred.strip())) <span class="hljs-keyword">for</span> pred <span class="hljs-keyword">in</span> decoded_preds]
    decoded_labels = [<span class="hljs-string">&quot;\\n&quot;</span>.join(sent_tokenize(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)`}}),us=new z({props:{code:`result = rouge_score.compute(
    predictions=decoded_preds, references=decoded_labels, use_stemmer=True
)
result = {key: value.mid.fmeasure * 100 for key, value in result.items()}
{k: round(v, 4) for k, v in result.items()}`,highlighted:`result = rouge_score.compute(
    predictions=decoded_preds, references=decoded_labels, use_stemmer=<span class="hljs-literal">True</span>
)
result = {key: value.mid.fmeasure * <span class="hljs-number">100</span> <span class="hljs-keyword">for</span> key, value <span class="hljs-keyword">in</span> result.items()}
{k: <span class="hljs-built_in">round</span>(v, <span class="hljs-number">4</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> result.items()}`}}),ps=new z({props:{code:"{'rouge1': 31.4815, 'rouge2': 25.4386, 'rougeL': 31.4815, 'rougeLsum': 31.4815}",highlighted:'{&#x27;rouge1&#x27;: <span class="hljs-number">31.4815</span>, &#x27;rouge2&#x27;: <span class="hljs-number">25.4386</span>, &#x27;rougeL&#x27;: <span class="hljs-number">31.4815</span>, &#x27;rougeLsum&#x27;: <span class="hljs-number">31.4815</span>}'}}),{c(){d=n("p"),j=t("\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u6E96\u5099\u306F\u307B\u307C\u6574\u3044\u307E\u3057\u305F\u3002\u3042\u3068\u306F\u4E0A\u3067\u5B9A\u7FA9\u3057\u305F\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u4F7F\u3063\u3066\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092 "),h=n("code"),x=t("tf.data.Dataset"),R=t("s \u306B\u5909\u63DB\u3057\u3001\u30E2\u30C7\u30EB\u3092 "),q=n("code"),P=t("compile()"),S=t(" \u3068 "),$=n("code"),O=t("fit()"),A=t(" \u3059\u308B\u3060\u3051\u3067\u3059\u3002\u307E\u305A\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u3059\u3002"),C=c(),k(L.$$.fragment),F=c(),X=n("p"),Z=t("\u3053\u3053\u3067\u3001\u5B66\u7FD2\u7528\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u5B9A\u7FA9\u3057\u3001\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u307E\u3059\u3002"),H=c(),k(M.$$.fragment),W=c(),T=n("p"),G=t("\u305D\u3057\u3066\u6700\u5F8C\u306B\u3001\u30E2\u30C7\u30EB\u306E\u30D5\u30A3\u30C3\u30C8\u3092\u884C\u3044\u307E\u3059\u3002"),rs=n("code"),ss=t("PushToHubCallback"),ls=t("\u3092\u4F7F\u7528\u3057\u3066\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u5F8C\u306B\u30E2\u30C7\u30EB\u3092Hub\u306B\u4FDD\u5B58\u3057\u3001\u5F8C\u3067\u63A8\u8AD6\u306B\u4F7F\u7528\u3067\u304D\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),Q=c(),k(Y.$$.fragment),J=c(),es=n("p"),$s=t("\u5B66\u7FD2\u4E2D\u306B\u640D\u5931\u5024\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F\u304C\u3001\u672C\u5F53\u306F\u5148\u307B\u3069\u8A08\u7B97\u3057\u305FROUGE\u6307\u6A19\u3092\u898B\u305F\u3044\u306E\u3067\u3059\u3002\u3053\u306E\u6307\u6A19\u3092\u53D6\u5F97\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u30E2\u30C7\u30EB\u304B\u3089\u51FA\u529B\u3092\u751F\u6210\u3057\u3001\u305D\u308C\u3092\u6587\u5B57\u5217\u306B\u5909\u63DB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002ROUGE\u6307\u6A19\u3092\u6BD4\u8F03\u3059\u308B\u305F\u3081\u306B\u3001\u30E9\u30D9\u30EB\u3068\u4E88\u6E2C\u306E\u30EA\u30B9\u30C8\u3092\u3044\u304F\u3064\u304B\u4F5C\u3063\u3066\u307F\u307E\u3057\u3087\u3046\uFF08\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u5B9F\u884C\u6642\u306B\u30A4\u30F3\u30DD\u30FC\u30C8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F\u3001"),as=n("code"),Ds=t("!pip install tqdm"),ms=t("\u3092\u5B9F\u884C\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u306E\u3067\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\uFF09\u3002"),K=c(),k(os.$$.fragment),qs=c(),ts=n("p"),cs=t("\u30E9\u30D9\u30EB\u3068\u4E88\u6E2C\u6587\u5B57\u5217\u306E\u30EA\u30B9\u30C8\u304C\u3042\u308C\u3070\u3001ROUGE\u30B9\u30B3\u30A2\u306E\u8A08\u7B97\u306F\u7C21\u5358\u3067\u3059\u3002"),gs=c(),k(us.$$.fragment),ds=c(),k(ps.$$.fragment)},l(f){d=r(f,"P",{});var U=p(d);j=l(U,"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u6E96\u5099\u306F\u307B\u307C\u6574\u3044\u307E\u3057\u305F\u3002\u3042\u3068\u306F\u4E0A\u3067\u5B9A\u7FA9\u3057\u305F\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u4F7F\u3063\u3066\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092 "),h=r(U,"CODE",{});var V=p(h);x=l(V,"tf.data.Dataset"),V.forEach(a),R=l(U,"s \u306B\u5909\u63DB\u3057\u3001\u30E2\u30C7\u30EB\u3092 "),q=r(U,"CODE",{});var g=p(q);P=l(g,"compile()"),g.forEach(a),S=l(U," \u3068 "),$=r(U,"CODE",{});var N=p($);O=l(N,"fit()"),N.forEach(a),A=l(U," \u3059\u308B\u3060\u3051\u3067\u3059\u3002\u307E\u305A\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u3059\u3002"),U.forEach(a),C=u(f),w(L.$$.fragment,f),F=u(f),X=r(f,"P",{});var Ss=p(X);Z=l(Ss,"\u3053\u3053\u3067\u3001\u5B66\u7FD2\u7528\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u5B9A\u7FA9\u3057\u3001\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u307E\u3059\u3002"),Ss.forEach(a),H=u(f),w(M.$$.fragment,f),W=u(f),T=r(f,"P",{});var Ts=p(T);G=l(Ts,"\u305D\u3057\u3066\u6700\u5F8C\u306B\u3001\u30E2\u30C7\u30EB\u306E\u30D5\u30A3\u30C3\u30C8\u3092\u884C\u3044\u307E\u3059\u3002"),rs=r(Ts,"CODE",{});var zs=p(rs);ss=l(zs,"PushToHubCallback"),zs.forEach(a),ls=l(Ts,"\u3092\u4F7F\u7528\u3057\u3066\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u5F8C\u306B\u30E2\u30C7\u30EB\u3092Hub\u306B\u4FDD\u5B58\u3057\u3001\u5F8C\u3067\u63A8\u8AD6\u306B\u4F7F\u7528\u3067\u304D\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002"),Ts.forEach(a),Q=u(f),w(Y.$$.fragment,f),J=u(f),es=r(f,"P",{});var _s=p(es);$s=l(_s,"\u5B66\u7FD2\u4E2D\u306B\u640D\u5931\u5024\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F\u304C\u3001\u672C\u5F53\u306F\u5148\u307B\u3069\u8A08\u7B97\u3057\u305FROUGE\u6307\u6A19\u3092\u898B\u305F\u3044\u306E\u3067\u3059\u3002\u3053\u306E\u6307\u6A19\u3092\u53D6\u5F97\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u30E2\u30C7\u30EB\u304B\u3089\u51FA\u529B\u3092\u751F\u6210\u3057\u3001\u305D\u308C\u3092\u6587\u5B57\u5217\u306B\u5909\u63DB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002ROUGE\u6307\u6A19\u3092\u6BD4\u8F03\u3059\u308B\u305F\u3081\u306B\u3001\u30E9\u30D9\u30EB\u3068\u4E88\u6E2C\u306E\u30EA\u30B9\u30C8\u3092\u3044\u304F\u3064\u304B\u4F5C\u3063\u3066\u307F\u307E\u3057\u3087\u3046\uFF08\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u5B9F\u884C\u6642\u306B\u30A4\u30F3\u30DD\u30FC\u30C8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F\u3001"),as=r(_s,"CODE",{});var hs=p(as);Ds=l(hs,"!pip install tqdm"),hs.forEach(a),ms=l(_s,"\u3092\u5B9F\u884C\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u306E\u3067\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\uFF09\u3002"),_s.forEach(a),K=u(f),w(os.$$.fragment,f),qs=u(f),ts=r(f,"P",{});var js=p(ts);cs=l(js,"\u30E9\u30D9\u30EB\u3068\u4E88\u6E2C\u6587\u5B57\u5217\u306E\u30EA\u30B9\u30C8\u304C\u3042\u308C\u3070\u3001ROUGE\u30B9\u30B3\u30A2\u306E\u8A08\u7B97\u306F\u7C21\u5358\u3067\u3059\u3002"),js.forEach(a),gs=u(f),w(us.$$.fragment,f),ds=u(f),w(ps.$$.fragment,f)},m(f,U){o(f,d,U),e(d,j),e(d,h),e(h,x),e(d,R),e(d,q),e(q,P),e(d,S),e(d,$),e($,O),e(d,A),o(f,C,U),E(L,f,U),o(f,F,U),o(f,X,U),e(X,Z),o(f,H,U),E(M,f,U),o(f,W,U),o(f,T,U),e(T,G),e(T,rs),e(rs,ss),e(T,ls),o(f,Q,U),E(Y,f,U),o(f,J,U),o(f,es,U),e(es,$s),e(es,as),e(as,Ds),e(es,ms),o(f,K,U),E(os,f,U),o(f,qs,U),o(f,ts,U),e(ts,cs),o(f,gs,U),E(us,f,U),o(f,ds,U),E(ps,f,U),ks=!0},i(f){ks||(_(L.$$.fragment,f),_(M.$$.fragment,f),_(Y.$$.fragment,f),_(os.$$.fragment,f),_(us.$$.fragment,f),_(ps.$$.fragment,f),ks=!0)},o(f){b(L.$$.fragment,f),b(M.$$.fragment,f),b(Y.$$.fragment,f),b(os.$$.fragment,f),b(us.$$.fragment,f),b(ps.$$.fragment,f),ks=!1},d(f){f&&a(d),f&&a(C),y(L,f),f&&a(F),f&&a(X),f&&a(H),y(M,f),f&&a(W),f&&a(T),f&&a(Q),y(Y,f),f&&a(J),f&&a(es),f&&a(K),y(os,f),f&&a(qs),f&&a(ts),f&&a(gs),y(us,f),f&&a(ds),y(ps,f)}}}function Df(B){let d,j,h,x,R,q,P,S,$,O,A,C,L,F,X,Z,H,M,W,T,G,rs,ss,ls,Q,Y,J,es,$s,as,Ds,ms,K,os,qs,ts,cs,gs,us,ds,ps,ks,f,U,V;return x=new z({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,
)`}}),$=new z({props:{code:"trainer.train()",highlighted:"trainer.train()"}}),H=new z({props:{code:"trainer.evaluate()",highlighted:"trainer.evaluate()"}}),W=new z({props:{code:`{'eval_loss': 3.028524398803711,
 'eval_rouge1': 16.9728,
 'eval_rouge2': 8.2969,
 'eval_rougeL': 16.8366,
 'eval_rougeLsum': 16.851,
 'eval_gen_len': 10.1597,
 'eval_runtime': 6.1054,
 'eval_samples_per_second': 38.982,
 'eval_steps_per_second': 4.914}`,highlighted:`{<span class="hljs-string">&#x27;eval_loss&#x27;</span>: <span class="hljs-number">3.028524398803711</span>,
 <span class="hljs-string">&#x27;eval_rouge1&#x27;</span>: <span class="hljs-number">16.9728</span>,
 <span class="hljs-string">&#x27;eval_rouge2&#x27;</span>: <span class="hljs-number">8.2969</span>,
 <span class="hljs-string">&#x27;eval_rougeL&#x27;</span>: <span class="hljs-number">16.8366</span>,
 <span class="hljs-string">&#x27;eval_rougeLsum&#x27;</span>: <span class="hljs-number">16.851</span>,
 <span class="hljs-string">&#x27;eval_gen_len&#x27;</span>: <span class="hljs-number">10.1597</span>,
 <span class="hljs-string">&#x27;eval_runtime&#x27;</span>: <span class="hljs-number">6.1054</span>,
 <span class="hljs-string">&#x27;eval_samples_per_second&#x27;</span>: <span class="hljs-number">38.982</span>,
 <span class="hljs-string">&#x27;eval_steps_per_second&#x27;</span>: <span class="hljs-number">4.914</span>}`}}),ls=new z({props:{code:'trainer.push_to_hub(commit_message="Training complete", tags="summarization")',highlighted:'trainer.push_to_hub(<span class="hljs-attribute">commit_message</span>=<span class="hljs-string">&quot;Training complete&quot;</span>, <span class="hljs-attribute">tags</span>=<span class="hljs-string">&quot;summarization&quot;</span>)'}}),Y=new z({props:{code:"'https://huggingface.co/huggingface-course/mt5-finetuned-amazon-en-es/commit/aa0536b829b28e73e1e4b94b8a5aacec420d40e0'",highlighted:'<span class="hljs-string">&#x27;https://huggingface.co/huggingface-course/mt5-finetuned-amazon-en-es/commit/aa0536b829b28e73e1e4b94b8a5aacec420d40e0&#x27;</span>'}}),{c(){d=n("p"),j=t("\u3053\u308C\u3067\u3088\u3046\u3084\u304F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306B\u5FC5\u8981\u306A\u6750\u6599\u304C\u63C3\u3044\u307E\u3057\u305F\u3002\u3042\u3068\u306F\u3001\u6A19\u6E96\u7684\u306A\u5F15\u6570\u3067\u30C8\u30EC\u30FC\u30CA\u30FC\u3092\u5B9F\u4F53\u5316\u3059\u308B\u3060\u3051\u3067\u3059\u3002"),h=c(),k(x.$$.fragment),R=c(),q=n("p"),P=t("\u305D\u3057\u3066\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30E9\u30F3\u3092\u958B\u59CB\u3057\u307E\u3059\u3002"),S=c(),k($.$$.fragment),O=c(),A=n("p"),C=t("\u5B66\u7FD2\u4E2D\u306F\u30A8\u30DD\u30C3\u30AF\u6BCE\u306B\u5B66\u7FD2\u640D\u5931\u304C\u6E1B\u5C11\u3057\u3001ROUGE \u30B9\u30B3\u30A2\u304C\u5897\u52A0\u3059\u308B\u306E\u304C\u5206\u304B\u308B\u306F\u305A\u3067\u3059\u3002\u5B66\u7FD2\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001"),L=n("code"),F=t("Trainer.evaluate()"),X=t("\u3092\u5B9F\u884C\u3057\u3066\u6700\u7D42\u7684\u306A ROUGE \u30B9\u30B3\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Z=c(),k(H.$$.fragment),M=c(),k(W.$$.fragment),T=c(),G=n("p"),rs=t(`\u30B9\u30B3\u30A2\u304B\u3089\u3001\u79C1\u9054\u306E\u30E2\u30C7\u30EB\u304Clead-3\u306E\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u3092\u898B\u4E8B\u306B\u4E0A\u56DE\u3063\u305F\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u3044\u3044\u3067\u3059\u306D\uFF01
\u6700\u5F8C\u306B\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306B\u30E2\u30C7\u30EB\u306E\u91CD\u307F\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3057\u307E\u3059\u3002`),ss=c(),k(ls.$$.fragment),Q=c(),k(Y.$$.fragment),J=c(),es=n("p"),$s=t("\u3053\u308C\u306F\u3001\u30CF\u30D6\u306B\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u524D\u306B\u3001\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3068\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092 "),as=n("code"),Ds=t("output_dir"),ms=t(" \u306B\u4FDD\u5B58\u3059\u308B\u3082\u306E\u3067\u3059\u3002\u5F15\u6570\u306B "),K=n("code"),os=t("tags"),qs=t(" \u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u3067\u3001Hub \u4E0A\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C mT5 \u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30C6\u30AD\u30B9\u30C8\u751F\u6210\u7528\u3067\u306F\u306A\u304F\u3001\u8981\u7D04\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u7528\u306E\u3082\u306E\u306B\u306A\u308B\u3053\u3068\u3082\u78BA\u8A8D\u3067\u304D\u307E\u3059 (\u30E2\u30C7\u30EB\u30BF\u30B0\u306B\u95A2\u3059\u308B\u8A73\u7D30\u306B\u3064\u3044\u3066\u306F\u3001 "),ts=n("a"),cs=t("\u{1F917} Hub documentation"),gs=t(`\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044)\u3002
`),us=n("code"),ds=t("trainer.push_to_hub()"),ps=t(" \u306E\u51FA\u529B\u306F Git \u306E\u30B3\u30DF\u30C3\u30C8\u30CF\u30C3\u30B7\u30E5\u3078\u306E URL \u3067\u3001\u30E2\u30C7\u30EB\u30EA\u30DD\u30B8\u30C8\u30EA\u306B\u52A0\u3048\u3089\u308C\u305F\u5909\u66F4\u3092\u7C21\u5358\u306B\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF01"),ks=c(),f=n("p"),U=t("\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u5F8C\u306B\u3001\u{1F917} Accelerate \u304C\u63D0\u4F9B\u3059\u308B\u4F4E\u30EC\u30D9\u30EB\u306E\u6A5F\u80FD\u3092\u4F7F\u3063\u3066 mT5 \u3092\u5FAE\u8ABF\u6574\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u308B\u65B9\u6CD5\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),this.h()},l(g){d=r(g,"P",{});var N=p(d);j=l(N,"\u3053\u308C\u3067\u3088\u3046\u3084\u304F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306B\u5FC5\u8981\u306A\u6750\u6599\u304C\u63C3\u3044\u307E\u3057\u305F\u3002\u3042\u3068\u306F\u3001\u6A19\u6E96\u7684\u306A\u5F15\u6570\u3067\u30C8\u30EC\u30FC\u30CA\u30FC\u3092\u5B9F\u4F53\u5316\u3059\u308B\u3060\u3051\u3067\u3059\u3002"),N.forEach(a),h=u(g),w(x.$$.fragment,g),R=u(g),q=r(g,"P",{});var Ss=p(q);P=l(Ss,"\u305D\u3057\u3066\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30E9\u30F3\u3092\u958B\u59CB\u3057\u307E\u3059\u3002"),Ss.forEach(a),S=u(g),w($.$$.fragment,g),O=u(g),A=r(g,"P",{});var Ts=p(A);C=l(Ts,"\u5B66\u7FD2\u4E2D\u306F\u30A8\u30DD\u30C3\u30AF\u6BCE\u306B\u5B66\u7FD2\u640D\u5931\u304C\u6E1B\u5C11\u3057\u3001ROUGE \u30B9\u30B3\u30A2\u304C\u5897\u52A0\u3059\u308B\u306E\u304C\u5206\u304B\u308B\u306F\u305A\u3067\u3059\u3002\u5B66\u7FD2\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001"),L=r(Ts,"CODE",{});var zs=p(L);F=l(zs,"Trainer.evaluate()"),zs.forEach(a),X=l(Ts,"\u3092\u5B9F\u884C\u3057\u3066\u6700\u7D42\u7684\u306A ROUGE \u30B9\u30B3\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Ts.forEach(a),Z=u(g),w(H.$$.fragment,g),M=u(g),w(W.$$.fragment,g),T=u(g),G=r(g,"P",{});var _s=p(G);rs=l(_s,`\u30B9\u30B3\u30A2\u304B\u3089\u3001\u79C1\u9054\u306E\u30E2\u30C7\u30EB\u304Clead-3\u306E\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u3092\u898B\u4E8B\u306B\u4E0A\u56DE\u3063\u305F\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u3044\u3044\u3067\u3059\u306D\uFF01
\u6700\u5F8C\u306B\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306B\u30E2\u30C7\u30EB\u306E\u91CD\u307F\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3057\u307E\u3059\u3002`),_s.forEach(a),ss=u(g),w(ls.$$.fragment,g),Q=u(g),w(Y.$$.fragment,g),J=u(g),es=r(g,"P",{});var hs=p(es);$s=l(hs,"\u3053\u308C\u306F\u3001\u30CF\u30D6\u306B\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u524D\u306B\u3001\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3068\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092 "),as=r(hs,"CODE",{});var js=p(as);Ds=l(js,"output_dir"),js.forEach(a),ms=l(hs," \u306B\u4FDD\u5B58\u3059\u308B\u3082\u306E\u3067\u3059\u3002\u5F15\u6570\u306B "),K=r(hs,"CODE",{});var Ys=p(K);os=l(Ys,"tags"),Ys.forEach(a),qs=l(hs," \u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u3067\u3001Hub \u4E0A\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C mT5 \u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30C6\u30AD\u30B9\u30C8\u751F\u6210\u7528\u3067\u306F\u306A\u304F\u3001\u8981\u7D04\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u7528\u306E\u3082\u306E\u306B\u306A\u308B\u3053\u3068\u3082\u78BA\u8A8D\u3067\u304D\u307E\u3059 (\u30E2\u30C7\u30EB\u30BF\u30B0\u306B\u95A2\u3059\u308B\u8A73\u7D30\u306B\u3064\u3044\u3066\u306F\u3001 "),ts=r(hs,"A",{href:!0,rel:!0});var is=p(ts);cs=l(is,"\u{1F917} Hub documentation"),is.forEach(a),gs=l(hs,`\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044)\u3002
`),us=r(hs,"CODE",{});var Fs=p(us);ds=l(Fs,"trainer.push_to_hub()"),Fs.forEach(a),ps=l(hs," \u306E\u51FA\u529B\u306F Git \u306E\u30B3\u30DF\u30C3\u30C8\u30CF\u30C3\u30B7\u30E5\u3078\u306E URL \u3067\u3001\u30E2\u30C7\u30EB\u30EA\u30DD\u30B8\u30C8\u30EA\u306B\u52A0\u3048\u3089\u308C\u305F\u5909\u66F4\u3092\u7C21\u5358\u306B\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF01"),hs.forEach(a),ks=u(g),f=r(g,"P",{});var Hs=p(f);U=l(Hs,"\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u5F8C\u306B\u3001\u{1F917} Accelerate \u304C\u63D0\u4F9B\u3059\u308B\u4F4E\u30EC\u30D9\u30EB\u306E\u6A5F\u80FD\u3092\u4F7F\u3063\u3066 mT5 \u3092\u5FAE\u8ABF\u6574\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u308B\u65B9\u6CD5\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Hs.forEach(a),this.h()},h(){v(ts,"href","https://huggingface.co/docs/hub/main#how-is-a-models-type-of-inference-api-and-widget-determined"),v(ts,"rel","nofollow")},m(g,N){o(g,d,N),e(d,j),o(g,h,N),E(x,g,N),o(g,R,N),o(g,q,N),e(q,P),o(g,S,N),E($,g,N),o(g,O,N),o(g,A,N),e(A,C),e(A,L),e(L,F),e(A,X),o(g,Z,N),E(H,g,N),o(g,M,N),E(W,g,N),o(g,T,N),o(g,G,N),e(G,rs),o(g,ss,N),E(ls,g,N),o(g,Q,N),E(Y,g,N),o(g,J,N),o(g,es,N),e(es,$s),e(es,as),e(as,Ds),e(es,ms),e(es,K),e(K,os),e(es,qs),e(es,ts),e(ts,cs),e(es,gs),e(es,us),e(us,ds),e(es,ps),o(g,ks,N),o(g,f,N),e(f,U),V=!0},i(g){V||(_(x.$$.fragment,g),_($.$$.fragment,g),_(H.$$.fragment,g),_(W.$$.fragment,g),_(ls.$$.fragment,g),_(Y.$$.fragment,g),V=!0)},o(g){b(x.$$.fragment,g),b($.$$.fragment,g),b(H.$$.fragment,g),b(W.$$.fragment,g),b(ls.$$.fragment,g),b(Y.$$.fragment,g),V=!1},d(g){g&&a(d),g&&a(h),y(x,g),g&&a(R),g&&a(q),g&&a(S),y($,g),g&&a(O),g&&a(A),g&&a(Z),y(H,g),g&&a(M),y(W,g),g&&a(T),g&&a(G),g&&a(ss),y(ls,g),g&&a(Q),y(Y,g),g&&a(J),g&&a(es),g&&a(ks),g&&a(f)}}}function lf(B){let d,j,h,x,R,q,P,S,$,O,A,C,L,F,X,Z,H,M,W,T,G,rs,ss,ls,Q,Y,J,es,$s,as,Ds,ms,K,os,qs,ts,cs,gs,us,ds,ps,ks,f,U,V,g,N,Ss,Ts,zs,_s,hs,js,Ys,is,Fs,Hs,$e,Gs,le,Js,Xs,Bs,Fe,de,vs,ne,Zs,he,Es,fe,I,ns,ke,He,bs,we,Be,re,Ee,Us,We,fs,Qs,ys,Ms,_e,ye,ca,xe,Os,ua,be,Ke,ge,qa,Ka,Ve,Ta,se,Da,ws,Ot,da,Ye,Va,oe,St,za,Oa,Ct,Ya,je,Pt,Ja,qe,At,Xa,Ns,ee,Za,Te,Rt,Qa,Je,ha,Xe,st,As,Lt,Sa,ae,It,Ze,Gt,Ut,Qe,Mt,Nt,fa,sa,et,De,ea,_a,at,ze,pe,te,Ft,Oe,aa,tt,lt,Se,nt;return x=new Eu({}),as=new z({props:{code:'tokenized_datasets.set_format("torch")',highlighted:'tokenized_datasets.set_format(<span class="hljs-string">&quot;torch&quot;</span>)'}}),gs=new z({props:{code:"model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)",highlighted:"model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)"}}),f=new z({props:{code:`from torch.utils.data import DataLoader

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

batch_size = <span class="hljs-number">8</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=batch_size,
)
eval_dataloader = DataLoader(
    tokenized_datasets[<span class="hljs-string">&quot;validation&quot;</span>], collate_fn=data_collator, batch_size=batch_size
)`}}),_s=new z({props:{code:`from torch.optim import AdamW

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

optimizer = AdamW(model.parameters(), lr=<span class="hljs-number">2e-5</span>)`}}),Gs=new z({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
)`}}),Js=new zt({props:{$$slots:{default:[zf]},$$scope:{ctx:B}}}),re=new z({props:{code:`from transformers import get_scheduler

num_train_epochs = 10
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">10</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,
)`}}),Qs=new z({props:{code:`def postprocess_text(preds, labels):
    preds = [pred.strip() for pred in preds]
    labels = [label.strip() for label in labels]

    # ROUGE expects a newline after each sentence
    preds = ["\\n".join(nltk.sent_tokenize(pred)) for pred in preds]
    labels = ["\\n".join(nltk.sent_tokenize(label)) for label in labels]

    return preds, labels`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">postprocess_text</span>(<span class="hljs-params">preds, labels</span>):
    preds = [pred.strip() <span class="hljs-keyword">for</span> pred <span class="hljs-keyword">in</span> preds]
    labels = [label.strip() <span class="hljs-keyword">for</span> label <span class="hljs-keyword">in</span> labels]

    <span class="hljs-comment"># ROUGE expects a newline after each sentence</span>
    preds = [<span class="hljs-string">&quot;\\n&quot;</span>.join(nltk.sent_tokenize(pred)) <span class="hljs-keyword">for</span> pred <span class="hljs-keyword">in</span> preds]
    labels = [<span class="hljs-string">&quot;\\n&quot;</span>.join(nltk.sent_tokenize(label)) <span class="hljs-keyword">for</span> label <span class="hljs-keyword">in</span> labels]

    <span class="hljs-keyword">return</span> preds, labels`}}),Ve=new z({props:{code:`from huggingface_hub import get_full_repo_name

model_name = "test-bert-finetuned-squad-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> get_full_repo_name

model_name = <span class="hljs-string">&quot;test-bert-finetuned-squad-accelerate&quot;</span>
repo_name = get_full_repo_name(model_name)
repo_name`}}),se=new z({props:{code:"'lewtun/mt5-finetuned-amazon-en-es-accelerate'",highlighted:'<span class="hljs-string">&#x27;lewtun/mt5-finetuned-amazon-en-es-accelerate&#x27;</span>'}}),Ye=new z({props:{code:`from huggingface_hub import Repository

output_dir = "results-mt5-finetuned-squad-accelerate"
repo = Repository(output_dir, clone_from=repo_name)`,highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> Repository

output_dir = <span class="hljs-string">&quot;results-mt5-finetuned-squad-accelerate&quot;</span>
repo = Repository(output_dir, clone_from=repo_name)`}}),ze=new z({props:{code:`from tqdm.auto import tqdm
import torch
import numpy as np

progress_bar = tqdm(range(num_training_steps))

for epoch in range(num_train_epochs):
    # Training
    model.train()
    for step, batch in enumerate(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 step, batch in enumerate(eval_dataloader):
        with torch.no_grad():
            generated_tokens = accelerator.unwrap_model(model).generate(
                batch["input_ids"],
                attention_mask=batch["attention_mask"],
            )

            generated_tokens = accelerator.pad_across_processes(
                generated_tokens, dim=1, pad_index=tokenizer.pad_token_id
            )
            labels = batch["labels"]

            # If we did not pad to max length, we need to pad the labels too
            labels = accelerator.pad_across_processes(
                batch["labels"], dim=1, pad_index=tokenizer.pad_token_id
            )

            generated_tokens = accelerator.gather(generated_tokens).cpu().numpy()
            labels = accelerator.gather(labels).cpu().numpy()

            # Replace -100 in the labels as we can't decode them
            labels = np.where(labels != -100, labels, tokenizer.pad_token_id)
            if isinstance(generated_tokens, tuple):
                generated_tokens = generated_tokens[0]
            decoded_preds = tokenizer.batch_decode(
                generated_tokens, skip_special_tokens=True
            )
            decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)

            decoded_preds, decoded_labels = postprocess_text(
                decoded_preds, decoded_labels
            )

            rouge_score.add_batch(predictions=decoded_preds, references=decoded_labels)

    # Compute metrics
    result = rouge_score.compute()
    # Extract the median ROUGE scores
    result = {key: value.mid.fmeasure * 100 for key, value in result.items()}
    result = {k: round(v, 4) for k, v in result.items()}
    print(f"Epoch {epoch}:", result)

    # 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
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

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> step, batch <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</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> step, batch <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(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>],
            )

            generated_tokens = accelerator.pad_across_processes(
                generated_tokens, dim=<span class="hljs-number">1</span>, pad_index=tokenizer.pad_token_id
            )
            labels = batch[<span class="hljs-string">&quot;labels&quot;</span>]

            <span class="hljs-comment"># If we did not pad to max length, we need to pad the labels too</span>
            labels = accelerator.pad_across_processes(
                batch[<span class="hljs-string">&quot;labels&quot;</span>], dim=<span class="hljs-number">1</span>, pad_index=tokenizer.pad_token_id
            )

            generated_tokens = accelerator.gather(generated_tokens).cpu().numpy()
            labels = accelerator.gather(labels).cpu().numpy()

            <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)
            <span class="hljs-keyword">if</span> <span class="hljs-built_in">isinstance</span>(generated_tokens, <span class="hljs-built_in">tuple</span>):
                generated_tokens = generated_tokens[<span class="hljs-number">0</span>]
            decoded_preds = tokenizer.batch_decode(
                generated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>
            )
            decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=<span class="hljs-literal">True</span>)

            decoded_preds, decoded_labels = postprocess_text(
                decoded_preds, decoded_labels
            )

            rouge_score.add_batch(predictions=decoded_preds, references=decoded_labels)

    <span class="hljs-comment"># Compute metrics</span>
    result = rouge_score.compute()
    <span class="hljs-comment"># Extract the median ROUGE scores</span>
    result = {key: value.mid.fmeasure * <span class="hljs-number">100</span> <span class="hljs-keyword">for</span> key, value <span class="hljs-keyword">in</span> result.items()}
    result = {k: <span class="hljs-built_in">round</span>(v, <span class="hljs-number">4</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> result.items()}
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Epoch <span class="hljs-subst">{epoch}</span>:&quot;</span>, result)

    <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>
        )`}}),te=new z({props:{code:`Epoch 0: {'rouge1': 5.6351, 'rouge2': 1.1625, 'rougeL': 5.4866, 'rougeLsum': 5.5005}
Epoch 1: {'rouge1': 9.8646, 'rouge2': 3.4106, 'rougeL': 9.9439, 'rougeLsum': 9.9306}
Epoch 2: {'rouge1': 11.0872, 'rouge2': 3.3273, 'rougeL': 11.0508, 'rougeLsum': 10.9468}
Epoch 3: {'rouge1': 11.8587, 'rouge2': 4.8167, 'rougeL': 11.7986, 'rougeLsum': 11.7518}
Epoch 4: {'rouge1': 12.9842, 'rouge2': 5.5887, 'rougeL': 12.7546, 'rougeLsum': 12.7029}
Epoch 5: {'rouge1': 13.4628, 'rouge2': 6.4598, 'rougeL': 13.312, 'rougeLsum': 13.2913}
Epoch 6: {'rouge1': 12.9131, 'rouge2': 5.8914, 'rougeL': 12.6896, 'rougeLsum': 12.5701}
Epoch 7: {'rouge1': 13.3079, 'rouge2': 6.2994, 'rougeL': 13.1536, 'rougeLsum': 13.1194}
Epoch 8: {'rouge1': 13.96, 'rouge2': 6.5998, 'rougeL': 13.9123, 'rougeLsum': 13.7744}
Epoch 9: {'rouge1': 14.1192, 'rouge2': 7.0059, 'rougeL': 14.1172, 'rougeLsum': 13.9509}`,highlighted:`Epoch <span class="hljs-number">0</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">5.6351</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">1.1625</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">5.4866</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">5.5005</span>}
Epoch <span class="hljs-number">1</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">9.8646</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">3.4106</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">9.9439</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">9.9306</span>}
Epoch <span class="hljs-number">2</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">11.0872</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">3.3273</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">11.0508</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">10.9468</span>}
Epoch <span class="hljs-number">3</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">11.8587</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">4.8167</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">11.7986</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">11.7518</span>}
Epoch <span class="hljs-number">4</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">12.9842</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">5.5887</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">12.7546</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">12.7029</span>}
Epoch <span class="hljs-number">5</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">13.4628</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">6.4598</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">13.312</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">13.2913</span>}
Epoch <span class="hljs-number">6</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">12.9131</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">5.8914</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">12.6896</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">12.5701</span>}
Epoch <span class="hljs-number">7</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">13.3079</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">6.2994</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">13.1536</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">13.1194</span>}
Epoch <span class="hljs-number">8</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">13.96</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">6.5998</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">13.9123</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">13.7744</span>}
Epoch <span class="hljs-number">9</span>: {<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">14.1192</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">7.0059</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">14.1172</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">13.9509</span>}`}}),{c(){d=n("h2"),j=n("a"),h=n("span"),k(x.$$.fragment),R=c(),q=n("span"),P=t("mT5\u30E2\u30C7\u30EB\u3092 \u{1F917} Accelerate \u3092\u4F7F\u3063\u3066\u5FAE\u8ABF\u6574\u3059\u308B"),S=c(),$=n("p"),O=t("\u{1F917} Accelerate\u3092\u4F7F\u3063\u305F\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u306F\u3001"),A=n("a"),C=t("\u7B2C3\u7AE0"),L=t("\u3067\u884C\u3063\u305F\u30C6\u30AD\u30B9\u30C8\u5206\u985E\u306E\u4F8B\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u3002\u4E3B\u306A\u9055\u3044\u306F\u3001\u5B66\u7FD2\u6642\u306B\u8981\u7D04\u3092\u660E\u793A\u7684\u306B\u751F\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u3068\u3001ROUGE\u30B9\u30B3\u30A2\u306E\u8A08\u7B97\u65B9\u6CD5\u3092\u5B9A\u7FA9\u3059\u308B\u3053\u3068\u3067\u3059\uFF08"),F=n("code"),X=t("Seq2SeqTrainer"),Z=t("\u304C\u751F\u6210\u306E\u9762\u5012\u3092\u307F\u3066\u304F\u308C\u305F\u3053\u3068\u3092\u601D\u3044\u51FA\u3057\u3066\u304F\u3060\u3055\u3044\uFF09\u3002\u3067\u306F\u3001\u3053\u306E2\u3064\u306E\u8981\u4EF6\u3092\u{1F917} Accelerate\u3067\u3069\u306E\u3088\u3046\u306B\u5B9F\u88C5\u3059\u308B\u304B\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),H=c(),M=n("h3"),W=t("\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u305F\u3081\u306E\u6E96\u5099"),T=c(),G=n("p"),rs=t("\u307E\u305A\u6700\u521D\u306B\u884C\u3046\u3079\u304D\u3053\u3068\u306F\u3001\u5404\u5206\u5272\u306B\u5BFE\u3057\u3066 "),ss=n("code"),ls=t("DataLoader"),Q=t(" \u3092\u4F5C\u6210\u3059\u308B\u3053\u3068\u3067\u3059\u3002PyTorch\u306E\u30C7\u30FC\u30BF\u30ED\u30FC\u30C0\u30FC\u306F\u30C6\u30F3\u30BD\u30EB\u306E\u30D0\u30C3\u30C1\u3092\u60F3\u5B9A\u3057\u3066\u3044\u308B\u306E\u3067\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092 "),Y=n("code"),J=t('"torch"'),es=t(" \u306B\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),$s=c(),k(as.$$.fragment),Ds=c(),ms=n("p"),K=t("\u3053\u308C\u3067\u30C6\u30F3\u30BD\u30EB\u3060\u3051\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C\u3067\u304D\u305F\u306E\u3067\u3001\u6B21\u306B\u3084\u308B\u3053\u3068\u306F "),os=n("code"),qs=t("DataCollatorForSeq2Seq"),ts=t(" \u3092\u518D\u3073\u5B9F\u4F53\u5316\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u305D\u306E\u305F\u3081\u306B\u306F\u3001\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30E2\u30C7\u30EB\u3092\u7528\u610F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u306E\u3067\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u304B\u3089\u30ED\u30FC\u30C9\u3057\u76F4\u3057\u307E\u3057\u3087\u3046\u3002"),cs=c(),k(gs.$$.fragment),us=c(),ds=n("p"),ps=t("\u6B21\u306B\u3001\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u5B9F\u614B\u5316\u3057\u3001\u3053\u308C\u3092\u4F7F\u7528\u3057\u3066\u30C7\u30FC\u30BF\u30ED\u30FC\u30C0\u30FC\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002"),ks=c(),k(f.$$.fragment),U=c(),V=n("p"),g=t("\u6B21\u306B\u884C\u3046\u3053\u3068\u306F\u3001\u4F7F\u7528\u3059\u308B\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u3092\u5B9A\u7FA9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u4ED6\u306E\u4F8B\u3068\u540C\u69D8\u306B\u3001\u307B\u3068\u3093\u3069\u306E\u554F\u984C\u3067\u3046\u307E\u304F\u6A5F\u80FD\u3059\u308B "),N=n("code"),Ss=t("AdamW"),Ts=t(" \u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002"),zs=c(),k(_s.$$.fragment),hs=c(),js=n("p"),Ys=t("\u6700\u5F8C\u306B\u3001\u30E2\u30C7\u30EB\u3001\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u3001\u30C7\u30FC\u30BF\u30ED\u30FC\u30C9\u3092 "),is=n("code"),Fs=t("accelerator.prepare()"),Hs=t(" \u30E1\u30BD\u30C3\u30C9\u306B\u6E21\u3057\u307E\u3059\u3002"),$e=c(),k(Gs.$$.fragment),le=c(),k(Js.$$.fragment),Xs=c(),Bs=n("p"),Fe=t("\u3055\u3066\u3001\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u6E96\u5099\u304C\u3067\u304D\u305F\u306E\u3067\u3001\u6B8B\u3059\u306F3\u3064\u3067\u3059\u3002"),de=c(),vs=n("ul"),ne=n("li"),Zs=t("\u5B66\u7FD2\u7387\u306E\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u3092\u5B9A\u7FA9\u3059\u308B\u3002"),he=c(),Es=n("li"),fe=t("\u8A55\u4FA1\u7528\u306E\u8981\u7D04\u3092\u5F8C\u51E6\u7406\u3059\u308B\u95A2\u6570\u3092\u5B9F\u88C5\u3059\u308B\u3002"),I=c(),ns=n("li"),ke=t("\u30CF\u30D6\u4E0A\u306B\u30E2\u30C7\u30EB\u3092\u30D7\u30C3\u30B7\u30E5\u3067\u304D\u308B\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u4F5C\u6210\u3059\u308B\u3002"),He=c(),bs=n("p"),we=t("\u5B66\u7FD2\u7387\u306E\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u306B\u306F\u3001\u524D\u7BC0\u307E\u3067\u306E\u6A19\u6E96\u7684\u306A\u7DDA\u5F62\u306A\u3082\u306E\u3092\u4F7F\u3046\u3053\u3068\u306B\u3057\u307E\u3059\u3002"),Be=c(),k(re.$$.fragment),Ee=c(),Us=n("p"),We=t("\u5F8C\u51E6\u7406\u3068\u3057\u3066\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3092\u6539\u884C\u3067\u533A\u5207\u3089\u308C\u305F\u6587\u306B\u5206\u5272\u3059\u308B\u95A2\u6570\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u308C\u306FROUGE\u6307\u6A19\u304C\u671F\u5F85\u3059\u308B\u5F62\u5F0F\u3067\u3042\u308A\u3001\u6B21\u306E\u3088\u3046\u306A\u30B3\u30FC\u30C9\u306E\u65AD\u7247\u3067\u3053\u308C\u3092\u5B9F\u73FE\u3067\u304D\u307E\u3059\u3002"),fs=c(),k(Qs.$$.fragment),ys=c(),Ms=n("p"),_e=t("\u3053\u308C\u306F\u3001 "),ye=n("code"),ca=t("Seq2SeqTrainer"),xe=t(" \u306E "),Os=n("code"),ua=t("compute_metrics()"),be=t(" \u95A2\u6570\u3092\u3069\u306E\u3088\u3046\u306B\u5B9A\u7FA9\u3057\u305F\u304B\u3092\u601D\u3044\u51FA\u305B\u3070\u3001\u898B\u899A\u3048\u304C\u3042\u308B\u306F\u305A\u3067\u3059\u3002"),Ke=c(),ge=n("p"),qa=t(`\u6700\u5F8C\u306B\u3001\u30CF\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6\u306B\u30E2\u30C7\u30EB\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u306B\u306F\u3001\u9069\u5207\u306A\u30BF\u30A4\u30C8\u30EB\u306E\u{1F917} \u30CF\u30D6 \u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
\u79C1\u305F\u3061\u306F\u3001\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u540D\u524D\u3092\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3060\u3051\u3067\u3059\u3002\u3053\u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u306B\u306F\u3001\u30EA\u30DD\u30B8\u30C8\u30EA ID \u3068\u30E6\u30FC\u30B6\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3092\u7D44\u307F\u5408\u308F\u305B\u308B\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u95A2\u6570\u304C\u3042\u308A\u307E\u3059\u3002`),Ka=c(),k(Ve.$$.fragment),Ta=c(),k(se.$$.fragment),Da=c(),ws=n("p"),Ot=t("\u3053\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u540D\u3092\u4F7F\u3063\u3066\u3001results\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u30ED\u30FC\u30AB\u30EB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30AF\u30ED\u30FC\u30F3\u3057\u3001\u5B66\u7FD2\u7528\u6210\u679C\u7269\u3092\u683C\u7D0D\u3057\u307E\u3059\u3002"),da=c(),k(Ye.$$.fragment),Va=c(),oe=n("p"),St=t("\u3053\u308C\u306B\u3088\u308A\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u4E2D\u306B "),za=n("code"),Oa=t("repo.push_to_hub()"),Ct=t(` \u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u3067\u3001\u6210\u679C\u7269\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u30D0\u30C3\u30AF\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF01
\u305D\u308C\u3067\u306F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u3092\u66F8\u304D\u51FA\u3057\u3001\u5206\u6790\u3092\u7D42\u3048\u307E\u3057\u3087\u3046\u3002`),Ya=c(),je=n("h3"),Pt=t("\u5B66\u7FD2\u30EB\u30FC\u30D7"),Ja=c(),qe=n("p"),At=t("\u8981\u7D04\u306E\u305F\u3081\u306E\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306F\u3001\u79C1\u305F\u3061\u304C\u906D\u9047\u3057\u305F\u4ED6\u306E\u{1F917} Accelerate\u306E\u4F8B\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u3066\u304A\u308A\u3001\u5927\u304D\u304F4\u3064\u306E\u4E3B\u8981\u306A\u30B9\u30C6\u30C3\u30D7\u306B\u5206\u304B\u308C\u3066\u3044\u307E\u3059\u3002"),Xa=c(),Ns=n("ol"),ee=n("li"),Za=t("\u5404\u30A8\u30DD\u30C3\u30AF\u3054\u3068\u306B "),Te=n("code"),Rt=t("train_dataloader"),Qa=t(" \u306B\u3042\u308B\u3059\u3079\u3066\u306E\u4F8B\u306B\u5BFE\u3057\u3066\u7E70\u308A\u8FD4\u3057\u51E6\u7406\u3092\u884C\u3044\u3001\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3055\u305B\u308B\u3002"),Je=c(),ha=n("li"),Xe=t("\u5404\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u6642\u306B\u3001\u307E\u305A\u30C8\u30FC\u30AF\u30F3\u3092\u751F\u6210\u3057\u3001\u305D\u308C\u3092\u30C7\u30B3\u30FC\u30C9\u3057\u3066\u30C6\u30AD\u30B9\u30C8\u306B\u3059\u308B\u3053\u3068\u3067\u30E2\u30C7\u30EB\u306E\u8981\u7D04\u3092\u751F\u6210\u3059\u308B\u3002(\u53C2\u8003\u8981\u7D04\u3082)\u3002"),st=c(),As=n("li"),Lt=t("\u5148\u306B\u898B\u305F\u306E\u3068\u540C\u3058\u624B\u6CD5\u3067ROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u3002"),Sa=c(),ae=n("li"),It=t("\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u4FDD\u5B58\u3057\u3001\u3059\u3079\u3066\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u3002\u3053\u3053\u3067\u306F\u3001\u30A8\u30DD\u30C3\u30AF\u6BCE\u306B\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3092 "),Ze=n("em"),Gt=t("\u975E\u540C\u671F"),Ut=t(" \u306B\u30D7\u30C3\u30B7\u30E5\u3067\u304D\u308B\u3088\u3046\u306B\u3001"),Qe=n("code"),Mt=t("Repository"),Nt=t(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E "),fa=n("code"),sa=t("blocking=False"),et=t(" \u3068\u3044\u3046\u4FBF\u5229\u306A\u5F15\u6570\u306B\u983C\u3063\u3066\u3044\u307E\u3059\u3002\u3053\u308C\u306B\u3088\u308A\u3001GB\u30B5\u30A4\u30BA\u306E\u30E2\u30C7\u30EB\u3067\u767A\u751F\u3059\u308B\u9045\u3044\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3092\u5F85\u3064\u3053\u3068\u306A\u304F\u3001\u5B66\u7FD2\u3092\u7D99\u7D9A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002"),De=c(),ea=n("p"),_a=t("\u3053\u308C\u3089\u306E\u624B\u9806\u306F\u3001\u4EE5\u4E0B\u306E\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),at=c(),k(ze.$$.fragment),pe=c(),k(te.$$.fragment),Ft=c(),Oe=n("p"),aa=t("\u305D\u308C\u3067\u7D42\u308F\u308A\u3067\u3059\u3002\u3053\u308C\u3092\u5B9F\u884C\u3059\u308B\u3068\u3001"),tt=n("code"),lt=t("Trainer"),Se=t("\u3067\u5F97\u305F\u3082\u306E\u3068\u3088\u304F\u4F3C\u305F\u30E2\u30C7\u30EB\u3068\u7D50\u679C\u304C\u5F97\u3089\u308C\u307E\u3059\u3002"),this.h()},l(m){d=r(m,"H2",{class:!0});var D=p(d);j=r(D,"A",{id:!0,class:!0,href:!0});var Wl=p(j);h=r(Wl,"SPAN",{});var Ht=p(h);w(x.$$.fragment,Ht),Ht.forEach(a),Wl.forEach(a),R=u(D),q=r(D,"SPAN",{});var ba=p(q);P=l(ba,"mT5\u30E2\u30C7\u30EB\u3092 \u{1F917} Accelerate \u3092\u4F7F\u3063\u3066\u5FAE\u8ABF\u6574\u3059\u308B"),ba.forEach(a),D.forEach(a),S=u(m),$=r(m,"P",{});var ta=p($);O=l(ta,"\u{1F917} Accelerate\u3092\u4F7F\u3063\u305F\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u306F\u3001"),A=r(ta,"A",{href:!0});var Ca=p(A);C=l(Ca,"\u7B2C3\u7AE0"),Ca.forEach(a),L=l(ta,"\u3067\u884C\u3063\u305F\u30C6\u30AD\u30B9\u30C8\u5206\u985E\u306E\u4F8B\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u3002\u4E3B\u306A\u9055\u3044\u306F\u3001\u5B66\u7FD2\u6642\u306B\u8981\u7D04\u3092\u660E\u793A\u7684\u306B\u751F\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u3068\u3001ROUGE\u30B9\u30B3\u30A2\u306E\u8A08\u7B97\u65B9\u6CD5\u3092\u5B9A\u7FA9\u3059\u308B\u3053\u3068\u3067\u3059\uFF08"),F=r(ta,"CODE",{});var Kl=p(F);X=l(Kl,"Seq2SeqTrainer"),Kl.forEach(a),Z=l(ta,"\u304C\u751F\u6210\u306E\u9762\u5012\u3092\u307F\u3066\u304F\u308C\u305F\u3053\u3068\u3092\u601D\u3044\u51FA\u3057\u3066\u304F\u3060\u3055\u3044\uFF09\u3002\u3067\u306F\u3001\u3053\u306E2\u3064\u306E\u8981\u4EF6\u3092\u{1F917} Accelerate\u3067\u3069\u306E\u3088\u3046\u306B\u5B9F\u88C5\u3059\u308B\u304B\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),ta.forEach(a),H=u(m),M=r(m,"H3",{id:!0});var Bt=p(M);W=l(Bt,"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u305F\u3081\u306E\u6E96\u5099"),Bt.forEach(a),T=u(m),G=r(m,"P",{});var ie=p(G);rs=l(ie,"\u307E\u305A\u6700\u521D\u306B\u884C\u3046\u3079\u304D\u3053\u3068\u306F\u3001\u5404\u5206\u5272\u306B\u5BFE\u3057\u3066 "),ss=r(ie,"CODE",{});var Vl=p(ss);ls=l(Vl,"DataLoader"),Vl.forEach(a),Q=l(ie," \u3092\u4F5C\u6210\u3059\u308B\u3053\u3068\u3067\u3059\u3002PyTorch\u306E\u30C7\u30FC\u30BF\u30ED\u30FC\u30C0\u30FC\u306F\u30C6\u30F3\u30BD\u30EB\u306E\u30D0\u30C3\u30C1\u3092\u60F3\u5B9A\u3057\u3066\u3044\u308B\u306E\u3067\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092 "),Y=r(ie,"CODE",{});var Wt=p(Y);J=l(Wt,'"torch"'),Wt.forEach(a),es=l(ie," \u306B\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),ie.forEach(a),$s=u(m),w(as.$$.fragment,m),Ds=u(m),ms=r(m,"P",{});var ve=p(ms);K=l(ve,"\u3053\u308C\u3067\u30C6\u30F3\u30BD\u30EB\u3060\u3051\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C\u3067\u304D\u305F\u306E\u3067\u3001\u6B21\u306B\u3084\u308B\u3053\u3068\u306F "),os=r(ve,"CODE",{});var Yl=p(os);qs=l(Yl,"DataCollatorForSeq2Seq"),Yl.forEach(a),ts=l(ve," \u3092\u518D\u3073\u5B9F\u4F53\u5316\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u305D\u306E\u305F\u3081\u306B\u306F\u3001\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30E2\u30C7\u30EB\u3092\u7528\u610F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u306E\u3067\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u304B\u3089\u30ED\u30FC\u30C9\u3057\u76F4\u3057\u307E\u3057\u3087\u3046\u3002"),ve.forEach(a),cs=u(m),w(gs.$$.fragment,m),us=u(m),ds=r(m,"P",{});var Pa=p(ds);ps=l(Pa,"\u6B21\u306B\u3001\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u5B9F\u614B\u5316\u3057\u3001\u3053\u308C\u3092\u4F7F\u7528\u3057\u3066\u30C7\u30FC\u30BF\u30ED\u30FC\u30C0\u30FC\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002"),Pa.forEach(a),ks=u(m),w(f.$$.fragment,m),U=u(m),V=r(m,"P",{});var rt=p(V);g=l(rt,"\u6B21\u306B\u884C\u3046\u3053\u3068\u306F\u3001\u4F7F\u7528\u3059\u308B\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u3092\u5B9A\u7FA9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u4ED6\u306E\u4F8B\u3068\u540C\u69D8\u306B\u3001\u307B\u3068\u3093\u3069\u306E\u554F\u984C\u3067\u3046\u307E\u304F\u6A5F\u80FD\u3059\u308B "),N=r(rt,"CODE",{});var Jl=p(N);Ss=l(Jl,"AdamW"),Jl.forEach(a),Ts=l(rt," \u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002"),rt.forEach(a),zs=u(m),w(_s.$$.fragment,m),hs=u(m),js=r(m,"P",{});var Aa=p(js);Ys=l(Aa,"\u6700\u5F8C\u306B\u3001\u30E2\u30C7\u30EB\u3001\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u3001\u30C7\u30FC\u30BF\u30ED\u30FC\u30C9\u3092 "),is=r(Aa,"CODE",{});var la=p(is);Fs=l(la,"accelerator.prepare()"),la.forEach(a),Hs=l(Aa," \u30E1\u30BD\u30C3\u30C9\u306B\u6E21\u3057\u307E\u3059\u3002"),Aa.forEach(a),$e=u(m),w(Gs.$$.fragment,m),le=u(m),w(Js.$$.fragment,m),Xs=u(m),Bs=r(m,"P",{});var ot=p(Bs);Fe=l(ot,"\u3055\u3066\u3001\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u6E96\u5099\u304C\u3067\u304D\u305F\u306E\u3067\u3001\u6B8B\u3059\u306F3\u3064\u3067\u3059\u3002"),ot.forEach(a),de=u(m),vs=r(m,"UL",{});var Ws=p(vs);ne=r(Ws,"LI",{});var Ra=p(ne);Zs=l(Ra,"\u5B66\u7FD2\u7387\u306E\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u3092\u5B9A\u7FA9\u3059\u308B\u3002"),Ra.forEach(a),he=u(Ws),Es=r(Ws,"LI",{});var Xl=p(Es);fe=l(Xl,"\u8A55\u4FA1\u7528\u306E\u8981\u7D04\u3092\u5F8C\u51E6\u7406\u3059\u308B\u95A2\u6570\u3092\u5B9F\u88C5\u3059\u308B\u3002"),Xl.forEach(a),I=u(Ws),ns=r(Ws,"LI",{});var Zl=p(ns);ke=l(Zl,"\u30CF\u30D6\u4E0A\u306B\u30E2\u30C7\u30EB\u3092\u30D7\u30C3\u30B7\u30E5\u3067\u304D\u308B\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u4F5C\u6210\u3059\u308B\u3002"),Zl.forEach(a),Ws.forEach(a),He=u(m),bs=r(m,"P",{});var pt=p(bs);we=l(pt,"\u5B66\u7FD2\u7387\u306E\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u306B\u306F\u3001\u524D\u7BC0\u307E\u3067\u306E\u6A19\u6E96\u7684\u306A\u7DDA\u5F62\u306A\u3082\u306E\u3092\u4F7F\u3046\u3053\u3068\u306B\u3057\u307E\u3059\u3002"),pt.forEach(a),Be=u(m),w(re.$$.fragment,m),Ee=u(m),Us=r(m,"P",{});var Ql=p(Us);We=l(Ql,"\u5F8C\u51E6\u7406\u3068\u3057\u3066\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3092\u6539\u884C\u3067\u533A\u5207\u3089\u308C\u305F\u6587\u306B\u5206\u5272\u3059\u308B\u95A2\u6570\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u308C\u306FROUGE\u6307\u6A19\u304C\u671F\u5F85\u3059\u308B\u5F62\u5F0F\u3067\u3042\u308A\u3001\u6B21\u306E\u3088\u3046\u306A\u30B3\u30FC\u30C9\u306E\u65AD\u7247\u3067\u3053\u308C\u3092\u5B9F\u73FE\u3067\u304D\u307E\u3059\u3002"),Ql.forEach(a),fs=u(m),w(Qs.$$.fragment,m),ys=u(m),Ms=r(m,"P",{});var ga=p(Ms);_e=l(ga,"\u3053\u308C\u306F\u3001 "),ye=r(ga,"CODE",{});var La=p(ye);ca=l(La,"Seq2SeqTrainer"),La.forEach(a),xe=l(ga," \u306E "),Os=r(ga,"CODE",{});var sn=p(Os);ua=l(sn,"compute_metrics()"),sn.forEach(a),be=l(ga," \u95A2\u6570\u3092\u3069\u306E\u3088\u3046\u306B\u5B9A\u7FA9\u3057\u305F\u304B\u3092\u601D\u3044\u51FA\u305B\u3070\u3001\u898B\u899A\u3048\u304C\u3042\u308B\u306F\u305A\u3067\u3059\u3002"),ga.forEach(a),Ke=u(m),ge=r(m,"P",{});var en=p(ge);qa=l(en,`\u6700\u5F8C\u306B\u3001\u30CF\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6\u306B\u30E2\u30C7\u30EB\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u306B\u306F\u3001\u9069\u5207\u306A\u30BF\u30A4\u30C8\u30EB\u306E\u{1F917} \u30CF\u30D6 \u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
\u79C1\u305F\u3061\u306F\u3001\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u540D\u524D\u3092\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3060\u3051\u3067\u3059\u3002\u3053\u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u306B\u306F\u3001\u30EA\u30DD\u30B8\u30C8\u30EA ID \u3068\u30E6\u30FC\u30B6\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3092\u7D44\u307F\u5408\u308F\u305B\u308B\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u95A2\u6570\u304C\u3042\u308A\u307E\u3059\u3002`),en.forEach(a),Ka=u(m),w(Ve.$$.fragment,m),Ta=u(m),w(se.$$.fragment,m),Da=u(m),ws=r(m,"P",{});var Rs=p(ws);Ot=l(Rs,"\u3053\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u540D\u3092\u4F7F\u3063\u3066\u3001results\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u30ED\u30FC\u30AB\u30EB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30AF\u30ED\u30FC\u30F3\u3057\u3001\u5B66\u7FD2\u7528\u6210\u679C\u7269\u3092\u683C\u7D0D\u3057\u307E\u3059\u3002"),Rs.forEach(a),da=u(m),w(Ye.$$.fragment,m),Va=u(m),oe=r(m,"P",{});var me=p(oe);St=l(me,"\u3053\u308C\u306B\u3088\u308A\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u4E2D\u306B "),za=r(me,"CODE",{});var Ia=p(za);Oa=l(Ia,"repo.push_to_hub()"),Ia.forEach(a),Ct=l(me,` \u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u3067\u3001\u6210\u679C\u7269\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u30D0\u30C3\u30AF\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF01
\u305D\u308C\u3067\u306F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u3092\u66F8\u304D\u51FA\u3057\u3001\u5206\u6790\u3092\u7D42\u3048\u307E\u3057\u3087\u3046\u3002`),me.forEach(a),Ya=u(m),je=r(m,"H3",{id:!0});var ja=p(je);Pt=l(ja,"\u5B66\u7FD2\u30EB\u30FC\u30D7"),ja.forEach(a),Ja=u(m),qe=r(m,"P",{});var an=p(qe);At=l(an,"\u8981\u7D04\u306E\u305F\u3081\u306E\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306F\u3001\u79C1\u305F\u3061\u304C\u906D\u9047\u3057\u305F\u4ED6\u306E\u{1F917} Accelerate\u306E\u4F8B\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u3066\u304A\u308A\u3001\u5927\u304D\u304F4\u3064\u306E\u4E3B\u8981\u306A\u30B9\u30C6\u30C3\u30D7\u306B\u5206\u304B\u308C\u3066\u3044\u307E\u3059\u3002"),an.forEach(a),Xa=u(m),Ns=r(m,"OL",{});var Ce=p(Ns);ee=r(Ce,"LI",{});var va=p(ee);Za=l(va,"\u5404\u30A8\u30DD\u30C3\u30AF\u3054\u3068\u306B "),Te=r(va,"CODE",{});var tn=p(Te);Rt=l(tn,"train_dataloader"),tn.forEach(a),Qa=l(va," \u306B\u3042\u308B\u3059\u3079\u3066\u306E\u4F8B\u306B\u5BFE\u3057\u3066\u7E70\u308A\u8FD4\u3057\u51E6\u7406\u3092\u884C\u3044\u3001\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3055\u305B\u308B\u3002"),va.forEach(a),Je=u(Ce),ha=r(Ce,"LI",{});var ln=p(ha);Xe=l(ln,"\u5404\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u6642\u306B\u3001\u307E\u305A\u30C8\u30FC\u30AF\u30F3\u3092\u751F\u6210\u3057\u3001\u305D\u308C\u3092\u30C7\u30B3\u30FC\u30C9\u3057\u3066\u30C6\u30AD\u30B9\u30C8\u306B\u3059\u308B\u3053\u3068\u3067\u30E2\u30C7\u30EB\u306E\u8981\u7D04\u3092\u751F\u6210\u3059\u308B\u3002(\u53C2\u8003\u8981\u7D04\u3082)\u3002"),ln.forEach(a),st=u(Ce),As=r(Ce,"LI",{});var Ga=p(As);Lt=l(Ga,"\u5148\u306B\u898B\u305F\u306E\u3068\u540C\u3058\u624B\u6CD5\u3067ROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u3002"),Ga.forEach(a),Sa=u(Ce),ae=r(Ce,"LI",{});var Pe=p(ae);It=l(Pe,"\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u4FDD\u5B58\u3057\u3001\u3059\u3079\u3066\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u3002\u3053\u3053\u3067\u306F\u3001\u30A8\u30DD\u30C3\u30AF\u6BCE\u306B\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3092 "),Ze=r(Pe,"EM",{});var nn=p(Ze);Gt=l(nn,"\u975E\u540C\u671F"),nn.forEach(a),Ut=l(Pe," \u306B\u30D7\u30C3\u30B7\u30E5\u3067\u304D\u308B\u3088\u3046\u306B\u3001"),Qe=r(Pe,"CODE",{});var Ae=p(Qe);Mt=l(Ae,"Repository"),Ae.forEach(a),Nt=l(Pe," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E "),fa=r(Pe,"CODE",{});var Ua=p(fa);sa=l(Ua,"blocking=False"),Ua.forEach(a),et=l(Pe," \u3068\u3044\u3046\u4FBF\u5229\u306A\u5F15\u6570\u306B\u983C\u3063\u3066\u3044\u307E\u3059\u3002\u3053\u308C\u306B\u3088\u308A\u3001GB\u30B5\u30A4\u30BA\u306E\u30E2\u30C7\u30EB\u3067\u767A\u751F\u3059\u308B\u9045\u3044\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3092\u5F85\u3064\u3053\u3068\u306A\u304F\u3001\u5B66\u7FD2\u3092\u7D99\u7D9A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002"),Pe.forEach(a),Ce.forEach(a),De=u(m),ea=r(m,"P",{});var $a=p(ea);_a=l($a,"\u3053\u308C\u3089\u306E\u624B\u9806\u306F\u3001\u4EE5\u4E0B\u306E\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),$a.forEach(a),at=u(m),w(ze.$$.fragment,m),pe=u(m),w(te.$$.fragment,m),Ft=u(m),Oe=r(m,"P",{});var it=p(Oe);aa=l(it,"\u305D\u308C\u3067\u7D42\u308F\u308A\u3067\u3059\u3002\u3053\u308C\u3092\u5B9F\u884C\u3059\u308B\u3068\u3001"),tt=r(it,"CODE",{});var rn=p(tt);lt=l(rn,"Trainer"),rn.forEach(a),Se=l(it,"\u3067\u5F97\u305F\u3082\u306E\u3068\u3088\u304F\u4F3C\u305F\u30E2\u30C7\u30EB\u3068\u7D50\u679C\u304C\u5F97\u3089\u308C\u307E\u3059\u3002"),it.forEach(a),this.h()},h(){v(j,"id","mt5-accelerate"),v(j,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(j,"href","#mt5-accelerate"),v(d,"class","relative group"),v(A,"href","/course/ja/chapter3"),v(M,"id",""),v(je,"id","")},m(m,D){o(m,d,D),e(d,j),e(j,h),E(x,h,null),e(d,R),e(d,q),e(q,P),o(m,S,D),o(m,$,D),e($,O),e($,A),e(A,C),e($,L),e($,F),e(F,X),e($,Z),o(m,H,D),o(m,M,D),e(M,W),o(m,T,D),o(m,G,D),e(G,rs),e(G,ss),e(ss,ls),e(G,Q),e(G,Y),e(Y,J),e(G,es),o(m,$s,D),E(as,m,D),o(m,Ds,D),o(m,ms,D),e(ms,K),e(ms,os),e(os,qs),e(ms,ts),o(m,cs,D),E(gs,m,D),o(m,us,D),o(m,ds,D),e(ds,ps),o(m,ks,D),E(f,m,D),o(m,U,D),o(m,V,D),e(V,g),e(V,N),e(N,Ss),e(V,Ts),o(m,zs,D),E(_s,m,D),o(m,hs,D),o(m,js,D),e(js,Ys),e(js,is),e(is,Fs),e(js,Hs),o(m,$e,D),E(Gs,m,D),o(m,le,D),E(Js,m,D),o(m,Xs,D),o(m,Bs,D),e(Bs,Fe),o(m,de,D),o(m,vs,D),e(vs,ne),e(ne,Zs),e(vs,he),e(vs,Es),e(Es,fe),e(vs,I),e(vs,ns),e(ns,ke),o(m,He,D),o(m,bs,D),e(bs,we),o(m,Be,D),E(re,m,D),o(m,Ee,D),o(m,Us,D),e(Us,We),o(m,fs,D),E(Qs,m,D),o(m,ys,D),o(m,Ms,D),e(Ms,_e),e(Ms,ye),e(ye,ca),e(Ms,xe),e(Ms,Os),e(Os,ua),e(Ms,be),o(m,Ke,D),o(m,ge,D),e(ge,qa),o(m,Ka,D),E(Ve,m,D),o(m,Ta,D),E(se,m,D),o(m,Da,D),o(m,ws,D),e(ws,Ot),o(m,da,D),E(Ye,m,D),o(m,Va,D),o(m,oe,D),e(oe,St),e(oe,za),e(za,Oa),e(oe,Ct),o(m,Ya,D),o(m,je,D),e(je,Pt),o(m,Ja,D),o(m,qe,D),e(qe,At),o(m,Xa,D),o(m,Ns,D),e(Ns,ee),e(ee,Za),e(ee,Te),e(Te,Rt),e(ee,Qa),e(Ns,Je),e(Ns,ha),e(ha,Xe),e(Ns,st),e(Ns,As),e(As,Lt),e(Ns,Sa),e(Ns,ae),e(ae,It),e(ae,Ze),e(Ze,Gt),e(ae,Ut),e(ae,Qe),e(Qe,Mt),e(ae,Nt),e(ae,fa),e(fa,sa),e(ae,et),o(m,De,D),o(m,ea,D),e(ea,_a),o(m,at,D),E(ze,m,D),o(m,pe,D),E(te,m,D),o(m,Ft,D),o(m,Oe,D),e(Oe,aa),e(Oe,tt),e(tt,lt),e(Oe,Se),nt=!0},i(m){nt||(_(x.$$.fragment,m),_(as.$$.fragment,m),_(gs.$$.fragment,m),_(f.$$.fragment,m),_(_s.$$.fragment,m),_(Gs.$$.fragment,m),_(Js.$$.fragment,m),_(re.$$.fragment,m),_(Qs.$$.fragment,m),_(Ve.$$.fragment,m),_(se.$$.fragment,m),_(Ye.$$.fragment,m),_(ze.$$.fragment,m),_(te.$$.fragment,m),nt=!0)},o(m){b(x.$$.fragment,m),b(as.$$.fragment,m),b(gs.$$.fragment,m),b(f.$$.fragment,m),b(_s.$$.fragment,m),b(Gs.$$.fragment,m),b(Js.$$.fragment,m),b(re.$$.fragment,m),b(Qs.$$.fragment,m),b(Ve.$$.fragment,m),b(se.$$.fragment,m),b(Ye.$$.fragment,m),b(ze.$$.fragment,m),b(te.$$.fragment,m),nt=!1},d(m){m&&a(d),y(x),m&&a(S),m&&a($),m&&a(H),m&&a(M),m&&a(T),m&&a(G),m&&a($s),y(as,m),m&&a(Ds),m&&a(ms),m&&a(cs),y(gs,m),m&&a(us),m&&a(ds),m&&a(ks),y(f,m),m&&a(U),m&&a(V),m&&a(zs),y(_s,m),m&&a(hs),m&&a(js),m&&a($e),y(Gs,m),m&&a(le),y(Js,m),m&&a(Xs),m&&a(Bs),m&&a(de),m&&a(vs),m&&a(He),m&&a(bs),m&&a(Be),y(re,m),m&&a(Ee),m&&a(Us),m&&a(fs),y(Qs,m),m&&a(ys),m&&a(Ms),m&&a(Ke),m&&a(ge),m&&a(Ka),y(Ve,m),m&&a(Ta),y(se,m),m&&a(Da),m&&a(ws),m&&a(da),y(Ye,m),m&&a(Va),m&&a(oe),m&&a(Ya),m&&a(je),m&&a(Ja),m&&a(qe),m&&a(Xa),m&&a(Ns),m&&a(De),m&&a(ea),m&&a(at),y(ze,m),m&&a(pe),y(te,m),m&&a(Ft),m&&a(Oe)}}}function zf(B){let d,j,h,x,R;return{c(){d=n("p"),j=t("\u{1F6A8} TPU\u3067\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3059\u308B\u5834\u5408\u306F\u3001\u4E0A\u8A18\u306E\u30B3\u30FC\u30C9\u3092\u3059\u3079\u3066\u5C02\u7528\u306E\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306B\u79FB\u52D5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u8A73\u3057\u304F\u306F"),h=n("a"),x=t("\u7B2C3\u7AE0"),R=t("\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),this.h()},l(q){d=r(q,"P",{});var P=p(d);j=l(P,"\u{1F6A8} TPU\u3067\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3059\u308B\u5834\u5408\u306F\u3001\u4E0A\u8A18\u306E\u30B3\u30FC\u30C9\u3092\u3059\u3079\u3066\u5C02\u7528\u306E\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306B\u79FB\u52D5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u8A73\u3057\u304F\u306F"),h=r(P,"A",{href:!0});var S=p(h);x=l(S,"\u7B2C3\u7AE0"),S.forEach(a),R=l(P,"\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),P.forEach(a),this.h()},h(){v(h,"href","/course/ja/chapter3")},m(q,P){o(q,d,P),e(d,j),e(d,h),e(h,x),e(d,R)},d(q){q&&a(d)}}}function Of(B){let d,j,h,x,R,q,P,S,$,O,A,C,L,F,X,Z,H,M,W,T,G,rs,ss,ls,Q,Y,J,es,$s,as,Ds,ms,K,os,qs,ts,cs,gs,us,ds,ps,ks,f,U,V,g,N,Ss,Ts,zs,_s,hs,js,Ys,is,Fs,Hs,$e,Gs,le,Js,Xs,Bs,Fe,de,vs,ne,Zs,he,Es,fe,I,ns,ke,He,bs,we,Be,re,Ee,Us,We,fs,Qs,ys,Ms,_e,ye,ca,xe,Os,ua,be,Ke,ge,qa,Ka,Ve,Ta,se,Da,ws,Ot,da,Ye,Va,oe,St,za,Oa,Ct,Ya,je,Pt,Ja,qe,At,Xa,Ns,ee,Za,Te,Rt,Qa,Je,ha,Xe,st,As,Lt,Sa,ae,It,Ze,Gt,Ut,Qe,Mt,Nt,fa,sa,et,De,ea,_a,at,ze,pe,te,Ft,Oe,aa,tt,lt,Se,nt,m,D,Wl,Ht,ba,ta,Ca,Kl,Bt,ie,Vl,Wt,ve,Yl,Pa,rt,Jl,Aa,la,ot,Ws,Ra,Xl,Zl,pt,Ql,ga,La,sn,en,Rs,me,Ia,ja,an,Ce,va,tn,ln,Ga,Pe,nn,Ae,Ua,$a,it,rn,rr,ii,mi,on,ci,ui,Ma,pn,Kt,di,hi,Vt,fi,or,_i,bi,gi,mn,ji,vi,Na,cn,Yt,$i,ki,pr,wi,Ei,un,yi,xi,Fa,dn,Jt,qi,Ti,ir,Di,zi,hn,Oi,Si,Ha,fn,Xt,Ci,Pi,mr,Ai,Ri,_n,Li,co,bn,Ii,uo,gn,Gi,ho,Ba,Zt,yu,Ui,Qt,xu,fo,jn,Mi,_o,mt,bo,sl,Ni,go,el,jo,ct,Fi,cr,Hi,Bi,vo,al,$o,ut,ko,vn,Wi,wo,tl,Eo,ll,yo,ce,Ki,$n,Vi,Yi,ur,Ji,Xi,dr,Zi,Qi,hr,sm,em,xo,nl,qo,rl,To,Re,am,fr,tm,lm,_r,nm,rm,kn,om,pm,Do,dt,im,br,mm,cm,zo,wn,um,Oo,ol,So,ue,dm,gr,hm,fm,jr,_m,bm,vr,gm,jm,$r,vm,$m,Co,Wa,kr,km,wm,wr,Em,ym,Po,pl,Ao,En,xm,Ro,ht,Lo,il,qm,Io,ml,Go,yn,Tm,Uo,ft,Dm,cl,zm,Om,Mo,ul,No,ka,Sm,Er,Cm,Pm,yr,Am,Rm,Fo,_t,Ho,dl,Lm,Bo,rf='<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mrow><mi mathvariant="normal">R</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">c</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">l</mi><mi mathvariant="normal">l</mi></mrow><mo>=</mo><mfrac><mrow><mi mathvariant="normal">N</mi><mi mathvariant="normal">u</mi><mi mathvariant="normal">m</mi><mi mathvariant="normal">b</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">r</mi><mtext>\u2009</mtext><mi mathvariant="normal">o</mi><mi mathvariant="normal">f</mi><mtext>\u2009</mtext><mi mathvariant="normal">o</mi><mi mathvariant="normal">v</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">l</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">p</mi><mi mathvariant="normal">p</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">n</mi><mi mathvariant="normal">g</mi><mtext>\u2009</mtext><mi mathvariant="normal">w</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">d</mi><mi mathvariant="normal">s</mi></mrow><mrow><mi mathvariant="normal">T</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">t</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">l</mi><mtext>\u2009</mtext><mi mathvariant="normal">n</mi><mi mathvariant="normal">u</mi><mi mathvariant="normal">m</mi><mi mathvariant="normal">b</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">r</mi><mtext>\u2009</mtext><mi mathvariant="normal">o</mi><mi mathvariant="normal">f</mi><mtext>\u2009</mtext><mi mathvariant="normal">w</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">d</mi><mi mathvariant="normal">s</mi><mtext>\u2009</mtext><mi mathvariant="normal">i</mi><mi mathvariant="normal">n</mi><mtext>\u2009</mtext><mi mathvariant="normal">r</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">f</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">n</mi><mi mathvariant="normal">c</mi><mi mathvariant="normal">e</mi><mtext>\u2009</mtext><mi mathvariant="normal">s</mi><mi mathvariant="normal">u</mi><mi mathvariant="normal">m</mi><mi mathvariant="normal">m</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">y</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex"> \\mathrm{Recall} = \\frac{\\mathrm{Number\\,of\\,overlapping\\, words}}{\\mathrm{Total\\, number\\, of\\, words\\, in\\, reference\\, summary}} </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord"><span class="mord mathrm">Recall</span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:2.2519em;vertical-align:-0.8804em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.3714em;"><span style="top:-2.314em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathrm">Total</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">number</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm" style="margin-right:0.07778em;">of</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">words</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">in</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">reference</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm" style="margin-right:0.01389em;">summary</span></span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.677em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathrm">Number</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm" style="margin-right:0.07778em;">of</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm" style="margin-right:0.01389em;">overlapping</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">words</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.8804em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span></span></span></span></span>',Wo,hl,Im,Ko,of='<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mrow><mi mathvariant="normal">P</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">c</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">s</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">n</mi></mrow><mo>=</mo><mfrac><mrow><mi mathvariant="normal">N</mi><mi mathvariant="normal">u</mi><mi mathvariant="normal">m</mi><mi mathvariant="normal">b</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">r</mi><mtext>\u2009</mtext><mi mathvariant="normal">o</mi><mi mathvariant="normal">f</mi><mtext>\u2009</mtext><mi mathvariant="normal">o</mi><mi mathvariant="normal">v</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">l</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">p</mi><mi mathvariant="normal">p</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">n</mi><mi mathvariant="normal">g</mi><mtext>\u2009</mtext><mi mathvariant="normal">w</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">d</mi><mi mathvariant="normal">s</mi></mrow><mrow><mi mathvariant="normal">T</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">t</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">l</mi><mtext>\u2009</mtext><mi mathvariant="normal">n</mi><mi mathvariant="normal">u</mi><mi mathvariant="normal">m</mi><mi mathvariant="normal">b</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">r</mi><mtext>\u2009</mtext><mi mathvariant="normal">o</mi><mi mathvariant="normal">f</mi><mtext>\u2009</mtext><mi mathvariant="normal">w</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">d</mi><mi mathvariant="normal">s</mi><mtext>\u2009</mtext><mi mathvariant="normal">i</mi><mi mathvariant="normal">n</mi><mtext>\u2009</mtext><mi mathvariant="normal">g</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">n</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">t</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">d</mi><mtext>\u2009</mtext><mi mathvariant="normal">s</mi><mi mathvariant="normal">u</mi><mi mathvariant="normal">m</mi><mi mathvariant="normal">m</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">y</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex"> \\mathrm{Precision} = \\frac{\\mathrm{Number\\,of\\,overlapping\\, words}}{\\mathrm{Total\\, number\\, of\\, words\\, in\\, generated\\, summary}} </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em;"></span><span class="mord"><span class="mord mathrm">Precision</span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:2.2519em;vertical-align:-0.8804em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.3714em;"><span style="top:-2.314em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathrm">Total</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">number</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm" style="margin-right:0.07778em;">of</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">words</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">in</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">generated</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm" style="margin-right:0.01389em;">summary</span></span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.677em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathrm">Number</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm" style="margin-right:0.07778em;">of</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm" style="margin-right:0.01389em;">overlapping</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathrm">words</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.8804em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span></span></span></span></span>',Vo,bt,Gm,xr,Um,Mm,Yo,fl,Jo,xn,Nm,Xo,_l,Zo,gt,Fm,qr,Hm,Bm,Qo,bl,sp,gl,ep,qn,Wm,ap,Ks,Km,Tr,Vm,Ym,Dr,Jm,Xm,zr,Zm,Qm,Or,sc,ec,Sr,ac,tc,tp,jl,lp,vl,np,Vs,lc,Cr,nc,rc,Pr,oc,pc,Ar,ic,mc,Rr,cc,uc,Lr,dc,hc,rp,jt,op,Tn,fc,pp,$l,_c,ip,Le,bc,Ir,gc,jc,Gr,vc,$c,Ur,kc,wc,mp,kl,cp,Dn,Ec,up,wl,dp,vt,yc,Mr,xc,qc,hp,El,fp,yl,_p,zn,Tc,bp,xl,gp,On,Dc,jp,ql,vp,Tl,$p,Sn,zc,kp,na,ra,Cn,$t,wp,Pn,Oc,Ep,Dl,yp,An,Sc,xp,zl,qp,Rn,kt,Cc,Ln,Pc,Ac,Tp,Ie,Rc,Nr,Lc,Ic,Fr,Gc,Uc,Hr,Mc,Nc,Dp,oa,pa,In,Gn,Fc,zp,Ol,Op,wa,Hc,Br,Bc,Wc,Wr,Kc,Vc,Sp,Sl,Cp,Cl,Pp,xs,Yc,Kr,Jc,Xc,Vr,Zc,Qc,Yr,su,eu,Jr,au,tu,Xr,lu,nu,Zr,ru,ou,Qr,pu,iu,so,mu,cu,Ap,ia,ma,Un,Mn,Pl,uu,Rp,wt,du,eo,hu,fu,Lp,Al,Ip,Nn,_u,Gp,Rl,Up,Fn,bu,Mp,Ll,Np,Il,Fp,Hn,gu,Hp,Gl,Bp,Ul,Wp,Bn,ju,Kp,Wn,vu,Vp;h=new hf({props:{fw:B[0]}});const qu=[_f,ff],Ml=[];function Tu(s,i){return s[0]==="pt"?0:1}S=Tu(B),$=Ml[S]=qu[S](B),H=new wu({props:{id:"yHnr5Dk2zCI"}}),ps=new z({props:{code:`from datasets import load_dataset

spanish_dataset = load_dataset("amazon_reviews_multi", "es")
english_dataset = load_dataset("amazon_reviews_multi", "en")
english_dataset`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

spanish_dataset = load_dataset(<span class="hljs-string">&quot;amazon_reviews_multi&quot;</span>, <span class="hljs-string">&quot;es&quot;</span>)
english_dataset = load_dataset(<span class="hljs-string">&quot;amazon_reviews_multi&quot;</span>, <span class="hljs-string">&quot;en&quot;</span>)
english_dataset`}}),f=new z({props:{code:`DatasetDict({
    train: Dataset({
        features: ['review_id', 'product_id', 'reviewer_id', 'stars', 'review_body', 'review_title', 'language', 'product_category'],
        num_rows: 200000
    })
    validation: Dataset({
        features: ['review_id', 'product_id', 'reviewer_id', 'stars', 'review_body', 'review_title', 'language', 'product_category'],
        num_rows: 5000
    })
    test: Dataset({
        features: ['review_id', 'product_id', 'reviewer_id', 'stars', 'review_body', 'review_title', 'language', 'product_category'],
        num_rows: 5000
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;review_id&#x27;</span>, <span class="hljs-string">&#x27;product_id&#x27;</span>, <span class="hljs-string">&#x27;reviewer_id&#x27;</span>, <span class="hljs-string">&#x27;stars&#x27;</span>, <span class="hljs-string">&#x27;review_body&#x27;</span>, <span class="hljs-string">&#x27;review_title&#x27;</span>, <span class="hljs-string">&#x27;language&#x27;</span>, <span class="hljs-string">&#x27;product_category&#x27;</span>],
        num_rows: <span class="hljs-number">200000</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;review_id&#x27;</span>, <span class="hljs-string">&#x27;product_id&#x27;</span>, <span class="hljs-string">&#x27;reviewer_id&#x27;</span>, <span class="hljs-string">&#x27;stars&#x27;</span>, <span class="hljs-string">&#x27;review_body&#x27;</span>, <span class="hljs-string">&#x27;review_title&#x27;</span>, <span class="hljs-string">&#x27;language&#x27;</span>, <span class="hljs-string">&#x27;product_category&#x27;</span>],
        num_rows: <span class="hljs-number">5000</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;review_id&#x27;</span>, <span class="hljs-string">&#x27;product_id&#x27;</span>, <span class="hljs-string">&#x27;reviewer_id&#x27;</span>, <span class="hljs-string">&#x27;stars&#x27;</span>, <span class="hljs-string">&#x27;review_body&#x27;</span>, <span class="hljs-string">&#x27;review_title&#x27;</span>, <span class="hljs-string">&#x27;language&#x27;</span>, <span class="hljs-string">&#x27;product_category&#x27;</span>],
        num_rows: <span class="hljs-number">5000</span>
    })
})`}}),vs=new z({props:{code:`def show_samples(dataset, num_samples=3, seed=42):
    sample = dataset["train"].shuffle(seed=seed).select(range(num_samples))
    for example in sample:
        print(f"\\n'>> Title: {example['review_title']}'")
        print(f"'>> Review: {example['review_body']}'")


show_samples(english_dataset)`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">show_samples</span>(<span class="hljs-params">dataset, num_samples=<span class="hljs-number">3</span>, seed=<span class="hljs-number">42</span></span>):
    sample = dataset[<span class="hljs-string">&quot;train&quot;</span>].shuffle(seed=seed).select(<span class="hljs-built_in">range</span>(num_samples))
    <span class="hljs-keyword">for</span> example <span class="hljs-keyword">in</span> sample:
        <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;\\n&#x27;&gt;&gt; Title: <span class="hljs-subst">{example[<span class="hljs-string">&#x27;review_title&#x27;</span>]}</span>&#x27;&quot;</span>)
        <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;&#x27;&gt;&gt; Review: <span class="hljs-subst">{example[<span class="hljs-string">&#x27;review_body&#x27;</span>]}</span>&#x27;&quot;</span>)


show_samples(english_dataset)`}}),Zs=new z({props:{code:`'>> Title: Worked in front position, not rear'
'>> Review: 3 stars because these are not rear brakes as stated in the item description. At least the mount adapter only worked on the front fork of the bike that I got it for.'

'>> Title: meh'
'>> Review: Does it\u2019s job and it\u2019s gorgeous but mine is falling apart, I had to basically put it together again with hot glue'

'>> Title: Can\\'t beat these for the money'
'>> Review: Bought this for handling miscellaneous aircraft parts and hanger "stuff" that I needed to organize; it really fit the bill. The unit arrived quickly, was well packaged and arrived intact (always a good sign). There are five wall mounts-- three on the top and two on the bottom. I wanted to mount it on the wall, so all I had to do was to remove the top two layers of plastic drawers, as well as the bottom corner drawers, place it when I wanted and mark it; I then used some of the new plastic screw in wall anchors (the 50 pound variety) and it easily mounted to the wall. Some have remarked that they wanted dividers for the drawers, and that they made those. Good idea. My application was that I needed something that I can see the contents at about eye level, so I wanted the fuller-sized drawers. I also like that these are the new plastic that doesn\\'t get brittle and split like my older plastic drawers did. I like the all-plastic construction. It\\'s heavy duty enough to hold metal parts, but being made of plastic it\\'s not as heavy as a metal frame, so you can easily mount it to the wall and still load it up with heavy stuff, or light stuff. No problem there. For the money, you can\\'t beat it. Best one of these I\\'ve bought to date-- and I\\'ve been using some version of these for over forty years.'`,highlighted:`<span class="hljs-string">&#x27;&gt;&gt; Title: Worked in front position, not rear&#x27;</span>
<span class="hljs-string">&#x27;&gt;&gt; Review: 3 stars because these are not rear brakes as stated in the item description. At least the mount adapter only worked on the front fork of the bike that I got it for.&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt; Title: meh&#x27;</span>
<span class="hljs-string">&#x27;&gt;&gt; Review: Does it\u2019s job and it\u2019s gorgeous but mine is falling apart, I had to basically put it together again with hot glue&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt; Title: Can\\&#x27;t beat these for the money&#x27;</span>
<span class="hljs-string">&#x27;&gt;&gt; Review: Bought this for handling miscellaneous aircraft parts and hanger &quot;stuff&quot; that I needed to organize; it really fit the bill. The unit arrived quickly, was well packaged and arrived intact (always a good sign). There are five wall mounts-- three on the top and two on the bottom. I wanted to mount it on the wall, so all I had to do was to remove the top two layers of plastic drawers, as well as the bottom corner drawers, place it when I wanted and mark it; I then used some of the new plastic screw in wall anchors (the 50 pound variety) and it easily mounted to the wall. Some have remarked that they wanted dividers for the drawers, and that they made those. Good idea. My application was that I needed something that I can see the contents at about eye level, so I wanted the fuller-sized drawers. I also like that these are the new plastic that doesn\\&#x27;t get brittle and split like my older plastic drawers did. I like the all-plastic construction. It\\&#x27;s heavy duty enough to hold metal parts, but being made of plastic it\\&#x27;s not as heavy as a metal frame, so you can easily mount it to the wall and still load it up with heavy stuff, or light stuff. No problem there. For the money, you can\\&#x27;t beat it. Best one of these I\\&#x27;ve bought to date-- and I\\&#x27;ve been using some version of these for over forty years.&#x27;</span>`}}),Es=new zt({props:{$$slots:{default:[bf]},$$scope:{ctx:B}}}),Us=new z({props:{code:`english_dataset.set_format("pandas")
english_df = english_dataset["train"][:]
# Show counts for top 20 products
english_df["product_category"].value_counts()[:20]`,highlighted:`english_dataset.set_format(<span class="hljs-string">&quot;pandas&quot;</span>)
english_df = english_dataset[<span class="hljs-string">&quot;train&quot;</span>][:]
<span class="hljs-comment"># Show counts for top 20 products</span>
english_df[<span class="hljs-string">&quot;product_category&quot;</span>].value_counts()[:<span class="hljs-number">20</span>]`}}),fs=new z({props:{code:`home                      17679
apparel                   15951
wireless                  15717
other                     13418
beauty                    12091
drugstore                 11730
kitchen                   10382
toy                        8745
sports                     8277
automotive                 7506
lawn_and_garden            7327
home_improvement           7136
pet_products               7082
digital_ebook_purchase     6749
pc                         6401
electronics                6186
office_product             5521
shoes                      5197
grocery                    4730
book                       3756
Name: product_category, dtype: int64`,highlighted:`home                      <span class="hljs-number">17679</span>
apparel                   <span class="hljs-number">15951</span>
wireless                  <span class="hljs-number">15717</span>
other                     <span class="hljs-number">13418</span>
beauty                    <span class="hljs-number">12091</span>
drugstore                 <span class="hljs-number">11730</span>
kitchen                   <span class="hljs-number">10382</span>
toy                        <span class="hljs-number">8745</span>
sports                     <span class="hljs-number">8277</span>
automotive                 <span class="hljs-number">7506</span>
lawn_and_garden            <span class="hljs-number">7327</span>
home_improvement           <span class="hljs-number">7136</span>
pet_products               <span class="hljs-number">7082</span>
digital_ebook_purchase     <span class="hljs-number">6749</span>
pc                         <span class="hljs-number">6401</span>
electronics                <span class="hljs-number">6186</span>
office_product             <span class="hljs-number">5521</span>
shoes                      <span class="hljs-number">5197</span>
grocery                    <span class="hljs-number">4730</span>
book                       <span class="hljs-number">3756</span>
Name: product_category, dtype: int64`}}),se=new z({props:{code:`def filter_books(example):
    return (
        example["product_category"] == "book"
        or example["product_category"] == "digital_ebook_purchase"
    )`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">filter_books</span>(<span class="hljs-params">example</span>):
    <span class="hljs-keyword">return</span> (
        example[<span class="hljs-string">&quot;product_category&quot;</span>] == <span class="hljs-string">&quot;book&quot;</span>
        <span class="hljs-keyword">or</span> example[<span class="hljs-string">&quot;product_category&quot;</span>] == <span class="hljs-string">&quot;digital_ebook_purchase&quot;</span>
    )`}}),ee=new z({props:{code:"english_dataset.reset_format()",highlighted:"english_dataset.reset_format()"}}),Je=new z({props:{code:`spanish_books = spanish_dataset.filter(filter_books)
english_books = english_dataset.filter(filter_books)
show_samples(english_books)`,highlighted:`spanish_books = spanish_dataset.<span class="hljs-built_in">filter</span>(filter_books)
english_books = english_dataset.<span class="hljs-built_in">filter</span>(filter_books)
show_samples(english_books)`}}),Xe=new z({props:{code:`'>> Title: I\\'m dissapointed.'
'>> Review: I guess I had higher expectations for this book from the reviews. I really thought I\\'d at least like it. The plot idea was great. I loved Ash but, it just didnt go anywhere. Most of the book was about their radio show and talking to callers. I wanted the author to dig deeper so we could really get to know the characters. All we know about Grace is that she is attractive looking, Latino and is kind of a brat. I\\'m dissapointed.'

'>> Title: Good art, good price, poor design'
'>> Review: I had gotten the DC Vintage calendar the past two years, but it was on backorder forever this year and I saw they had shrunk the dimensions for no good reason. This one has good art choices but the design has the fold going through the picture, so it\\'s less aesthetically pleasing, especially if you want to keep a picture to hang. For the price, a good calendar'

'>> Title: Helpful'
'>> Review: Nearly all the tips useful and. I consider myself an intermediate to advanced user of OneNote. I would highly recommend.'`,highlighted:`<span class="hljs-string">&#x27;&gt;&gt; Title: I\\&#x27;m dissapointed.&#x27;</span>
<span class="hljs-string">&#x27;&gt;&gt; Review: I guess I had higher expectations for this book from the reviews. I really thought I\\&#x27;d at least like it. The plot idea was great. I loved Ash but, it just didnt go anywhere. Most of the book was about their radio show and talking to callers. I wanted the author to dig deeper so we could really get to know the characters. All we know about Grace is that she is attractive looking, Latino and is kind of a brat. I\\&#x27;m dissapointed.&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt; Title: Good art, good price, poor design&#x27;</span>
<span class="hljs-string">&#x27;&gt;&gt; Review: I had gotten the DC Vintage calendar the past two years, but it was on backorder forever this year and I saw they had shrunk the dimensions for no good reason. This one has good art choices but the design has the fold going through the picture, so it\\&#x27;s less aesthetically pleasing, especially if you want to keep a picture to hang. For the price, a good calendar&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt; Title: Helpful&#x27;</span>
<span class="hljs-string">&#x27;&gt;&gt; Review: Nearly all the tips useful and. I consider myself an intermediate to advanced user of OneNote. I would highly recommend.&#x27;</span>`}}),sa=new z({props:{code:`from datasets import concatenate_datasets, DatasetDict

books_dataset = DatasetDict()

for split in english_books.keys():
    books_dataset[split] = concatenate_datasets(
        [english_books[split], spanish_books[split]]
    )
    books_dataset[split] = books_dataset[split].shuffle(seed=42)

# Peek at a few examples
show_samples(books_dataset)`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> concatenate_datasets, DatasetDict

books_dataset = DatasetDict()

<span class="hljs-keyword">for</span> split <span class="hljs-keyword">in</span> english_books.keys():
    books_dataset[split] = concatenate_datasets(
        [english_books[split], spanish_books[split]]
    )
    books_dataset[split] = books_dataset[split].shuffle(seed=<span class="hljs-number">42</span>)

<span class="hljs-comment"># Peek at a few examples</span>
show_samples(books_dataset)`}}),De=new z({props:{code:`'>> Title: Easy to follow!!!!'
'>> Review: I loved The dash diet weight loss Solution. Never hungry. I would recommend this diet. Also the menus are well rounded. Try it. Has lots of the information need thanks.'

'>> Title: PARCIALMENTE DA\xD1ADO'
'>> Review: Me lleg\xF3 el d\xEDa que tocaba, junto a otros libros que ped\xED, pero la caja lleg\xF3 en mal estado lo cual da\xF1\xF3 las esquinas de los libros porque ven\xEDan sin protecci\xF3n (forro).'

'>> Title: no lo he podido descargar'
'>> Review: igual que el anterior'`,highlighted:`<span class="hljs-string">&#x27;&gt;&gt; Title: Easy to follow!!!!&#x27;</span>
<span class="hljs-string">&#x27;&gt;&gt; Review: I loved The dash diet weight loss Solution. Never hungry. I would recommend this diet. Also the menus are well rounded. Try it. Has lots of the information need thanks.&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt; Title: PARCIALMENTE DA\xD1ADO&#x27;</span>
<span class="hljs-string">&#x27;&gt;&gt; Review: Me lleg\xF3 el d\xEDa que tocaba, junto a otros libros que ped\xED, pero la caja lleg\xF3 en mal estado lo cual da\xF1\xF3 las esquinas de los libros porque ven\xEDan sin protecci\xF3n (forro).&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt; Title: no lo he podido descargar&#x27;</span>
<span class="hljs-string">&#x27;&gt;&gt; Review: igual que el anterior&#x27;</span>`}}),ba=new z({props:{code:'books_dataset = books_dataset.filter(lambda x: len(x["review_title"].split()) > 2)',highlighted:'books_dataset = books_dataset.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: <span class="hljs-built_in">len</span>(x[<span class="hljs-string">&quot;review_title&quot;</span>].split()) &gt; <span class="hljs-number">2</span>)'}}),mt=new zt({props:{$$slots:{default:[gf]},$$scope:{ctx:B}}}),el=new wu({props:{id:"1m7BerpSq8A"}}),al=new z({props:{code:`from transformers import AutoTokenizer

model_checkpoint = "google/mt5-small"
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

model_checkpoint = <span class="hljs-string">&quot;google/mt5-small&quot;</span>
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)`}}),ut=new zt({props:{$$slots:{default:[jf]},$$scope:{ctx:B}}}),tl=new z({props:{code:`inputs = tokenizer("I loved reading the Hunger Games!")
inputs`,highlighted:`inputs = tokenizer(<span class="hljs-string">&quot;I loved reading the Hunger Games!&quot;</span>)
inputs`}}),ll=new z({props:{code:"{'input_ids': [336, 259, 28387, 11807, 287, 62893, 295, 12507, 1], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1]}",highlighted:'{<span class="hljs-string">&#x27;input_ids&#x27;</span>: [<span class="hljs-number">336</span>, <span class="hljs-number">259</span>, <span class="hljs-number">28387</span>, <span class="hljs-number">11807</span>, <span class="hljs-number">287</span>, <span class="hljs-number">62893</span>, <span class="hljs-number">295</span>, <span class="hljs-number">12507</span>, <span class="hljs-number">1</span>], <span class="hljs-string">&#x27;attention_mask&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]}'}}),nl=new z({props:{code:"tokenizer.convert_ids_to_tokens(inputs.input_ids)",highlighted:"tokenizer.convert_ids_to_tokens(inputs.input_ids)"}}),rl=new z({props:{code:"['\u2581I', '\u2581', 'loved', '\u2581reading', '\u2581the', '\u2581Hung', 'er', '\u2581Games', '</s>']",highlighted:'[<span class="hljs-string">&#x27;\u2581I&#x27;</span>, <span class="hljs-string">&#x27;\u2581&#x27;</span>, <span class="hljs-string">&#x27;loved&#x27;</span>, <span class="hljs-string">&#x27;\u2581reading&#x27;</span>, <span class="hljs-string">&#x27;\u2581the&#x27;</span>, <span class="hljs-string">&#x27;\u2581Hung&#x27;</span>, <span class="hljs-string">&#x27;er&#x27;</span>, <span class="hljs-string">&#x27;\u2581Games&#x27;</span>, <span class="hljs-string">&#x27;&lt;/s&gt;&#x27;</span>]'}}),ol=new z({props:{code:`max_input_length = 512
max_target_length = 30


def preprocess_function(examples):
    model_inputs = tokenizer(
        examples["review_body"], max_length=max_input_length, truncation=True
    )
    # Set up the tokenizer for targets
    with tokenizer.as_target_tokenizer():
        labels = tokenizer(
            examples["review_title"], max_length=max_target_length, truncation=True
        )

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


<span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_function</span>(<span class="hljs-params">examples</span>):
    model_inputs = tokenizer(
        examples[<span class="hljs-string">&quot;review_body&quot;</span>], 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(
            examples[<span class="hljs-string">&quot;review_title&quot;</span>], 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`}}),pl=new z({props:{code:"tokenized_datasets = books_dataset.map(preprocess_function, batched=True)",highlighted:'tokenized_datasets = books_dataset.<span class="hljs-built_in">map</span>(preprocess_function, batched=<span class="hljs-literal">True</span>)'}}),ht=new zt({props:{$$slots:{default:[vf]},$$scope:{ctx:B}}}),ml=new wu({props:{id:"TMshhnrEXlg"}}),ul=new z({props:{code:`generated_summary = "I absolutely loved reading the Hunger Games"
reference_summary = "I loved reading the Hunger Games"`,highlighted:`generated_summary = <span class="hljs-string">&quot;I absolutely loved reading the Hunger Games&quot;</span>
reference_summary = <span class="hljs-string">&quot;I loved reading the Hunger Games&quot;</span>`}}),_t=new zt({props:{$$slots:{default:[$f]},$$scope:{ctx:B}}}),fl=new z({props:{code:"!pip install rouge_score",highlighted:"!pip install rouge_score"}}),_l=new z({props:{code:`import evaluate

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

rouge_score = evaluate.load(<span class="hljs-string">&quot;rouge&quot;</span>)`}}),bl=new z({props:{code:`scores = rouge_score.compute(
    predictions=[generated_summary], references=[reference_summary]
)
scores`,highlighted:`scores = rouge_score.compute(
    predictions=[generated_summary], references=[reference_summary]
)
scores`}}),gl=new z({props:{code:`{'rouge1': AggregateScore(low=Score(precision=0.86, recall=1.0, fmeasure=0.92), mid=Score(precision=0.86, recall=1.0, fmeasure=0.92), high=Score(precision=0.86, recall=1.0, fmeasure=0.92)),
 'rouge2': AggregateScore(low=Score(precision=0.67, recall=0.8, fmeasure=0.73), mid=Score(precision=0.67, recall=0.8, fmeasure=0.73), high=Score(precision=0.67, recall=0.8, fmeasure=0.73)),
 'rougeL': AggregateScore(low=Score(precision=0.86, recall=1.0, fmeasure=0.92), mid=Score(precision=0.86, recall=1.0, fmeasure=0.92), high=Score(precision=0.86, recall=1.0, fmeasure=0.92)),
 'rougeLsum': AggregateScore(low=Score(precision=0.86, recall=1.0, fmeasure=0.92), mid=Score(precision=0.86, recall=1.0, fmeasure=0.92), high=Score(precision=0.86, recall=1.0, fmeasure=0.92))}`,highlighted:`{<span class="hljs-string">&#x27;rouge1&#x27;</span>: AggregateScore(low=Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>), mid=Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>), high=Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>)),
 <span class="hljs-string">&#x27;rouge2&#x27;</span>: AggregateScore(low=Score(precision=<span class="hljs-number">0.67</span>, recall=<span class="hljs-number">0.8</span>, fmeasure=<span class="hljs-number">0.73</span>), mid=Score(precision=<span class="hljs-number">0.67</span>, recall=<span class="hljs-number">0.8</span>, fmeasure=<span class="hljs-number">0.73</span>), high=Score(precision=<span class="hljs-number">0.67</span>, recall=<span class="hljs-number">0.8</span>, fmeasure=<span class="hljs-number">0.73</span>)),
 <span class="hljs-string">&#x27;rougeL&#x27;</span>: AggregateScore(low=Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>), mid=Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>), high=Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>)),
 <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: AggregateScore(low=Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>), mid=Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>), high=Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>))}`}}),jl=new z({props:{code:'scores["rouge1"].mid',highlighted:'scores[<span class="hljs-string">&quot;rouge1&quot;</span>].mid'}}),vl=new z({props:{code:"Score(precision=0.86, recall=1.0, fmeasure=0.92)",highlighted:'Score(precision=<span class="hljs-number">0.86</span>, recall=<span class="hljs-number">1.0</span>, fmeasure=<span class="hljs-number">0.92</span>)'}}),jt=new zt({props:{$$slots:{default:[kf]},$$scope:{ctx:B}}}),kl=new z({props:{code:"!pip install nltk",highlighted:"!pip install nltk"}}),wl=new z({props:{code:`import nltk

nltk.download("punkt")`,highlighted:`<span class="hljs-keyword">import</span> nltk

nltk.download(<span class="hljs-string">&quot;punkt&quot;</span>)`}}),El=new z({props:{code:`from nltk.tokenize import sent_tokenize


def three_sentence_summary(text):
    return "\\n".join(sent_tokenize(text)[:3])


print(three_sentence_summary(books_dataset["train"][1]["review_body"]))`,highlighted:`<span class="hljs-keyword">from</span> nltk.tokenize <span class="hljs-keyword">import</span> sent_tokenize


<span class="hljs-keyword">def</span> <span class="hljs-title function_">three_sentence_summary</span>(<span class="hljs-params">text</span>):
    <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;\\n&quot;</span>.join(sent_tokenize(text)[:<span class="hljs-number">3</span>])


<span class="hljs-built_in">print</span>(three_sentence_summary(books_dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">1</span>][<span class="hljs-string">&quot;review_body&quot;</span>]))`}}),yl=new z({props:{code:`'I grew up reading Koontz, and years ago, I stopped,convinced i had "outgrown" him.'
'Still,when a friend was looking for something suspenseful too read, I suggested Koontz.'
'She found Strangers.'`,highlighted:`<span class="hljs-string">&#x27;I grew up reading Koontz, and years ago, I stopped,convinced i had &quot;outgrown&quot; him.&#x27;</span>
<span class="hljs-string">&#x27;Still,when a friend was looking for something suspenseful too read, I suggested Koontz.&#x27;</span>
<span class="hljs-string">&#x27;She found Strangers.&#x27;</span>`}}),xl=new z({props:{code:`def evaluate_baseline(dataset, metric):
    summaries = [three_sentence_summary(text) for text in dataset["review_body"]]
    return metric.compute(predictions=summaries, references=dataset["review_title"])`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">evaluate_baseline</span>(<span class="hljs-params">dataset, metric</span>):
    summaries = [three_sentence_summary(text) <span class="hljs-keyword">for</span> text <span class="hljs-keyword">in</span> dataset[<span class="hljs-string">&quot;review_body&quot;</span>]]
    <span class="hljs-keyword">return</span> metric.compute(predictions=summaries, references=dataset[<span class="hljs-string">&quot;review_title&quot;</span>])`}}),ql=new z({props:{code:`import pandas as pd

score = evaluate_baseline(books_dataset["validation"], rouge_score)
rouge_names = ["rouge1", "rouge2", "rougeL", "rougeLsum"]
rouge_dict = dict((rn, round(score[rn].mid.fmeasure * 100, 2)) for rn in rouge_names)
rouge_dict`,highlighted:`<span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd

score = evaluate_baseline(books_dataset[<span class="hljs-string">&quot;validation&quot;</span>], rouge_score)
rouge_names = [<span class="hljs-string">&quot;rouge1&quot;</span>, <span class="hljs-string">&quot;rouge2&quot;</span>, <span class="hljs-string">&quot;rougeL&quot;</span>, <span class="hljs-string">&quot;rougeLsum&quot;</span>]
rouge_dict = <span class="hljs-built_in">dict</span>((rn, <span class="hljs-built_in">round</span>(score[rn].mid.fmeasure * <span class="hljs-number">100</span>, <span class="hljs-number">2</span>)) <span class="hljs-keyword">for</span> rn <span class="hljs-keyword">in</span> rouge_names)
rouge_dict`}}),Tl=new z({props:{code:"{'rouge1': 16.74, 'rouge2': 8.83, 'rougeL': 15.6, 'rougeLsum': 15.96}",highlighted:'{<span class="hljs-string">&#x27;rouge1&#x27;</span>: <span class="hljs-number">16.74</span>, <span class="hljs-string">&#x27;rouge2&#x27;</span>: <span class="hljs-number">8.83</span>, <span class="hljs-string">&#x27;rougeL&#x27;</span>: <span class="hljs-number">15.6</span>, <span class="hljs-string">&#x27;rougeLsum&#x27;</span>: <span class="hljs-number">15.96</span>}'}});const Du=[Ef,wf],Nl=[];function zu(s,i){return s[0]==="pt"?0:1}na=zu(B),ra=Nl[na]=Du[na](B),$t=new zt({props:{$$slots:{default:[yf]},$$scope:{ctx:B}}}),Dl=new z({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()`}}),zl=new z({props:{code:"huggingface-cli login",highlighted:'huggingface-<span class="hljs-keyword">cli</span> login'}});let Cs=B[0]==="pt"&&tf();const Ou=[qf,xf],Fl=[];function Su(s,i){return s[0]==="pt"?0:1}oa=Su(B),pa=Fl[oa]=Ou[oa](B),Ol=new z({props:{code:`tokenized_datasets = tokenized_datasets.remove_columns(
    books_dataset["train"].column_names
)`,highlighted:`tokenized_datasets = tokenized_datasets.remove_columns(
    books_dataset[<span class="hljs-string">&quot;train&quot;</span>].column_names
)`}}),Sl=new z({props:{code:`features = [tokenized_datasets["train"][i] for i in range(2)]
data_collator(features)`,highlighted:`features = [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">2</span>)]
data_collator(features)`}}),Cl=new z({props:{code:`{'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
         1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],
        [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[  1494,    259,   8622,    390,    259,    262,   2316,   3435,    955,
            772,    281,    772,   1617,    263,    305,  14701,    260,   1385,
           3031,    259,  24146,    332,   1037,    259,  43906,    305,    336,
            260,      1,      0,      0,      0,      0,      0,      0],
        [   259,  27531,  13483,    259,   7505,    260, 112240,  15192,    305,
          53198,    276,    259,  74060,    263,    260,    459,  25640,    776,
           2119,    336,    259,   2220,    259,  18896,    288,   4906,    288,
           1037,   3931,    260,   7083, 101476,   1143,    260,      1]]), 'labels': tensor([[ 7483,   259,  2364, 15695,     1,  -100],
        [  259, 27531, 13483,   259,  7505,     1]]), 'decoder_input_ids': tensor([[    0,  7483,   259,  2364, 15695,     1],
        [    0,   259, 27531, 13483,   259,  7505]])}`,highlighted:`{<span class="hljs-string">&#x27;attention_mask&#x27;</span>: tensor([[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>,
         <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</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-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
        [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>,
         <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]]), <span class="hljs-string">&#x27;input_ids&#x27;</span>: tensor([[  <span class="hljs-number">1494</span>,    <span class="hljs-number">259</span>,   <span class="hljs-number">8622</span>,    <span class="hljs-number">390</span>,    <span class="hljs-number">259</span>,    <span class="hljs-number">262</span>,   <span class="hljs-number">2316</span>,   <span class="hljs-number">3435</span>,    <span class="hljs-number">955</span>,
            <span class="hljs-number">772</span>,    <span class="hljs-number">281</span>,    <span class="hljs-number">772</span>,   <span class="hljs-number">1617</span>,    <span class="hljs-number">263</span>,    <span class="hljs-number">305</span>,  <span class="hljs-number">14701</span>,    <span class="hljs-number">260</span>,   <span class="hljs-number">1385</span>,
           <span class="hljs-number">3031</span>,    <span class="hljs-number">259</span>,  <span class="hljs-number">24146</span>,    <span class="hljs-number">332</span>,   <span class="hljs-number">1037</span>,    <span class="hljs-number">259</span>,  <span class="hljs-number">43906</span>,    <span class="hljs-number">305</span>,    <span class="hljs-number">336</span>,
            <span class="hljs-number">260</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-number">0</span>,      <span class="hljs-number">0</span>,      <span class="hljs-number">0</span>],
        [   <span class="hljs-number">259</span>,  <span class="hljs-number">27531</span>,  <span class="hljs-number">13483</span>,    <span class="hljs-number">259</span>,   <span class="hljs-number">7505</span>,    <span class="hljs-number">260</span>, <span class="hljs-number">112240</span>,  <span class="hljs-number">15192</span>,    <span class="hljs-number">305</span>,
          <span class="hljs-number">53198</span>,    <span class="hljs-number">276</span>,    <span class="hljs-number">259</span>,  <span class="hljs-number">74060</span>,    <span class="hljs-number">263</span>,    <span class="hljs-number">260</span>,    <span class="hljs-number">459</span>,  <span class="hljs-number">25640</span>,    <span class="hljs-number">776</span>,
           <span class="hljs-number">2119</span>,    <span class="hljs-number">336</span>,    <span class="hljs-number">259</span>,   <span class="hljs-number">2220</span>,    <span class="hljs-number">259</span>,  <span class="hljs-number">18896</span>,    <span class="hljs-number">288</span>,   <span class="hljs-number">4906</span>,    <span class="hljs-number">288</span>,
           <span class="hljs-number">1037</span>,   <span class="hljs-number">3931</span>,    <span class="hljs-number">260</span>,   <span class="hljs-number">7083</span>, <span class="hljs-number">101476</span>,   <span class="hljs-number">1143</span>,    <span class="hljs-number">260</span>,      <span class="hljs-number">1</span>]]), <span class="hljs-string">&#x27;labels&#x27;</span>: tensor([[ <span class="hljs-number">7483</span>,   <span class="hljs-number">259</span>,  <span class="hljs-number">2364</span>, <span class="hljs-number">15695</span>,     <span class="hljs-number">1</span>,  -<span class="hljs-number">100</span>],
        [  <span class="hljs-number">259</span>, <span class="hljs-number">27531</span>, <span class="hljs-number">13483</span>,   <span class="hljs-number">259</span>,  <span class="hljs-number">7505</span>,     <span class="hljs-number">1</span>]]), <span class="hljs-string">&#x27;decoder_input_ids&#x27;</span>: tensor([[    <span class="hljs-number">0</span>,  <span class="hljs-number">7483</span>,   <span class="hljs-number">259</span>,  <span class="hljs-number">2364</span>, <span class="hljs-number">15695</span>,     <span class="hljs-number">1</span>],
        [    <span class="hljs-number">0</span>,   <span class="hljs-number">259</span>, <span class="hljs-number">27531</span>, <span class="hljs-number">13483</span>,   <span class="hljs-number">259</span>,  <span class="hljs-number">7505</span>]])}`}});const Cu=[Df,Tf],Hl=[];function Pu(s,i){return s[0]==="pt"?0:1}ia=Pu(B),ma=Hl[ia]=Cu[ia](B);let Ps=B[0]==="pt"&&lf(B);return Al=new z({props:{code:`from transformers import pipeline

hub_model_id = "huggingface-course/mt5-small-finetuned-amazon-en-es"
summarizer = pipeline("summarization", model=hub_model_id)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

hub_model_id = <span class="hljs-string">&quot;huggingface-course/mt5-small-finetuned-amazon-en-es&quot;</span>
summarizer = pipeline(<span class="hljs-string">&quot;summarization&quot;</span>, model=hub_model_id)`}}),Rl=new z({props:{code:`def print_summary(idx):
    review = books_dataset["test"][idx]["review_body"]
    title = books_dataset["test"][idx]["review_title"]
    summary = summarizer(books_dataset["test"][idx]["review_body"])[0]["summary_text"]
    print(f"'>>> Review: {review}'")
    print(f"\\n'>>> Title: {title}'")
    print(f"\\n'>>> Summary: {summary}'")`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">print_summary</span>(<span class="hljs-params">idx</span>):
    review = books_dataset[<span class="hljs-string">&quot;test&quot;</span>][idx][<span class="hljs-string">&quot;review_body&quot;</span>]
    title = books_dataset[<span class="hljs-string">&quot;test&quot;</span>][idx][<span class="hljs-string">&quot;review_title&quot;</span>]
    summary = summarizer(books_dataset[<span class="hljs-string">&quot;test&quot;</span>][idx][<span class="hljs-string">&quot;review_body&quot;</span>])[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;summary_text&quot;</span>]
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;&#x27;&gt;&gt;&gt; Review: <span class="hljs-subst">{review}</span>&#x27;&quot;</span>)
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;\\n&#x27;&gt;&gt;&gt; Title: <span class="hljs-subst">{title}</span>&#x27;&quot;</span>)
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;\\n&#x27;&gt;&gt;&gt; Summary: <span class="hljs-subst">{summary}</span>&#x27;&quot;</span>)`}}),Ll=new z({props:{code:"print_summary(100)",highlighted:'print_summary(<span class="hljs-number">100</span>)'}}),Il=new z({props:{code:`'>>> Review: Nothing special at all about this product... the book is too small and stiff and hard to write in. The huge sticker on the back doesn\u2019t come off and looks super tacky. I would not purchase this again. I could have just bought a journal from the dollar store and it would be basically the same thing. It\u2019s also really expensive for what it is.'

'>>> Title: Not impressed at all... buy something else'

'>>> Summary: Nothing special at all about this product'`,highlighted:`<span class="hljs-string">&#x27;&gt;&gt;&gt; Review: Nothing special at all about this product... the book is too small and stiff and hard to write in. The huge sticker on the back doesn\u2019t come off and looks super tacky. I would not purchase this again. I could have just bought a journal from the dollar store and it would be basically the same thing. It\u2019s also really expensive for what it is.&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt;&gt; Title: Not impressed at all... buy something else&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt;&gt; Summary: Nothing special at all about this product&#x27;</span>`}}),Gl=new z({props:{code:"print_summary(0)",highlighted:'print_summary(<span class="hljs-number">0</span>)'}}),Ul=new z({props:{code:`'>>> Review: Es una trilogia que se hace muy facil de leer. Me ha gustado, no me esperaba el final para nada'

'>>> Title: Buena literatura para adolescentes'

'>>> Summary: Muy facil de leer'`,highlighted:`<span class="hljs-string">&#x27;&gt;&gt;&gt; Review: Es una trilogia que se hace muy facil de leer. Me ha gustado, no me esperaba el final para nada&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt;&gt; Title: Buena literatura para adolescentes&#x27;</span>

<span class="hljs-string">&#x27;&gt;&gt;&gt; Summary: Muy facil de leer&#x27;</span>`}}),{c(){d=n("meta"),j=c(),k(h.$$.fragment),x=c(),R=n("h1"),q=t("\u8981\u7D04"),P=c(),$.c(),O=c(),A=n("p"),C=t("\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u306F\u3001Transformer\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3057\u3066\u3001\u9577\u3044\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8981\u7D04\u3059\u308B\u65B9\u6CD5\u3092\u898B\u3066\u3044\u304D\u307E\u3059\u3002\u3053\u308C\u306F\u3001"),L=n("em"),F=t("\u6587\u7AE0\u8981\u7D04"),X=t(" \u3068\u3057\u3066\u77E5\u3089\u308C\u308B\u30BF\u30B9\u30AF\u3067\u3059\u3002 \u3053\u308C\u306F\u3001\u9577\u3044\u6587\u7AE0\u3092\u7406\u89E3\u3057\u305F\u308A\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u4E3B\u8981\u306A\u30C8\u30D4\u30C3\u30AF\u3092\u88DC\u8DB3\u3059\u308B\u4E00\u8CAB\u6027\u306E\u3042\u308B\u30C6\u30AD\u30B9\u30C8\u3092\u751F\u6210\u3057\u305F\u308A\u3059\u308B\u306A\u3069\u3001\u3055\u307E\u3056\u307E\u306A\u80FD\u529B\u3092\u5FC5\u8981\u3068\u3059\u308B\u305F\u3081\u3001\u6700\u3082\u56F0\u96E3\u306ANLP\u30BF\u30B9\u30AF\u306E1\u3064\u3067\u3059\u3002 \u305F\u3060\u3057\u3001\u30C6\u30AD\u30B9\u30C8\u306E\u8981\u7D04\u306F\u3001\u3046\u307E\u304F\u884C\u3051\u3070\u3001\u9818\u57DF\u306E\u5C02\u9580\u5BB6\u304C\u9577\u3044\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8A73\u7D30\u306B\u8AAD\u3080\u8CA0\u62C5\u3092\u8EFD\u6E1B\u3059\u308B\u3053\u3068\u3067\u3001\u3055\u307E\u3056\u307E\u306A\u30D3\u30B8\u30CD\u30B9\u30D7\u30ED\u30BB\u30B9\u3092\u30B9\u30D4\u30FC\u30C9\u30A2\u30C3\u30D7\u3067\u304D\u308B\u5F37\u529B\u306A\u30C4\u30FC\u30EB\u306B\u306A\u308A\u307E\u3059\u3002"),Z=c(),k(H.$$.fragment),M=c(),W=n("p"),T=n("a"),G=t("\u30CF\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6"),rs=t("\u306B\u306F\u3001\u8981\u7D04\u7528\u306B\u5FAE\u8ABF\u6574\u3055\u308C\u305F\u3055\u307E\u3056\u307E\u306A\u30E2\u30C7\u30EB\u304C\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\u304C\u3001\u3053\u308C\u3089\u306E\u307B\u3068\u3093\u3069\u306F\u82F1\u8A9E\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306E\u307F\u9069\u3057\u3066\u3044\u307E\u3059\u3002 \u3057\u305F\u304C\u3063\u3066\u3001\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u3072\u306D\u308A\u3092\u52A0\u3048\u308B\u305F\u3081\u306B\u3001\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30D0\u30A4\u30EA\u30F3\u30AC\u30EB\u30E2\u30C7\u30EB\u3092\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3057\u307E\u3059\u3002 \u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u7D42\u308F\u308A\u307E\u3067\u306B\u3001\u3053\u3053\u306B\u793A\u3059\u3088\u3046\u306A\u30AB\u30B9\u30BF\u30DE\u30FC\u30EC\u30D3\u30E5\u30FC\u3092\u8981\u7D04\u3067\u304D\u308B"),ss=n("a"),ls=t("\u30E2\u30C7\u30EB"),Q=t("\u304C\u3067\u304D\u3042\u304C\u308A\u307E\u3059\u3002"),Y=c(),J=n("iframe"),$s=c(),as=n("p"),Ds=t("\u3053\u308C\u304B\u3089\u8AAC\u660E\u3059\u308B\u3088\u3046\u306B\u3001\u3053\u308C\u3089\u306E\u8981\u7D04\u306F\u3001\u9867\u5BA2\u304C\u88FD\u54C1\u30EC\u30D3\u30E5\u30FC\u6295\u7A3F\u6642\u306B\u3064\u3051\u305F\u30BF\u30A4\u30C8\u30EB\u6587\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u7C21\u6F54\u3067\u3059\u3002 \u3053\u306E\u30BF\u30B9\u30AF\u306B\u9069\u3057\u305F\u591A\u8A00\u8A9E\u30B3\u30FC\u30D1\u30B9\u3092\u307E\u3068\u3081\u308B\u3053\u3068\u304B\u3089\u59CB\u3081\u307E\u3057\u3087\u3046\u3002"),ms=c(),K=n("h2"),os=t("\u591A\u8A00\u8A9E\u30B3\u30FC\u30D1\u30B9\u306E\u6E96\u5099"),qs=c(),ts=n("p"),cs=n("a"),gs=t("Multilingual Amazon Reviews Corpus"),us=t("\u3092\u4F7F\u7528\u3057\u3066\u3001\u591A\u8A00\u8A9E\u8981\u7D04\u5668\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u3053\u306E\u30B3\u30FC\u30D1\u30B9\u306F\u30016\u3064\u306E\u8A00\u8A9E\u3067\u306EAmazon\u88FD\u54C1\u30EC\u30D3\u30E5\u30FC\u3067\u69CB\u6210\u3055\u308C\u3066\u304A\u308A\u3001\u901A\u5E38\u3001\u591A\u8A00\u8A9E\u5206\u985E\u5B50\u306E\u30D9\u30F3\u30C1\u30DE\u30FC\u30AF\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002 \u305F\u3060\u3057\u3001\u5404\u30EC\u30D3\u30E5\u30FC\u306B\u306F\u77ED\u3044\u30BF\u30A4\u30C8\u30EB\u304C\u4ED8\u3044\u3066\u3044\u308B\u305F\u3081\u3001\u30E2\u30C7\u30EB\u304C\u5B66\u7FD2\u5BFE\u8C61\u3068\u3059\u308B\u8981\u7D04\u6587\u3068\u3057\u3066\u30BF\u30A4\u30C8\u30EB\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 \u958B\u59CB\u3059\u308B\u306B\u306F\u3001\u30CF\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6\u304B\u3089\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30B5\u30D6\u30BB\u30C3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u307E\u3057\u3087\u3046\u3002"),ds=c(),k(ps.$$.fragment),ks=c(),k(f.$$.fragment),U=c(),V=n("p"),g=t("\u3054\u89A7\u306E\u901A\u308A\u3001\u5404\u8A00\u8A9E\u306E "),N=n("code"),Ss=t("train"),Ts=t(" \u5206\u5272\u306B\u306F 200,000 \u4EF6\u306E\u30EC\u30D3\u30E5\u30FC\u304C\u3042\u308A\u3001 "),zs=n("code"),_s=t("validation"),hs=t(" \u3068 "),js=n("code"),Ys=t("test"),is=t(" \u5206\u5272\u306B\u306F\u305D\u308C\u305E\u308C 5,000 \u4EF6\u306E\u30EC\u30D3\u30E5\u30FC\u304C\u3042\u308A\u307E\u3059\u3002\u79C1\u9054\u304C\u5185\u5BB9\u3092\u77E5\u308A\u305F\u3044\u30EC\u30D3\u30E5\u30FC\u60C5\u5831\u306F "),Fs=n("code"),Hs=t("review_body"),$e=t(" \u3068 "),Gs=n("code"),le=t("review_title"),Js=t(" \u30AB\u30E9\u30E0\u306B\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002"),Xs=n("a"),Bs=t("\u7B2C5\u7AE0"),Fe=t(" \u3067\u5B66\u3093\u3060\u624B\u6CD5\u3067\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u304B\u3089\u30E9\u30F3\u30C0\u30E0\u306B\u30B5\u30F3\u30D7\u30EB\u3092\u53D6\u5F97\u3059\u308B\u7C21\u5358\u306A\u95A2\u6570\u3092\u4F5C\u6210\u3057\u3001\u3044\u304F\u3064\u304B\u306E\u4F8B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),de=c(),k(vs.$$.fragment),ne=c(),k(Zs.$$.fragment),he=c(),k(Es.$$.fragment),fe=c(),I=n("p"),ns=t("\u3053\u306E\u30B5\u30F3\u30D7\u30EB\u306F\u3001\u80AF\u5B9A\u7684\u306A\u30EC\u30D3\u30E5\u30FC\u304B\u3089\u5426\u5B9A\u7684\u306A\u30EC\u30D3\u30E5\u30FC\u307E\u3067\uFF08\u305D\u3057\u3066\u305D\u306E\u4E2D\u9593\u306B\u3042\u308B\u5168\u3066\u306E\u30EC\u30D3\u30E5\u30FC\uFF01\uFF09\u3001\u4E00\u822C\u7684\u306B\u30AA\u30F3\u30E9\u30A4\u30F3\u3067\u898B\u3089\u308C\u308B\u30EC\u30D3\u30E5\u30FC\u306E\u591A\u69D8\u6027\u3092\u793A\u3057\u3066\u3044\u307E\u3059\u3002 \u300Cmeh\u300D\u3068\u3044\u3046\u30BF\u30A4\u30C8\u30EB\u306F\u3042\u307E\u308A\u6709\u76CA\u306A\u60C5\u5831\u3092\u793A\u3059\u30BF\u30A4\u30C8\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001\u4ED6\u306E\u30BF\u30A4\u30C8\u30EB\u306F\u30EC\u30D3\u30E5\u30FC\u81EA\u4F53\u306E\u9069\u5207\u306A\u8981\u7D04\u306E\u3088\u3046\u306B\u898B\u3048\u307E\u3059\u300240\u4E07\u4EF6\u306E\u30EC\u30D3\u30E5\u30FC\u3059\u3079\u3066\u306B\u3064\u3044\u3066\u8981\u7D04\u30E2\u30C7\u30EB\u3092\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3059\u308B\u3053\u3068\u306F\u3001\u5358\u4E00\u306EGPU\u3067\u306F\u3042\u307E\u308A\u306B\u3082\u6642\u9593\u304C\u304B\u304B\u308A\u3059\u304E\u308B\u305F\u3081\u3001\u305D\u306E\u4EE3\u308F\u308A\u306B\u3001\u5358\u4E00\u88FD\u54C1\u306E\u30C9\u30E1\u30A4\u30F3\u306B\u3064\u3044\u3066\u8981\u7D04\u3092\u751F\u6210\u3059\u308B\u3053\u3068\u306B\u7126\u70B9\u3092\u5F53\u3066\u307E\u3059\u3002\u3069\u306E\u3088\u3046\u306A\u30C9\u30E1\u30A4\u30F3\u304B\u3089\u9078\u629E\u3067\u304D\u308B\u304B\u3092\u77E5\u308B\u305F\u3081\u306B\u3001"),ke=n("code"),He=t("english_dataset"),bs=t(" \u3092 "),we=n("code"),Be=t("pandas.DataFrame"),re=t(" \u306B\u5909\u63DB\u3057\u3066\u3001\u88FD\u54C1\u30AB\u30C6\u30B4\u30EA\u3054\u3068\u306E\u30EC\u30D3\u30E5\u30FC\u6570\u3092\u8A08\u7B97\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Ee=c(),k(Us.$$.fragment),We=c(),k(fs.$$.fragment),Qs=c(),ys=n("p"),Ms=t("\u82F1\u8A9E\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u6700\u3082\u4EBA\u6C17\u306E\u3042\u308B\u5546\u54C1\u306F\u3001\u5BB6\u5EAD\u7528\u54C1\u3001\u8863\u985E\u3001\u30EF\u30A4\u30E4\u30EC\u30B9\u96FB\u5B50\u6A5F\u5668\u306B\u95A2\u3059\u308B\u3082\u306E\u3067\u3059\u3002\u3057\u304B\u3057\u3001Amazon\u672C\u6765\u306E\u30C6\u30FC\u30DE\u306B\u6CBF\u3063\u3066\u3001\u66F8\u8A55\u306E\u8981\u7D04\u306B\u7126\u70B9\u3092\u5F53\u3066\u307E\u3057\u3087\u3046\u3002\u7D50\u5C40\u306E\u3068\u3053\u308D\u3001\u66F8\u7C4D\u306F\u3053\u306E\u4F1A\u793E\u304C\u8A2D\u7ACB\u3055\u308C\u305F\u969B\u306E\u5546\u54C1\u306A\u306E\u3067\u3059! 2\u3064\u306E\u88FD\u54C1\u30AB\u30C6\u30B4\u30EA("),_e=n("code"),ye=t("book"),ca=t(" \u3068 "),xe=n("code"),Os=t("digital_ebook_purchase"),ua=t(") \u304C\u5F53\u3066\u306F\u307E\u308B\u306E\u3067\u3001\u3053\u308C\u3089\u306E\u88FD\u54C1\u306B\u3064\u3044\u3066\u4E21\u8A00\u8A9E\u3067\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u30D5\u30A3\u30EB\u30BF\u30EA\u30F3\u30B0\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),be=n("a"),Ke=t("\u7B2C5\u7AE0"),ge=t(" \u3067\u898B\u305F\u3088\u3046\u306B\u3001 "),qa=n("code"),Ka=t("Dataset.filter()"),Ve=t(" \u95A2\u6570\u3092\u4F7F\u3046\u3068\u975E\u5E38\u306B\u52B9\u7387\u7684\u306B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u30B9\u30E9\u30A4\u30B9\u3067\u304D\u308B\u306E\u3067\u3001\u3053\u308C\u3092\u884C\u3046\u305F\u3081\u306E\u7C21\u5358\u306A\u95A2\u6570\u3092\u5B9A\u7FA9\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Ta=c(),k(se.$$.fragment),Da=c(),ws=n("p"),Ot=t("\u3053\u306E\u95A2\u6570\u3092 "),da=n("code"),Ye=t("english_dataset"),Va=t(" \u3068 "),oe=n("code"),St=t("spanish_dataset"),za=t(" \u306B\u9069\u7528\u3059\u308B\u3068\u3001\u66F8\u7C4D\u306E\u30AB\u30C6\u30B4\u30EA\u3092\u542B\u3080\u884C\u3060\u3051\u304C\u7D50\u679C\u306B\u542B\u307E\u308C\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002\u30D5\u30A3\u30EB\u30BF\u3092\u9069\u7528\u3059\u308B\u524D\u306B\u3001"),Oa=n("code"),Ct=t("english_dataset"),Ya=t(" \u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092 "),je=n("code"),Pt=t('"pandas"'),Ja=t(" \u304B\u3089 "),qe=n("code"),At=t('"arrow"'),Xa=t(" \u306B\u623B\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Ns=c(),k(ee.$$.fragment),Za=c(),Te=n("p"),Rt=t("\u6B21\u306B\u3001\u30D5\u30A3\u30EB\u30BF\u30FC\u6A5F\u80FD\u3092\u9069\u7528\u3057\u3001\u30B5\u30CB\u30C6\u30A3\u30FC\u30C1\u30A7\u30C3\u30AF\u3068\u3057\u3066\u3001\u30EC\u30D3\u30E5\u30FC\u306E\u30B5\u30F3\u30D7\u30EB\u304C\u672C\u5F53\u306B\u672C\u306B\u95A2\u3059\u308B\u3082\u306E\u304B\u3069\u3046\u304B\u3092\u8ABF\u3079\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Qa=c(),k(Je.$$.fragment),ha=c(),k(Xe.$$.fragment),st=c(),As=n("p"),Lt=t("\u30EC\u30D3\u30E5\u30FC\u304C\u53B3\u5BC6\u306B\u672C\u306B\u3064\u3044\u3066\u3067\u306F\u306A\u304F\u3001\u30AB\u30EC\u30F3\u30C0\u30FC\u3084OneNote\u306E\u3088\u3046\u306A\u96FB\u5B50\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u3088\u3046\u306A\u3082\u306E\u3092\u53C2\u7167\u3057\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u305D\u308C\u3067\u3082\u3001\u3053\u306E\u30C9\u30E1\u30A4\u30F3\u306F\u8981\u7D04\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3055\u305B\u308B\u306E\u306B\u9069\u3057\u3066\u3044\u308B\u3068\u601D\u308F\u308C\u307E\u3059\u3002\u3053\u306E\u30BF\u30B9\u30AF\u306B\u9069\u3057\u305F\u69D8\u3005\u306A\u30E2\u30C7\u30EB\u3092\u898B\u308B\u524D\u306B\u3001\u6700\u5F8C\u306E\u30C7\u30FC\u30BF\u6E96\u5099\u3068\u3057\u3066\u3001\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30EC\u30D3\u30E5\u30FC\u30921\u3064\u306E "),Sa=n("code"),ae=t("DatasetDict"),It=t(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3068\u3057\u3066\u7D50\u5408\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u{1F917} Datasets\u306B\u306F\u4FBF\u5229\u306A "),Ze=n("code"),Gt=t("concatenate_datasets()"),Ut=t(" \u95A2\u6570\u304C\u3042\u308A\u3001\uFF08\u305D\u306E\u540D\u306E\u901A\u308A\uFF092\u3064\u306E "),Qe=n("code"),Mt=t("Dataset"),Nt=t(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u91CD\u306D\u5408\u308F\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3064\u307E\u308A\u3001\u30D0\u30A4\u30EA\u30F3\u30AC\u30EB\u30FB\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u305F\u3081\u306B\u3001\u5404\u5206\u5272\u3092\u30EB\u30FC\u30D7\u3057\u3001\u305D\u306E\u5206\u5272\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u9023\u7D50\u3057\u3001\u30E2\u30C7\u30EB\u304C\u5358\u4E00\u8A00\u8A9E\u306B\u904E\u5270\u9069\u5408\u3057\u306A\u3044\u3088\u3046\u306B\u7D50\u679C\u3092\u30B7\u30E3\u30C3\u30D5\u30EB\u3057\u307E\u3059\u3002"),fa=c(),k(sa.$$.fragment),et=c(),k(De.$$.fragment),ea=c(),_a=n("p"),at=t(`\u3053\u308C\u306F\u78BA\u304B\u306B\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30EC\u30D3\u30E5\u30FC\u304C\u6DF7\u5728\u3057\u3066\u3044\u308B\u3088\u3046\u306B\u898B\u3048\u307E\u3059\u306D\uFF01
\u3055\u3066\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30B3\u30FC\u30D1\u30B9\u304C\u3067\u304D\u305F\u306E\u3067\u3001\u6700\u5F8C\u306B\u30EC\u30D3\u30E5\u30FC\u3068\u305D\u306E\u30BF\u30A4\u30C8\u30EB\u306B\u542B\u307E\u308C\u308B\u5358\u8A9E\u306E\u5206\u5E03\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u8981\u7D04\u30BF\u30B9\u30AF\u306B\u304A\u3044\u3066\u7279\u306B\u91CD\u8981\u3067\u3001\u5B66\u7FD2\u30C7\u30FC\u30BF\u3068\u3057\u3066\u53C2\u8003\u306B\u3059\u308B\u30C7\u30FC\u30BF\u4E2D\u306B\u77ED\u3059\u304E\u308B\u8981\u7D04\u304C\u591A\u3044\u3068\u3001\u8981\u7D04\u751F\u6210\u6642\u306B1\u3064\u304B2\u3064\u306E\u5358\u8A9E\u3057\u304B\u51FA\u529B\u3057\u306A\u3044\u3088\u3046\u30E2\u30C7\u30EB\u3092\u504F\u3089\u305B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u4E0B\u306E\u30D7\u30ED\u30C3\u30C8\u306F\u5358\u8A9E\u306E\u5206\u5E03\u3092\u793A\u3057\u3066\u304A\u308A\u3001\u30BF\u30A4\u30C8\u30EB\u304C1-2\u5358\u8A9E\u3060\u3051\u306B\u5927\u304D\u304F\u504F\u3063\u3066\u3044\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002`),ze=c(),pe=n("div"),te=n("img"),Oe=c(),aa=n("img"),lt=c(),Se=n("p"),nt=t("\u3053\u306E\u554F\u984C\u306B\u5BFE\u51E6\u3057\u3001\u79C1\u9054\u306E\u30E2\u30C7\u30EB\u304C\u3088\u308A\u8208\u5473\u6DF1\u3044\u8981\u7D04\u3092\u751F\u6210\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u975E\u5E38\u306B\u77ED\u3044\u30BF\u30A4\u30C8\u30EB\u3092\u6301\u3064\u4F8B\u3092\u30D5\u30A3\u30EB\u30BF\u30EA\u30F3\u30B0\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u6271\u3063\u3066\u3044\u308B\u306E\u3067\u3001\u30BF\u30A4\u30C8\u30EB\u3092\u7A7A\u767D\u3067\u5206\u5272\u3059\u308B\u5927\u307E\u304B\u306A\u7D4C\u9A13\u5247\u3092\u5143\u306B\u3001\u4FE1\u983C\u3067\u304D\u308B "),m=n("code"),D=t("Dataset.filter()"),Wl=t(" \u30E1\u30BD\u30C3\u30C9\u3092\u4EE5\u4E0B\u306E\u3088\u3046\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002"),Ht=c(),k(ba.$$.fragment),ta=c(),Ca=n("p"),Kl=t("\u3055\u3066\u3001\u30B3\u30FC\u30D1\u30B9\u304C\u3067\u304D\u305F\u3068\u3053\u308D\u3067\u3001\u3053\u306E\u30B3\u30FC\u30D1\u30B9\u3092\u4F7F\u3063\u3066\u3001Transformer\u306E\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Bt=c(),ie=n("h2"),Vl=t("\u6587\u7AE0\u8981\u7D04\u7528\u30E2\u30C7\u30EB"),Wt=c(),ve=n("p"),Yl=t("\u8003\u3048\u3066\u307F\u308C\u3070\u3001\u6587\u7AE0\u306E\u8981\u7D04\u306F\u6A5F\u68B0\u7FFB\u8A33\u3068\u4F3C\u305F\u3088\u3046\u306A\u7A2E\u985E\u306E\u30BF\u30B9\u30AF\u3067\u3059\u3002\u30EC\u30D3\u30E5\u30FC\u306E\u3088\u3046\u306A\u30C6\u30AD\u30B9\u30C8\u5165\u529B\u304C\u3042\u308A\u3001\u305D\u308C\u3092\u5165\u529B\u6587\u5185\u306E\u9855\u8457\u306A\u7279\u5FB4\u3092\u3068\u3089\u3048\u305F\u77ED\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u306B\u300C\u7FFB\u8A33\u300D\u3057\u305F\u3044\u306E\u3067\u3059\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u8981\u7D04\u306E\u305F\u3081\u306E\u307B\u3068\u3093\u3069\u306ETransformer\u30E2\u30C7\u30EB\u306F"),Pa=n("a"),rt=t("\u7B2C1\u7AE0"),Jl=t("\u3067\u6700\u521D\u306B\u51FA\u4F1A\u3063\u305F\u30A8\u30F3\u30B3\u30FC\u30C0\u3068\u30C7\u30B3\u30FC\u30C0\u306E\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u63A1\u7528\u3057\u3066\u3044\u307E\u3059\u3002\u3057\u304B\u3057\u3001GPT\u30E2\u30C7\u30EB\u7FA4\u306E\u3088\u3046\u306A\u4F8B\u5916\u3082\u3042\u308A\u3001\u5C11\u6570\u30B7\u30E7\u30C3\u30C8\u5B66\u7FD2\u8A2D\u5B9A\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u3082\u53EF\u80FD\u3067\u3059\u3002\u4EE5\u4E0B\u306E\u8868\u306F\u3001\u8981\u7D04\u306E\u305F\u3081\u306B\u5FAE\u8ABF\u6574\u304C\u53EF\u80FD\u306A\u3001\u3088\u304F\u4F7F\u308F\u308C\u308B\u4E8B\u524D\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306E\u4E00\u89A7\u3067\u3059\u3002"),Aa=c(),la=n("table"),ot=n("thead"),Ws=n("tr"),Ra=n("th"),Xl=t("Transformer model"),Zl=c(),pt=n("th"),Ql=t("Description"),ga=c(),La=n("th"),sn=t("Multilingual?"),en=c(),Rs=n("tbody"),me=n("tr"),Ia=n("td"),ja=n("a"),an=t("GPT-2"),Ce=c(),va=n("td"),tn=t("Although trained as an auto-regressive language model, you can make GPT-2 generate summaries by appending \u201CTL;DR\u201D at the end of the input text."),ln=c(),Ga=n("td"),Pe=t("\u274C"),nn=c(),Ae=n("tr"),Ua=n("td"),$a=n("a"),it=t("PEGASUS"),rn=c(),rr=n("td"),ii=t("Uses a pretraining objective to predict masked sentences in multi-sentence texts. This pretraining objective is closer to summarization than vanilla language modeling and scores highly on popular benchmarks."),mi=c(),on=n("td"),ci=t("\u274C"),ui=c(),Ma=n("tr"),pn=n("td"),Kt=n("a"),di=t("T5"),hi=c(),Vt=n("td"),fi=t("A universal Transformer architecture that formulates all tasks in a text-to-text framework; e.g., the input format for the model to summarize a document is "),or=n("code"),_i=t("summarize: ARTICLE"),bi=t("."),gi=c(),mn=n("td"),ji=t("\u274C"),vi=c(),Na=n("tr"),cn=n("td"),Yt=n("a"),$i=t("mT5"),ki=c(),pr=n("td"),wi=t("A multilingual version of T5, pretrained on the multilingual Common Crawl corpus (mC4), covering 101 languages."),Ei=c(),un=n("td"),yi=t("\u2705"),xi=c(),Fa=n("tr"),dn=n("td"),Jt=n("a"),qi=t("BART"),Ti=c(),ir=n("td"),Di=t("A novel Transformer architecture with both an encoder and a decoder stack trained to reconstruct corrupted input that combines the pretraining schemes of BERT and GPT-2."),zi=c(),hn=n("td"),Oi=t("\u274C"),Si=c(),Ha=n("tr"),fn=n("td"),Xt=n("a"),Ci=t("mBART-50"),Pi=c(),mr=n("td"),Ai=t("A multilingual version of BART, pretrained on 50 languages."),Ri=c(),_n=n("td"),Li=t("\u2705"),co=c(),bn=n("p"),Ii=t("\u3053\u306E\u8868\u304B\u3089\u308F\u304B\u308B\u3088\u3046\u306B\u3001\u8981\u7D04\u306E\u305F\u3081\u306ETransformer\u30E2\u30C7\u30EB\u306E\u5927\u534A\u306F\uFF08\u305D\u3057\u3066\u5B9F\u969B\u3001\u307B\u3068\u3093\u3069\u306ENLP\u30BF\u30B9\u30AF\u3082\uFF09\u5358\u8A00\u8A9E\u7248\u3067\u3059\u3002\u3053\u308C\u306F\u30BF\u30B9\u30AF\u304C\u82F1\u8A9E\u3084\u30C9\u30A4\u30C4\u8A9E\u306E\u3088\u3046\u306A\u5229\u7528\u53EF\u80FD\u306A\u30C7\u30FC\u30BF\u306E\u591A\u3044\u300C\u9AD8\u30EA\u30BD\u30FC\u30B9\u300D\u8A00\u8A9E\u3067\u3042\u308B\u5834\u5408\u306F\u826F\u3044\u306E\u3067\u3059\u304C\u3001\u4E16\u754C\u4E2D\u3067\u4F7F\u308F\u308C\u3066\u3044\u308B\u4F55\u5343\u3082\u306E\u4ED6\u306E\u8A00\u8A9E\u3067\u306F\u305D\u3046\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u5E78\u3044\u306A\u3053\u3068\u306B\u3001mT5\u3084mBART\u306E\u3088\u3046\u306A\u591A\u8A00\u8A9ETransformer\u30E2\u30C7\u30EB\u3082\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u3089\u306E\u30E2\u30C7\u30EB\u306F\u8A00\u8A9E\u30E2\u30C7\u30EA\u30F3\u30B0\u3092\u4F7F\u3063\u3066\u4E8B\u524D\u306B\u5B66\u7FD2\u3055\u308C\u307E\u3059\u304C\u3001\u3072\u306D\u308A\u304C\u52A0\u3048\u3089\u308C\u3066\u3044\u307E\u3059\u30021\u3064\u306E\u8A00\u8A9E\u306E\u30B3\u30FC\u30D1\u30B9\u3067\u5B66\u7FD2\u3059\u308B\u306E\u3067\u306F\u306A\u304F\u300150\u4EE5\u4E0A\u306E\u8A00\u8A9E\u306E\u30C6\u30AD\u30B9\u30C8\u3067\u4E00\u5EA6\u306B\u5171\u540C\u5B66\u7FD2\u3057\u3066\u3044\u308B\u306E\u3067\u3059\uFF01"),uo=c(),gn=n("p"),Gi=t("\u3053\u3053\u3067\u306F\u3001T5\u3092\u30D9\u30FC\u30B9\u306B\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u30C6\u30AD\u30B9\u30C8\u3078\u306E\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u3067\u4E8B\u524D\u5B66\u7FD2\u3055\u308C\u305F\u8208\u5473\u6DF1\u3044\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3067\u3042\u308BmT5\u306B\u7126\u70B9\u3092\u5F53\u3066\u307E\u3059\u3002T5\u3067\u306F\u3001\u3059\u3079\u3066\u306E\u81EA\u7136\u8A00\u8A9E\u51E6\u7406\u30BF\u30B9\u30AF\u306F\u300C\u8981\u7D04\uFF1A\u300D\u306E\u3088\u3046\u306A\u30D7\u30ED\u30F3\u30D7\u30C8\u63A5\u982D\u8F9E\u3067\u5B9A\u5F0F\u5316\u3055\u308C\u3001\u751F\u6210\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u3092\u30D7\u30ED\u30F3\u30D7\u30C8\u306B\u9069\u5FDC\u3055\u305B\u308B\u3088\u3046\u30E2\u30C7\u30EB\u306B\u6761\u4EF6\u4ED8\u3051\u3055\u308C\u307E\u3059\u3002\u4E0B\u56F3\u306B\u793A\u3059\u3088\u3046\u306B\u3001T5\u306F\u975E\u5E38\u306B\u6C4E\u7528\u6027\u304C\u9AD8\u304F\u30011\u3064\u306E\u30E2\u30C7\u30EB\u3067\u591A\u304F\u306E\u30BF\u30B9\u30AF\u3092\u89E3\u6C7A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF01"),ho=c(),Ba=n("div"),Zt=n("img"),Ui=c(),Qt=n("img"),fo=c(),jn=n("p"),Mi=t("mT5\u306F\u63A5\u982D\u8F9E\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093\u304C\u3001T5\u306E\u591A\u7528\u9014\u6027\u3092\u5171\u6709\u3057\u3001\u591A\u8A00\u8A9E\u3067\u3042\u308B\u3068\u3044\u3046\u5229\u70B9\u304C\u3042\u308A\u307E\u3059\u3002\u3055\u3066\u3001\u30E2\u30C7\u30EB\u3092\u9078\u3093\u3060\u3068\u3053\u308D\u3067\u3001\u5B66\u7FD2\u7528\u306E\u30C7\u30FC\u30BF\u306E\u6E96\u5099\u306B\u53D6\u308A\u304B\u304B\u308A\u307E\u3057\u3087\u3046\u3002"),_o=c(),k(mt.$$.fragment),bo=c(),sl=n("h2"),Ni=t("\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406"),go=c(),k(el.$$.fragment),jo=c(),ct=n("p"),Fi=t("\u6B21\u306E\u30BF\u30B9\u30AF\u306F\u30EC\u30D3\u30E5\u30FC\u3068\u305D\u306E\u30BF\u30A4\u30C8\u30EB\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3057\u30A8\u30F3\u30B3\u30FC\u30C9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001\u4E8B\u524D\u306B\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u304B\u3089\u59CB\u3081\u307E\u3059\u3002\u3053\u3053\u3067\u306F\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3068\u3057\u3066 "),cr=n("code"),Hi=t("mt5-small"),Bi=t(" \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),vo=c(),k(al.$$.fragment),$o=c(),k(ut.$$.fragment),ko=c(),vn=n("p"),Wi=t("\u5C11\u91CF\u306E\u30B5\u30F3\u30D7\u30EB\u3067mT5\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u30C6\u30B9\u30C8\u3057\u3066\u307F\u307E\u3057\u3087\u3046"),wo=c(),k(tl.$$.fragment),Eo=c(),k(ll.$$.fragment),yo=c(),ce=n("p"),Ki=t("\u3053\u3053\u3067\u3001"),$n=n("a"),Vi=t("\u7B2C3\u7AE0"),Yi=t(" \u306E\u6700\u521D\u306E\u5FAE\u8ABF\u6574\u306E\u5B9F\u9A13\u3067\u906D\u9047\u3057\u305F\u3001\u304A\u306A\u3058\u307F\u306E "),ur=n("code"),Ji=t("input_ids"),Xi=t(" \u3068 "),dr=n("code"),Zi=t("attention_mask"),Qi=t(" \u3092\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u3089\u306E\u5165\u529BID\u3092\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306E "),hr=n("code"),sm=t("convert_ids_to_tokens()"),em=t(" \u95A2\u6570\u3067\u30C7\u30B3\u30FC\u30C9\u3057\u3066\u3001\u3069\u306E\u3088\u3046\u306A\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306A\u306E\u304B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),xo=c(),k(nl.$$.fragment),qo=c(),k(rl.$$.fragment),To=c(),Re=n("p"),am=t("Unicode\u306E\u7279\u6B8A\u6587\u5B57 "),fr=n("code"),tm=t("\u2581"),lm=t(" \u3068\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u7D42\u308F\u308A\u3092\u610F\u5473\u3059\u308B\u30C8\u30FC\u30AF\u30F3 "),_r=n("code"),nm=t("</s>"),rm=t(" \u306F\u3001SentencePiece\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u6271\u3063\u3066\u3044\u308B\u3053\u3068\u3092\u793A\u3057\u3066\u3044\u307E\u3059\u3002\u3053\u308C\u306F "),kn=n("a"),om=t("\u7B2C6\u7AE0"),pm=t(" \u3067\u8AAC\u660E\u3057\u305F\u30E6\u30CB\u30B0\u30E9\u30E0\u30BB\u30B0\u30E1\u30F3\u30C8\u5316\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u306B\u57FA\u3065\u3044\u3066\u3044\u307E\u3059\u3002\u30E6\u30CB\u30B0\u30E9\u30E0\u306F\u591A\u8A00\u8A9E\u30B3\u30FC\u30D1\u30B9\u306B\u7279\u306B\u6709\u52B9\u3067\u3059\u3002\u30E6\u30CB\u30B0\u30E9\u30E0\u306B\u3088\u308ASentencePiece\u306F\u53E3\u8ABF\u3001\u53E5\u8AAD\u70B9\u3001\u7A7A\u767D\u306A\u3069\u306B\u4F9D\u5B58\u3057\u306A\u304F\u306A\u308B\u306E\u3067\u3001\u65E5\u672C\u8A9E\u306E\u3088\u3046\u306B\u7A7A\u767D\u6587\u5B57\u3092\u6301\u305F\u306A\u3044\u591A\u304F\u306E\u8A00\u8A9E\u306B\u5BFE\u3057\u3066\u52B9\u679C\u7684\u306B\u306A\u308A\u307E\u3059\u3002"),Do=c(),dt=n("p"),im=t("\u3053\u306E\u30B3\u30FC\u30D1\u30B9\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u305F\u3081\u306B\u3001\u8981\u7D04\u306B\u95A2\u9023\u3059\u308B\u4E9B\u7D30\u306A\u554F\u984C\u306B\u5BFE\u51E6\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30E9\u30D9\u30EB\u3082\u30C6\u30AD\u30B9\u30C8\u306A\u306E\u3067\u3001\u30E2\u30C7\u30EB\u306E\u6700\u5927\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B5\u30A4\u30BA\u3092\u8D85\u3048\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u30EC\u30D3\u30E5\u30FC\u3068\u305D\u306E\u30BF\u30A4\u30C8\u30EB\u306E\u4E21\u65B9\u306B\u5207\u308A\u8A70\u3081\u3092\u9069\u7528\u3057\u3066\u3001\u904E\u5EA6\u306B\u9577\u3044\u5165\u529B\u3092\u30E2\u30C7\u30EB\u306B\u6E21\u3055\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u3092\u610F\u5473\u3057\u307E\u3059\u3002\u{1F917} Transformers \u306E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306F\u3001\u5165\u529B\u3068\u4E26\u884C\u3057\u3066\u30E9\u30D9\u30EB\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u4FBF\u5229\u306A "),br=n("code"),mm=t("as_target_tokenizer()"),cm=t(" \u95A2\u6570\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u901A\u5E38\u3001\u307E\u305A\u5165\u529B\u3092\u30A8\u30F3\u30B3\u30FC\u30C9\u3057\u3001\u6B21\u306B\u30E9\u30D9\u30EB\u3092\u5225\u306E\u5217\u3068\u3057\u3066\u30A8\u30F3\u30B3\u30FC\u30C9\u3059\u308B\u524D\u51E6\u7406\u95A2\u6570\u306E\u5185\u90E8\u3067\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC\u3092\u4F7F\u7528\u3057\u3066\u884C\u308F\u308C\u307E\u3059\u3002"),zo=c(),wn=n("p"),um=t("\u4EE5\u4E0B\u306F\u3001mT5 \u7528\u306E\u305D\u306E\u3088\u3046\u306A\u95A2\u6570\u306E\u4F8B\u3067\u3059\u3002"),Oo=c(),k(ol.$$.fragment),So=c(),ue=n("p"),dm=t("\u4F55\u304C\u8D77\u3053\u3063\u3066\u3044\u308B\u306E\u304B\u7406\u89E3\u3059\u308B\u305F\u3081\u306B\u3001\u3053\u306E\u30B3\u30FC\u30C9\u3092\u898B\u3066\u3044\u304D\u307E\u3057\u3087\u3046\u3002\u307E\u305A\u6700\u521D\u306B\u3001"),gr=n("code"),hm=t("max_input_length"),fm=t("\u3068"),jr=n("code"),_m=t("max_target_length"),bm=t("\u306E\u5024\u3092\u5B9A\u7FA9\u3057\u307E\u3057\u305F\u3002\u3053\u308C\u306F\u30EC\u30D3\u30E5\u30FC\u3068\u30BF\u30A4\u30C8\u30EB\u306E\u9577\u3055\u306E\u4E0A\u9650\u3092\u8A2D\u5B9A\u3059\u308B\u3082\u306E\u3067\u3059\u3002\u901A\u5E38\u3001\u30EC\u30D3\u30E5\u30FC\u306E\u672C\u6587\u306F\u30BF\u30A4\u30C8\u30EB\u3088\u308A\u3082\u306F\u308B\u304B\u306B\u5927\u304D\u3044\u306E\u3067\u3001\u3053\u308C\u3089\u306E\u5024\u3092\u9069\u5B9C\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3057\u3066\u3044\u307E\u3059\u3002\u6B21\u306B\u3001"),vr=n("code"),gm=t("preprocess_function()"),jm=t(" \u81EA\u8EAB\u3067\u3001\u30EC\u30D3\u30E5\u30FC\u304C\u6700\u521D\u306B\u30C8\u30FC\u30AF\u30F3\u5316\u3055\u308C\u3001\u6B21\u306B "),$r=n("code"),vm=t("as_target_tokenizer()"),$m=t(" \u3067\u30BF\u30A4\u30C8\u30EB\u304C\u30C8\u30FC\u30AF\u30F3\u5316\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002"),Co=c(),Wa=n("p"),kr=n("code"),km=t("preprocess_function()"),wm=t(" \u304C\u3042\u308C\u3070\u3001\u3042\u3068\u306F\u3053\u306E\u30B3\u30FC\u30B9\u3067\u6563\u3005\u4F7F\u3063\u3066\u304D\u305F\u4FBF\u5229\u306A "),wr=n("code"),Em=t("Dataset.map()"),ym=t(" \u95A2\u6570\u3092\u4F7F\u3063\u3066\u30B3\u30FC\u30D1\u30B9\u5168\u4F53\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u306E\u306F\u7C21\u5358\u306A\u3053\u3068\u3067\u3059\u3002"),Po=c(),k(pl.$$.fragment),Ao=c(),En=n("p"),xm=t("\u3055\u3066\u3001\u30B3\u30FC\u30D1\u30B9\u306E\u524D\u51E6\u7406\u304C\u7D42\u308F\u3063\u305F\u3068\u3053\u308D\u3067\u3001\u8981\u7D04\u306B\u3088\u304F\u4F7F\u308F\u308C\u308B\u3044\u304F\u3064\u304B\u306E\u6307\u6A19\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u3053\u308C\u304B\u3089\u898B\u308B\u3088\u3046\u306B\u3001\u6A5F\u68B0\u304C\u751F\u6210\u3057\u305F\u6587\u7AE0\u306E\u54C1\u8CEA\u3092\u6E2C\u308B\u969B\u306B\u3001\u4E07\u80FD\u306E\u624B\u6CD5\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002"),Ro=c(),k(ht.$$.fragment),Lo=c(),il=n("h2"),qm=t("\u6587\u7AE0\u8981\u7D04\u306E\u305F\u3081\u306E\u6307\u6A19"),Io=c(),k(ml.$$.fragment),Go=c(),yn=n("p"),Tm=t("\u3053\u306E\u30B3\u30FC\u30B9\u3067\u53D6\u308A\u4E0A\u3052\u305F\u4ED6\u306E\u307B\u3068\u3093\u3069\u306E\u30BF\u30B9\u30AF\u3068\u6BD4\u8F03\u3057\u3066\u3001\u8981\u7D04\u3084\u7FFB\u8A33\u306E\u3088\u3046\u306A\u30C6\u30AD\u30B9\u30C8\u751F\u6210\u30BF\u30B9\u30AF\u306E\u6027\u80FD\u6E2C\u5B9A\u306F\u305D\u308C\u307B\u3069\u7C21\u5358\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u4F8B\u3048\u3070\u3001\u300C\u30CF\u30F3\u30AC\u30FC\u30B2\u30FC\u30E0\u3092\u8AAD\u3080\u306E\u304C\u597D\u304D\u3060\u300D\u3068\u3044\u3046\u30EC\u30D3\u30E5\u30FC\u304C\u3042\u3063\u305F\u3068\u3057\u3066\u3001\u300C\u30CF\u30F3\u30AC\u30FC\u30B2\u30FC\u30E0\u304C\u5927\u597D\u304D\u3060\u300D\u300C\u30CF\u30F3\u30AC\u30FC\u30B2\u30FC\u30E0\u306F\u7D20\u6674\u3089\u3057\u3044\u8AAD\u307F\u7269\u3060\u300D\u306A\u3069\u3001\u6709\u52B9\u306A\u8981\u7D04\u304C\u8907\u6570\u5B58\u5728\u3057\u307E\u3059\u3002\u660E\u3089\u304B\u306B\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3068\u30E9\u30D9\u30EB\u306E\u9593\u306B\u3042\u308B\u7A2E\u306E\u5B8C\u5168\u306A\u4E00\u81F4\u3092\u9069\u7528\u3059\u308B\u3053\u3068\u306F\u826F\u3044\u89E3\u6C7A\u7B56\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u79C1\u305F\u3061\u306F\u7686\u3001\u72EC\u81EA\u306E\u6587\u4F53\u3092\u6301\u3063\u3066\u3044\u308B\u306E\u3067\u3001\u305D\u306E\u3088\u3046\u306A\u6E2C\u5B9A\u6307\u6A19\u3092\u7528\u3044\u3066\u306F\u4EBA\u9593\u3067\u3055\u3048\u3046\u307E\u304F\u3044\u304B\u306A\u3044\u3067\u3057\u3087\u3046\u3002"),Uo=c(),ft=n("p"),Dm=t("\u8981\u7D04\u306E\u305F\u3081\u306B\u3001\u6700\u3082\u3088\u304F\u4F7F\u308F\u308C\u308B\u6307\u6A19\u306E1\u3064\u304C"),cl=n("a"),zm=t("ROUGE score"),Om=t(" (Recall-Oriented Understudy for Gisting Evaluation\u306E\u7565)\u3067\u3059\u3002\u3053\u306E\u6307\u6A19\u306E\u80CC\u5F8C\u306B\u3042\u308B\u57FA\u672C\u7684\u306A\u8003\u3048\u65B9\u306F\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3092\u3001\u901A\u5E38\u4EBA\u9593\u304C\u4F5C\u6210\u3059\u308B\u3057\u305F\u53C2\u7167\u8981\u7D04\u306E\u30BB\u30C3\u30C8\u3068\u6BD4\u8F03\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u3053\u308C\u3092\u3088\u308A\u6B63\u78BA\u306B\u3059\u308B\u305F\u3081\u306B\u3001\u6B21\u306E2\u3064\u306E\u8981\u7D04\u3092\u6BD4\u8F03\u3057\u305F\u3044\u3068\u3057\u307E\u3059\u3002"),Mo=c(),k(ul.$$.fragment),No=c(),ka=n("p"),Sm=t("\u6BD4\u8F03\u3059\u308B\u4E00\u3064\u306E\u65B9\u6CD5\u3068\u3057\u3066\u3001\u91CD\u8907\u3057\u3066\u3044\u308B\u5358\u8A9E\u306E\u6570\u3092\u6570\u3048\u308B\u3053\u3068\u304C\u8003\u3048\u3089\u308C\u307E\u3059\u304C\u3001\u3053\u306E\u5834\u5408\u30016\u500B\u3068\u306A\u308A\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u3053\u308C\u306F\u5C11\u3057\u7C97\u3044\u306E\u3067\u3001\u4EE3\u308F\u308A\u306BROUGE\u306F\u91CD\u306A\u308A\u5408\u3063\u305F\u90E8\u5206\u306E "),Er=n("em"),Cm=t("\u9069\u5408\u7387"),Pm=t(" \u3068 "),yr=n("em"),Am=t("\u518D\u73FE\u7387"),Rm=t(" \u306E\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u3053\u3068\u3092\u57FA\u672C\u3068\u3057\u3066\u3044\u307E\u3059\u3002"),Fo=c(),k(_t.$$.fragment),Ho=c(),dl=n("p"),Lm=t(`ROUGE\u3067\u306F\u3001\u751F\u6210\u3057\u305F\u8981\u7D04\u306B\u53C2\u7167\u5143\u306E\u8981\u7D04\u304C\u3069\u308C\u3060\u3051\u53D6\u308A\u8FBC\u307E\u308C\u305F\u304B\u3092\u518D\u73FE\u7387\u3067\u6E2C\u5B9A\u3057\u307E\u3059\u3002\u5358\u8A9E\u3092\u6BD4\u8F03\u3059\u308B\u3060\u3051\u3067\u3042\u308C\u3070\u3001\u4EE5\u4E0B\u306E\u5F0F\u306B\u3088\u3063\u3066\u518D\u73FE\u7387\u3092\u8A08\u7B97\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002
`),Bo=new ef,Wo=c(),hl=n("p"),Im=t(`\u4E0A\u8A18\u306E\u7C21\u5358\u306A\u4F8B\u3067\u306F\u3001\u3053\u306E\u5F0F\u306F6/6 = 1\u306E\u5B8C\u5168\u306A\u518D\u73FE\u7387\u3092\u4E0E\u3048\u307E\u3059\u3002\u3064\u307E\u308A\u3001\u53C2\u7167\u8981\u7D04\u306E\u3059\u3079\u3066\u306E\u5358\u8A9E\u304C\u30E2\u30C7\u30EB\u306B\u3088\u3063\u3066\u751F\u6210\u3055\u308C\u305F\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u7D20\u6674\u3089\u3057\u3044\u3053\u3068\u3060\u3068\u601D\u3046\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u304C\u3001\u3082\u3057\u79C1\u9054\u306E\u30E2\u30C7\u30EB\u304C\u751F\u6210\u3057\u305F\u8981\u7D04\u304C\u300C\u30CF\u30F3\u30AC\u30FC\u30B2\u30FC\u30E0\u3092\u4E00\u6669\u4E2D\u8AAD\u3080\u306E\u304C\u672C\u5F53\u306B\u672C\u5F53\u306B\u597D\u304D\u3060\u3063\u305F\u300D\u3067\u3042\u3063\u305F\u3068\u3057\u305F\u3089\u3069\u3046\u3067\u3057\u3087\u3046\u3002\u3053\u306E\u5834\u5408\u3082\u5B8C\u74A7\u306A\u518D\u73FE\u7387\u304C\u5F97\u3089\u308C\u307E\u3059\u304C\u3001\u5197\u9577\u3067\u3042\u308B\u305F\u3081\u3001\u9593\u9055\u3044\u306A\u304F\u3088\u308A\u60AA\u3044\u8981\u7D04\u3068\u306A\u308A\u307E\u3059\u3002\u3053\u306E\u3088\u3046\u306A\u30B7\u30CA\u30EA\u30AA\u306B\u5BFE\u51E6\u3059\u308B\u305F\u3081\u306B\u3001\u6211\u3005\u306F\u79C1\u9054\u306F\u9069\u5408\u7387\u3082\u8A08\u7B97\u3057\u307E\u3059\u3002\u3053\u308C\u306FROUGE\u306E\u6587\u8108\u306B\u304A\u3044\u3066\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u304C\u3069\u308C\u3060\u3051\u95A2\u9023\u3057\u3066\u3044\u305F\u304B\u3092\u6E2C\u5B9A\u3059\u308B\u3082\u306E\u3067\u3059\u3002
`),Ko=new ef,Vo=c(),bt=n("p"),Gm=t("\u3053\u308C\u3092\u5197\u9577\u306A\u8981\u7D04\u306B\u9069\u7528\u3059\u308B\u3068\u3001\u9069\u5408\u7387\u306F6/10 = 0.6\u3068\u306A\u308A\u3001\u77ED\u3044\u8981\u7D04\u3067\u5F97\u3089\u308C\u305F6/7 = 0.86\u3088\u308A\u3082\u304B\u306A\u308A\u60AA\u304F\u306A\u308A\u307E\u3059\u3002\u5B9F\u969B\u306B\u306F\u3001\u901A\u5E38\u3001\u9069\u5408\u7387\u3068\u518D\u73FE\u7387\u306E\u4E21\u65B9\u304C\u8A08\u7B97\u3055\u308C\u3001\u305D\u3057\u3066\u3001F1\u30B9\u30B3\u30A2\uFF08\u7CBE\u5EA6\u3068\u30EA\u30B3\u30FC\u30EB\u306E\u8ABF\u548C\u5E73\u5747\uFF09\u304C\u5831\u544A\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u306F\u{1F917} Datasets\u3067\u3001\u307E\u305A "),xr=n("code"),Um=t("rouge_score"),Mm=t(" \u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u3053\u3068\u3067\u7C21\u5358\u306B\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Yo=c(),k(fl.$$.fragment),Jo=c(),xn=n("p"),Nm=t("\u305D\u3057\u3066\u3001ROUGE\u6307\u6A19\u3092\u8AAD\u307F\u8FBC\u307F\u307E\u3059\u3002"),Xo=c(),k(_l.$$.fragment),Zo=c(),gt=n("p"),Fm=t("\u305D\u3057\u3066\u3001"),qr=n("code"),Hm=t("rouge_score.compute()"),Bm=t("\u95A2\u6570\u3092\u4F7F\u3063\u3066\u3001\u3059\u3079\u3066\u306E\u6307\u6A19\u3092\u4E00\u5EA6\u306B\u8A08\u7B97\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Qo=c(),k(bl.$$.fragment),sp=c(),k(gl.$$.fragment),ep=c(),qn=n("p"),Wm=t("\u304A\u3063\u3068\u3001\u3053\u306E\u51FA\u529B\u306B\u306F\u591A\u304F\u306E\u60C5\u5831\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u306D\u3002"),ap=c(),Ks=n("p"),Km=t("\u3053\u308C\u306F\u5168\u3066\u4F55\u3092\u610F\u5473\u3059\u308B\u306E\u3067\u3057\u3087\u3046\u304B\uFF1F\u307E\u305A\u3001\u{1F917} Datasets\u306F\u9069\u5408\u7387\u3001\u518D\u73FE\u7387\u3001F1\u30B9\u30B3\u30A2\u306E\u4FE1\u983C\u533A\u9593\u3092\u8A08\u7B97\u3057\u307E\u3059\u3002\u3053\u308C\u3089\u306F\u3053\u3053\u306B\u8868\u793A\u3055\u308C\u3066\u3044\u308B "),Tr=n("code"),Vm=t("low"),Ym=t("\u3001"),Dr=n("code"),Jm=t("mid"),Xm=t("\u3001"),zr=n("code"),Zm=t("high"),Qm=t(" \u306E\u5C5E\u6027\u3067\u3059\u3002\u3055\u3089\u306B\u3001\u{1F917} Datasets\u306F\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3068\u53C2\u7167\u3055\u308C\u305F\u8981\u7D04\u3092\u6BD4\u8F03\u3059\u308B\u969B\u306B\u3001\u7570\u306A\u308B\u30BF\u30A4\u30D7\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u7C92\u5EA6\u306B\u57FA\u3065\u3044\u305F\u69D8\u3005\u306AROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3057\u307E\u3059\u3002"),Or=n("code"),sc=t("rouge1"),ec=t("\u306E\u30D0\u30EA\u30A8\u30FC\u30B7\u30E7\u30F3\u306F\u30E6\u30CB\u30B0\u30E9\u30E0\u306E\u91CD\u306A\u308A\u5177\u5408\u3067\u3059\u3002\u3053\u308C\u306F\u5358\u8A9E\u306E\u30AA\u30FC\u30D0\u30FC\u30E9\u30C3\u30D7\u3092\u8A00\u3044\u63DB\u3048\u305F\u3060\u3051\u306E\u3082\u306E\u3067\u3001\u307E\u3055\u306B\u4E0A\u3067\u8AAC\u660E\u3057\u305F\u3088\u3046\u306A\u6307\u6A19\u3067\u3059\u3002\u3053\u308C\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306B\u3001\u30B9\u30B3\u30A2\u306E "),Sr=n("code"),ac=t("mid"),tc=t(" \u5024\u3092\u5F15\u304D\u51FA\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),tp=c(),k(jl.$$.fragment),lp=c(),k(vl.$$.fragment),np=c(),Vs=n("p"),lc=t(`\u7D20\u6674\u3089\u3057\u3044\uFF01\u9069\u5408\u7387\u3068\u518D\u73FE\u7387\u306E\u6570\u5024\u304C\u4E00\u81F4\u3057\u307E\u3057\u305F\u3002\u3067\u306F\u3001\u4ED6\u306EROUGE\u30B9\u30B3\u30A2\u306B\u3064\u3044\u3066\u306F\u3069\u3046\u3067\u3057\u3087\u3046\u304B\uFF1F
`),Cr=n("code"),nc=t("rouge2"),rc=t(" \u306F\u30D3\u30C3\u30B0\u30E9\u30E0\uFF08\u5358\u8A9E\u306E\u30DA\u30A2\u306E\u91CD\u306A\u308A\uFF09\u306E\u91CD\u306A\u308A\u3092\u6E2C\u5B9A\u3057\u3001 "),Pr=n("code"),oc=t("rougeL"),pc=t(" \u3068 "),Ar=n("code"),ic=t("rougeLsum"),mc=t(" \u306F\u751F\u6210\u3055\u308C\u305F\u30B5\u30DE\u30EA\u30FC\u3068\u53C2\u7167\u30B5\u30DE\u30EA\u30FC\u3067\u6700\u3082\u9577\u3044\u5171\u901A\u90E8\u5206\u6587\u5B57\u5217\u3092\u63A2\u3057\u3066\u3001\u6700\u3082\u9577\u304F\u30DE\u30C3\u30C1\u3059\u308B\u5358\u8A9E\u5217\u3092\u6E2C\u5B9A\u3057\u307E\u3059\u3002"),Rr=n("code"),cc=t("rougeLsum"),uc=t(" \u306E \u201Csum\u201D \u306F\u3001 "),Lr=n("code"),dc=t("rougeL"),hc=t(" \u304C\u500B\u3005\u306E\u6587\u306E\u5E73\u5747\u5024\u3068\u3057\u3066\u8A08\u7B97\u3055\u308C\u308B\u306E\u306B\u5BFE\u3057\u3001\u3053\u306E\u6307\u6A19\u306F\u8981\u7D04\u5168\u4F53\u306B\u5BFE\u3057\u3066\u8A08\u7B97\u3055\u308C\u308B\u3068\u3044\u3046\u4E8B\u5B9F\u3092\u8868\u3057\u3066\u3044\u308B\u3002"),rp=c(),k(jt.$$.fragment),op=c(),Tn=n("p"),fc=t("\u3053\u306EROUGE\u30B9\u30B3\u30A2\u3092\u4F7F\u3063\u3066\u30E2\u30C7\u30EB\u306E\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u3092\u8FFD\u8DE1\u3057\u3066\u3044\u304D\u307E\u3059\u304C\u3001\u305D\u306E\u524D\u306B\u512A\u308C\u305FNLP\u5B9F\u8DF5\u8005\u304C\u3059\u3079\u304D\u3053\u3068\u3001\u305D\u308C\u306F\u5F37\u529B\u304B\u3064\u30B7\u30F3\u30D7\u30EB\u306A\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u3092\u4F5C\u6210\u3059\u308B\u3053\u3068\u3067\u3059\u3002"),pp=c(),$l=n("h3"),_c=t("\u5F37\u529B\u306A\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u306E\u4F5C\u6210"),ip=c(),Le=n("p"),bc=t("\u30C6\u30AD\u30B9\u30C8\u8981\u7D04\u306E\u4E00\u822C\u7684\u306A\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u306F\u3001\u5358\u7D14\u306B\u8A18\u4E8B\u306E\u6700\u521D\u306E3\u3064\u306E\u30BB\u30F3\u30C6\u30F3\u30B9\u3092\u53D6\u308B\u3053\u3068\u3067\u3001\u3057\u3070\u3057\u3070 "),Ir=n("em"),gc=t("lead-3"),jc=t(" \u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u3068\u547C\u3070\u308C\u307E\u3059\u3002\u6587\u306E\u5883\u754C\u3092\u8FFD\u8DE1\u3059\u308B\u305F\u3081\u306B\u30D4\u30EA\u30AA\u30C9\u3092\u4F7F\u3046\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u304C\u3001\u3053\u306E\u3084\u308A\u65B9\u306F \u201CU.S.\u201D \u3084 \u201CU.N.\u201D \u306E\u3088\u3046\u306A\u982D\u5B57\u8A9E\u3067\u306F\u5931\u6557\u3057\u307E\u3059\u3002\u305D\u3053\u3067\u3001\u3053\u306E\u3088\u3046\u306A\u30B1\u30FC\u30B9\u3092\u51E6\u7406\u3059\u308B\u305F\u3081\u306E\u512A\u308C\u305F\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u542B\u3080 "),Gr=n("code"),vc=t("nltk"),$c=t(" \u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002\u3053\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306F\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306B "),Ur=n("code"),kc=t("pip"),wc=t(" \u3092\u7528\u3044\u3066\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),mp=c(),k(kl.$$.fragment),cp=c(),Dn=n("p"),Ec=t("\u305D\u3057\u3066\u3001\u53E5\u8AAD\u70B9\u898F\u5247\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),up=c(),k(wl.$$.fragment),dp=c(),vt=n("p"),yc=t("\u6B21\u306B\u3001"),Mr=n("code"),xc=t("nltk"),qc=t("\u304B\u3089\u30BB\u30F3\u30C6\u30F3\u30B9\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u3001\u30EC\u30D3\u30E5\u30FC\u306E\u6700\u521D\u306E3\u6587\u3092\u62BD\u51FA\u3059\u308B\u7C21\u5358\u306A\u95A2\u6570\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u30C6\u30AD\u30B9\u30C8\u306E\u8981\u7D04\u3067\u306F\u3001\u5404\u8981\u7D04\u3092\u6539\u884C\u3067\u533A\u5207\u308B\u306E\u304C\u6163\u4F8B\u306A\u306E\u3067\u3001\u3053\u308C\u3082\u542B\u3081\u3066\u5B66\u7FD2\u4F8B\u3067\u30C6\u30B9\u30C8\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),hp=c(),k(El.$$.fragment),fp=c(),k(yl.$$.fragment),_p=c(),zn=n("p"),Tc=t("\u3053\u308C\u306F\u3046\u307E\u304F\u3044\u304D\u305D\u3046\u306A\u306E\u3067\u3001\u4ECA\u5EA6\u306F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304B\u3089\u3053\u308C\u3089\u306E\u300C\u8981\u7D04\u300D\u3092\u62BD\u51FA\u3057\u3001\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u306EROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u95A2\u6570\u3092\u5B9F\u88C5\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),bp=c(),k(xl.$$.fragment),gp=c(),On=n("p"),Dc=t("\u305D\u3057\u3066\u3001\u3053\u306E\u95A2\u6570\u3092\u4F7F\u3063\u3066\u691C\u8A3C\u30BB\u30C3\u30C8\u306EROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3057\u3001Pandas\u3092\u4F7F\u3063\u3066\u5C11\u3057\u304D\u308C\u3044\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),jp=c(),k(ql.$$.fragment),vp=c(),k(Tl.$$.fragment),$p=c(),Sn=n("p"),zc=t("rouge2`\u306E\u30B9\u30B3\u30A2\u304C\u4ED6\u3088\u308A\u304B\u306A\u308A\u4F4E\u3044\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u30EC\u30D3\u30E5\u30FC\u306E\u30BF\u30A4\u30C8\u30EB\u304C\u4E00\u822C\u7684\u306B\u7C21\u6F54\u3067\u3042\u308B\u305F\u3081\u3001lead-3\u306E\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u304C\u5197\u9577\u3059\u304E\u308B\u3068\u3044\u3046\u4E8B\u5B9F\u3092\u53CD\u6620\u3057\u3066\u3044\u308B\u3068\u601D\u308F\u308C\u307E\u3059\u3002\u3053\u308C\u3067\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u304C\u3067\u304D\u305F\u306E\u3067\u3001\u6B21\u306FmT5\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3044\u307E\u3059\uFF01"),kp=c(),ra.c(),Cn=c(),k($t.$$.fragment),wp=c(),Pn=n("p"),Oc=t("\u6B21\u306B\u5FC5\u8981\u306A\u306E\u306F\u3001\u30CF\u30F3\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6\u306B\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u3053\u306E\u30B3\u30FC\u30C9\u3092\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067\u5B9F\u884C\u3059\u308B\u5834\u5408\u306F\u3001\u6B21\u306E\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u95A2\u6570\u3067\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002"),Ep=c(),k(Dl.$$.fragment),yp=c(),An=n("p"),Sc=t("\u3053\u308C\u306B\u3088\u308A\u3001\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u8868\u793A\u3055\u308C\u3001\u8A8D\u8A3C\u60C5\u5831\u3092\u5165\u529B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307E\u305F\u306F\u3001\u30BF\u30FC\u30DF\u30CA\u30EB\u3067\u4EE5\u4E0B\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u3057\u3001\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002"),xp=c(),k(zl.$$.fragment),qp=c(),Cs&&Cs.c(),Rn=c(),kt=n("p"),Cc=t("\u6B21\u306B\u3001\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF\u306E\u305F\u3081\u306E\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002mT5\u306F\u30A8\u30F3\u30B3\u30FC\u30C0\u30FB\u30C7\u30B3\u30FC\u30C0\u306ETransformer\u30E2\u30C7\u30EB\u306A\u306E\u3067\u3001\u30D0\u30C3\u30C1\u3092\u6E96\u5099\u3059\u308B\u969B\u306E\u4E00\u3064\u306E\u3061\u3087\u3063\u3068\u3057\u305F\u5DEE\u7570\u306F\u3001\u30C7\u30B3\u30FC\u30C9\u4E2D\u306B\u30E9\u30D9\u30EB\u3092\u53F3\u306B1\u3064\u30B7\u30D5\u30C8\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u3067\u3059\u3002\u3053\u308C\u306F\u3001\u30C7\u30B3\u30FC\u30C0\u304C\u4EE5\u524D\u306E\u771F\u5B9F\u306E\u30E9\u30D9\u30EB\u3057\u304B\u898B\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u305F\u3081\u3067\u3001\u73FE\u5728\u3084\u5C06\u6765\u306E\u30E9\u30D9\u30EB\u3092\u30E2\u30C7\u30EB\u306B\u8A18\u61B6\u3055\u305B\u306A\u3044\u3088\u3046\u306B\u3057\u3046\u307E\u3059\u3002\u3053\u308C\u306F"),Ln=n("a"),Pc=t("\u56E0\u679C\u8A00\u8A9E\u30E2\u30C7\u30EA\u30F3\u30B0"),Ac=t("\u306E\u3088\u3046\u306A\u30BF\u30B9\u30AF\u3067\u30DE\u30B9\u30AF\u3055\u308C\u305F\u81EA\u5DF1\u6CE8\u610F\u304C\u5165\u529B\u306B\u9069\u7528\u3055\u308C\u308B\u65B9\u6CD5\u306B\u4F3C\u3066\u3044\u307E\u3059\u3002"),Tp=c(),Ie=n("p"),Rc=t("\u5E78\u904B\u306A\u3053\u3068\u306B\u3001\u{1F917} Transformers \u306F "),Nr=n("code"),Lc=t("DataCollatorForSeq2Seq"),Ic=t(" \u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u63D0\u4F9B\u3057\u3001\u5165\u529B\u3068\u30E9\u30D9\u30EB\u3092\u52D5\u7684\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u3066\u304F\u308C\u307E\u3059\u3002\u3053\u306E\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3059\u308B\u306B\u306F\u3001\u5358\u306B "),Fr=n("code"),Gc=t("tokenizer"),Uc=t(" \u3068 "),Hr=n("code"),Mc=t("model"),Nc=t(" \u3092\u63D0\u4F9B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Dp=c(),pa.c(),In=c(),Gn=n("p"),Fc=t("\u305D\u308C\u3067\u306F\u3001\u3053\u306E\u30B3\u30EC\u30FC\u30BF\u30FC\u304C\u5C11\u91CF\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u30D0\u30C3\u30C1\u3067\u4E0E\u3048\u305F\u3068\u304D\u306B\u4F55\u3092\u751F\u6210\u3059\u308B\u304B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u307E\u305A\u3001\u6587\u5B57\u5217\u3092\u542B\u3080\u5217\u3092\u524A\u9664\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30B3\u30EC\u30FC\u30BF\u30FC\u306F\u3053\u308C\u3089\u306E\u8981\u7D20\u3092\u3069\u306E\u3088\u3046\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3059\u308B\u304B\u3092\u77E5\u3089\u306A\u3044\u304B\u3089\u3067\u3059\u3002"),zp=c(),k(Ol.$$.fragment),Op=c(),wa=n("p"),Hc=t("\u30B3\u30EC\u30FC\u30BF\u30FC \u306F "),Br=n("code"),Bc=t("dict"),Wc=t(" \u306E\u30EA\u30B9\u30C8\u3092\u53D7\u3051\u53D6\u308A\u3001\u5404 "),Wr=n("code"),Kc=t("dict"),Vc=t(" \u306F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u5185\u306E 1 \u3064\u306E\u4F8B\u3092\u8868\u3057\u3066\u3044\u308B\u4E8B\u3092\u671F\u5F85\u3057\u3066\u3044\u307E\u3059\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u30C7\u30FC\u30BF\u3092\u30B3\u30EC\u30FC\u30BF\u30FC\u306B\u6E21\u3059\u524D\u306B\u671F\u5F85\u901A\u308A\u306E\u5F62\u5F0F\u306B\u5909\u63DB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Sp=c(),k(Sl.$$.fragment),Cp=c(),k(Cl.$$.fragment),Pp=c(),xs=n("p"),Yc=t("\u3053\u3053\u3067\u6CE8\u76EE\u3059\u3079\u304D\u306F\u3001\u6700\u521D\u306E\u4F8B\u306F2\u756A\u76EE\u306E\u4F8B\u3088\u308A\u3082\u9577\u3044\u306E\u3067\u30012\u756A\u76EE\u306E\u4F8B\u306E "),Kr=n("code"),Jc=t("input_ids"),Xc=t(" \u3068 "),Vr=n("code"),Zc=t("attention_mask"),Qc=t(" \u306F\u53F3\u5074\u306B "),Yr=n("code"),su=t("[PAD]"),eu=t(" \u30C8\u30FC\u30AF\u30F3 (ID \u306F "),Jr=n("code"),au=t("0"),tu=t(") \u3067\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u3067\u3059\u3002\u540C\u69D8\u306B\u3001"),Xr=n("code"),lu=t("labels"),nu=t(" \u306F "),Zr=n("code"),ru=t("-100"),ou=t(" \u3067\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u304C\u640D\u5931\u95A2\u6570\u306B\u3088\u3063\u3066\u7121\u8996\u3055\u308C\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3067\u3059\u3002\u305D\u3057\u3066\u6700\u5F8C\u306B\u3001\u65B0\u3057\u3044 "),Qr=n("code"),pu=t("decoder_input_ids"),iu=t(" \u3092\u898B\u308B\u3068\u3001\u6700\u521D\u306E\u30A8\u30F3\u30C8\u30EA\u306B "),so=n("code"),mu=t("[PAD]"),cu=t(" \u30C8\u30FC\u30AF\u30F3\u3092\u633F\u5165\u3057\u3066\u30E9\u30D9\u30EB\u3092\u53F3\u306B\u30B7\u30D5\u30C8\u3057\u3066\u3044\u308B\u3053\u3068\u304C\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002"),Ap=c(),ma.c(),Un=c(),Ps&&Ps.c(),Mn=c(),Pl=n("h2"),uu=t("\u3042\u306A\u305F\u306E\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3059\u308B"),Rp=c(),wt=n("p"),du=t("\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3089\u3001\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304B "),eo=n("code"),hu=t("pipeline"),fu=t(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F7F\u3063\u3066\u3001\u6B21\u306E\u3088\u3046\u306B\u64CD\u4F5C\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Lp=c(),k(Al.$$.fragment),Ip=c(),Nn=n("p"),_u=t("\u8981\u7D04\u306E\u54C1\u8CEA\u306B\u3064\u3044\u3066\u611F\u89E6\u3092\u5F97\u308B\u305F\u3081\u306B\u3001\u30C6\u30B9\u30C8\u30BB\u30C3\u30C8\uFF08\u30E2\u30C7\u30EB\u306F\u898B\u305F\u4E8B\u304C\u306A\u3044\uFF09\u304B\u3089\u3044\u304F\u3064\u304B\u306E\u4F8B\u3092\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306B\u9001\u308A\u8FBC\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u6700\u521D\u306B\u3001\u30EC\u30D3\u30E5\u30FC\u3001\u30BF\u30A4\u30C8\u30EB\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3092\u4E00\u7DD2\u306B\u8868\u793A\u3059\u308B\u7C21\u5358\u306A\u95A2\u6570\u3092\u5B9F\u88C5\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Gp=c(),k(Rl.$$.fragment),Up=c(),Fn=n("p"),bu=t("\u82F1\u8A9E\u306E\u4F8B\u3092\u4E00\u3064\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Mp=c(),k(Ll.$$.fragment),Np=c(),k(Il.$$.fragment),Fp=c(),Hn=n("p"),gu=t("\u3053\u308C\u306F\u60AA\u304F\u3042\u308A\u307E\u305B\u3093! \u79C1\u305F\u3061\u306E\u30E2\u30C7\u30EB\u306F\u5B9F\u969B\u306B\u65B0\u3057\u3044\u5358\u8A9E\u3067\u30EC\u30D3\u30E5\u30FC\u306E\u4E00\u90E8\u3092\u88DC\u5F37\u3059\u308B\u3053\u3068\u306B\u3088\u3063\u3066\u3001\u62BD\u8C61\u7684\u306A\u8981\u7D04\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u305F\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u307E\u305F\u3001\u79C1\u305F\u3061\u306E\u30E2\u30C7\u30EB\u306E\u6700\u3082\u30AF\u30FC\u30EB\u306A\u70B9\u306F\u3001\u30D0\u30A4\u30EA\u30F3\u30AC\u30EB\u3067\u3042\u308B\u3053\u3068\u3067\u3059\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30EC\u30D3\u30E5\u30FC\u306E\u8981\u7D04\u3082\u751F\u6210\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Hp=c(),k(Gl.$$.fragment),Bp=c(),k(Ul.$$.fragment),Wp=c(),Bn=n("p"),ju=t("\u8981\u7D04\u306F\u82F1\u8A9E\u3067\u300CVery easy to read\u300D\u3068\u8A33\u3055\u308C\u3001\u3053\u306E\u8981\u7D04\u306E\u5834\u5408\u306F\u30EC\u30D3\u30E5\u30FC\u306E\u6587\u4E2D\u304B\u3089\u76F4\u63A5\u62BD\u51FA\u3055\u308C\u305F\u3053\u3068\u304C\u5206\u304B\u308A\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u3053\u308C\u306FmT5\u30E2\u30C7\u30EB\u306E\u591A\u7528\u9014\u6027\u3092\u793A\u3057\u3066\u304A\u308A\u3001\u591A\u8A00\u8A9E\u30B3\u30FC\u30D1\u30B9\u3092\u6271\u3046\u3053\u3068\u304C\u3069\u306E\u3088\u3046\u306A\u3082\u306E\u304B\u3092\u4F53\u9A13\u3057\u3066\u3044\u305F\u3060\u3051\u305F\u3068\u601D\u3044\u307E\u3059\u3002"),Kp=c(),Wn=n("p"),vu=t("\u6B21\u306B\u3001\u3082\u3046\u5C11\u3057\u8907\u96D1\u306A\u30BF\u30B9\u30AF\u3067\u3042\u308B\u3001\u30BC\u30ED\u304B\u3089\u8A00\u8A9E\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3055\u305B\u308B\u4E8B\u306B\u76EE\u3092\u5411\u3051\u307E\u3059\u3002"),this.h()},l(s){const i=uf('[data-svelte="svelte-1phssyn"]',document.head);d=r(i,"META",{name:!0,content:!0}),i.forEach(a),j=u(s),w(h.$$.fragment,s),x=u(s),R=r(s,"H1",{id:!0});var ao=p(R);q=l(ao,"\u8981\u7D04"),ao.forEach(a),P=u(s),$.l(s),O=u(s),A=r(s,"P",{});var Et=p(A);C=l(Et,"\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u306F\u3001Transformer\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3057\u3066\u3001\u9577\u3044\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8981\u7D04\u3059\u308B\u65B9\u6CD5\u3092\u898B\u3066\u3044\u304D\u307E\u3059\u3002\u3053\u308C\u306F\u3001"),L=r(Et,"EM",{});var to=p(L);F=l(to,"\u6587\u7AE0\u8981\u7D04"),to.forEach(a),X=l(Et," \u3068\u3057\u3066\u77E5\u3089\u308C\u308B\u30BF\u30B9\u30AF\u3067\u3059\u3002 \u3053\u308C\u306F\u3001\u9577\u3044\u6587\u7AE0\u3092\u7406\u89E3\u3057\u305F\u308A\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u4E3B\u8981\u306A\u30C8\u30D4\u30C3\u30AF\u3092\u88DC\u8DB3\u3059\u308B\u4E00\u8CAB\u6027\u306E\u3042\u308B\u30C6\u30AD\u30B9\u30C8\u3092\u751F\u6210\u3057\u305F\u308A\u3059\u308B\u306A\u3069\u3001\u3055\u307E\u3056\u307E\u306A\u80FD\u529B\u3092\u5FC5\u8981\u3068\u3059\u308B\u305F\u3081\u3001\u6700\u3082\u56F0\u96E3\u306ANLP\u30BF\u30B9\u30AF\u306E1\u3064\u3067\u3059\u3002 \u305F\u3060\u3057\u3001\u30C6\u30AD\u30B9\u30C8\u306E\u8981\u7D04\u306F\u3001\u3046\u307E\u304F\u884C\u3051\u3070\u3001\u9818\u57DF\u306E\u5C02\u9580\u5BB6\u304C\u9577\u3044\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8A73\u7D30\u306B\u8AAD\u3080\u8CA0\u62C5\u3092\u8EFD\u6E1B\u3059\u308B\u3053\u3068\u3067\u3001\u3055\u307E\u3056\u307E\u306A\u30D3\u30B8\u30CD\u30B9\u30D7\u30ED\u30BB\u30B9\u3092\u30B9\u30D4\u30FC\u30C9\u30A2\u30C3\u30D7\u3067\u304D\u308B\u5F37\u529B\u306A\u30C4\u30FC\u30EB\u306B\u306A\u308A\u307E\u3059\u3002"),Et.forEach(a),Z=u(s),w(H.$$.fragment,s),M=u(s),W=r(s,"P",{});var yt=p(W);T=r(yt,"A",{href:!0,rel:!0});var lo=p(T);G=l(lo,"\u30CF\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6"),lo.forEach(a),rs=l(yt,"\u306B\u306F\u3001\u8981\u7D04\u7528\u306B\u5FAE\u8ABF\u6574\u3055\u308C\u305F\u3055\u307E\u3056\u307E\u306A\u30E2\u30C7\u30EB\u304C\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\u304C\u3001\u3053\u308C\u3089\u306E\u307B\u3068\u3093\u3069\u306F\u82F1\u8A9E\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306E\u307F\u9069\u3057\u3066\u3044\u307E\u3059\u3002 \u3057\u305F\u304C\u3063\u3066\u3001\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u3072\u306D\u308A\u3092\u52A0\u3048\u308B\u305F\u3081\u306B\u3001\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30D0\u30A4\u30EA\u30F3\u30AC\u30EB\u30E2\u30C7\u30EB\u3092\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3057\u307E\u3059\u3002 \u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u7D42\u308F\u308A\u307E\u3067\u306B\u3001\u3053\u3053\u306B\u793A\u3059\u3088\u3046\u306A\u30AB\u30B9\u30BF\u30DE\u30FC\u30EC\u30D3\u30E5\u30FC\u3092\u8981\u7D04\u3067\u304D\u308B"),ss=r(yt,"A",{href:!0,rel:!0});var no=p(ss);ls=l(no,"\u30E2\u30C7\u30EB"),no.forEach(a),Q=l(yt,"\u304C\u3067\u304D\u3042\u304C\u308A\u307E\u3059\u3002"),yt.forEach(a),Y=u(s),J=r(s,"IFRAME",{src:!0,frameborder:!0,height:!0,title:!0,class:!0,allow:!0,sandbox:!0}),p(J).forEach(a),$s=u(s),as=r(s,"P",{});var ro=p(as);Ds=l(ro,"\u3053\u308C\u304B\u3089\u8AAC\u660E\u3059\u308B\u3088\u3046\u306B\u3001\u3053\u308C\u3089\u306E\u8981\u7D04\u306F\u3001\u9867\u5BA2\u304C\u88FD\u54C1\u30EC\u30D3\u30E5\u30FC\u6295\u7A3F\u6642\u306B\u3064\u3051\u305F\u30BF\u30A4\u30C8\u30EB\u6587\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u7C21\u6F54\u3067\u3059\u3002 \u3053\u306E\u30BF\u30B9\u30AF\u306B\u9069\u3057\u305F\u591A\u8A00\u8A9E\u30B3\u30FC\u30D1\u30B9\u3092\u307E\u3068\u3081\u308B\u3053\u3068\u304B\u3089\u59CB\u3081\u307E\u3057\u3087\u3046\u3002"),ro.forEach(a),ms=u(s),K=r(s,"H2",{id:!0});var oo=p(K);os=l(oo,"\u591A\u8A00\u8A9E\u30B3\u30FC\u30D1\u30B9\u306E\u6E96\u5099"),oo.forEach(a),qs=u(s),ts=r(s,"P",{});var Bl=p(ts);cs=r(Bl,"A",{href:!0,rel:!0});var po=p(cs);gs=l(po,"Multilingual Amazon Reviews Corpus"),po.forEach(a),us=l(Bl,"\u3092\u4F7F\u7528\u3057\u3066\u3001\u591A\u8A00\u8A9E\u8981\u7D04\u5668\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u3053\u306E\u30B3\u30FC\u30D1\u30B9\u306F\u30016\u3064\u306E\u8A00\u8A9E\u3067\u306EAmazon\u88FD\u54C1\u30EC\u30D3\u30E5\u30FC\u3067\u69CB\u6210\u3055\u308C\u3066\u304A\u308A\u3001\u901A\u5E38\u3001\u591A\u8A00\u8A9E\u5206\u985E\u5B50\u306E\u30D9\u30F3\u30C1\u30DE\u30FC\u30AF\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002 \u305F\u3060\u3057\u3001\u5404\u30EC\u30D3\u30E5\u30FC\u306B\u306F\u77ED\u3044\u30BF\u30A4\u30C8\u30EB\u304C\u4ED8\u3044\u3066\u3044\u308B\u305F\u3081\u3001\u30E2\u30C7\u30EB\u304C\u5B66\u7FD2\u5BFE\u8C61\u3068\u3059\u308B\u8981\u7D04\u6587\u3068\u3057\u3066\u30BF\u30A4\u30C8\u30EB\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 \u958B\u59CB\u3059\u308B\u306B\u306F\u3001\u30CF\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6\u304B\u3089\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30B5\u30D6\u30BB\u30C3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u307E\u3057\u3087\u3046\u3002"),Bl.forEach(a),ds=u(s),w(ps.$$.fragment,s),ks=u(s),w(f.$$.fragment,s),U=u(s),V=r(s,"P",{});var Ls=p(V);g=l(Ls,"\u3054\u89A7\u306E\u901A\u308A\u3001\u5404\u8A00\u8A9E\u306E "),N=r(Ls,"CODE",{});var Kn=p(N);Ss=l(Kn,"train"),Kn.forEach(a),Ts=l(Ls," \u5206\u5272\u306B\u306F 200,000 \u4EF6\u306E\u30EC\u30D3\u30E5\u30FC\u304C\u3042\u308A\u3001 "),zs=r(Ls,"CODE",{});var Au=p(zs);_s=l(Au,"validation"),Au.forEach(a),hs=l(Ls," \u3068 "),js=r(Ls,"CODE",{});var Ru=p(js);Ys=l(Ru,"test"),Ru.forEach(a),is=l(Ls," \u5206\u5272\u306B\u306F\u305D\u308C\u305E\u308C 5,000 \u4EF6\u306E\u30EC\u30D3\u30E5\u30FC\u304C\u3042\u308A\u307E\u3059\u3002\u79C1\u9054\u304C\u5185\u5BB9\u3092\u77E5\u308A\u305F\u3044\u30EC\u30D3\u30E5\u30FC\u60C5\u5831\u306F "),Fs=r(Ls,"CODE",{});var Lu=p(Fs);Hs=l(Lu,"review_body"),Lu.forEach(a),$e=l(Ls," \u3068 "),Gs=r(Ls,"CODE",{});var Iu=p(Gs);le=l(Iu,"review_title"),Iu.forEach(a),Js=l(Ls," \u30AB\u30E9\u30E0\u306B\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002"),Xs=r(Ls,"A",{href:!0});var Gu=p(Xs);Bs=l(Gu,"\u7B2C5\u7AE0"),Gu.forEach(a),Fe=l(Ls," \u3067\u5B66\u3093\u3060\u624B\u6CD5\u3067\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u304B\u3089\u30E9\u30F3\u30C0\u30E0\u306B\u30B5\u30F3\u30D7\u30EB\u3092\u53D6\u5F97\u3059\u308B\u7C21\u5358\u306A\u95A2\u6570\u3092\u4F5C\u6210\u3057\u3001\u3044\u304F\u3064\u304B\u306E\u4F8B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Ls.forEach(a),de=u(s),w(vs.$$.fragment,s),ne=u(s),w(Zs.$$.fragment,s),he=u(s),w(Es.$$.fragment,s),fe=u(s),I=r(s,"P",{});var Vn=p(I);ns=l(Vn,"\u3053\u306E\u30B5\u30F3\u30D7\u30EB\u306F\u3001\u80AF\u5B9A\u7684\u306A\u30EC\u30D3\u30E5\u30FC\u304B\u3089\u5426\u5B9A\u7684\u306A\u30EC\u30D3\u30E5\u30FC\u307E\u3067\uFF08\u305D\u3057\u3066\u305D\u306E\u4E2D\u9593\u306B\u3042\u308B\u5168\u3066\u306E\u30EC\u30D3\u30E5\u30FC\uFF01\uFF09\u3001\u4E00\u822C\u7684\u306B\u30AA\u30F3\u30E9\u30A4\u30F3\u3067\u898B\u3089\u308C\u308B\u30EC\u30D3\u30E5\u30FC\u306E\u591A\u69D8\u6027\u3092\u793A\u3057\u3066\u3044\u307E\u3059\u3002 \u300Cmeh\u300D\u3068\u3044\u3046\u30BF\u30A4\u30C8\u30EB\u306F\u3042\u307E\u308A\u6709\u76CA\u306A\u60C5\u5831\u3092\u793A\u3059\u30BF\u30A4\u30C8\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001\u4ED6\u306E\u30BF\u30A4\u30C8\u30EB\u306F\u30EC\u30D3\u30E5\u30FC\u81EA\u4F53\u306E\u9069\u5207\u306A\u8981\u7D04\u306E\u3088\u3046\u306B\u898B\u3048\u307E\u3059\u300240\u4E07\u4EF6\u306E\u30EC\u30D3\u30E5\u30FC\u3059\u3079\u3066\u306B\u3064\u3044\u3066\u8981\u7D04\u30E2\u30C7\u30EB\u3092\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3059\u308B\u3053\u3068\u306F\u3001\u5358\u4E00\u306EGPU\u3067\u306F\u3042\u307E\u308A\u306B\u3082\u6642\u9593\u304C\u304B\u304B\u308A\u3059\u304E\u308B\u305F\u3081\u3001\u305D\u306E\u4EE3\u308F\u308A\u306B\u3001\u5358\u4E00\u88FD\u54C1\u306E\u30C9\u30E1\u30A4\u30F3\u306B\u3064\u3044\u3066\u8981\u7D04\u3092\u751F\u6210\u3059\u308B\u3053\u3068\u306B\u7126\u70B9\u3092\u5F53\u3066\u307E\u3059\u3002\u3069\u306E\u3088\u3046\u306A\u30C9\u30E1\u30A4\u30F3\u304B\u3089\u9078\u629E\u3067\u304D\u308B\u304B\u3092\u77E5\u308B\u305F\u3081\u306B\u3001"),ke=r(Vn,"CODE",{});var Uu=p(ke);He=l(Uu,"english_dataset"),Uu.forEach(a),bs=l(Vn," \u3092 "),we=r(Vn,"CODE",{});var Mu=p(we);Be=l(Mu,"pandas.DataFrame"),Mu.forEach(a),re=l(Vn," \u306B\u5909\u63DB\u3057\u3066\u3001\u88FD\u54C1\u30AB\u30C6\u30B4\u30EA\u3054\u3068\u306E\u30EC\u30D3\u30E5\u30FC\u6570\u3092\u8A08\u7B97\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Vn.forEach(a),Ee=u(s),w(Us.$$.fragment,s),We=u(s),w(fs.$$.fragment,s),Qs=u(s),ys=r(s,"P",{});var Ea=p(ys);Ms=l(Ea,"\u82F1\u8A9E\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u6700\u3082\u4EBA\u6C17\u306E\u3042\u308B\u5546\u54C1\u306F\u3001\u5BB6\u5EAD\u7528\u54C1\u3001\u8863\u985E\u3001\u30EF\u30A4\u30E4\u30EC\u30B9\u96FB\u5B50\u6A5F\u5668\u306B\u95A2\u3059\u308B\u3082\u306E\u3067\u3059\u3002\u3057\u304B\u3057\u3001Amazon\u672C\u6765\u306E\u30C6\u30FC\u30DE\u306B\u6CBF\u3063\u3066\u3001\u66F8\u8A55\u306E\u8981\u7D04\u306B\u7126\u70B9\u3092\u5F53\u3066\u307E\u3057\u3087\u3046\u3002\u7D50\u5C40\u306E\u3068\u3053\u308D\u3001\u66F8\u7C4D\u306F\u3053\u306E\u4F1A\u793E\u304C\u8A2D\u7ACB\u3055\u308C\u305F\u969B\u306E\u5546\u54C1\u306A\u306E\u3067\u3059! 2\u3064\u306E\u88FD\u54C1\u30AB\u30C6\u30B4\u30EA("),_e=r(Ea,"CODE",{});var Nu=p(_e);ye=l(Nu,"book"),Nu.forEach(a),ca=l(Ea," \u3068 "),xe=r(Ea,"CODE",{});var Fu=p(xe);Os=l(Fu,"digital_ebook_purchase"),Fu.forEach(a),ua=l(Ea,") \u304C\u5F53\u3066\u306F\u307E\u308B\u306E\u3067\u3001\u3053\u308C\u3089\u306E\u88FD\u54C1\u306B\u3064\u3044\u3066\u4E21\u8A00\u8A9E\u3067\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u30D5\u30A3\u30EB\u30BF\u30EA\u30F3\u30B0\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),be=r(Ea,"A",{href:!0});var Hu=p(be);Ke=l(Hu,"\u7B2C5\u7AE0"),Hu.forEach(a),ge=l(Ea," \u3067\u898B\u305F\u3088\u3046\u306B\u3001 "),qa=r(Ea,"CODE",{});var Bu=p(qa);Ka=l(Bu,"Dataset.filter()"),Bu.forEach(a),Ve=l(Ea," \u95A2\u6570\u3092\u4F7F\u3046\u3068\u975E\u5E38\u306B\u52B9\u7387\u7684\u306B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u30B9\u30E9\u30A4\u30B9\u3067\u304D\u308B\u306E\u3067\u3001\u3053\u308C\u3092\u884C\u3046\u305F\u3081\u306E\u7C21\u5358\u306A\u95A2\u6570\u3092\u5B9A\u7FA9\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Ea.forEach(a),Ta=u(s),w(se.$$.fragment,s),Da=u(s),ws=r(s,"P",{});var Ge=p(ws);Ot=l(Ge,"\u3053\u306E\u95A2\u6570\u3092 "),da=r(Ge,"CODE",{});var Wu=p(da);Ye=l(Wu,"english_dataset"),Wu.forEach(a),Va=l(Ge," \u3068 "),oe=r(Ge,"CODE",{});var Ku=p(oe);St=l(Ku,"spanish_dataset"),Ku.forEach(a),za=l(Ge," \u306B\u9069\u7528\u3059\u308B\u3068\u3001\u66F8\u7C4D\u306E\u30AB\u30C6\u30B4\u30EA\u3092\u542B\u3080\u884C\u3060\u3051\u304C\u7D50\u679C\u306B\u542B\u307E\u308C\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002\u30D5\u30A3\u30EB\u30BF\u3092\u9069\u7528\u3059\u308B\u524D\u306B\u3001"),Oa=r(Ge,"CODE",{});var Vu=p(Oa);Ct=l(Vu,"english_dataset"),Vu.forEach(a),Ya=l(Ge," \u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092 "),je=r(Ge,"CODE",{});var Yu=p(je);Pt=l(Yu,'"pandas"'),Yu.forEach(a),Ja=l(Ge," \u304B\u3089 "),qe=r(Ge,"CODE",{});var Ju=p(qe);At=l(Ju,'"arrow"'),Ju.forEach(a),Xa=l(Ge," \u306B\u623B\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Ge.forEach(a),Ns=u(s),w(ee.$$.fragment,s),Za=u(s),Te=r(s,"P",{});var Xu=p(Te);Rt=l(Xu,"\u6B21\u306B\u3001\u30D5\u30A3\u30EB\u30BF\u30FC\u6A5F\u80FD\u3092\u9069\u7528\u3057\u3001\u30B5\u30CB\u30C6\u30A3\u30FC\u30C1\u30A7\u30C3\u30AF\u3068\u3057\u3066\u3001\u30EC\u30D3\u30E5\u30FC\u306E\u30B5\u30F3\u30D7\u30EB\u304C\u672C\u5F53\u306B\u672C\u306B\u95A2\u3059\u308B\u3082\u306E\u304B\u3069\u3046\u304B\u3092\u8ABF\u3079\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Xu.forEach(a),Qa=u(s),w(Je.$$.fragment,s),ha=u(s),w(Xe.$$.fragment,s),st=u(s),As=r(s,"P",{});var xt=p(As);Lt=l(xt,"\u30EC\u30D3\u30E5\u30FC\u304C\u53B3\u5BC6\u306B\u672C\u306B\u3064\u3044\u3066\u3067\u306F\u306A\u304F\u3001\u30AB\u30EC\u30F3\u30C0\u30FC\u3084OneNote\u306E\u3088\u3046\u306A\u96FB\u5B50\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u3088\u3046\u306A\u3082\u306E\u3092\u53C2\u7167\u3057\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u305D\u308C\u3067\u3082\u3001\u3053\u306E\u30C9\u30E1\u30A4\u30F3\u306F\u8981\u7D04\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3055\u305B\u308B\u306E\u306B\u9069\u3057\u3066\u3044\u308B\u3068\u601D\u308F\u308C\u307E\u3059\u3002\u3053\u306E\u30BF\u30B9\u30AF\u306B\u9069\u3057\u305F\u69D8\u3005\u306A\u30E2\u30C7\u30EB\u3092\u898B\u308B\u524D\u306B\u3001\u6700\u5F8C\u306E\u30C7\u30FC\u30BF\u6E96\u5099\u3068\u3057\u3066\u3001\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30EC\u30D3\u30E5\u30FC\u30921\u3064\u306E "),Sa=r(xt,"CODE",{});var Zu=p(Sa);ae=l(Zu,"DatasetDict"),Zu.forEach(a),It=l(xt," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3068\u3057\u3066\u7D50\u5408\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u{1F917} Datasets\u306B\u306F\u4FBF\u5229\u306A "),Ze=r(xt,"CODE",{});var Qu=p(Ze);Gt=l(Qu,"concatenate_datasets()"),Qu.forEach(a),Ut=l(xt," \u95A2\u6570\u304C\u3042\u308A\u3001\uFF08\u305D\u306E\u540D\u306E\u901A\u308A\uFF092\u3064\u306E "),Qe=r(xt,"CODE",{});var sd=p(Qe);Mt=l(sd,"Dataset"),sd.forEach(a),Nt=l(xt," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u91CD\u306D\u5408\u308F\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3064\u307E\u308A\u3001\u30D0\u30A4\u30EA\u30F3\u30AC\u30EB\u30FB\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u305F\u3081\u306B\u3001\u5404\u5206\u5272\u3092\u30EB\u30FC\u30D7\u3057\u3001\u305D\u306E\u5206\u5272\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u9023\u7D50\u3057\u3001\u30E2\u30C7\u30EB\u304C\u5358\u4E00\u8A00\u8A9E\u306B\u904E\u5270\u9069\u5408\u3057\u306A\u3044\u3088\u3046\u306B\u7D50\u679C\u3092\u30B7\u30E3\u30C3\u30D5\u30EB\u3057\u307E\u3059\u3002"),xt.forEach(a),fa=u(s),w(sa.$$.fragment,s),et=u(s),w(De.$$.fragment,s),ea=u(s),_a=r(s,"P",{});var ed=p(_a);at=l(ed,`\u3053\u308C\u306F\u78BA\u304B\u306B\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30EC\u30D3\u30E5\u30FC\u304C\u6DF7\u5728\u3057\u3066\u3044\u308B\u3088\u3046\u306B\u898B\u3048\u307E\u3059\u306D\uFF01
\u3055\u3066\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30B3\u30FC\u30D1\u30B9\u304C\u3067\u304D\u305F\u306E\u3067\u3001\u6700\u5F8C\u306B\u30EC\u30D3\u30E5\u30FC\u3068\u305D\u306E\u30BF\u30A4\u30C8\u30EB\u306B\u542B\u307E\u308C\u308B\u5358\u8A9E\u306E\u5206\u5E03\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u8981\u7D04\u30BF\u30B9\u30AF\u306B\u304A\u3044\u3066\u7279\u306B\u91CD\u8981\u3067\u3001\u5B66\u7FD2\u30C7\u30FC\u30BF\u3068\u3057\u3066\u53C2\u8003\u306B\u3059\u308B\u30C7\u30FC\u30BF\u4E2D\u306B\u77ED\u3059\u304E\u308B\u8981\u7D04\u304C\u591A\u3044\u3068\u3001\u8981\u7D04\u751F\u6210\u6642\u306B1\u3064\u304B2\u3064\u306E\u5358\u8A9E\u3057\u304B\u51FA\u529B\u3057\u306A\u3044\u3088\u3046\u30E2\u30C7\u30EB\u3092\u504F\u3089\u305B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u4E0B\u306E\u30D7\u30ED\u30C3\u30C8\u306F\u5358\u8A9E\u306E\u5206\u5E03\u3092\u793A\u3057\u3066\u304A\u308A\u3001\u30BF\u30A4\u30C8\u30EB\u304C1-2\u5358\u8A9E\u3060\u3051\u306B\u5927\u304D\u304F\u504F\u3063\u3066\u3044\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002`),ed.forEach(a),ze=u(s),pe=r(s,"DIV",{class:!0});var Yp=p(pe);te=r(Yp,"IMG",{class:!0,src:!0,alt:!0}),Oe=u(Yp),aa=r(Yp,"IMG",{class:!0,src:!0,alt:!0}),Yp.forEach(a),lt=u(s),Se=r(s,"P",{});var Jp=p(Se);nt=l(Jp,"\u3053\u306E\u554F\u984C\u306B\u5BFE\u51E6\u3057\u3001\u79C1\u9054\u306E\u30E2\u30C7\u30EB\u304C\u3088\u308A\u8208\u5473\u6DF1\u3044\u8981\u7D04\u3092\u751F\u6210\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u975E\u5E38\u306B\u77ED\u3044\u30BF\u30A4\u30C8\u30EB\u3092\u6301\u3064\u4F8B\u3092\u30D5\u30A3\u30EB\u30BF\u30EA\u30F3\u30B0\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002\u82F1\u8A9E\u3068\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u6271\u3063\u3066\u3044\u308B\u306E\u3067\u3001\u30BF\u30A4\u30C8\u30EB\u3092\u7A7A\u767D\u3067\u5206\u5272\u3059\u308B\u5927\u307E\u304B\u306A\u7D4C\u9A13\u5247\u3092\u5143\u306B\u3001\u4FE1\u983C\u3067\u304D\u308B "),m=r(Jp,"CODE",{});var ad=p(m);D=l(ad,"Dataset.filter()"),ad.forEach(a),Wl=l(Jp," \u30E1\u30BD\u30C3\u30C9\u3092\u4EE5\u4E0B\u306E\u3088\u3046\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002"),Jp.forEach(a),Ht=u(s),w(ba.$$.fragment,s),ta=u(s),Ca=r(s,"P",{});var td=p(Ca);Kl=l(td,"\u3055\u3066\u3001\u30B3\u30FC\u30D1\u30B9\u304C\u3067\u304D\u305F\u3068\u3053\u308D\u3067\u3001\u3053\u306E\u30B3\u30FC\u30D1\u30B9\u3092\u4F7F\u3063\u3066\u3001Transformer\u306E\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),td.forEach(a),Bt=u(s),ie=r(s,"H2",{id:!0});var ld=p(ie);Vl=l(ld,"\u6587\u7AE0\u8981\u7D04\u7528\u30E2\u30C7\u30EB"),ld.forEach(a),Wt=u(s),ve=r(s,"P",{});var Xp=p(ve);Yl=l(Xp,"\u8003\u3048\u3066\u307F\u308C\u3070\u3001\u6587\u7AE0\u306E\u8981\u7D04\u306F\u6A5F\u68B0\u7FFB\u8A33\u3068\u4F3C\u305F\u3088\u3046\u306A\u7A2E\u985E\u306E\u30BF\u30B9\u30AF\u3067\u3059\u3002\u30EC\u30D3\u30E5\u30FC\u306E\u3088\u3046\u306A\u30C6\u30AD\u30B9\u30C8\u5165\u529B\u304C\u3042\u308A\u3001\u305D\u308C\u3092\u5165\u529B\u6587\u5185\u306E\u9855\u8457\u306A\u7279\u5FB4\u3092\u3068\u3089\u3048\u305F\u77ED\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u306B\u300C\u7FFB\u8A33\u300D\u3057\u305F\u3044\u306E\u3067\u3059\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u8981\u7D04\u306E\u305F\u3081\u306E\u307B\u3068\u3093\u3069\u306ETransformer\u30E2\u30C7\u30EB\u306F"),Pa=r(Xp,"A",{href:!0});var nd=p(Pa);rt=l(nd,"\u7B2C1\u7AE0"),nd.forEach(a),Jl=l(Xp,"\u3067\u6700\u521D\u306B\u51FA\u4F1A\u3063\u305F\u30A8\u30F3\u30B3\u30FC\u30C0\u3068\u30C7\u30B3\u30FC\u30C0\u306E\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u63A1\u7528\u3057\u3066\u3044\u307E\u3059\u3002\u3057\u304B\u3057\u3001GPT\u30E2\u30C7\u30EB\u7FA4\u306E\u3088\u3046\u306A\u4F8B\u5916\u3082\u3042\u308A\u3001\u5C11\u6570\u30B7\u30E7\u30C3\u30C8\u5B66\u7FD2\u8A2D\u5B9A\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u3082\u53EF\u80FD\u3067\u3059\u3002\u4EE5\u4E0B\u306E\u8868\u306F\u3001\u8981\u7D04\u306E\u305F\u3081\u306B\u5FAE\u8ABF\u6574\u304C\u53EF\u80FD\u306A\u3001\u3088\u304F\u4F7F\u308F\u308C\u308B\u4E8B\u524D\u5B66\u7FD2\u6E08\u307F\u30E2\u30C7\u30EB\u306E\u4E00\u89A7\u3067\u3059\u3002"),Xp.forEach(a),Aa=u(s),la=r(s,"TABLE",{});var Zp=p(la);ot=r(Zp,"THEAD",{});var rd=p(ot);Ws=r(rd,"TR",{});var Yn=p(Ws);Ra=r(Yn,"TH",{align:!0});var od=p(Ra);Xl=l(od,"Transformer model"),od.forEach(a),Zl=u(Yn),pt=r(Yn,"TH",{});var pd=p(pt);Ql=l(pd,"Description"),pd.forEach(a),ga=u(Yn),La=r(Yn,"TH",{align:!0});var id=p(La);sn=l(id,"Multilingual?"),id.forEach(a),Yn.forEach(a),rd.forEach(a),en=u(Zp),Rs=r(Zp,"TBODY",{});var Ue=p(Rs);me=r(Ue,"TR",{});var Jn=p(me);Ia=r(Jn,"TD",{align:!0});var md=p(Ia);ja=r(md,"A",{href:!0,rel:!0});var cd=p(ja);an=l(cd,"GPT-2"),cd.forEach(a),md.forEach(a),Ce=u(Jn),va=r(Jn,"TD",{});var ud=p(va);tn=l(ud,"Although trained as an auto-regressive language model, you can make GPT-2 generate summaries by appending \u201CTL;DR\u201D at the end of the input text."),ud.forEach(a),ln=u(Jn),Ga=r(Jn,"TD",{align:!0});var dd=p(Ga);Pe=l(dd,"\u274C"),dd.forEach(a),Jn.forEach(a),nn=u(Ue),Ae=r(Ue,"TR",{});var Xn=p(Ae);Ua=r(Xn,"TD",{align:!0});var hd=p(Ua);$a=r(hd,"A",{href:!0,rel:!0});var fd=p($a);it=l(fd,"PEGASUS"),fd.forEach(a),hd.forEach(a),rn=u(Xn),rr=r(Xn,"TD",{});var _d=p(rr);ii=l(_d,"Uses a pretraining objective to predict masked sentences in multi-sentence texts. This pretraining objective is closer to summarization than vanilla language modeling and scores highly on popular benchmarks."),_d.forEach(a),mi=u(Xn),on=r(Xn,"TD",{align:!0});var bd=p(on);ci=l(bd,"\u274C"),bd.forEach(a),Xn.forEach(a),ui=u(Ue),Ma=r(Ue,"TR",{});var Zn=p(Ma);pn=r(Zn,"TD",{align:!0});var gd=p(pn);Kt=r(gd,"A",{href:!0,rel:!0});var jd=p(Kt);di=l(jd,"T5"),jd.forEach(a),gd.forEach(a),hi=u(Zn),Vt=r(Zn,"TD",{});var Qp=p(Vt);fi=l(Qp,"A universal Transformer architecture that formulates all tasks in a text-to-text framework; e.g., the input format for the model to summarize a document is "),or=r(Qp,"CODE",{});var vd=p(or);_i=l(vd,"summarize: ARTICLE"),vd.forEach(a),bi=l(Qp,"."),Qp.forEach(a),gi=u(Zn),mn=r(Zn,"TD",{align:!0});var $d=p(mn);ji=l($d,"\u274C"),$d.forEach(a),Zn.forEach(a),vi=u(Ue),Na=r(Ue,"TR",{});var Qn=p(Na);cn=r(Qn,"TD",{align:!0});var kd=p(cn);Yt=r(kd,"A",{href:!0,rel:!0});var wd=p(Yt);$i=l(wd,"mT5"),wd.forEach(a),kd.forEach(a),ki=u(Qn),pr=r(Qn,"TD",{});var Ed=p(pr);wi=l(Ed,"A multilingual version of T5, pretrained on the multilingual Common Crawl corpus (mC4), covering 101 languages."),Ed.forEach(a),Ei=u(Qn),un=r(Qn,"TD",{align:!0});var yd=p(un);yi=l(yd,"\u2705"),yd.forEach(a),Qn.forEach(a),xi=u(Ue),Fa=r(Ue,"TR",{});var sr=p(Fa);dn=r(sr,"TD",{align:!0});var xd=p(dn);Jt=r(xd,"A",{href:!0,rel:!0});var qd=p(Jt);qi=l(qd,"BART"),qd.forEach(a),xd.forEach(a),Ti=u(sr),ir=r(sr,"TD",{});var Td=p(ir);Di=l(Td,"A novel Transformer architecture with both an encoder and a decoder stack trained to reconstruct corrupted input that combines the pretraining schemes of BERT and GPT-2."),Td.forEach(a),zi=u(sr),hn=r(sr,"TD",{align:!0});var Dd=p(hn);Oi=l(Dd,"\u274C"),Dd.forEach(a),sr.forEach(a),Si=u(Ue),Ha=r(Ue,"TR",{});var er=p(Ha);fn=r(er,"TD",{align:!0});var zd=p(fn);Xt=r(zd,"A",{href:!0,rel:!0});var Od=p(Xt);Ci=l(Od,"mBART-50"),Od.forEach(a),zd.forEach(a),Pi=u(er),mr=r(er,"TD",{});var Sd=p(mr);Ai=l(Sd,"A multilingual version of BART, pretrained on 50 languages."),Sd.forEach(a),Ri=u(er),_n=r(er,"TD",{align:!0});var Cd=p(_n);Li=l(Cd,"\u2705"),Cd.forEach(a),er.forEach(a),Ue.forEach(a),Zp.forEach(a),co=u(s),bn=r(s,"P",{});var Pd=p(bn);Ii=l(Pd,"\u3053\u306E\u8868\u304B\u3089\u308F\u304B\u308B\u3088\u3046\u306B\u3001\u8981\u7D04\u306E\u305F\u3081\u306ETransformer\u30E2\u30C7\u30EB\u306E\u5927\u534A\u306F\uFF08\u305D\u3057\u3066\u5B9F\u969B\u3001\u307B\u3068\u3093\u3069\u306ENLP\u30BF\u30B9\u30AF\u3082\uFF09\u5358\u8A00\u8A9E\u7248\u3067\u3059\u3002\u3053\u308C\u306F\u30BF\u30B9\u30AF\u304C\u82F1\u8A9E\u3084\u30C9\u30A4\u30C4\u8A9E\u306E\u3088\u3046\u306A\u5229\u7528\u53EF\u80FD\u306A\u30C7\u30FC\u30BF\u306E\u591A\u3044\u300C\u9AD8\u30EA\u30BD\u30FC\u30B9\u300D\u8A00\u8A9E\u3067\u3042\u308B\u5834\u5408\u306F\u826F\u3044\u306E\u3067\u3059\u304C\u3001\u4E16\u754C\u4E2D\u3067\u4F7F\u308F\u308C\u3066\u3044\u308B\u4F55\u5343\u3082\u306E\u4ED6\u306E\u8A00\u8A9E\u3067\u306F\u305D\u3046\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u5E78\u3044\u306A\u3053\u3068\u306B\u3001mT5\u3084mBART\u306E\u3088\u3046\u306A\u591A\u8A00\u8A9ETransformer\u30E2\u30C7\u30EB\u3082\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u3089\u306E\u30E2\u30C7\u30EB\u306F\u8A00\u8A9E\u30E2\u30C7\u30EA\u30F3\u30B0\u3092\u4F7F\u3063\u3066\u4E8B\u524D\u306B\u5B66\u7FD2\u3055\u308C\u307E\u3059\u304C\u3001\u3072\u306D\u308A\u304C\u52A0\u3048\u3089\u308C\u3066\u3044\u307E\u3059\u30021\u3064\u306E\u8A00\u8A9E\u306E\u30B3\u30FC\u30D1\u30B9\u3067\u5B66\u7FD2\u3059\u308B\u306E\u3067\u306F\u306A\u304F\u300150\u4EE5\u4E0A\u306E\u8A00\u8A9E\u306E\u30C6\u30AD\u30B9\u30C8\u3067\u4E00\u5EA6\u306B\u5171\u540C\u5B66\u7FD2\u3057\u3066\u3044\u308B\u306E\u3067\u3059\uFF01"),Pd.forEach(a),uo=u(s),gn=r(s,"P",{});var Ad=p(gn);Gi=l(Ad,"\u3053\u3053\u3067\u306F\u3001T5\u3092\u30D9\u30FC\u30B9\u306B\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u30C6\u30AD\u30B9\u30C8\u3078\u306E\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u3067\u4E8B\u524D\u5B66\u7FD2\u3055\u308C\u305F\u8208\u5473\u6DF1\u3044\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3067\u3042\u308BmT5\u306B\u7126\u70B9\u3092\u5F53\u3066\u307E\u3059\u3002T5\u3067\u306F\u3001\u3059\u3079\u3066\u306E\u81EA\u7136\u8A00\u8A9E\u51E6\u7406\u30BF\u30B9\u30AF\u306F\u300C\u8981\u7D04\uFF1A\u300D\u306E\u3088\u3046\u306A\u30D7\u30ED\u30F3\u30D7\u30C8\u63A5\u982D\u8F9E\u3067\u5B9A\u5F0F\u5316\u3055\u308C\u3001\u751F\u6210\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u3092\u30D7\u30ED\u30F3\u30D7\u30C8\u306B\u9069\u5FDC\u3055\u305B\u308B\u3088\u3046\u30E2\u30C7\u30EB\u306B\u6761\u4EF6\u4ED8\u3051\u3055\u308C\u307E\u3059\u3002\u4E0B\u56F3\u306B\u793A\u3059\u3088\u3046\u306B\u3001T5\u306F\u975E\u5E38\u306B\u6C4E\u7528\u6027\u304C\u9AD8\u304F\u30011\u3064\u306E\u30E2\u30C7\u30EB\u3067\u591A\u304F\u306E\u30BF\u30B9\u30AF\u3092\u89E3\u6C7A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF01"),Ad.forEach(a),ho=u(s),Ba=r(s,"DIV",{class:!0});var si=p(Ba);Zt=r(si,"IMG",{class:!0,src:!0,alt:!0}),Ui=u(si),Qt=r(si,"IMG",{class:!0,src:!0,alt:!0}),si.forEach(a),fo=u(s),jn=r(s,"P",{});var Rd=p(jn);Mi=l(Rd,"mT5\u306F\u63A5\u982D\u8F9E\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093\u304C\u3001T5\u306E\u591A\u7528\u9014\u6027\u3092\u5171\u6709\u3057\u3001\u591A\u8A00\u8A9E\u3067\u3042\u308B\u3068\u3044\u3046\u5229\u70B9\u304C\u3042\u308A\u307E\u3059\u3002\u3055\u3066\u3001\u30E2\u30C7\u30EB\u3092\u9078\u3093\u3060\u3068\u3053\u308D\u3067\u3001\u5B66\u7FD2\u7528\u306E\u30C7\u30FC\u30BF\u306E\u6E96\u5099\u306B\u53D6\u308A\u304B\u304B\u308A\u307E\u3057\u3087\u3046\u3002"),Rd.forEach(a),_o=u(s),w(mt.$$.fragment,s),bo=u(s),sl=r(s,"H2",{id:!0});var Ld=p(sl);Ni=l(Ld,"\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406"),Ld.forEach(a),go=u(s),w(el.$$.fragment,s),jo=u(s),ct=r(s,"P",{});var ei=p(ct);Fi=l(ei,"\u6B21\u306E\u30BF\u30B9\u30AF\u306F\u30EC\u30D3\u30E5\u30FC\u3068\u305D\u306E\u30BF\u30A4\u30C8\u30EB\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3057\u30A8\u30F3\u30B3\u30FC\u30C9\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001\u4E8B\u524D\u306B\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u306E\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u304B\u3089\u59CB\u3081\u307E\u3059\u3002\u3053\u3053\u3067\u306F\u30C1\u30A7\u30C3\u30AF\u30DD\u30A4\u30F3\u30C8\u3068\u3057\u3066 "),cr=r(ei,"CODE",{});var Id=p(cr);Hi=l(Id,"mt5-small"),Id.forEach(a),Bi=l(ei," \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),ei.forEach(a),vo=u(s),w(al.$$.fragment,s),$o=u(s),w(ut.$$.fragment,s),ko=u(s),vn=r(s,"P",{});var Gd=p(vn);Wi=l(Gd,"\u5C11\u91CF\u306E\u30B5\u30F3\u30D7\u30EB\u3067mT5\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u30C6\u30B9\u30C8\u3057\u3066\u307F\u307E\u3057\u3087\u3046"),Gd.forEach(a),wo=u(s),w(tl.$$.fragment,s),Eo=u(s),w(ll.$$.fragment,s),yo=u(s),ce=r(s,"P",{});var ya=p(ce);Ki=l(ya,"\u3053\u3053\u3067\u3001"),$n=r(ya,"A",{href:!0});var Ud=p($n);Vi=l(Ud,"\u7B2C3\u7AE0"),Ud.forEach(a),Yi=l(ya," \u306E\u6700\u521D\u306E\u5FAE\u8ABF\u6574\u306E\u5B9F\u9A13\u3067\u906D\u9047\u3057\u305F\u3001\u304A\u306A\u3058\u307F\u306E "),ur=r(ya,"CODE",{});var Md=p(ur);Ji=l(Md,"input_ids"),Md.forEach(a),Xi=l(ya," \u3068 "),dr=r(ya,"CODE",{});var Nd=p(dr);Zi=l(Nd,"attention_mask"),Nd.forEach(a),Qi=l(ya," \u3092\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u3089\u306E\u5165\u529BID\u3092\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306E "),hr=r(ya,"CODE",{});var Fd=p(hr);sm=l(Fd,"convert_ids_to_tokens()"),Fd.forEach(a),em=l(ya," \u95A2\u6570\u3067\u30C7\u30B3\u30FC\u30C9\u3057\u3066\u3001\u3069\u306E\u3088\u3046\u306A\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306A\u306E\u304B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),ya.forEach(a),xo=u(s),w(nl.$$.fragment,s),qo=u(s),w(rl.$$.fragment,s),To=u(s),Re=r(s,"P",{});var qt=p(Re);am=l(qt,"Unicode\u306E\u7279\u6B8A\u6587\u5B57 "),fr=r(qt,"CODE",{});var Hd=p(fr);tm=l(Hd,"\u2581"),Hd.forEach(a),lm=l(qt," \u3068\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u7D42\u308F\u308A\u3092\u610F\u5473\u3059\u308B\u30C8\u30FC\u30AF\u30F3 "),_r=r(qt,"CODE",{});var Bd=p(_r);nm=l(Bd,"</s>"),Bd.forEach(a),rm=l(qt," \u306F\u3001SentencePiece\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u6271\u3063\u3066\u3044\u308B\u3053\u3068\u3092\u793A\u3057\u3066\u3044\u307E\u3059\u3002\u3053\u308C\u306F "),kn=r(qt,"A",{href:!0});var Wd=p(kn);om=l(Wd,"\u7B2C6\u7AE0"),Wd.forEach(a),pm=l(qt," \u3067\u8AAC\u660E\u3057\u305F\u30E6\u30CB\u30B0\u30E9\u30E0\u30BB\u30B0\u30E1\u30F3\u30C8\u5316\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u306B\u57FA\u3065\u3044\u3066\u3044\u307E\u3059\u3002\u30E6\u30CB\u30B0\u30E9\u30E0\u306F\u591A\u8A00\u8A9E\u30B3\u30FC\u30D1\u30B9\u306B\u7279\u306B\u6709\u52B9\u3067\u3059\u3002\u30E6\u30CB\u30B0\u30E9\u30E0\u306B\u3088\u308ASentencePiece\u306F\u53E3\u8ABF\u3001\u53E5\u8AAD\u70B9\u3001\u7A7A\u767D\u306A\u3069\u306B\u4F9D\u5B58\u3057\u306A\u304F\u306A\u308B\u306E\u3067\u3001\u65E5\u672C\u8A9E\u306E\u3088\u3046\u306B\u7A7A\u767D\u6587\u5B57\u3092\u6301\u305F\u306A\u3044\u591A\u304F\u306E\u8A00\u8A9E\u306B\u5BFE\u3057\u3066\u52B9\u679C\u7684\u306B\u306A\u308A\u307E\u3059\u3002"),qt.forEach(a),Do=u(s),dt=r(s,"P",{});var ai=p(dt);im=l(ai,"\u3053\u306E\u30B3\u30FC\u30D1\u30B9\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u305F\u3081\u306B\u3001\u8981\u7D04\u306B\u95A2\u9023\u3059\u308B\u4E9B\u7D30\u306A\u554F\u984C\u306B\u5BFE\u51E6\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30E9\u30D9\u30EB\u3082\u30C6\u30AD\u30B9\u30C8\u306A\u306E\u3067\u3001\u30E2\u30C7\u30EB\u306E\u6700\u5927\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B5\u30A4\u30BA\u3092\u8D85\u3048\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u30EC\u30D3\u30E5\u30FC\u3068\u305D\u306E\u30BF\u30A4\u30C8\u30EB\u306E\u4E21\u65B9\u306B\u5207\u308A\u8A70\u3081\u3092\u9069\u7528\u3057\u3066\u3001\u904E\u5EA6\u306B\u9577\u3044\u5165\u529B\u3092\u30E2\u30C7\u30EB\u306B\u6E21\u3055\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u3092\u610F\u5473\u3057\u307E\u3059\u3002\u{1F917} Transformers \u306E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306F\u3001\u5165\u529B\u3068\u4E26\u884C\u3057\u3066\u30E9\u30D9\u30EB\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u4FBF\u5229\u306A "),br=r(ai,"CODE",{});var Kd=p(br);mm=l(Kd,"as_target_tokenizer()"),Kd.forEach(a),cm=l(ai," \u95A2\u6570\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u901A\u5E38\u3001\u307E\u305A\u5165\u529B\u3092\u30A8\u30F3\u30B3\u30FC\u30C9\u3057\u3001\u6B21\u306B\u30E9\u30D9\u30EB\u3092\u5225\u306E\u5217\u3068\u3057\u3066\u30A8\u30F3\u30B3\u30FC\u30C9\u3059\u308B\u524D\u51E6\u7406\u95A2\u6570\u306E\u5185\u90E8\u3067\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC\u3092\u4F7F\u7528\u3057\u3066\u884C\u308F\u308C\u307E\u3059\u3002"),ai.forEach(a),zo=u(s),wn=r(s,"P",{});var Vd=p(wn);um=l(Vd,"\u4EE5\u4E0B\u306F\u3001mT5 \u7528\u306E\u305D\u306E\u3088\u3046\u306A\u95A2\u6570\u306E\u4F8B\u3067\u3059\u3002"),Vd.forEach(a),Oo=u(s),w(ol.$$.fragment,s),So=u(s),ue=r(s,"P",{});var xa=p(ue);dm=l(xa,"\u4F55\u304C\u8D77\u3053\u3063\u3066\u3044\u308B\u306E\u304B\u7406\u89E3\u3059\u308B\u305F\u3081\u306B\u3001\u3053\u306E\u30B3\u30FC\u30C9\u3092\u898B\u3066\u3044\u304D\u307E\u3057\u3087\u3046\u3002\u307E\u305A\u6700\u521D\u306B\u3001"),gr=r(xa,"CODE",{});var Yd=p(gr);hm=l(Yd,"max_input_length"),Yd.forEach(a),fm=l(xa,"\u3068"),jr=r(xa,"CODE",{});var Jd=p(jr);_m=l(Jd,"max_target_length"),Jd.forEach(a),bm=l(xa,"\u306E\u5024\u3092\u5B9A\u7FA9\u3057\u307E\u3057\u305F\u3002\u3053\u308C\u306F\u30EC\u30D3\u30E5\u30FC\u3068\u30BF\u30A4\u30C8\u30EB\u306E\u9577\u3055\u306E\u4E0A\u9650\u3092\u8A2D\u5B9A\u3059\u308B\u3082\u306E\u3067\u3059\u3002\u901A\u5E38\u3001\u30EC\u30D3\u30E5\u30FC\u306E\u672C\u6587\u306F\u30BF\u30A4\u30C8\u30EB\u3088\u308A\u3082\u306F\u308B\u304B\u306B\u5927\u304D\u3044\u306E\u3067\u3001\u3053\u308C\u3089\u306E\u5024\u3092\u9069\u5B9C\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3057\u3066\u3044\u307E\u3059\u3002\u6B21\u306B\u3001"),vr=r(xa,"CODE",{});var Xd=p(vr);gm=l(Xd,"preprocess_function()"),Xd.forEach(a),jm=l(xa," \u81EA\u8EAB\u3067\u3001\u30EC\u30D3\u30E5\u30FC\u304C\u6700\u521D\u306B\u30C8\u30FC\u30AF\u30F3\u5316\u3055\u308C\u3001\u6B21\u306B "),$r=r(xa,"CODE",{});var Zd=p($r);vm=l(Zd,"as_target_tokenizer()"),Zd.forEach(a),$m=l(xa," \u3067\u30BF\u30A4\u30C8\u30EB\u304C\u30C8\u30FC\u30AF\u30F3\u5316\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002"),xa.forEach(a),Co=u(s),Wa=r(s,"P",{});var io=p(Wa);kr=r(io,"CODE",{});var Qd=p(kr);km=l(Qd,"preprocess_function()"),Qd.forEach(a),wm=l(io," \u304C\u3042\u308C\u3070\u3001\u3042\u3068\u306F\u3053\u306E\u30B3\u30FC\u30B9\u3067\u6563\u3005\u4F7F\u3063\u3066\u304D\u305F\u4FBF\u5229\u306A "),wr=r(io,"CODE",{});var sh=p(wr);Em=l(sh,"Dataset.map()"),sh.forEach(a),ym=l(io," \u95A2\u6570\u3092\u4F7F\u3063\u3066\u30B3\u30FC\u30D1\u30B9\u5168\u4F53\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u306E\u306F\u7C21\u5358\u306A\u3053\u3068\u3067\u3059\u3002"),io.forEach(a),Po=u(s),w(pl.$$.fragment,s),Ao=u(s),En=r(s,"P",{});var eh=p(En);xm=l(eh,"\u3055\u3066\u3001\u30B3\u30FC\u30D1\u30B9\u306E\u524D\u51E6\u7406\u304C\u7D42\u308F\u3063\u305F\u3068\u3053\u308D\u3067\u3001\u8981\u7D04\u306B\u3088\u304F\u4F7F\u308F\u308C\u308B\u3044\u304F\u3064\u304B\u306E\u6307\u6A19\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u3053\u308C\u304B\u3089\u898B\u308B\u3088\u3046\u306B\u3001\u6A5F\u68B0\u304C\u751F\u6210\u3057\u305F\u6587\u7AE0\u306E\u54C1\u8CEA\u3092\u6E2C\u308B\u969B\u306B\u3001\u4E07\u80FD\u306E\u624B\u6CD5\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002"),eh.forEach(a),Ro=u(s),w(ht.$$.fragment,s),Lo=u(s),il=r(s,"H2",{id:!0});var ah=p(il);qm=l(ah,"\u6587\u7AE0\u8981\u7D04\u306E\u305F\u3081\u306E\u6307\u6A19"),ah.forEach(a),Io=u(s),w(ml.$$.fragment,s),Go=u(s),yn=r(s,"P",{});var th=p(yn);Tm=l(th,"\u3053\u306E\u30B3\u30FC\u30B9\u3067\u53D6\u308A\u4E0A\u3052\u305F\u4ED6\u306E\u307B\u3068\u3093\u3069\u306E\u30BF\u30B9\u30AF\u3068\u6BD4\u8F03\u3057\u3066\u3001\u8981\u7D04\u3084\u7FFB\u8A33\u306E\u3088\u3046\u306A\u30C6\u30AD\u30B9\u30C8\u751F\u6210\u30BF\u30B9\u30AF\u306E\u6027\u80FD\u6E2C\u5B9A\u306F\u305D\u308C\u307B\u3069\u7C21\u5358\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u4F8B\u3048\u3070\u3001\u300C\u30CF\u30F3\u30AC\u30FC\u30B2\u30FC\u30E0\u3092\u8AAD\u3080\u306E\u304C\u597D\u304D\u3060\u300D\u3068\u3044\u3046\u30EC\u30D3\u30E5\u30FC\u304C\u3042\u3063\u305F\u3068\u3057\u3066\u3001\u300C\u30CF\u30F3\u30AC\u30FC\u30B2\u30FC\u30E0\u304C\u5927\u597D\u304D\u3060\u300D\u300C\u30CF\u30F3\u30AC\u30FC\u30B2\u30FC\u30E0\u306F\u7D20\u6674\u3089\u3057\u3044\u8AAD\u307F\u7269\u3060\u300D\u306A\u3069\u3001\u6709\u52B9\u306A\u8981\u7D04\u304C\u8907\u6570\u5B58\u5728\u3057\u307E\u3059\u3002\u660E\u3089\u304B\u306B\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3068\u30E9\u30D9\u30EB\u306E\u9593\u306B\u3042\u308B\u7A2E\u306E\u5B8C\u5168\u306A\u4E00\u81F4\u3092\u9069\u7528\u3059\u308B\u3053\u3068\u306F\u826F\u3044\u89E3\u6C7A\u7B56\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u79C1\u305F\u3061\u306F\u7686\u3001\u72EC\u81EA\u306E\u6587\u4F53\u3092\u6301\u3063\u3066\u3044\u308B\u306E\u3067\u3001\u305D\u306E\u3088\u3046\u306A\u6E2C\u5B9A\u6307\u6A19\u3092\u7528\u3044\u3066\u306F\u4EBA\u9593\u3067\u3055\u3048\u3046\u307E\u304F\u3044\u304B\u306A\u3044\u3067\u3057\u3087\u3046\u3002"),th.forEach(a),Uo=u(s),ft=r(s,"P",{});var ti=p(ft);Dm=l(ti,"\u8981\u7D04\u306E\u305F\u3081\u306B\u3001\u6700\u3082\u3088\u304F\u4F7F\u308F\u308C\u308B\u6307\u6A19\u306E1\u3064\u304C"),cl=r(ti,"A",{href:!0,rel:!0});var lh=p(cl);zm=l(lh,"ROUGE score"),lh.forEach(a),Om=l(ti," (Recall-Oriented Understudy for Gisting Evaluation\u306E\u7565)\u3067\u3059\u3002\u3053\u306E\u6307\u6A19\u306E\u80CC\u5F8C\u306B\u3042\u308B\u57FA\u672C\u7684\u306A\u8003\u3048\u65B9\u306F\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3092\u3001\u901A\u5E38\u4EBA\u9593\u304C\u4F5C\u6210\u3059\u308B\u3057\u305F\u53C2\u7167\u8981\u7D04\u306E\u30BB\u30C3\u30C8\u3068\u6BD4\u8F03\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u3053\u308C\u3092\u3088\u308A\u6B63\u78BA\u306B\u3059\u308B\u305F\u3081\u306B\u3001\u6B21\u306E2\u3064\u306E\u8981\u7D04\u3092\u6BD4\u8F03\u3057\u305F\u3044\u3068\u3057\u307E\u3059\u3002"),ti.forEach(a),Mo=u(s),w(ul.$$.fragment,s),No=u(s),ka=r(s,"P",{});var ar=p(ka);Sm=l(ar,"\u6BD4\u8F03\u3059\u308B\u4E00\u3064\u306E\u65B9\u6CD5\u3068\u3057\u3066\u3001\u91CD\u8907\u3057\u3066\u3044\u308B\u5358\u8A9E\u306E\u6570\u3092\u6570\u3048\u308B\u3053\u3068\u304C\u8003\u3048\u3089\u308C\u307E\u3059\u304C\u3001\u3053\u306E\u5834\u5408\u30016\u500B\u3068\u306A\u308A\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u3053\u308C\u306F\u5C11\u3057\u7C97\u3044\u306E\u3067\u3001\u4EE3\u308F\u308A\u306BROUGE\u306F\u91CD\u306A\u308A\u5408\u3063\u305F\u90E8\u5206\u306E "),Er=r(ar,"EM",{});var nh=p(Er);Cm=l(nh,"\u9069\u5408\u7387"),nh.forEach(a),Pm=l(ar," \u3068 "),yr=r(ar,"EM",{});var rh=p(yr);Am=l(rh,"\u518D\u73FE\u7387"),rh.forEach(a),Rm=l(ar," \u306E\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u3053\u3068\u3092\u57FA\u672C\u3068\u3057\u3066\u3044\u307E\u3059\u3002"),ar.forEach(a),Fo=u(s),w(_t.$$.fragment,s),Ho=u(s),dl=r(s,"P",{});var $u=p(dl);Lm=l($u,`ROUGE\u3067\u306F\u3001\u751F\u6210\u3057\u305F\u8981\u7D04\u306B\u53C2\u7167\u5143\u306E\u8981\u7D04\u304C\u3069\u308C\u3060\u3051\u53D6\u308A\u8FBC\u307E\u308C\u305F\u304B\u3092\u518D\u73FE\u7387\u3067\u6E2C\u5B9A\u3057\u307E\u3059\u3002\u5358\u8A9E\u3092\u6BD4\u8F03\u3059\u308B\u3060\u3051\u3067\u3042\u308C\u3070\u3001\u4EE5\u4E0B\u306E\u5F0F\u306B\u3088\u3063\u3066\u518D\u73FE\u7387\u3092\u8A08\u7B97\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002
`),Bo=af($u),$u.forEach(a),Wo=u(s),hl=r(s,"P",{});var ku=p(hl);Im=l(ku,`\u4E0A\u8A18\u306E\u7C21\u5358\u306A\u4F8B\u3067\u306F\u3001\u3053\u306E\u5F0F\u306F6/6 = 1\u306E\u5B8C\u5168\u306A\u518D\u73FE\u7387\u3092\u4E0E\u3048\u307E\u3059\u3002\u3064\u307E\u308A\u3001\u53C2\u7167\u8981\u7D04\u306E\u3059\u3079\u3066\u306E\u5358\u8A9E\u304C\u30E2\u30C7\u30EB\u306B\u3088\u3063\u3066\u751F\u6210\u3055\u308C\u305F\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u7D20\u6674\u3089\u3057\u3044\u3053\u3068\u3060\u3068\u601D\u3046\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u304C\u3001\u3082\u3057\u79C1\u9054\u306E\u30E2\u30C7\u30EB\u304C\u751F\u6210\u3057\u305F\u8981\u7D04\u304C\u300C\u30CF\u30F3\u30AC\u30FC\u30B2\u30FC\u30E0\u3092\u4E00\u6669\u4E2D\u8AAD\u3080\u306E\u304C\u672C\u5F53\u306B\u672C\u5F53\u306B\u597D\u304D\u3060\u3063\u305F\u300D\u3067\u3042\u3063\u305F\u3068\u3057\u305F\u3089\u3069\u3046\u3067\u3057\u3087\u3046\u3002\u3053\u306E\u5834\u5408\u3082\u5B8C\u74A7\u306A\u518D\u73FE\u7387\u304C\u5F97\u3089\u308C\u307E\u3059\u304C\u3001\u5197\u9577\u3067\u3042\u308B\u305F\u3081\u3001\u9593\u9055\u3044\u306A\u304F\u3088\u308A\u60AA\u3044\u8981\u7D04\u3068\u306A\u308A\u307E\u3059\u3002\u3053\u306E\u3088\u3046\u306A\u30B7\u30CA\u30EA\u30AA\u306B\u5BFE\u51E6\u3059\u308B\u305F\u3081\u306B\u3001\u6211\u3005\u306F\u79C1\u9054\u306F\u9069\u5408\u7387\u3082\u8A08\u7B97\u3057\u307E\u3059\u3002\u3053\u308C\u306FROUGE\u306E\u6587\u8108\u306B\u304A\u3044\u3066\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u304C\u3069\u308C\u3060\u3051\u95A2\u9023\u3057\u3066\u3044\u305F\u304B\u3092\u6E2C\u5B9A\u3059\u308B\u3082\u306E\u3067\u3059\u3002
`),Ko=af(ku),ku.forEach(a),Vo=u(s),bt=r(s,"P",{});var li=p(bt);Gm=l(li,"\u3053\u308C\u3092\u5197\u9577\u306A\u8981\u7D04\u306B\u9069\u7528\u3059\u308B\u3068\u3001\u9069\u5408\u7387\u306F6/10 = 0.6\u3068\u306A\u308A\u3001\u77ED\u3044\u8981\u7D04\u3067\u5F97\u3089\u308C\u305F6/7 = 0.86\u3088\u308A\u3082\u304B\u306A\u308A\u60AA\u304F\u306A\u308A\u307E\u3059\u3002\u5B9F\u969B\u306B\u306F\u3001\u901A\u5E38\u3001\u9069\u5408\u7387\u3068\u518D\u73FE\u7387\u306E\u4E21\u65B9\u304C\u8A08\u7B97\u3055\u308C\u3001\u305D\u3057\u3066\u3001F1\u30B9\u30B3\u30A2\uFF08\u7CBE\u5EA6\u3068\u30EA\u30B3\u30FC\u30EB\u306E\u8ABF\u548C\u5E73\u5747\uFF09\u304C\u5831\u544A\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u306F\u{1F917} Datasets\u3067\u3001\u307E\u305A "),xr=r(li,"CODE",{});var oh=p(xr);Um=l(oh,"rouge_score"),oh.forEach(a),Mm=l(li," \u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u3053\u3068\u3067\u7C21\u5358\u306B\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),li.forEach(a),Yo=u(s),w(fl.$$.fragment,s),Jo=u(s),xn=r(s,"P",{});var ph=p(xn);Nm=l(ph,"\u305D\u3057\u3066\u3001ROUGE\u6307\u6A19\u3092\u8AAD\u307F\u8FBC\u307F\u307E\u3059\u3002"),ph.forEach(a),Xo=u(s),w(_l.$$.fragment,s),Zo=u(s),gt=r(s,"P",{});var ni=p(gt);Fm=l(ni,"\u305D\u3057\u3066\u3001"),qr=r(ni,"CODE",{});var ih=p(qr);Hm=l(ih,"rouge_score.compute()"),ih.forEach(a),Bm=l(ni,"\u95A2\u6570\u3092\u4F7F\u3063\u3066\u3001\u3059\u3079\u3066\u306E\u6307\u6A19\u3092\u4E00\u5EA6\u306B\u8A08\u7B97\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),ni.forEach(a),Qo=u(s),w(bl.$$.fragment,s),sp=u(s),w(gl.$$.fragment,s),ep=u(s),qn=r(s,"P",{});var mh=p(qn);Wm=l(mh,"\u304A\u3063\u3068\u3001\u3053\u306E\u51FA\u529B\u306B\u306F\u591A\u304F\u306E\u60C5\u5831\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u306D\u3002"),mh.forEach(a),ap=u(s),Ks=r(s,"P",{});var Me=p(Ks);Km=l(Me,"\u3053\u308C\u306F\u5168\u3066\u4F55\u3092\u610F\u5473\u3059\u308B\u306E\u3067\u3057\u3087\u3046\u304B\uFF1F\u307E\u305A\u3001\u{1F917} Datasets\u306F\u9069\u5408\u7387\u3001\u518D\u73FE\u7387\u3001F1\u30B9\u30B3\u30A2\u306E\u4FE1\u983C\u533A\u9593\u3092\u8A08\u7B97\u3057\u307E\u3059\u3002\u3053\u308C\u3089\u306F\u3053\u3053\u306B\u8868\u793A\u3055\u308C\u3066\u3044\u308B "),Tr=r(Me,"CODE",{});var ch=p(Tr);Vm=l(ch,"low"),ch.forEach(a),Ym=l(Me,"\u3001"),Dr=r(Me,"CODE",{});var uh=p(Dr);Jm=l(uh,"mid"),uh.forEach(a),Xm=l(Me,"\u3001"),zr=r(Me,"CODE",{});var dh=p(zr);Zm=l(dh,"high"),dh.forEach(a),Qm=l(Me," \u306E\u5C5E\u6027\u3067\u3059\u3002\u3055\u3089\u306B\u3001\u{1F917} Datasets\u306F\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3068\u53C2\u7167\u3055\u308C\u305F\u8981\u7D04\u3092\u6BD4\u8F03\u3059\u308B\u969B\u306B\u3001\u7570\u306A\u308B\u30BF\u30A4\u30D7\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u7C92\u5EA6\u306B\u57FA\u3065\u3044\u305F\u69D8\u3005\u306AROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3057\u307E\u3059\u3002"),Or=r(Me,"CODE",{});var hh=p(Or);sc=l(hh,"rouge1"),hh.forEach(a),ec=l(Me,"\u306E\u30D0\u30EA\u30A8\u30FC\u30B7\u30E7\u30F3\u306F\u30E6\u30CB\u30B0\u30E9\u30E0\u306E\u91CD\u306A\u308A\u5177\u5408\u3067\u3059\u3002\u3053\u308C\u306F\u5358\u8A9E\u306E\u30AA\u30FC\u30D0\u30FC\u30E9\u30C3\u30D7\u3092\u8A00\u3044\u63DB\u3048\u305F\u3060\u3051\u306E\u3082\u306E\u3067\u3001\u307E\u3055\u306B\u4E0A\u3067\u8AAC\u660E\u3057\u305F\u3088\u3046\u306A\u6307\u6A19\u3067\u3059\u3002\u3053\u308C\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306B\u3001\u30B9\u30B3\u30A2\u306E "),Sr=r(Me,"CODE",{});var fh=p(Sr);ac=l(fh,"mid"),fh.forEach(a),tc=l(Me," \u5024\u3092\u5F15\u304D\u51FA\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Me.forEach(a),tp=u(s),w(jl.$$.fragment,s),lp=u(s),w(vl.$$.fragment,s),np=u(s),Vs=r(s,"P",{});var Ne=p(Vs);lc=l(Ne,`\u7D20\u6674\u3089\u3057\u3044\uFF01\u9069\u5408\u7387\u3068\u518D\u73FE\u7387\u306E\u6570\u5024\u304C\u4E00\u81F4\u3057\u307E\u3057\u305F\u3002\u3067\u306F\u3001\u4ED6\u306EROUGE\u30B9\u30B3\u30A2\u306B\u3064\u3044\u3066\u306F\u3069\u3046\u3067\u3057\u3087\u3046\u304B\uFF1F
`),Cr=r(Ne,"CODE",{});var _h=p(Cr);nc=l(_h,"rouge2"),_h.forEach(a),rc=l(Ne," \u306F\u30D3\u30C3\u30B0\u30E9\u30E0\uFF08\u5358\u8A9E\u306E\u30DA\u30A2\u306E\u91CD\u306A\u308A\uFF09\u306E\u91CD\u306A\u308A\u3092\u6E2C\u5B9A\u3057\u3001 "),Pr=r(Ne,"CODE",{});var bh=p(Pr);oc=l(bh,"rougeL"),bh.forEach(a),pc=l(Ne," \u3068 "),Ar=r(Ne,"CODE",{});var gh=p(Ar);ic=l(gh,"rougeLsum"),gh.forEach(a),mc=l(Ne," \u306F\u751F\u6210\u3055\u308C\u305F\u30B5\u30DE\u30EA\u30FC\u3068\u53C2\u7167\u30B5\u30DE\u30EA\u30FC\u3067\u6700\u3082\u9577\u3044\u5171\u901A\u90E8\u5206\u6587\u5B57\u5217\u3092\u63A2\u3057\u3066\u3001\u6700\u3082\u9577\u304F\u30DE\u30C3\u30C1\u3059\u308B\u5358\u8A9E\u5217\u3092\u6E2C\u5B9A\u3057\u307E\u3059\u3002"),Rr=r(Ne,"CODE",{});var jh=p(Rr);cc=l(jh,"rougeLsum"),jh.forEach(a),uc=l(Ne," \u306E \u201Csum\u201D \u306F\u3001 "),Lr=r(Ne,"CODE",{});var vh=p(Lr);dc=l(vh,"rougeL"),vh.forEach(a),hc=l(Ne," \u304C\u500B\u3005\u306E\u6587\u306E\u5E73\u5747\u5024\u3068\u3057\u3066\u8A08\u7B97\u3055\u308C\u308B\u306E\u306B\u5BFE\u3057\u3001\u3053\u306E\u6307\u6A19\u306F\u8981\u7D04\u5168\u4F53\u306B\u5BFE\u3057\u3066\u8A08\u7B97\u3055\u308C\u308B\u3068\u3044\u3046\u4E8B\u5B9F\u3092\u8868\u3057\u3066\u3044\u308B\u3002"),Ne.forEach(a),rp=u(s),w(jt.$$.fragment,s),op=u(s),Tn=r(s,"P",{});var $h=p(Tn);fc=l($h,"\u3053\u306EROUGE\u30B9\u30B3\u30A2\u3092\u4F7F\u3063\u3066\u30E2\u30C7\u30EB\u306E\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u3092\u8FFD\u8DE1\u3057\u3066\u3044\u304D\u307E\u3059\u304C\u3001\u305D\u306E\u524D\u306B\u512A\u308C\u305FNLP\u5B9F\u8DF5\u8005\u304C\u3059\u3079\u304D\u3053\u3068\u3001\u305D\u308C\u306F\u5F37\u529B\u304B\u3064\u30B7\u30F3\u30D7\u30EB\u306A\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u3092\u4F5C\u6210\u3059\u308B\u3053\u3068\u3067\u3059\u3002"),$h.forEach(a),pp=u(s),$l=r(s,"H3",{id:!0});var kh=p($l);_c=l(kh,"\u5F37\u529B\u306A\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u306E\u4F5C\u6210"),kh.forEach(a),ip=u(s),Le=r(s,"P",{});var Tt=p(Le);bc=l(Tt,"\u30C6\u30AD\u30B9\u30C8\u8981\u7D04\u306E\u4E00\u822C\u7684\u306A\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u306F\u3001\u5358\u7D14\u306B\u8A18\u4E8B\u306E\u6700\u521D\u306E3\u3064\u306E\u30BB\u30F3\u30C6\u30F3\u30B9\u3092\u53D6\u308B\u3053\u3068\u3067\u3001\u3057\u3070\u3057\u3070 "),Ir=r(Tt,"EM",{});var wh=p(Ir);gc=l(wh,"lead-3"),wh.forEach(a),jc=l(Tt," \u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u3068\u547C\u3070\u308C\u307E\u3059\u3002\u6587\u306E\u5883\u754C\u3092\u8FFD\u8DE1\u3059\u308B\u305F\u3081\u306B\u30D4\u30EA\u30AA\u30C9\u3092\u4F7F\u3046\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u304C\u3001\u3053\u306E\u3084\u308A\u65B9\u306F \u201CU.S.\u201D \u3084 \u201CU.N.\u201D \u306E\u3088\u3046\u306A\u982D\u5B57\u8A9E\u3067\u306F\u5931\u6557\u3057\u307E\u3059\u3002\u305D\u3053\u3067\u3001\u3053\u306E\u3088\u3046\u306A\u30B1\u30FC\u30B9\u3092\u51E6\u7406\u3059\u308B\u305F\u3081\u306E\u512A\u308C\u305F\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u542B\u3080 "),Gr=r(Tt,"CODE",{});var Eh=p(Gr);vc=l(Eh,"nltk"),Eh.forEach(a),$c=l(Tt," \u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002\u3053\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306F\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306B "),Ur=r(Tt,"CODE",{});var yh=p(Ur);kc=l(yh,"pip"),yh.forEach(a),wc=l(Tt," \u3092\u7528\u3044\u3066\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Tt.forEach(a),mp=u(s),w(kl.$$.fragment,s),cp=u(s),Dn=r(s,"P",{});var xh=p(Dn);Ec=l(xh,"\u305D\u3057\u3066\u3001\u53E5\u8AAD\u70B9\u898F\u5247\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),xh.forEach(a),up=u(s),w(wl.$$.fragment,s),dp=u(s),vt=r(s,"P",{});var ri=p(vt);yc=l(ri,"\u6B21\u306B\u3001"),Mr=r(ri,"CODE",{});var qh=p(Mr);xc=l(qh,"nltk"),qh.forEach(a),qc=l(ri,"\u304B\u3089\u30BB\u30F3\u30C6\u30F3\u30B9\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u3001\u30EC\u30D3\u30E5\u30FC\u306E\u6700\u521D\u306E3\u6587\u3092\u62BD\u51FA\u3059\u308B\u7C21\u5358\u306A\u95A2\u6570\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u30C6\u30AD\u30B9\u30C8\u306E\u8981\u7D04\u3067\u306F\u3001\u5404\u8981\u7D04\u3092\u6539\u884C\u3067\u533A\u5207\u308B\u306E\u304C\u6163\u4F8B\u306A\u306E\u3067\u3001\u3053\u308C\u3082\u542B\u3081\u3066\u5B66\u7FD2\u4F8B\u3067\u30C6\u30B9\u30C8\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),ri.forEach(a),hp=u(s),w(El.$$.fragment,s),fp=u(s),w(yl.$$.fragment,s),_p=u(s),zn=r(s,"P",{});var Th=p(zn);Tc=l(Th,"\u3053\u308C\u306F\u3046\u307E\u304F\u3044\u304D\u305D\u3046\u306A\u306E\u3067\u3001\u4ECA\u5EA6\u306F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304B\u3089\u3053\u308C\u3089\u306E\u300C\u8981\u7D04\u300D\u3092\u62BD\u51FA\u3057\u3001\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u306EROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u95A2\u6570\u3092\u5B9F\u88C5\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Th.forEach(a),bp=u(s),w(xl.$$.fragment,s),gp=u(s),On=r(s,"P",{});var Dh=p(On);Dc=l(Dh,"\u305D\u3057\u3066\u3001\u3053\u306E\u95A2\u6570\u3092\u4F7F\u3063\u3066\u691C\u8A3C\u30BB\u30C3\u30C8\u306EROUGE\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3057\u3001Pandas\u3092\u4F7F\u3063\u3066\u5C11\u3057\u304D\u308C\u3044\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Dh.forEach(a),jp=u(s),w(ql.$$.fragment,s),vp=u(s),w(Tl.$$.fragment,s),$p=u(s),Sn=r(s,"P",{});var zh=p(Sn);zc=l(zh,"rouge2`\u306E\u30B9\u30B3\u30A2\u304C\u4ED6\u3088\u308A\u304B\u306A\u308A\u4F4E\u3044\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u30EC\u30D3\u30E5\u30FC\u306E\u30BF\u30A4\u30C8\u30EB\u304C\u4E00\u822C\u7684\u306B\u7C21\u6F54\u3067\u3042\u308B\u305F\u3081\u3001lead-3\u306E\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u304C\u5197\u9577\u3059\u304E\u308B\u3068\u3044\u3046\u4E8B\u5B9F\u3092\u53CD\u6620\u3057\u3066\u3044\u308B\u3068\u601D\u308F\u308C\u307E\u3059\u3002\u3053\u308C\u3067\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u304C\u3067\u304D\u305F\u306E\u3067\u3001\u6B21\u306FmT5\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3044\u307E\u3059\uFF01"),zh.forEach(a),kp=u(s),ra.l(s),Cn=u(s),w($t.$$.fragment,s),wp=u(s),Pn=r(s,"P",{});var Oh=p(Pn);Oc=l(Oh,"\u6B21\u306B\u5FC5\u8981\u306A\u306E\u306F\u3001\u30CF\u30F3\u30AE\u30F3\u30B0\u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6\u306B\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u3053\u306E\u30B3\u30FC\u30C9\u3092\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067\u5B9F\u884C\u3059\u308B\u5834\u5408\u306F\u3001\u6B21\u306E\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u95A2\u6570\u3067\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002"),Oh.forEach(a),Ep=u(s),w(Dl.$$.fragment,s),yp=u(s),An=r(s,"P",{});var Sh=p(An);Sc=l(Sh,"\u3053\u308C\u306B\u3088\u308A\u3001\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u8868\u793A\u3055\u308C\u3001\u8A8D\u8A3C\u60C5\u5831\u3092\u5165\u529B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307E\u305F\u306F\u3001\u30BF\u30FC\u30DF\u30CA\u30EB\u3067\u4EE5\u4E0B\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u3057\u3001\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002"),Sh.forEach(a),xp=u(s),w(zl.$$.fragment,s),qp=u(s),Cs&&Cs.l(s),Rn=u(s),kt=r(s,"P",{});var oi=p(kt);Cc=l(oi,"\u6B21\u306B\u3001\u30B7\u30FC\u30B1\u30F3\u30B9\u9593\u30BF\u30B9\u30AF\u306E\u305F\u3081\u306E\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002mT5\u306F\u30A8\u30F3\u30B3\u30FC\u30C0\u30FB\u30C7\u30B3\u30FC\u30C0\u306ETransformer\u30E2\u30C7\u30EB\u306A\u306E\u3067\u3001\u30D0\u30C3\u30C1\u3092\u6E96\u5099\u3059\u308B\u969B\u306E\u4E00\u3064\u306E\u3061\u3087\u3063\u3068\u3057\u305F\u5DEE\u7570\u306F\u3001\u30C7\u30B3\u30FC\u30C9\u4E2D\u306B\u30E9\u30D9\u30EB\u3092\u53F3\u306B1\u3064\u30B7\u30D5\u30C8\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u3067\u3059\u3002\u3053\u308C\u306F\u3001\u30C7\u30B3\u30FC\u30C0\u304C\u4EE5\u524D\u306E\u771F\u5B9F\u306E\u30E9\u30D9\u30EB\u3057\u304B\u898B\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u305F\u3081\u3067\u3001\u73FE\u5728\u3084\u5C06\u6765\u306E\u30E9\u30D9\u30EB\u3092\u30E2\u30C7\u30EB\u306B\u8A18\u61B6\u3055\u305B\u306A\u3044\u3088\u3046\u306B\u3057\u3046\u307E\u3059\u3002\u3053\u308C\u306F"),Ln=r(oi,"A",{href:!0});var Ch=p(Ln);Pc=l(Ch,"\u56E0\u679C\u8A00\u8A9E\u30E2\u30C7\u30EA\u30F3\u30B0"),Ch.forEach(a),Ac=l(oi,"\u306E\u3088\u3046\u306A\u30BF\u30B9\u30AF\u3067\u30DE\u30B9\u30AF\u3055\u308C\u305F\u81EA\u5DF1\u6CE8\u610F\u304C\u5165\u529B\u306B\u9069\u7528\u3055\u308C\u308B\u65B9\u6CD5\u306B\u4F3C\u3066\u3044\u307E\u3059\u3002"),oi.forEach(a),Tp=u(s),Ie=r(s,"P",{});var Dt=p(Ie);Rc=l(Dt,"\u5E78\u904B\u306A\u3053\u3068\u306B\u3001\u{1F917} Transformers \u306F "),Nr=r(Dt,"CODE",{});var Ph=p(Nr);Lc=l(Ph,"DataCollatorForSeq2Seq"),Ph.forEach(a),Ic=l(Dt," \u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u63D0\u4F9B\u3057\u3001\u5165\u529B\u3068\u30E9\u30D9\u30EB\u3092\u52D5\u7684\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u3066\u304F\u308C\u307E\u3059\u3002\u3053\u306E\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3059\u308B\u306B\u306F\u3001\u5358\u306B "),Fr=r(Dt,"CODE",{});var Ah=p(Fr);Gc=l(Ah,"tokenizer"),Ah.forEach(a),Uc=l(Dt," \u3068 "),Hr=r(Dt,"CODE",{});var Rh=p(Hr);Mc=l(Rh,"model"),Rh.forEach(a),Nc=l(Dt," \u3092\u63D0\u4F9B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Dt.forEach(a),Dp=u(s),pa.l(s),In=u(s),Gn=r(s,"P",{});var Lh=p(Gn);Fc=l(Lh,"\u305D\u308C\u3067\u306F\u3001\u3053\u306E\u30B3\u30EC\u30FC\u30BF\u30FC\u304C\u5C11\u91CF\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u30D0\u30C3\u30C1\u3067\u4E0E\u3048\u305F\u3068\u304D\u306B\u4F55\u3092\u751F\u6210\u3059\u308B\u304B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u307E\u305A\u3001\u6587\u5B57\u5217\u3092\u542B\u3080\u5217\u3092\u524A\u9664\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30B3\u30EC\u30FC\u30BF\u30FC\u306F\u3053\u308C\u3089\u306E\u8981\u7D20\u3092\u3069\u306E\u3088\u3046\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3059\u308B\u304B\u3092\u77E5\u3089\u306A\u3044\u304B\u3089\u3067\u3059\u3002"),Lh.forEach(a),zp=u(s),w(Ol.$$.fragment,s),Op=u(s),wa=r(s,"P",{});var tr=p(wa);Hc=l(tr,"\u30B3\u30EC\u30FC\u30BF\u30FC \u306F "),Br=r(tr,"CODE",{});var Ih=p(Br);Bc=l(Ih,"dict"),Ih.forEach(a),Wc=l(tr," \u306E\u30EA\u30B9\u30C8\u3092\u53D7\u3051\u53D6\u308A\u3001\u5404 "),Wr=r(tr,"CODE",{});var Gh=p(Wr);Kc=l(Gh,"dict"),Gh.forEach(a),Vc=l(tr," \u306F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u5185\u306E 1 \u3064\u306E\u4F8B\u3092\u8868\u3057\u3066\u3044\u308B\u4E8B\u3092\u671F\u5F85\u3057\u3066\u3044\u307E\u3059\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u30C7\u30FC\u30BF\u3092\u30B3\u30EC\u30FC\u30BF\u30FC\u306B\u6E21\u3059\u524D\u306B\u671F\u5F85\u901A\u308A\u306E\u5F62\u5F0F\u306B\u5909\u63DB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),tr.forEach(a),Sp=u(s),w(Sl.$$.fragment,s),Cp=u(s),w(Cl.$$.fragment,s),Pp=u(s),xs=r(s,"P",{});var Is=p(xs);Yc=l(Is,"\u3053\u3053\u3067\u6CE8\u76EE\u3059\u3079\u304D\u306F\u3001\u6700\u521D\u306E\u4F8B\u306F2\u756A\u76EE\u306E\u4F8B\u3088\u308A\u3082\u9577\u3044\u306E\u3067\u30012\u756A\u76EE\u306E\u4F8B\u306E "),Kr=r(Is,"CODE",{});var Uh=p(Kr);Jc=l(Uh,"input_ids"),Uh.forEach(a),Xc=l(Is," \u3068 "),Vr=r(Is,"CODE",{});var Mh=p(Vr);Zc=l(Mh,"attention_mask"),Mh.forEach(a),Qc=l(Is," \u306F\u53F3\u5074\u306B "),Yr=r(Is,"CODE",{});var Nh=p(Yr);su=l(Nh,"[PAD]"),Nh.forEach(a),eu=l(Is," \u30C8\u30FC\u30AF\u30F3 (ID \u306F "),Jr=r(Is,"CODE",{});var Fh=p(Jr);au=l(Fh,"0"),Fh.forEach(a),tu=l(Is,") \u3067\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u3067\u3059\u3002\u540C\u69D8\u306B\u3001"),Xr=r(Is,"CODE",{});var Hh=p(Xr);lu=l(Hh,"labels"),Hh.forEach(a),nu=l(Is," \u306F "),Zr=r(Is,"CODE",{});var Bh=p(Zr);ru=l(Bh,"-100"),Bh.forEach(a),ou=l(Is," \u3067\u30D1\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u30D1\u30C7\u30A3\u30F3\u30B0\u30C8\u30FC\u30AF\u30F3\u304C\u640D\u5931\u95A2\u6570\u306B\u3088\u3063\u3066\u7121\u8996\u3055\u308C\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3067\u3059\u3002\u305D\u3057\u3066\u6700\u5F8C\u306B\u3001\u65B0\u3057\u3044 "),Qr=r(Is,"CODE",{});var Wh=p(Qr);pu=l(Wh,"decoder_input_ids"),Wh.forEach(a),iu=l(Is," \u3092\u898B\u308B\u3068\u3001\u6700\u521D\u306E\u30A8\u30F3\u30C8\u30EA\u306B "),so=r(Is,"CODE",{});var Kh=p(so);mu=l(Kh,"[PAD]"),Kh.forEach(a),cu=l(Is," \u30C8\u30FC\u30AF\u30F3\u3092\u633F\u5165\u3057\u3066\u30E9\u30D9\u30EB\u3092\u53F3\u306B\u30B7\u30D5\u30C8\u3057\u3066\u3044\u308B\u3053\u3068\u304C\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002"),Is.forEach(a),Ap=u(s),ma.l(s),Un=u(s),Ps&&Ps.l(s),Mn=u(s),Pl=r(s,"H2",{id:!0});var Vh=p(Pl);uu=l(Vh,"\u3042\u306A\u305F\u306E\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3059\u308B"),Vh.forEach(a),Rp=u(s),wt=r(s,"P",{});var pi=p(wt);du=l(pi,"\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3089\u3001\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304B "),eo=r(pi,"CODE",{});var Yh=p(eo);hu=l(Yh,"pipeline"),Yh.forEach(a),fu=l(pi," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F7F\u3063\u3066\u3001\u6B21\u306E\u3088\u3046\u306B\u64CD\u4F5C\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),pi.forEach(a),Lp=u(s),w(Al.$$.fragment,s),Ip=u(s),Nn=r(s,"P",{});var Jh=p(Nn);_u=l(Jh,"\u8981\u7D04\u306E\u54C1\u8CEA\u306B\u3064\u3044\u3066\u611F\u89E6\u3092\u5F97\u308B\u305F\u3081\u306B\u3001\u30C6\u30B9\u30C8\u30BB\u30C3\u30C8\uFF08\u30E2\u30C7\u30EB\u306F\u898B\u305F\u4E8B\u304C\u306A\u3044\uFF09\u304B\u3089\u3044\u304F\u3064\u304B\u306E\u4F8B\u3092\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306B\u9001\u308A\u8FBC\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u6700\u521D\u306B\u3001\u30EC\u30D3\u30E5\u30FC\u3001\u30BF\u30A4\u30C8\u30EB\u3001\u751F\u6210\u3055\u308C\u305F\u8981\u7D04\u3092\u4E00\u7DD2\u306B\u8868\u793A\u3059\u308B\u7C21\u5358\u306A\u95A2\u6570\u3092\u5B9F\u88C5\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Jh.forEach(a),Gp=u(s),w(Rl.$$.fragment,s),Up=u(s),Fn=r(s,"P",{});var Xh=p(Fn);bu=l(Xh,"\u82F1\u8A9E\u306E\u4F8B\u3092\u4E00\u3064\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Xh.forEach(a),Mp=u(s),w(Ll.$$.fragment,s),Np=u(s),w(Il.$$.fragment,s),Fp=u(s),Hn=r(s,"P",{});var Zh=p(Hn);gu=l(Zh,"\u3053\u308C\u306F\u60AA\u304F\u3042\u308A\u307E\u305B\u3093! \u79C1\u305F\u3061\u306E\u30E2\u30C7\u30EB\u306F\u5B9F\u969B\u306B\u65B0\u3057\u3044\u5358\u8A9E\u3067\u30EC\u30D3\u30E5\u30FC\u306E\u4E00\u90E8\u3092\u88DC\u5F37\u3059\u308B\u3053\u3068\u306B\u3088\u3063\u3066\u3001\u62BD\u8C61\u7684\u306A\u8981\u7D04\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u305F\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002\u307E\u305F\u3001\u79C1\u305F\u3061\u306E\u30E2\u30C7\u30EB\u306E\u6700\u3082\u30AF\u30FC\u30EB\u306A\u70B9\u306F\u3001\u30D0\u30A4\u30EA\u30F3\u30AC\u30EB\u3067\u3042\u308B\u3053\u3068\u3067\u3059\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u30B9\u30DA\u30A4\u30F3\u8A9E\u306E\u30EC\u30D3\u30E5\u30FC\u306E\u8981\u7D04\u3082\u751F\u6210\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Zh.forEach(a),Hp=u(s),w(Gl.$$.fragment,s),Bp=u(s),w(Ul.$$.fragment,s),Wp=u(s),Bn=r(s,"P",{});var Qh=p(Bn);ju=l(Qh,"\u8981\u7D04\u306F\u82F1\u8A9E\u3067\u300CVery easy to read\u300D\u3068\u8A33\u3055\u308C\u3001\u3053\u306E\u8981\u7D04\u306E\u5834\u5408\u306F\u30EC\u30D3\u30E5\u30FC\u306E\u6587\u4E2D\u304B\u3089\u76F4\u63A5\u62BD\u51FA\u3055\u308C\u305F\u3053\u3068\u304C\u5206\u304B\u308A\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u3053\u308C\u306FmT5\u30E2\u30C7\u30EB\u306E\u591A\u7528\u9014\u6027\u3092\u793A\u3057\u3066\u304A\u308A\u3001\u591A\u8A00\u8A9E\u30B3\u30FC\u30D1\u30B9\u3092\u6271\u3046\u3053\u3068\u304C\u3069\u306E\u3088\u3046\u306A\u3082\u306E\u304B\u3092\u4F53\u9A13\u3057\u3066\u3044\u305F\u3060\u3051\u305F\u3068\u601D\u3044\u307E\u3059\u3002"),Qh.forEach(a),Kp=u(s),Wn=r(s,"P",{});var sf=p(Wn);vu=l(sf,"\u6B21\u306B\u3001\u3082\u3046\u5C11\u3057\u8907\u96D1\u306A\u30BF\u30B9\u30AF\u3067\u3042\u308B\u3001\u30BC\u30ED\u304B\u3089\u8A00\u8A9E\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3055\u305B\u308B\u4E8B\u306B\u76EE\u3092\u5411\u3051\u307E\u3059\u3002"),sf.forEach(a),this.h()},h(){v(d,"name","hf:doc:metadata"),v(d,"content",JSON.stringify(Sf)),v(R,"id",""),v(T,"href","https://huggingface.co/models?pipeline_tag=summarization&sort=downloads"),v(T,"rel","nofollow"),v(ss,"href","https://huggingface.co/huggingface-course/mt5-small-finetuned-amazon-en-es"),v(ss,"rel","nofollow"),mo(J.src,es="https://hf.space/gradioiframe/course-demos/mt5-small-finetuned-amazon-en-es/+")||v(J,"src",es),v(J,"frameborder","0"),v(J,"height","400"),v(J,"title","Gradio app"),v(J,"class","block dark:hidden container p-0 flex-grow space-iframe"),v(J,"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"),v(J,"sandbox","allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads"),v(K,"id",""),v(cs,"href","https://huggingface.co/datasets/amazon_reviews_multi"),v(cs,"rel","nofollow"),v(Xs,"href","/course/ja/chapter5"),v(be,"href","/course/ja/chapter5"),v(te,"class","block dark:hidden"),mo(te.src,Ft="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter7/review-lengths.svg")||v(te,"src",Ft),v(te,"alt","Word count distributions for the review titles and texts."),v(aa,"class","hidden dark:block"),mo(aa.src,tt="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter7/review-lengths-dark.svg")||v(aa,"src",tt),v(aa,"alt","Word count distributions for the review titles and texts."),v(pe,"class","flex justify-center"),v(ie,"id",""),v(Pa,"href","/course/ja/chapter1"),v(Ra,"align","center"),v(La,"align","center"),v(ja,"href","https://huggingface.co/gpt2-xl"),v(ja,"rel","nofollow"),v(Ia,"align","center"),v(Ga,"align","center"),v($a,"href","https://huggingface.co/google/pegasus-large"),v($a,"rel","nofollow"),v(Ua,"align","center"),v(on,"align","center"),v(Kt,"href","https://huggingface.co/t5-base"),v(Kt,"rel","nofollow"),v(pn,"align","center"),v(mn,"align","center"),v(Yt,"href","https://huggingface.co/google/mt5-base"),v(Yt,"rel","nofollow"),v(cn,"align","center"),v(un,"align","center"),v(Jt,"href","https://huggingface.co/facebook/bart-base"),v(Jt,"rel","nofollow"),v(dn,"align","center"),v(hn,"align","center"),v(Xt,"href","https://huggingface.co/facebook/mbart-large-50"),v(Xt,"rel","nofollow"),v(fn,"align","center"),v(_n,"align","center"),v(Zt,"class","block dark:hidden"),mo(Zt.src,yu="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter7/t5.svg")||v(Zt,"src",yu),v(Zt,"alt","Different tasks performed by the T5 architecture."),v(Qt,"class","hidden dark:block"),mo(Qt.src,xu="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter7/t5-dark.svg")||v(Qt,"src",xu),v(Qt,"alt","Different tasks performed by the T5 architecture."),v(Ba,"class","flex justify-center"),v(sl,"id",""),v($n,"href","/course/ja/chapter3"),v(kn,"href","/course/ja/chapter6"),v(il,"id",""),v(cl,"href","https://en.wikipedia.org/wiki/ROUGE_(metric)"),v(cl,"rel","nofollow"),Bo.a=null,Ko.a=null,v($l,"id",""),v(Ln,"href","/course/ja/chapter7/6"),v(Pl,"id","")},m(s,i){e(document.head,d),o(s,j,i),E(h,s,i),o(s,x,i),o(s,R,i),e(R,q),o(s,P,i),Ml[S].m(s,i),o(s,O,i),o(s,A,i),e(A,C),e(A,L),e(L,F),e(A,X),o(s,Z,i),E(H,s,i),o(s,M,i),o(s,W,i),e(W,T),e(T,G),e(W,rs),e(W,ss),e(ss,ls),e(W,Q),o(s,Y,i),o(s,J,i),o(s,$s,i),o(s,as,i),e(as,Ds),o(s,ms,i),o(s,K,i),e(K,os),o(s,qs,i),o(s,ts,i),e(ts,cs),e(cs,gs),e(ts,us),o(s,ds,i),E(ps,s,i),o(s,ks,i),E(f,s,i),o(s,U,i),o(s,V,i),e(V,g),e(V,N),e(N,Ss),e(V,Ts),e(V,zs),e(zs,_s),e(V,hs),e(V,js),e(js,Ys),e(V,is),e(V,Fs),e(Fs,Hs),e(V,$e),e(V,Gs),e(Gs,le),e(V,Js),e(V,Xs),e(Xs,Bs),e(V,Fe),o(s,de,i),E(vs,s,i),o(s,ne,i),E(Zs,s,i),o(s,he,i),E(Es,s,i),o(s,fe,i),o(s,I,i),e(I,ns),e(I,ke),e(ke,He),e(I,bs),e(I,we),e(we,Be),e(I,re),o(s,Ee,i),E(Us,s,i),o(s,We,i),E(fs,s,i),o(s,Qs,i),o(s,ys,i),e(ys,Ms),e(ys,_e),e(_e,ye),e(ys,ca),e(ys,xe),e(xe,Os),e(ys,ua),e(ys,be),e(be,Ke),e(ys,ge),e(ys,qa),e(qa,Ka),e(ys,Ve),o(s,Ta,i),E(se,s,i),o(s,Da,i),o(s,ws,i),e(ws,Ot),e(ws,da),e(da,Ye),e(ws,Va),e(ws,oe),e(oe,St),e(ws,za),e(ws,Oa),e(Oa,Ct),e(ws,Ya),e(ws,je),e(je,Pt),e(ws,Ja),e(ws,qe),e(qe,At),e(ws,Xa),o(s,Ns,i),E(ee,s,i),o(s,Za,i),o(s,Te,i),e(Te,Rt),o(s,Qa,i),E(Je,s,i),o(s,ha,i),E(Xe,s,i),o(s,st,i),o(s,As,i),e(As,Lt),e(As,Sa),e(Sa,ae),e(As,It),e(As,Ze),e(Ze,Gt),e(As,Ut),e(As,Qe),e(Qe,Mt),e(As,Nt),o(s,fa,i),E(sa,s,i),o(s,et,i),E(De,s,i),o(s,ea,i),o(s,_a,i),e(_a,at),o(s,ze,i),o(s,pe,i),e(pe,te),e(pe,Oe),e(pe,aa),o(s,lt,i),o(s,Se,i),e(Se,nt),e(Se,m),e(m,D),e(Se,Wl),o(s,Ht,i),E(ba,s,i),o(s,ta,i),o(s,Ca,i),e(Ca,Kl),o(s,Bt,i),o(s,ie,i),e(ie,Vl),o(s,Wt,i),o(s,ve,i),e(ve,Yl),e(ve,Pa),e(Pa,rt),e(ve,Jl),o(s,Aa,i),o(s,la,i),e(la,ot),e(ot,Ws),e(Ws,Ra),e(Ra,Xl),e(Ws,Zl),e(Ws,pt),e(pt,Ql),e(Ws,ga),e(Ws,La),e(La,sn),e(la,en),e(la,Rs),e(Rs,me),e(me,Ia),e(Ia,ja),e(ja,an),e(me,Ce),e(me,va),e(va,tn),e(me,ln),e(me,Ga),e(Ga,Pe),e(Rs,nn),e(Rs,Ae),e(Ae,Ua),e(Ua,$a),e($a,it),e(Ae,rn),e(Ae,rr),e(rr,ii),e(Ae,mi),e(Ae,on),e(on,ci),e(Rs,ui),e(Rs,Ma),e(Ma,pn),e(pn,Kt),e(Kt,di),e(Ma,hi),e(Ma,Vt),e(Vt,fi),e(Vt,or),e(or,_i),e(Vt,bi),e(Ma,gi),e(Ma,mn),e(mn,ji),e(Rs,vi),e(Rs,Na),e(Na,cn),e(cn,Yt),e(Yt,$i),e(Na,ki),e(Na,pr),e(pr,wi),e(Na,Ei),e(Na,un),e(un,yi),e(Rs,xi),e(Rs,Fa),e(Fa,dn),e(dn,Jt),e(Jt,qi),e(Fa,Ti),e(Fa,ir),e(ir,Di),e(Fa,zi),e(Fa,hn),e(hn,Oi),e(Rs,Si),e(Rs,Ha),e(Ha,fn),e(fn,Xt),e(Xt,Ci),e(Ha,Pi),e(Ha,mr),e(mr,Ai),e(Ha,Ri),e(Ha,_n),e(_n,Li),o(s,co,i),o(s,bn,i),e(bn,Ii),o(s,uo,i),o(s,gn,i),e(gn,Gi),o(s,ho,i),o(s,Ba,i),e(Ba,Zt),e(Ba,Ui),e(Ba,Qt),o(s,fo,i),o(s,jn,i),e(jn,Mi),o(s,_o,i),E(mt,s,i),o(s,bo,i),o(s,sl,i),e(sl,Ni),o(s,go,i),E(el,s,i),o(s,jo,i),o(s,ct,i),e(ct,Fi),e(ct,cr),e(cr,Hi),e(ct,Bi),o(s,vo,i),E(al,s,i),o(s,$o,i),E(ut,s,i),o(s,ko,i),o(s,vn,i),e(vn,Wi),o(s,wo,i),E(tl,s,i),o(s,Eo,i),E(ll,s,i),o(s,yo,i),o(s,ce,i),e(ce,Ki),e(ce,$n),e($n,Vi),e(ce,Yi),e(ce,ur),e(ur,Ji),e(ce,Xi),e(ce,dr),e(dr,Zi),e(ce,Qi),e(ce,hr),e(hr,sm),e(ce,em),o(s,xo,i),E(nl,s,i),o(s,qo,i),E(rl,s,i),o(s,To,i),o(s,Re,i),e(Re,am),e(Re,fr),e(fr,tm),e(Re,lm),e(Re,_r),e(_r,nm),e(Re,rm),e(Re,kn),e(kn,om),e(Re,pm),o(s,Do,i),o(s,dt,i),e(dt,im),e(dt,br),e(br,mm),e(dt,cm),o(s,zo,i),o(s,wn,i),e(wn,um),o(s,Oo,i),E(ol,s,i),o(s,So,i),o(s,ue,i),e(ue,dm),e(ue,gr),e(gr,hm),e(ue,fm),e(ue,jr),e(jr,_m),e(ue,bm),e(ue,vr),e(vr,gm),e(ue,jm),e(ue,$r),e($r,vm),e(ue,$m),o(s,Co,i),o(s,Wa,i),e(Wa,kr),e(kr,km),e(Wa,wm),e(Wa,wr),e(wr,Em),e(Wa,ym),o(s,Po,i),E(pl,s,i),o(s,Ao,i),o(s,En,i),e(En,xm),o(s,Ro,i),E(ht,s,i),o(s,Lo,i),o(s,il,i),e(il,qm),o(s,Io,i),E(ml,s,i),o(s,Go,i),o(s,yn,i),e(yn,Tm),o(s,Uo,i),o(s,ft,i),e(ft,Dm),e(ft,cl),e(cl,zm),e(ft,Om),o(s,Mo,i),E(ul,s,i),o(s,No,i),o(s,ka,i),e(ka,Sm),e(ka,Er),e(Er,Cm),e(ka,Pm),e(ka,yr),e(yr,Am),e(ka,Rm),o(s,Fo,i),E(_t,s,i),o(s,Ho,i),o(s,dl,i),e(dl,Lm),Bo.m(rf,dl),o(s,Wo,i),o(s,hl,i),e(hl,Im),Ko.m(of,hl),o(s,Vo,i),o(s,bt,i),e(bt,Gm),e(bt,xr),e(xr,Um),e(bt,Mm),o(s,Yo,i),E(fl,s,i),o(s,Jo,i),o(s,xn,i),e(xn,Nm),o(s,Xo,i),E(_l,s,i),o(s,Zo,i),o(s,gt,i),e(gt,Fm),e(gt,qr),e(qr,Hm),e(gt,Bm),o(s,Qo,i),E(bl,s,i),o(s,sp,i),E(gl,s,i),o(s,ep,i),o(s,qn,i),e(qn,Wm),o(s,ap,i),o(s,Ks,i),e(Ks,Km),e(Ks,Tr),e(Tr,Vm),e(Ks,Ym),e(Ks,Dr),e(Dr,Jm),e(Ks,Xm),e(Ks,zr),e(zr,Zm),e(Ks,Qm),e(Ks,Or),e(Or,sc),e(Ks,ec),e(Ks,Sr),e(Sr,ac),e(Ks,tc),o(s,tp,i),E(jl,s,i),o(s,lp,i),E(vl,s,i),o(s,np,i),o(s,Vs,i),e(Vs,lc),e(Vs,Cr),e(Cr,nc),e(Vs,rc),e(Vs,Pr),e(Pr,oc),e(Vs,pc),e(Vs,Ar),e(Ar,ic),e(Vs,mc),e(Vs,Rr),e(Rr,cc),e(Vs,uc),e(Vs,Lr),e(Lr,dc),e(Vs,hc),o(s,rp,i),E(jt,s,i),o(s,op,i),o(s,Tn,i),e(Tn,fc),o(s,pp,i),o(s,$l,i),e($l,_c),o(s,ip,i),o(s,Le,i),e(Le,bc),e(Le,Ir),e(Ir,gc),e(Le,jc),e(Le,Gr),e(Gr,vc),e(Le,$c),e(Le,Ur),e(Ur,kc),e(Le,wc),o(s,mp,i),E(kl,s,i),o(s,cp,i),o(s,Dn,i),e(Dn,Ec),o(s,up,i),E(wl,s,i),o(s,dp,i),o(s,vt,i),e(vt,yc),e(vt,Mr),e(Mr,xc),e(vt,qc),o(s,hp,i),E(El,s,i),o(s,fp,i),E(yl,s,i),o(s,_p,i),o(s,zn,i),e(zn,Tc),o(s,bp,i),E(xl,s,i),o(s,gp,i),o(s,On,i),e(On,Dc),o(s,jp,i),E(ql,s,i),o(s,vp,i),E(Tl,s,i),o(s,$p,i),o(s,Sn,i),e(Sn,zc),o(s,kp,i),Nl[na].m(s,i),o(s,Cn,i),E($t,s,i),o(s,wp,i),o(s,Pn,i),e(Pn,Oc),o(s,Ep,i),E(Dl,s,i),o(s,yp,i),o(s,An,i),e(An,Sc),o(s,xp,i),E(zl,s,i),o(s,qp,i),Cs&&Cs.m(s,i),o(s,Rn,i),o(s,kt,i),e(kt,Cc),e(kt,Ln),e(Ln,Pc),e(kt,Ac),o(s,Tp,i),o(s,Ie,i),e(Ie,Rc),e(Ie,Nr),e(Nr,Lc),e(Ie,Ic),e(Ie,Fr),e(Fr,Gc),e(Ie,Uc),e(Ie,Hr),e(Hr,Mc),e(Ie,Nc),o(s,Dp,i),Fl[oa].m(s,i),o(s,In,i),o(s,Gn,i),e(Gn,Fc),o(s,zp,i),E(Ol,s,i),o(s,Op,i),o(s,wa,i),e(wa,Hc),e(wa,Br),e(Br,Bc),e(wa,Wc),e(wa,Wr),e(Wr,Kc),e(wa,Vc),o(s,Sp,i),E(Sl,s,i),o(s,Cp,i),E(Cl,s,i),o(s,Pp,i),o(s,xs,i),e(xs,Yc),e(xs,Kr),e(Kr,Jc),e(xs,Xc),e(xs,Vr),e(Vr,Zc),e(xs,Qc),e(xs,Yr),e(Yr,su),e(xs,eu),e(xs,Jr),e(Jr,au),e(xs,tu),e(xs,Xr),e(Xr,lu),e(xs,nu),e(xs,Zr),e(Zr,ru),e(xs,ou),e(xs,Qr),e(Qr,pu),e(xs,iu),e(xs,so),e(so,mu),e(xs,cu),o(s,Ap,i),Hl[ia].m(s,i),o(s,Un,i),Ps&&Ps.m(s,i),o(s,Mn,i),o(s,Pl,i),e(Pl,uu),o(s,Rp,i),o(s,wt,i),e(wt,du),e(wt,eo),e(eo,hu),e(wt,fu),o(s,Lp,i),E(Al,s,i),o(s,Ip,i),o(s,Nn,i),e(Nn,_u),o(s,Gp,i),E(Rl,s,i),o(s,Up,i),o(s,Fn,i),e(Fn,bu),o(s,Mp,i),E(Ll,s,i),o(s,Np,i),E(Il,s,i),o(s,Fp,i),o(s,Hn,i),e(Hn,gu),o(s,Hp,i),E(Gl,s,i),o(s,Bp,i),E(Ul,s,i),o(s,Wp,i),o(s,Bn,i),e(Bn,ju),o(s,Kp,i),o(s,Wn,i),e(Wn,vu),Vp=!0},p(s,[i]){const ao={};i&1&&(ao.fw=s[0]),h.$set(ao);let Et=S;S=Tu(s),S!==Et&&(nr(),b(Ml[Et],1,1,()=>{Ml[Et]=null}),lr(),$=Ml[S],$||($=Ml[S]=qu[S](s),$.c()),_($,1),$.m(O.parentNode,O));const to={};i&2&&(to.$$scope={dirty:i,ctx:s}),Es.$set(to);const yt={};i&2&&(yt.$$scope={dirty:i,ctx:s}),mt.$set(yt);const lo={};i&2&&(lo.$$scope={dirty:i,ctx:s}),ut.$set(lo);const no={};i&2&&(no.$$scope={dirty:i,ctx:s}),ht.$set(no);const ro={};i&2&&(ro.$$scope={dirty:i,ctx:s}),_t.$set(ro);const oo={};i&2&&(oo.$$scope={dirty:i,ctx:s}),jt.$set(oo);let Bl=na;na=zu(s),na!==Bl&&(nr(),b(Nl[Bl],1,1,()=>{Nl[Bl]=null}),lr(),ra=Nl[na],ra||(ra=Nl[na]=Du[na](s),ra.c()),_(ra,1),ra.m(Cn.parentNode,Cn));const po={};i&2&&(po.$$scope={dirty:i,ctx:s}),$t.$set(po),s[0]==="pt"?Cs?i&1&&_(Cs,1):(Cs=tf(),Cs.c(),_(Cs,1),Cs.m(Rn.parentNode,Rn)):Cs&&(nr(),b(Cs,1,1,()=>{Cs=null}),lr());let Ls=oa;oa=Su(s),oa!==Ls&&(nr(),b(Fl[Ls],1,1,()=>{Fl[Ls]=null}),lr(),pa=Fl[oa],pa||(pa=Fl[oa]=Ou[oa](s),pa.c()),_(pa,1),pa.m(In.parentNode,In));let Kn=ia;ia=Pu(s),ia!==Kn&&(nr(),b(Hl[Kn],1,1,()=>{Hl[Kn]=null}),lr(),ma=Hl[ia],ma||(ma=Hl[ia]=Cu[ia](s),ma.c()),_(ma,1),ma.m(Un.parentNode,Un)),s[0]==="pt"?Ps?i&1&&_(Ps,1):(Ps=lf(s),Ps.c(),_(Ps,1),Ps.m(Mn.parentNode,Mn)):Ps&&(nr(),b(Ps,1,1,()=>{Ps=null}),lr())},i(s){Vp||(_(h.$$.fragment,s),_($),_(H.$$.fragment,s),_(ps.$$.fragment,s),_(f.$$.fragment,s),_(vs.$$.fragment,s),_(Zs.$$.fragment,s),_(Es.$$.fragment,s),_(Us.$$.fragment,s),_(fs.$$.fragment,s),_(se.$$.fragment,s),_(ee.$$.fragment,s),_(Je.$$.fragment,s),_(Xe.$$.fragment,s),_(sa.$$.fragment,s),_(De.$$.fragment,s),_(ba.$$.fragment,s),_(mt.$$.fragment,s),_(el.$$.fragment,s),_(al.$$.fragment,s),_(ut.$$.fragment,s),_(tl.$$.fragment,s),_(ll.$$.fragment,s),_(nl.$$.fragment,s),_(rl.$$.fragment,s),_(ol.$$.fragment,s),_(pl.$$.fragment,s),_(ht.$$.fragment,s),_(ml.$$.fragment,s),_(ul.$$.fragment,s),_(_t.$$.fragment,s),_(fl.$$.fragment,s),_(_l.$$.fragment,s),_(bl.$$.fragment,s),_(gl.$$.fragment,s),_(jl.$$.fragment,s),_(vl.$$.fragment,s),_(jt.$$.fragment,s),_(kl.$$.fragment,s),_(wl.$$.fragment,s),_(El.$$.fragment,s),_(yl.$$.fragment,s),_(xl.$$.fragment,s),_(ql.$$.fragment,s),_(Tl.$$.fragment,s),_(ra),_($t.$$.fragment,s),_(Dl.$$.fragment,s),_(zl.$$.fragment,s),_(Cs),_(pa),_(Ol.$$.fragment,s),_(Sl.$$.fragment,s),_(Cl.$$.fragment,s),_(ma),_(Ps),_(Al.$$.fragment,s),_(Rl.$$.fragment,s),_(Ll.$$.fragment,s),_(Il.$$.fragment,s),_(Gl.$$.fragment,s),_(Ul.$$.fragment,s),Vp=!0)},o(s){b(h.$$.fragment,s),b($),b(H.$$.fragment,s),b(ps.$$.fragment,s),b(f.$$.fragment,s),b(vs.$$.fragment,s),b(Zs.$$.fragment,s),b(Es.$$.fragment,s),b(Us.$$.fragment,s),b(fs.$$.fragment,s),b(se.$$.fragment,s),b(ee.$$.fragment,s),b(Je.$$.fragment,s),b(Xe.$$.fragment,s),b(sa.$$.fragment,s),b(De.$$.fragment,s),b(ba.$$.fragment,s),b(mt.$$.fragment,s),b(el.$$.fragment,s),b(al.$$.fragment,s),b(ut.$$.fragment,s),b(tl.$$.fragment,s),b(ll.$$.fragment,s),b(nl.$$.fragment,s),b(rl.$$.fragment,s),b(ol.$$.fragment,s),b(pl.$$.fragment,s),b(ht.$$.fragment,s),b(ml.$$.fragment,s),b(ul.$$.fragment,s),b(_t.$$.fragment,s),b(fl.$$.fragment,s),b(_l.$$.fragment,s),b(bl.$$.fragment,s),b(gl.$$.fragment,s),b(jl.$$.fragment,s),b(vl.$$.fragment,s),b(jt.$$.fragment,s),b(kl.$$.fragment,s),b(wl.$$.fragment,s),b(El.$$.fragment,s),b(yl.$$.fragment,s),b(xl.$$.fragment,s),b(ql.$$.fragment,s),b(Tl.$$.fragment,s),b(ra),b($t.$$.fragment,s),b(Dl.$$.fragment,s),b(zl.$$.fragment,s),b(Cs),b(pa),b(Ol.$$.fragment,s),b(Sl.$$.fragment,s),b(Cl.$$.fragment,s),b(ma),b(Ps),b(Al.$$.fragment,s),b(Rl.$$.fragment,s),b(Ll.$$.fragment,s),b(Il.$$.fragment,s),b(Gl.$$.fragment,s),b(Ul.$$.fragment,s),Vp=!1},d(s){a(d),s&&a(j),y(h,s),s&&a(x),s&&a(R),s&&a(P),Ml[S].d(s),s&&a(O),s&&a(A),s&&a(Z),y(H,s),s&&a(M),s&&a(W),s&&a(Y),s&&a(J),s&&a($s),s&&a(as),s&&a(ms),s&&a(K),s&&a(qs),s&&a(ts),s&&a(ds),y(ps,s),s&&a(ks),y(f,s),s&&a(U),s&&a(V),s&&a(de),y(vs,s),s&&a(ne),y(Zs,s),s&&a(he),y(Es,s),s&&a(fe),s&&a(I),s&&a(Ee),y(Us,s),s&&a(We),y(fs,s),s&&a(Qs),s&&a(ys),s&&a(Ta),y(se,s),s&&a(Da),s&&a(ws),s&&a(Ns),y(ee,s),s&&a(Za),s&&a(Te),s&&a(Qa),y(Je,s),s&&a(ha),y(Xe,s),s&&a(st),s&&a(As),s&&a(fa),y(sa,s),s&&a(et),y(De,s),s&&a(ea),s&&a(_a),s&&a(ze),s&&a(pe),s&&a(lt),s&&a(Se),s&&a(Ht),y(ba,s),s&&a(ta),s&&a(Ca),s&&a(Bt),s&&a(ie),s&&a(Wt),s&&a(ve),s&&a(Aa),s&&a(la),s&&a(co),s&&a(bn),s&&a(uo),s&&a(gn),s&&a(ho),s&&a(Ba),s&&a(fo),s&&a(jn),s&&a(_o),y(mt,s),s&&a(bo),s&&a(sl),s&&a(go),y(el,s),s&&a(jo),s&&a(ct),s&&a(vo),y(al,s),s&&a($o),y(ut,s),s&&a(ko),s&&a(vn),s&&a(wo),y(tl,s),s&&a(Eo),y(ll,s),s&&a(yo),s&&a(ce),s&&a(xo),y(nl,s),s&&a(qo),y(rl,s),s&&a(To),s&&a(Re),s&&a(Do),s&&a(dt),s&&a(zo),s&&a(wn),s&&a(Oo),y(ol,s),s&&a(So),s&&a(ue),s&&a(Co),s&&a(Wa),s&&a(Po),y(pl,s),s&&a(Ao),s&&a(En),s&&a(Ro),y(ht,s),s&&a(Lo),s&&a(il),s&&a(Io),y(ml,s),s&&a(Go),s&&a(yn),s&&a(Uo),s&&a(ft),s&&a(Mo),y(ul,s),s&&a(No),s&&a(ka),s&&a(Fo),y(_t,s),s&&a(Ho),s&&a(dl),s&&a(Wo),s&&a(hl),s&&a(Vo),s&&a(bt),s&&a(Yo),y(fl,s),s&&a(Jo),s&&a(xn),s&&a(Xo),y(_l,s),s&&a(Zo),s&&a(gt),s&&a(Qo),y(bl,s),s&&a(sp),y(gl,s),s&&a(ep),s&&a(qn),s&&a(ap),s&&a(Ks),s&&a(tp),y(jl,s),s&&a(lp),y(vl,s),s&&a(np),s&&a(Vs),s&&a(rp),y(jt,s),s&&a(op),s&&a(Tn),s&&a(pp),s&&a($l),s&&a(ip),s&&a(Le),s&&a(mp),y(kl,s),s&&a(cp),s&&a(Dn),s&&a(up),y(wl,s),s&&a(dp),s&&a(vt),s&&a(hp),y(El,s),s&&a(fp),y(yl,s),s&&a(_p),s&&a(zn),s&&a(bp),y(xl,s),s&&a(gp),s&&a(On),s&&a(jp),y(ql,s),s&&a(vp),y(Tl,s),s&&a($p),s&&a(Sn),s&&a(kp),Nl[na].d(s),s&&a(Cn),y($t,s),s&&a(wp),s&&a(Pn),s&&a(Ep),y(Dl,s),s&&a(yp),s&&a(An),s&&a(xp),y(zl,s),s&&a(qp),Cs&&Cs.d(s),s&&a(Rn),s&&a(kt),s&&a(Tp),s&&a(Ie),s&&a(Dp),Fl[oa].d(s),s&&a(In),s&&a(Gn),s&&a(zp),y(Ol,s),s&&a(Op),s&&a(wa),s&&a(Sp),y(Sl,s),s&&a(Cp),y(Cl,s),s&&a(Pp),s&&a(xs),s&&a(Ap),Hl[ia].d(s),s&&a(Un),Ps&&Ps.d(s),s&&a(Mn),s&&a(Pl),s&&a(Rp),s&&a(wt),s&&a(Lp),y(Al,s),s&&a(Ip),s&&a(Nn),s&&a(Gp),y(Rl,s),s&&a(Up),s&&a(Fn),s&&a(Mp),y(Ll,s),s&&a(Np),y(Il,s),s&&a(Fp),s&&a(Hn),s&&a(Hp),y(Gl,s),s&&a(Bp),y(Ul,s),s&&a(Wp),s&&a(Bn),s&&a(Kp),s&&a(Wn)}}}const Sf={local:"",sections:[{local:"",title:"\u591A\u8A00\u8A9E\u30B3\u30FC\u30D1\u30B9\u306E\u6E96\u5099"},{local:"",title:"\u6587\u7AE0\u8981\u7D04\u7528\u30E2\u30C7\u30EB"},{local:"",title:"\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406"},{local:"",sections:[{local:"",title:"\u5F37\u529B\u306A\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u306E\u4F5C\u6210"}],title:"\u6587\u7AE0\u8981\u7D04\u306E\u305F\u3081\u306E\u6307\u6A19"},{local:"trainer-api-mt5",title:"Trainer API \u3092\u4F7F\u3063\u3066 mT5 \u3092\u5FAE\u8ABF\u6574\u3059\u308B"},{local:"kerasmt5",title:"Keras\u3067mT5\u3092\u5FAE\u8ABF\u6574\u3059\u308B"},{local:"mt5-accelerate",sections:[{local:"",title:"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u305F\u3081\u306E\u6E96\u5099"},{local:"",title:"\u5B66\u7FD2\u30EB\u30FC\u30D7"}],title:"mT5\u30E2\u30C7\u30EB\u3092 \u{1F917} Accelerate \u3092\u4F7F\u3063\u3066\u5FAE\u8ABF\u6574\u3059\u308B"},{local:"",title:"\u3042\u306A\u305F\u306E\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3059\u308B"}],title:"\u8981\u7D04"};function Cf(B,d,j){let h="pt";return df(()=>{const x=new URLSearchParams(window.location.search);j(0,h=x.get("fw")||"pt")}),[h]}class Mf extends pf{constructor(d){super();mf(this,d,Cf,Of,cf,{})}}export{Mf as default,Sf as metadata};
