import{S as gu,i as xu,s as ju,e as o,t as a,k as d,w as q,c as i,a as p,h as n,d as s,m as f,x as E,g as l,G as t,y,q as w,o as g,B as D,b as I,Y as vu,M as ku,Z as qu,N as Yd,p as xt,v as Eu,n as jt}from"../../chunks/vendor-hf-doc-builder.js";import{T as Cp}from"../../chunks/Tip-hf-doc-builder.js";import{Y as Tp}from"../../chunks/Youtube-hf-doc-builder.js";import{I as Zd}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as S}from"../../chunks/CodeBlock-hf-doc-builder.js";import{C as wu}from"../../chunks/CourseFloatingBanner-hf-doc-builder.js";import{F as yu}from"../../chunks/FrameworkSwitchCourse-hf-doc-builder.js";function Du(V){let c,$;return c=new wu({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/section7_tf.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/ja/chapter7/section7_tf.ipynb"}]}}),{c(){q(c.$$.fragment)},l(u){E(c.$$.fragment,u)},m(u,h){y(c,u,h),$=!0},i(u){$||(w(c.$$.fragment,u),$=!0)},o(u){g(c.$$.fragment,u),$=!1},d(u){D(c,u)}}}function Cu(V){let c,$;return c=new wu({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/section7_pt.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/ja/chapter7/section7_pt.ipynb"}]}}),{c(){q(c.$$.fragment)},l(u){E(c.$$.fragment,u)},m(u,h){y(c,u,h),$=!0},i(u){$||(w(c.$$.fragment,u),$=!0)},o(u){g(c.$$.fragment,u),$=!1},d(u){D(c,u)}}}function Tu(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H,A,T,Q;return{c(){c=o("p"),$=a("\u{1F4A1} BERT\u306E\u3088\u3046\u306A\u30A8\u30F3\u30B3\u30FC\u30C0\u306E\u307F\u306E\u30E2\u30C7\u30EB\u306F\u3001\u300C\u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u30FC\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u767A\u660E\u3057\u305F\u306E\u306F\u8AB0\u3067\u3059\u304B\uFF1F\u300D\u306E\u3088\u3046\u306A\u4E8B\u5B9F\u3068\u3057\u3066\u53D7\u3051\u5165\u308C\u3089\u308C\u3066\u3044\u308B\u89E3\u7B54\u304C\u5B58\u5728\u3059\u308B\u8CEA\u554F\u306B\u5BFE\u3057\u3066\u7B54\u3048\u3092\u62BD\u51FA\u3059\u308B\u306E\u306B\u306F\u512A\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u300C\u306A\u305C\u3001\u7A7A\u306F\u9752\u3044\u306E\u3067\u3059\u304B\uFF1F\u300D\u306E\u3088\u3046\u306A\u81EA\u7531\u5F62\u5F0F\u306E\u8CEA\u554F\u3092\u4E0E\u3048\u3089\u308C\u305F\u3068\u304D\u306B\u306F\u3046\u307E\u304F\u3044\u304B\u306A\u3044\u50BE\u5411\u304C\u3042\u308A\u307E\u3059\u3002"),u=d(),h=o("p"),P=a("\u3053\u306E\u3088\u3046\u306A\u96E3\u3057\u3044\u30B1\u30FC\u30B9\u3067\u306F\u3001T5\u3084BART\u306E\u3088\u3046\u306A\u30A8\u30F3\u30B3\u30FC\u30C0\u30FC\u30C7\u30B3\u30FC\u30C0\u30FC\u30E2\u30C7\u30EB\u304C\u3001"),x=o("a"),j=a("\u30C6\u30AD\u30B9\u30C8\u8981\u7D04"),b=a("\u306B\u975E\u5E38\u306B\u4F3C\u305F\u5178\u578B\u7684\u306A\u65B9\u6CD5\u3067\u60C5\u5831\u3092\u5408\u6210\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u30BF\u30A4\u30D7\u306E "),m=o("em"),k=a("\u751F\u6210\u7684"),v=a(" \u306A\u8CEA\u554F\u56DE\u7B54\u306B\u8208\u5473\u304C\u3042\u308B\u5834\u5408\u306F\u3001"),C=o("a"),M=a("ELI5\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),H=a("\u306B\u57FA\u3065\u304F\u79C1\u305F\u3061\u306E"),A=o("a"),T=a("\u30C7\u30E2"),Q=a("\u3092\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u3053\u3068\u3092\u304A\u52E7\u3081\u3057\u307E\u3059\u3002"),this.h()},l(R){c=i(R,"P",{});var z=p(c);$=n(z,"\u{1F4A1} BERT\u306E\u3088\u3046\u306A\u30A8\u30F3\u30B3\u30FC\u30C0\u306E\u307F\u306E\u30E2\u30C7\u30EB\u306F\u3001\u300C\u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u30FC\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u767A\u660E\u3057\u305F\u306E\u306F\u8AB0\u3067\u3059\u304B\uFF1F\u300D\u306E\u3088\u3046\u306A\u4E8B\u5B9F\u3068\u3057\u3066\u53D7\u3051\u5165\u308C\u3089\u308C\u3066\u3044\u308B\u89E3\u7B54\u304C\u5B58\u5728\u3059\u308B\u8CEA\u554F\u306B\u5BFE\u3057\u3066\u7B54\u3048\u3092\u62BD\u51FA\u3059\u308B\u306E\u306B\u306F\u512A\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u300C\u306A\u305C\u3001\u7A7A\u306F\u9752\u3044\u306E\u3067\u3059\u304B\uFF1F\u300D\u306E\u3088\u3046\u306A\u81EA\u7531\u5F62\u5F0F\u306E\u8CEA\u554F\u3092\u4E0E\u3048\u3089\u308C\u305F\u3068\u304D\u306B\u306F\u3046\u307E\u304F\u3044\u304B\u306A\u3044\u50BE\u5411\u304C\u3042\u308A\u307E\u3059\u3002"),z.forEach(s),u=f(R),h=i(R,"P",{});var B=p(h);P=n(B,"\u3053\u306E\u3088\u3046\u306A\u96E3\u3057\u3044\u30B1\u30FC\u30B9\u3067\u306F\u3001T5\u3084BART\u306E\u3088\u3046\u306A\u30A8\u30F3\u30B3\u30FC\u30C0\u30FC\u30C7\u30B3\u30FC\u30C0\u30FC\u30E2\u30C7\u30EB\u304C\u3001"),x=i(B,"A",{href:!0});var L=p(x);j=n(L,"\u30C6\u30AD\u30B9\u30C8\u8981\u7D04"),L.forEach(s),b=n(B,"\u306B\u975E\u5E38\u306B\u4F3C\u305F\u5178\u578B\u7684\u306A\u65B9\u6CD5\u3067\u60C5\u5831\u3092\u5408\u6210\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u30BF\u30A4\u30D7\u306E "),m=i(B,"EM",{});var G=p(m);k=n(G,"\u751F\u6210\u7684"),G.forEach(s),v=n(B," \u306A\u8CEA\u554F\u56DE\u7B54\u306B\u8208\u5473\u304C\u3042\u308B\u5834\u5408\u306F\u3001"),C=i(B,"A",{href:!0,rel:!0});var Z=p(C);M=n(Z,"ELI5\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),Z.forEach(s),H=n(B,"\u306B\u57FA\u3065\u304F\u79C1\u305F\u3061\u306E"),A=i(B,"A",{href:!0,rel:!0});var W=p(A);T=n(W,"\u30C7\u30E2"),W.forEach(s),Q=n(B,"\u3092\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u3053\u3068\u3092\u304A\u52E7\u3081\u3057\u307E\u3059\u3002"),B.forEach(s),this.h()},h(){I(x,"href","/course/ja/chapter7/5"),I(C,"href","https://huggingface.co/datasets/eli5"),I(C,"rel","nofollow"),I(A,"href","https://yjernite.github.io/lfqa.html"),I(A,"rel","nofollow")},m(R,z){l(R,c,z),t(c,$),l(R,u,z),l(R,h,z),t(h,P),t(h,x),t(x,j),t(h,b),t(h,m),t(m,k),t(h,v),t(h,C),t(C,M),t(h,H),t(h,A),t(A,T),t(h,Q)},d(R){R&&s(c),R&&s(u),R&&s(h)}}}function Au(V){let c,$,u,h,P,x,j,b,m,k,v;return{c(){c=o("p"),$=a("\u270F\uFE0F "),u=o("strong"),h=a("\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),P=a(" XLNet\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u4F7F\u7528\u3059\u308B\u5834\u5408\u3001\u5DE6\u5074\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u304C\u9069\u7528\u3055\u308C\u3001\u8CEA\u554F\u3068\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u5207\u308A\u66FF\u308F\u308A\u307E\u3059\u3002\u5148\u307B\u3069\u306E\u30B3\u30FC\u30C9\u3092\u5168\u3066XLNet\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u306B\u9069\u5FDC\u3055\u305B\u3066\u304F\u3060\u3055\u3044\uFF08\u305D\u3057\u3066"),x=o("code"),j=a("padding=True"),b=a("\u3092\u8FFD\u52A0\u3059\u308B\uFF09\u3002\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u9069\u7528\u3057\u305F\u5834\u5408\u3001"),m=o("code"),k=a("[CLS]"),v=a(" \u30C8\u30FC\u30AF\u30F3\u304C 0 \u306E\u4F4D\u7F6E\u306B\u6765\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002")},l(C){c=i(C,"P",{});var M=p(c);$=n(M,"\u270F\uFE0F "),u=i(M,"STRONG",{});var H=p(u);h=n(H,"\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),H.forEach(s),P=n(M," XLNet\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u4F7F\u7528\u3059\u308B\u5834\u5408\u3001\u5DE6\u5074\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u304C\u9069\u7528\u3055\u308C\u3001\u8CEA\u554F\u3068\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u5207\u308A\u66FF\u308F\u308A\u307E\u3059\u3002\u5148\u307B\u3069\u306E\u30B3\u30FC\u30C9\u3092\u5168\u3066XLNet\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u306B\u9069\u5FDC\u3055\u305B\u3066\u304F\u3060\u3055\u3044\uFF08\u305D\u3057\u3066"),x=i(M,"CODE",{});var A=p(x);j=n(A,"padding=True"),A.forEach(s),b=n(M,"\u3092\u8FFD\u52A0\u3059\u308B\uFF09\u3002\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u9069\u7528\u3057\u305F\u5834\u5408\u3001"),m=i(M,"CODE",{});var T=p(m);k=n(T,"[CLS]"),T.forEach(s),v=n(M," \u30C8\u30FC\u30AF\u30F3\u304C 0 \u306E\u4F4D\u7F6E\u306B\u6765\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),M.forEach(s)},m(C,M){l(C,c,M),t(c,$),t(c,u),t(u,h),t(c,P),t(c,x),t(x,j),t(c,b),t(c,m),t(m,k),t(c,v)},d(C){C&&s(c)}}}function Pu(V){let c,$,u,h,P,x,j,b,m,k,v;return h=new Zd({}),{c(){c=o("h2"),$=o("a"),u=o("span"),q(h.$$.fragment),P=d(),x=o("span"),j=a("Keras\u3092\u4F7F\u3063\u3066\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3046"),b=d(),m=o("p"),k=a("\u3053\u306E\u4F8B\u306E\u5B66\u7FD2\u30B3\u30FC\u30C9\u306F\u3001\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u30B3\u30FC\u30C9\u3068\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u304C\u3001\u6307\u6A19\u306E\u8A08\u7B97\u306B\u72EC\u81EA\u306E\u96E3\u3057\u3055\u304C\u3042\u308A\u307E\u3059\u3002\u5168\u3066\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u8A2D\u5B9A\u3057\u305F\u6700\u5927\u9577\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u305F\u306E\u3067\u3001\u5B9A\u7FA9\u3059\u3079\u304D\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u306F\u306A\u304F\u3001\u3053\u306E\u6307\u6A19\u306E\u8A08\u7B97\u3060\u3051\u304C\u672C\u5F53\u306B\u5FC3\u914D\u3057\u306A\u3051\u308C\u3070\u306A\u3089\u306A\u3044\u3053\u3068\u306A\u306E\u3067\u3059\u3002\u96E3\u3057\u3044\u4E8B\u306F\u3001\u5F8C\u51E6\u7406\u3068\u3057\u3066\u3001\u30E2\u30C7\u30EB\u306E\u4E88\u6E2C\u3092\u5143\u306E\u4F8B\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u7BC4\u56F2\u306B\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u4E00\u5EA6\u305D\u308C\u3092\u884C\u3048\u3070\u3001\u{1F917} Datasets\u30E9\u30A4\u30D6\u30E9\u30EA\u306E\u30E1\u30C8\u30EA\u30C3\u30AF\u304C\u79C1\u305F\u3061\u306E\u305F\u3081\u306B\u4ED5\u4E8B\u306E\u5927\u90E8\u5206\u3092\u884C\u3063\u3066\u304F\u308C\u307E\u3059\u3002"),this.h()},l(C){c=i(C,"H2",{class:!0});var M=p(c);$=i(M,"A",{id:!0,class:!0,href:!0});var H=p($);u=i(H,"SPAN",{});var A=p(u);E(h.$$.fragment,A),A.forEach(s),H.forEach(s),P=f(M),x=i(M,"SPAN",{});var T=p(x);j=n(T,"Keras\u3092\u4F7F\u3063\u3066\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3046"),T.forEach(s),M.forEach(s),b=f(C),m=i(C,"P",{});var Q=p(m);k=n(Q,"\u3053\u306E\u4F8B\u306E\u5B66\u7FD2\u30B3\u30FC\u30C9\u306F\u3001\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u30B3\u30FC\u30C9\u3068\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u304C\u3001\u6307\u6A19\u306E\u8A08\u7B97\u306B\u72EC\u81EA\u306E\u96E3\u3057\u3055\u304C\u3042\u308A\u307E\u3059\u3002\u5168\u3066\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u8A2D\u5B9A\u3057\u305F\u6700\u5927\u9577\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u305F\u306E\u3067\u3001\u5B9A\u7FA9\u3059\u3079\u304D\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u306F\u306A\u304F\u3001\u3053\u306E\u6307\u6A19\u306E\u8A08\u7B97\u3060\u3051\u304C\u672C\u5F53\u306B\u5FC3\u914D\u3057\u306A\u3051\u308C\u3070\u306A\u3089\u306A\u3044\u3053\u3068\u306A\u306E\u3067\u3059\u3002\u96E3\u3057\u3044\u4E8B\u306F\u3001\u5F8C\u51E6\u7406\u3068\u3057\u3066\u3001\u30E2\u30C7\u30EB\u306E\u4E88\u6E2C\u3092\u5143\u306E\u4F8B\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u7BC4\u56F2\u306B\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u4E00\u5EA6\u305D\u308C\u3092\u884C\u3048\u3070\u3001\u{1F917} Datasets\u30E9\u30A4\u30D6\u30E9\u30EA\u306E\u30E1\u30C8\u30EA\u30C3\u30AF\u304C\u79C1\u305F\u3061\u306E\u305F\u3081\u306B\u4ED5\u4E8B\u306E\u5927\u90E8\u5206\u3092\u884C\u3063\u3066\u304F\u308C\u307E\u3059\u3002"),Q.forEach(s),this.h()},h(){I($,"id","keras"),I($,"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"),I($,"href","#keras"),I(c,"class","relative group")},m(C,M){l(C,c,M),t(c,$),t($,u),y(h,u,null),t(c,P),t(c,x),t(x,j),l(C,b,M),l(C,m,M),t(m,k),v=!0},i(C){v||(w(h.$$.fragment,C),v=!0)},o(C){g(h.$$.fragment,C),v=!1},d(C){C&&s(c),D(h),C&&s(b),C&&s(m)}}}function Su(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H;return h=new Zd({}),{c(){c=o("h2"),$=o("a"),u=o("span"),q(h.$$.fragment),P=d(),x=o("span"),j=a("Trainer API \u3067\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3046"),b=d(),m=o("p"),k=a("\u3053\u306E\u4F8B\u306E\u5B66\u7FD2\u30B3\u30FC\u30C9\u306F\u3001\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u30B3\u30FC\u30C9\u3068\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u3002\u6700\u3082\u96E3\u3057\u3044\u306E\u306F "),v=o("code"),C=a("compute_metrics()"),M=a(" \u95A2\u6570\u3092\u66F8\u304F\u3053\u3068\u3067\u3059\u3002\u3059\u3079\u3066\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u8A2D\u5B9A\u3057\u305F\u6700\u5927\u9577\u306B\u306A\u308B\u3088\u3046\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u3066\u3044\u308B\u306E\u3067\u3001\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u3053\u306E\u6307\u6A19\u306E\u8A08\u7B97\u3060\u3051\u304C\u672C\u5F53\u306B\u5FC3\u914D\u3057\u306A\u3051\u308C\u3070\u306A\u3089\u306A\u3044\u3053\u3068\u3067\u3059\u3002\u96E3\u3057\u3044\u306E\u306F\u3001\u5F8C\u51E6\u7406\u3067\u30E2\u30C7\u30EB\u306E\u4E88\u6E2C\u3092\u5143\u306E\u4F8B\u6587\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u7BC4\u56F2\u306B\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u4E00\u65E6\u3053\u308C\u3092\u884C\u3048\u3070\u3001\u{1F917} Datasets\u30E9\u30A4\u30D6\u30E9\u30EA\u306E\u6307\u6A19\u304C\u79C1\u9054\u306E\u305F\u3081\u306B\u307B\u3068\u3093\u3069\u306E\u4F5C\u696D\u3092\u3057\u3066\u304F\u308C\u308B\u3067\u3057\u3087\u3046\u3002"),this.h()},l(A){c=i(A,"H2",{class:!0});var T=p(c);$=i(T,"A",{id:!0,class:!0,href:!0});var Q=p($);u=i(Q,"SPAN",{});var R=p(u);E(h.$$.fragment,R),R.forEach(s),Q.forEach(s),P=f(T),x=i(T,"SPAN",{});var z=p(x);j=n(z,"Trainer API \u3067\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3046"),z.forEach(s),T.forEach(s),b=f(A),m=i(A,"P",{});var B=p(m);k=n(B,"\u3053\u306E\u4F8B\u306E\u5B66\u7FD2\u30B3\u30FC\u30C9\u306F\u3001\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u30B3\u30FC\u30C9\u3068\u3088\u304F\u4F3C\u3066\u3044\u307E\u3059\u3002\u6700\u3082\u96E3\u3057\u3044\u306E\u306F "),v=i(B,"CODE",{});var L=p(v);C=n(L,"compute_metrics()"),L.forEach(s),M=n(B," \u95A2\u6570\u3092\u66F8\u304F\u3053\u3068\u3067\u3059\u3002\u3059\u3079\u3066\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u8A2D\u5B9A\u3057\u305F\u6700\u5927\u9577\u306B\u306A\u308B\u3088\u3046\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u3066\u3044\u308B\u306E\u3067\u3001\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u3053\u306E\u6307\u6A19\u306E\u8A08\u7B97\u3060\u3051\u304C\u672C\u5F53\u306B\u5FC3\u914D\u3057\u306A\u3051\u308C\u3070\u306A\u3089\u306A\u3044\u3053\u3068\u3067\u3059\u3002\u96E3\u3057\u3044\u306E\u306F\u3001\u5F8C\u51E6\u7406\u3067\u30E2\u30C7\u30EB\u306E\u4E88\u6E2C\u3092\u5143\u306E\u4F8B\u6587\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u7BC4\u56F2\u306B\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u4E00\u65E6\u3053\u308C\u3092\u884C\u3048\u3070\u3001\u{1F917} Datasets\u30E9\u30A4\u30D6\u30E9\u30EA\u306E\u6307\u6A19\u304C\u79C1\u9054\u306E\u305F\u3081\u306B\u307B\u3068\u3093\u3069\u306E\u4F5C\u696D\u3092\u3057\u3066\u304F\u308C\u308B\u3067\u3057\u3087\u3046\u3002"),B.forEach(s),this.h()},h(){I($,"id","trainer-api"),I($,"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"),I($,"href","#trainer-api"),I(c,"class","relative group")},m(A,T){l(A,c,T),t(c,$),t($,u),y(h,u,null),t(c,P),t(c,x),t(x,j),l(A,b,T),l(A,m,T),t(m,k),t(m,v),t(v,C),t(m,M),H=!0},i(A){H||(w(h.$$.fragment,A),H=!0)},o(A){g(h.$$.fragment,A),H=!1},d(A){A&&s(c),D(h),A&&s(b),A&&s(m)}}}function Ou(V){let c,$;return c=new Tp({props:{id:"VN67ZpN33Ss"}}),{c(){q(c.$$.fragment)},l(u){E(c.$$.fragment,u)},m(u,h){y(c,u,h),$=!0},i(u){$||(w(c.$$.fragment,u),$=!0)},o(u){g(c.$$.fragment,u),$=!1},d(u){D(c,u)}}}function Mu(V){let c,$;return c=new Tp({props:{id:"BNy08iIWVJM"}}),{c(){q(c.$$.fragment)},l(u){E(c.$$.fragment,u)},m(u,h){y(c,u,h),$=!0},i(u){$||(w(c.$$.fragment,u),$=!0)},o(u){g(c.$$.fragment,u),$=!1},d(u){D(c,u)}}}function Bu(V){let c,$,u,h,P,x,j;return c=new S({props:{code:`import tensorflow as tf
from transformers import TFAutoModelForQuestionAnswering

eval_set_for_model = eval_set.remove_columns(["example_id", "offset_mapping"])
eval_set_for_model.set_format("numpy")

batch = {k: eval_set_for_model[k] for k in eval_set_for_model.column_names}
trained_model = TFAutoModelForQuestionAnswering.from_pretrained(trained_checkpoint)

outputs = trained_model(**batch)`,highlighted:`<span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForQuestionAnswering

eval_set_for_model = eval_set.remove_columns([<span class="hljs-string">&quot;example_id&quot;</span>, <span class="hljs-string">&quot;offset_mapping&quot;</span>])
eval_set_for_model.set_format(<span class="hljs-string">&quot;numpy&quot;</span>)

batch = {k: eval_set_for_model[k] <span class="hljs-keyword">for</span> k <span class="hljs-keyword">in</span> eval_set_for_model.column_names}
trained_model = TFAutoModelForQuestionAnswering.from_pretrained(trained_checkpoint)

outputs = trained_model(**batch)`}}),x=new S({props:{code:`start_logits = outputs.start_logits.numpy()
end_logits = outputs.end_logits.numpy()`,highlighted:`start_logits = outputs.start_logits.numpy()
end_logits = outputs.end_logits.numpy()`}}),{c(){q(c.$$.fragment),$=d(),u=o("p"),h=a("\u5B9F\u9A13\u3092\u5BB9\u6613\u306B\u3059\u308B\u305F\u3081\u306B\u3001\u3053\u308C\u3089\u306E\u51FA\u529B\u3092NumPy\u306E\u914D\u5217\u306B\u5909\u63DB\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),P=d(),q(x.$$.fragment)},l(b){E(c.$$.fragment,b),$=f(b),u=i(b,"P",{});var m=p(u);h=n(m,"\u5B9F\u9A13\u3092\u5BB9\u6613\u306B\u3059\u308B\u305F\u3081\u306B\u3001\u3053\u308C\u3089\u306E\u51FA\u529B\u3092NumPy\u306E\u914D\u5217\u306B\u5909\u63DB\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),m.forEach(s),P=f(b),E(x.$$.fragment,b)},m(b,m){y(c,b,m),l(b,$,m),l(b,u,m),t(u,h),l(b,P,m),y(x,b,m),j=!0},i(b){j||(w(c.$$.fragment,b),w(x.$$.fragment,b),j=!0)},o(b){g(c.$$.fragment,b),g(x.$$.fragment,b),j=!1},d(b){D(c,b),b&&s($),b&&s(u),b&&s(P),D(x,b)}}}function Fu(V){let c,$,u,h,P,x,j,b,m;return c=new S({props:{code:`import torch
from transformers import AutoModelForQuestionAnswering

eval_set_for_model = eval_set.remove_columns(["example_id", "offset_mapping"])
eval_set_for_model.set_format("torch")

device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
batch = {k: eval_set_for_model[k].to(device) for k in eval_set_for_model.column_names}
trained_model = AutoModelForQuestionAnswering.from_pretrained(trained_checkpoint).to(
    device
)

with torch.no_grad():
    outputs = trained_model(**batch)`,highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForQuestionAnswering

eval_set_for_model = eval_set.remove_columns([<span class="hljs-string">&quot;example_id&quot;</span>, <span class="hljs-string">&quot;offset_mapping&quot;</span>])
eval_set_for_model.set_format(<span class="hljs-string">&quot;torch&quot;</span>)

device = torch.device(<span class="hljs-string">&quot;cuda&quot;</span>) <span class="hljs-keyword">if</span> torch.cuda.is_available() <span class="hljs-keyword">else</span> torch.device(<span class="hljs-string">&quot;cpu&quot;</span>)
batch = {k: eval_set_for_model[k].to(device) <span class="hljs-keyword">for</span> k <span class="hljs-keyword">in</span> eval_set_for_model.column_names}
trained_model = AutoModelForQuestionAnswering.from_pretrained(trained_checkpoint).to(
    device
)

<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = trained_model(**batch)`}}),b=new S({props:{code:`start_logits = outputs.start_logits.cpu().numpy()
end_logits = outputs.end_logits.cpu().numpy()`,highlighted:`start_logits = outputs.start_logits.cpu().numpy()
end_logits = outputs.end_logits.cpu().numpy()`}}),{c(){q(c.$$.fragment),$=d(),u=o("p"),h=o("code"),P=a("Trainer"),x=a("\u306F\u4E88\u6E2C\u5024\u3092NumPy\u306E\u914D\u5217\u3068\u3057\u3066\u4E0E\u3048\u308B\u306E\u3067\u3001\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30ED\u30B8\u30C3\u30C8\u3092\u53D6\u5F97\u3057\u3001\u305D\u306E\u5F62\u5F0F\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"),j=d(),q(b.$$.fragment)},l(k){E(c.$$.fragment,k),$=f(k),u=i(k,"P",{});var v=p(u);h=i(v,"CODE",{});var C=p(h);P=n(C,"Trainer"),C.forEach(s),x=n(v,"\u306F\u4E88\u6E2C\u5024\u3092NumPy\u306E\u914D\u5217\u3068\u3057\u3066\u4E0E\u3048\u308B\u306E\u3067\u3001\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30ED\u30B8\u30C3\u30C8\u3092\u53D6\u5F97\u3057\u3001\u305D\u306E\u5F62\u5F0F\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"),v.forEach(s),j=f(k),E(b.$$.fragment,k)},m(k,v){y(c,k,v),l(k,$,v),l(k,u,v),t(u,h),t(h,P),t(u,x),l(k,j,v),y(b,k,v),m=!0},i(k){m||(w(c.$$.fragment,k),w(b.$$.fragment,k),m=!0)},o(k){g(c.$$.fragment,k),g(b.$$.fragment,k),m=!1},d(k){D(c,k),k&&s($),k&&s(u),k&&s(j),D(b,k)}}}function Lu(V){let c,$,u,h,P;return{c(){c=o("p"),$=a("\u3067\u306F\u3001\u4ECA\u3084\u3063\u305F\u3053\u3068\u3092\u3059\u3079\u3066 "),u=o("code"),h=a("compute_metrics()"),P=a(" \u95A2\u6570\u306B\u307E\u3068\u3081\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u3053\u306E\u95A2\u6570\u306F\u30E2\u30C7\u30EB\u306E\u5B66\u7FD2\u5F8C\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u30AA\u30D5\u30BB\u30C3\u30C8\u7528\u306E\u7279\u5FB4\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3068\u3001\u5143\u306E\u6587\u8108\u306E\u4F8B\u6587\u7528\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u8ABF\u3079\u306A\u3051\u308C\u3070\u306A\u3089\u306A\u3044\u306E\u3067\u3001\u51FA\u529B\u306E\u30ED\u30B8\u30C3\u30C8\u3060\u3051\u3067\u306A\u304F\u3001\u3082\u3046\u5C11\u3057\u591A\u304F\u306E\u30C7\u30FC\u30BF\u3092\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002")},l(x){c=i(x,"P",{});var j=p(c);$=n(j,"\u3067\u306F\u3001\u4ECA\u3084\u3063\u305F\u3053\u3068\u3092\u3059\u3079\u3066 "),u=i(j,"CODE",{});var b=p(u);h=n(b,"compute_metrics()"),b.forEach(s),P=n(j," \u95A2\u6570\u306B\u307E\u3068\u3081\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u3053\u306E\u95A2\u6570\u306F\u30E2\u30C7\u30EB\u306E\u5B66\u7FD2\u5F8C\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u30AA\u30D5\u30BB\u30C3\u30C8\u7528\u306E\u7279\u5FB4\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3068\u3001\u5143\u306E\u6587\u8108\u306E\u4F8B\u6587\u7528\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u8ABF\u3079\u306A\u3051\u308C\u3070\u306A\u3089\u306A\u3044\u306E\u3067\u3001\u51FA\u529B\u306E\u30ED\u30B8\u30C3\u30C8\u3060\u3051\u3067\u306A\u304F\u3001\u3082\u3046\u5C11\u3057\u591A\u304F\u306E\u30C7\u30FC\u30BF\u3092\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),j.forEach(s)},m(x,j){l(x,c,j),t(c,$),t(c,u),t(u,h),t(c,P)},d(x){x&&s(c)}}}function Iu(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H,A,T,Q,R,z,B;return{c(){c=o("p"),$=a("\u3053\u3053\u3067\u3001\u5148\u307B\u3069\u884C\u3063\u305F\u3053\u3068\u3092\u3059\u3079\u3066 "),u=o("code"),h=a("compute_metrics()"),P=a(" \u95A2\u6570\u306B\u307E\u3068\u3081\u3066\u3001 "),x=o("code"),j=a("Trainer"),b=a(" \u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3057\u3087\u3046\u3002\u901A\u5E38\u3001 "),m=o("code"),k=a("compute_metrics()"),v=a(" \u95A2\u6570\u306F logits \u3068 labels \u3092\u542B\u3080\u30BF\u30D7\u30EB "),C=o("code"),M=a("eval_preds"),H=a(" \u3092\u53D7\u3051\u53D6\u308B\u3060\u3051\u3067\u3059\u3002"),A=d(),T=o("p"),Q=a(`\u4ECA\u56DE\u306F\u3082\u3046\u5C11\u3057\u591A\u304F\u306E\u60C5\u5831\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002\u30AA\u30D5\u30BB\u30C3\u30C8\u7528\u306E\u7279\u5FB4\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3068\u3001\u5143\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u7528\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u8ABF\u3079\u306A\u3051\u308C\u3070\u306A\u3089\u306A\u3044\u305F\u3081\u3067\u3059\u3002
\u305D\u306E\u305F\u3081\u3001\u3053\u306E\u95A2\u6570\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u4E2D\u306B\u901A\u5E38\u306E\u8A55\u4FA1\u7D50\u679C\u3092\u5F97\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u306E\u95A2\u6570\u306F\u5B66\u7FD2\u7D42\u4E86\u6642\u306B\u7D50\u679C\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3060\u3051\u306B\u4F7F\u3044\u307E\u3059\u3002`),R=d(),z=o("p"),B=a("compute_metrics()` \u95A2\u6570\u306F\u3001\u524D\u3068\u540C\u3058\u30B9\u30C6\u30C3\u30D7\u3092\u30B0\u30EB\u30FC\u30D7\u5316\u3057\u307E\u3059\u3002\u6709\u52B9\u306A\u7B54\u3048\u304C\u5F97\u3089\u308C\u306A\u304B\u3063\u305F\u5834\u5408\uFF08\u305D\u306E\u5834\u5408\u306F\u4E88\u6E2C\u3092\u7A7A\u6587\u5B57\u5217\u3068\u3057\u307E\u3059\uFF09\u306B\u5099\u3048\u3066\u3001\u5C0F\u3055\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u8FFD\u52A0\u3057\u3066\u3044\u308B\u3060\u3051\u3067\u3059\u3002")},l(L){c=i(L,"P",{});var G=p(c);$=n(G,"\u3053\u3053\u3067\u3001\u5148\u307B\u3069\u884C\u3063\u305F\u3053\u3068\u3092\u3059\u3079\u3066 "),u=i(G,"CODE",{});var Z=p(u);h=n(Z,"compute_metrics()"),Z.forEach(s),P=n(G," \u95A2\u6570\u306B\u307E\u3068\u3081\u3066\u3001 "),x=i(G,"CODE",{});var W=p(x);j=n(W,"Trainer"),W.forEach(s),b=n(G," \u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3057\u3087\u3046\u3002\u901A\u5E38\u3001 "),m=i(G,"CODE",{});var O=p(m);k=n(O,"compute_metrics()"),O.forEach(s),v=n(G," \u95A2\u6570\u306F logits \u3068 labels \u3092\u542B\u3080\u30BF\u30D7\u30EB "),C=i(G,"CODE",{});var J=p(C);M=n(J,"eval_preds"),J.forEach(s),H=n(G," \u3092\u53D7\u3051\u53D6\u308B\u3060\u3051\u3067\u3059\u3002"),G.forEach(s),A=f(L),T=i(L,"P",{});var te=p(T);Q=n(te,`\u4ECA\u56DE\u306F\u3082\u3046\u5C11\u3057\u591A\u304F\u306E\u60C5\u5831\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002\u30AA\u30D5\u30BB\u30C3\u30C8\u7528\u306E\u7279\u5FB4\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3068\u3001\u5143\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u7528\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u8ABF\u3079\u306A\u3051\u308C\u3070\u306A\u3089\u306A\u3044\u305F\u3081\u3067\u3059\u3002
\u305D\u306E\u305F\u3081\u3001\u3053\u306E\u95A2\u6570\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u4E2D\u306B\u901A\u5E38\u306E\u8A55\u4FA1\u7D50\u679C\u3092\u5F97\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u306E\u95A2\u6570\u306F\u5B66\u7FD2\u7D42\u4E86\u6642\u306B\u7D50\u679C\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3060\u3051\u306B\u4F7F\u3044\u307E\u3059\u3002`),te.forEach(s),R=f(L),z=i(L,"P",{});var Y=p(z);B=n(Y,"compute_metrics()` \u95A2\u6570\u306F\u3001\u524D\u3068\u540C\u3058\u30B9\u30C6\u30C3\u30D7\u3092\u30B0\u30EB\u30FC\u30D7\u5316\u3057\u307E\u3059\u3002\u6709\u52B9\u306A\u7B54\u3048\u304C\u5F97\u3089\u308C\u306A\u304B\u3063\u305F\u5834\u5408\uFF08\u305D\u306E\u5834\u5408\u306F\u4E88\u6E2C\u3092\u7A7A\u6587\u5B57\u5217\u3068\u3057\u307E\u3059\uFF09\u306B\u5099\u3048\u3066\u3001\u5C0F\u3055\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u8FFD\u52A0\u3057\u3066\u3044\u308B\u3060\u3051\u3067\u3059\u3002"),Y.forEach(s)},m(L,G){l(L,c,G),t(c,$),t(c,u),t(u,h),t(c,P),t(c,x),t(x,j),t(c,b),t(c,m),t(m,k),t(c,v),t(c,C),t(C,M),t(c,H),l(L,A,G),l(L,T,G),t(T,Q),l(L,R,G),l(L,z,G),t(z,B)},d(L){L&&s(c),L&&s(A),L&&s(T),L&&s(R),L&&s(z)}}}function zu(V){let c,$,u,h,P,x,j,b;return j=new S({props:{code:"model = TFAutoModelForQuestionAnswering.from_pretrained(model_checkpoint)",highlighted:"model = TFAutoModelForQuestionAnswering.from_pretrained(model_checkpoint)"}}),{c(){c=o("p"),$=a("\u3053\u308C\u3067\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3059\u308B\u6E96\u5099\u304C\u3067\u304D\u307E\u3057\u305F\u3002\u307E\u305A\u3001\u524D\u3068\u540C\u3058\u3088\u3046\u306B "),u=o("code"),h=a("TFAutoModelForQuestionAnswering"),P=a(" \u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u30E2\u30C7\u30EB\u3092\u4F5C\u6210\u3057\u307E\u3057\u3087\u3046\u3002"),x=d(),q(j.$$.fragment)},l(m){c=i(m,"P",{});var k=p(c);$=n(k,"\u3053\u308C\u3067\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3059\u308B\u6E96\u5099\u304C\u3067\u304D\u307E\u3057\u305F\u3002\u307E\u305A\u3001\u524D\u3068\u540C\u3058\u3088\u3046\u306B "),u=i(k,"CODE",{});var v=p(u);h=n(v,"TFAutoModelForQuestionAnswering"),v.forEach(s),P=n(k," \u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u30E2\u30C7\u30EB\u3092\u4F5C\u6210\u3057\u307E\u3057\u3087\u3046\u3002"),k.forEach(s),x=f(m),E(j.$$.fragment,m)},m(m,k){l(m,c,k),t(c,$),t(c,u),t(u,h),t(c,P),l(m,x,k),y(j,m,k),b=!0},i(m){b||(w(j.$$.fragment,m),b=!0)},o(m){g(j.$$.fragment,m),b=!1},d(m){m&&s(c),m&&s(x),D(j,m)}}}function Nu(V){let c,$,u,h,P,x,j,b;return j=new S({props:{code:"model = AutoModelForQuestionAnswering.from_pretrained(model_checkpoint)",highlighted:"model = AutoModelForQuestionAnswering.from_pretrained(model_checkpoint)"}}),{c(){c=o("p"),$=a("\u3053\u308C\u3067\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3059\u308B\u6E96\u5099\u304C\u3067\u304D\u307E\u3057\u305F\u3002\u5148\u7A0B\u3068\u540C\u3058\u3088\u3046\u306B "),u=o("code"),h=a("AutoModelForQuestionAnswering"),P=a(" \u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u3001\u307E\u305A\u30E2\u30C7\u30EB\u3092\u4F5C\u6210\u3057\u307E\u3057\u3087\u3046\u3002"),x=d(),q(j.$$.fragment)},l(m){c=i(m,"P",{});var k=p(c);$=n(k,"\u3053\u308C\u3067\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3059\u308B\u6E96\u5099\u304C\u3067\u304D\u307E\u3057\u305F\u3002\u5148\u7A0B\u3068\u540C\u3058\u3088\u3046\u306B "),u=i(k,"CODE",{});var v=p(u);h=n(v,"AutoModelForQuestionAnswering"),v.forEach(s),P=n(k," \u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u3001\u307E\u305A\u30E2\u30C7\u30EB\u3092\u4F5C\u6210\u3057\u307E\u3057\u3087\u3046\u3002"),k.forEach(s),x=f(m),E(j.$$.fragment,m)},m(m,k){l(m,c,k),t(c,$),t(c,u),t(u,h),t(c,P),l(m,x,k),y(j,m,k),b=!0},i(m){b||(w(j.$$.fragment,m),b=!0)},o(m){g(j.$$.fragment,m),b=!1},d(m){m&&s(c),m&&s(x),D(j,m)}}}function Hu(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H,A,T,Q,R,z,B,L,G,Z,W;return h=new S({props:{code:`from transformers import DefaultDataCollator

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

data_collator = DefaultDataCollator(return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)`}}),m=new S({props:{code:`tf_train_dataset = train_dataset.to_tf_dataset(
    columns=[
        "input_ids",
        "start_positions",
        "end_positions",
        "attention_mask",
        "token_type_ids",
    ],
    collate_fn=data_collator,
    shuffle=True,
    batch_size=16,
)
tf_eval_dataset = validation_dataset.to_tf_dataset(
    columns=["input_ids", "attention_mask", "token_type_ids"],
    collate_fn=data_collator,
    shuffle=False,
    batch_size=16,
)`,highlighted:`tf_train_dataset = train_dataset.to_tf_dataset(
    columns=[
        <span class="hljs-string">&quot;input_ids&quot;</span>,
        <span class="hljs-string">&quot;start_positions&quot;</span>,
        <span class="hljs-string">&quot;end_positions&quot;</span>,
        <span class="hljs-string">&quot;attention_mask&quot;</span>,
        <span class="hljs-string">&quot;token_type_ids&quot;</span>,
    ],
    collate_fn=data_collator,
    shuffle=<span class="hljs-literal">True</span>,
    batch_size=<span class="hljs-number">16</span>,
)
tf_eval_dataset = validation_dataset.to_tf_dataset(
    columns=[<span class="hljs-string">&quot;input_ids&quot;</span>, <span class="hljs-string">&quot;attention_mask&quot;</span>, <span class="hljs-string">&quot;token_type_ids&quot;</span>],
    collate_fn=data_collator,
    shuffle=<span class="hljs-literal">False</span>,
    batch_size=<span class="hljs-number">16</span>,
)`}}),H=new S({props:{code:`from transformers import create_optimizer
from transformers.keras_callbacks import PushToHubCallback
import tensorflow as tf

# The number of training steps is the number of samples in the dataset, divided by the batch size then multiplied
# by the total number of epochs. Note that the tf_train_dataset here is a batched tf.data.Dataset,
# not the original Hugging Face Dataset, so its len() is already num_samples // batch_size.
num_train_epochs = 3
num_train_steps = len(tf_train_dataset) * num_train_epochs
optimizer, schedule = create_optimizer(
    init_lr=2e-5,
    num_warmup_steps=0,
    num_train_steps=num_train_steps,
    weight_decay_rate=0.01,
)
model.compile(optimizer=optimizer)

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

<span class="hljs-comment"># The number of training steps is the number of samples in the dataset, divided by the batch size then multiplied</span>
<span class="hljs-comment"># by the total number of epochs. Note that the tf_train_dataset here is a batched tf.data.Dataset,</span>
<span class="hljs-comment"># not the original Hugging Face Dataset, so its len() is already num_samples // batch_size.</span>
num_train_epochs = <span class="hljs-number">3</span>
num_train_steps = <span class="hljs-built_in">len</span>(tf_train_dataset) * num_train_epochs
optimizer, schedule = create_optimizer(
    init_lr=<span class="hljs-number">2e-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>)`}}),{c(){c=o("p"),$=a("\u3053\u308C\u3067\u3001TF\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u4ECA\u56DE\u306F\u30B7\u30F3\u30D7\u30EB\u306A\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),u=d(),q(h.$$.fragment),P=d(),x=o("p"),j=a("\u305D\u3057\u3066\u3001\u4ECA\u5EA6\u306F\u3044\u3064\u3082\u901A\u308A\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002"),b=d(),q(m.$$.fragment),k=d(),v=o("p"),C=a("\u6B21\u306B\u3001\u5B66\u7FD2\u7528\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u8A2D\u5B9A\u3057\u3001\u30E2\u30C7\u30EB\u3092\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u307E\u3059\u3002"),M=d(),q(H.$$.fragment),A=d(),T=o("p"),Q=a("\u6700\u5F8C\u306B\u3001"),R=o("code"),z=a("model.fit()"),B=a("\u3067\u5B66\u7FD2\u3059\u308B\u6E96\u5099\u304C\u3067\u304D\u307E\u3057\u305F\u3002"),L=o("code"),G=a("PushToHubCallback"),Z=a("\u3092\u4F7F\u7528\u3057\u3066\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u5F8C\u306B\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002")},l(O){c=i(O,"P",{});var J=p(c);$=n(J,"\u3053\u308C\u3067\u3001TF\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u4ECA\u56DE\u306F\u30B7\u30F3\u30D7\u30EB\u306A\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30C7\u30FC\u30BF\u30B3\u30EC\u30FC\u30BF\u30FC\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),J.forEach(s),u=f(O),E(h.$$.fragment,O),P=f(O),x=i(O,"P",{});var te=p(x);j=n(te,"\u305D\u3057\u3066\u3001\u4ECA\u5EA6\u306F\u3044\u3064\u3082\u901A\u308A\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002"),te.forEach(s),b=f(O),E(m.$$.fragment,O),k=f(O),v=i(O,"P",{});var Y=p(v);C=n(Y,"\u6B21\u306B\u3001\u5B66\u7FD2\u7528\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u8A2D\u5B9A\u3057\u3001\u30E2\u30C7\u30EB\u3092\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u307E\u3059\u3002"),Y.forEach(s),M=f(O),E(H.$$.fragment,O),A=f(O),T=i(O,"P",{});var le=p(T);Q=n(le,"\u6700\u5F8C\u306B\u3001"),R=i(le,"CODE",{});var ee=p(R);z=n(ee,"model.fit()"),ee.forEach(s),B=n(le,"\u3067\u5B66\u7FD2\u3059\u308B\u6E96\u5099\u304C\u3067\u304D\u307E\u3057\u305F\u3002"),L=i(le,"CODE",{});var Ae=p(L);G=n(Ae,"PushToHubCallback"),Ae.forEach(s),Z=n(le,"\u3092\u4F7F\u7528\u3057\u3066\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u5F8C\u306B\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002"),le.forEach(s)},m(O,J){l(O,c,J),t(c,$),l(O,u,J),y(h,O,J),l(O,P,J),l(O,x,J),t(x,j),l(O,b,J),y(m,O,J),l(O,k,J),l(O,v,J),t(v,C),l(O,M,J),y(H,O,J),l(O,A,J),l(O,T,J),t(T,Q),t(T,R),t(R,z),t(T,B),t(T,L),t(L,G),t(T,Z),W=!0},i(O){W||(w(h.$$.fragment,O),w(m.$$.fragment,O),w(H.$$.fragment,O),W=!0)},o(O){g(h.$$.fragment,O),g(m.$$.fragment,O),g(H.$$.fragment,O),W=!1},d(O){O&&s(c),O&&s(u),D(h,O),O&&s(P),O&&s(x),O&&s(b),D(m,O),O&&s(k),O&&s(v),O&&s(M),D(H,O),O&&s(A),O&&s(T)}}}function Vu(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H,A,T,Q,R,z,B,L,G,Z,W,O,J,te,Y,le,ee,Ae,Xe,de,ae,Ee,fe,fs,Pe;return Y=new S({props:{code:`from transformers import TrainingArguments

args = TrainingArguments(
    "bert-finetuned-squad",
    evaluation_strategy="no",
    save_strategy="epoch",
    learning_rate=2e-5,
    num_train_epochs=3,
    weight_decay=0.01,
    fp16=True,
    push_to_hub=True,
)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

args = TrainingArguments(
    <span class="hljs-string">&quot;bert-finetuned-squad&quot;</span>,
    evaluation_strategy=<span class="hljs-string">&quot;no&quot;</span>,
    save_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
    learning_rate=<span class="hljs-number">2e-5</span>,
    num_train_epochs=<span class="hljs-number">3</span>,
    weight_decay=<span class="hljs-number">0.01</span>,
    fp16=<span class="hljs-literal">True</span>,
    push_to_hub=<span class="hljs-literal">True</span>,
)`}}),{c(){c=o("p"),$=a("\u3053\u308C\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001"),u=o("code"),h=a("TrainingArguments"),P=a(" \u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002\u6307\u6A19\u3092\u8A08\u7B97\u3059\u308B\u95A2\u6570\u3092\u5B9A\u7FA9\u3057\u305F\u3068\u304D\u306B\u8A00\u3063\u305F\u3088\u3046\u306B\u3001 "),x=o("code"),j=a("compute_metrics()"),b=a(" \u95A2\u6570\u306E\u5236\u9650\u306E\u305F\u3081\u306B\u3001\u901A\u5E38\u306E\u8A55\u4FA1\u30EB\u30FC\u30D7\u3092\u6301\u3064\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u308C\u3092\u5B9F\u73FE\u3059\u308B\u305F\u3081\u306B\u3001\u72EC\u81EA\u306E "),m=o("code"),k=a("Trainer"),v=a(" \u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3092\u66F8\u304F\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u304C (\u3053\u306E\u65B9\u6CD5\u306F "),C=o("a"),M=a("\u8CEA\u554F\u5FDC\u7B54\u4F8B\u30B9\u30AF\u30EA\u30D7\u30C8"),H=a(" \u306B\u3042\u308A\u307E\u3059)\u3001\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u3061\u3087\u3063\u3068\u9577\u3059\u304E\u307E\u3059\u306D\u3002\u305D\u306E\u4EE3\u308F\u308A\u3001\u3053\u3053\u3067\u306F\u5B66\u7FD2\u306E\u6700\u5F8C\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u3053\u3068\u3060\u3051\u3092\u884C\u3044\u3001\u901A\u5E38\u306E\u8A55\u4FA1\u306E\u65B9\u6CD5\u306F\u5F8C\u8FF0\u306E\u300C\u30AB\u30B9\u30BF\u30E0\u5B66\u7FD2\u30EB\u30FC\u30D7\u300D\u3067\u7D39\u4ECB\u3057\u307E\u3059\u3002"),A=d(),T=o("p"),Q=a("\u3053\u308C\u306F "),R=o("code"),z=a("Trainer"),B=a(" API \u306E\u9650\u754C\u3067\u3042\u308A\u3001\u{1F917} Accelerate \u30E9\u30A4\u30D6\u30E9\u30EA\u304C\u8F1D\u304F\u3068\u3053\u308D\u3067\u3059\u3002\u7279\u5B9A\u306E\u7528\u4F8B\u306B\u5408\u308F\u305B\u3066\u30AF\u30E9\u30B9\u3092\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3059\u308B\u306E\u306F\u5927\u5909\u3067\u3059\u304C\u3001\u5B8C\u5168\u306B\u516C\u958B\u3055\u308C\u305F\u5B66\u7FD2\u30EB\u30FC\u30D7\u3092\u8ABF\u6574\u3059\u308B\u306E\u306F\u7C21\u5358\u3067\u3059\u3002"),L=d(),G=o("p"),Z=a("\u305D\u308C\u3067\u306F\u3001"),W=o("code"),O=a("TrainingArguments"),J=a(" \u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),te=d(),q(Y.$$.fragment),le=d(),ee=o("p"),Ae=a("\u3053\u308C\u3089\u306E\u307B\u3068\u3093\u3069\u306F\u4EE5\u524D\u306B\u3082\u898B\u305F\u3053\u3068\u304C\u3042\u308B\u3068\u601D\u3044\u307E\u3059\u3002"),Xe=d(),de=o("p"),ae=a("\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\uFF08\u5B66\u7FD2\u7387\u3001\u5B66\u7FD2\u30A8\u30DD\u30C3\u30AF\u6570\u3001\u30A6\u30A7\u30A4\u30C8\u6E1B\u8870\u306A\u3069\uFF09\u3092\u8A2D\u5B9A\u3057\u3001\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u3054\u3068\u306B\u30E2\u30C7\u30EB\u3092\u4FDD\u5B58\u3057\u3001\u8A55\u4FA1\u3092\u7701\u7565\u3057\u3001\u7D50\u679C\u3092\u30E2\u30C7\u30EB\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\u307E\u305F\u3001"),Ee=o("code"),fe=a("fp16=True"),fs=a("\u3067\u6DF7\u5408\u7CBE\u5EA6\u5B66\u7FD2\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002\u6700\u8FD1\u306EGPU\u3067\u306F\u3001\u6DF7\u5408\u7CBE\u5EA6\u5B66\u7FD2\u304C\u3046\u307E\u304F\u30B9\u30D4\u30FC\u30C9\u30A2\u30C3\u30D7\u3059\u308B\u304B\u3089\u3067\u3059\u3002"),this.h()},l(N){c=i(N,"P",{});var U=p(c);$=n(U,"\u3053\u308C\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001"),u=i(U,"CODE",{});var re=p(u);h=n(re,"TrainingArguments"),re.forEach(s),P=n(U," \u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002\u6307\u6A19\u3092\u8A08\u7B97\u3059\u308B\u95A2\u6570\u3092\u5B9A\u7FA9\u3057\u305F\u3068\u304D\u306B\u8A00\u3063\u305F\u3088\u3046\u306B\u3001 "),x=i(U,"CODE",{});var Gs=p(x);j=n(Gs,"compute_metrics()"),Gs.forEach(s),b=n(U," \u95A2\u6570\u306E\u5236\u9650\u306E\u305F\u3081\u306B\u3001\u901A\u5E38\u306E\u8A55\u4FA1\u30EB\u30FC\u30D7\u3092\u6301\u3064\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u308C\u3092\u5B9F\u73FE\u3059\u308B\u305F\u3081\u306B\u3001\u72EC\u81EA\u306E "),m=i(U,"CODE",{});var Ke=p(m);k=n(Ke,"Trainer"),Ke.forEach(s),v=n(U," \u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3092\u66F8\u304F\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u304C (\u3053\u306E\u65B9\u6CD5\u306F "),C=i(U,"A",{href:!0,rel:!0});var Se=p(C);M=n(Se,"\u8CEA\u554F\u5FDC\u7B54\u4F8B\u30B9\u30AF\u30EA\u30D7\u30C8"),Se.forEach(s),H=n(U," \u306B\u3042\u308A\u307E\u3059)\u3001\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u3061\u3087\u3063\u3068\u9577\u3059\u304E\u307E\u3059\u306D\u3002\u305D\u306E\u4EE3\u308F\u308A\u3001\u3053\u3053\u3067\u306F\u5B66\u7FD2\u306E\u6700\u5F8C\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u3053\u3068\u3060\u3051\u3092\u884C\u3044\u3001\u901A\u5E38\u306E\u8A55\u4FA1\u306E\u65B9\u6CD5\u306F\u5F8C\u8FF0\u306E\u300C\u30AB\u30B9\u30BF\u30E0\u5B66\u7FD2\u30EB\u30FC\u30D7\u300D\u3067\u7D39\u4ECB\u3057\u307E\u3059\u3002"),U.forEach(s),A=f(N),T=i(N,"P",{});var Ye=p(T);Q=n(Ye,"\u3053\u308C\u306F "),R=i(Ye,"CODE",{});var _s=p(R);z=n(_s,"Trainer"),_s.forEach(s),B=n(Ye," API \u306E\u9650\u754C\u3067\u3042\u308A\u3001\u{1F917} Accelerate \u30E9\u30A4\u30D6\u30E9\u30EA\u304C\u8F1D\u304F\u3068\u3053\u308D\u3067\u3059\u3002\u7279\u5B9A\u306E\u7528\u4F8B\u306B\u5408\u308F\u305B\u3066\u30AF\u30E9\u30B9\u3092\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3059\u308B\u306E\u306F\u5927\u5909\u3067\u3059\u304C\u3001\u5B8C\u5168\u306B\u516C\u958B\u3055\u308C\u305F\u5B66\u7FD2\u30EB\u30FC\u30D7\u3092\u8ABF\u6574\u3059\u308B\u306E\u306F\u7C21\u5358\u3067\u3059\u3002"),Ye.forEach(s),L=f(N),G=i(N,"P",{});var he=p(G);Z=n(he,"\u305D\u308C\u3067\u306F\u3001"),W=i(he,"CODE",{});var $e=p(W);O=n($e,"TrainingArguments"),$e.forEach(s),J=n(he," \u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),he.forEach(s),te=f(N),E(Y.$$.fragment,N),le=f(N),ee=i(N,"P",{});var X=p(ee);Ae=n(X,"\u3053\u308C\u3089\u306E\u307B\u3068\u3093\u3069\u306F\u4EE5\u524D\u306B\u3082\u898B\u305F\u3053\u3068\u304C\u3042\u308B\u3068\u601D\u3044\u307E\u3059\u3002"),X.forEach(s),Xe=f(N),de=i(N,"P",{});var Oe=p(de);ae=n(Oe,"\u30CF\u30A4\u30D1\u30FC\u30D1\u30E9\u30E1\u30FC\u30BF\uFF08\u5B66\u7FD2\u7387\u3001\u5B66\u7FD2\u30A8\u30DD\u30C3\u30AF\u6570\u3001\u30A6\u30A7\u30A4\u30C8\u6E1B\u8870\u306A\u3069\uFF09\u3092\u8A2D\u5B9A\u3057\u3001\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u3054\u3068\u306B\u30E2\u30C7\u30EB\u3092\u4FDD\u5B58\u3057\u3001\u8A55\u4FA1\u3092\u7701\u7565\u3057\u3001\u7D50\u679C\u3092\u30E2\u30C7\u30EB\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\u307E\u305F\u3001"),Ee=i(Oe,"CODE",{});var ge=p(Ee);fe=n(ge,"fp16=True"),ge.forEach(s),fs=n(Oe,"\u3067\u6DF7\u5408\u7CBE\u5EA6\u5B66\u7FD2\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002\u6700\u8FD1\u306EGPU\u3067\u306F\u3001\u6DF7\u5408\u7CBE\u5EA6\u5B66\u7FD2\u304C\u3046\u307E\u304F\u30B9\u30D4\u30FC\u30C9\u30A2\u30C3\u30D7\u3059\u308B\u304B\u3089\u3067\u3059\u3002"),Oe.forEach(s),this.h()},h(){I(C,"href","https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/trainer_qa.py"),I(C,"rel","nofollow")},m(N,U){l(N,c,U),t(c,$),t(c,u),t(u,h),t(c,P),t(c,x),t(x,j),t(c,b),t(c,m),t(m,k),t(c,v),t(c,C),t(C,M),t(c,H),l(N,A,U),l(N,T,U),t(T,Q),t(T,R),t(R,z),t(T,B),l(N,L,U),l(N,G,U),t(G,Z),t(G,W),t(W,O),t(G,J),l(N,te,U),y(Y,N,U),l(N,le,U),l(N,ee,U),t(ee,Ae),l(N,Xe,U),l(N,de,U),t(de,ae),t(de,Ee),t(Ee,fe),t(de,fs),Pe=!0},i(N){Pe||(w(Y.$$.fragment,N),Pe=!0)},o(N){g(Y.$$.fragment,N),Pe=!1},d(N){N&&s(c),N&&s(A),N&&s(T),N&&s(L),N&&s(G),N&&s(te),D(Y,N),N&&s(le),N&&s(ee),N&&s(Xe),N&&s(de)}}}function Ru(V){let c,$;return c=new S({props:{code:`from transformers.keras_callbacks import PushToHubCallback

callback = PushToHubCallback(output_dir="bert-finetuned-squad", tokenizer=tokenizer)

# We're going to do validation afterwards, so no validation mid-training
model.fit(tf_train_dataset, callbacks=[callback], epochs=num_train_epochs)`,highlighted:`<span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> PushToHubCallback

callback = PushToHubCallback(output_dir=<span class="hljs-string">&quot;bert-finetuned-squad&quot;</span>, tokenizer=tokenizer)

<span class="hljs-comment"># We&#x27;re going to do validation afterwards, so no validation mid-training</span>
model.fit(tf_train_dataset, callbacks=[callback], epochs=num_train_epochs)`}}),{c(){q(c.$$.fragment)},l(u){E(c.$$.fragment,u)},m(u,h){y(c,u,h),$=!0},i(u){$||(w(c.$$.fragment,u),$=!0)},o(u){g(c.$$.fragment,u),$=!1},d(u){D(c,u)}}}function Qu(V){let c,$,u,h,P,x,j,b,m,k;return c=new Cp({props:{$$slots:{default:[Gu]},$$scope:{ctx:V}}}),m=new S({props:{code:`from transformers import Trainer

trainer = Trainer(
    model=model,
    args=args,
    train_dataset=train_dataset,
    eval_dataset=validation_dataset,
    tokenizer=tokenizer,
)
trainer.train()`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Trainer

trainer = Trainer(
    model=model,
    args=args,
    train_dataset=train_dataset,
    eval_dataset=validation_dataset,
    tokenizer=tokenizer,
)
trainer.train()`}}),{c(){q(c.$$.fragment),$=d(),u=o("p"),h=a("\u6700\u5F8C\u306B\u3001\u3059\u3079\u3066\u3092 "),P=o("code"),x=a("Trainer"),j=a(" \u30AF\u30E9\u30B9\u306B\u6E21\u3057\u3066\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3092\u958B\u59CB\u3059\u308B\u3060\u3051\u3067\u3059\u3002"),b=d(),q(m.$$.fragment)},l(v){E(c.$$.fragment,v),$=f(v),u=i(v,"P",{});var C=p(u);h=n(C,"\u6700\u5F8C\u306B\u3001\u3059\u3079\u3066\u3092 "),P=i(C,"CODE",{});var M=p(P);x=n(M,"Trainer"),M.forEach(s),j=n(C," \u30AF\u30E9\u30B9\u306B\u6E21\u3057\u3066\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3092\u958B\u59CB\u3059\u308B\u3060\u3051\u3067\u3059\u3002"),C.forEach(s),b=f(v),E(m.$$.fragment,v)},m(v,C){y(c,v,C),l(v,$,C),l(v,u,C),t(u,h),t(u,P),t(P,x),t(u,j),l(v,b,C),y(m,v,C),k=!0},i(v){k||(w(c.$$.fragment,v),w(m.$$.fragment,v),k=!0)},o(v){g(c.$$.fragment,v),g(m.$$.fragment,v),k=!1},d(v){D(c,v),v&&s($),v&&s(u),v&&s(b),D(m,v)}}}function Gu(V){let c,$,u,h,P;return{c(){c=o("p"),$=a("\u{1F4A1} \u4F7F\u7528\u3059\u308B\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30ED\u30FC\u30AB\u30EB\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 (\u3057\u305F\u304C\u3063\u3066\u3001"),u=o("code"),h=a("Trainer"),P=a(" \u306E\u5B9A\u7FA9\u6642\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F\u3001\u65B0\u3057\u3044\u540D\u524D\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059)\u3002")},l(x){c=i(x,"P",{});var j=p(c);$=n(j,"\u{1F4A1} \u4F7F\u7528\u3059\u308B\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u30D7\u30C3\u30B7\u30E5\u3057\u305F\u3044\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30ED\u30FC\u30AB\u30EB\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 (\u3057\u305F\u304C\u3063\u3066\u3001"),u=i(j,"CODE",{});var b=p(u);h=n(b,"Trainer"),b.forEach(s),P=n(j," \u306E\u5B9A\u7FA9\u6642\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F\u3001\u65B0\u3057\u3044\u540D\u524D\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059)\u3002"),j.forEach(s)},m(x,j){l(x,c,j),t(c,$),t(c,u),t(u,h),t(c,P)},d(x){x&&s(c)}}}function Wu(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H;return M=new S({props:{code:`predictions = model.predict(tf_eval_dataset)
compute_metrics(
    predictions["start_logits"],
    predictions["end_logits"],
    validation_dataset,
    raw_datasets["validation"],
)`,highlighted:`predictions = model.predict(tf_eval_dataset)
compute_metrics(
    predictions[<span class="hljs-string">&quot;start_logits&quot;</span>],
    predictions[<span class="hljs-string">&quot;end_logits&quot;</span>],
    validation_dataset,
    raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>],
)`}}),{c(){c=o("p"),$=a("\u5B66\u7FD2\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001\u6700\u5F8C\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF08\u305D\u3057\u3066\u3001\u7121\u99C4\u306B\u8A08\u7B97\u6642\u9593\u3092\u8CBB\u3084\u3057\u3066\u3044\u306A\u3044\u3053\u3068\u3092\u7948\u308A\u307E\u3059\uFF09\u3002\u4E88\u6E2C\u5024\u306E\u53D6\u5F97\u306F "),u=o("code"),h=a("model"),P=a(" \u306E "),x=o("code"),j=a("predict()"),b=a(" \u30E1\u30BD\u30C3\u30C9\u3067\u884C\u3044\u307E\u3059\u3002\u307E\u305F\u3001\u5148\u307B\u3069 "),m=o("code"),k=a("compute_metrics()"),v=a(" \u95A2\u6570\u3092\u5B9A\u7FA9\u3057\u3066\u82E6\u52B4\u3057\u305F\u306E\u3067\u30011\u884C\u3067\u7D50\u679C\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),C=d(),q(M.$$.fragment)},l(A){c=i(A,"P",{});var T=p(c);$=n(T,"\u5B66\u7FD2\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001\u6700\u5F8C\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF08\u305D\u3057\u3066\u3001\u7121\u99C4\u306B\u8A08\u7B97\u6642\u9593\u3092\u8CBB\u3084\u3057\u3066\u3044\u306A\u3044\u3053\u3068\u3092\u7948\u308A\u307E\u3059\uFF09\u3002\u4E88\u6E2C\u5024\u306E\u53D6\u5F97\u306F "),u=i(T,"CODE",{});var Q=p(u);h=n(Q,"model"),Q.forEach(s),P=n(T," \u306E "),x=i(T,"CODE",{});var R=p(x);j=n(R,"predict()"),R.forEach(s),b=n(T," \u30E1\u30BD\u30C3\u30C9\u3067\u884C\u3044\u307E\u3059\u3002\u307E\u305F\u3001\u5148\u307B\u3069 "),m=i(T,"CODE",{});var z=p(m);k=n(z,"compute_metrics()"),z.forEach(s),v=n(T," \u95A2\u6570\u3092\u5B9A\u7FA9\u3057\u3066\u82E6\u52B4\u3057\u305F\u306E\u3067\u30011\u884C\u3067\u7D50\u679C\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),T.forEach(s),C=f(A),E(M.$$.fragment,A)},m(A,T){l(A,c,T),t(c,$),t(c,u),t(u,h),t(c,P),t(c,x),t(x,j),t(c,b),t(c,m),t(m,k),t(c,v),l(A,C,T),y(M,A,T),H=!0},i(A){H||(w(M.$$.fragment,A),H=!0)},o(A){g(M.$$.fragment,A),H=!1},d(A){A&&s(c),A&&s(C),D(M,A)}}}function Uu(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H;return M=new S({props:{code:`predictions, _, _ = trainer.predict(validation_dataset)
start_logits, end_logits = predictions
compute_metrics(start_logits, end_logits, validation_dataset, raw_datasets["validation"])`,highlighted:`predictions, _, _ = trainer.predict(validation_dataset)
start_logits, end_logits = predictions
compute_metrics(start_logits, end_logits, validation_dataset, raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>])`}}),{c(){c=o("p"),$=a("\u5B66\u7FD2\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001\u6700\u5F8C\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF08\u305D\u3057\u3066\u3001\u7121\u99C4\u306B\u8A08\u7B97\u6642\u9593\u3092\u8CBB\u3084\u3055\u306A\u3044\u3088\u3046\u306B\u7948\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\uFF09\u3002"),u=o("code"),h=a("Trainer"),P=a(" \u306E "),x=o("code"),j=a("predict()"),b=a(" \u30E1\u30BD\u30C3\u30C9\u306F\u30BF\u30D7\u30EB\u3092\u8FD4\u3057\u3001\u305D\u306E\u6700\u521D\u306E\u8981\u7D20\u306F\u30E2\u30C7\u30EB\u306E\u4E88\u6E2C\u5024\uFF08\u3053\u3053\u3067\u306F\u958B\u59CB\u30ED\u30B8\u30C3\u30C8\u3068\u7D42\u4E86\u30ED\u30B8\u30C3\u30C8\u306E\u30DA\u30A2\uFF09\u3068\u306A\u308A\u307E\u3059\u3002\u3053\u308C\u3092 "),m=o("code"),k=a("compute_metrics()"),v=a(" \u95A2\u6570\u306B\u9001\u308A\u307E\u3059\u3002"),C=d(),q(M.$$.fragment)},l(A){c=i(A,"P",{});var T=p(c);$=n(T,"\u5B66\u7FD2\u304C\u5B8C\u4E86\u3057\u305F\u3089\u3001\u6700\u5F8C\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\uFF08\u305D\u3057\u3066\u3001\u7121\u99C4\u306B\u8A08\u7B97\u6642\u9593\u3092\u8CBB\u3084\u3055\u306A\u3044\u3088\u3046\u306B\u7948\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\uFF09\u3002"),u=i(T,"CODE",{});var Q=p(u);h=n(Q,"Trainer"),Q.forEach(s),P=n(T," \u306E "),x=i(T,"CODE",{});var R=p(x);j=n(R,"predict()"),R.forEach(s),b=n(T," \u30E1\u30BD\u30C3\u30C9\u306F\u30BF\u30D7\u30EB\u3092\u8FD4\u3057\u3001\u305D\u306E\u6700\u521D\u306E\u8981\u7D20\u306F\u30E2\u30C7\u30EB\u306E\u4E88\u6E2C\u5024\uFF08\u3053\u3053\u3067\u306F\u958B\u59CB\u30ED\u30B8\u30C3\u30C8\u3068\u7D42\u4E86\u30ED\u30B8\u30C3\u30C8\u306E\u30DA\u30A2\uFF09\u3068\u306A\u308A\u307E\u3059\u3002\u3053\u308C\u3092 "),m=i(T,"CODE",{});var z=p(m);k=n(z,"compute_metrics()"),z.forEach(s),v=n(T," \u95A2\u6570\u306B\u9001\u308A\u307E\u3059\u3002"),T.forEach(s),C=f(A),E(M.$$.fragment,A)},m(A,T){l(A,c,T),t(c,$),t(c,u),t(u,h),t(c,P),t(c,x),t(x,j),t(c,b),t(c,m),t(m,k),t(c,v),l(A,C,T),y(M,A,T),H=!0},i(A){H||(w(M.$$.fragment,A),H=!0)},o(A){g(M.$$.fragment,A),H=!1},d(A){A&&s(c),A&&s(C),D(M,A)}}}function hu(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H,A,T,Q,R,z;return j=new S({props:{code:'trainer.push_to_hub(commit_message="Training complete")',highlighted:'trainer.push_to_hub(commit_message=<span class="hljs-string">&quot;Training complete&quot;</span>)'}}),C=new S({props:{code:"'https://huggingface.co/sgugger/bert-finetuned-squad/commit/9dcee1fbc25946a6ed4bb32efb1bd71d5fa90b68'",highlighted:'<span class="hljs-string">&#x27;https://huggingface.co/sgugger/bert-finetuned-squad/commit/9dcee1fbc25946a6ed4bb32efb1bd71d5fa90b68&#x27;</span>'}}),{c(){c=o("p"),$=a("\u6700\u5F8C\u306B\u3001"),u=o("code"),h=a("push_to_hub()"),P=a("\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u3001\u6700\u65B0\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30E2\u30C7\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002"),x=d(),q(j.$$.fragment),b=d(),m=o("p"),k=a("\u3053\u308C\u306F\u3001\u4ECA\u884C\u3063\u305F\u30B3\u30DF\u30C3\u30C8\u306E URL \u3092\u8FD4\u3057\u307E\u3059\u3002\u3082\u3057\u305D\u308C\u3092\u691C\u67FB\u3057\u305F\u3044\u306E\u3067\u3042\u308C\u3070\u3001\u305D\u306E URL \u3092\u30C1\u30A7\u30C3\u30AF\u3057\u307E\u3059\u3002"),v=d(),q(C.$$.fragment),M=d(),H=o("p"),A=a("\u307E\u305F\u3001"),T=o("code"),Q=a("Trainer"),R=a("\u306F\u8A55\u4FA1\u7D50\u679C\u3092\u307E\u3068\u3081\u305F\u30E2\u30C7\u30EB\u30AB\u30FC\u30C9\u3092\u8D77\u6848\u3057\u3001\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002")},l(B){c=i(B,"P",{});var L=p(c);$=n(L,"\u6700\u5F8C\u306B\u3001"),u=i(L,"CODE",{});var G=p(u);h=n(G,"push_to_hub()"),G.forEach(s),P=n(L,"\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u3001\u6700\u65B0\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30E2\u30C7\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002"),L.forEach(s),x=f(B),E(j.$$.fragment,B),b=f(B),m=i(B,"P",{});var Z=p(m);k=n(Z,"\u3053\u308C\u306F\u3001\u4ECA\u884C\u3063\u305F\u30B3\u30DF\u30C3\u30C8\u306E URL \u3092\u8FD4\u3057\u307E\u3059\u3002\u3082\u3057\u305D\u308C\u3092\u691C\u67FB\u3057\u305F\u3044\u306E\u3067\u3042\u308C\u3070\u3001\u305D\u306E URL \u3092\u30C1\u30A7\u30C3\u30AF\u3057\u307E\u3059\u3002"),Z.forEach(s),v=f(B),E(C.$$.fragment,B),M=f(B),H=i(B,"P",{});var W=p(H);A=n(W,"\u307E\u305F\u3001"),T=i(W,"CODE",{});var O=p(T);Q=n(O,"Trainer"),O.forEach(s),R=n(W,"\u306F\u8A55\u4FA1\u7D50\u679C\u3092\u307E\u3068\u3081\u305F\u30E2\u30C7\u30EB\u30AB\u30FC\u30C9\u3092\u8D77\u6848\u3057\u3001\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002"),W.forEach(s)},m(B,L){l(B,c,L),t(c,$),t(c,u),t(u,h),t(c,P),l(B,x,L),y(j,B,L),l(B,b,L),l(B,m,L),t(m,k),l(B,v,L),y(C,B,L),l(B,M,L),l(B,H,L),t(H,A),t(H,T),t(T,Q),t(H,R),z=!0},i(B){z||(w(j.$$.fragment,B),w(C.$$.fragment,B),z=!0)},o(B){g(j.$$.fragment,B),g(C.$$.fragment,B),z=!1},d(B){B&&s(c),B&&s(x),D(j,B),B&&s(b),B&&s(m),B&&s(v),D(C,B),B&&s(M),B&&s(H)}}}function Ju(V){let c,$,u,h,P;return{c(){c=o("p"),$=a("\u270F\uFE0F "),u=o("strong"),h=a("\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),P=a(" \u3053\u306E\u30BF\u30B9\u30AF\u3067\u3088\u308A\u826F\u3044\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u304C\u5F97\u3089\u308C\u308B\u304B\u3069\u3046\u304B\u3001\u5225\u306E\u30E2\u30C7\u30EB\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u8A66\u3057\u3066\u307F\u3066\u304F\u3060\u3055\u3044\uFF01")},l(x){c=i(x,"P",{});var j=p(c);$=n(j,"\u270F\uFE0F "),u=i(j,"STRONG",{});var b=p(u);h=n(b,"\u3042\u306A\u305F\u306E\u756A\u3067\u3059\uFF01"),b.forEach(s),P=n(j," \u3053\u306E\u30BF\u30B9\u30AF\u3067\u3088\u308A\u826F\u3044\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u304C\u5F97\u3089\u308C\u308B\u304B\u3069\u3046\u304B\u3001\u5225\u306E\u30E2\u30C7\u30EB\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u8A66\u3057\u3066\u307F\u3066\u304F\u3060\u3055\u3044\uFF01"),j.forEach(s)},m(x,j){l(x,c,j),t(c,$),t(c,u),t(u,h),t(c,P)},d(x){x&&s(c)}}}function $u(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H,A,T,Q,R,z,B,L,G,Z,W,O,J,te,Y,le,ee,Ae,Xe,de,ae,Ee,fe,fs,Pe,N,U,re,Gs,Ke,Se,Ye,_s,he,$e,X,Oe,ge,Xa,vt,kt,Yt,Ze,qt,Et,Ka,yt,Zt,us,Ws,Us,Ya,Dt,ye,Ct,_e,ea,we,Tt,Za,At,Pt,en,sa,ze,ta,xe,aa,Ne,na,ms,Js,oe,St,Ot,sn,Mt,la,hs,Xs,$s,ra,es,tn,oa,He,ia,Me,pa,Be,an,Bt,Ft,nn,ca,ss,ts,ws,Lt,Ve,ln,It,ue,Ks,De,da,as,rn,fa,bs,Ys,ie,_a,ns,on,ua,Re,pn,ma,Qe,ha,Zs,cn,et,je,dn,st,gs,$a,me,fn,xs,wa,tt,zt,ba,js,at,nt,_n,Nt,Ce,Ht,K,ga,ls,un,xa,Ge,ja,lt,Vt,va,vs,rt,ks,ka,rs,mn,qa,Te,qs,Al,Rt,Es,Pl,Qt,se,hn,os,$n,wn,ys,bn,gn,is,ot,xn,Gt;return ae=new S({props:{code:`from torch.utils.data import DataLoader
from transformers import default_data_collator

train_dataset.set_format("torch")
validation_set = validation_dataset.remove_columns(["example_id", "offset_mapping"])
validation_set.set_format("torch")

train_dataloader = DataLoader(
    train_dataset,
    shuffle=True,
    collate_fn=default_data_collator,
    batch_size=8,
)
eval_dataloader = DataLoader(
    validation_set, collate_fn=default_data_collator, batch_size=8
)`,highlighted:`<span class="hljs-keyword">from</span> torch.utils.data <span class="hljs-keyword">import</span> DataLoader
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> default_data_collator

train_dataset.set_format(<span class="hljs-string">&quot;torch&quot;</span>)
validation_set = validation_dataset.remove_columns([<span class="hljs-string">&quot;example_id&quot;</span>, <span class="hljs-string">&quot;offset_mapping&quot;</span>])
validation_set.set_format(<span class="hljs-string">&quot;torch&quot;</span>)

train_dataloader = DataLoader(
    train_dataset,
    shuffle=<span class="hljs-literal">True</span>,
    collate_fn=default_data_collator,
    batch_size=<span class="hljs-number">8</span>,
)
eval_dataloader = DataLoader(
    validation_set, collate_fn=default_data_collator, batch_size=<span class="hljs-number">8</span>
)`}}),N=new S({props:{code:"model = AutoModelForQuestionAnswering.from_pretrained(model_checkpoint)",highlighted:"model = AutoModelForQuestionAnswering.from_pretrained(model_checkpoint)"}}),he=new S({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>)`}}),ye=new S({props:{code:`from accelerate import Accelerator

accelerator = Accelerator(fp16=True)
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(fp16=<span class="hljs-literal">True</span>)
model, optimizer, train_dataloader, eval_dataloader = accelerator.prepare(
    model, optimizer, train_dataloader, eval_dataloader
)`}}),ze=new S({props:{code:`from transformers import get_scheduler

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

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

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

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

model_name = "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> Repository, get_full_repo_name

model_name = <span class="hljs-string">&quot;bert-finetuned-squad-accelerate&quot;</span>
repo_name = get_full_repo_name(model_name)
repo_name`}}),$s=new S({props:{code:"'sgugger/bert-finetuned-squad-accelerate'",highlighted:'<span class="hljs-string">&#x27;sgugger/bert-finetuned-squad-accelerate&#x27;</span>'}}),He=new S({props:{code:`output_dir = "bert-finetuned-squad-accelerate"
repo = Repository(output_dir, clone_from=repo_name)`,highlighted:`output_dir = <span class="hljs-string">&quot;bert-finetuned-squad-accelerate&quot;</span>
repo = Repository(output_dir, clone_from=repo_name)`}}),js=new S({props:{code:`from tqdm.auto import tqdm
import torch

progress_bar = tqdm(range(num_training_steps))

for epoch in range(num_train_epochs):
    # Training
    model.train()
    for 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()
    start_logits = []
    end_logits = []
    accelerator.print("Evaluation!")
    for batch in tqdm(eval_dataloader):
        with torch.no_grad():
            outputs = model(**batch)

        start_logits.append(accelerator.gather(outputs.start_logits).cpu().numpy())
        end_logits.append(accelerator.gather(outputs.end_logits).cpu().numpy())

    start_logits = np.concatenate(start_logits)
    end_logits = np.concatenate(end_logits)
    start_logits = start_logits[: len(validation_dataset)]
    end_logits = end_logits[: len(validation_dataset)]

    metrics = compute_metrics(
        start_logits, end_logits, validation_dataset, raw_datasets["validation"]
    )
    print(f"epoch {epoch}:", metrics)

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

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

<span class="hljs-keyword">for</span> epoch <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(num_train_epochs):
    <span class="hljs-comment"># Training</span>
    model.train()
    <span class="hljs-keyword">for</span> 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>()
    start_logits = []
    end_logits = []
    accelerator.<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Evaluation!&quot;</span>)
    <span class="hljs-keyword">for</span> batch <span class="hljs-keyword">in</span> tqdm(eval_dataloader):
        <span class="hljs-keyword">with</span> torch.no_grad():
            outputs = model(**batch)

        start_logits.append(accelerator.gather(outputs.start_logits).cpu().numpy())
        end_logits.append(accelerator.gather(outputs.end_logits).cpu().numpy())

    start_logits = np.concatenate(start_logits)
    end_logits = np.concatenate(end_logits)
    start_logits = start_logits[: <span class="hljs-built_in">len</span>(validation_dataset)]
    end_logits = end_logits[: <span class="hljs-built_in">len</span>(validation_dataset)]

    metrics = compute_metrics(
        start_logits, end_logits, validation_dataset, raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>]
    )
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;epoch <span class="hljs-subst">{epoch}</span>:&quot;</span>, metrics)

    <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>
        )`}}),Ce=new S({props:{code:`accelerator.wait_for_everyone()
unwrapped_model = accelerator.unwrap_model(model)
unwrapped_model.save_pretrained(output_dir, save_function=accelerator.save)`,highlighted:`accelerator.wait_for_everyone()
unwrapped_model = accelerator.unwrap_model(model)
unwrapped_model.save_pretrained(output_dir, save_function=accelerator.save)`}}),{c(){c=o("p"),$=a("\u3082\u3046\u5C11\u3057\u6DF1\u304F\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u3092\u6975\u3081\u305F\u3044\u65B9\u306F\u3001\u4ECA\u5EA6\u306F\u{1F917}Accelerate\u3092\u4F7F\u3063\u3066\u540C\u3058\u3053\u3068\u3092\u3059\u308B\u65B9\u6CD5\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002"),u=d(),h=o("h2"),P=a("\u30AB\u30B9\u30BF\u30E0\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"),x=d(),j=o("p"),b=a("\u305D\u308C\u3067\u306F\u3001\u5FC5\u8981\u306A\u90E8\u5206\u3092\u7C21\u5358\u306B\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5168\u4F53\u50CF\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),m=o("a"),k=a("\u7B2C3\u7AE0"),v=a("\u306E\u5B66\u7FD2\u30EB\u30FC\u30D7\u3068\u307B\u307C\u540C\u3058\u3067\u3059\u304C\u3001\u8A55\u4FA1\u30EB\u30FC\u30D7\u306F\u4F8B\u5916\u3067\u3059\u3002\u3082\u3046 "),C=o("code"),M=a("Trainer"),H=a(" \u30AF\u30E9\u30B9\u306E\u5236\u7D04\u3092\u53D7\u3051\u306A\u3044\u306E\u3067\u3001\u5B9A\u671F\u7684\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),A=d(),T=o("h3"),Q=a("\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u305F\u3081\u306E\u3059\u3079\u3066\u3092\u6E96\u5099\u3059\u308B"),R=d(),z=o("p"),B=a("\u307E\u305A\u3001datasets\u304B\u3089 "),L=o("code"),G=a("DataLoader"),Z=a(" \u3092\u69CB\u7BC9\u3057\u307E\u3059\u3002\u305D\u308C\u3089\u306Edatasets\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092 "),W=o("code"),O=a('"torch"'),J=a(" \u306B\u8A2D\u5B9A\u3057\u3001\u691C\u8A3C\u7528\u30BB\u30C3\u30C8\u306E\u4E2D\u304B\u3089\u30E2\u30C7\u30EB\u3067\u4F7F\u7528\u3057\u306A\u3044\u30AB\u30E9\u30E0\u3092\u524A\u9664\u3057\u307E\u3059\u3002\u6B21\u306B\u3001Transformers \u304C\u63D0\u4F9B\u3059\u308B "),te=o("code"),Y=a("default_data_collator"),le=a(" \u3092 "),ee=o("code"),Ae=a("collate_fn"),Xe=a(" \u3068\u3057\u3066\u4F7F\u7528\u3057\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u3092\u30B7\u30E3\u30C3\u30D5\u30EB\u3057\u307E\u3059\u304C\u3001\u691C\u8A3C\u30BB\u30C3\u30C8\u306F\u30B7\u30E3\u30C3\u30D5\u30EB\u3057\u307E\u305B\u3093\u3002"),de=d(),q(ae.$$.fragment),Ee=d(),fe=o("p"),fs=a("\u6B21\u306B\u3001\u30E2\u30C7\u30EB\u306E\u518D\u5B9A\u7FA9\u3092\u884C\u3044\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u4EE5\u524D\u306E\u5FAE\u8ABF\u6574\u3092\u7D99\u7D9A\u3059\u308B\u306E\u3067\u306F\u306A\u304F\u3001BERT\u3067\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u304B\u3089\u518D\u3073\u958B\u59CB\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3067\u3059\u3002"),Pe=d(),q(N.$$.fragment),U=d(),re=o("p"),Gs=a("\u305D\u308C\u304B\u3089\u3001\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001\u53E4\u5178\u7684\u306A "),Ke=o("code"),Se=a("AdamW"),Ye=a(" \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u3053\u308C\u306F Adam \u306E\u3088\u3046\u306A\u3082\u306E\u3067\u3059\u304C\u3001\u91CD\u307F\u306E\u6E1B\u8870\u306E\u9069\u7528\u65B9\u6CD5\u3092\u4FEE\u6B63\u3057\u305F\u3082\u306E\u3067\u3059\u3002"),_s=d(),q(he.$$.fragment),$e=d(),X=o("p"),Oe=a("\u3053\u308C\u3089\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u63C3\u3063\u305F\u3089\u3001\u305D\u308C\u3089\u3092 "),ge=o("code"),Xa=a("accelerator.prepare()"),vt=a(" \u30E1\u30BD\u30C3\u30C9\u306B\u9001\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3082\u3057\u3001Colab\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067TPU\u3092\u4F7F\u3063\u305F\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3092\u3057\u305F\u3044\u306E\u3067\u3042\u308C\u3070\u3001\u3053\u306E\u30B3\u30FC\u30C9\u3092\u5168\u3066\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306B\u79FB\u52D5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306F"),kt=o("code"),Yt=a("Accelerator"),Ze=a("\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3059\u308B\u30BB\u30EB\u3092\u5B9F\u884C\u3059\u308B\u3079\u304D\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"),qt=o("code"),Et=a("Accelerator"),Ka=a("\u306B "),yt=o("code"),Zt=a("fp16=True"),us=a(" \u3092\u6E21\u3059\u3053\u3068\u3067\u3001\u5F37\u5236\u7684\u306B\u6DF7\u5408\u7CBE\u5EA6\u306E\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059 (\u307E\u305F\u306F\u3001\u30B3\u30FC\u30C9\u3092\u30B9\u30AF\u30EA\u30D7\u30C8\u3068\u3057\u3066\u5B9F\u884C\u3059\u308B\u5834\u5408\u306F\u3001\u{1F917} Accelerate "),Ws=o("code"),Us=a("config"),Ya=a(" \u3092\u9069\u5207\u306B\u57CB\u3081\u3066\u304F\u3060\u3055\u3044)\u3002"),Dt=d(),q(ye.$$.fragment),Ct=d(),_e=o("p"),ea=a("\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u5B66\u3093\u3060\u3088\u3046\u306B\u3001"),we=o("code"),Tt=a("train_dataloader"),Za=a(" \u306E\u9577\u3055\u306F "),At=o("code"),Pt=a("accelerator.prepare()"),en=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u7D4C\u305F\u5F8C\u3067\u306E\u307F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30B9\u30C6\u30C3\u30D7\u6570\u3092\u8A08\u7B97\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067\u306F\u3001\u3053\u308C\u307E\u3067\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3068\u540C\u3058\u7DDA\u5F62\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),sa=d(),q(ze.$$.fragment),ta=d(),xe=o("p"),aa=a("\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u306B\u306F\u3001\u4F5C\u696D\u30D5\u30A9\u30EB\u30C0\u306B "),Ne=o("code"),na=a("Repository"),ms=a(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u307E\u305A\u3001\u30CF\u30AE\u30F3\u30B0 \u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6\u306B\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u307E\u3060\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u3044\u306A\u3044\u5834\u5408\uFF09\u3002\u30E2\u30C7\u30EB\u306B\u4ED8\u4E0E\u3057\u305F\u3044\u30E2\u30C7\u30EB ID \u304B\u3089\u30EA\u30DD\u30B8\u30C8\u30EA\u540D\u3092\u6C7A\u5B9A\u3057\u307E\u3059\uFF08"),Js=o("code"),oe=a("repo_name"),St=a(" \u3092\u81EA\u7531\u306B\u7F6E\u304D\u63DB\u3048\u3066\u304F\u3060\u3055\u3044\u3002\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u3001\u3053\u308C\u306F\u95A2\u6570 "),Ot=o("code"),sn=a("get_full_repo_name()"),Mt=a(" \u304C\u884C\u3063\u3066\u3044\u308B\u4E8B\u3067\u3059)\u3002"),la=d(),q(hs.$$.fragment),Xs=d(),q($s.$$.fragment),ra=d(),es=o("p"),tn=a("\u305D\u3057\u3066\u3001\u305D\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC\u306B\u30AF\u30ED\u30FC\u30F3\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u3053\u306E\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC\u306F\u4F5C\u696D\u4E2D\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),oa=d(),q(He.$$.fragment),ia=d(),Me=o("p"),pa=a("\u3053\u308C\u3067 "),Be=o("code"),an=a("repo.push_to_hub()"),Bt=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u3067\u3001"),Ft=o("code"),nn=a("output_dir"),ca=a(" \u306B\u4FDD\u5B58\u3057\u305F\u3082\u306E\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u6642\u306B\u4E2D\u9593\u30E2\u30C7\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),ss=d(),ts=o("h2"),ws=a("\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"),Lt=d(),Ve=o("p"),ln=a("\u3053\u308C\u3067\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5168\u4F53\u3092\u8A18\u8FF0\u3059\u308B\u6E96\u5099\u304C\u6574\u3044\u307E\u3057\u305F\u3002\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u9032\u6357\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306E\u30D7\u30ED\u30B0\u30EC\u30B9\u30D0\u30FC\u3092\u5B9A\u7FA9\u3057\u305F\u5F8C\u3001\u30EB\u30FC\u30D7\u306F3\u3064\u306E\u90E8\u5206\u306B\u5206\u304B\u308C\u307E\u3059\u3002"),It=d(),ue=o("ul"),Ks=o("li"),De=o("p"),da=a("\u8A13\u7DF4\u81EA\u4F53\u306F\u3001"),as=o("code"),rn=a("train_dataloader"),fa=a("\u306B\u5BFE\u3059\u308B\u53E4\u5178\u7684\u306A\u7E70\u308A\u8FD4\u3057\u3067\u3001\u30E2\u30C7\u30EB\u3092\u524D\u65B9\u306B\u901A\u904E\u3055\u305B\u3001\u5F8C\u65B9\u306B\u901A\u904E\u3055\u305B\u3001\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u884C\u3044\u307E\u3059\u3002"),bs=d(),Ys=o("li"),ie=o("p"),_a=a("\u8A55\u4FA1\u3067\u306F\u3001"),ns=o("code"),on=a("start_logits"),ua=a(" \u3068 "),Re=o("code"),pn=a("end_logits"),ma=a(" \u306E\u5024\u3092\u3059\u3079\u3066\u53CE\u96C6\u3057\u3001NumPy \u306E\u914D\u5217\u306B\u5909\u63DB\u3057\u307E\u3059\u3002\u8A55\u4FA1\u30EB\u30FC\u30D7\u304C\u7D42\u4E86\u3057\u305F\u3089\u3001\u3059\u3079\u3066\u306E\u7D50\u679C\u3092\u9023\u7D50\u3057\u307E\u3059\u3002\u5404\u51E6\u7406\u3067\u540C\u3058\u6570\u306E\u30B5\u30F3\u30D7\u30EB\u304C\u5F97\u3089\u308C\u308B\u3088\u3046\u306B\u3001"),Qe=o("code"),ha=a("Accelerator"),Zs=a("\u304C\u6700\u5F8C\u306B\u3044\u304F\u3064\u304B\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u8FFD\u52A0\u3057\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B\u305F\u3081\u3001\u5207\u308A\u6368\u3066\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),cn=d(),et=o("li"),je=o("p"),dn=a("\u4FDD\u5B58\u3068\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u306F\u3001\u307E\u305A\u30E2\u30C7\u30EB\u3068\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4FDD\u5B58\u3057\u3001\u6B21\u306B "),st=o("code"),gs=a("repo.push_to_hub()"),$a=a(" \u3092\u547C\u3073\u51FA\u3057\u307E\u3059\u3002\u524D\u56DE\u3068\u540C\u69D8\u306B\u3001\u5F15\u6570 "),me=o("code"),fn=a("blocking=False"),xs=a(" \u3092\u4F7F\u3063\u3066\u{1F917} Hub\u30E9\u30A4\u30D6\u30E9\u30EA\u306B\u975E\u540C\u671F\u51E6\u7406\u3067\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3059\u3002\u3053\u3046\u3059\u308B\u3053\u3068\u3067\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306F\u901A\u5E38\u901A\u308A\u884C\u308F\u308C\u3001\u3053\u306E\uFF08\u9577\u3044\u6642\u9593\u306E\u304B\u304B\u308B\uFF09\u547D\u4EE4\u306F\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067\u5B9F\u884C\u3055\u308C\u307E\u3059\u3002"),wa=d(),tt=o("p"),zt=a("\u4EE5\u4E0B\u306F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5B8C\u5168\u306A\u30B3\u30FC\u30C9\u3067\u3059\u3002"),ba=d(),q(js.$$.fragment),at=d(),nt=o("p"),_n=a("\u{1F917}Accelerate\u3067\u4FDD\u5B58\u3055\u308C\u305F\u30E2\u30C7\u30EB\u3092\u521D\u3081\u3066\u8868\u793A\u3059\u308B\u5834\u5408\u306F\u3001\u305D\u308C\u306B\u4ED8\u968F\u3059\u308B3\u884C\u306E\u30B3\u30FC\u30C9\u3092\u8ABF\u3079\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Nt=d(),q(Ce.$$.fragment),Ht=d(),K=o("p"),ga=a("\u6700\u521D\u306E\u884C\u306F\u81EA\u660E\u3067\u3059\u3002\u3059\u3079\u3066\u306E\u30D7\u30ED\u30BB\u30B9\u306B\u3001\u5168\u54E1\u304C\u305D\u306E\u6BB5\u968E\u306B\u306A\u308B\u307E\u3067\u5F85\u3063\u3066\u304B\u3089\u7D9A\u884C\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u4FDD\u5B58\u3059\u308B\u524D\u306B\u3001\u3059\u3079\u3066\u306E\u30D7\u30ED\u30BB\u30B9\u304C\u540C\u3058\u30E2\u30C7\u30EB\u3092\u5BFE\u8C61\u306B\u3057\u3066\u3044\u308B\u4E8B\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3067\u3059\u3002\u6B21\u306B\u3001\u5B9A\u7FA9\u3057\u305F\u30D9\u30FC\u30B9\u30E2\u30C7\u30EB\u3067\u3042\u308B"),ls=o("code"),un=a("unwrapped_model"),xa=a("\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002 "),Ge=o("code"),ja=a("accelerator.prepare\uFF08\uFF09"),lt=a("\u30E1\u30BD\u30C3\u30C9\u306F\u3001\u5206\u6563\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3067\u6A5F\u80FD\u3059\u308B\u3088\u3046\u306B\u30E2\u30C7\u30EB\u3092\u5909\u66F4\u3059\u308B\u305F\u3081\u3001 "),Vt=o("code"),va=a("save_pretrained\uFF08\uFF09"),vs=a("\u30E1\u30BD\u30C3\u30C9\u306F\u306A\u304F\u306A\u308A\u307E\u3059\u3002 "),rt=o("code"),ks=a("accelerator.unwrap_model\uFF08\uFF09"),ka=a("\u30E1\u30BD\u30C3\u30C9\u306F\u305D\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u5143\u306B\u623B\u3057\u307E\u3059\u3002\u6700\u5F8C\u306B\u3001 "),rs=o("code"),mn=a("save_pretrained\uFF08\uFF09"),qa=a("\u3092\u547C\u3073\u51FA\u3057\u307E\u3059\u304C\u3001\u305D\u306E\u30E1\u30BD\u30C3\u30C9\u306B "),Te=o("code"),qs=a("torch.save\uFF08\uFF09"),Al=a("\u306E\u4EE3\u308F\u308A\u306B "),Rt=o("code"),Es=a("accelerator.save\uFF08\uFF09"),Pl=a("\u3092\u4F7F\u7528\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3059\u3002"),Qt=d(),se=o("p"),hn=a("\u3053\u308C\u304C\u5B8C\u4E86\u3059\u308B\u3068\u3001"),os=o("code"),$n=a("Trainer"),wn=a("\u3067\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3055\u308C\u305F\u3082\u306E\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u305F\u7D50\u679C\u3092\u751F\u6210\u3059\u308B\u30E2\u30C7\u30EB\u304C\u3067\u304D\u3042\u304C\u308A\u307E\u3059\u3002 \u3053\u306E\u30B3\u30FC\u30C9\u3092\u4F7F\u7528\u3057\u3066\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3057\u305F\u30E2\u30C7\u30EB\u306F\u3001["),ys=o("em"),bn=a("huggingface-course/bert-finetuned-squad-accelerate"),gn=a("]\uFF08"),is=o("a"),ot=a("https://huggingface.co/huggingface-course/bert-finetuned-squad-accelerate\uFF09\u3067\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002"),xn=a(" \u307E\u305F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5FAE\u8ABF\u6574\u3092\u30C6\u30B9\u30C8\u3059\u308B\u5834\u5408\u306F\u3001\u4E0A\u8A18\u306E\u30B3\u30FC\u30C9\u3092\u7DE8\u96C6\u3057\u3066\u76F4\u63A5\u5B9F\u88C5\u3067\u304D\u307E\u3059\uFF01"),this.h()},l(_){c=i(_,"P",{});var F=p(c);$=n(F,"\u3082\u3046\u5C11\u3057\u6DF1\u304F\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u3092\u6975\u3081\u305F\u3044\u65B9\u306F\u3001\u4ECA\u5EA6\u306F\u{1F917}Accelerate\u3092\u4F7F\u3063\u3066\u540C\u3058\u3053\u3068\u3092\u3059\u308B\u65B9\u6CD5\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002"),F.forEach(s),u=f(_),h=i(_,"H2",{id:!0});var Sl=p(h);P=n(Sl,"\u30AB\u30B9\u30BF\u30E0\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"),Sl.forEach(s),x=f(_),j=i(_,"P",{});var ps=p(j);b=n(ps,"\u305D\u308C\u3067\u306F\u3001\u5FC5\u8981\u306A\u90E8\u5206\u3092\u7C21\u5358\u306B\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5168\u4F53\u50CF\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),m=i(ps,"A",{href:!0});var Ol=p(m);k=n(Ol,"\u7B2C3\u7AE0"),Ol.forEach(s),v=n(ps,"\u306E\u5B66\u7FD2\u30EB\u30FC\u30D7\u3068\u307B\u307C\u540C\u3058\u3067\u3059\u304C\u3001\u8A55\u4FA1\u30EB\u30FC\u30D7\u306F\u4F8B\u5916\u3067\u3059\u3002\u3082\u3046 "),C=i(ps,"CODE",{});var Ml=p(C);M=n(Ml,"Trainer"),Ml.forEach(s),H=n(ps," \u30AF\u30E9\u30B9\u306E\u5236\u7D04\u3092\u53D7\u3051\u306A\u3044\u306E\u3067\u3001\u5B9A\u671F\u7684\u306B\u30E2\u30C7\u30EB\u3092\u8A55\u4FA1\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),ps.forEach(s),A=f(_),T=i(_,"H3",{id:!0});var Bl=p(T);Q=n(Bl,"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u305F\u3081\u306E\u3059\u3079\u3066\u3092\u6E96\u5099\u3059\u308B"),Bl.forEach(s),R=f(_),z=i(_,"P",{});var be=p(z);B=n(be,"\u307E\u305A\u3001datasets\u304B\u3089 "),L=i(be,"CODE",{});var Ea=p(L);G=n(Ea,"DataLoader"),Ea.forEach(s),Z=n(be," \u3092\u69CB\u7BC9\u3057\u307E\u3059\u3002\u305D\u308C\u3089\u306Edatasets\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092 "),W=i(be,"CODE",{});var Fl=p(W);O=n(Fl,'"torch"'),Fl.forEach(s),J=n(be," \u306B\u8A2D\u5B9A\u3057\u3001\u691C\u8A3C\u7528\u30BB\u30C3\u30C8\u306E\u4E2D\u304B\u3089\u30E2\u30C7\u30EB\u3067\u4F7F\u7528\u3057\u306A\u3044\u30AB\u30E9\u30E0\u3092\u524A\u9664\u3057\u307E\u3059\u3002\u6B21\u306B\u3001Transformers \u304C\u63D0\u4F9B\u3059\u308B "),te=i(be,"CODE",{});var Ll=p(te);Y=n(Ll,"default_data_collator"),Ll.forEach(s),le=n(be," \u3092 "),ee=i(be,"CODE",{});var Il=p(ee);Ae=n(Il,"collate_fn"),Il.forEach(s),Xe=n(be," \u3068\u3057\u3066\u4F7F\u7528\u3057\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u3092\u30B7\u30E3\u30C3\u30D5\u30EB\u3057\u307E\u3059\u304C\u3001\u691C\u8A3C\u30BB\u30C3\u30C8\u306F\u30B7\u30E3\u30C3\u30D5\u30EB\u3057\u307E\u305B\u3093\u3002"),be.forEach(s),de=f(_),E(ae.$$.fragment,_),Ee=f(_),fe=i(_,"P",{});var Wt=p(fe);fs=n(Wt,"\u6B21\u306B\u3001\u30E2\u30C7\u30EB\u306E\u518D\u5B9A\u7FA9\u3092\u884C\u3044\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u4EE5\u524D\u306E\u5FAE\u8ABF\u6574\u3092\u7D99\u7D9A\u3059\u308B\u306E\u3067\u306F\u306A\u304F\u3001BERT\u3067\u4E8B\u524D\u5B66\u7FD2\u3057\u305F\u30E2\u30C7\u30EB\u304B\u3089\u518D\u3073\u958B\u59CB\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3067\u3059\u3002"),Wt.forEach(s),Pe=f(_),E(N.$$.fragment,_),U=f(_),re=i(_,"P",{});var it=p(re);Gs=n(it,"\u305D\u308C\u304B\u3089\u3001\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001\u53E4\u5178\u7684\u306A "),Ke=i(it,"CODE",{});var zl=p(Ke);Se=n(zl,"AdamW"),zl.forEach(s),Ye=n(it," \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u3053\u308C\u306F Adam \u306E\u3088\u3046\u306A\u3082\u306E\u3067\u3059\u304C\u3001\u91CD\u307F\u306E\u6E1B\u8870\u306E\u9069\u7528\u65B9\u6CD5\u3092\u4FEE\u6B63\u3057\u305F\u3082\u306E\u3067\u3059\u3002"),it.forEach(s),_s=f(_),E(he.$$.fragment,_),$e=f(_),X=i(_,"P",{});var ve=p(X);Oe=n(ve,"\u3053\u308C\u3089\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u63C3\u3063\u305F\u3089\u3001\u305D\u308C\u3089\u3092 "),ge=i(ve,"CODE",{});var Nl=p(ge);Xa=n(Nl,"accelerator.prepare()"),Nl.forEach(s),vt=n(ve," \u30E1\u30BD\u30C3\u30C9\u306B\u9001\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3082\u3057\u3001Colab\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067TPU\u3092\u4F7F\u3063\u305F\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3092\u3057\u305F\u3044\u306E\u3067\u3042\u308C\u3070\u3001\u3053\u306E\u30B3\u30FC\u30C9\u3092\u5168\u3066\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306B\u79FB\u52D5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u95A2\u6570\u306F"),kt=i(ve,"CODE",{});var Ut=p(kt);Yt=n(Ut,"Accelerator"),Ut.forEach(s),Ze=n(ve,"\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3059\u308B\u30BB\u30EB\u3092\u5B9F\u884C\u3059\u308B\u3079\u304D\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"),qt=i(ve,"CODE",{});var ya=p(qt);Et=n(ya,"Accelerator"),ya.forEach(s),Ka=n(ve,"\u306B "),yt=i(ve,"CODE",{});var Hl=p(yt);Zt=n(Hl,"fp16=True"),Hl.forEach(s),us=n(ve," \u3092\u6E21\u3059\u3053\u3068\u3067\u3001\u5F37\u5236\u7684\u306B\u6DF7\u5408\u7CBE\u5EA6\u306E\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3092\u884C\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059 (\u307E\u305F\u306F\u3001\u30B3\u30FC\u30C9\u3092\u30B9\u30AF\u30EA\u30D7\u30C8\u3068\u3057\u3066\u5B9F\u884C\u3059\u308B\u5834\u5408\u306F\u3001\u{1F917} Accelerate "),Ws=i(ve,"CODE",{});var Vl=p(Ws);Us=n(Vl,"config"),Vl.forEach(s),Ya=n(ve," \u3092\u9069\u5207\u306B\u57CB\u3081\u3066\u304F\u3060\u3055\u3044)\u3002"),ve.forEach(s),Dt=f(_),E(ye.$$.fragment,_),Ct=f(_),_e=i(_,"P",{});var Ds=p(_e);ea=n(Ds,"\u524D\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u5B66\u3093\u3060\u3088\u3046\u306B\u3001"),we=i(Ds,"CODE",{});var pt=p(we);Tt=n(pt,"train_dataloader"),pt.forEach(s),Za=n(Ds," \u306E\u9577\u3055\u306F "),At=i(Ds,"CODE",{});var jn=p(At);Pt=n(jn,"accelerator.prepare()"),jn.forEach(s),en=n(Ds," \u30E1\u30BD\u30C3\u30C9\u3092\u7D4C\u305F\u5F8C\u3067\u306E\u307F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30B9\u30C6\u30C3\u30D7\u6570\u3092\u8A08\u7B97\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067\u306F\u3001\u3053\u308C\u307E\u3067\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3068\u540C\u3058\u7DDA\u5F62\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),Ds.forEach(s),sa=f(_),E(ze.$$.fragment,_),ta=f(_),xe=i(_,"P",{});var ke=p(xe);aa=n(ke,"\u30E2\u30C7\u30EB\u3092\u30CF\u30D6\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u306B\u306F\u3001\u4F5C\u696D\u30D5\u30A9\u30EB\u30C0\u306B "),Ne=i(ke,"CODE",{});var vn=p(Ne);na=n(vn,"Repository"),vn.forEach(s),ms=n(ke," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u307E\u305A\u3001\u30CF\u30AE\u30F3\u30B0 \u30D5\u30A7\u30A4\u30B9 \u30CF\u30D6\u306B\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u307E\u3060\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u3044\u306A\u3044\u5834\u5408\uFF09\u3002\u30E2\u30C7\u30EB\u306B\u4ED8\u4E0E\u3057\u305F\u3044\u30E2\u30C7\u30EB ID \u304B\u3089\u30EA\u30DD\u30B8\u30C8\u30EA\u540D\u3092\u6C7A\u5B9A\u3057\u307E\u3059\uFF08"),Js=i(ke,"CODE",{});var We=p(Js);oe=n(We,"repo_name"),We.forEach(s),St=n(ke," \u3092\u81EA\u7531\u306B\u7F6E\u304D\u63DB\u3048\u3066\u304F\u3060\u3055\u3044\u3002\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u3001\u3053\u308C\u306F\u95A2\u6570 "),Ot=i(ke,"CODE",{});var Rl=p(Ot);sn=n(Rl,"get_full_repo_name()"),Rl.forEach(s),Mt=n(ke," \u304C\u884C\u3063\u3066\u3044\u308B\u4E8B\u3067\u3059)\u3002"),ke.forEach(s),la=f(_),E(hs.$$.fragment,_),Xs=f(_),E($s.$$.fragment,_),ra=f(_),es=i(_,"P",{});var Da=p(es);tn=n(Da,"\u305D\u3057\u3066\u3001\u305D\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC\u306B\u30AF\u30ED\u30FC\u30F3\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u3053\u306E\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC\u306F\u4F5C\u696D\u4E2D\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30AF\u30ED\u30FC\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Da.forEach(s),oa=f(_),E(He.$$.fragment,_),ia=f(_),Me=i(_,"P",{});var ct=p(Me);pa=n(ct,"\u3053\u308C\u3067 "),Be=i(ct,"CODE",{});var Ql=p(Be);an=n(Ql,"repo.push_to_hub()"),Ql.forEach(s),Bt=n(ct," \u30E1\u30BD\u30C3\u30C9\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u3067\u3001"),Ft=i(ct,"CODE",{});var Ca=p(Ft);nn=n(Ca,"output_dir"),Ca.forEach(s),ca=n(ct," \u306B\u4FDD\u5B58\u3057\u305F\u3082\u306E\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u5404\u30A8\u30DD\u30C3\u30AF\u7D42\u4E86\u6642\u306B\u4E2D\u9593\u30E2\u30C7\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),ct.forEach(s),ss=f(_),ts=i(_,"H2",{id:!0});var Gl=p(ts);ws=n(Gl,"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"),Gl.forEach(s),Lt=f(_),Ve=i(_,"P",{});var Wl=p(Ve);ln=n(Wl,"\u3053\u308C\u3067\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5168\u4F53\u3092\u8A18\u8FF0\u3059\u308B\u6E96\u5099\u304C\u6574\u3044\u307E\u3057\u305F\u3002\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u9032\u6357\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306E\u30D7\u30ED\u30B0\u30EC\u30B9\u30D0\u30FC\u3092\u5B9A\u7FA9\u3057\u305F\u5F8C\u3001\u30EB\u30FC\u30D7\u306F3\u3064\u306E\u90E8\u5206\u306B\u5206\u304B\u308C\u307E\u3059\u3002"),Wl.forEach(s),It=f(_),ue=i(_,"UL",{});var Cs=p(ue);Ks=i(Cs,"LI",{});var Ue=p(Ks);De=i(Ue,"P",{});var Ta=p(De);da=n(Ta,"\u8A13\u7DF4\u81EA\u4F53\u306F\u3001"),as=i(Ta,"CODE",{});var Jt=p(as);rn=n(Jt,"train_dataloader"),Jt.forEach(s),fa=n(Ta,"\u306B\u5BFE\u3059\u308B\u53E4\u5178\u7684\u306A\u7E70\u308A\u8FD4\u3057\u3067\u3001\u30E2\u30C7\u30EB\u3092\u524D\u65B9\u306B\u901A\u904E\u3055\u305B\u3001\u5F8C\u65B9\u306B\u901A\u904E\u3055\u305B\u3001\u30AA\u30D7\u30C6\u30A3\u30DE\u30A4\u30B6\u30FC\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u884C\u3044\u307E\u3059\u3002"),Ta.forEach(s),Ue.forEach(s),bs=f(Cs),Ys=i(Cs,"LI",{});var Ul=p(Ys);ie=i(Ul,"P",{});var cs=p(ie);_a=n(cs,"\u8A55\u4FA1\u3067\u306F\u3001"),ns=i(cs,"CODE",{});var Aa=p(ns);on=n(Aa,"start_logits"),Aa.forEach(s),ua=n(cs," \u3068 "),Re=i(cs,"CODE",{});var Jl=p(Re);pn=n(Jl,"end_logits"),Jl.forEach(s),ma=n(cs," \u306E\u5024\u3092\u3059\u3079\u3066\u53CE\u96C6\u3057\u3001NumPy \u306E\u914D\u5217\u306B\u5909\u63DB\u3057\u307E\u3059\u3002\u8A55\u4FA1\u30EB\u30FC\u30D7\u304C\u7D42\u4E86\u3057\u305F\u3089\u3001\u3059\u3079\u3066\u306E\u7D50\u679C\u3092\u9023\u7D50\u3057\u307E\u3059\u3002\u5404\u51E6\u7406\u3067\u540C\u3058\u6570\u306E\u30B5\u30F3\u30D7\u30EB\u304C\u5F97\u3089\u308C\u308B\u3088\u3046\u306B\u3001"),Qe=i(cs,"CODE",{});var Xl=p(Qe);ha=n(Xl,"Accelerator"),Xl.forEach(s),Zs=n(cs,"\u304C\u6700\u5F8C\u306B\u3044\u304F\u3064\u304B\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u8FFD\u52A0\u3057\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B\u305F\u3081\u3001\u5207\u308A\u6368\u3066\u308B\u5FC5\u8981\u304C\u3042\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),cs.forEach(s),Ul.forEach(s),cn=f(Cs),et=i(Cs,"LI",{});var kn=p(et);je=i(kn,"P",{});var Fe=p(je);dn=n(Fe,"\u4FDD\u5B58\u3068\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u306F\u3001\u307E\u305A\u30E2\u30C7\u30EB\u3068\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4FDD\u5B58\u3057\u3001\u6B21\u306B "),st=i(Fe,"CODE",{});var qn=p(st);gs=n(qn,"repo.push_to_hub()"),qn.forEach(s),$a=n(Fe," \u3092\u547C\u3073\u51FA\u3057\u307E\u3059\u3002\u524D\u56DE\u3068\u540C\u69D8\u306B\u3001\u5F15\u6570 "),me=i(Fe,"CODE",{});var dt=p(me);fn=n(dt,"blocking=False"),dt.forEach(s),xs=n(Fe," \u3092\u4F7F\u3063\u3066\u{1F917} Hub\u30E9\u30A4\u30D6\u30E9\u30EA\u306B\u975E\u540C\u671F\u51E6\u7406\u3067\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3059\u3002\u3053\u3046\u3059\u308B\u3053\u3068\u3067\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306F\u901A\u5E38\u901A\u308A\u884C\u308F\u308C\u3001\u3053\u306E\uFF08\u9577\u3044\u6642\u9593\u306E\u304B\u304B\u308B\uFF09\u547D\u4EE4\u306F\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067\u5B9F\u884C\u3055\u308C\u307E\u3059\u3002"),Fe.forEach(s),kn.forEach(s),Cs.forEach(s),wa=f(_),tt=i(_,"P",{});var En=p(tt);zt=n(En,"\u4EE5\u4E0B\u306F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5B8C\u5168\u306A\u30B3\u30FC\u30C9\u3067\u3059\u3002"),En.forEach(s),ba=f(_),E(js.$$.fragment,_),at=f(_),nt=i(_,"P",{});var Je=p(nt);_n=n(Je,"\u{1F917}Accelerate\u3067\u4FDD\u5B58\u3055\u308C\u305F\u30E2\u30C7\u30EB\u3092\u521D\u3081\u3066\u8868\u793A\u3059\u308B\u5834\u5408\u306F\u3001\u305D\u308C\u306B\u4ED8\u968F\u3059\u308B3\u884C\u306E\u30B3\u30FC\u30C9\u3092\u8ABF\u3079\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Je.forEach(s),Nt=f(_),E(Ce.$$.fragment,_),Ht=f(_),K=i(_,"P",{});var ne=p(K);ga=n(ne,"\u6700\u521D\u306E\u884C\u306F\u81EA\u660E\u3067\u3059\u3002\u3059\u3079\u3066\u306E\u30D7\u30ED\u30BB\u30B9\u306B\u3001\u5168\u54E1\u304C\u305D\u306E\u6BB5\u968E\u306B\u306A\u308B\u307E\u3067\u5F85\u3063\u3066\u304B\u3089\u7D9A\u884C\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u4FDD\u5B58\u3059\u308B\u524D\u306B\u3001\u3059\u3079\u3066\u306E\u30D7\u30ED\u30BB\u30B9\u304C\u540C\u3058\u30E2\u30C7\u30EB\u3092\u5BFE\u8C61\u306B\u3057\u3066\u3044\u308B\u4E8B\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u3067\u3059\u3002\u6B21\u306B\u3001\u5B9A\u7FA9\u3057\u305F\u30D9\u30FC\u30B9\u30E2\u30C7\u30EB\u3067\u3042\u308B"),ls=i(ne,"CODE",{});var Pa=p(ls);un=n(Pa,"unwrapped_model"),Pa.forEach(s),xa=n(ne,"\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002 "),Ge=i(ne,"CODE",{});var Kl=p(Ge);ja=n(Kl,"accelerator.prepare\uFF08\uFF09"),Kl.forEach(s),lt=n(ne,"\u30E1\u30BD\u30C3\u30C9\u306F\u3001\u5206\u6563\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3067\u6A5F\u80FD\u3059\u308B\u3088\u3046\u306B\u30E2\u30C7\u30EB\u3092\u5909\u66F4\u3059\u308B\u305F\u3081\u3001 "),Vt=i(ne,"CODE",{});var Yl=p(Vt);va=n(Yl,"save_pretrained\uFF08\uFF09"),Yl.forEach(s),vs=n(ne,"\u30E1\u30BD\u30C3\u30C9\u306F\u306A\u304F\u306A\u308A\u307E\u3059\u3002 "),rt=i(ne,"CODE",{});var Sa=p(rt);ks=n(Sa,"accelerator.unwrap_model\uFF08\uFF09"),Sa.forEach(s),ka=n(ne,"\u30E1\u30BD\u30C3\u30C9\u306F\u305D\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u5143\u306B\u623B\u3057\u307E\u3059\u3002\u6700\u5F8C\u306B\u3001 "),rs=i(ne,"CODE",{});var Zl=p(rs);mn=n(Zl,"save_pretrained\uFF08\uFF09"),Zl.forEach(s),qa=n(ne,"\u3092\u547C\u3073\u51FA\u3057\u307E\u3059\u304C\u3001\u305D\u306E\u30E1\u30BD\u30C3\u30C9\u306B "),Te=i(ne,"CODE",{});var er=p(Te);qs=n(er,"torch.save\uFF08\uFF09"),er.forEach(s),Al=n(ne,"\u306E\u4EE3\u308F\u308A\u306B "),Rt=i(ne,"CODE",{});var yn=p(Rt);Es=n(yn,"accelerator.save\uFF08\uFF09"),yn.forEach(s),Pl=n(ne,"\u3092\u4F7F\u7528\u3059\u308B\u3088\u3046\u306B\u6307\u793A\u3057\u307E\u3059\u3002"),ne.forEach(s),Qt=f(_),se=i(_,"P",{});var qe=p(se);hn=n(qe,"\u3053\u308C\u304C\u5B8C\u4E86\u3059\u308B\u3068\u3001"),os=i(qe,"CODE",{});var Dn=p(os);$n=n(Dn,"Trainer"),Dn.forEach(s),wn=n(qe,"\u3067\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3055\u308C\u305F\u3082\u306E\u3068\u975E\u5E38\u306B\u3088\u304F\u4F3C\u305F\u7D50\u679C\u3092\u751F\u6210\u3059\u308B\u30E2\u30C7\u30EB\u304C\u3067\u304D\u3042\u304C\u308A\u307E\u3059\u3002 \u3053\u306E\u30B3\u30FC\u30C9\u3092\u4F7F\u7528\u3057\u3066\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3057\u305F\u30E2\u30C7\u30EB\u306F\u3001["),ys=i(qe,"EM",{});var ft=p(ys);bn=n(ft,"huggingface-course/bert-finetuned-squad-accelerate"),ft.forEach(s),gn=n(qe,"]\uFF08"),is=i(qe,"A",{href:!0,rel:!0});var Cn=p(is);ot=n(Cn,"https://huggingface.co/huggingface-course/bert-finetuned-squad-accelerate\uFF09\u3067\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002"),Cn.forEach(s),xn=n(qe," \u307E\u305F\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7\u306E\u5FAE\u8ABF\u6574\u3092\u30C6\u30B9\u30C8\u3059\u308B\u5834\u5408\u306F\u3001\u4E0A\u8A18\u306E\u30B3\u30FC\u30C9\u3092\u7DE8\u96C6\u3057\u3066\u76F4\u63A5\u5B9F\u88C5\u3067\u304D\u307E\u3059\uFF01"),qe.forEach(s),this.h()},h(){I(h,"id",""),I(m,"href","/course/ja/chapter3/4"),I(T,"id",""),I(ts,"id",""),I(is,"href","https://huggingface.co/huggingface-course/bert-finetuned-squad-accelerate%EF%BC%89%E3%81%A7%E7%A2%BA%E8%AA%8D%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82"),I(is,"rel","nofollow")},m(_,F){l(_,c,F),t(c,$),l(_,u,F),l(_,h,F),t(h,P),l(_,x,F),l(_,j,F),t(j,b),t(j,m),t(m,k),t(j,v),t(j,C),t(C,M),t(j,H),l(_,A,F),l(_,T,F),t(T,Q),l(_,R,F),l(_,z,F),t(z,B),t(z,L),t(L,G),t(z,Z),t(z,W),t(W,O),t(z,J),t(z,te),t(te,Y),t(z,le),t(z,ee),t(ee,Ae),t(z,Xe),l(_,de,F),y(ae,_,F),l(_,Ee,F),l(_,fe,F),t(fe,fs),l(_,Pe,F),y(N,_,F),l(_,U,F),l(_,re,F),t(re,Gs),t(re,Ke),t(Ke,Se),t(re,Ye),l(_,_s,F),y(he,_,F),l(_,$e,F),l(_,X,F),t(X,Oe),t(X,ge),t(ge,Xa),t(X,vt),t(X,kt),t(kt,Yt),t(X,Ze),t(X,qt),t(qt,Et),t(X,Ka),t(X,yt),t(yt,Zt),t(X,us),t(X,Ws),t(Ws,Us),t(X,Ya),l(_,Dt,F),y(ye,_,F),l(_,Ct,F),l(_,_e,F),t(_e,ea),t(_e,we),t(we,Tt),t(_e,Za),t(_e,At),t(At,Pt),t(_e,en),l(_,sa,F),y(ze,_,F),l(_,ta,F),l(_,xe,F),t(xe,aa),t(xe,Ne),t(Ne,na),t(xe,ms),t(xe,Js),t(Js,oe),t(xe,St),t(xe,Ot),t(Ot,sn),t(xe,Mt),l(_,la,F),y(hs,_,F),l(_,Xs,F),y($s,_,F),l(_,ra,F),l(_,es,F),t(es,tn),l(_,oa,F),y(He,_,F),l(_,ia,F),l(_,Me,F),t(Me,pa),t(Me,Be),t(Be,an),t(Me,Bt),t(Me,Ft),t(Ft,nn),t(Me,ca),l(_,ss,F),l(_,ts,F),t(ts,ws),l(_,Lt,F),l(_,Ve,F),t(Ve,ln),l(_,It,F),l(_,ue,F),t(ue,Ks),t(Ks,De),t(De,da),t(De,as),t(as,rn),t(De,fa),t(ue,bs),t(ue,Ys),t(Ys,ie),t(ie,_a),t(ie,ns),t(ns,on),t(ie,ua),t(ie,Re),t(Re,pn),t(ie,ma),t(ie,Qe),t(Qe,ha),t(ie,Zs),t(ue,cn),t(ue,et),t(et,je),t(je,dn),t(je,st),t(st,gs),t(je,$a),t(je,me),t(me,fn),t(je,xs),l(_,wa,F),l(_,tt,F),t(tt,zt),l(_,ba,F),y(js,_,F),l(_,at,F),l(_,nt,F),t(nt,_n),l(_,Nt,F),y(Ce,_,F),l(_,Ht,F),l(_,K,F),t(K,ga),t(K,ls),t(ls,un),t(K,xa),t(K,Ge),t(Ge,ja),t(K,lt),t(K,Vt),t(Vt,va),t(K,vs),t(K,rt),t(rt,ks),t(K,ka),t(K,rs),t(rs,mn),t(K,qa),t(K,Te),t(Te,qs),t(K,Al),t(K,Rt),t(Rt,Es),t(K,Pl),l(_,Qt,F),l(_,se,F),t(se,hn),t(se,os),t(os,$n),t(se,wn),t(se,ys),t(ys,bn),t(se,gn),t(se,is),t(is,ot),t(se,xn),Gt=!0},i(_){Gt||(w(ae.$$.fragment,_),w(N.$$.fragment,_),w(he.$$.fragment,_),w(ye.$$.fragment,_),w(ze.$$.fragment,_),w(hs.$$.fragment,_),w($s.$$.fragment,_),w(He.$$.fragment,_),w(js.$$.fragment,_),w(Ce.$$.fragment,_),Gt=!0)},o(_){g(ae.$$.fragment,_),g(N.$$.fragment,_),g(he.$$.fragment,_),g(ye.$$.fragment,_),g(ze.$$.fragment,_),g(hs.$$.fragment,_),g($s.$$.fragment,_),g(He.$$.fragment,_),g(js.$$.fragment,_),g(Ce.$$.fragment,_),Gt=!1},d(_){_&&s(c),_&&s(u),_&&s(h),_&&s(x),_&&s(j),_&&s(A),_&&s(T),_&&s(R),_&&s(z),_&&s(de),D(ae,_),_&&s(Ee),_&&s(fe),_&&s(Pe),D(N,_),_&&s(U),_&&s(re),_&&s(_s),D(he,_),_&&s($e),_&&s(X),_&&s(Dt),D(ye,_),_&&s(Ct),_&&s(_e),_&&s(sa),D(ze,_),_&&s(ta),_&&s(xe),_&&s(la),D(hs,_),_&&s(Xs),D($s,_),_&&s(ra),_&&s(es),_&&s(oa),D(He,_),_&&s(ia),_&&s(Me),_&&s(ss),_&&s(ts),_&&s(Lt),_&&s(Ve),_&&s(It),_&&s(ue),_&&s(wa),_&&s(tt),_&&s(ba),D(js,_),_&&s(at),_&&s(nt),_&&s(Nt),D(Ce,_),_&&s(Ht),_&&s(K),_&&s(Qt),_&&s(se)}}}function Xu(V){let c,$,u,h,P,x,j,b,m,k,v,C,M,H,A,T,Q,R,z,B,L,G,Z,W,O,J,te,Y,le,ee,Ae,Xe,de,ae,Ee,fe,fs,Pe,N,U,re,Gs,Ke,Se,Ye,_s,he,$e,X,Oe,ge,Xa,vt,kt,Yt,Ze,qt,Et,Ka,yt,Zt,us,Ws,Us,Ya,Dt,ye,Ct,_e,ea,we,Tt,Za,At,Pt,en,sa,ze,ta,xe,aa,Ne,na,ms,Js,oe,St,Ot,sn,Mt,la,hs,Xs,$s,ra,es,tn,oa,He,ia,Me,pa,Be,an,Bt,Ft,nn,ca,ss,ts,ws,Lt,Ve,ln,It,ue,Ks,De,da,as,rn,fa,bs,Ys,ie,_a,ns,on,ua,Re,pn,ma,Qe,ha,Zs,cn,et,je,dn,st,gs,$a,me,fn,xs,wa,tt,zt,ba,js,at,nt,_n,Nt,Ce,Ht,K,ga,ls,un,xa,Ge,ja,lt,Vt,va,vs,rt,ks,ka,rs,mn,qa,Te,qs,Al,Rt,Es,Pl,Qt,se,hn,os,$n,wn,ys,bn,gn,is,ot,xn,Gt,_,F,Sl,ps,Ol,Ml,Bl,be,Ea,Fl,Ll,Il,Wt,it,zl,ve,Nl,Ut,ya,Hl,Vl,Ds,pt,jn,ke,vn,We,Rl,Da,ct,Ql,Ca,Gl,Wl,Cs,Ue,Ta,Jt,Ul,cs,Aa,Jl,Xl,kn,Fe,qn,dt,En,Je,ne,Pa,Kl,Yl,Sa,Zl,er,yn,qe,Dn,ft,Cn,sr,Ap,Bo,Tn,Fo,An,Lo,tr,Pp,Io,ar,Sp,zo,Oa,Pn,Op,Kr,Mp,Bp,Fp,_t,Yr,Lp,Ip,Zr,zp,Np,eo,Hp,Vp,No,ut,Rp,so,Qp,Gp,to,Wp,Up,Ho,Ma,Jp,ao,Xp,Kp,Vo,Sn,Ro,On,Qo,Ba,Yp,no,Zp,ec,Go,Mn,Wo,Bn,Uo,Fa,sc,lo,tc,ac,Jo,Fn,Xo,Ln,Ko,nr,nc,Yo,La,Zo,lr,lc,ei,In,si,rr,rc,ti,mt,oc,ro,ic,pc,oo,cc,dc,ai,zn,ni,Nn,li,or,fc,ri,Hn,_c,oi,ir,uc,ii,ht,mc,io,hc,$c,po,wc,bc,pi,Vn,ci,pr,gc,di,Rn,fi,Qn,_i,cr,xc,ui,Ts,As,dr,Gn,jc,mi,Ps,Ss,fr,Ia,vc,Wn,co,kc,qc,Ec,hi,ds,fo,yc,Dc,_o,Cc,Tc,Un,Ac,uo,Pc,Sc,Oc,Xt,Mc,mo,Bc,Fc,ho,Lc,Ic,$i,Le,zc,$o,Nc,Hc,wo,Vc,Rc,bo,Qc,Gc,wi,bu='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>log</mi><mo>\u2061</mo><mo stretchy="false">(</mo><mi>a</mi><mi>b</mi><mo stretchy="false">)</mo><mo>=</mo><mi>log</mi><mo>\u2061</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mo>+</mo><mi>log</mi><mo>\u2061</mo><mo stretchy="false">(</mo><mi>b</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\\log(ab) = \\log(a) + \\log(b)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop">lo<span style="margin-right:0.01389em;">g</span></span><span class="mopen">(</span><span class="mord mathnormal">ab</span><span class="mclose">)</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:1em;vertical-align:-0.25em;"></span><span class="mop">lo<span style="margin-right:0.01389em;">g</span></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop">lo<span style="margin-right:0.01389em;">g</span></span><span class="mopen">(</span><span class="mord mathnormal">b</span><span class="mclose">)</span></span></span></span>',bi,gi,za,Wc,go,Uc,Jc,xi,Jn,ji,_r,Xc,vi,Xn,ki,Na,Kc,xo,Yc,Zc,qi,Os,Ms,ur,Ie,ed,jo,sd,td,vo,ad,nd,ko,ld,rd,qo,od,id,Ei,Kn,yi,mr,pd,Di,$t,Eo,cd,dd,yo,fd,_d,Yn,ud,Do,md,hd,Ci,hr,$d,Ti,Zn,Ai,$r,wd,Pi,el,Si,wr,bd,Oi,sl,Mi,br,gd,Bi,tl,Fi,al,Li,gr,xd,Ii,nl,zi,ll,Ni,rl,ol,jd,vd,Hi,xr,il,Vi,jr,kd,Ri,pl,Qi,cl,Gi,vr,qd,Wi,dl,Ed,Ui,Bs,Fs,kr,qr,yd,Ji,Er,Dd,Xi,fl,Ki,yr,Cd,Yi,_l,Zi,Ls,Is,Dr,Ha,Td,Co,Ad,Pd,ep,zs,To,Sd,Od,Ao,Md,Bd,Po,Fd,Ld,sp,Ns,Hs,Cr,Tr,Id,tp,Vs,Rs,Ar,ul,ap,Pr,zd,np,Sr,Or,Nd,lp,Va,rp,Mr,ml,Hd,op,Ra,Vd,So,Rd,Qd,ip,hl,pp,$l,cp,Br,Gd,dp;u=new yu({props:{fw:V[0]}});const ef=[Cu,Du],wl=[];function sf(e,r){return e[0]==="pt"?0:1}b=sf(V),m=wl[b]=ef[b](V),Q=new Tp({props:{id:"ajPx5LwJD-I"}}),ae=new Cp({props:{$$slots:{default:[Tu]},$$scope:{ctx:V}}}),ge=new Zd({}),us=new S({props:{code:`from datasets import load_dataset

raw_datasets = load_dataset("squad")`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

raw_datasets = load_dataset(<span class="hljs-string">&quot;squad&quot;</span>)`}}),ye=new S({props:{code:"raw_datasets",highlighted:"raw_datasets"}}),_e=new S({props:{code:`DatasetDict({
    train: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers'],
        num_rows: 87599
    })
    validation: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers'],
        num_rows: 10570
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;title&#x27;</span>, <span class="hljs-string">&#x27;context&#x27;</span>, <span class="hljs-string">&#x27;question&#x27;</span>, <span class="hljs-string">&#x27;answers&#x27;</span>],
        num_rows: <span class="hljs-number">87599</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;title&#x27;</span>, <span class="hljs-string">&#x27;context&#x27;</span>, <span class="hljs-string">&#x27;question&#x27;</span>, <span class="hljs-string">&#x27;answers&#x27;</span>],
        num_rows: <span class="hljs-number">10570</span>
    })
})`}}),Ne=new S({props:{code:`print("Context: ", raw_datasets["train"][0]["context"])
print("Question: ", raw_datasets["train"][0]["question"])
print("Answer: ", raw_datasets["train"][0]["answers"])`,highlighted:`<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Context: &quot;</span>, raw_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;context&quot;</span>])
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Question: &quot;</span>, raw_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;question&quot;</span>])
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Answer: &quot;</span>, raw_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;answers&quot;</span>])`}}),ms=new S({props:{code:`Context: 'Architecturally, the school has a Catholic character. Atop the Main Building\\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.'
Question: 'To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France?'
Answer: {'text': ['Saint Bernadette Soubirous'], 'answer_start': [515]}`,highlighted:`Context: <span class="hljs-string">&#x27;Architecturally, the school has a Catholic character. Atop the Main Building\\&#x27;s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend &quot;Venite Ad Me Omnes&quot;. Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.&#x27;</span>
Question: <span class="hljs-string">&#x27;To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France?&#x27;</span>
Answer: {<span class="hljs-string">&#x27;text&#x27;</span>: [<span class="hljs-string">&#x27;Saint Bernadette Soubirous&#x27;</span>], <span class="hljs-string">&#x27;answer_start&#x27;</span>: [<span class="hljs-number">515</span>]}`}}),ss=new S({props:{code:'raw_datasets["train"].filter(lambda x: len(x["answers"]["text"]) != 1)',highlighted:'raw_datasets[<span class="hljs-string">&quot;train&quot;</span>].<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;answers&quot;</span>][<span class="hljs-string">&quot;text&quot;</span>]) != <span class="hljs-number">1</span>)'}}),ws=new S({props:{code:`Dataset({
    features: ['id', 'title', 'context', 'question', 'answers'],
    num_rows: 0
})`,highlighted:`Dataset({
    features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;title&#x27;</span>, <span class="hljs-string">&#x27;context&#x27;</span>, <span class="hljs-string">&#x27;question&#x27;</span>, <span class="hljs-string">&#x27;answers&#x27;</span>],
    num_rows: <span class="hljs-number">0</span>
})`}}),ue=new S({props:{code:`print(raw_datasets["validation"][0]["answers"])
print(raw_datasets["validation"][2]["answers"])`,highlighted:`<span class="hljs-built_in">print</span>(raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;answers&quot;</span>])
<span class="hljs-built_in">print</span>(raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>][<span class="hljs-number">2</span>][<span class="hljs-string">&quot;answers&quot;</span>])`}}),De=new S({props:{code:`{'text': ['Denver Broncos', 'Denver Broncos', 'Denver Broncos'], 'answer_start': [177, 177, 177]}
{'text': ['Santa Clara, California', "Levi's Stadium", "Levi's Stadium in the San Francisco Bay Area at Santa Clara, California."], 'answer_start': [403, 355, 355]}`,highlighted:`{<span class="hljs-string">&#x27;text&#x27;</span>: [<span class="hljs-string">&#x27;Denver Broncos&#x27;</span>, <span class="hljs-string">&#x27;Denver Broncos&#x27;</span>, <span class="hljs-string">&#x27;Denver Broncos&#x27;</span>], <span class="hljs-string">&#x27;answer_start&#x27;</span>: [<span class="hljs-number">177</span>, <span class="hljs-number">177</span>, <span class="hljs-number">177</span>]}
{<span class="hljs-string">&#x27;text&#x27;</span>: [<span class="hljs-string">&#x27;Santa Clara, California&#x27;</span>, <span class="hljs-string">&quot;Levi&#x27;s Stadium&quot;</span>, <span class="hljs-string">&quot;Levi&#x27;s Stadium in the San Francisco Bay Area at Santa Clara, California.&quot;</span>], <span class="hljs-string">&#x27;answer_start&#x27;</span>: [<span class="hljs-number">403</span>, <span class="hljs-number">355</span>, <span class="hljs-number">355</span>]}`}}),bs=new S({props:{code:`print(raw_datasets["validation"][2]["context"])
print(raw_datasets["validation"][2]["question"])`,highlighted:`<span class="hljs-built_in">print</span>(raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>][<span class="hljs-number">2</span>][<span class="hljs-string">&quot;context&quot;</span>])
<span class="hljs-built_in">print</span>(raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>][<span class="hljs-number">2</span>][<span class="hljs-string">&quot;question&quot;</span>])`}}),ie=new S({props:{code:`'Super Bowl 50 was an American football game to determine the champion of the National Football League (NFL) for the 2015 season. The American Football Conference (AFC) champion Denver Broncos defeated the National Football Conference (NFC) champion Carolina Panthers 24\u201310 to earn their third Super Bowl title. The game was played on February 7, 2016, at Levi\\'s Stadium in the San Francisco Bay Area at Santa Clara, California. As this was the 50th Super Bowl, the league emphasized the "golden anniversary" with various gold-themed initiatives, as well as temporarily suspending the tradition of naming each Super Bowl game with Roman numerals (under which the game would have been known as "Super Bowl L"), so that the logo could prominently feature the Arabic numerals 50.'
'Where did Super Bowl 50 take place?'`,highlighted:`<span class="hljs-string">&#x27;Super Bowl 50 was an American football game to determine the champion of the National Football League (NFL) for the 2015 season. The American Football Conference (AFC) champion Denver Broncos defeated the National Football Conference (NFC) champion Carolina Panthers 24\u201310 to earn their third Super Bowl title. The game was played on February 7, 2016, at Levi\\&#x27;s Stadium in the San Francisco Bay Area at Santa Clara, California. As this was the 50th Super Bowl, the league emphasized the &quot;golden anniversary&quot; with various gold-themed initiatives, as well as temporarily suspending the tradition of naming each Super Bowl game with Roman numerals (under which the game would have been known as &quot;Super Bowl L&quot;), so that the logo could prominently feature the Arabic numerals 50.&#x27;</span>
<span class="hljs-string">&#x27;Where did Super Bowl 50 take place?&#x27;</span>`}}),Qe=new Tp({props:{id:"qgaM0weJHpA"}}),gs=new S({props:{code:`from transformers import AutoTokenizer

model_checkpoint = "bert-base-cased"
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;bert-base-cased&quot;</span>
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)`}}),Ce=new S({props:{code:"tokenizer.is_fast",highlighted:"tokenizer.is_fast"}}),K=new S({props:{code:"True",highlighted:'<span class="hljs-literal">True</span>'}}),Ge=new S({props:{code:"[CLS] question [SEP] context [SEP]",highlighted:'<span class="hljs-selector-attr">[CLS]</span> question <span class="hljs-selector-attr">[SEP]</span> context <span class="hljs-selector-attr">[SEP]</span>'}}),vs=new S({props:{code:`context = raw_datasets["train"][0]["context"]
question = raw_datasets["train"][0]["question"]

inputs = tokenizer(question, context)
tokenizer.decode(inputs["input_ids"])`,highlighted:`context = raw_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;context&quot;</span>]
question = raw_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;question&quot;</span>]

inputs = tokenizer(question, context)
tokenizer.decode(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])`}}),ks=new S({props:{code:`'[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP] Architecturally, '
'the school has a Catholic character. Atop the Main Building\\'s gold dome is a golden statue of the Virgin '
'Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms '
'upraised with the legend " Venite Ad Me Omnes ". Next to the Main Building is the Basilica of the Sacred '
'Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a '
'replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette '
'Soubirous in 1858. At the end of the main drive ( and in a direct line that connects through 3 statues '
'and the Gold Dome ), is a simple, modern stone statue of Mary. [SEP]'`,highlighted:`<span class="hljs-string">&#x27;[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP] Architecturally, &#x27;</span>
<span class="hljs-string">&#x27;the school has a Catholic character. Atop the Main Building\\&#x27;s gold dome is a golden statue of the Virgin &#x27;</span>
<span class="hljs-string">&#x27;Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms &#x27;</span>
<span class="hljs-string">&#x27;upraised with the legend &quot; Venite Ad Me Omnes &quot;. Next to the Main Building is the Basilica of the Sacred &#x27;</span>
<span class="hljs-string">&#x27;Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a &#x27;</span>
<span class="hljs-string">&#x27;replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette &#x27;</span>
<span class="hljs-string">&#x27;Soubirous in 1858. At the end of the main drive ( and in a direct line that connects through 3 statues &#x27;</span>
<span class="hljs-string">&#x27;and the Gold Dome ), is a simple, modern stone statue of Mary. [SEP]&#x27;</span>`}}),pt=new S({props:{code:`inputs = tokenizer(
    question,
    context,
    max_length=100,
    truncation="only_second",
    stride=50,
    return_overflowing_tokens=True,
)

for ids in inputs["input_ids"]:
    print(tokenizer.decode(ids))`,highlighted:`inputs = tokenizer(
    question,
    context,
    max_length=<span class="hljs-number">100</span>,
    truncation=<span class="hljs-string">&quot;only_second&quot;</span>,
    stride=<span class="hljs-number">50</span>,
    return_overflowing_tokens=<span class="hljs-literal">True</span>,
)

<span class="hljs-keyword">for</span> ids <span class="hljs-keyword">in</span> inputs[<span class="hljs-string">&quot;input_ids&quot;</span>]:
    <span class="hljs-built_in">print</span>(tokenizer.decode(ids))`}}),ke=new S({props:{code:`'[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP] Architecturally, the school has a Catholic character. Atop the Main Building\\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend " Venite Ad Me Omnes ". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basi [SEP]'
'[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP] the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend " Venite Ad Me Omnes ". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin [SEP]'
'[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP] Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive ( and in a direct line that connects through 3 [SEP]'
'[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP]. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive ( and in a direct line that connects through 3 statues and the Gold Dome ), is a simple, modern stone statue of Mary. [SEP]'`,highlighted:`<span class="hljs-string">&#x27;[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP] Architecturally, the school has a Catholic character. Atop the Main Building\\&#x27;s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend &quot; Venite Ad Me Omnes &quot;. Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basi [SEP]&#x27;</span>
<span class="hljs-string">&#x27;[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP] the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend &quot; Venite Ad Me Omnes &quot;. Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin [SEP]&#x27;</span>
<span class="hljs-string">&#x27;[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP] Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive ( and in a direct line that connects through 3 [SEP]&#x27;</span>
<span class="hljs-string">&#x27;[CLS] To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France? [SEP]. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive ( and in a direct line that connects through 3 statues and the Gold Dome ), is a simple, modern stone statue of Mary. [SEP]&#x27;</span>`}}),Fe=new S({props:{code:`inputs = tokenizer(
    question,
    context,
    max_length=100,
    truncation="only_second",
    stride=50,
    return_overflowing_tokens=True,
    return_offsets_mapping=True,
)
inputs.keys()`,highlighted:`inputs = tokenizer(
    question,
    context,
    max_length=<span class="hljs-number">100</span>,
    truncation=<span class="hljs-string">&quot;only_second&quot;</span>,
    stride=<span class="hljs-number">50</span>,
    return_overflowing_tokens=<span class="hljs-literal">True</span>,
    return_offsets_mapping=<span class="hljs-literal">True</span>,
)
inputs.keys()`}}),dt=new S({props:{code:"dict_keys(['input_ids', 'token_type_ids', 'attention_mask', 'offset_mapping', 'overflow_to_sample_mapping'])",highlighted:'dict_keys([<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;offset_mapping&#x27;</span>, <span class="hljs-string">&#x27;overflow_to_sample_mapping&#x27;</span>])'}}),qe=new S({props:{code:'inputs["overflow_to_sample_mapping"]',highlighted:'inputs[<span class="hljs-string">&quot;overflow_to_sample_mapping&quot;</span>]'}}),ft=new S({props:{code:"[0, 0, 0, 0]",highlighted:'[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]'}}),Tn=new S({props:{code:`inputs = tokenizer(
    raw_datasets["train"][2:6]["question"],
    raw_datasets["train"][2:6]["context"],
    max_length=100,
    truncation="only_second",
    stride=50,
    return_overflowing_tokens=True,
    return_offsets_mapping=True,
)

print(f"The 4 examples gave {len(inputs['input_ids'])} features.")
print(f"Here is where each comes from: {inputs['overflow_to_sample_mapping']}.")`,highlighted:`inputs = tokenizer(
    raw_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">2</span>:<span class="hljs-number">6</span>][<span class="hljs-string">&quot;question&quot;</span>],
    raw_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">2</span>:<span class="hljs-number">6</span>][<span class="hljs-string">&quot;context&quot;</span>],
    max_length=<span class="hljs-number">100</span>,
    truncation=<span class="hljs-string">&quot;only_second&quot;</span>,
    stride=<span class="hljs-number">50</span>,
    return_overflowing_tokens=<span class="hljs-literal">True</span>,
    return_offsets_mapping=<span class="hljs-literal">True</span>,
)

<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;The 4 examples gave <span class="hljs-subst">{<span class="hljs-built_in">len</span>(inputs[<span class="hljs-string">&#x27;input_ids&#x27;</span>])}</span> features.&quot;</span>)
<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Here is where each comes from: <span class="hljs-subst">{inputs[<span class="hljs-string">&#x27;overflow_to_sample_mapping&#x27;</span>]}</span>.&quot;</span>)`}}),An=new S({props:{code:`'The 4 examples gave 19 features.'
'Here is where each comes from: [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3].'`,highlighted:`<span class="hljs-string">&#x27;The 4 examples gave 19 features.&#x27;</span>
<span class="hljs-string">&#x27;Here is where each comes from: [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3].&#x27;</span>`}}),Sn=new S({props:{code:`answers = raw_datasets["train"][2:6]["answers"]
start_positions = []
end_positions = []

for i, offset in enumerate(inputs["offset_mapping"]):
    sample_idx = inputs["overflow_to_sample_mapping"][i]
    answer = answers[sample_idx]
    start_char = answer["answer_start"][0]
    end_char = answer["answer_start"][0] + len(answer["text"][0])
    sequence_ids = inputs.sequence_ids(i)

    # Find the start and end of the context
    idx = 0
    while sequence_ids[idx] != 1:
        idx += 1
    context_start = idx
    while sequence_ids[idx] == 1:
        idx += 1
    context_end = idx - 1

    # If the answer is not fully inside the context, label is (0, 0)
    if offset[context_start][0] > start_char or offset[context_end][1] < end_char:
        start_positions.append(0)
        end_positions.append(0)
    else:
        # Otherwise it's the start and end token positions
        idx = context_start
        while idx <= context_end and offset[idx][0] <= start_char:
            idx += 1
        start_positions.append(idx - 1)

        idx = context_end
        while idx >= context_start and offset[idx][1] >= end_char:
            idx -= 1
        end_positions.append(idx + 1)

start_positions, end_positions`,highlighted:`answers = raw_datasets[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">2</span>:<span class="hljs-number">6</span>][<span class="hljs-string">&quot;answers&quot;</span>]
start_positions = []
end_positions = []

<span class="hljs-keyword">for</span> i, offset <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(inputs[<span class="hljs-string">&quot;offset_mapping&quot;</span>]):
    sample_idx = inputs[<span class="hljs-string">&quot;overflow_to_sample_mapping&quot;</span>][i]
    answer = answers[sample_idx]
    start_char = answer[<span class="hljs-string">&quot;answer_start&quot;</span>][<span class="hljs-number">0</span>]
    end_char = answer[<span class="hljs-string">&quot;answer_start&quot;</span>][<span class="hljs-number">0</span>] + <span class="hljs-built_in">len</span>(answer[<span class="hljs-string">&quot;text&quot;</span>][<span class="hljs-number">0</span>])
    sequence_ids = inputs.sequence_ids(i)

    <span class="hljs-comment"># Find the start and end of the context</span>
    idx = <span class="hljs-number">0</span>
    <span class="hljs-keyword">while</span> sequence_ids[idx] != <span class="hljs-number">1</span>:
        idx += <span class="hljs-number">1</span>
    context_start = idx
    <span class="hljs-keyword">while</span> sequence_ids[idx] == <span class="hljs-number">1</span>:
        idx += <span class="hljs-number">1</span>
    context_end = idx - <span class="hljs-number">1</span>

    <span class="hljs-comment"># If the answer is not fully inside the context, label is (0, 0)</span>
    <span class="hljs-keyword">if</span> offset[context_start][<span class="hljs-number">0</span>] &gt; start_char <span class="hljs-keyword">or</span> offset[context_end][<span class="hljs-number">1</span>] &lt; end_char:
        start_positions.append(<span class="hljs-number">0</span>)
        end_positions.append(<span class="hljs-number">0</span>)
    <span class="hljs-keyword">else</span>:
        <span class="hljs-comment"># Otherwise it&#x27;s the start and end token positions</span>
        idx = context_start
        <span class="hljs-keyword">while</span> idx &lt;= context_end <span class="hljs-keyword">and</span> offset[idx][<span class="hljs-number">0</span>] &lt;= start_char:
            idx += <span class="hljs-number">1</span>
        start_positions.append(idx - <span class="hljs-number">1</span>)

        idx = context_end
        <span class="hljs-keyword">while</span> idx &gt;= context_start <span class="hljs-keyword">and</span> offset[idx][<span class="hljs-number">1</span>] &gt;= end_char:
            idx -= <span class="hljs-number">1</span>
        end_positions.append(idx + <span class="hljs-number">1</span>)

start_positions, end_positions`}}),On=new S({props:{code:`([83, 51, 19, 0, 0, 64, 27, 0, 34, 0, 0, 0, 67, 34, 0, 0, 0, 0, 0],
 [85, 53, 21, 0, 0, 70, 33, 0, 40, 0, 0, 0, 68, 35, 0, 0, 0, 0, 0])`,highlighted:`([<span class="hljs-number">83</span>, <span class="hljs-number">51</span>, <span class="hljs-number">19</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">64</span>, <span class="hljs-number">27</span>, <span class="hljs-number">0</span>, <span class="hljs-number">34</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">67</span>, <span class="hljs-number">34</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">85</span>, <span class="hljs-number">53</span>, <span class="hljs-number">21</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">70</span>, <span class="hljs-number">33</span>, <span class="hljs-number">0</span>, <span class="hljs-number">40</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">68</span>, <span class="hljs-number">35</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>])`}}),Mn=new S({props:{code:`idx = 0
sample_idx = inputs["overflow_to_sample_mapping"][idx]
answer = answers[sample_idx]["text"][0]

start = start_positions[idx]
end = end_positions[idx]
labeled_answer = tokenizer.decode(inputs["input_ids"][idx][start : end + 1])

print(f"Theoretical answer: {answer}, labels give: {labeled_answer}")`,highlighted:`idx = <span class="hljs-number">0</span>
sample_idx = inputs[<span class="hljs-string">&quot;overflow_to_sample_mapping&quot;</span>][idx]
answer = answers[sample_idx][<span class="hljs-string">&quot;text&quot;</span>][<span class="hljs-number">0</span>]

start = start_positions[idx]
end = end_positions[idx]
labeled_answer = tokenizer.decode(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>][idx][start : end + <span class="hljs-number">1</span>])

<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Theoretical answer: <span class="hljs-subst">{answer}</span>, labels give: <span class="hljs-subst">{labeled_answer}</span>&quot;</span>)`}}),Bn=new S({props:{code:"'Theoretical answer: the Main Building, labels give: the Main Building'",highlighted:'<span class="hljs-string">&#x27;Theoretical answer: the Main Building, labels give: the Main Building&#x27;</span>'}}),Fn=new S({props:{code:`idx = 4
sample_idx = inputs["overflow_to_sample_mapping"][idx]
answer = answers[sample_idx]["text"][0]

decoded_example = tokenizer.decode(inputs["input_ids"][idx])
print(f"Theoretical answer: {answer}, decoded example: {decoded_example}")`,highlighted:`idx = <span class="hljs-number">4</span>
sample_idx = inputs[<span class="hljs-string">&quot;overflow_to_sample_mapping&quot;</span>][idx]
answer = answers[sample_idx][<span class="hljs-string">&quot;text&quot;</span>][<span class="hljs-number">0</span>]

decoded_example = tokenizer.decode(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>][idx])
<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Theoretical answer: <span class="hljs-subst">{answer}</span>, decoded example: <span class="hljs-subst">{decoded_example}</span>&quot;</span>)`}}),Ln=new S({props:{code:`'Theoretical answer: a Marian place of prayer and reflection, decoded example: [CLS] What is the Grotto at Notre Dame? [SEP] Architecturally, the school has a Catholic character. Atop the Main Building\\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend " Venite Ad Me Omnes ". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grot [SEP]'`,highlighted:'<span class="hljs-string">&#x27;Theoretical answer: a Marian place of prayer and reflection, decoded example: [CLS] What is the Grotto at Notre Dame? [SEP] Architecturally, the school has a Catholic character. Atop the Main Building\\&#x27;s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend &quot; Venite Ad Me Omnes &quot;. Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grot [SEP]&#x27;</span>'}}),La=new Cp({props:{$$slots:{default:[Au]},$$scope:{ctx:V}}}),In=new S({props:{code:`max_length = 384
stride = 128


def preprocess_training_examples(examples):
    questions = [q.strip() for q in examples["question"]]
    inputs = tokenizer(
        questions,
        examples["context"],
        max_length=max_length,
        truncation="only_second",
        stride=stride,
        return_overflowing_tokens=True,
        return_offsets_mapping=True,
        padding="max_length",
    )

    offset_mapping = inputs.pop("offset_mapping")
    sample_map = inputs.pop("overflow_to_sample_mapping")
    answers = examples["answers"]
    start_positions = []
    end_positions = []

    for i, offset in enumerate(offset_mapping):
        sample_idx = sample_map[i]
        answer = answers[sample_idx]
        start_char = answer["answer_start"][0]
        end_char = answer["answer_start"][0] + len(answer["text"][0])
        sequence_ids = inputs.sequence_ids(i)

        # Find the start and end of the context
        idx = 0
        while sequence_ids[idx] != 1:
            idx += 1
        context_start = idx
        while sequence_ids[idx] == 1:
            idx += 1
        context_end = idx - 1

        # If the answer is not fully inside the context, label is (0, 0)
        if offset[context_start][0] > start_char or offset[context_end][1] < end_char:
            start_positions.append(0)
            end_positions.append(0)
        else:
            # Otherwise it's the start and end token positions
            idx = context_start
            while idx <= context_end and offset[idx][0] <= start_char:
                idx += 1
            start_positions.append(idx - 1)

            idx = context_end
            while idx >= context_start and offset[idx][1] >= end_char:
                idx -= 1
            end_positions.append(idx + 1)

    inputs["start_positions"] = start_positions
    inputs["end_positions"] = end_positions
    return inputs`,highlighted:`max_length = <span class="hljs-number">384</span>
stride = <span class="hljs-number">128</span>


<span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_training_examples</span>(<span class="hljs-params">examples</span>):
    questions = [q.strip() <span class="hljs-keyword">for</span> q <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;question&quot;</span>]]
    inputs = tokenizer(
        questions,
        examples[<span class="hljs-string">&quot;context&quot;</span>],
        max_length=max_length,
        truncation=<span class="hljs-string">&quot;only_second&quot;</span>,
        stride=stride,
        return_overflowing_tokens=<span class="hljs-literal">True</span>,
        return_offsets_mapping=<span class="hljs-literal">True</span>,
        padding=<span class="hljs-string">&quot;max_length&quot;</span>,
    )

    offset_mapping = inputs.pop(<span class="hljs-string">&quot;offset_mapping&quot;</span>)
    sample_map = inputs.pop(<span class="hljs-string">&quot;overflow_to_sample_mapping&quot;</span>)
    answers = examples[<span class="hljs-string">&quot;answers&quot;</span>]
    start_positions = []
    end_positions = []

    <span class="hljs-keyword">for</span> i, offset <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(offset_mapping):
        sample_idx = sample_map[i]
        answer = answers[sample_idx]
        start_char = answer[<span class="hljs-string">&quot;answer_start&quot;</span>][<span class="hljs-number">0</span>]
        end_char = answer[<span class="hljs-string">&quot;answer_start&quot;</span>][<span class="hljs-number">0</span>] + <span class="hljs-built_in">len</span>(answer[<span class="hljs-string">&quot;text&quot;</span>][<span class="hljs-number">0</span>])
        sequence_ids = inputs.sequence_ids(i)

        <span class="hljs-comment"># Find the start and end of the context</span>
        idx = <span class="hljs-number">0</span>
        <span class="hljs-keyword">while</span> sequence_ids[idx] != <span class="hljs-number">1</span>:
            idx += <span class="hljs-number">1</span>
        context_start = idx
        <span class="hljs-keyword">while</span> sequence_ids[idx] == <span class="hljs-number">1</span>:
            idx += <span class="hljs-number">1</span>
        context_end = idx - <span class="hljs-number">1</span>

        <span class="hljs-comment"># If the answer is not fully inside the context, label is (0, 0)</span>
        <span class="hljs-keyword">if</span> offset[context_start][<span class="hljs-number">0</span>] &gt; start_char <span class="hljs-keyword">or</span> offset[context_end][<span class="hljs-number">1</span>] &lt; end_char:
            start_positions.append(<span class="hljs-number">0</span>)
            end_positions.append(<span class="hljs-number">0</span>)
        <span class="hljs-keyword">else</span>:
            <span class="hljs-comment"># Otherwise it&#x27;s the start and end token positions</span>
            idx = context_start
            <span class="hljs-keyword">while</span> idx &lt;= context_end <span class="hljs-keyword">and</span> offset[idx][<span class="hljs-number">0</span>] &lt;= start_char:
                idx += <span class="hljs-number">1</span>
            start_positions.append(idx - <span class="hljs-number">1</span>)

            idx = context_end
            <span class="hljs-keyword">while</span> idx &gt;= context_start <span class="hljs-keyword">and</span> offset[idx][<span class="hljs-number">1</span>] &gt;= end_char:
                idx -= <span class="hljs-number">1</span>
            end_positions.append(idx + <span class="hljs-number">1</span>)

    inputs[<span class="hljs-string">&quot;start_positions&quot;</span>] = start_positions
    inputs[<span class="hljs-string">&quot;end_positions&quot;</span>] = end_positions
    <span class="hljs-keyword">return</span> inputs`}}),zn=new S({props:{code:`train_dataset = raw_datasets["train"].map(
    preprocess_training_examples,
    batched=True,
    remove_columns=raw_datasets["train"].column_names,
)
len(raw_datasets["train"]), len(train_dataset)`,highlighted:`train_dataset = raw_datasets[<span class="hljs-string">&quot;train&quot;</span>].<span class="hljs-built_in">map</span>(
    preprocess_training_examples,
    batched=<span class="hljs-literal">True</span>,
    remove_columns=raw_datasets[<span class="hljs-string">&quot;train&quot;</span>].column_names,
)
<span class="hljs-built_in">len</span>(raw_datasets[<span class="hljs-string">&quot;train&quot;</span>]), <span class="hljs-built_in">len</span>(train_dataset)`}}),Nn=new S({props:{code:"(87599, 88729)",highlighted:'(<span class="hljs-number">87599</span>, <span class="hljs-number">88729</span>)'}}),Vn=new S({props:{code:`def preprocess_validation_examples(examples):
    questions = [q.strip() for q in examples["question"]]
    inputs = tokenizer(
        questions,
        examples["context"],
        max_length=max_length,
        truncation="only_second",
        stride=stride,
        return_overflowing_tokens=True,
        return_offsets_mapping=True,
        padding="max_length",
    )

    sample_map = inputs.pop("overflow_to_sample_mapping")
    example_ids = []

    for i in range(len(inputs["input_ids"])):
        sample_idx = sample_map[i]
        example_ids.append(examples["id"][sample_idx])

        sequence_ids = inputs.sequence_ids(i)
        offset = inputs["offset_mapping"][i]
        inputs["offset_mapping"][i] = [
            o if sequence_ids[k] == 1 else None for k, o in enumerate(offset)
        ]

    inputs["example_id"] = example_ids
    return inputs`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_validation_examples</span>(<span class="hljs-params">examples</span>):
    questions = [q.strip() <span class="hljs-keyword">for</span> q <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;question&quot;</span>]]
    inputs = tokenizer(
        questions,
        examples[<span class="hljs-string">&quot;context&quot;</span>],
        max_length=max_length,
        truncation=<span class="hljs-string">&quot;only_second&quot;</span>,
        stride=stride,
        return_overflowing_tokens=<span class="hljs-literal">True</span>,
        return_offsets_mapping=<span class="hljs-literal">True</span>,
        padding=<span class="hljs-string">&quot;max_length&quot;</span>,
    )

    sample_map = inputs.pop(<span class="hljs-string">&quot;overflow_to_sample_mapping&quot;</span>)
    example_ids = []

    <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-built_in">len</span>(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])):
        sample_idx = sample_map[i]
        example_ids.append(examples[<span class="hljs-string">&quot;id&quot;</span>][sample_idx])

        sequence_ids = inputs.sequence_ids(i)
        offset = inputs[<span class="hljs-string">&quot;offset_mapping&quot;</span>][i]
        inputs[<span class="hljs-string">&quot;offset_mapping&quot;</span>][i] = [
            o <span class="hljs-keyword">if</span> sequence_ids[k] == <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> <span class="hljs-literal">None</span> <span class="hljs-keyword">for</span> k, o <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(offset)
        ]

    inputs[<span class="hljs-string">&quot;example_id&quot;</span>] = example_ids
    <span class="hljs-keyword">return</span> inputs`}}),Rn=new S({props:{code:`validation_dataset = raw_datasets["validation"].map(
    preprocess_validation_examples,
    batched=True,
    remove_columns=raw_datasets["validation"].column_names,
)
len(raw_datasets["validation"]), len(validation_dataset)`,highlighted:`validation_dataset = raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>].<span class="hljs-built_in">map</span>(
    preprocess_validation_examples,
    batched=<span class="hljs-literal">True</span>,
    remove_columns=raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>].column_names,
)
<span class="hljs-built_in">len</span>(raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>]), <span class="hljs-built_in">len</span>(validation_dataset)`}}),Qn=new S({props:{code:"(10570, 10822)",highlighted:'(<span class="hljs-number">10570</span>, <span class="hljs-number">10822</span>)'}});const tf=[Su,Pu],bl=[];function af(e,r){return e[0]==="pt"?0:1}Ts=af(V),As=bl[Ts]=tf[Ts](V);const nf=[Mu,Ou],gl=[];function lf(e,r){return e[0]==="pt"?0:1}Ps=lf(V),Ss=gl[Ps]=nf[Ps](V),Jn=new S({props:{code:`small_eval_set = raw_datasets["validation"].select(range(100))
trained_checkpoint = "distilbert-base-cased-distilled-squad"

tokenizer = AutoTokenizer.from_pretrained(trained_checkpoint)
eval_set = small_eval_set.map(
    preprocess_validation_examples,
    batched=True,
    remove_columns=raw_datasets["validation"].column_names,
)`,highlighted:`small_eval_set = raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>].select(<span class="hljs-built_in">range</span>(<span class="hljs-number">100</span>))
trained_checkpoint = <span class="hljs-string">&quot;distilbert-base-cased-distilled-squad&quot;</span>

tokenizer = AutoTokenizer.from_pretrained(trained_checkpoint)
eval_set = small_eval_set.<span class="hljs-built_in">map</span>(
    preprocess_validation_examples,
    batched=<span class="hljs-literal">True</span>,
    remove_columns=raw_datasets[<span class="hljs-string">&quot;validation&quot;</span>].column_names,
)`}}),Xn=new S({props:{code:"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)",highlighted:"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)"}});const rf=[Fu,Bu],xl=[];function of(e,r){return e[0]==="pt"?0:1}Os=of(V),Ms=xl[Os]=rf[Os](V),Kn=new S({props:{code:`import collections

example_to_features = collections.defaultdict(list)
for idx, feature in enumerate(eval_set):
    example_to_features[feature["example_id"]].append(idx)`,highlighted:`<span class="hljs-keyword">import</span> collections

example_to_features = collections.defaultdict(<span class="hljs-built_in">list</span>)
<span class="hljs-keyword">for</span> idx, feature <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(eval_set):
    example_to_features[feature[<span class="hljs-string">&quot;example_id&quot;</span>]].append(idx)`}}),Zn=new S({props:{code:`import numpy as np

n_best = 20
max_answer_length = 30
predicted_answers = []

for example in small_eval_set:
    example_id = example["id"]
    context = example["context"]
    answers = []

    for feature_index in example_to_features[example_id]:
        start_logit = start_logits[feature_index]
        end_logit = end_logits[feature_index]
        offsets = eval_set["offset_mapping"][feature_index]

        start_indexes = np.argsort(start_logit)[-1 : -n_best - 1 : -1].tolist()
        end_indexes = np.argsort(end_logit)[-1 : -n_best - 1 : -1].tolist()
        for start_index in start_indexes:
            for end_index in end_indexes:
                # Skip answers that are not fully in the context
                if offsets[start_index] is None or offsets[end_index] is None:
                    continue
                # Skip answers with a length that is either < 0 or > max_answer_length.
                if (
                    end_index < start_index
                    or end_index - start_index + 1 > max_answer_length
                ):
                    continue

                answers.append(
                    {
                        "text": context[offsets[start_index][0] : offsets[end_index][1]],
                        "logit_score": start_logit[start_index] + end_logit[end_index],
                    }
                )

    best_answer = max(answers, key=lambda x: x["logit_score"])
    predicted_answers.append({"id": example_id, "prediction_text": best_answer["text"]})`,highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

n_best = <span class="hljs-number">20</span>
max_answer_length = <span class="hljs-number">30</span>
predicted_answers = []

<span class="hljs-keyword">for</span> example <span class="hljs-keyword">in</span> small_eval_set:
    example_id = example[<span class="hljs-string">&quot;id&quot;</span>]
    context = example[<span class="hljs-string">&quot;context&quot;</span>]
    answers = []

    <span class="hljs-keyword">for</span> feature_index <span class="hljs-keyword">in</span> example_to_features[example_id]:
        start_logit = start_logits[feature_index]
        end_logit = end_logits[feature_index]
        offsets = eval_set[<span class="hljs-string">&quot;offset_mapping&quot;</span>][feature_index]

        start_indexes = np.argsort(start_logit)[-<span class="hljs-number">1</span> : -n_best - <span class="hljs-number">1</span> : -<span class="hljs-number">1</span>].tolist()
        end_indexes = np.argsort(end_logit)[-<span class="hljs-number">1</span> : -n_best - <span class="hljs-number">1</span> : -<span class="hljs-number">1</span>].tolist()
        <span class="hljs-keyword">for</span> start_index <span class="hljs-keyword">in</span> start_indexes:
            <span class="hljs-keyword">for</span> end_index <span class="hljs-keyword">in</span> end_indexes:
                <span class="hljs-comment"># Skip answers that are not fully in the context</span>
                <span class="hljs-keyword">if</span> offsets[start_index] <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span> <span class="hljs-keyword">or</span> offsets[end_index] <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span>:
                    <span class="hljs-keyword">continue</span>
                <span class="hljs-comment"># Skip answers with a length that is either &lt; 0 or &gt; max_answer_length.</span>
                <span class="hljs-keyword">if</span> (
                    end_index &lt; start_index
                    <span class="hljs-keyword">or</span> end_index - start_index + <span class="hljs-number">1</span> &gt; max_answer_length
                ):
                    <span class="hljs-keyword">continue</span>

                answers.append(
                    {
                        <span class="hljs-string">&quot;text&quot;</span>: context[offsets[start_index][<span class="hljs-number">0</span>] : offsets[end_index][<span class="hljs-number">1</span>]],
                        <span class="hljs-string">&quot;logit_score&quot;</span>: start_logit[start_index] + end_logit[end_index],
                    }
                )

    best_answer = <span class="hljs-built_in">max</span>(answers, key=<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;logit_score&quot;</span>])
    predicted_answers.append({<span class="hljs-string">&quot;id&quot;</span>: example_id, <span class="hljs-string">&quot;prediction_text&quot;</span>: best_answer[<span class="hljs-string">&quot;text&quot;</span>]})`}}),el=new S({props:{code:`import evaluate

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

metric = evaluate.load(<span class="hljs-string">&quot;squad&quot;</span>)`}}),sl=new S({props:{code:`theoretical_answers = [
    {"id": ex["id"], "answers": ex["answers"]} for ex in small_eval_set
]`,highlighted:`theoretical_answers = [
    {<span class="hljs-string">&quot;id&quot;</span>: ex[<span class="hljs-string">&quot;id&quot;</span>], <span class="hljs-string">&quot;answers&quot;</span>: ex[<span class="hljs-string">&quot;answers&quot;</span>]} <span class="hljs-keyword">for</span> ex <span class="hljs-keyword">in</span> small_eval_set
]`}}),tl=new S({props:{code:`print(predicted_answers[0])
print(theoretical_answers[0])`,highlighted:`<span class="hljs-built_in">print</span>(predicted_answers[<span class="hljs-number">0</span>])
<span class="hljs-built_in">print</span>(theoretical_answers[<span class="hljs-number">0</span>])`}}),al=new S({props:{code:`{'id': '56be4db0acb8001400a502ec', 'prediction_text': 'Denver Broncos'}
{'id': '56be4db0acb8001400a502ec', 'answers': {'text': ['Denver Broncos', 'Denver Broncos', 'Denver Broncos'], 'answer_start': [177, 177, 177]}}`,highlighted:`{<span class="hljs-string">&#x27;id&#x27;</span>: <span class="hljs-string">&#x27;56be4db0acb8001400a502ec&#x27;</span>, <span class="hljs-string">&#x27;prediction_text&#x27;</span>: <span class="hljs-string">&#x27;Denver Broncos&#x27;</span>}
{<span class="hljs-string">&#x27;id&#x27;</span>: <span class="hljs-string">&#x27;56be4db0acb8001400a502ec&#x27;</span>, <span class="hljs-string">&#x27;answers&#x27;</span>: {<span class="hljs-string">&#x27;text&#x27;</span>: [<span class="hljs-string">&#x27;Denver Broncos&#x27;</span>, <span class="hljs-string">&#x27;Denver Broncos&#x27;</span>, <span class="hljs-string">&#x27;Denver Broncos&#x27;</span>], <span class="hljs-string">&#x27;answer_start&#x27;</span>: [<span class="hljs-number">177</span>, <span class="hljs-number">177</span>, <span class="hljs-number">177</span>]}}`}}),nl=new S({props:{code:"metric.compute(predictions=predicted_answers, references=theoretical_answers)",highlighted:"metric.compute(predictions=predicted_answers, references=theoretical_answers)"}}),ll=new S({props:{code:"{'exact_match': 83.0, 'f1': 88.25}",highlighted:'{<span class="hljs-string">&#x27;exact_match&#x27;</span>: <span class="hljs-number">83.0</span>, <span class="hljs-string">&#x27;f1&#x27;</span>: <span class="hljs-number">88.25</span>}'}});function pf(e,r){return e[0]==="pt"?Iu:Lu}let fp=pf(V),Kt=fp(V);il=new S({props:{code:`from tqdm.auto import tqdm


def compute_metrics(start_logits, end_logits, features, examples):
    example_to_features = collections.defaultdict(list)
    for idx, feature in enumerate(features):
        example_to_features[feature["example_id"]].append(idx)

    predicted_answers = []
    for example in tqdm(examples):
        example_id = example["id"]
        context = example["context"]
        answers = []

        # Loop through all features associated with that example
        for feature_index in example_to_features[example_id]:
            start_logit = start_logits[feature_index]
            end_logit = end_logits[feature_index]
            offsets = features[feature_index]["offset_mapping"]

            start_indexes = np.argsort(start_logit)[-1 : -n_best - 1 : -1].tolist()
            end_indexes = np.argsort(end_logit)[-1 : -n_best - 1 : -1].tolist()
            for start_index in start_indexes:
                for end_index in end_indexes:
                    # Skip answers that are not fully in the context
                    if offsets[start_index] is None or offsets[end_index] is None:
                        continue
                    # Skip answers with a length that is either < 0 or > max_answer_length
                    if (
                        end_index < start_index
                        or end_index - start_index + 1 > max_answer_length
                    ):
                        continue

                    answer = {
                        "text": context[offsets[start_index][0] : offsets[end_index][1]],
                        "logit_score": start_logit[start_index] + end_logit[end_index],
                    }
                    answers.append(answer)

        # Select the answer with the best score
        if len(answers) > 0:
            best_answer = max(answers, key=lambda x: x["logit_score"])
            predicted_answers.append(
                {"id": example_id, "prediction_text": best_answer["text"]}
            )
        else:
            predicted_answers.append({"id": example_id, "prediction_text": ""})

    theoretical_answers = [{"id": ex["id"], "answers": ex["answers"]} for ex in examples]
    return metric.compute(predictions=predicted_answers, references=theoretical_answers)`,highlighted:`<span class="hljs-keyword">from</span> tqdm.auto <span class="hljs-keyword">import</span> tqdm


<span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_metrics</span>(<span class="hljs-params">start_logits, end_logits, features, examples</span>):
    example_to_features = collections.defaultdict(<span class="hljs-built_in">list</span>)
    <span class="hljs-keyword">for</span> idx, feature <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(features):
        example_to_features[feature[<span class="hljs-string">&quot;example_id&quot;</span>]].append(idx)

    predicted_answers = []
    <span class="hljs-keyword">for</span> example <span class="hljs-keyword">in</span> tqdm(examples):
        example_id = example[<span class="hljs-string">&quot;id&quot;</span>]
        context = example[<span class="hljs-string">&quot;context&quot;</span>]
        answers = []

        <span class="hljs-comment"># Loop through all features associated with that example</span>
        <span class="hljs-keyword">for</span> feature_index <span class="hljs-keyword">in</span> example_to_features[example_id]:
            start_logit = start_logits[feature_index]
            end_logit = end_logits[feature_index]
            offsets = features[feature_index][<span class="hljs-string">&quot;offset_mapping&quot;</span>]

            start_indexes = np.argsort(start_logit)[-<span class="hljs-number">1</span> : -n_best - <span class="hljs-number">1</span> : -<span class="hljs-number">1</span>].tolist()
            end_indexes = np.argsort(end_logit)[-<span class="hljs-number">1</span> : -n_best - <span class="hljs-number">1</span> : -<span class="hljs-number">1</span>].tolist()
            <span class="hljs-keyword">for</span> start_index <span class="hljs-keyword">in</span> start_indexes:
                <span class="hljs-keyword">for</span> end_index <span class="hljs-keyword">in</span> end_indexes:
                    <span class="hljs-comment"># Skip answers that are not fully in the context</span>
                    <span class="hljs-keyword">if</span> offsets[start_index] <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span> <span class="hljs-keyword">or</span> offsets[end_index] <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span>:
                        <span class="hljs-keyword">continue</span>
                    <span class="hljs-comment"># Skip answers with a length that is either &lt; 0 or &gt; max_answer_length</span>
                    <span class="hljs-keyword">if</span> (
                        end_index &lt; start_index
                        <span class="hljs-keyword">or</span> end_index - start_index + <span class="hljs-number">1</span> &gt; max_answer_length
                    ):
                        <span class="hljs-keyword">continue</span>

                    answer = {
                        <span class="hljs-string">&quot;text&quot;</span>: context[offsets[start_index][<span class="hljs-number">0</span>] : offsets[end_index][<span class="hljs-number">1</span>]],
                        <span class="hljs-string">&quot;logit_score&quot;</span>: start_logit[start_index] + end_logit[end_index],
                    }
                    answers.append(answer)

        <span class="hljs-comment"># Select the answer with the best score</span>
        <span class="hljs-keyword">if</span> <span class="hljs-built_in">len</span>(answers) &gt; <span class="hljs-number">0</span>:
            best_answer = <span class="hljs-built_in">max</span>(answers, key=<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;logit_score&quot;</span>])
            predicted_answers.append(
                {<span class="hljs-string">&quot;id&quot;</span>: example_id, <span class="hljs-string">&quot;prediction_text&quot;</span>: best_answer[<span class="hljs-string">&quot;text&quot;</span>]}
            )
        <span class="hljs-keyword">else</span>:
            predicted_answers.append({<span class="hljs-string">&quot;id&quot;</span>: example_id, <span class="hljs-string">&quot;prediction_text&quot;</span>: <span class="hljs-string">&quot;&quot;</span>})

    theoretical_answers = [{<span class="hljs-string">&quot;id&quot;</span>: ex[<span class="hljs-string">&quot;id&quot;</span>], <span class="hljs-string">&quot;answers&quot;</span>: ex[<span class="hljs-string">&quot;answers&quot;</span>]} <span class="hljs-keyword">for</span> ex <span class="hljs-keyword">in</span> examples]
    <span class="hljs-keyword">return</span> metric.compute(predictions=predicted_answers, references=theoretical_answers)`}}),pl=new S({props:{code:"compute_metrics(start_logits, end_logits, eval_set, small_eval_set)",highlighted:"compute_metrics(start_logits, end_logits, eval_set, small_eval_set)"}}),cl=new S({props:{code:"{'exact_match': 83.0, 'f1': 88.25}",highlighted:'{<span class="hljs-string">&#x27;exact_match&#x27;</span>: <span class="hljs-number">83.0</span>, <span class="hljs-string">&#x27;f1&#x27;</span>: <span class="hljs-number">88.25</span>}'}});const cf=[Nu,zu],jl=[];function df(e,r){return e[0]==="pt"?0:1}Bs=df(V),Fs=jl[Bs]=cf[Bs](V),fl=new S({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()`}}),_l=new S({props:{code:"huggingface-cli login",highlighted:"huggingface-cli login"}});const ff=[Vu,Hu],vl=[];function _f(e,r){return e[0]==="pt"?0:1}Ls=_f(V),Is=vl[Ls]=ff[Ls](V);const uf=[Qu,Ru],kl=[];function mf(e,r){return e[0]==="pt"?0:1}Ns=mf(V),Hs=kl[Ns]=uf[Ns](V);const hf=[Uu,Wu],ql=[];function $f(e,r){return e[0]==="pt"?0:1}Vs=$f(V),Rs=ql[Vs]=hf[Vs](V),ul=new S({props:{code:"{'exact_match': 81.18259224219489, 'f1': 88.67381321905516}",highlighted:'{<span class="hljs-string">&#x27;exact_match&#x27;</span>: <span class="hljs-number">81.18259224219489</span>, <span class="hljs-string">&#x27;f1&#x27;</span>: <span class="hljs-number">88.67381321905516</span>}'}});let pe=V[0]==="pt"&&hu();Va=new Cp({props:{$$slots:{default:[Ju]},$$scope:{ctx:V}}});let ce=V[0]==="pt"&&$u();return hl=new S({props:{code:`from transformers import pipeline

# Replace this with your own checkpoint
model_checkpoint = "huggingface-course/bert-finetuned-squad"
question_answerer = pipeline("question-answering", model=model_checkpoint)

context = """
\u{1F917} Transformers is backed by the three most popular deep learning libraries \u2014 Jax, PyTorch and TensorFlow \u2014 with a seamless integration
between them. It's straightforward to train your models with one before loading them for inference with the other.
"""
question = "Which deep learning libraries back \u{1F917} Transformers?"
question_answerer(question=question, context=context)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-comment"># Replace this with your own checkpoint</span>
model_checkpoint = <span class="hljs-string">&quot;huggingface-course/bert-finetuned-squad&quot;</span>
question_answerer = pipeline(<span class="hljs-string">&quot;question-answering&quot;</span>, model=model_checkpoint)

context = <span class="hljs-string">&quot;&quot;&quot;
\u{1F917} Transformers is backed by the three most popular deep learning libraries \u2014 Jax, PyTorch and TensorFlow \u2014 with a seamless integration
between them. It&#x27;s straightforward to train your models with one before loading them for inference with the other.
&quot;&quot;&quot;</span>
question = <span class="hljs-string">&quot;Which deep learning libraries back \u{1F917} Transformers?&quot;</span>
question_answerer(question=question, context=context)`}}),$l=new S({props:{code:`{'score': 0.9979003071784973,
 'start': 78,
 'end': 105,
 'answer': 'Jax, PyTorch and TensorFlow'}`,highlighted:`{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9979003071784973</span>,
 <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">78</span>,
 <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">105</span>,
 <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;Jax, PyTorch and TensorFlow&#x27;</span>}`}}),{c(){c=o("meta"),$=d(),q(u.$$.fragment),h=d(),P=o("h1"),x=a("\u8CEA\u554F\u5FDC\u7B54"),j=d(),m.c(),k=d(),v=o("p"),C=a("\u8CEA\u554F\u5FDC\u7B54\u306B\u3064\u3044\u3066\u8003\u3048\u308B\u6642\u304C\u6765\u307E\u3057\u305F\u3002\u3053\u306E\u30BF\u30B9\u30AF\u306B\u306F\u591A\u304F\u306E\u7A2E\u985E\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u53D6\u308A\u4E0A\u3052\u308B\u306E\u306F\u300C "),M=o("em"),H=a("\u62BD\u51FA\u7684"),A=a(" \u306A\u8CEA\u554F\u5FDC\u7B54\u300D\u3067\u3059\u3002\u3053\u308C\u306F\u3001\u7279\u5B9A\u306E\u6587\u66F8\u306B\u3064\u3044\u3066\u306E\u8CEA\u554F\u3092\u6295\u3052\u304B\u3051\u3001\u6587\u66F8\u5185\u306E\u7B54\u3048\u306E\u66F8\u304B\u308C\u3066\u3044\u308B\u7BC4\u56F2\u3092\u7279\u5B9A\u3059\u308B\u3053\u3068\u3092\u542B\u307F\u307E\u3059\u3002"),T=d(),q(Q.$$.fragment),R=d(),z=o("p"),B=a("\u79C1\u9054\u306F\u3001Wikipedia\u306E\u8A18\u4E8B\u306B\u5BFE\u3057\u3066\u30AF\u30E9\u30A6\u30C9\u30EF\u30FC\u30AB\u30FC\u306B\u3088\u3063\u3066\u4F5C\u6210\u3055\u308C\u305F\u8CEA\u554F\u304B\u3089\u306A\u308B"),L=o("a"),G=a("SQuAD\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),Z=a("\u306EBERT\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3059\u308B\u4E88\u5B9A\u3067\u3059\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306A\u4E88\u6E2C\u3092\u5B9F\u884C\u3067\u304D\u308B\u30E2\u30C7\u30EB\u304C\u3067\u304D\u308B\u3067\u3057\u3087\u3046\u3002"),W=d(),O=o("iframe"),te=d(),Y=o("p"),le=a(`\u3053\u308C\u306F\u5B9F\u969B\u306B\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u793A\u3057\u305F\u30B3\u30FC\u30C9\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u3057\u3001\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u305F\u30E2\u30C7\u30EB\u3092\u7D39\u4ECB\u3057\u3066\u3044\u308B\u3082\u306E\u3067\u3059\u3002
\u8CB4\u65B9\u306F`),ee=o("a"),Ae=a("\u3053\u3053"),Xe=a("\u3067\u30E2\u30C7\u30EB\u3092\u898B\u3064\u3051\u3066\u3001\u4E88\u6E2C\u3092\u518D\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),de=d(),q(ae.$$.fragment),Ee=d(),fe=o("h2"),fs=a("\u30C7\u30FC\u30BF\u306E\u6E96\u5099"),Pe=d(),N=o("p"),U=a("\u62BD\u51FA\u7684\u8CEA\u554F\u5FDC\u7B54\u306E\u5B66\u8853\u7684\u306A\u30D9\u30F3\u30C1\u30DE\u30FC\u30AF\u3068\u3057\u3066\u6700\u3082\u5229\u7528\u3055\u308C\u3066\u3044\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C "),re=o("a"),Gs=a("SQuAD"),Ke=a(" \u3067\u3059\u306E\u3067\u3001\u3053\u3053\u3067\u3082\u3053\u308C\u3092\u5229\u7528\u3057\u307E\u3059\u3002\u307E\u305F\u3001\u3088\u308A\u96E3\u3057\u3044"),Se=o("a"),Ye=a("SQuAD v2"),_s=a("\u30D9\u30F3\u30C1\u30DE\u30FC\u30AF\u3082\u3042\u308A\u3001\u3053\u308C\u306F\u7B54\u3048\u306E\u306A\u3044\u8CEA\u554F\u3092\u542B\u3093\u3067\u3044\u307E\u3059\u3002\u3042\u306A\u305F\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C\u6587\u8108\u306E\u5217\u3001\u8CEA\u554F\u306E\u5217\u3001\u7B54\u3048\u306E\u5217\u3092\u542B\u3093\u3067\u3044\u308B\u9650\u308A\u3001\u4EE5\u4E0B\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u9069\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u306F\u305A\u3067\u3059\u3002"),he=d(),$e=o("h3"),X=o("a"),Oe=o("span"),q(ge.$$.fragment),Xa=d(),vt=o("span"),kt=a("SQuAD \u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),Yt=d(),Ze=o("p"),qt=a("\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001"),Et=o("code"),Ka=a("load_dataset()"),yt=a("\u306E\u304A\u304B\u3052\u3067\u3001\u305F\u3063\u305F1\u30B9\u30C6\u30C3\u30D7\u3067\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Zt=d(),q(us.$$.fragment),Ws=d(),Us=o("p"),Ya=a("\u305D\u3057\u3066\u3001\u3053\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u898B\u3066\u3001SQuAD\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306B\u3064\u3044\u3066\u3082\u3063\u3068\u77E5\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Dt=d(),q(ye.$$.fragment),Ct=d(),q(_e.$$.fragment),ea=d(),we=o("p"),Tt=o("code"),Za=a("context"),At=a(", "),Pt=o("code"),en=a("question"),sa=a(", "),ze=o("code"),ta=a("answers"),xe=a(" \u30D5\u30A3\u30FC\u30EB\u30C9\u3067\u5FC5\u8981\u306A\u3082\u306E\u306F\u3059\u3079\u3066\u63C3\u3063\u305F\u3088\u3046\u306A\u306E\u3067\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u306E\u6700\u521D\u306E\u8981\u7D20\u306B\u5BFE\u3057\u3066\u3053\u308C\u3089\u3092\u51FA\u529B\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),aa=d(),q(Ne.$$.fragment),na=d(),q(ms.$$.fragment),Js=d(),oe=o("p"),St=o("code"),Ot=a("context"),sn=a(" \u3068 "),Mt=o("code"),la=a("question"),hs=a(" \u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u975E\u5E38\u306B\u7C21\u5358\u306B\u4F7F\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Xs=o("code"),$s=a("answers"),ra=a(" \u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u5C11\u3057\u624B\u304C\u8FBC\u3093\u3067\u304A\u308A\u3001\u30EA\u30B9\u30C8\u3067\u3042\u308B2\u3064\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6301\u3064\u8F9E\u66F8\u578B\u30C7\u30FC\u30BF\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001 "),es=o("code"),tn=a("squad"),oa=a(" \u6307\u6A19\u304C\u8A55\u4FA1\u6642\u306B\u671F\u5F85\u3059\u308B\u5F62\u5F0F\u3067\u3059\u3002\u3082\u3057\u3001\u3042\u306A\u305F\u81EA\u8EAB\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u306E\u3067\u3042\u308C\u3070\u3001\u5FC5\u305A\u3057\u3082\u540C\u3058\u5F62\u5F0F\u306E\u7B54\u3048\u3092\u7F6E\u304F\u3053\u3068\u3092\u5FC3\u914D\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u307E\u305F\u3001 "),He=o("code"),ia=a("answer_start"),Me=a(" \u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u306F\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u5404\u89E3\u7B54\u306E\u958B\u59CB\u6587\u5B57\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u304C\u683C\u7D0D\u3055\u308C\u307E\u3059\u3002"),pa=d(),Be=o("p"),an=a("\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u9593\u3001\u53EF\u80FD\u306A\u7B54\u3048\u306F1\u3064\u3060\u3051\u3067\u3059\u3002\u3053\u306E\u3053\u3068\u306F "),Bt=o("code"),Ft=a("Dataset.filter()"),nn=a(" \u30E1\u30BD\u30C3\u30C9\u3067\u30C0\u30D6\u30EB\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),ca=d(),q(ss.$$.fragment),ts=d(),q(ws.$$.fragment),Lt=d(),Ve=o("p"),ln=a("\u305F\u3060\u3057\u3001\u8A55\u4FA1\u306B\u3064\u3044\u3066\u306F\u3001\u5404\u30B5\u30F3\u30D7\u30EB\u306B\u3064\u3044\u3066\u3001\u540C\u3058\u7B54\u3048\u3082\u3042\u308C\u3070\u7570\u306A\u308B\u7B54\u3048\u3082\u3042\u308A\u3001\u3044\u304F\u3064\u304B\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"),It=d(),q(ue.$$.fragment),Ks=d(),q(De.$$.fragment),da=d(),as=o("p"),rn=a("\u8A55\u4FA1\u30B9\u30AF\u30EA\u30D7\u30C8\u306F\u{1F917} Datasets\u306E\u6307\u6A19\u306B\u3088\u3063\u3066\u307E\u3068\u3081\u3089\u308C\u308B\u306E\u3067\u3001\u3053\u3053\u3067\u306F\u6DF1\u5165\u308A\u3057\u307E\u305B\u3093\u304C\u3001\u7C21\u5358\u306B\u8A00\u3046\u3068\u3001\u3044\u304F\u3064\u304B\u306E\u8CEA\u554F\u306B\u306F\u3044\u304F\u3064\u304B\u306E\u56DE\u7B54\u304C\u3042\u308A\u3001\u3053\u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u306F\u4E88\u6E2C\u3055\u308C\u305F\u56DE\u7B54\u3068\u3059\u3079\u3066\u306E\u8A31\u5BB9\u3067\u304D\u308B\u56DE\u7B54\u3092\u6BD4\u8F03\u3057\u3001\u30D9\u30B9\u30C8\u30B9\u30B3\u30A2\u3092\u53D6\u308B\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u4F8B\u3048\u3070\u30A4\u30F3\u30C7\u30C3\u30AF\u30B92\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u898B\u3066\u307F\u308B\u3068"),fa=d(),q(bs.$$.fragment),Ys=d(),q(ie.$$.fragment),_a=d(),ns=o("p"),on=a("\u7B54\u3048\u306F\u30013\u3064\u306E\u53EF\u80FD\u6027\u306E\u3046\u3061\u306E1\u3064\u3067\u3042\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002"),ua=d(),Re=o("h3"),pn=a("\u5B66\u7FD2\u30C7\u30FC\u30BF\u306E\u51E6\u7406"),ma=d(),q(Qe.$$.fragment),ha=d(),Zs=o("p"),cn=a("\u307E\u305A\u3001\u5B66\u7FD2\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u304B\u3089\u59CB\u3081\u307E\u3057\u3087\u3046\u3002\u96E3\u3057\u3044\u306E\u306F\u8CEA\u554F\u306E\u7B54\u3048\u306E\u30E9\u30D9\u30EB\u3092\u751F\u6210\u3059\u308B\u3053\u3068\u3067\u3001\u3053\u308C\u306F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u7B54\u3048\u306B\u5BFE\u5FDC\u3059\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u958B\u59CB\u4F4D\u7F6E\u3068\u7D42\u4E86\u4F4D\u7F6E\u3068\u306A\u308A\u307E\u3059\u3002"),et=d(),je=o("p"),dn=a("\u3057\u304B\u3057\u3001\u5148\u3092\u6025\u304C\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3057\u3087\u3046\u3002\u307E\u305A\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4F7F\u3063\u3066\u3001\u5165\u529B\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u30E2\u30C7\u30EB\u304C\u7406\u89E3\u3067\u304D\u308B\u3088\u3046\u306AID\u306B\u5909\u63DB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),st=d(),q(gs.$$.fragment),$a=d(),me=o("p"),fn=a("\u5148\u306B\u8FF0\u3079\u305F\u3088\u3046\u306B\u3001\u79C1\u305F\u3061\u306F BERT \u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3057\u307E\u3059\u304C\u3001\u9AD8\u901F\u306A\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u304C\u5B9F\u88C5\u3055\u308C\u3066\u3044\u308B\u9650\u308A\u3001\u4ED6\u306E\u3069\u306E\u3088\u3046\u306A\u30E2\u30C7\u30EB\u30BF\u30A4\u30D7\u3067\u3082\u4F7F\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),xs=o("a"),wa=a("\u3053\u306E\u5927\u304D\u306A\u8868"),tt=a("\u3067\u9AD8\u901F\u7248\u3092\u6301\u3064\u3059\u3079\u3066\u306E\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u4F7F\u7528\u3057\u3066\u3044\u308B "),zt=o("code"),ba=a("tokenizer"),js=a(" \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u672C\u5F53\u306B \u{1F917} Tokenizers \u3067\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u306B\u306F\u3001\u305D\u306E "),at=o("code"),nt=a("is_fast"),_n=a(" \u5C5E\u6027\u3092\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Nt=d(),q(Ce.$$.fragment),Ht=d(),q(K.$$.fragment),ga=d(),ls=o("p"),un=a("\u8CEA\u554F\u3068\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u4E00\u7DD2\u306B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u6E21\u305B\u3070\u3001\u7279\u6B8A\u306A\u30C8\u30FC\u30AF\u30F3\u3092\u9069\u5207\u306B\u633F\u5165\u3057\u3066\u3001\u6B21\u306E\u3088\u3046\u306A\u6587\u7AE0\u3092\u5F62\u6210\u3057\u3066\u304F\u308C\u307E\u3059\u3002"),xa=d(),q(Ge.$$.fragment),ja=d(),lt=o("p"),Vt=a("2\u91CD\u30C1\u30A7\u30C3\u30AF\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),va=d(),q(vs.$$.fragment),rt=d(),q(ks.$$.fragment),ka=d(),rs=o("p"),mn=a("\u30E9\u30D9\u30EB\u306F\u56DE\u7B54\u306E\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3068\u306A\u308A\u3001\u30E2\u30C7\u30EB\u306F\u5165\u529B\u306E\u30C8\u30FC\u30AF\u30F3\u3054\u3068\u306B1\u3064\u306E\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30ED\u30B8\u30C3\u30C8\u3092\u4E88\u6E2C\u3059\u308B\u3088\u3046\u8AB2\u3055\u308C\u3001\u7406\u8AD6\u4E0A\u306E\u30E9\u30D9\u30EB\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),qa=d(),Te=o("div"),qs=o("img"),Rt=d(),Es=o("img"),Qt=d(),se=o("p"),hn=a("\u3053\u306E\u5834\u5408\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306F\u305D\u308C\u307B\u3069\u9577\u304F\u3042\u308A\u307E\u305B\u3093\u304C\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u4E2D\u306B\u306F\u975E\u5E38\u306B\u9577\u3044\u6587\u8108\u3092\u6301\u3064\u4F8B\u3082\u3042\u308A\u3001\u8A2D\u5B9A\u3057\u305F\u6700\u5927\u9577\uFF08\u3053\u306E\u5834\u5408\u306F384\uFF09\u3092\u8D85\u3048\u3066\u3057\u307E\u3044\u307E\u3059\u3002"),os=o("a"),$n=a("\u7B2C6\u7AE0"),wn=a("\u3067 "),ys=o("code"),bn=a("\u8CEA\u554F\u5FDC\u7B54"),gn=a("\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306E\u5185\u90E8\u3092\u8ABF\u3079\u305F\u3068\u304D\u306B\u898B\u305F\u3088\u3046\u306B\u3001\u9577\u3044\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u5BFE\u3057\u3066\u306F\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E1\u3064\u306E\u30B5\u30F3\u30D7\u30EB\u304B\u3089\u8907\u6570\u306E\u5B66\u7FD2\u7279\u5FB4\u3092\u4F5C\u6210\u3057\u3001\u305D\u308C\u3089\u306E\u9593\u306B\u30B9\u30E9\u30A4\u30C7\u30A3\u30F3\u30B0\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u8A2D\u3051\u3066\u5BFE\u51E6\u3059\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002"),is=d(),ot=o("p"),xn=a("\u4ECA\u56DE\u306E\u4F8B\u3067\u306F\u3001\u9577\u3055\u3092100\u306B\u5236\u9650\u3057\u300150\u30C8\u30FC\u30AF\u30F3\u306E\u30B9\u30E9\u30A4\u30C7\u30A3\u30F3\u30B0\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u3067\u3001\u3069\u306E\u3088\u3046\u306B\u52D5\u4F5C\u3059\u308B\u304B\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002\u6CE8\u610F\u70B9\u3068\u3057\u3066\u3001\u4F7F\u7528\u3059\u308B\u306E\u306F"),Gt=d(),_=o("ul"),F=o("li"),Sl=a("\u6700\u5927\u9577\u3092\u8A2D\u5B9A\u3059\u308B "),ps=o("code"),Ol=a("max_length"),Ml=a(" (\u3053\u3053\u3067\u306F100)"),Bl=d(),be=o("li"),Ea=o("code"),Fl=a('truncation="only_second"'),Ll=a(" \u306F\u3001\u8CEA\u554F\u3068\u305D\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u9577\u3059\u304E\u308B\u5834\u5408\u306B\u3001(2\u756A\u76EE\u306E\u4F4D\u7F6E\u306B\u3042\u308B)\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u5207\u308A\u8A70\u3081\u308B"),Il=d(),Wt=o("li"),it=o("code"),zl=a("stride"),ve=a(" \u306F2\u3064\u306E\u9023\u7D9A\u3057\u305F\u65AD\u7247\u9593\u3067\u91CD\u8907\u3059\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u6570\u3092\u8A2D\u5B9A\u3057\u307E\u3059 (\u3053\u3053\u3067\u306F50)"),Nl=d(),Ut=o("li"),ya=o("code"),Hl=a("return_overflowing_tokens=True"),Vl=a(" \u3067\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u30AA\u30FC\u30D0\u30FC\u30D5\u30ED\u30FC\u7528\u30C8\u30FC\u30AF\u30F3\u304C\u5FC5\u8981\u306A\u3053\u3068\u3092\u77E5\u3089\u305B\u307E\u3059\u3002"),Ds=d(),q(pt.$$.fragment),jn=d(),q(ke.$$.fragment),vn=d(),We=o("p"),Rl=a("\u898B\u3066\u308F\u304B\u308B\u3088\u3046\u306B\u3001\u3053\u306E\u4F8B\u306F4\u3064\u306E\u5165\u529B\u306B\u5206\u5272\u3055\u308C\u3001\u305D\u308C\u305E\u308C\u304C\u8CEA\u554F\u3068\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u4E00\u90E8\u3092\u542B\u3093\u3067\u3044\u307E\u3059\u3002\u8CEA\u554F\u306B\u5BFE\u3059\u308B\u7B54\u3048\uFF08\u201CBernadette Soubirous\u201D\uFF09\u306F3\u756A\u76EE\u3068\u6700\u5F8C\u306E\u5165\u529B\u306B\u306E\u307F\u73FE\u308C\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u306E\u3088\u3046\u306B\u9577\u3044\u6587\u8108\u3092\u6271\u3046\u3053\u3068\u3067\u3001\u7B54\u3048\u304C\u6587\u8108\u306B\u542B\u307E\u308C\u306A\u3044\u5B66\u7FD2\u30B5\u30F3\u30D7\u30EB\u3092\u3044\u304F\u3064\u304B\u4F5C\u6210\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u3089\u306E\u4F8B\u3067\u306F\u3001\u30E9\u30D9\u30EB\u306F "),Da=o("code"),ct=a("start_position = end_position = 0"),Ql=a(" \u3068\u306A\u308A\u307E\u3059\uFF08\u3064\u307E\u308A\u3001"),Ca=o("code"),Gl=a("[CLS]"),Wl=a(" \u30C8\u30FC\u30AF\u30F3\u3092\u4E88\u6E2C\u3059\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\uFF09\u3002\u307E\u305F\u3001\u4E0D\u5E78\u306B\u3082\u7B54\u3048\u304C\u5207\u308A\u6368\u3066\u3089\u308C\u3001\u59CB\u307E\u308A\uFF08\u307E\u305F\u306F\u7D42\u308F\u308A\uFF09\u3057\u304B\u306A\u3044\u5834\u5408\u306B\u3082\u3001\u3053\u308C\u3089\u306E\u30E9\u30D9\u30EB\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\u7B54\u3048\u304C\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u5B8C\u5168\u306B\u542B\u307E\u308C\u3066\u3044\u308B\u4F8B\u3067\u306F\u3001\u30E9\u30D9\u30EB\u306F\u7B54\u3048\u304C\u59CB\u307E\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3068\u7B54\u3048\u304C\u7D42\u308F\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u306B\u306A\u308A\u307E\u3059\u3002"),Cs=d(),Ue=o("p"),Ta=a("\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304B\u3089\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u7B54\u3048\u306E\u958B\u59CB\u6587\u5B57\u304C\u5F97\u3089\u308C\u3001\u7B54\u3048\u306E\u9577\u3055\u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068\u3067\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u7D42\u4E86\u6587\u5B57\u304C\u898B\u3064\u304B\u308A\u307E\u3059\u3002\u3053\u308C\u3089\u3092\u30C8\u30FC\u30AF\u30F3 \u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u306B\u30DE\u30C3\u30D7\u3059\u308B\u306B\u306F\u3001"),Jt=o("a"),Ul=a("\u7B2C6\u7AE0"),cs=a(" \u3067\u5B66\u7FD2\u3057\u305F\u30AA\u30D5\u30BB\u30C3\u30C8 \u30DE\u30C3\u30D4\u30F3\u30B0\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Aa=o("code"),Jl=a("return_offsets_mapping=True"),Xl=a(" \u3092\u6E21\u3059\u3053\u3068\u3067\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u3053\u308C\u3089\u3092\u8FD4\u3055\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),kn=d(),q(Fe.$$.fragment),qn=d(),q(dt.$$.fragment),En=d(),Je=o("p"),ne=a("\u898B\u3066\u306E\u3068\u304A\u308A\u3001\u901A\u5E38\u306E\u5165\u529B ID\u3001\u30C8\u30FC\u30AF\u30F3\u30BF\u30A4\u30D7 ID\u3001\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u306B\u52A0\u3048\u3001\u5FC5\u8981\u306A\u30AA\u30D5\u30BB\u30C3\u30C8\u30DE\u30C3\u30D4\u30F3\u30B0\u3001\u3055\u3089\u306B "),Pa=o("code"),Kl=a("overflow_to_sample_mapping"),Yl=a(" \u3068\u3044\u3046\u30AD\u30FC\u304C\u8FD4\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u5024\u306F\u3001\u8907\u6570\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u540C\u6642\u306B\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u3068\u304D\u306B\u5F79\u306B\u7ACB\u3061\u307E\u3059 (\u3053\u306E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u304CRust\u306B\u652F\u3048\u3089\u308C\u3066\u3044\u308B\u3068\u3044\u3046\u4E8B\u5B9F\u3092\u5229\u7528\u3059\u308B\u305F\u3081\u306B\u3001\u305D\u3046\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059)\u30021 \u3064\u306E\u30B5\u30F3\u30D7\u30EB\u306F\u8907\u6570\u306E\u7279\u5FB4\u3092\u4E0E\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u306E\u3067\u3001\u5404\u7279\u5FB4\u3092\u305D\u306E\u5143\u3068\u306A\u308B\u30B5\u30F3\u30D7\u30EB\u306B\u30DE\u30C3\u30D7\u3057\u307E\u3059\u3002\u3053\u3053\u3067\u306F 1 \u3064\u306E\u4F8B\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3057\u305F\u3060\u3051\u306A\u306E\u3067\u3001"),Sa=o("code"),Zl=a("0"),er=a(" \u306E\u30EA\u30B9\u30C8\u304C\u5F97\u3089\u308C\u307E\u3059\u3002"),yn=d(),q(qe.$$.fragment),Dn=d(),q(ft.$$.fragment),Cn=d(),sr=o("p"),Ap=a("\u3057\u304B\u3057\u3001\u3082\u3063\u3068\u591A\u304F\u306E\u4F8B\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308C\u3070\u3001\u3053\u308C\u306F\u3082\u3063\u3068\u4FBF\u5229\u306B\u306A\u308A\u307E\u3059\u3002"),Bo=d(),q(Tn.$$.fragment),Fo=d(),q(An.$$.fragment),Lo=d(),tr=o("p"),Pp=a("\u898B\u3066\u306E\u901A\u308A\u3001\u6700\u521D\u306E3\u4F8B\uFF08\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B92\u30013\u30014\uFF09\u306F\u305D\u308C\u305E\u308C4\u3064\u306E\u7279\u5FB4\u3092\u4E0E\u3048\u3001\u6700\u5F8C\u306E\u4F8B\uFF08\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B95\uFF09\u306F7\u3064\u306E\u7279\u5FB4\u3092\u4E0E\u3048\u3066\u3044\u307E\u3059\u3002"),Io=d(),ar=o("p"),Sp=a("\u3053\u306E\u60C5\u5831\u306F\u3001\u5F97\u3089\u308C\u305F\u5404\u7279\u5FB4\u3092\u5BFE\u5FDC\u3059\u308B\u30E9\u30D9\u30EB\u306B\u5BFE\u5FDC\u4ED8\u3051\u308B\u305F\u3081\u306B\u6709\u7528\u3067\u3059\u3002\u524D\u8FF0\u3057\u305F\u3088\u3046\u306B\u3001\u305D\u308C\u3089\u306E\u30E9\u30D9\u30EB\u306F"),zo=d(),Oa=o("ul"),Pn=o("li"),Op=a("\u7B54\u3048\u304C\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u5BFE\u5FDC\u3059\u308B\u7BC4\u56F2\u5185\u306B\u306A\u3044\u5834\u5408\u3001 "),Kr=o("code"),Mp=a("(0, 0)"),Bp=a(" \u3068\u306A\u308A\u307E\u3059"),Fp=d(),_t=o("li"),Yr=o("code"),Lp=a("(start_position, end_position)"),Ip=a(" \u3082\u3057\u7B54\u3048\u304C\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5BFE\u5FDC\u3059\u308B\u7BC4\u56F2\u5185\u306B\u3042\u308C\u3070\u3001 "),Zr=o("code"),zp=a("start_position"),Np=a(" \u306F\u7B54\u3048\u306E\u59CB\u307E\u308A\u306E\u30C8\u30FC\u30AF\u30F3\uFF08\u5165\u529BID\u306E\u4E2D\uFF09\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3001 "),eo=o("code"),Hp=a("end_position"),Vp=a(" \u306F\u7B54\u3048\u306E\u7D42\u308F\u308A\u306E\u30C8\u30FC\u30AF\u30F3\uFF08\u5165\u529BID\u306E\u4E2D\uFF09\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3067\u3059"),No=d(),ut=o("p"),Rp=a("\u3053\u308C\u3089\u306E\u3069\u3061\u3089\u3067\u3042\u308B\u304B\u3001\u307E\u305F\u95A2\u9023\u3059\u308B\u5834\u5408\u306F\u30C8\u30FC\u30AF\u30F3\u306E\u4F4D\u7F6E\u3092\u6C7A\u5B9A\u3059\u308B\u305F\u3081\u306B\u3001\u307E\u305A\u5165\u529BID\u306E\u4E2D\u3067\u6587\u8108\u3092\u958B\u59CB\u3059\u308B\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3068\u7D42\u4E86\u3059\u308B\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3092\u898B\u3064\u3051\u307E\u3059\u3002\u3053\u308C\u3092\u884C\u3046\u306B\u306F\u30C8\u30FC\u30AF\u30F3\u30BF\u30A4\u30D7 ID \u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u304C\u3001\u305D\u308C\u306F\u3059\u3079\u3066\u306E\u30E2\u30C7\u30EB\u306B\u5B58\u5728\u3059\u308B\u3068\u306F\u9650\u3089\u306A\u3044\u306E\u3067 (\u4F8B\u3048\u3070 DistilBERT \u306F\u305D\u308C\u3092\u8981\u6C42\u3057\u307E\u305B\u3093)\u3001\u4EE3\u308F\u308A\u306B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u304C\u8FD4\u3059 "),so=o("code"),Qp=a("BatchEncoding"),Gp=a(" \u306E "),to=o("code"),Wp=a("sequence_ids()"),Up=a(" \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002"),Ho=d(),Ma=o("p"),Jp=a("\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u304C\u5F97\u3089\u308C\u305F\u3089\u3001\u5BFE\u5FDC\u3059\u308B\u30AA\u30D5\u30BB\u30C3\u30C8\u3092\u8ABF\u3079\u307E\u3059\u3002\u30AA\u30D5\u30BB\u30C3\u30C8\u3068\u306F\u3001\u5143\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u6587\u5B57\u306E\u7BC4\u56F2\u3092\u8868\u30592\u3064\u306E\u6574\u6570\u306E\u7D44\u306E\u3053\u3068\u3067\u3059\u3002\u3053\u306E\u3088\u3046\u306B\u3057\u3066\u3001\u3053\u306E\u7279\u5FB4\u306B\u304A\u3051\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u65AD\u7247\u304C\u3001\u7B54\u3048\u304C\u7D42\u308F\u3063\u305F\u5F8C\u306B\u59CB\u307E\u3063\u3066\u3044\u308B\u306E\u304B\u3001\u7B54\u3048\u304C\u59CB\u307E\u308B\u524D\u306B\u7D42\u308F\u3063\u3066\u3044\u308B\u306E\u304B\uFF08\u305D\u306E\u5834\u5408\u306E\u30E9\u30D9\u30EB\u306F "),ao=o("code"),Xp=a("(0, 0)"),Kp=a(" \uFF09 \u3092\u691C\u51FA\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u306E\u3067\u3059\u3002\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306F\u3001\u7B54\u3048\u306E\u6700\u521D\u3068\u6700\u5F8C\u306E\u30C8\u30FC\u30AF\u30F3\u3092\u898B\u3064\u3051\u308B\u305F\u3081\u306B\u30EB\u30FC\u30D7\u3057\u307E\u3059\u3002"),Vo=d(),q(Sn.$$.fragment),Ro=d(),q(On.$$.fragment),Qo=d(),Ba=o("p"),Yp=a("\u79C1\u9054\u306E\u30A2\u30D7\u30ED\u30FC\u30C1\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u7D50\u679C\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u6700\u521D\u306E\u7279\u5FB4\u91CF\u3067\u306F\u3001\u30E9\u30D9\u30EB\u3068\u3057\u3066 "),no=o("code"),Zp=a("(83, 85)"),ec=a(" \u304C\u898B\u3064\u304B\u3063\u305F\u306E\u3067\u3001\u7406\u8AD6\u7684\u306A\u7B54\u3048\u306883\u304B\u308985\uFF08\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u306B\u5BFE\u5FDC\u3059\u308B\u30C8\u30FC\u30AF\u30F3\u3082\u542B\u3080\uFF09\u307E\u3067\u306E\u30C8\u30FC\u30AF\u30F3\u306E\u30C7\u30B3\u30FC\u30C9\u3057\u305F\u7BC4\u56F2\u3092\u6BD4\u8F03\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Go=d(),q(Mn.$$.fragment),Wo=d(),q(Bn.$$.fragment),Uo=d(),Fa=o("p"),sc=a("\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4E00\u81F4\u3057\u307E\u3057\u305F \u3053\u3053\u3067\u3001\u30E9\u30D9\u30EB\u3092 "),lo=o("code"),tc=a("(0, 0)"),ac=a(" \u306B\u8A2D\u5B9A\u3057\u307E\u3057\u305F\u3002\u3064\u307E\u308A\u3001\u7B54\u3048\u306F\u305D\u306E\u7279\u5FB4\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u65AD\u7247\u306B\u306A\u3044\u3053\u3068\u3092\u610F\u5473\u3057\u307E\u3059\u3002"),Jo=d(),q(Fn.$$.fragment),Xo=d(),q(Ln.$$.fragment),Ko=d(),nr=o("p"),nc=a("\u78BA\u304B\u306B\u3001\u6587\u8108\u306E\u4E2D\u306B\u7B54\u3048\u304C\u51FA\u3066\u304D\u307E\u305B\u3093\u3002"),Yo=d(),q(La.$$.fragment),Zo=d(),lr=o("p"),lc=a("\u8A13\u7DF4\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u3092\u6BB5\u968E\u7684\u306B\u898B\u3066\u304D\u307E\u3057\u305F\u304C\u3001\u8A13\u7DF4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u5168\u4F53\u306B\u5BFE\u3057\u3066\u9069\u7528\u3059\u308B\u95A2\u6570\u306B\u307E\u3068\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307B\u3068\u3093\u3069\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306F\u9577\u3044\u306E\u3067\uFF08\u305D\u3057\u3066\u5BFE\u5FDC\u3059\u308B\u30B5\u30F3\u30D7\u30EB\u306F\u3044\u304F\u3064\u304B\u306E\u7279\u5FB4\u306B\u5206\u5272\u3055\u308C\u307E\u3059\uFF09\u3001\u3053\u3053\u3067\u52D5\u7684\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u9069\u7528\u3057\u3066\u3082\u3042\u307E\u308A\u610F\u5473\u304C\u306A\u3044\u306E\u3067\u3001\u3059\u3079\u3066\u306E\u7279\u5FB4\u3092\u8A2D\u5B9A\u3057\u305F\u6700\u5927\u9577\u306B\u306A\u308B\u3088\u3046\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u307E\u3059\u3002"),ei=d(),q(In.$$.fragment),si=d(),rr=o("p"),rc=a("\u30B9\u30E9\u30A4\u30C7\u30A3\u30F3\u30B0\u30A6\u30A3\u30F3\u30C9\u30A6\u306E\u9577\u3055\u3068\u6700\u5927\u9577\u3092\u6C7A\u5B9A\u3059\u308B\u305F\u3081\u306B2\u3064\u306E\u5B9A\u6570\u3092\u5B9A\u7FA9\u3057\u305F\u3053\u3068\u3068\u3001\u30C8\u30FC\u30AF\u30F3\u5316\u306E\u524D\u306B\u5C0F\u3055\u306A\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3092\u8FFD\u52A0\u3057\u305F\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002SQuAD\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u3044\u304F\u3064\u304B\u306E\u8CEA\u554F\u306B\u306F\u6700\u521D\u3068\u6700\u5F8C\u306B\u4F55\u3082\u8FFD\u52A0\u3057\u306A\u3044\u4F59\u8A08\u306A\u30B9\u30DA\u30FC\u30B9\uFF08RoBERTa\u306A\u3069\u306E\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3059\u308B\u3068\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u3068\u304D\u306B\u30B9\u30DA\u30FC\u30B9\u3092\u53D6\u3063\u3066\u3057\u307E\u3044\u307E\u3059\uFF09\u304C\u3042\u308B\u306E\u3067\u3001\u305D\u308C\u3089\u306E\u4F59\u8A08\u306A\u30B9\u30DA\u30FC\u30B9\u3092\u9664\u53BB\u3057\u3066\u3044\u307E\u3059\u3002"),ti=d(),mt=o("p"),oc=a("\u3053\u306E\u95A2\u6570\u3092\u8A13\u7DF4\u30BB\u30C3\u30C8\u5168\u4F53\u306B\u9069\u7528\u3059\u308B\u305F\u3081\u306B\u3001 "),ro=o("code"),ic=a("Dataset.map()"),pc=a(" \u30E1\u30BD\u30C3\u30C9\u306B "),oo=o("code"),cc=a("batched=True"),dc=a(" \u30D5\u30E9\u30B0\u3092\u4ED8\u3051\u3066\u4F7F\u3044\u307E\u3059\u3002\u3053\u308C\u306F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u9577\u3055\u3092\u5909\u66F4\u3059\u308B\u305F\u3081\u306B\u5FC5\u8981\u3067\u3059\uFF081\u3064\u306E\u4F8B\u3067\u8907\u6570\u306E\u5B66\u7FD2\u7279\u5FB4\u3092\u4E0E\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u305F\u3081\uFF09\u3002"),ai=d(),q(zn.$$.fragment),ni=d(),q(Nn.$$.fragment),li=d(),or=o("p"),fc=a("\u3053\u306E\u3088\u3046\u306B\u3001\u524D\u51E6\u7406\u306B\u3088\u3063\u3066\u7D041,000\u500B\u306E\u7279\u5FB4\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u3067\u8A13\u7DF4\u30BB\u30C3\u30C8\u306E\u6E96\u5099\u306F\u6574\u3044\u307E\u3057\u305F\u3002\u6B21\u306F\u691C\u8A3C\u30BB\u30C3\u30C8\u306E\u524D\u51E6\u7406\u3067\u3059\u3002"),ri=d(),Hn=o("h3"),_c=a("\u691C\u8A3C\u30BB\u30C3\u30C8\u306E\u51E6\u7406"),oi=d(),ir=o("p"),uc=a("\u691C\u8A3C\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u306F\u3001\u30E9\u30D9\u30EB\u3092\u751F\u6210\u3059\u308B\u5FC5\u8981\u304C\u306A\u3044\u305F\u3081\u3001\u82E5\u5E72\u7C21\u5358\u306B\u306A\u308A\u307E\u3059\u3002\uFF08\u691C\u8A3C\u640D\u5931\u3092\u8A08\u7B97\u3057\u305F\u3044\u5834\u5408\u306F\u5225\u3067\u3059\u304C\u3001\u3053\u306E\u6570\u5024\u306F\u30E2\u30C7\u30EB\u304C\u3069\u308C\u3060\u3051\u512A\u308C\u3066\u3044\u308B\u304B\u3092\u7406\u89E3\u3059\u308B\u306E\u306B\u3042\u307E\u308A\u5F79\u7ACB\u3061\u307E\u305B\u3093\uFF09\u3002\u672C\u5F53\u306E\u559C\u3073\u306F\u3001\u30E2\u30C7\u30EB\u306E\u4E88\u6E2C\u3092\u5143\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u7BC4\u56F2\u3068\u3057\u3066\u89E3\u91C8\u3059\u308B\u4E8B\u306B\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u305F\u3081\u306B\u306F\u3001\u30AA\u30D5\u30BB\u30C3\u30C8\u30DE\u30C3\u30D4\u30F3\u30B0\u3068\u3001\u4F5C\u6210\u3055\u308C\u305F\u5404\u7279\u5FB4\u3092\u5143\u306E\u4F8B\u6587\u3068\u30DE\u30C3\u30C1\u30F3\u30B0\u3055\u305B\u308B\u65B9\u6CD5\u306E\u4E21\u65B9\u3092\u4FDD\u5B58\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3060\u3051\u3067\u3059\u3002\u5143\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306BID\u30AB\u30E9\u30E0\u304C\u3042\u308B\u306E\u3067\u3001\u305D\u306EID\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),ii=d(),ht=o("p"),mc=a("\u3053\u3053\u3067\u8FFD\u52A0\u3059\u308B\u306E\u306F\u3001\u30AA\u30D5\u30BB\u30C3\u30C8\u30DE\u30C3\u30D4\u30F3\u30B0\u306E\u307B\u3093\u306E\u5C11\u3057\u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3060\u3051\u3067\u3059\u3002\u8CEA\u554F\u3068\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u30AA\u30D5\u30BB\u30C3\u30C8\u304C\u542B\u307E\u308C\u307E\u3059\u304C\u3001\u5F8C\u51E6\u7406\u306E\u6BB5\u968E\u3067\u306F\u3001\u5165\u529BID\u306E\u3069\u306E\u90E8\u5206\u304C\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u5BFE\u5FDC\u3057\u3001\u3069\u306E\u90E8\u5206\u304C\u8CEA\u554F\u3067\u3042\u308B\u304B\u3092\u77E5\u308B\u65B9\u6CD5\u304C\u3042\u308A\u307E\u305B\u3093\uFF08\u79C1\u305F\u3061\u304C\u4F7F\u3063\u305F "),io=o("code"),hc=a("sequence_ids()"),$c=a(" \u30E1\u30BD\u30C3\u30C9\u306F\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u306E\u51FA\u529B\u306B\u306E\u307F\u5229\u7528\u53EF\u80FD\u3067\u3059\uFF09\u3002\u305D\u3053\u3067\u3001\u8CEA\u554F\u306B\u5BFE\u5FDC\u3059\u308B\u30AA\u30D5\u30BB\u30C3\u30C8\u3092 "),po=o("code"),wc=a("None"),bc=a(" \u306B\u8A2D\u5B9A\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002"),pi=d(),q(Vn.$$.fragment),ci=d(),pr=o("p"),gc=a("\u3053\u306E\u95A2\u6570\u306F\u3001\u5148\u307B\u3069\u306E\u3088\u3046\u306B\u691C\u8A3C\u7528\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u5168\u4F53\u306B\u9069\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),di=d(),q(Rn.$$.fragment),fi=d(),q(Qn.$$.fragment),_i=d(),cr=o("p"),xc=a(`\u3053\u306E\u5834\u5408\u3001\u6570\u767E\u30B5\u30F3\u30D7\u30EB\u3057\u304B\u8FFD\u52A0\u3057\u3066\u3044\u306A\u3044\u306E\u3067\u3001\u691C\u8A3C\u7528\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306F\u5C11\u3057\u77ED\u3044\u3088\u3046\u3067\u3059\u3002
\u3055\u3066\u3001\u5168\u3066\u306E\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u304C\u7D42\u308F\u3063\u305F\u306E\u3067\u3001\u3044\u3088\u3044\u3088\u5B66\u7FD2\u306B\u5165\u308A\u307E\u3059\u3002`),ui=d(),As.c(),dr=d(),Gn=o("h3"),jc=a("\u5F8C\u51E6\u7406"),mi=d(),Ss.c(),fr=d(),Ia=o("p"),vc=a("\u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001"),Wn=o("a"),co=o("code"),kc=a("question-answering"),qc=a(" pipeline"),Ec=a(" \u306E\u63A2\u7D22\u3067\u898B\u305F\u3088\u3046\u306B\u3001\u5165\u529BID\u306B\u304A\u3051\u308B\u7B54\u3048\u306E\u958B\u59CB\u4F4D\u7F6E\u3068\u7D42\u4E86\u4F4D\u7F6E\u306E\u30ED\u30B8\u30C3\u30C8\u3092\u51FA\u529B\u3059\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002\u5F8C\u51E6\u7406\u306E\u30B9\u30C6\u30C3\u30D7\u306F\u3001\u305D\u306E\u969B\u306B\u884C\u3063\u305F\u3053\u3068\u3068\u540C\u3058\u3088\u3046\u306A\u3082\u306E\u306B\u306A\u308A\u307E\u3059\u306E\u3067\u3001\u4EE5\u4E0B\u3067\u3084\u3063\u305F\u4E8B\u3092\u601D\u3044\u51FA\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),hi=d(),ds=o("ul"),fo=o("li"),yc=a("\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5916\u306E\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u5FDC\u3059\u308B\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30ED\u30B8\u30C3\u30C8\u3092\u30DE\u30B9\u30AF\u3057\u307E\u3057\u305F\u3002"),Dc=d(),_o=o("li"),Cc=a("\u6B21\u306B\u3001\u30BD\u30D5\u30C8\u30DE\u30C3\u30AF\u30B9\u3092\u4F7F\u7528\u3057\u3066\u958B\u59CB\u30ED\u30B8\u30C3\u30C8\u3068\u7D42\u4E86\u30ED\u30B8\u30C3\u30C8\u3092\u78BA\u7387\u306B\u5909\u63DB\u3057\u307E\u3057\u305F\u3002"),Tc=d(),Un=o("li"),Ac=a("\u5404\u30DA\u30A2 "),uo=o("code"),Pc=a("(start_token, end_token)"),Sc=a(" \u306B\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u4E8C\u3064\u306E\u78BA\u7387\u306E\u7A4D\u3092\u53D6\u308B\u3053\u3068\u3067\u30B9\u30B3\u30A2\u3092\u4ED8\u4E0E\u3057\u307E\u3057\u305F\u3002"),Oc=d(),Xt=o("li"),Mc=a("\u79C1\u9054\u306F\u6709\u52B9\u306A\u7B54\u3048\uFF08\u4F8B\u3048\u3070\u3001"),mo=o("code"),Bc=a("start_token"),Fc=a("\u304C"),ho=o("code"),Lc=a("end_token"),Ic=a("\u3088\u308A\u524D\u306B\u3042\u308B\uFF09\u3092\u3082\u305F\u3089\u3059\u6700\u5927\u306E\u30B9\u30B3\u30A2\u3092\u6301\u3064\u30DA\u30A2\u3092\u63A2\u3057\u307E\u3057\u305F\u3002"),$i=d(),Le=o("p"),zc=a("\u3053\u3053\u3067\u306F\u3001\u5B9F\u969B\u306E\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u5FC5\u8981\u304C\u306A\u3044\u305F\u3081\u3001\u3053\u306E\u30D7\u30ED\u30BB\u30B9\u3092\u5C11\u3057\u5909\u66F4\u3057\u307E\u3059\uFF08\u4E88\u6E2C\u3055\u308C\u305F\u7B54\u3048\u3060\u3051\u304C\u6B32\u3057\u3044\u306E\u3067\u3059\uFF09\u3002\u3064\u307E\u308A\u3001\u30BD\u30D5\u30C8\u30DE\u30C3\u30AF\u30B9\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u30B9\u30AD\u30C3\u30D7\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307E\u305F\u3001\u3088\u308A\u9AD8\u901F\u306B\u51E6\u7406\u3059\u308B\u305F\u3081\u306B\u3001\u53EF\u80FD\u6027\u306E\u3042\u308B\u5168\u3066\u306E "),$o=o("code"),Nc=a("(start_token, end_token)"),Hc=a(" \u30DA\u30A2\u3092\u30B9\u30B3\u30A2\u30EA\u30F3\u30B0\u305B\u305A\u3001\u6700\u3082\u9AD8\u3044 "),wo=o("code"),Vc=a("n_best"),Rc=a(" \u30ED\u30B8\u30C3\u30C8\u306B\u5BFE\u5FDC\u3059\u308B\u3082\u306E\u3060\u3051\u3092\u30B9\u30B3\u30A2\u30EA\u30F3\u30B0\u3057\u307E\u3059\uFF08"),bo=o("code"),Qc=a("n_best=20"),Gc=a(" \u3068\u3057\u307E\u3059\uFF09\u3002\u30BD\u30D5\u30C8\u30DE\u30C3\u30AF\u30B9\u3092\u30B9\u30AD\u30C3\u30D7\u3059\u308B\u306E\u3067\u3001\u3053\u308C\u3089\u306E\u30B9\u30B3\u30A2\u306Flogit\u30B9\u30B3\u30A2\u3068\u306A\u308A\u3001\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30ED\u30B8\u30C3\u30C8\u306E\u548C\u3092\u53D6\u308B\u3053\u3068\u3067\u5F97\u3089\u308C\u307E\u3059\u3002"),wi=new vu,bi=a(")\u306E\u516C\u5F0F\u304C\u3042\u308B\u306E\u3067\u7A4D\u306E\u4EE3\u308F\u308A\u306B\u548C\u3068\u306A\u308A\u307E\u3059)\u3002"),gi=d(),za=o("p"),Wc=a("\u3053\u308C\u3089\u306E\u3053\u3068\u3092\u5B9F\u8A3C\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u4F55\u3089\u304B\u306E\u4E88\u6E2C\u304C\u5FC5\u8981\u3067\u3059\u3002\u307E\u3060\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3057\u3066\u3044\u306A\u3044\u306E\u3067\u3001QA\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3057\u3066\u3001\u691C\u8A3C\u30BB\u30C3\u30C8\u306E\u4E00\u90E8\u3067\u4E88\u6E2C\u3092\u751F\u6210\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002\u3053\u306E\u51E6\u7406\u95A2\u6570\u306F\u30B0\u30ED\u30FC\u30D0\u30EB\u5B9A\u6570 "),go=o("code"),Uc=a("tokenizer"),Jc=a(" \u306B\u4F9D\u5B58\u3057\u3066\u3044\u308B\u306E\u3067\u3001\u3053\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4E00\u6642\u7684\u306B\u4F7F\u7528\u3057\u305F\u3044\u30E2\u30C7\u30EB\u306E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u5909\u66F4\u3059\u308B\u3060\u3051\u3067\u3088\u3044\u306E\u3067\u3059\u3002"),xi=d(),q(Jn.$$.fragment),ji=d(),_r=o("p"),Xc=a("\u524D\u51E6\u7406\u304C\u7D42\u308F\u3063\u305F\u306E\u3067\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u5143\u3005\u9078\u3093\u3067\u3044\u305F\u3082\u306E\u306B\u623B\u3057\u307E\u3059\u3002"),vi=d(),q(Xn.$$.fragment),ki=d(),Na=o("p"),Kc=a("\u6B21\u306B\u3001"),xo=o("code"),Yc=a("eval_set"),Zc=a("\u304B\u3089\u30E2\u30C7\u30EB\u304C\u671F\u5F85\u3057\u306A\u3044\u5217\u3092\u53D6\u308A\u9664\u304D\u3001\u305D\u306E\u5C0F\u3055\u306A\u691C\u8A3C\u30BB\u30C3\u30C8\u3092\u3059\u3079\u3066\u542B\u3080\u30D0\u30C3\u30C1\u3092\u69CB\u7BC9\u3057\u3001\u305D\u308C\u3092\u30E2\u30C7\u30EB\u306B\u6E21\u3057\u307E\u3059\u3002GPU\u304C\u5229\u7528\u53EF\u80FD\u3067\u3042\u308C\u3070\u3001\u3088\u308A\u9AD8\u901F\u306B\u51E6\u7406\u3059\u308B\u305F\u3081\u306B\u305D\u308C\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),qi=d(),Ms.c(),ur=d(),Ie=o("p"),ed=a("\u3055\u3066\u3001"),jo=o("code"),sd=a("small_eval_set"),td=a(" \u306B\u542B\u307E\u308C\u308B\u5404\u4F8B\u306B\u5BFE\u3057\u3066\u3001\u4E88\u6E2C\u3055\u308C\u308B\u7B54\u3048\u3092\u898B\u3064\u3051\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u4E00\u3064\u306E\u4F8B\u306F\u3001"),vo=o("code"),ad=a("eval_set"),nd=a("\u306E\u4E2D\u3067\u3044\u304F\u3064\u304B\u306E\u7279\u5FB4\u306B\u5206\u5272\u3055\u308C\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B\u306E\u3067\u3001\u6700\u521D\u306E\u30B9\u30C6\u30C3\u30D7\u306F "),ko=o("code"),ld=a("small_eval_set"),rd=a(" \u306E\u4E2D\u306E\u5404\u4F8B\u3092 "),qo=o("code"),od=a("eval_set"),id=a(" \u306E\u4E2D\u306E\u5BFE\u5FDC\u3059\u308B\u7279\u5FB4\u306B\u30DE\u30C3\u30D4\u30F3\u30B0\u3059\u308B\u3053\u3068\u3067\u3059\u3002"),Ei=d(),q(Kn.$$.fragment),yi=d(),mr=o("p"),pd=a("\u3053\u308C\u304C\u3042\u308C\u3070\u3001\u3059\u3079\u3066\u306E\u4F8B\u3068\u3001\u305D\u308C\u305E\u308C\u306E\u4F8B\u306B\u3064\u3044\u3066\u3001\u95A2\u9023\u3059\u308B\u3059\u3079\u3066\u306E\u7279\u5FB4\u3092\u30EB\u30FC\u30D7\u3059\u308B\u3053\u3068\u3067\u3001\u5B9F\u969B\u306B\u4ED5\u4E8B\u306B\u53D6\u308A\u639B\u304B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u524D\u306B\u8FF0\u3079\u305F\u3088\u3046\u306B\u3001\u300Cn_best\u300D\u306A\u958B\u59CB\u30ED\u30B8\u30C3\u30C8\u3068\u7D42\u4E86\u30ED\u30B8\u30C3\u30C8\u306E\u30ED\u30B8\u30C3\u30C8\u30B9\u30B3\u30A2\u3092\u898B\u307E\u3059\u304C\u3001\u4EE5\u4E0B\u3092\u9664\u304D\u307E\u3059\u3002"),Di=d(),$t=o("ul"),Eo=o("li"),cd=a("\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u4E2D\u306B\u306A\u3044\u7B54\u3048"),dd=d(),yo=o("li"),fd=a("\u8CA0\u306E\u9577\u3055\u3092\u6301\u3064\u7B54\u3048"),_d=d(),Yn=o("li"),ud=a("\u9577\u3059\u304E\u308B\u7B54\u3048 (\u79C1\u9054\u306F "),Do=o("code"),md=a("max_answer_length=30"),hd=a(" \u3067\u53EF\u80FD\u6027\u3092\u5236\u9650\u3057\u3066\u3044\u307E\u3059)"),Ci=d(),hr=o("p"),$d=a("1\u3064\u306E\u4F8B\u306B\u5BFE\u3057\u3066\u63A1\u70B9\u3055\u308C\u305F\u3059\u3079\u3066\u306E\u53EF\u80FD\u306A\u7B54\u3048\u304C\u3042\u3063\u305F\u3089\u3001\u6700\u9AD8\u306E\u30ED\u30B8\u30C3\u30C8\u30B9\u30B3\u30A2\u304B\u30891\u3064\u3092\u9078\u3073\u307E\u3059\u3002"),Ti=d(),q(Zn.$$.fragment),Ai=d(),$r=o("p"),wd=a("\u4E88\u6E2C\u3055\u308C\u305F\u7B54\u3048\u306E\u6700\u7D42\u7684\u306A\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306F\u3001\u79C1\u305F\u3061\u304C\u4F7F\u7528\u3059\u308B\u6307\u6A19\u306B\u3088\u3063\u3066\u671F\u5F85\u3055\u308C\u308B\u3082\u306E\u3067\u3059\u3002\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001\u{1F917} Evaluate\u30E9\u30A4\u30D6\u30E9\u30EA\u306E\u52A9\u3051\u3092\u501F\u308A\u3066\u8AAD\u307F\u8FBC\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Pi=d(),q(el.$$.fragment),Si=d(),wr=o("p"),bd=a("\u3053\u306E\u6307\u6A19\u306F\u3001\u4E0A\u3067\u898B\u305F\u5F62\u5F0F\u306E\u4E88\u6E2C\u3055\u308C\u305F\u7B54\u3048\uFF08\u30B5\u30F3\u30D7\u30EB\u306EID\u3068\u4E88\u6E2C\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u306E1\u3064\u306E\u30AD\u30FC\u3092\u6301\u3064\u8F9E\u66F8\u306E\u30EA\u30B9\u30C8\uFF09\u3068\u3001\u4E0B\u306E\u5F62\u5F0F\u306E\u7406\u8AD6\u7684\u306A\u7B54\u3048\uFF08\u30B5\u30F3\u30D7\u30EB\u306EID\u3068\u53EF\u80FD\u306A\u7B54\u3048\u306E1\u3064\u306E\u30AD\u30FC\u3092\u6301\u3064\u8F9E\u66F8\u306E\u30EA\u30B9\u30C8\uFF09\u3092\u671F\u5F85\u3059\u308B\u3082\u306E\u3067\u3059\u3002"),Oi=d(),q(sl.$$.fragment),Mi=d(),br=o("p"),gd=a("\u3053\u3053\u3067\u3001\u4E21\u65B9\u306E\u30EA\u30B9\u30C8\u306E\u6700\u521D\u306E\u8981\u7D20\u3092\u898B\u3066\u3001\u8CE2\u660E\u306A\u7D50\u679C\u304C\u5F97\u3089\u308C\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Bi=d(),q(tl.$$.fragment),Fi=d(),q(al.$$.fragment),Li=d(),gr=o("p"),xd=a("\u60AA\u304F\u306A\u3044\u3067\u3059\u306D\uFF01\u3067\u306F\u3001\u3053\u306E\u6307\u6A19\u304C\u793A\u3059\u30B9\u30B3\u30A2\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Ii=d(),q(nl.$$.fragment),zi=d(),q(ll.$$.fragment),Ni=d(),rl=o("p"),ol=o("a"),jd=a("\u3053\u306E\u8AD6\u6587"),vd=a("\u306B\u3088\u308B\u3068\u3001SQuAD\u3067\u5FAE\u8ABF\u6574\u3057\u305FDistilBERT\u306F\u3001\u5168\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306779.1\u70B9\u306886.9\u70B9\u3092\u7372\u5F97\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u8003\u3048\u308B\u3068\u3001\u3053\u308C\u306F\u3080\u3057\u308D\u826F\u3044\u3053\u3068\u3060\u3068\u8A00\u3048\u307E\u3059\u3002"),Hi=d(),Kt.c(),xr=d(),q(il.$$.fragment),Vi=d(),jr=o("p"),kd=a("\u79C1\u9054\u306E\u4E88\u6E2C\u3092\u4F7F\u3063\u3066\u52D5\u4F5C\u78BA\u8A8D\u304C\u3067\u304D\u307E\u3059\u3002"),Ri=d(),q(pl.$$.fragment),Qi=d(),q(cl.$$.fragment),Gi=d(),vr=o("p"),qd=a("\u3044\u3044\u611F\u3058\u3067\u3059\uFF01\u3067\u306F\u3001\u3053\u308C\u3092\u4F7F\u3063\u3066\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Wi=d(),dl=o("h3"),Ed=a("\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574"),Ui=d(),Fs.c(),kr=d(),qr=o("p"),yd=a("\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u91CD\u307F\u304C\u4F7F\u308F\u308C\u3066\u3044\u306A\u3044\uFF08\u4E8B\u524D\u5B66\u7FD2\u6642\u306E\u30D8\u30C3\u30C9\u306E\u3082\u306E\uFF09\u3001\u4ED6\u306E\u3044\u304F\u3064\u304B\u306E\u91CD\u307F\u304C\u30E9\u30F3\u30C0\u30E0\u306B\u521D\u671F\u5316\u3055\u308C\u3066\u3044\u308B\uFF08\u8CEA\u554F\u5FDC\u7B54\u7528\u30D8\u30C3\u30C9\u306E\u3082\u306E\uFF09\u3068\u3044\u3046\u8B66\u544A\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u3082\u3046\u6163\u308C\u305F\u3068\u601D\u3044\u307E\u3059\u304C\u3001\u3053\u308C\u306F\u3053\u306E\u30E2\u30C7\u30EB\u304C\u307E\u3060\u4F7F\u3048\u308B\u72B6\u614B\u3067\u306F\u306A\u304F\u3001\u5FAE\u8ABF\u6574\u304C\u5FC5\u8981\u3067\u3042\u308B\u3053\u3068\u3092\u610F\u5473\u3057\u307E\u3059\u3002"),Ji=d(),Er=o("p"),Dd=a("\u3053\u306E\u30E2\u30C7\u30EB\u3092Hub\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u305F\u3081\u306B\u306F\u3001Hugging Face\u306B\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3082\u3057\u3053\u306E\u30B3\u30FC\u30C9\u3092notebook\u3067\u5B9F\u884C\u3057\u3066\u3044\u308B\u306A\u3089\u3001\u6B21\u306E\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u95A2\u6570\u3067\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Xi=d(),q(fl.$$.fragment),Ki=d(),yr=o("p"),Cd=a("\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067\u4F5C\u696D\u3057\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u3001\u30BF\u30FC\u30DF\u30CA\u30EB\u3067\u6B21\u306E\u884C\u3092\u5165\u529B\u3059\u308B\u3060\u3051\u3067\u3059\u3002"),Yi=d(),q(_l.$$.fragment),Zi=d(),Is.c(),Dr=d(),Ha=o("p"),Td=a(`\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u4F7F\u7528\u3055\u308C\u308B\u30EA\u30DD\u30B8\u30C8\u30EA\u306F\u3042\u306A\u305F\u306E\u540D\u524D\u7A7A\u9593\u306B\u3042\u308A\u3001\u8A2D\u5B9A\u3057\u305F\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u540D\u524D\u306B\u306A\u308A\u307E\u3059\u3002
\u3053\u306E\u4F8B\u3067\u306F\u3001 `),Co=o("code"),Ad=a('"sgugger/bert-finetuned-squad"'),Pd=a(" \u306B\u306A\u308A\u307E\u3059\u3002"),ep=d(),zs=o("p"),To=o("code"),Sd=a("hub_model_id"),Od=a(" \u3092\u6E21\u3059\u3053\u3068\u3067\u3001\u3053\u308C\u3092\u4E0A\u66F8\u304D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u4F8B\u3048\u3070\u3001\u30E2\u30C7\u30EB\u3092 "),Ao=o("code"),Md=a("huggingface_course"),Bd=a(" \u3068\u3044\u3046\u7D44\u7E54\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u306B\u306F\u3001 "),Po=o("code"),Fd=a('hub_model_id="huggingface_course/bert-finetuned-squad"'),Ld=a("(\u3053\u306E\u7AE0\u306E\u59CB\u3081\u3067\u30EA\u30F3\u30AF\u3057\u305F\u30E2\u30C7\u30EB\u3067\u3059) \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),sp=d(),Hs.c(),Cr=d(),Tr=o("p"),Id=a("\u5B66\u7FD2\u304C\u884C\u308F\u308C\u3066\u3044\u308B\u9593\u3001\u30E2\u30C7\u30EB\u304C\u4FDD\u5B58\u3055\u308C\u308B\u305F\u3073\u306B\uFF08\u3053\u3053\u3067\u306F\u30A8\u30DD\u30C3\u30AF\u3054\u3068\u306B\uFF09\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3055\u308C\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u3046\u3059\u308B\u3053\u3068\u3067\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u5225\u306E\u30DE\u30B7\u30F3\u3067\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3092\u518D\u958B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u5168\u4F53\u306B\u306F\u3057\u3070\u3089\u304F\u6642\u9593\u304C\u304B\u304B\u308B\u306E\u3067\uFF08Titan RTX\u30671\u6642\u9593\u5F37\uFF09\u3001\u305D\u306E\u9593\u30B3\u30FC\u30D2\u30FC\u3092\u98F2\u3093\u3060\u308A\u3001\u30B3\u30FC\u30B9\u306E\u96E3\u3057\u3044\u90E8\u5206\u3092\u8AAD\u307F\u76F4\u3057\u305F\u308A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307E\u305F\u3001\u6700\u521D\u306E\u30A8\u30DD\u30C3\u30AF\u304C\u7D42\u4E86\u3059\u308B\u3068\u3059\u3050\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u91CD\u307F\u304C\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3055\u308C\u3001\u305D\u306E\u30DA\u30FC\u30B8\u3067\u3042\u306A\u305F\u306E\u30E2\u30C7\u30EB\u3067\u904A\u3073\u59CB\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3053\u3068\u306B\u7559\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),tp=d(),Rs.c(),Ar=d(),q(ul.$$.fragment),ap=d(),Pr=o("p"),zd=a(`\u7D20\u6674\u3089\u3057\u3044\uFF01
\u6BD4\u8F03\u3068\u3057\u3066\u3001\u3053\u306E\u30E2\u30C7\u30EB\u306EBERT\u306E\u8A18\u4E8B\u3067\u5831\u544A\u3055\u308C\u3066\u3044\u308B\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u306E\u30B9\u30B3\u30A2\u306F80.8\u306888.5\u306A\u306E\u3067\u3001\u3061\u3087\u3046\u3069\u3042\u308B\u3079\u304D\u3068\u3053\u308D\u306B\u3044\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002`),np=d(),pe&&pe.c(),Sr=d(),Or=o("p"),Nd=a("\u3053\u306E\u6BB5\u968E\u3067\u3001\u30E2\u30C7\u30EB\u30CF\u30D6\u4E0A\u306E\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u4F7F\u3063\u3066\u30E2\u30C7\u30EB\u3092\u30C6\u30B9\u30C8\u3057\u3001\u53CB\u4EBA\u3001\u5BB6\u65CF\u3001\u304A\u6C17\u306B\u5165\u308A\u306E\u30DA\u30C3\u30C8\u3068\u5171\u6709\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3042\u306A\u305F\u306F\u3001\u8CEA\u554F\u5FDC\u7B54\u30BF\u30B9\u30AF\u3067\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u306B\u6210\u529F\u3057\u307E\u3057\u305F\u3002\u304A\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01"),lp=d(),q(Va.$$.fragment),rp=d(),ce&&ce.c(),Mr=d(),ml=o("h2"),Hd=a("\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3059\u308B"),op=d(),Ra=o("p"),Vd=a("\u30E2\u30C7\u30EB\u30CF\u30D6\u3067\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3067\u4F7F\u7528\u3059\u308B\u65B9\u6CD5\u306F\u65E2\u306B\u7D39\u4ECB\u3057\u307E\u3057\u305F\u3002"),So=o("code"),Rd=a("pipeline"),Qd=a("\u3067\u5229\u7528\u3059\u308B\u5834\u5408\u306F\u3001\u30E2\u30C7\u30EB\u8B58\u5225\u5B50\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002"),ip=d(),q(hl.$$.fragment),pp=d(),q($l.$$.fragment),cp=d(),Br=o("p"),Gd=a("\u7D20\u6674\u3089\u3057\u3044\u3067\u3059\uFF01 \u79C1\u305F\u3061\u306E\u30E2\u30C7\u30EB\u306F\u3001\u3053\u306E\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u3082\u306E\u3068\u540C\u3058\u3088\u3046\u306B\u52D5\u4F5C\u3057\u3066\u3044\u307E\u3059\uFF01"),this.h()},l(e){const r=ku('[data-svelte="svelte-1phssyn"]',document.head);c=i(r,"META",{name:!0,content:!0}),r.forEach(s),$=f(e),E(u.$$.fragment,e),h=f(e),P=i(e,"H1",{id:!0});var Oo=p(P);x=n(Oo,"\u8CEA\u554F\u5FDC\u7B54"),Oo.forEach(s),j=f(e),m.l(e),k=f(e),v=i(e,"P",{});var Qa=p(v);C=n(Qa,"\u8CEA\u554F\u5FDC\u7B54\u306B\u3064\u3044\u3066\u8003\u3048\u308B\u6642\u304C\u6765\u307E\u3057\u305F\u3002\u3053\u306E\u30BF\u30B9\u30AF\u306B\u306F\u591A\u304F\u306E\u7A2E\u985E\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u53D6\u308A\u4E0A\u3052\u308B\u306E\u306F\u300C "),M=i(Qa,"EM",{});var Mo=p(M);H=n(Mo,"\u62BD\u51FA\u7684"),Mo.forEach(s),A=n(Qa," \u306A\u8CEA\u554F\u5FDC\u7B54\u300D\u3067\u3059\u3002\u3053\u308C\u306F\u3001\u7279\u5B9A\u306E\u6587\u66F8\u306B\u3064\u3044\u3066\u306E\u8CEA\u554F\u3092\u6295\u3052\u304B\u3051\u3001\u6587\u66F8\u5185\u306E\u7B54\u3048\u306E\u66F8\u304B\u308C\u3066\u3044\u308B\u7BC4\u56F2\u3092\u7279\u5B9A\u3059\u308B\u3053\u3068\u3092\u542B\u307F\u307E\u3059\u3002"),Qa.forEach(s),T=f(e),E(Q.$$.fragment,e),R=f(e),z=i(e,"P",{});var El=p(z);B=n(El,"\u79C1\u9054\u306F\u3001Wikipedia\u306E\u8A18\u4E8B\u306B\u5BFE\u3057\u3066\u30AF\u30E9\u30A6\u30C9\u30EF\u30FC\u30AB\u30FC\u306B\u3088\u3063\u3066\u4F5C\u6210\u3055\u308C\u305F\u8CEA\u554F\u304B\u3089\u306A\u308B"),L=i(El,"A",{href:!0,rel:!0});var Fr=p(L);G=n(Fr,"SQuAD\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),Fr.forEach(s),Z=n(El,"\u306EBERT\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3059\u308B\u4E88\u5B9A\u3067\u3059\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306A\u4E88\u6E2C\u3092\u5B9F\u884C\u3067\u304D\u308B\u30E2\u30C7\u30EB\u304C\u3067\u304D\u308B\u3067\u3057\u3087\u3046\u3002"),El.forEach(s),W=f(e),O=i(e,"IFRAME",{src:!0,frameborder:!0,height:!0,title:!0,class:!0,allow:!0,sandbox:!0}),p(O).forEach(s),te=f(e),Y=i(e,"P",{});var Ga=p(Y);le=n(Ga,`\u3053\u308C\u306F\u5B9F\u969B\u306B\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u793A\u3057\u305F\u30B3\u30FC\u30C9\u3092\u4F7F\u3063\u3066\u5B66\u7FD2\u3057\u3001\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u305F\u30E2\u30C7\u30EB\u3092\u7D39\u4ECB\u3057\u3066\u3044\u308B\u3082\u306E\u3067\u3059\u3002
\u8CB4\u65B9\u306F`),ee=i(Ga,"A",{href:!0,rel:!0});var Lr=p(ee);Ae=n(Lr,"\u3053\u3053"),Lr.forEach(s),Xe=n(Ga,"\u3067\u30E2\u30C7\u30EB\u3092\u898B\u3064\u3051\u3066\u3001\u4E88\u6E2C\u3092\u518D\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Ga.forEach(s),de=f(e),E(ae.$$.fragment,e),Ee=f(e),fe=i(e,"H2",{id:!0});var Ir=p(fe);fs=n(Ir,"\u30C7\u30FC\u30BF\u306E\u6E96\u5099"),Ir.forEach(s),Pe=f(e),N=i(e,"P",{});var wt=p(N);U=n(wt,"\u62BD\u51FA\u7684\u8CEA\u554F\u5FDC\u7B54\u306E\u5B66\u8853\u7684\u306A\u30D9\u30F3\u30C1\u30DE\u30FC\u30AF\u3068\u3057\u3066\u6700\u3082\u5229\u7528\u3055\u308C\u3066\u3044\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C "),re=i(wt,"A",{href:!0,rel:!0});var zr=p(re);Gs=n(zr,"SQuAD"),zr.forEach(s),Ke=n(wt," \u3067\u3059\u306E\u3067\u3001\u3053\u3053\u3067\u3082\u3053\u308C\u3092\u5229\u7528\u3057\u307E\u3059\u3002\u307E\u305F\u3001\u3088\u308A\u96E3\u3057\u3044"),Se=i(wt,"A",{href:!0,rel:!0});var Nr=p(Se);Ye=n(Nr,"SQuAD v2"),Nr.forEach(s),_s=n(wt,"\u30D9\u30F3\u30C1\u30DE\u30FC\u30AF\u3082\u3042\u308A\u3001\u3053\u308C\u306F\u7B54\u3048\u306E\u306A\u3044\u8CEA\u554F\u3092\u542B\u3093\u3067\u3044\u307E\u3059\u3002\u3042\u306A\u305F\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C\u6587\u8108\u306E\u5217\u3001\u8CEA\u554F\u306E\u5217\u3001\u7B54\u3048\u306E\u5217\u3092\u542B\u3093\u3067\u3044\u308B\u9650\u308A\u3001\u4EE5\u4E0B\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u9069\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u306F\u305A\u3067\u3059\u3002"),wt.forEach(s),he=f(e),$e=i(e,"H3",{class:!0});var yl=p($e);X=i(yl,"A",{id:!0,class:!0,href:!0});var wf=p(X);Oe=i(wf,"SPAN",{});var bf=p(Oe);E(ge.$$.fragment,bf),bf.forEach(s),wf.forEach(s),Xa=f(yl),vt=i(yl,"SPAN",{});var gf=p(vt);kt=n(gf,"SQuAD \u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"),gf.forEach(s),yl.forEach(s),Yt=f(e),Ze=i(e,"P",{});var _p=p(Ze);qt=n(_p,"\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001"),Et=i(_p,"CODE",{});var xf=p(Et);Ka=n(xf,"load_dataset()"),xf.forEach(s),yt=n(_p,"\u306E\u304A\u304B\u3052\u3067\u3001\u305F\u3063\u305F1\u30B9\u30C6\u30C3\u30D7\u3067\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),_p.forEach(s),Zt=f(e),E(us.$$.fragment,e),Ws=f(e),Us=i(e,"P",{});var jf=p(Us);Ya=n(jf,"\u305D\u3057\u3066\u3001\u3053\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u898B\u3066\u3001SQuAD\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306B\u3064\u3044\u3066\u3082\u3063\u3068\u77E5\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),jf.forEach(s),Dt=f(e),E(ye.$$.fragment,e),Ct=f(e),E(_e.$$.fragment,e),ea=f(e),we=i(e,"P",{});var Dl=p(we);Tt=i(Dl,"CODE",{});var vf=p(Tt);Za=n(vf,"context"),vf.forEach(s),At=n(Dl,", "),Pt=i(Dl,"CODE",{});var kf=p(Pt);en=n(kf,"question"),kf.forEach(s),sa=n(Dl,", "),ze=i(Dl,"CODE",{});var qf=p(ze);ta=n(qf,"answers"),qf.forEach(s),xe=n(Dl," \u30D5\u30A3\u30FC\u30EB\u30C9\u3067\u5FC5\u8981\u306A\u3082\u306E\u306F\u3059\u3079\u3066\u63C3\u3063\u305F\u3088\u3046\u306A\u306E\u3067\u3001\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u306E\u6700\u521D\u306E\u8981\u7D20\u306B\u5BFE\u3057\u3066\u3053\u308C\u3089\u3092\u51FA\u529B\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Dl.forEach(s),aa=f(e),E(Ne.$$.fragment,e),na=f(e),E(ms.$$.fragment,e),Js=f(e),oe=i(e,"P",{});var Qs=p(oe);St=i(Qs,"CODE",{});var Ef=p(St);Ot=n(Ef,"context"),Ef.forEach(s),sn=n(Qs," \u3068 "),Mt=i(Qs,"CODE",{});var yf=p(Mt);la=n(yf,"question"),yf.forEach(s),hs=n(Qs," \u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u975E\u5E38\u306B\u7C21\u5358\u306B\u4F7F\u3046\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Xs=i(Qs,"CODE",{});var Df=p(Xs);$s=n(Df,"answers"),Df.forEach(s),ra=n(Qs," \u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u5C11\u3057\u624B\u304C\u8FBC\u3093\u3067\u304A\u308A\u3001\u30EA\u30B9\u30C8\u3067\u3042\u308B2\u3064\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6301\u3064\u8F9E\u66F8\u578B\u30C7\u30FC\u30BF\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001 "),es=i(Qs,"CODE",{});var Cf=p(es);tn=n(Cf,"squad"),Cf.forEach(s),oa=n(Qs," \u6307\u6A19\u304C\u8A55\u4FA1\u6642\u306B\u671F\u5F85\u3059\u308B\u5F62\u5F0F\u3067\u3059\u3002\u3082\u3057\u3001\u3042\u306A\u305F\u81EA\u8EAB\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u306E\u3067\u3042\u308C\u3070\u3001\u5FC5\u305A\u3057\u3082\u540C\u3058\u5F62\u5F0F\u306E\u7B54\u3048\u3092\u7F6E\u304F\u3053\u3068\u3092\u5FC3\u914D\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u307E\u305F\u3001 "),He=i(Qs,"CODE",{});var Tf=p(He);ia=n(Tf,"answer_start"),Tf.forEach(s),Me=n(Qs," \u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u306F\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u5404\u89E3\u7B54\u306E\u958B\u59CB\u6587\u5B57\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u304C\u683C\u7D0D\u3055\u308C\u307E\u3059\u3002"),Qs.forEach(s),pa=f(e),Be=i(e,"P",{});var up=p(Be);an=n(up,"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u9593\u3001\u53EF\u80FD\u306A\u7B54\u3048\u306F1\u3064\u3060\u3051\u3067\u3059\u3002\u3053\u306E\u3053\u3068\u306F "),Bt=i(up,"CODE",{});var Af=p(Bt);Ft=n(Af,"Dataset.filter()"),Af.forEach(s),nn=n(up," \u30E1\u30BD\u30C3\u30C9\u3067\u30C0\u30D6\u30EB\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),up.forEach(s),ca=f(e),E(ss.$$.fragment,e),ts=f(e),E(ws.$$.fragment,e),Lt=f(e),Ve=i(e,"P",{});var Pf=p(Ve);ln=n(Pf,"\u305F\u3060\u3057\u3001\u8A55\u4FA1\u306B\u3064\u3044\u3066\u306F\u3001\u5404\u30B5\u30F3\u30D7\u30EB\u306B\u3064\u3044\u3066\u3001\u540C\u3058\u7B54\u3048\u3082\u3042\u308C\u3070\u7570\u306A\u308B\u7B54\u3048\u3082\u3042\u308A\u3001\u3044\u304F\u3064\u304B\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"),Pf.forEach(s),It=f(e),E(ue.$$.fragment,e),Ks=f(e),E(De.$$.fragment,e),da=f(e),as=i(e,"P",{});var Sf=p(as);rn=n(Sf,"\u8A55\u4FA1\u30B9\u30AF\u30EA\u30D7\u30C8\u306F\u{1F917} Datasets\u306E\u6307\u6A19\u306B\u3088\u3063\u3066\u307E\u3068\u3081\u3089\u308C\u308B\u306E\u3067\u3001\u3053\u3053\u3067\u306F\u6DF1\u5165\u308A\u3057\u307E\u305B\u3093\u304C\u3001\u7C21\u5358\u306B\u8A00\u3046\u3068\u3001\u3044\u304F\u3064\u304B\u306E\u8CEA\u554F\u306B\u306F\u3044\u304F\u3064\u304B\u306E\u56DE\u7B54\u304C\u3042\u308A\u3001\u3053\u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u306F\u4E88\u6E2C\u3055\u308C\u305F\u56DE\u7B54\u3068\u3059\u3079\u3066\u306E\u8A31\u5BB9\u3067\u304D\u308B\u56DE\u7B54\u3092\u6BD4\u8F03\u3057\u3001\u30D9\u30B9\u30C8\u30B9\u30B3\u30A2\u3092\u53D6\u308B\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u4F8B\u3048\u3070\u30A4\u30F3\u30C7\u30C3\u30AF\u30B92\u306E\u30B5\u30F3\u30D7\u30EB\u3092\u898B\u3066\u307F\u308B\u3068"),Sf.forEach(s),fa=f(e),E(bs.$$.fragment,e),Ys=f(e),E(ie.$$.fragment,e),_a=f(e),ns=i(e,"P",{});var Of=p(ns);on=n(Of,"\u7B54\u3048\u306F\u30013\u3064\u306E\u53EF\u80FD\u6027\u306E\u3046\u3061\u306E1\u3064\u3067\u3042\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002"),Of.forEach(s),ua=f(e),Re=i(e,"H3",{id:!0});var Mf=p(Re);pn=n(Mf,"\u5B66\u7FD2\u30C7\u30FC\u30BF\u306E\u51E6\u7406"),Mf.forEach(s),ma=f(e),E(Qe.$$.fragment,e),ha=f(e),Zs=i(e,"P",{});var Bf=p(Zs);cn=n(Bf,"\u307E\u305A\u3001\u5B66\u7FD2\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u304B\u3089\u59CB\u3081\u307E\u3057\u3087\u3046\u3002\u96E3\u3057\u3044\u306E\u306F\u8CEA\u554F\u306E\u7B54\u3048\u306E\u30E9\u30D9\u30EB\u3092\u751F\u6210\u3059\u308B\u3053\u3068\u3067\u3001\u3053\u308C\u306F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u7B54\u3048\u306B\u5BFE\u5FDC\u3059\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u958B\u59CB\u4F4D\u7F6E\u3068\u7D42\u4E86\u4F4D\u7F6E\u3068\u306A\u308A\u307E\u3059\u3002"),Bf.forEach(s),et=f(e),je=i(e,"P",{});var Ff=p(je);dn=n(Ff,"\u3057\u304B\u3057\u3001\u5148\u3092\u6025\u304C\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3057\u3087\u3046\u3002\u307E\u305A\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u4F7F\u3063\u3066\u3001\u5165\u529B\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u30E2\u30C7\u30EB\u304C\u7406\u89E3\u3067\u304D\u308B\u3088\u3046\u306AID\u306B\u5909\u63DB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Ff.forEach(s),st=f(e),E(gs.$$.fragment,e),$a=f(e),me=i(e,"P",{});var Wa=p(me);fn=n(Wa,"\u5148\u306B\u8FF0\u3079\u305F\u3088\u3046\u306B\u3001\u79C1\u305F\u3061\u306F BERT \u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3057\u307E\u3059\u304C\u3001\u9AD8\u901F\u306A\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u304C\u5B9F\u88C5\u3055\u308C\u3066\u3044\u308B\u9650\u308A\u3001\u4ED6\u306E\u3069\u306E\u3088\u3046\u306A\u30E2\u30C7\u30EB\u30BF\u30A4\u30D7\u3067\u3082\u4F7F\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),xs=i(Wa,"A",{href:!0,rel:!0});var Lf=p(xs);wa=n(Lf,"\u3053\u306E\u5927\u304D\u306A\u8868"),Lf.forEach(s),tt=n(Wa,"\u3067\u9AD8\u901F\u7248\u3092\u6301\u3064\u3059\u3079\u3066\u306E\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u3092\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u4F7F\u7528\u3057\u3066\u3044\u308B "),zt=i(Wa,"CODE",{});var If=p(zt);ba=n(If,"tokenizer"),If.forEach(s),js=n(Wa," \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u672C\u5F53\u306B \u{1F917} Tokenizers \u3067\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u306B\u306F\u3001\u305D\u306E "),at=i(Wa,"CODE",{});var zf=p(at);nt=n(zf,"is_fast"),zf.forEach(s),_n=n(Wa," \u5C5E\u6027\u3092\u898B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Wa.forEach(s),Nt=f(e),E(Ce.$$.fragment,e),Ht=f(e),E(K.$$.fragment,e),ga=f(e),ls=i(e,"P",{});var Nf=p(ls);un=n(Nf,"\u8CEA\u554F\u3068\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u4E00\u7DD2\u306B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u6E21\u305B\u3070\u3001\u7279\u6B8A\u306A\u30C8\u30FC\u30AF\u30F3\u3092\u9069\u5207\u306B\u633F\u5165\u3057\u3066\u3001\u6B21\u306E\u3088\u3046\u306A\u6587\u7AE0\u3092\u5F62\u6210\u3057\u3066\u304F\u308C\u307E\u3059\u3002"),Nf.forEach(s),xa=f(e),E(Ge.$$.fragment,e),ja=f(e),lt=i(e,"P",{});var Hf=p(lt);Vt=n(Hf,"2\u91CD\u30C1\u30A7\u30C3\u30AF\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Hf.forEach(s),va=f(e),E(vs.$$.fragment,e),rt=f(e),E(ks.$$.fragment,e),ka=f(e),rs=i(e,"P",{});var Vf=p(rs);mn=n(Vf,"\u30E9\u30D9\u30EB\u306F\u56DE\u7B54\u306E\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3068\u306A\u308A\u3001\u30E2\u30C7\u30EB\u306F\u5165\u529B\u306E\u30C8\u30FC\u30AF\u30F3\u3054\u3068\u306B1\u3064\u306E\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30ED\u30B8\u30C3\u30C8\u3092\u4E88\u6E2C\u3059\u308B\u3088\u3046\u8AB2\u3055\u308C\u3001\u7406\u8AD6\u4E0A\u306E\u30E9\u30D9\u30EB\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002"),Vf.forEach(s),qa=f(e),Te=i(e,"DIV",{class:!0});var mp=p(Te);qs=i(mp,"IMG",{class:!0,src:!0,alt:!0}),Rt=f(mp),Es=i(mp,"IMG",{class:!0,src:!0,alt:!0}),mp.forEach(s),Qt=f(e),se=i(e,"P",{});var Hr=p(se);hn=n(Hr,"\u3053\u306E\u5834\u5408\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306F\u305D\u308C\u307B\u3069\u9577\u304F\u3042\u308A\u307E\u305B\u3093\u304C\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u4E2D\u306B\u306F\u975E\u5E38\u306B\u9577\u3044\u6587\u8108\u3092\u6301\u3064\u4F8B\u3082\u3042\u308A\u3001\u8A2D\u5B9A\u3057\u305F\u6700\u5927\u9577\uFF08\u3053\u306E\u5834\u5408\u306F384\uFF09\u3092\u8D85\u3048\u3066\u3057\u307E\u3044\u307E\u3059\u3002"),os=i(Hr,"A",{href:!0});var Rf=p(os);$n=n(Rf,"\u7B2C6\u7AE0"),Rf.forEach(s),wn=n(Hr,"\u3067 "),ys=i(Hr,"CODE",{});var Qf=p(ys);bn=n(Qf,"\u8CEA\u554F\u5FDC\u7B54"),Qf.forEach(s),gn=n(Hr,"\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306E\u5185\u90E8\u3092\u8ABF\u3079\u305F\u3068\u304D\u306B\u898B\u305F\u3088\u3046\u306B\u3001\u9577\u3044\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u5BFE\u3057\u3066\u306F\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E1\u3064\u306E\u30B5\u30F3\u30D7\u30EB\u304B\u3089\u8907\u6570\u306E\u5B66\u7FD2\u7279\u5FB4\u3092\u4F5C\u6210\u3057\u3001\u305D\u308C\u3089\u306E\u9593\u306B\u30B9\u30E9\u30A4\u30C7\u30A3\u30F3\u30B0\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u8A2D\u3051\u3066\u5BFE\u51E6\u3059\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002"),Hr.forEach(s),is=f(e),ot=i(e,"P",{});var Gf=p(ot);xn=n(Gf,"\u4ECA\u56DE\u306E\u4F8B\u3067\u306F\u3001\u9577\u3055\u3092100\u306B\u5236\u9650\u3057\u300150\u30C8\u30FC\u30AF\u30F3\u306E\u30B9\u30E9\u30A4\u30C7\u30A3\u30F3\u30B0\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u3067\u3001\u3069\u306E\u3088\u3046\u306B\u52D5\u4F5C\u3059\u308B\u304B\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002\u6CE8\u610F\u70B9\u3068\u3057\u3066\u3001\u4F7F\u7528\u3059\u308B\u306E\u306F"),Gf.forEach(s),Gt=f(e),_=i(e,"UL",{});var Ua=p(_);F=i(Ua,"LI",{});var hp=p(F);Sl=n(hp,"\u6700\u5927\u9577\u3092\u8A2D\u5B9A\u3059\u308B "),ps=i(hp,"CODE",{});var Wf=p(ps);Ol=n(Wf,"max_length"),Wf.forEach(s),Ml=n(hp," (\u3053\u3053\u3067\u306F100)"),hp.forEach(s),Bl=f(Ua),be=i(Ua,"LI",{});var Wd=p(be);Ea=i(Wd,"CODE",{});var Uf=p(Ea);Fl=n(Uf,'truncation="only_second"'),Uf.forEach(s),Ll=n(Wd," \u306F\u3001\u8CEA\u554F\u3068\u305D\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u9577\u3059\u304E\u308B\u5834\u5408\u306B\u3001(2\u756A\u76EE\u306E\u4F4D\u7F6E\u306B\u3042\u308B)\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u5207\u308A\u8A70\u3081\u308B"),Wd.forEach(s),Il=f(Ua),Wt=i(Ua,"LI",{});var Ud=p(Wt);it=i(Ud,"CODE",{});var Jf=p(it);zl=n(Jf,"stride"),Jf.forEach(s),ve=n(Ud," \u306F2\u3064\u306E\u9023\u7D9A\u3057\u305F\u65AD\u7247\u9593\u3067\u91CD\u8907\u3059\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u6570\u3092\u8A2D\u5B9A\u3057\u307E\u3059 (\u3053\u3053\u3067\u306F50)"),Ud.forEach(s),Nl=f(Ua),Ut=i(Ua,"LI",{});var Jd=p(Ut);ya=i(Jd,"CODE",{});var Xf=p(ya);Hl=n(Xf,"return_overflowing_tokens=True"),Xf.forEach(s),Vl=n(Jd," \u3067\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u30AA\u30FC\u30D0\u30FC\u30D5\u30ED\u30FC\u7528\u30C8\u30FC\u30AF\u30F3\u304C\u5FC5\u8981\u306A\u3053\u3068\u3092\u77E5\u3089\u305B\u307E\u3059\u3002"),Jd.forEach(s),Ua.forEach(s),Ds=f(e),E(pt.$$.fragment,e),jn=f(e),E(ke.$$.fragment,e),vn=f(e),We=i(e,"P",{});var Vr=p(We);Rl=n(Vr,"\u898B\u3066\u308F\u304B\u308B\u3088\u3046\u306B\u3001\u3053\u306E\u4F8B\u306F4\u3064\u306E\u5165\u529B\u306B\u5206\u5272\u3055\u308C\u3001\u305D\u308C\u305E\u308C\u304C\u8CEA\u554F\u3068\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u4E00\u90E8\u3092\u542B\u3093\u3067\u3044\u307E\u3059\u3002\u8CEA\u554F\u306B\u5BFE\u3059\u308B\u7B54\u3048\uFF08\u201CBernadette Soubirous\u201D\uFF09\u306F3\u756A\u76EE\u3068\u6700\u5F8C\u306E\u5165\u529B\u306B\u306E\u307F\u73FE\u308C\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u306E\u3088\u3046\u306B\u9577\u3044\u6587\u8108\u3092\u6271\u3046\u3053\u3068\u3067\u3001\u7B54\u3048\u304C\u6587\u8108\u306B\u542B\u307E\u308C\u306A\u3044\u5B66\u7FD2\u30B5\u30F3\u30D7\u30EB\u3092\u3044\u304F\u3064\u304B\u4F5C\u6210\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u3089\u306E\u4F8B\u3067\u306F\u3001\u30E9\u30D9\u30EB\u306F "),Da=i(Vr,"CODE",{});var Kf=p(Da);ct=n(Kf,"start_position = end_position = 0"),Kf.forEach(s),Ql=n(Vr," \u3068\u306A\u308A\u307E\u3059\uFF08\u3064\u307E\u308A\u3001"),Ca=i(Vr,"CODE",{});var Yf=p(Ca);Gl=n(Yf,"[CLS]"),Yf.forEach(s),Wl=n(Vr," \u30C8\u30FC\u30AF\u30F3\u3092\u4E88\u6E2C\u3059\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\uFF09\u3002\u307E\u305F\u3001\u4E0D\u5E78\u306B\u3082\u7B54\u3048\u304C\u5207\u308A\u6368\u3066\u3089\u308C\u3001\u59CB\u307E\u308A\uFF08\u307E\u305F\u306F\u7D42\u308F\u308A\uFF09\u3057\u304B\u306A\u3044\u5834\u5408\u306B\u3082\u3001\u3053\u308C\u3089\u306E\u30E9\u30D9\u30EB\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\u7B54\u3048\u304C\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u5B8C\u5168\u306B\u542B\u307E\u308C\u3066\u3044\u308B\u4F8B\u3067\u306F\u3001\u30E9\u30D9\u30EB\u306F\u7B54\u3048\u304C\u59CB\u307E\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3068\u7B54\u3048\u304C\u7D42\u308F\u308B\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u306B\u306A\u308A\u307E\u3059\u3002"),Vr.forEach(s),Cs=f(e),Ue=i(e,"P",{});var Rr=p(Ue);Ta=n(Rr,"\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304B\u3089\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u7B54\u3048\u306E\u958B\u59CB\u6587\u5B57\u304C\u5F97\u3089\u308C\u3001\u7B54\u3048\u306E\u9577\u3055\u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068\u3067\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u7D42\u4E86\u6587\u5B57\u304C\u898B\u3064\u304B\u308A\u307E\u3059\u3002\u3053\u308C\u3089\u3092\u30C8\u30FC\u30AF\u30F3 \u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u306B\u30DE\u30C3\u30D7\u3059\u308B\u306B\u306F\u3001"),Jt=i(Rr,"A",{href:!0});var Zf=p(Jt);Ul=n(Zf,"\u7B2C6\u7AE0"),Zf.forEach(s),cs=n(Rr," \u3067\u5B66\u7FD2\u3057\u305F\u30AA\u30D5\u30BB\u30C3\u30C8 \u30DE\u30C3\u30D4\u30F3\u30B0\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),Aa=i(Rr,"CODE",{});var e_=p(Aa);Jl=n(e_,"return_offsets_mapping=True"),e_.forEach(s),Xl=n(Rr," \u3092\u6E21\u3059\u3053\u3068\u3067\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u3053\u308C\u3089\u3092\u8FD4\u3055\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),Rr.forEach(s),kn=f(e),E(Fe.$$.fragment,e),qn=f(e),E(dt.$$.fragment,e),En=f(e),Je=i(e,"P",{});var Qr=p(Je);ne=n(Qr,"\u898B\u3066\u306E\u3068\u304A\u308A\u3001\u901A\u5E38\u306E\u5165\u529B ID\u3001\u30C8\u30FC\u30AF\u30F3\u30BF\u30A4\u30D7 ID\u3001\u30A2\u30C6\u30F3\u30B7\u30E7\u30F3\u30DE\u30B9\u30AF\u306B\u52A0\u3048\u3001\u5FC5\u8981\u306A\u30AA\u30D5\u30BB\u30C3\u30C8\u30DE\u30C3\u30D4\u30F3\u30B0\u3001\u3055\u3089\u306B "),Pa=i(Qr,"CODE",{});var s_=p(Pa);Kl=n(s_,"overflow_to_sample_mapping"),s_.forEach(s),Yl=n(Qr," \u3068\u3044\u3046\u30AD\u30FC\u304C\u8FD4\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u5024\u306F\u3001\u8907\u6570\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u540C\u6642\u306B\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u3068\u304D\u306B\u5F79\u306B\u7ACB\u3061\u307E\u3059 (\u3053\u306E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u304CRust\u306B\u652F\u3048\u3089\u308C\u3066\u3044\u308B\u3068\u3044\u3046\u4E8B\u5B9F\u3092\u5229\u7528\u3059\u308B\u305F\u3081\u306B\u3001\u305D\u3046\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059)\u30021 \u3064\u306E\u30B5\u30F3\u30D7\u30EB\u306F\u8907\u6570\u306E\u7279\u5FB4\u3092\u4E0E\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u306E\u3067\u3001\u5404\u7279\u5FB4\u3092\u305D\u306E\u5143\u3068\u306A\u308B\u30B5\u30F3\u30D7\u30EB\u306B\u30DE\u30C3\u30D7\u3057\u307E\u3059\u3002\u3053\u3053\u3067\u306F 1 \u3064\u306E\u4F8B\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3057\u305F\u3060\u3051\u306A\u306E\u3067\u3001"),Sa=i(Qr,"CODE",{});var t_=p(Sa);Zl=n(t_,"0"),t_.forEach(s),er=n(Qr," \u306E\u30EA\u30B9\u30C8\u304C\u5F97\u3089\u308C\u307E\u3059\u3002"),Qr.forEach(s),yn=f(e),E(qe.$$.fragment,e),Dn=f(e),E(ft.$$.fragment,e),Cn=f(e),sr=i(e,"P",{});var a_=p(sr);Ap=n(a_,"\u3057\u304B\u3057\u3001\u3082\u3063\u3068\u591A\u304F\u306E\u4F8B\u3092\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308C\u3070\u3001\u3053\u308C\u306F\u3082\u3063\u3068\u4FBF\u5229\u306B\u306A\u308A\u307E\u3059\u3002"),a_.forEach(s),Bo=f(e),E(Tn.$$.fragment,e),Fo=f(e),E(An.$$.fragment,e),Lo=f(e),tr=i(e,"P",{});var n_=p(tr);Pp=n(n_,"\u898B\u3066\u306E\u901A\u308A\u3001\u6700\u521D\u306E3\u4F8B\uFF08\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B92\u30013\u30014\uFF09\u306F\u305D\u308C\u305E\u308C4\u3064\u306E\u7279\u5FB4\u3092\u4E0E\u3048\u3001\u6700\u5F8C\u306E\u4F8B\uFF08\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30BB\u30C3\u30C8\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B95\uFF09\u306F7\u3064\u306E\u7279\u5FB4\u3092\u4E0E\u3048\u3066\u3044\u307E\u3059\u3002"),n_.forEach(s),Io=f(e),ar=i(e,"P",{});var l_=p(ar);Sp=n(l_,"\u3053\u306E\u60C5\u5831\u306F\u3001\u5F97\u3089\u308C\u305F\u5404\u7279\u5FB4\u3092\u5BFE\u5FDC\u3059\u308B\u30E9\u30D9\u30EB\u306B\u5BFE\u5FDC\u4ED8\u3051\u308B\u305F\u3081\u306B\u6709\u7528\u3067\u3059\u3002\u524D\u8FF0\u3057\u305F\u3088\u3046\u306B\u3001\u305D\u308C\u3089\u306E\u30E9\u30D9\u30EB\u306F"),l_.forEach(s),zo=f(e),Oa=i(e,"UL",{});var $p=p(Oa);Pn=i($p,"LI",{});var wp=p(Pn);Op=n(wp,"\u7B54\u3048\u304C\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u5BFE\u5FDC\u3059\u308B\u7BC4\u56F2\u5185\u306B\u306A\u3044\u5834\u5408\u3001 "),Kr=i(wp,"CODE",{});var r_=p(Kr);Mp=n(r_,"(0, 0)"),r_.forEach(s),Bp=n(wp," \u3068\u306A\u308A\u307E\u3059"),wp.forEach(s),Fp=f($p),_t=i($p,"LI",{});var Cl=p(_t);Yr=i(Cl,"CODE",{});var o_=p(Yr);Lp=n(o_,"(start_position, end_position)"),o_.forEach(s),Ip=n(Cl," \u3082\u3057\u7B54\u3048\u304C\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5BFE\u5FDC\u3059\u308B\u7BC4\u56F2\u5185\u306B\u3042\u308C\u3070\u3001 "),Zr=i(Cl,"CODE",{});var i_=p(Zr);zp=n(i_,"start_position"),i_.forEach(s),Np=n(Cl," \u306F\u7B54\u3048\u306E\u59CB\u307E\u308A\u306E\u30C8\u30FC\u30AF\u30F3\uFF08\u5165\u529BID\u306E\u4E2D\uFF09\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3001 "),eo=i(Cl,"CODE",{});var p_=p(eo);Hp=n(p_,"end_position"),p_.forEach(s),Vp=n(Cl," \u306F\u7B54\u3048\u306E\u7D42\u308F\u308A\u306E\u30C8\u30FC\u30AF\u30F3\uFF08\u5165\u529BID\u306E\u4E2D\uFF09\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3067\u3059"),Cl.forEach(s),$p.forEach(s),No=f(e),ut=i(e,"P",{});var Gr=p(ut);Rp=n(Gr,"\u3053\u308C\u3089\u306E\u3069\u3061\u3089\u3067\u3042\u308B\u304B\u3001\u307E\u305F\u95A2\u9023\u3059\u308B\u5834\u5408\u306F\u30C8\u30FC\u30AF\u30F3\u306E\u4F4D\u7F6E\u3092\u6C7A\u5B9A\u3059\u308B\u305F\u3081\u306B\u3001\u307E\u305A\u5165\u529BID\u306E\u4E2D\u3067\u6587\u8108\u3092\u958B\u59CB\u3059\u308B\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3068\u7D42\u4E86\u3059\u308B\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3092\u898B\u3064\u3051\u307E\u3059\u3002\u3053\u308C\u3092\u884C\u3046\u306B\u306F\u30C8\u30FC\u30AF\u30F3\u30BF\u30A4\u30D7 ID \u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u304C\u3001\u305D\u308C\u306F\u3059\u3079\u3066\u306E\u30E2\u30C7\u30EB\u306B\u5B58\u5728\u3059\u308B\u3068\u306F\u9650\u3089\u306A\u3044\u306E\u3067 (\u4F8B\u3048\u3070 DistilBERT \u306F\u305D\u308C\u3092\u8981\u6C42\u3057\u307E\u305B\u3093)\u3001\u4EE3\u308F\u308A\u306B\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u304C\u8FD4\u3059 "),so=i(Gr,"CODE",{});var c_=p(so);Qp=n(c_,"BatchEncoding"),c_.forEach(s),Gp=n(Gr," \u306E "),to=i(Gr,"CODE",{});var d_=p(to);Wp=n(d_,"sequence_ids()"),d_.forEach(s),Up=n(Gr," \u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002"),Gr.forEach(s),Ho=f(e),Ma=i(e,"P",{});var bp=p(Ma);Jp=n(bp,"\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u304C\u5F97\u3089\u308C\u305F\u3089\u3001\u5BFE\u5FDC\u3059\u308B\u30AA\u30D5\u30BB\u30C3\u30C8\u3092\u8ABF\u3079\u307E\u3059\u3002\u30AA\u30D5\u30BB\u30C3\u30C8\u3068\u306F\u3001\u5143\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u6587\u5B57\u306E\u7BC4\u56F2\u3092\u8868\u30592\u3064\u306E\u6574\u6570\u306E\u7D44\u306E\u3053\u3068\u3067\u3059\u3002\u3053\u306E\u3088\u3046\u306B\u3057\u3066\u3001\u3053\u306E\u7279\u5FB4\u306B\u304A\u3051\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u65AD\u7247\u304C\u3001\u7B54\u3048\u304C\u7D42\u308F\u3063\u305F\u5F8C\u306B\u59CB\u307E\u3063\u3066\u3044\u308B\u306E\u304B\u3001\u7B54\u3048\u304C\u59CB\u307E\u308B\u524D\u306B\u7D42\u308F\u3063\u3066\u3044\u308B\u306E\u304B\uFF08\u305D\u306E\u5834\u5408\u306E\u30E9\u30D9\u30EB\u306F "),ao=i(bp,"CODE",{});var f_=p(ao);Xp=n(f_,"(0, 0)"),f_.forEach(s),Kp=n(bp," \uFF09 \u3092\u691C\u51FA\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u306E\u3067\u3059\u3002\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306F\u3001\u7B54\u3048\u306E\u6700\u521D\u3068\u6700\u5F8C\u306E\u30C8\u30FC\u30AF\u30F3\u3092\u898B\u3064\u3051\u308B\u305F\u3081\u306B\u30EB\u30FC\u30D7\u3057\u307E\u3059\u3002"),bp.forEach(s),Vo=f(e),E(Sn.$$.fragment,e),Ro=f(e),E(On.$$.fragment,e),Qo=f(e),Ba=i(e,"P",{});var gp=p(Ba);Yp=n(gp,"\u79C1\u9054\u306E\u30A2\u30D7\u30ED\u30FC\u30C1\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u7D50\u679C\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u6700\u521D\u306E\u7279\u5FB4\u91CF\u3067\u306F\u3001\u30E9\u30D9\u30EB\u3068\u3057\u3066 "),no=i(gp,"CODE",{});var __=p(no);Zp=n(__,"(83, 85)"),__.forEach(s),ec=n(gp," \u304C\u898B\u3064\u304B\u3063\u305F\u306E\u3067\u3001\u7406\u8AD6\u7684\u306A\u7B54\u3048\u306883\u304B\u308985\uFF08\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u306B\u5BFE\u5FDC\u3059\u308B\u30C8\u30FC\u30AF\u30F3\u3082\u542B\u3080\uFF09\u307E\u3067\u306E\u30C8\u30FC\u30AF\u30F3\u306E\u30C7\u30B3\u30FC\u30C9\u3057\u305F\u7BC4\u56F2\u3092\u6BD4\u8F03\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),gp.forEach(s),Go=f(e),E(Mn.$$.fragment,e),Wo=f(e),E(Bn.$$.fragment,e),Uo=f(e),Fa=i(e,"P",{});var xp=p(Fa);sc=n(xp,"\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4E00\u81F4\u3057\u307E\u3057\u305F \u3053\u3053\u3067\u3001\u30E9\u30D9\u30EB\u3092 "),lo=i(xp,"CODE",{});var u_=p(lo);tc=n(u_,"(0, 0)"),u_.forEach(s),ac=n(xp," \u306B\u8A2D\u5B9A\u3057\u307E\u3057\u305F\u3002\u3064\u307E\u308A\u3001\u7B54\u3048\u306F\u305D\u306E\u7279\u5FB4\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u65AD\u7247\u306B\u306A\u3044\u3053\u3068\u3092\u610F\u5473\u3057\u307E\u3059\u3002"),xp.forEach(s),Jo=f(e),E(Fn.$$.fragment,e),Xo=f(e),E(Ln.$$.fragment,e),Ko=f(e),nr=i(e,"P",{});var m_=p(nr);nc=n(m_,"\u78BA\u304B\u306B\u3001\u6587\u8108\u306E\u4E2D\u306B\u7B54\u3048\u304C\u51FA\u3066\u304D\u307E\u305B\u3093\u3002"),m_.forEach(s),Yo=f(e),E(La.$$.fragment,e),Zo=f(e),lr=i(e,"P",{});var h_=p(lr);lc=n(h_,"\u8A13\u7DF4\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u3092\u6BB5\u968E\u7684\u306B\u898B\u3066\u304D\u307E\u3057\u305F\u304C\u3001\u8A13\u7DF4\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u5168\u4F53\u306B\u5BFE\u3057\u3066\u9069\u7528\u3059\u308B\u95A2\u6570\u306B\u307E\u3068\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307B\u3068\u3093\u3069\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306F\u9577\u3044\u306E\u3067\uFF08\u305D\u3057\u3066\u5BFE\u5FDC\u3059\u308B\u30B5\u30F3\u30D7\u30EB\u306F\u3044\u304F\u3064\u304B\u306E\u7279\u5FB4\u306B\u5206\u5272\u3055\u308C\u307E\u3059\uFF09\u3001\u3053\u3053\u3067\u52D5\u7684\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u9069\u7528\u3057\u3066\u3082\u3042\u307E\u308A\u610F\u5473\u304C\u306A\u3044\u306E\u3067\u3001\u3059\u3079\u3066\u306E\u7279\u5FB4\u3092\u8A2D\u5B9A\u3057\u305F\u6700\u5927\u9577\u306B\u306A\u308B\u3088\u3046\u306B\u30D1\u30C7\u30A3\u30F3\u30B0\u3057\u307E\u3059\u3002"),h_.forEach(s),ei=f(e),E(In.$$.fragment,e),si=f(e),rr=i(e,"P",{});var $_=p(rr);rc=n($_,"\u30B9\u30E9\u30A4\u30C7\u30A3\u30F3\u30B0\u30A6\u30A3\u30F3\u30C9\u30A6\u306E\u9577\u3055\u3068\u6700\u5927\u9577\u3092\u6C7A\u5B9A\u3059\u308B\u305F\u3081\u306B2\u3064\u306E\u5B9A\u6570\u3092\u5B9A\u7FA9\u3057\u305F\u3053\u3068\u3068\u3001\u30C8\u30FC\u30AF\u30F3\u5316\u306E\u524D\u306B\u5C0F\u3055\u306A\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3092\u8FFD\u52A0\u3057\u305F\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002SQuAD\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u3044\u304F\u3064\u304B\u306E\u8CEA\u554F\u306B\u306F\u6700\u521D\u3068\u6700\u5F8C\u306B\u4F55\u3082\u8FFD\u52A0\u3057\u306A\u3044\u4F59\u8A08\u306A\u30B9\u30DA\u30FC\u30B9\uFF08RoBERTa\u306A\u3069\u306E\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3059\u308B\u3068\u30C8\u30FC\u30AF\u30F3\u5316\u3059\u308B\u3068\u304D\u306B\u30B9\u30DA\u30FC\u30B9\u3092\u53D6\u3063\u3066\u3057\u307E\u3044\u307E\u3059\uFF09\u304C\u3042\u308B\u306E\u3067\u3001\u305D\u308C\u3089\u306E\u4F59\u8A08\u306A\u30B9\u30DA\u30FC\u30B9\u3092\u9664\u53BB\u3057\u3066\u3044\u307E\u3059\u3002"),$_.forEach(s),ti=f(e),mt=i(e,"P",{});var Wr=p(mt);oc=n(Wr,"\u3053\u306E\u95A2\u6570\u3092\u8A13\u7DF4\u30BB\u30C3\u30C8\u5168\u4F53\u306B\u9069\u7528\u3059\u308B\u305F\u3081\u306B\u3001 "),ro=i(Wr,"CODE",{});var w_=p(ro);ic=n(w_,"Dataset.map()"),w_.forEach(s),pc=n(Wr," \u30E1\u30BD\u30C3\u30C9\u306B "),oo=i(Wr,"CODE",{});var b_=p(oo);cc=n(b_,"batched=True"),b_.forEach(s),dc=n(Wr," \u30D5\u30E9\u30B0\u3092\u4ED8\u3051\u3066\u4F7F\u3044\u307E\u3059\u3002\u3053\u308C\u306F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u9577\u3055\u3092\u5909\u66F4\u3059\u308B\u305F\u3081\u306B\u5FC5\u8981\u3067\u3059\uFF081\u3064\u306E\u4F8B\u3067\u8907\u6570\u306E\u5B66\u7FD2\u7279\u5FB4\u3092\u4E0E\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u305F\u3081\uFF09\u3002"),Wr.forEach(s),ai=f(e),E(zn.$$.fragment,e),ni=f(e),E(Nn.$$.fragment,e),li=f(e),or=i(e,"P",{});var g_=p(or);fc=n(g_,"\u3053\u306E\u3088\u3046\u306B\u3001\u524D\u51E6\u7406\u306B\u3088\u3063\u3066\u7D041,000\u500B\u306E\u7279\u5FB4\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u3067\u8A13\u7DF4\u30BB\u30C3\u30C8\u306E\u6E96\u5099\u306F\u6574\u3044\u307E\u3057\u305F\u3002\u6B21\u306F\u691C\u8A3C\u30BB\u30C3\u30C8\u306E\u524D\u51E6\u7406\u3067\u3059\u3002"),g_.forEach(s),ri=f(e),Hn=i(e,"H3",{id:!0});var x_=p(Hn);_c=n(x_,"\u691C\u8A3C\u30BB\u30C3\u30C8\u306E\u51E6\u7406"),x_.forEach(s),oi=f(e),ir=i(e,"P",{});var j_=p(ir);uc=n(j_,"\u691C\u8A3C\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u306F\u3001\u30E9\u30D9\u30EB\u3092\u751F\u6210\u3059\u308B\u5FC5\u8981\u304C\u306A\u3044\u305F\u3081\u3001\u82E5\u5E72\u7C21\u5358\u306B\u306A\u308A\u307E\u3059\u3002\uFF08\u691C\u8A3C\u640D\u5931\u3092\u8A08\u7B97\u3057\u305F\u3044\u5834\u5408\u306F\u5225\u3067\u3059\u304C\u3001\u3053\u306E\u6570\u5024\u306F\u30E2\u30C7\u30EB\u304C\u3069\u308C\u3060\u3051\u512A\u308C\u3066\u3044\u308B\u304B\u3092\u7406\u89E3\u3059\u308B\u306E\u306B\u3042\u307E\u308A\u5F79\u7ACB\u3061\u307E\u305B\u3093\uFF09\u3002\u672C\u5F53\u306E\u559C\u3073\u306F\u3001\u30E2\u30C7\u30EB\u306E\u4E88\u6E2C\u3092\u5143\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u7BC4\u56F2\u3068\u3057\u3066\u89E3\u91C8\u3059\u308B\u4E8B\u306B\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u305F\u3081\u306B\u306F\u3001\u30AA\u30D5\u30BB\u30C3\u30C8\u30DE\u30C3\u30D4\u30F3\u30B0\u3068\u3001\u4F5C\u6210\u3055\u308C\u305F\u5404\u7279\u5FB4\u3092\u5143\u306E\u4F8B\u6587\u3068\u30DE\u30C3\u30C1\u30F3\u30B0\u3055\u305B\u308B\u65B9\u6CD5\u306E\u4E21\u65B9\u3092\u4FDD\u5B58\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3060\u3051\u3067\u3059\u3002\u5143\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306BID\u30AB\u30E9\u30E0\u304C\u3042\u308B\u306E\u3067\u3001\u305D\u306EID\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),j_.forEach(s),ii=f(e),ht=i(e,"P",{});var Ur=p(ht);mc=n(Ur,"\u3053\u3053\u3067\u8FFD\u52A0\u3059\u308B\u306E\u306F\u3001\u30AA\u30D5\u30BB\u30C3\u30C8\u30DE\u30C3\u30D4\u30F3\u30B0\u306E\u307B\u3093\u306E\u5C11\u3057\u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3060\u3051\u3067\u3059\u3002\u8CEA\u554F\u3068\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u30AA\u30D5\u30BB\u30C3\u30C8\u304C\u542B\u307E\u308C\u307E\u3059\u304C\u3001\u5F8C\u51E6\u7406\u306E\u6BB5\u968E\u3067\u306F\u3001\u5165\u529BID\u306E\u3069\u306E\u90E8\u5206\u304C\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u5BFE\u5FDC\u3057\u3001\u3069\u306E\u90E8\u5206\u304C\u8CEA\u554F\u3067\u3042\u308B\u304B\u3092\u77E5\u308B\u65B9\u6CD5\u304C\u3042\u308A\u307E\u305B\u3093\uFF08\u79C1\u305F\u3061\u304C\u4F7F\u3063\u305F "),io=i(Ur,"CODE",{});var v_=p(io);hc=n(v_,"sequence_ids()"),v_.forEach(s),$c=n(Ur," \u30E1\u30BD\u30C3\u30C9\u306F\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u306E\u51FA\u529B\u306B\u306E\u307F\u5229\u7528\u53EF\u80FD\u3067\u3059\uFF09\u3002\u305D\u3053\u3067\u3001\u8CEA\u554F\u306B\u5BFE\u5FDC\u3059\u308B\u30AA\u30D5\u30BB\u30C3\u30C8\u3092 "),po=i(Ur,"CODE",{});var k_=p(po);wc=n(k_,"None"),k_.forEach(s),bc=n(Ur," \u306B\u8A2D\u5B9A\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002"),Ur.forEach(s),pi=f(e),E(Vn.$$.fragment,e),ci=f(e),pr=i(e,"P",{});var q_=p(pr);gc=n(q_,"\u3053\u306E\u95A2\u6570\u306F\u3001\u5148\u307B\u3069\u306E\u3088\u3046\u306B\u691C\u8A3C\u7528\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u5168\u4F53\u306B\u9069\u7528\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),q_.forEach(s),di=f(e),E(Rn.$$.fragment,e),fi=f(e),E(Qn.$$.fragment,e),_i=f(e),cr=i(e,"P",{});var E_=p(cr);xc=n(E_,`\u3053\u306E\u5834\u5408\u3001\u6570\u767E\u30B5\u30F3\u30D7\u30EB\u3057\u304B\u8FFD\u52A0\u3057\u3066\u3044\u306A\u3044\u306E\u3067\u3001\u691C\u8A3C\u7528\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306F\u5C11\u3057\u77ED\u3044\u3088\u3046\u3067\u3059\u3002
\u3055\u3066\u3001\u5168\u3066\u306E\u30C7\u30FC\u30BF\u306E\u524D\u51E6\u7406\u304C\u7D42\u308F\u3063\u305F\u306E\u3067\u3001\u3044\u3088\u3044\u3088\u5B66\u7FD2\u306B\u5165\u308A\u307E\u3059\u3002`),E_.forEach(s),ui=f(e),As.l(e),dr=f(e),Gn=i(e,"H3",{id:!0});var y_=p(Gn);jc=n(y_,"\u5F8C\u51E6\u7406"),y_.forEach(s),mi=f(e),Ss.l(e),fr=f(e),Ia=i(e,"P",{});var jp=p(Ia);vc=n(jp,"\u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001"),Wn=i(jp,"A",{href:!0});var Xd=p(Wn);co=i(Xd,"CODE",{});var D_=p(co);kc=n(D_,"question-answering"),D_.forEach(s),qc=n(Xd," pipeline"),Xd.forEach(s),Ec=n(jp," \u306E\u63A2\u7D22\u3067\u898B\u305F\u3088\u3046\u306B\u3001\u5165\u529BID\u306B\u304A\u3051\u308B\u7B54\u3048\u306E\u958B\u59CB\u4F4D\u7F6E\u3068\u7D42\u4E86\u4F4D\u7F6E\u306E\u30ED\u30B8\u30C3\u30C8\u3092\u51FA\u529B\u3059\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002\u5F8C\u51E6\u7406\u306E\u30B9\u30C6\u30C3\u30D7\u306F\u3001\u305D\u306E\u969B\u306B\u884C\u3063\u305F\u3053\u3068\u3068\u540C\u3058\u3088\u3046\u306A\u3082\u306E\u306B\u306A\u308A\u307E\u3059\u306E\u3067\u3001\u4EE5\u4E0B\u3067\u3084\u3063\u305F\u4E8B\u3092\u601D\u3044\u51FA\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),jp.forEach(s),hi=f(e),ds=i(e,"UL",{});var Ja=p(ds);fo=i(Ja,"LI",{});var C_=p(fo);yc=n(C_,"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5916\u306E\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u5FDC\u3059\u308B\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30ED\u30B8\u30C3\u30C8\u3092\u30DE\u30B9\u30AF\u3057\u307E\u3057\u305F\u3002"),C_.forEach(s),Dc=f(Ja),_o=i(Ja,"LI",{});var T_=p(_o);Cc=n(T_,"\u6B21\u306B\u3001\u30BD\u30D5\u30C8\u30DE\u30C3\u30AF\u30B9\u3092\u4F7F\u7528\u3057\u3066\u958B\u59CB\u30ED\u30B8\u30C3\u30C8\u3068\u7D42\u4E86\u30ED\u30B8\u30C3\u30C8\u3092\u78BA\u7387\u306B\u5909\u63DB\u3057\u307E\u3057\u305F\u3002"),T_.forEach(s),Tc=f(Ja),Un=i(Ja,"LI",{});var vp=p(Un);Ac=n(vp,"\u5404\u30DA\u30A2 "),uo=i(vp,"CODE",{});var A_=p(uo);Pc=n(A_,"(start_token, end_token)"),A_.forEach(s),Sc=n(vp," \u306B\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u4E8C\u3064\u306E\u78BA\u7387\u306E\u7A4D\u3092\u53D6\u308B\u3053\u3068\u3067\u30B9\u30B3\u30A2\u3092\u4ED8\u4E0E\u3057\u307E\u3057\u305F\u3002"),vp.forEach(s),Oc=f(Ja),Xt=i(Ja,"LI",{});var Jr=p(Xt);Mc=n(Jr,"\u79C1\u9054\u306F\u6709\u52B9\u306A\u7B54\u3048\uFF08\u4F8B\u3048\u3070\u3001"),mo=i(Jr,"CODE",{});var P_=p(mo);Bc=n(P_,"start_token"),P_.forEach(s),Fc=n(Jr,"\u304C"),ho=i(Jr,"CODE",{});var S_=p(ho);Lc=n(S_,"end_token"),S_.forEach(s),Ic=n(Jr,"\u3088\u308A\u524D\u306B\u3042\u308B\uFF09\u3092\u3082\u305F\u3089\u3059\u6700\u5927\u306E\u30B9\u30B3\u30A2\u3092\u6301\u3064\u30DA\u30A2\u3092\u63A2\u3057\u307E\u3057\u305F\u3002"),Jr.forEach(s),Ja.forEach(s),$i=f(e),Le=i(e,"P",{});var bt=p(Le);zc=n(bt,"\u3053\u3053\u3067\u306F\u3001\u5B9F\u969B\u306E\u30B9\u30B3\u30A2\u3092\u8A08\u7B97\u3059\u308B\u5FC5\u8981\u304C\u306A\u3044\u305F\u3081\u3001\u3053\u306E\u30D7\u30ED\u30BB\u30B9\u3092\u5C11\u3057\u5909\u66F4\u3057\u307E\u3059\uFF08\u4E88\u6E2C\u3055\u308C\u305F\u7B54\u3048\u3060\u3051\u304C\u6B32\u3057\u3044\u306E\u3067\u3059\uFF09\u3002\u3064\u307E\u308A\u3001\u30BD\u30D5\u30C8\u30DE\u30C3\u30AF\u30B9\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u30B9\u30AD\u30C3\u30D7\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307E\u305F\u3001\u3088\u308A\u9AD8\u901F\u306B\u51E6\u7406\u3059\u308B\u305F\u3081\u306B\u3001\u53EF\u80FD\u6027\u306E\u3042\u308B\u5168\u3066\u306E "),$o=i(bt,"CODE",{});var O_=p($o);Nc=n(O_,"(start_token, end_token)"),O_.forEach(s),Hc=n(bt," \u30DA\u30A2\u3092\u30B9\u30B3\u30A2\u30EA\u30F3\u30B0\u305B\u305A\u3001\u6700\u3082\u9AD8\u3044 "),wo=i(bt,"CODE",{});var M_=p(wo);Vc=n(M_,"n_best"),M_.forEach(s),Rc=n(bt," \u30ED\u30B8\u30C3\u30C8\u306B\u5BFE\u5FDC\u3059\u308B\u3082\u306E\u3060\u3051\u3092\u30B9\u30B3\u30A2\u30EA\u30F3\u30B0\u3057\u307E\u3059\uFF08"),bo=i(bt,"CODE",{});var B_=p(bo);Qc=n(B_,"n_best=20"),B_.forEach(s),Gc=n(bt," \u3068\u3057\u307E\u3059\uFF09\u3002\u30BD\u30D5\u30C8\u30DE\u30C3\u30AF\u30B9\u3092\u30B9\u30AD\u30C3\u30D7\u3059\u308B\u306E\u3067\u3001\u3053\u308C\u3089\u306E\u30B9\u30B3\u30A2\u306Flogit\u30B9\u30B3\u30A2\u3068\u306A\u308A\u3001\u958B\u59CB\u3068\u7D42\u4E86\u306E\u30ED\u30B8\u30C3\u30C8\u306E\u548C\u3092\u53D6\u308B\u3053\u3068\u3067\u5F97\u3089\u308C\u307E\u3059\u3002"),wi=qu(bt),bi=n(bt,")\u306E\u516C\u5F0F\u304C\u3042\u308B\u306E\u3067\u7A4D\u306E\u4EE3\u308F\u308A\u306B\u548C\u3068\u306A\u308A\u307E\u3059)\u3002"),bt.forEach(s),gi=f(e),za=i(e,"P",{});var kp=p(za);Wc=n(kp,"\u3053\u308C\u3089\u306E\u3053\u3068\u3092\u5B9F\u8A3C\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u4F55\u3089\u304B\u306E\u4E88\u6E2C\u304C\u5FC5\u8981\u3067\u3059\u3002\u307E\u3060\u30E2\u30C7\u30EB\u3092\u5B66\u7FD2\u3057\u3066\u3044\u306A\u3044\u306E\u3067\u3001QA\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3057\u3066\u3001\u691C\u8A3C\u30BB\u30C3\u30C8\u306E\u4E00\u90E8\u3067\u4E88\u6E2C\u3092\u751F\u6210\u3059\u308B\u3053\u3068\u306B\u3057\u307E\u3059\u3002\u3053\u306E\u51E6\u7406\u95A2\u6570\u306F\u30B0\u30ED\u30FC\u30D0\u30EB\u5B9A\u6570 "),go=i(kp,"CODE",{});var F_=p(go);Uc=n(F_,"tokenizer"),F_.forEach(s),Jc=n(kp," \u306B\u4F9D\u5B58\u3057\u3066\u3044\u308B\u306E\u3067\u3001\u3053\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4E00\u6642\u7684\u306B\u4F7F\u7528\u3057\u305F\u3044\u30E2\u30C7\u30EB\u306E\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u306B\u5909\u66F4\u3059\u308B\u3060\u3051\u3067\u3088\u3044\u306E\u3067\u3059\u3002"),kp.forEach(s),xi=f(e),E(Jn.$$.fragment,e),ji=f(e),_r=i(e,"P",{});var L_=p(_r);Xc=n(L_,"\u524D\u51E6\u7406\u304C\u7D42\u308F\u3063\u305F\u306E\u3067\u3001\u30C8\u30FC\u30AF\u30CA\u30A4\u30B6\u30FC\u3092\u5143\u3005\u9078\u3093\u3067\u3044\u305F\u3082\u306E\u306B\u623B\u3057\u307E\u3059\u3002"),L_.forEach(s),vi=f(e),E(Xn.$$.fragment,e),ki=f(e),Na=i(e,"P",{});var qp=p(Na);Kc=n(qp,"\u6B21\u306B\u3001"),xo=i(qp,"CODE",{});var I_=p(xo);Yc=n(I_,"eval_set"),I_.forEach(s),Zc=n(qp,"\u304B\u3089\u30E2\u30C7\u30EB\u304C\u671F\u5F85\u3057\u306A\u3044\u5217\u3092\u53D6\u308A\u9664\u304D\u3001\u305D\u306E\u5C0F\u3055\u306A\u691C\u8A3C\u30BB\u30C3\u30C8\u3092\u3059\u3079\u3066\u542B\u3080\u30D0\u30C3\u30C1\u3092\u69CB\u7BC9\u3057\u3001\u305D\u308C\u3092\u30E2\u30C7\u30EB\u306B\u6E21\u3057\u307E\u3059\u3002GPU\u304C\u5229\u7528\u53EF\u80FD\u3067\u3042\u308C\u3070\u3001\u3088\u308A\u9AD8\u901F\u306B\u51E6\u7406\u3059\u308B\u305F\u3081\u306B\u305D\u308C\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),qp.forEach(s),qi=f(e),Ms.l(e),ur=f(e),Ie=i(e,"P",{});var gt=p(Ie);ed=n(gt,"\u3055\u3066\u3001"),jo=i(gt,"CODE",{});var z_=p(jo);sd=n(z_,"small_eval_set"),z_.forEach(s),td=n(gt," \u306B\u542B\u307E\u308C\u308B\u5404\u4F8B\u306B\u5BFE\u3057\u3066\u3001\u4E88\u6E2C\u3055\u308C\u308B\u7B54\u3048\u3092\u898B\u3064\u3051\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u4E00\u3064\u306E\u4F8B\u306F\u3001"),vo=i(gt,"CODE",{});var N_=p(vo);ad=n(N_,"eval_set"),N_.forEach(s),nd=n(gt,"\u306E\u4E2D\u3067\u3044\u304F\u3064\u304B\u306E\u7279\u5FB4\u306B\u5206\u5272\u3055\u308C\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B\u306E\u3067\u3001\u6700\u521D\u306E\u30B9\u30C6\u30C3\u30D7\u306F "),ko=i(gt,"CODE",{});var H_=p(ko);ld=n(H_,"small_eval_set"),H_.forEach(s),rd=n(gt," \u306E\u4E2D\u306E\u5404\u4F8B\u3092 "),qo=i(gt,"CODE",{});var V_=p(qo);od=n(V_,"eval_set"),V_.forEach(s),id=n(gt," \u306E\u4E2D\u306E\u5BFE\u5FDC\u3059\u308B\u7279\u5FB4\u306B\u30DE\u30C3\u30D4\u30F3\u30B0\u3059\u308B\u3053\u3068\u3067\u3059\u3002"),gt.forEach(s),Ei=f(e),E(Kn.$$.fragment,e),yi=f(e),mr=i(e,"P",{});var R_=p(mr);pd=n(R_,"\u3053\u308C\u304C\u3042\u308C\u3070\u3001\u3059\u3079\u3066\u306E\u4F8B\u3068\u3001\u305D\u308C\u305E\u308C\u306E\u4F8B\u306B\u3064\u3044\u3066\u3001\u95A2\u9023\u3059\u308B\u3059\u3079\u3066\u306E\u7279\u5FB4\u3092\u30EB\u30FC\u30D7\u3059\u308B\u3053\u3068\u3067\u3001\u5B9F\u969B\u306B\u4ED5\u4E8B\u306B\u53D6\u308A\u639B\u304B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u524D\u306B\u8FF0\u3079\u305F\u3088\u3046\u306B\u3001\u300Cn_best\u300D\u306A\u958B\u59CB\u30ED\u30B8\u30C3\u30C8\u3068\u7D42\u4E86\u30ED\u30B8\u30C3\u30C8\u306E\u30ED\u30B8\u30C3\u30C8\u30B9\u30B3\u30A2\u3092\u898B\u307E\u3059\u304C\u3001\u4EE5\u4E0B\u3092\u9664\u304D\u307E\u3059\u3002"),R_.forEach(s),Di=f(e),$t=i(e,"UL",{});var Xr=p($t);Eo=i(Xr,"LI",{});var Q_=p(Eo);cd=n(Q_,"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u4E2D\u306B\u306A\u3044\u7B54\u3048"),Q_.forEach(s),dd=f(Xr),yo=i(Xr,"LI",{});var G_=p(yo);fd=n(G_,"\u8CA0\u306E\u9577\u3055\u3092\u6301\u3064\u7B54\u3048"),G_.forEach(s),_d=f(Xr),Yn=i(Xr,"LI",{});var Ep=p(Yn);ud=n(Ep,"\u9577\u3059\u304E\u308B\u7B54\u3048 (\u79C1\u9054\u306F "),Do=i(Ep,"CODE",{});var W_=p(Do);md=n(W_,"max_answer_length=30"),W_.forEach(s),hd=n(Ep," \u3067\u53EF\u80FD\u6027\u3092\u5236\u9650\u3057\u3066\u3044\u307E\u3059)"),Ep.forEach(s),Xr.forEach(s),Ci=f(e),hr=i(e,"P",{});var U_=p(hr);$d=n(U_,"1\u3064\u306E\u4F8B\u306B\u5BFE\u3057\u3066\u63A1\u70B9\u3055\u308C\u305F\u3059\u3079\u3066\u306E\u53EF\u80FD\u306A\u7B54\u3048\u304C\u3042\u3063\u305F\u3089\u3001\u6700\u9AD8\u306E\u30ED\u30B8\u30C3\u30C8\u30B9\u30B3\u30A2\u304B\u30891\u3064\u3092\u9078\u3073\u307E\u3059\u3002"),U_.forEach(s),Ti=f(e),E(Zn.$$.fragment,e),Ai=f(e),$r=i(e,"P",{});var J_=p($r);wd=n(J_,"\u4E88\u6E2C\u3055\u308C\u305F\u7B54\u3048\u306E\u6700\u7D42\u7684\u306A\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306F\u3001\u79C1\u305F\u3061\u304C\u4F7F\u7528\u3059\u308B\u6307\u6A19\u306B\u3088\u3063\u3066\u671F\u5F85\u3055\u308C\u308B\u3082\u306E\u3067\u3059\u3002\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001\u{1F917} Evaluate\u30E9\u30A4\u30D6\u30E9\u30EA\u306E\u52A9\u3051\u3092\u501F\u308A\u3066\u8AAD\u307F\u8FBC\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),J_.forEach(s),Pi=f(e),E(el.$$.fragment,e),Si=f(e),wr=i(e,"P",{});var X_=p(wr);bd=n(X_,"\u3053\u306E\u6307\u6A19\u306F\u3001\u4E0A\u3067\u898B\u305F\u5F62\u5F0F\u306E\u4E88\u6E2C\u3055\u308C\u305F\u7B54\u3048\uFF08\u30B5\u30F3\u30D7\u30EB\u306EID\u3068\u4E88\u6E2C\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u306E1\u3064\u306E\u30AD\u30FC\u3092\u6301\u3064\u8F9E\u66F8\u306E\u30EA\u30B9\u30C8\uFF09\u3068\u3001\u4E0B\u306E\u5F62\u5F0F\u306E\u7406\u8AD6\u7684\u306A\u7B54\u3048\uFF08\u30B5\u30F3\u30D7\u30EB\u306EID\u3068\u53EF\u80FD\u306A\u7B54\u3048\u306E1\u3064\u306E\u30AD\u30FC\u3092\u6301\u3064\u8F9E\u66F8\u306E\u30EA\u30B9\u30C8\uFF09\u3092\u671F\u5F85\u3059\u308B\u3082\u306E\u3067\u3059\u3002"),X_.forEach(s),Oi=f(e),E(sl.$$.fragment,e),Mi=f(e),br=i(e,"P",{});var K_=p(br);gd=n(K_,"\u3053\u3053\u3067\u3001\u4E21\u65B9\u306E\u30EA\u30B9\u30C8\u306E\u6700\u521D\u306E\u8981\u7D20\u3092\u898B\u3066\u3001\u8CE2\u660E\u306A\u7D50\u679C\u304C\u5F97\u3089\u308C\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),K_.forEach(s),Bi=f(e),E(tl.$$.fragment,e),Fi=f(e),E(al.$$.fragment,e),Li=f(e),gr=i(e,"P",{});var Y_=p(gr);xd=n(Y_,"\u60AA\u304F\u306A\u3044\u3067\u3059\u306D\uFF01\u3067\u306F\u3001\u3053\u306E\u6307\u6A19\u304C\u793A\u3059\u30B9\u30B3\u30A2\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),Y_.forEach(s),Ii=f(e),E(nl.$$.fragment,e),zi=f(e),E(ll.$$.fragment,e),Ni=f(e),rl=i(e,"P",{});var Kd=p(rl);ol=i(Kd,"A",{href:!0,rel:!0});var Z_=p(ol);jd=n(Z_,"\u3053\u306E\u8AD6\u6587"),Z_.forEach(s),vd=n(Kd,"\u306B\u3088\u308B\u3068\u3001SQuAD\u3067\u5FAE\u8ABF\u6574\u3057\u305FDistilBERT\u306F\u3001\u5168\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306779.1\u70B9\u306886.9\u70B9\u3092\u7372\u5F97\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u8003\u3048\u308B\u3068\u3001\u3053\u308C\u306F\u3080\u3057\u308D\u826F\u3044\u3053\u3068\u3060\u3068\u8A00\u3048\u307E\u3059\u3002"),Kd.forEach(s),Hi=f(e),Kt.l(e),xr=f(e),E(il.$$.fragment,e),Vi=f(e),jr=i(e,"P",{});var eu=p(jr);kd=n(eu,"\u79C1\u9054\u306E\u4E88\u6E2C\u3092\u4F7F\u3063\u3066\u52D5\u4F5C\u78BA\u8A8D\u304C\u3067\u304D\u307E\u3059\u3002"),eu.forEach(s),Ri=f(e),E(pl.$$.fragment,e),Qi=f(e),E(cl.$$.fragment,e),Gi=f(e),vr=i(e,"P",{});var su=p(vr);qd=n(su,"\u3044\u3044\u611F\u3058\u3067\u3059\uFF01\u3067\u306F\u3001\u3053\u308C\u3092\u4F7F\u3063\u3066\u30E2\u30C7\u30EB\u3092\u5FAE\u8ABF\u6574\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002"),su.forEach(s),Wi=f(e),dl=i(e,"H3",{id:!0});var tu=p(dl);Ed=n(tu,"\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574"),tu.forEach(s),Ui=f(e),Fs.l(e),kr=f(e),qr=i(e,"P",{});var au=p(qr);yd=n(au,"\u3044\u3064\u3082\u306E\u3088\u3046\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u91CD\u307F\u304C\u4F7F\u308F\u308C\u3066\u3044\u306A\u3044\uFF08\u4E8B\u524D\u5B66\u7FD2\u6642\u306E\u30D8\u30C3\u30C9\u306E\u3082\u306E\uFF09\u3001\u4ED6\u306E\u3044\u304F\u3064\u304B\u306E\u91CD\u307F\u304C\u30E9\u30F3\u30C0\u30E0\u306B\u521D\u671F\u5316\u3055\u308C\u3066\u3044\u308B\uFF08\u8CEA\u554F\u5FDC\u7B54\u7528\u30D8\u30C3\u30C9\u306E\u3082\u306E\uFF09\u3068\u3044\u3046\u8B66\u544A\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u3082\u3046\u6163\u308C\u305F\u3068\u601D\u3044\u307E\u3059\u304C\u3001\u3053\u308C\u306F\u3053\u306E\u30E2\u30C7\u30EB\u304C\u307E\u3060\u4F7F\u3048\u308B\u72B6\u614B\u3067\u306F\u306A\u304F\u3001\u5FAE\u8ABF\u6574\u304C\u5FC5\u8981\u3067\u3042\u308B\u3053\u3068\u3092\u610F\u5473\u3057\u307E\u3059\u3002"),au.forEach(s),Ji=f(e),Er=i(e,"P",{});var nu=p(Er);Dd=n(nu,"\u3053\u306E\u30E2\u30C7\u30EB\u3092Hub\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u305F\u3081\u306B\u306F\u3001Hugging Face\u306B\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3082\u3057\u3053\u306E\u30B3\u30FC\u30C9\u3092notebook\u3067\u5B9F\u884C\u3057\u3066\u3044\u308B\u306A\u3089\u3001\u6B21\u306E\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u95A2\u6570\u3067\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002"),nu.forEach(s),Xi=f(e),E(fl.$$.fragment,e),Ki=f(e),yr=i(e,"P",{});var lu=p(yr);Cd=n(lu,"\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF\u3067\u4F5C\u696D\u3057\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u3001\u30BF\u30FC\u30DF\u30CA\u30EB\u3067\u6B21\u306E\u884C\u3092\u5165\u529B\u3059\u308B\u3060\u3051\u3067\u3059\u3002"),lu.forEach(s),Yi=f(e),E(_l.$$.fragment,e),Zi=f(e),Is.l(e),Dr=f(e),Ha=i(e,"P",{});var yp=p(Ha);Td=n(yp,`\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u4F7F\u7528\u3055\u308C\u308B\u30EA\u30DD\u30B8\u30C8\u30EA\u306F\u3042\u306A\u305F\u306E\u540D\u524D\u7A7A\u9593\u306B\u3042\u308A\u3001\u8A2D\u5B9A\u3057\u305F\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u540D\u524D\u306B\u306A\u308A\u307E\u3059\u3002
\u3053\u306E\u4F8B\u3067\u306F\u3001 `),Co=i(yp,"CODE",{});var ru=p(Co);Ad=n(ru,'"sgugger/bert-finetuned-squad"'),ru.forEach(s),Pd=n(yp," \u306B\u306A\u308A\u307E\u3059\u3002"),yp.forEach(s),ep=f(e),zs=i(e,"P",{});var Tl=p(zs);To=i(Tl,"CODE",{});var ou=p(To);Sd=n(ou,"hub_model_id"),ou.forEach(s),Od=n(Tl," \u3092\u6E21\u3059\u3053\u3068\u3067\u3001\u3053\u308C\u3092\u4E0A\u66F8\u304D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u4F8B\u3048\u3070\u3001\u30E2\u30C7\u30EB\u3092 "),Ao=i(Tl,"CODE",{});var iu=p(Ao);Md=n(iu,"huggingface_course"),iu.forEach(s),Bd=n(Tl," \u3068\u3044\u3046\u7D44\u7E54\u306B\u30D7\u30C3\u30B7\u30E5\u3059\u308B\u306B\u306F\u3001 "),Po=i(Tl,"CODE",{});var pu=p(Po);Fd=n(pu,'hub_model_id="huggingface_course/bert-finetuned-squad"'),pu.forEach(s),Ld=n(Tl,"(\u3053\u306E\u7AE0\u306E\u59CB\u3081\u3067\u30EA\u30F3\u30AF\u3057\u305F\u30E2\u30C7\u30EB\u3067\u3059) \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"),Tl.forEach(s),sp=f(e),Hs.l(e),Cr=f(e),Tr=i(e,"P",{});var cu=p(Tr);Id=n(cu,"\u5B66\u7FD2\u304C\u884C\u308F\u308C\u3066\u3044\u308B\u9593\u3001\u30E2\u30C7\u30EB\u304C\u4FDD\u5B58\u3055\u308C\u308B\u305F\u3073\u306B\uFF08\u3053\u3053\u3067\u306F\u30A8\u30DD\u30C3\u30AF\u3054\u3068\u306B\uFF09\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3055\u308C\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u3046\u3059\u308B\u3053\u3068\u3067\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u5225\u306E\u30DE\u30B7\u30F3\u3067\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u3092\u518D\u958B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u5168\u4F53\u306B\u306F\u3057\u3070\u3089\u304F\u6642\u9593\u304C\u304B\u304B\u308B\u306E\u3067\uFF08Titan RTX\u30671\u6642\u9593\u5F37\uFF09\u3001\u305D\u306E\u9593\u30B3\u30FC\u30D2\u30FC\u3092\u98F2\u3093\u3060\u308A\u3001\u30B3\u30FC\u30B9\u306E\u96E3\u3057\u3044\u90E8\u5206\u3092\u8AAD\u307F\u76F4\u3057\u305F\u308A\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u307E\u305F\u3001\u6700\u521D\u306E\u30A8\u30DD\u30C3\u30AF\u304C\u7D42\u4E86\u3059\u308B\u3068\u3059\u3050\u306B\u3001\u3044\u304F\u3064\u304B\u306E\u91CD\u307F\u304C\u30CF\u30D6\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3055\u308C\u3001\u305D\u306E\u30DA\u30FC\u30B8\u3067\u3042\u306A\u305F\u306E\u30E2\u30C7\u30EB\u3067\u904A\u3073\u59CB\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3053\u3068\u306B\u7559\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),cu.forEach(s),tp=f(e),Rs.l(e),Ar=f(e),E(ul.$$.fragment,e),ap=f(e),Pr=i(e,"P",{});var du=p(Pr);zd=n(du,`\u7D20\u6674\u3089\u3057\u3044\uFF01
\u6BD4\u8F03\u3068\u3057\u3066\u3001\u3053\u306E\u30E2\u30C7\u30EB\u306EBERT\u306E\u8A18\u4E8B\u3067\u5831\u544A\u3055\u308C\u3066\u3044\u308B\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u306E\u30B9\u30B3\u30A2\u306F80.8\u306888.5\u306A\u306E\u3067\u3001\u3061\u3087\u3046\u3069\u3042\u308B\u3079\u304D\u3068\u3053\u308D\u306B\u3044\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002`),du.forEach(s),np=f(e),pe&&pe.l(e),Sr=f(e),Or=i(e,"P",{});var fu=p(Or);Nd=n(fu,"\u3053\u306E\u6BB5\u968E\u3067\u3001\u30E2\u30C7\u30EB\u30CF\u30D6\u4E0A\u306E\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u4F7F\u3063\u3066\u30E2\u30C7\u30EB\u3092\u30C6\u30B9\u30C8\u3057\u3001\u53CB\u4EBA\u3001\u5BB6\u65CF\u3001\u304A\u6C17\u306B\u5165\u308A\u306E\u30DA\u30C3\u30C8\u3068\u5171\u6709\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u3042\u306A\u305F\u306F\u3001\u8CEA\u554F\u5FDC\u7B54\u30BF\u30B9\u30AF\u3067\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u306B\u6210\u529F\u3057\u307E\u3057\u305F\u3002\u304A\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01"),fu.forEach(s),lp=f(e),E(Va.$$.fragment,e),rp=f(e),ce&&ce.l(e),Mr=f(e),ml=i(e,"H2",{id:!0});var _u=p(ml);Hd=n(_u,"\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3059\u308B"),_u.forEach(s),op=f(e),Ra=i(e,"P",{});var Dp=p(Ra);Vd=n(Dp,"\u30E2\u30C7\u30EB\u30CF\u30D6\u3067\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u63A8\u8AD6\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3067\u4F7F\u7528\u3059\u308B\u65B9\u6CD5\u306F\u65E2\u306B\u7D39\u4ECB\u3057\u307E\u3057\u305F\u3002"),So=i(Dp,"CODE",{});var uu=p(So);Rd=n(uu,"pipeline"),uu.forEach(s),Qd=n(Dp,"\u3067\u5229\u7528\u3059\u308B\u5834\u5408\u306F\u3001\u30E2\u30C7\u30EB\u8B58\u5225\u5B50\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002"),Dp.forEach(s),ip=f(e),E(hl.$$.fragment,e),pp=f(e),E($l.$$.fragment,e),cp=f(e),Br=i(e,"P",{});var mu=p(Br);Gd=n(mu,"\u7D20\u6674\u3089\u3057\u3044\u3067\u3059\uFF01 \u79C1\u305F\u3061\u306E\u30E2\u30C7\u30EB\u306F\u3001\u3053\u306E\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u3082\u306E\u3068\u540C\u3058\u3088\u3046\u306B\u52D5\u4F5C\u3057\u3066\u3044\u307E\u3059\uFF01"),mu.forEach(s),this.h()},h(){I(c,"name","hf:doc:metadata"),I(c,"content",JSON.stringify(Ku)),I(P,"id",""),I(L,"href","https://rajpurkar.github.io/SQuAD-explorer/"),I(L,"rel","nofollow"),Yd(O.src,J="https://hf.space/gradioiframe/course-demos/bert-finetuned-squad/+")||I(O,"src",J),I(O,"frameborder","0"),I(O,"height","450"),I(O,"title","Gradio app"),I(O,"class","block dark:hidden container p-0 flex-grow space-iframe"),I(O,"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"),I(O,"sandbox","allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads"),I(ee,"href","https://huggingface.co/huggingface-course/bert-finetuned-squad?context=%F0%9F%A4%97+Transformers+is+backed+by+the+three+most+popular+deep+learning+libraries+%E2%80%94+Jax%2C+PyTorch+and+TensorFlow+%E2%80%94+with+a+seamless+integration+between+them.+It%27s+straightforward+to+train+your+models+with+one+before+loading+them+for+inference+with+the+other.&question=Which+deep+learning+libraries+back+%F0%9F%A4%97+Transformers%3F"),I(ee,"rel","nofollow"),I(fe,"id",""),I(re,"href","https://rajpurkar.github.io/SQuAD-explorer/"),I(re,"rel","nofollow"),I(Se,"href","https://huggingface.co/datasets/squad_v2"),I(Se,"rel","nofollow"),I(X,"id","squad"),I(X,"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"),I(X,"href","#squad"),I($e,"class","relative group"),I(Re,"id",""),I(xs,"href","https://huggingface.co/transformers/#supported-frameworks"),I(xs,"rel","nofollow"),I(qs,"class","block dark:hidden"),Yd(qs.src,Al="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter7/qa_labels.svg")||I(qs,"src",Al),I(qs,"alt","One-hot encoded labels for question answering."),I(Es,"class","hidden dark:block"),Yd(Es.src,Pl="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter7/qa_labels-dark.svg")||I(Es,"src",Pl),I(Es,"alt","One-hot encoded labels for question answering."),I(Te,"class","flex justify-center"),I(os,"href","/course/ja/chapter6/4"),I(Jt,"href","/course/ja/chapter6/4"),I(Hn,"id",""),I(Gn,"id",""),I(Wn,"href","/course/ja/chapter6/3b"),wi.a=bi,I(ol,"href","https://arxiv.org/abs/1910.01108v2"),I(ol,"rel","nofollow"),I(dl,"id",""),I(ml,"id","")},m(e,r){t(document.head,c),l(e,$,r),y(u,e,r),l(e,h,r),l(e,P,r),t(P,x),l(e,j,r),wl[b].m(e,r),l(e,k,r),l(e,v,r),t(v,C),t(v,M),t(M,H),t(v,A),l(e,T,r),y(Q,e,r),l(e,R,r),l(e,z,r),t(z,B),t(z,L),t(L,G),t(z,Z),l(e,W,r),l(e,O,r),l(e,te,r),l(e,Y,r),t(Y,le),t(Y,ee),t(ee,Ae),t(Y,Xe),l(e,de,r),y(ae,e,r),l(e,Ee,r),l(e,fe,r),t(fe,fs),l(e,Pe,r),l(e,N,r),t(N,U),t(N,re),t(re,Gs),t(N,Ke),t(N,Se),t(Se,Ye),t(N,_s),l(e,he,r),l(e,$e,r),t($e,X),t(X,Oe),y(ge,Oe,null),t($e,Xa),t($e,vt),t(vt,kt),l(e,Yt,r),l(e,Ze,r),t(Ze,qt),t(Ze,Et),t(Et,Ka),t(Ze,yt),l(e,Zt,r),y(us,e,r),l(e,Ws,r),l(e,Us,r),t(Us,Ya),l(e,Dt,r),y(ye,e,r),l(e,Ct,r),y(_e,e,r),l(e,ea,r),l(e,we,r),t(we,Tt),t(Tt,Za),t(we,At),t(we,Pt),t(Pt,en),t(we,sa),t(we,ze),t(ze,ta),t(we,xe),l(e,aa,r),y(Ne,e,r),l(e,na,r),y(ms,e,r),l(e,Js,r),l(e,oe,r),t(oe,St),t(St,Ot),t(oe,sn),t(oe,Mt),t(Mt,la),t(oe,hs),t(oe,Xs),t(Xs,$s),t(oe,ra),t(oe,es),t(es,tn),t(oe,oa),t(oe,He),t(He,ia),t(oe,Me),l(e,pa,r),l(e,Be,r),t(Be,an),t(Be,Bt),t(Bt,Ft),t(Be,nn),l(e,ca,r),y(ss,e,r),l(e,ts,r),y(ws,e,r),l(e,Lt,r),l(e,Ve,r),t(Ve,ln),l(e,It,r),y(ue,e,r),l(e,Ks,r),y(De,e,r),l(e,da,r),l(e,as,r),t(as,rn),l(e,fa,r),y(bs,e,r),l(e,Ys,r),y(ie,e,r),l(e,_a,r),l(e,ns,r),t(ns,on),l(e,ua,r),l(e,Re,r),t(Re,pn),l(e,ma,r),y(Qe,e,r),l(e,ha,r),l(e,Zs,r),t(Zs,cn),l(e,et,r),l(e,je,r),t(je,dn),l(e,st,r),y(gs,e,r),l(e,$a,r),l(e,me,r),t(me,fn),t(me,xs),t(xs,wa),t(me,tt),t(me,zt),t(zt,ba),t(me,js),t(me,at),t(at,nt),t(me,_n),l(e,Nt,r),y(Ce,e,r),l(e,Ht,r),y(K,e,r),l(e,ga,r),l(e,ls,r),t(ls,un),l(e,xa,r),y(Ge,e,r),l(e,ja,r),l(e,lt,r),t(lt,Vt),l(e,va,r),y(vs,e,r),l(e,rt,r),y(ks,e,r),l(e,ka,r),l(e,rs,r),t(rs,mn),l(e,qa,r),l(e,Te,r),t(Te,qs),t(Te,Rt),t(Te,Es),l(e,Qt,r),l(e,se,r),t(se,hn),t(se,os),t(os,$n),t(se,wn),t(se,ys),t(ys,bn),t(se,gn),l(e,is,r),l(e,ot,r),t(ot,xn),l(e,Gt,r),l(e,_,r),t(_,F),t(F,Sl),t(F,ps),t(ps,Ol),t(F,Ml),t(_,Bl),t(_,be),t(be,Ea),t(Ea,Fl),t(be,Ll),t(_,Il),t(_,Wt),t(Wt,it),t(it,zl),t(Wt,ve),t(_,Nl),t(_,Ut),t(Ut,ya),t(ya,Hl),t(Ut,Vl),l(e,Ds,r),y(pt,e,r),l(e,jn,r),y(ke,e,r),l(e,vn,r),l(e,We,r),t(We,Rl),t(We,Da),t(Da,ct),t(We,Ql),t(We,Ca),t(Ca,Gl),t(We,Wl),l(e,Cs,r),l(e,Ue,r),t(Ue,Ta),t(Ue,Jt),t(Jt,Ul),t(Ue,cs),t(Ue,Aa),t(Aa,Jl),t(Ue,Xl),l(e,kn,r),y(Fe,e,r),l(e,qn,r),y(dt,e,r),l(e,En,r),l(e,Je,r),t(Je,ne),t(Je,Pa),t(Pa,Kl),t(Je,Yl),t(Je,Sa),t(Sa,Zl),t(Je,er),l(e,yn,r),y(qe,e,r),l(e,Dn,r),y(ft,e,r),l(e,Cn,r),l(e,sr,r),t(sr,Ap),l(e,Bo,r),y(Tn,e,r),l(e,Fo,r),y(An,e,r),l(e,Lo,r),l(e,tr,r),t(tr,Pp),l(e,Io,r),l(e,ar,r),t(ar,Sp),l(e,zo,r),l(e,Oa,r),t(Oa,Pn),t(Pn,Op),t(Pn,Kr),t(Kr,Mp),t(Pn,Bp),t(Oa,Fp),t(Oa,_t),t(_t,Yr),t(Yr,Lp),t(_t,Ip),t(_t,Zr),t(Zr,zp),t(_t,Np),t(_t,eo),t(eo,Hp),t(_t,Vp),l(e,No,r),l(e,ut,r),t(ut,Rp),t(ut,so),t(so,Qp),t(ut,Gp),t(ut,to),t(to,Wp),t(ut,Up),l(e,Ho,r),l(e,Ma,r),t(Ma,Jp),t(Ma,ao),t(ao,Xp),t(Ma,Kp),l(e,Vo,r),y(Sn,e,r),l(e,Ro,r),y(On,e,r),l(e,Qo,r),l(e,Ba,r),t(Ba,Yp),t(Ba,no),t(no,Zp),t(Ba,ec),l(e,Go,r),y(Mn,e,r),l(e,Wo,r),y(Bn,e,r),l(e,Uo,r),l(e,Fa,r),t(Fa,sc),t(Fa,lo),t(lo,tc),t(Fa,ac),l(e,Jo,r),y(Fn,e,r),l(e,Xo,r),y(Ln,e,r),l(e,Ko,r),l(e,nr,r),t(nr,nc),l(e,Yo,r),y(La,e,r),l(e,Zo,r),l(e,lr,r),t(lr,lc),l(e,ei,r),y(In,e,r),l(e,si,r),l(e,rr,r),t(rr,rc),l(e,ti,r),l(e,mt,r),t(mt,oc),t(mt,ro),t(ro,ic),t(mt,pc),t(mt,oo),t(oo,cc),t(mt,dc),l(e,ai,r),y(zn,e,r),l(e,ni,r),y(Nn,e,r),l(e,li,r),l(e,or,r),t(or,fc),l(e,ri,r),l(e,Hn,r),t(Hn,_c),l(e,oi,r),l(e,ir,r),t(ir,uc),l(e,ii,r),l(e,ht,r),t(ht,mc),t(ht,io),t(io,hc),t(ht,$c),t(ht,po),t(po,wc),t(ht,bc),l(e,pi,r),y(Vn,e,r),l(e,ci,r),l(e,pr,r),t(pr,gc),l(e,di,r),y(Rn,e,r),l(e,fi,r),y(Qn,e,r),l(e,_i,r),l(e,cr,r),t(cr,xc),l(e,ui,r),bl[Ts].m(e,r),l(e,dr,r),l(e,Gn,r),t(Gn,jc),l(e,mi,r),gl[Ps].m(e,r),l(e,fr,r),l(e,Ia,r),t(Ia,vc),t(Ia,Wn),t(Wn,co),t(co,kc),t(Wn,qc),t(Ia,Ec),l(e,hi,r),l(e,ds,r),t(ds,fo),t(fo,yc),t(ds,Dc),t(ds,_o),t(_o,Cc),t(ds,Tc),t(ds,Un),t(Un,Ac),t(Un,uo),t(uo,Pc),t(Un,Sc),t(ds,Oc),t(ds,Xt),t(Xt,Mc),t(Xt,mo),t(mo,Bc),t(Xt,Fc),t(Xt,ho),t(ho,Lc),t(Xt,Ic),l(e,$i,r),l(e,Le,r),t(Le,zc),t(Le,$o),t($o,Nc),t(Le,Hc),t(Le,wo),t(wo,Vc),t(Le,Rc),t(Le,bo),t(bo,Qc),t(Le,Gc),wi.m(bu,Le),t(Le,bi),l(e,gi,r),l(e,za,r),t(za,Wc),t(za,go),t(go,Uc),t(za,Jc),l(e,xi,r),y(Jn,e,r),l(e,ji,r),l(e,_r,r),t(_r,Xc),l(e,vi,r),y(Xn,e,r),l(e,ki,r),l(e,Na,r),t(Na,Kc),t(Na,xo),t(xo,Yc),t(Na,Zc),l(e,qi,r),xl[Os].m(e,r),l(e,ur,r),l(e,Ie,r),t(Ie,ed),t(Ie,jo),t(jo,sd),t(Ie,td),t(Ie,vo),t(vo,ad),t(Ie,nd),t(Ie,ko),t(ko,ld),t(Ie,rd),t(Ie,qo),t(qo,od),t(Ie,id),l(e,Ei,r),y(Kn,e,r),l(e,yi,r),l(e,mr,r),t(mr,pd),l(e,Di,r),l(e,$t,r),t($t,Eo),t(Eo,cd),t($t,dd),t($t,yo),t(yo,fd),t($t,_d),t($t,Yn),t(Yn,ud),t(Yn,Do),t(Do,md),t(Yn,hd),l(e,Ci,r),l(e,hr,r),t(hr,$d),l(e,Ti,r),y(Zn,e,r),l(e,Ai,r),l(e,$r,r),t($r,wd),l(e,Pi,r),y(el,e,r),l(e,Si,r),l(e,wr,r),t(wr,bd),l(e,Oi,r),y(sl,e,r),l(e,Mi,r),l(e,br,r),t(br,gd),l(e,Bi,r),y(tl,e,r),l(e,Fi,r),y(al,e,r),l(e,Li,r),l(e,gr,r),t(gr,xd),l(e,Ii,r),y(nl,e,r),l(e,zi,r),y(ll,e,r),l(e,Ni,r),l(e,rl,r),t(rl,ol),t(ol,jd),t(rl,vd),l(e,Hi,r),Kt.m(e,r),l(e,xr,r),y(il,e,r),l(e,Vi,r),l(e,jr,r),t(jr,kd),l(e,Ri,r),y(pl,e,r),l(e,Qi,r),y(cl,e,r),l(e,Gi,r),l(e,vr,r),t(vr,qd),l(e,Wi,r),l(e,dl,r),t(dl,Ed),l(e,Ui,r),jl[Bs].m(e,r),l(e,kr,r),l(e,qr,r),t(qr,yd),l(e,Ji,r),l(e,Er,r),t(Er,Dd),l(e,Xi,r),y(fl,e,r),l(e,Ki,r),l(e,yr,r),t(yr,Cd),l(e,Yi,r),y(_l,e,r),l(e,Zi,r),vl[Ls].m(e,r),l(e,Dr,r),l(e,Ha,r),t(Ha,Td),t(Ha,Co),t(Co,Ad),t(Ha,Pd),l(e,ep,r),l(e,zs,r),t(zs,To),t(To,Sd),t(zs,Od),t(zs,Ao),t(Ao,Md),t(zs,Bd),t(zs,Po),t(Po,Fd),t(zs,Ld),l(e,sp,r),kl[Ns].m(e,r),l(e,Cr,r),l(e,Tr,r),t(Tr,Id),l(e,tp,r),ql[Vs].m(e,r),l(e,Ar,r),y(ul,e,r),l(e,ap,r),l(e,Pr,r),t(Pr,zd),l(e,np,r),pe&&pe.m(e,r),l(e,Sr,r),l(e,Or,r),t(Or,Nd),l(e,lp,r),y(Va,e,r),l(e,rp,r),ce&&ce.m(e,r),l(e,Mr,r),l(e,ml,r),t(ml,Hd),l(e,op,r),l(e,Ra,r),t(Ra,Vd),t(Ra,So),t(So,Rd),t(Ra,Qd),l(e,ip,r),y(hl,e,r),l(e,pp,r),y($l,e,r),l(e,cp,r),l(e,Br,r),t(Br,Gd),dp=!0},p(e,[r]){const Oo={};r&1&&(Oo.fw=e[0]),u.$set(Oo);let Qa=b;b=sf(e),b!==Qa&&(jt(),g(wl[Qa],1,1,()=>{wl[Qa]=null}),xt(),m=wl[b],m||(m=wl[b]=ef[b](e),m.c()),w(m,1),m.m(k.parentNode,k));const Mo={};r&2&&(Mo.$$scope={dirty:r,ctx:e}),ae.$set(Mo);const El={};r&2&&(El.$$scope={dirty:r,ctx:e}),La.$set(El);let Fr=Ts;Ts=af(e),Ts!==Fr&&(jt(),g(bl[Fr],1,1,()=>{bl[Fr]=null}),xt(),As=bl[Ts],As||(As=bl[Ts]=tf[Ts](e),As.c()),w(As,1),As.m(dr.parentNode,dr));let Ga=Ps;Ps=lf(e),Ps!==Ga&&(jt(),g(gl[Ga],1,1,()=>{gl[Ga]=null}),xt(),Ss=gl[Ps],Ss||(Ss=gl[Ps]=nf[Ps](e),Ss.c()),w(Ss,1),Ss.m(fr.parentNode,fr));let Lr=Os;Os=of(e),Os!==Lr&&(jt(),g(xl[Lr],1,1,()=>{xl[Lr]=null}),xt(),Ms=xl[Os],Ms||(Ms=xl[Os]=rf[Os](e),Ms.c()),w(Ms,1),Ms.m(ur.parentNode,ur)),fp!==(fp=pf(e))&&(Kt.d(1),Kt=fp(e),Kt&&(Kt.c(),Kt.m(xr.parentNode,xr)));let Ir=Bs;Bs=df(e),Bs!==Ir&&(jt(),g(jl[Ir],1,1,()=>{jl[Ir]=null}),xt(),Fs=jl[Bs],Fs||(Fs=jl[Bs]=cf[Bs](e),Fs.c()),w(Fs,1),Fs.m(kr.parentNode,kr));let wt=Ls;Ls=_f(e),Ls!==wt&&(jt(),g(vl[wt],1,1,()=>{vl[wt]=null}),xt(),Is=vl[Ls],Is||(Is=vl[Ls]=ff[Ls](e),Is.c()),w(Is,1),Is.m(Dr.parentNode,Dr));let zr=Ns;Ns=mf(e),Ns!==zr&&(jt(),g(kl[zr],1,1,()=>{kl[zr]=null}),xt(),Hs=kl[Ns],Hs||(Hs=kl[Ns]=uf[Ns](e),Hs.c()),w(Hs,1),Hs.m(Cr.parentNode,Cr));let Nr=Vs;Vs=$f(e),Vs!==Nr&&(jt(),g(ql[Nr],1,1,()=>{ql[Nr]=null}),xt(),Rs=ql[Vs],Rs||(Rs=ql[Vs]=hf[Vs](e),Rs.c()),w(Rs,1),Rs.m(Ar.parentNode,Ar)),e[0]==="pt"?pe?r&1&&w(pe,1):(pe=hu(),pe.c(),w(pe,1),pe.m(Sr.parentNode,Sr)):pe&&(jt(),g(pe,1,1,()=>{pe=null}),xt());const yl={};r&2&&(yl.$$scope={dirty:r,ctx:e}),Va.$set(yl),e[0]==="pt"?ce?r&1&&w(ce,1):(ce=$u(),ce.c(),w(ce,1),ce.m(Mr.parentNode,Mr)):ce&&(jt(),g(ce,1,1,()=>{ce=null}),xt())},i(e){dp||(w(u.$$.fragment,e),w(m),w(Q.$$.fragment,e),w(ae.$$.fragment,e),w(ge.$$.fragment,e),w(us.$$.fragment,e),w(ye.$$.fragment,e),w(_e.$$.fragment,e),w(Ne.$$.fragment,e),w(ms.$$.fragment,e),w(ss.$$.fragment,e),w(ws.$$.fragment,e),w(ue.$$.fragment,e),w(De.$$.fragment,e),w(bs.$$.fragment,e),w(ie.$$.fragment,e),w(Qe.$$.fragment,e),w(gs.$$.fragment,e),w(Ce.$$.fragment,e),w(K.$$.fragment,e),w(Ge.$$.fragment,e),w(vs.$$.fragment,e),w(ks.$$.fragment,e),w(pt.$$.fragment,e),w(ke.$$.fragment,e),w(Fe.$$.fragment,e),w(dt.$$.fragment,e),w(qe.$$.fragment,e),w(ft.$$.fragment,e),w(Tn.$$.fragment,e),w(An.$$.fragment,e),w(Sn.$$.fragment,e),w(On.$$.fragment,e),w(Mn.$$.fragment,e),w(Bn.$$.fragment,e),w(Fn.$$.fragment,e),w(Ln.$$.fragment,e),w(La.$$.fragment,e),w(In.$$.fragment,e),w(zn.$$.fragment,e),w(Nn.$$.fragment,e),w(Vn.$$.fragment,e),w(Rn.$$.fragment,e),w(Qn.$$.fragment,e),w(As),w(Ss),w(Jn.$$.fragment,e),w(Xn.$$.fragment,e),w(Ms),w(Kn.$$.fragment,e),w(Zn.$$.fragment,e),w(el.$$.fragment,e),w(sl.$$.fragment,e),w(tl.$$.fragment,e),w(al.$$.fragment,e),w(nl.$$.fragment,e),w(ll.$$.fragment,e),w(il.$$.fragment,e),w(pl.$$.fragment,e),w(cl.$$.fragment,e),w(Fs),w(fl.$$.fragment,e),w(_l.$$.fragment,e),w(Is),w(Hs),w(Rs),w(ul.$$.fragment,e),w(pe),w(Va.$$.fragment,e),w(ce),w(hl.$$.fragment,e),w($l.$$.fragment,e),dp=!0)},o(e){g(u.$$.fragment,e),g(m),g(Q.$$.fragment,e),g(ae.$$.fragment,e),g(ge.$$.fragment,e),g(us.$$.fragment,e),g(ye.$$.fragment,e),g(_e.$$.fragment,e),g(Ne.$$.fragment,e),g(ms.$$.fragment,e),g(ss.$$.fragment,e),g(ws.$$.fragment,e),g(ue.$$.fragment,e),g(De.$$.fragment,e),g(bs.$$.fragment,e),g(ie.$$.fragment,e),g(Qe.$$.fragment,e),g(gs.$$.fragment,e),g(Ce.$$.fragment,e),g(K.$$.fragment,e),g(Ge.$$.fragment,e),g(vs.$$.fragment,e),g(ks.$$.fragment,e),g(pt.$$.fragment,e),g(ke.$$.fragment,e),g(Fe.$$.fragment,e),g(dt.$$.fragment,e),g(qe.$$.fragment,e),g(ft.$$.fragment,e),g(Tn.$$.fragment,e),g(An.$$.fragment,e),g(Sn.$$.fragment,e),g(On.$$.fragment,e),g(Mn.$$.fragment,e),g(Bn.$$.fragment,e),g(Fn.$$.fragment,e),g(Ln.$$.fragment,e),g(La.$$.fragment,e),g(In.$$.fragment,e),g(zn.$$.fragment,e),g(Nn.$$.fragment,e),g(Vn.$$.fragment,e),g(Rn.$$.fragment,e),g(Qn.$$.fragment,e),g(As),g(Ss),g(Jn.$$.fragment,e),g(Xn.$$.fragment,e),g(Ms),g(Kn.$$.fragment,e),g(Zn.$$.fragment,e),g(el.$$.fragment,e),g(sl.$$.fragment,e),g(tl.$$.fragment,e),g(al.$$.fragment,e),g(nl.$$.fragment,e),g(ll.$$.fragment,e),g(il.$$.fragment,e),g(pl.$$.fragment,e),g(cl.$$.fragment,e),g(Fs),g(fl.$$.fragment,e),g(_l.$$.fragment,e),g(Is),g(Hs),g(Rs),g(ul.$$.fragment,e),g(pe),g(Va.$$.fragment,e),g(ce),g(hl.$$.fragment,e),g($l.$$.fragment,e),dp=!1},d(e){s(c),e&&s($),D(u,e),e&&s(h),e&&s(P),e&&s(j),wl[b].d(e),e&&s(k),e&&s(v),e&&s(T),D(Q,e),e&&s(R),e&&s(z),e&&s(W),e&&s(O),e&&s(te),e&&s(Y),e&&s(de),D(ae,e),e&&s(Ee),e&&s(fe),e&&s(Pe),e&&s(N),e&&s(he),e&&s($e),D(ge),e&&s(Yt),e&&s(Ze),e&&s(Zt),D(us,e),e&&s(Ws),e&&s(Us),e&&s(Dt),D(ye,e),e&&s(Ct),D(_e,e),e&&s(ea),e&&s(we),e&&s(aa),D(Ne,e),e&&s(na),D(ms,e),e&&s(Js),e&&s(oe),e&&s(pa),e&&s(Be),e&&s(ca),D(ss,e),e&&s(ts),D(ws,e),e&&s(Lt),e&&s(Ve),e&&s(It),D(ue,e),e&&s(Ks),D(De,e),e&&s(da),e&&s(as),e&&s(fa),D(bs,e),e&&s(Ys),D(ie,e),e&&s(_a),e&&s(ns),e&&s(ua),e&&s(Re),e&&s(ma),D(Qe,e),e&&s(ha),e&&s(Zs),e&&s(et),e&&s(je),e&&s(st),D(gs,e),e&&s($a),e&&s(me),e&&s(Nt),D(Ce,e),e&&s(Ht),D(K,e),e&&s(ga),e&&s(ls),e&&s(xa),D(Ge,e),e&&s(ja),e&&s(lt),e&&s(va),D(vs,e),e&&s(rt),D(ks,e),e&&s(ka),e&&s(rs),e&&s(qa),e&&s(Te),e&&s(Qt),e&&s(se),e&&s(is),e&&s(ot),e&&s(Gt),e&&s(_),e&&s(Ds),D(pt,e),e&&s(jn),D(ke,e),e&&s(vn),e&&s(We),e&&s(Cs),e&&s(Ue),e&&s(kn),D(Fe,e),e&&s(qn),D(dt,e),e&&s(En),e&&s(Je),e&&s(yn),D(qe,e),e&&s(Dn),D(ft,e),e&&s(Cn),e&&s(sr),e&&s(Bo),D(Tn,e),e&&s(Fo),D(An,e),e&&s(Lo),e&&s(tr),e&&s(Io),e&&s(ar),e&&s(zo),e&&s(Oa),e&&s(No),e&&s(ut),e&&s(Ho),e&&s(Ma),e&&s(Vo),D(Sn,e),e&&s(Ro),D(On,e),e&&s(Qo),e&&s(Ba),e&&s(Go),D(Mn,e),e&&s(Wo),D(Bn,e),e&&s(Uo),e&&s(Fa),e&&s(Jo),D(Fn,e),e&&s(Xo),D(Ln,e),e&&s(Ko),e&&s(nr),e&&s(Yo),D(La,e),e&&s(Zo),e&&s(lr),e&&s(ei),D(In,e),e&&s(si),e&&s(rr),e&&s(ti),e&&s(mt),e&&s(ai),D(zn,e),e&&s(ni),D(Nn,e),e&&s(li),e&&s(or),e&&s(ri),e&&s(Hn),e&&s(oi),e&&s(ir),e&&s(ii),e&&s(ht),e&&s(pi),D(Vn,e),e&&s(ci),e&&s(pr),e&&s(di),D(Rn,e),e&&s(fi),D(Qn,e),e&&s(_i),e&&s(cr),e&&s(ui),bl[Ts].d(e),e&&s(dr),e&&s(Gn),e&&s(mi),gl[Ps].d(e),e&&s(fr),e&&s(Ia),e&&s(hi),e&&s(ds),e&&s($i),e&&s(Le),e&&s(gi),e&&s(za),e&&s(xi),D(Jn,e),e&&s(ji),e&&s(_r),e&&s(vi),D(Xn,e),e&&s(ki),e&&s(Na),e&&s(qi),xl[Os].d(e),e&&s(ur),e&&s(Ie),e&&s(Ei),D(Kn,e),e&&s(yi),e&&s(mr),e&&s(Di),e&&s($t),e&&s(Ci),e&&s(hr),e&&s(Ti),D(Zn,e),e&&s(Ai),e&&s($r),e&&s(Pi),D(el,e),e&&s(Si),e&&s(wr),e&&s(Oi),D(sl,e),e&&s(Mi),e&&s(br),e&&s(Bi),D(tl,e),e&&s(Fi),D(al,e),e&&s(Li),e&&s(gr),e&&s(Ii),D(nl,e),e&&s(zi),D(ll,e),e&&s(Ni),e&&s(rl),e&&s(Hi),Kt.d(e),e&&s(xr),D(il,e),e&&s(Vi),e&&s(jr),e&&s(Ri),D(pl,e),e&&s(Qi),D(cl,e),e&&s(Gi),e&&s(vr),e&&s(Wi),e&&s(dl),e&&s(Ui),jl[Bs].d(e),e&&s(kr),e&&s(qr),e&&s(Ji),e&&s(Er),e&&s(Xi),D(fl,e),e&&s(Ki),e&&s(yr),e&&s(Yi),D(_l,e),e&&s(Zi),vl[Ls].d(e),e&&s(Dr),e&&s(Ha),e&&s(ep),e&&s(zs),e&&s(sp),kl[Ns].d(e),e&&s(Cr),e&&s(Tr),e&&s(tp),ql[Vs].d(e),e&&s(Ar),D(ul,e),e&&s(ap),e&&s(Pr),e&&s(np),pe&&pe.d(e),e&&s(Sr),e&&s(Or),e&&s(lp),D(Va,e),e&&s(rp),ce&&ce.d(e),e&&s(Mr),e&&s(ml),e&&s(op),e&&s(Ra),e&&s(ip),D(hl,e),e&&s(pp),D($l,e),e&&s(cp),e&&s(Br)}}}const Ku={local:"",sections:[{local:"",sections:[{local:"squad",title:"SQuAD \u30C7\u30FC\u30BF\u30BB\u30C3\u30C8"},{local:"",title:"\u5B66\u7FD2\u30C7\u30FC\u30BF\u306E\u51E6\u7406"},{local:"",title:"\u691C\u8A3C\u30BB\u30C3\u30C8\u306E\u51E6\u7406"}],title:"\u30C7\u30FC\u30BF\u306E\u6E96\u5099"},{local:"trainer-api",title:"Trainer API \u3067\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3046"},{local:"keras",sections:[{local:"",title:"\u5F8C\u51E6\u7406"},{local:"",title:"\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574"}],title:"Keras\u3092\u4F7F\u3063\u3066\u30E2\u30C7\u30EB\u306E\u5FAE\u8ABF\u6574\u3092\u884C\u3046"},{local:"",sections:[{local:"",title:"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u306E\u305F\u3081\u306E\u3059\u3079\u3066\u3092\u6E96\u5099\u3059\u308B"}],title:"\u30AB\u30B9\u30BF\u30E0\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"},{local:"",title:"\u30C8\u30EC\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30D7"},{local:"",title:"\u5FAE\u8ABF\u6574\u3057\u305F\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3059\u308B"}],title:"\u8CEA\u554F\u5FDC\u7B54"};function Yu(V,c,$){let u="pt";return Eu(()=>{const h=new URLSearchParams(window.location.search);$(0,u=h.get("fw")||"pt")}),[u]}class rm extends gu{constructor(c){super();xu(this,c,Yu,Xu,ju,{})}}export{rm as default,Ku as metadata};
