import{S as or,i as nr,s as ar,e as a,k as $,w as A,t as H,l as er,M as ir,c as i,d as t,m,x as z,a as p,h as N,b as s,G as r,g as u,y as b,o as v,p as tr,q as _,B as T,v as sr,n as rr}from"../../chunks/vendor-hf-doc-builder.js";import{I as C}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as Tt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{Q as j}from"../../chunks/Question-hf-doc-builder.js";import{F as lr}from"../../chunks/FrameworkSwitchCourse-hf-doc-builder.js";function pr(B){let f,h,k,d,S,y,q,g,c,E;return d=new C({}),c=new j({props:{choices:[{text:"\u6839\u636E\u60A8\u7684\u6570\u636E\u81EA\u52A8\u8FDB\u884C\u8BAD\u7EC3\u7684\u6A21\u578B",explain:"\u9519\u8BEF\u3002\u60A8\u53EF\u80FD\u628ATFAutoModel\u4E0E\u6211\u4EEC\u7684<a href='https://huggingface.co/autonlp'>AutoNLP</a> \u4EA7\u54C1\u76F8\u6DF7\u6DC6\u4E86\uFF1F"},{text:"\u4E00\u4E2A\u6839\u636ECheckpoint(\u68C0\u67E5\u70B9)\u8FD4\u56DE\u6A21\u578B\u4F53\u7CFB\u7ED3\u6784\u7684\u5BF9\u8C61",explain:"\u786E\u5207\u5730\u8BF4: <code>TFAutoModel</code>\u53EA\u9700\u8981\u77E5\u9053\u521D\u59CB\u5316\u7684Checkpoint(\u68C0\u67E5\u70B9)\u5C31\u53EF\u4EE5\u8FD4\u56DE\u6B63\u786E\u7684\u4F53\u7CFB\u7ED3\u6784\u3002",correct:!0},{text:"\u4E00\u79CD\u53EF\u4EE5\u81EA\u52A8\u68C0\u6D4B\u8F93\u5165\u8BED\u8A00\u6765\u52A0\u8F7D\u6B63\u786E\u6743\u91CD\u7684\u6A21\u578B",explain:"\u4E0D\u6B63\u786E; \u867D\u7136\u6709\u4E9BCheckpoint(\u68C0\u67E5\u70B9)\u548C\u6A21\u578B\u80FD\u591F\u5904\u7406\u591A\u79CD\u8BED\u8A00\uFF0C\u4F46\u662F\u6CA1\u6709\u5185\u7F6E\u7684\u5DE5\u5177\u53EF\u4EE5\u6839\u636E\u8BED\u8A00\u81EA\u52A8\u9009\u62E9Checkpoint(\u68C0\u67E5\u70B9)\u3002\u60A8\u5E94\u8BE5\u524D\u5F80 <a href='https://huggingface.co/models'>Model Hub</a> \u5BFB\u627E\u5B8C\u6210\u6240\u9700\u4EFB\u52A1\u7684\u6700\u4F73Checkpoint(\u68C0\u67E5\u70B9)\uFF01"}]}}),{c(){f=a("h3"),h=a("a"),k=a("span"),A(d.$$.fragment),S=$(),y=a("span"),q=H("5.\u4EC0\u4E48\u662F TFAutoModel\uFF1F"),g=$(),A(c.$$.fragment),this.h()},l(n){f=i(n,"H3",{class:!0});var w=p(f);h=i(w,"A",{id:!0,class:!0,href:!0});var o=p(h);k=i(o,"SPAN",{});var x=p(k);z(d.$$.fragment,x),x.forEach(t),o.forEach(t),S=m(w),y=i(w,"SPAN",{});var P=p(y);q=N(P,"5.\u4EC0\u4E48\u662F TFAutoModel\uFF1F"),P.forEach(t),w.forEach(t),g=m(n),z(c.$$.fragment,n),this.h()},h(){s(h,"id","5.\u4EC0\u4E48\u662F-tfautomodel\uFF1F"),s(h,"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"),s(h,"href","#5.\u4EC0\u4E48\u662F-tfautomodel\uFF1F"),s(f,"class","relative group")},m(n,w){u(n,f,w),r(f,h),r(h,k),b(d,k,null),r(f,S),r(f,y),r(y,q),u(n,g,w),b(c,n,w),E=!0},i(n){E||(_(d.$$.fragment,n),_(c.$$.fragment,n),E=!0)},o(n){v(d.$$.fragment,n),v(c.$$.fragment,n),E=!1},d(n){n&&t(f),T(d),n&&t(g),T(c,n)}}}function fr(B){let f,h,k,d,S,y,q,g,c,E;return d=new C({}),c=new j({props:{choices:[{text:"\u6839\u636E\u60A8\u7684\u6570\u636E\u81EA\u52A8\u8FDB\u884C\u8BAD\u7EC3\u7684\u6A21\u578B",explain:"\u9519\u8BEF\u3002\u60A8\u53EF\u80FD\u628AAutoModel\u4E0E\u6211\u4EEC\u7684<a href='https://huggingface.co/autonlp'>AutoNLP</a> \u4EA7\u54C1\u76F8\u6DF7\u6DC6\u4E86\uFF1F"},{text:"\u4E00\u4E2A\u6839\u636ECheckpoint(\u68C0\u67E5\u70B9)\u8FD4\u56DE\u6A21\u578B\u4F53\u7CFB\u7ED3\u6784\u7684\u5BF9\u8C61",explain:"\u786E\u5207\u5730\u8BF4: <code>AutoModel</code>\u53EA\u9700\u8981\u77E5\u9053\u521D\u59CB\u5316\u7684Checkpoint(\u68C0\u67E5\u70B9)\u5C31\u53EF\u4EE5\u8FD4\u56DE\u6B63\u786E\u7684\u4F53\u7CFB\u7ED3\u6784\u3002",correct:!0},{text:"\u4E00\u79CD\u53EF\u4EE5\u81EA\u52A8\u68C0\u6D4B\u8F93\u5165\u8BED\u8A00\u6765\u52A0\u8F7D\u6B63\u786E\u6743\u91CD\u7684\u6A21\u578B",explain:"\u4E0D\u6B63\u786E; \u867D\u7136\u6709\u4E9BCheckpoint(\u68C0\u67E5\u70B9)\u548C\u6A21\u578B\u80FD\u591F\u5904\u7406\u591A\u79CD\u8BED\u8A00\uFF0C\u4F46\u662F\u6CA1\u6709\u5185\u7F6E\u7684\u5DE5\u5177\u53EF\u4EE5\u6839\u636E\u8BED\u8A00\u81EA\u52A8\u9009\u62E9Checkpoint(\u68C0\u67E5\u70B9)\u3002\u60A8\u5E94\u8BE5\u524D\u5F80 <a href='https://huggingface.co/models'>Model Hub</a> \u5BFB\u627E\u5B8C\u6210\u6240\u9700\u4EFB\u52A1\u7684\u6700\u4F73Checkpoint(\u68C0\u67E5\u70B9)\uFF01"}]}}),{c(){f=a("h3"),h=a("a"),k=a("span"),A(d.$$.fragment),S=$(),y=a("span"),q=H("5.\u4EC0\u4E48\u662FAutoModel\uFF1F"),g=$(),A(c.$$.fragment),this.h()},l(n){f=i(n,"H3",{class:!0});var w=p(f);h=i(w,"A",{id:!0,class:!0,href:!0});var o=p(h);k=i(o,"SPAN",{});var x=p(k);z(d.$$.fragment,x),x.forEach(t),o.forEach(t),S=m(w),y=i(w,"SPAN",{});var P=p(y);q=N(P,"5.\u4EC0\u4E48\u662FAutoModel\uFF1F"),P.forEach(t),w.forEach(t),g=m(n),z(c.$$.fragment,n),this.h()},h(){s(h,"id","5.\u4EC0\u4E48\u662Fautomodel\uFF1F"),s(h,"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"),s(h,"href","#5.\u4EC0\u4E48\u662Fautomodel\uFF1F"),s(f,"class","relative group")},m(n,w){u(n,f,w),r(f,h),r(h,k),b(d,k,null),r(f,S),r(f,y),r(y,q),u(n,g,w),b(c,n,w),E=!0},i(n){E||(_(d.$$.fragment,n),_(c.$$.fragment,n),E=!0)},o(n){v(d.$$.fragment,n),v(c.$$.fragment,n),E=!1},d(n){n&&t(f),T(d),n&&t(g),T(c,n)}}}function hr(B){let f,h,k,d,S,y,q,g,c,E,n,w;return d=new C({}),c=new Tt({props:{code:`from transformers import AutoTokenizer, TFAutoModel

tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
model = TFAutoModel.from_pretrained("gpt2")

encoded = tokenizer("Hey!", return_tensors="pt")
result = model(**encoded)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAutoModel

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
model = TFAutoModel.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)

encoded = tokenizer(<span class="hljs-string">&quot;Hey!&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
result = model(**encoded)`}}),n=new j({props:{choices:[{text:"\u4E0D\uFF0C\u770B\u8D77\u6765\u662F\u5BF9\u7684\u3002",explain:"\u4E0D\u5E78\u7684\u662F\uFF0C\u5C06\u4E00\u4E2A\u6A21\u578B\u4E0E\u4E00\u4E2A\u7528\u4E0D\u540CCheckpoint(\u68C0\u67E5\u70B9)\u8BAD\u7EC3\u7684Tokenizer(\u6807\u8BB0\u5668)\u8026\u5408\u5728\u5E76\u4E0D\u662F\u4E00\u4E2A\u597D\u4E3B\u610F\u3002\u6A21\u578B\u6CA1\u6709\u5728\u8FD9\u4E2A\u8FD9\u4E2ATokenizer(\u6807\u8BB0\u5668)\u4E0A\u8BAD\u7EC3\u6765\u7406\u89E3Tokenizer(\u6807\u8BB0\u5668)\u7684\u8F93\u51FA\uFF0C\u56E0\u6B64\u6A21\u578B\u8F93\u51FA(\u5982\u679C\u5B83\u53EF\u4EE5\u8FD0\u884C\u7684\u8BDD)\u4E0D\u4F1A\u6709\u4EFB\u4F55\u610F\u4E49\u3002"},{text:"Tokenizer(\u6807\u8BB0\u5668)\u548C\u6A21\u578B\u5E94\u8BE5\u6765\u81EA\u76F8\u540C\u7684Checkpoint(\u68C0\u67E5\u70B9)\u3002",explain:"\u5BF9\uFF01",correct:!0},{text:"\u7531\u4E8E\u6BCF\u4E2A\u8F93\u5165\u90FD\u662F\u4E00\u4E2ABatch\uFF0C\u56E0\u6B64\u53EF\u4EE5\u4F7F\u7528\u6807\u8BB0\u5668(Tokenizer)\u5BF9\u5176\u8FDB\u884C\u5E73\u79FB\u548C\u622A\u65AD\u6765\u6539\u5584\u8FD9\u6BB5\u4EE3\u7801\u3002",explain:"\u7684\u786E\uFF0C\u6BCF\u4E2A\u6A21\u578B\u90FD\u9700\u8981Batch\u7C7B\u578B\u7684\u8F93\u5165\u3002\u7136\u800C\uFF0C\u622A\u65AD\u6216\u586B\u5145\u8FD9\u4E2A\u5E8F\u5217\u5E76\u4E0D\u4E00\u5B9A\u6709\u610F\u4E49\uFF0C\u8FD9\u91CC\u53EA\u6709\u4E00\u53E5\u8BDD\uFF0C\u800C\u8FD9\u4E9B\u6280\u672F\u662F\u7528\u6765\u6279\u5904\u7406\u4E00\u4E2A\u53E5\u5B50\u5217\u8868\u7684\u3002"}]}}),{c(){f=a("h3"),h=a("a"),k=a("span"),A(d.$$.fragment),S=$(),y=a("span"),q=H("10.\u4E0B\u9762\u7684\u4EE3\u7801\u6709\u4EC0\u4E48\u9519\u8BEF\u5417\uFF1F"),g=$(),A(c.$$.fragment),E=$(),A(n.$$.fragment),this.h()},l(o){f=i(o,"H3",{class:!0});var x=p(f);h=i(x,"A",{id:!0,class:!0,href:!0});var P=p(h);k=i(P,"SPAN",{});var M=p(k);z(d.$$.fragment,M),M.forEach(t),P.forEach(t),S=m(x),y=i(x,"SPAN",{});var O=p(y);q=N(O,"10.\u4E0B\u9762\u7684\u4EE3\u7801\u6709\u4EC0\u4E48\u9519\u8BEF\u5417\uFF1F"),O.forEach(t),x.forEach(t),g=m(o),z(c.$$.fragment,o),E=m(o),z(n.$$.fragment,o),this.h()},h(){s(h,"id","10.\u4E0B\u9762\u7684\u4EE3\u7801\u6709\u4EC0\u4E48\u9519\u8BEF\u5417\uFF1F"),s(h,"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"),s(h,"href","#10.\u4E0B\u9762\u7684\u4EE3\u7801\u6709\u4EC0\u4E48\u9519\u8BEF\u5417\uFF1F"),s(f,"class","relative group")},m(o,x){u(o,f,x),r(f,h),r(h,k),b(d,k,null),r(f,S),r(f,y),r(y,q),u(o,g,x),b(c,o,x),u(o,E,x),b(n,o,x),w=!0},i(o){w||(_(d.$$.fragment,o),_(c.$$.fragment,o),_(n.$$.fragment,o),w=!0)},o(o){v(d.$$.fragment,o),v(c.$$.fragment,o),v(n.$$.fragment,o),w=!1},d(o){o&&t(f),T(d),o&&t(g),T(c,o),o&&t(E),T(n,o)}}}function ur(B){let f,h,k,d,S,y,q,g,c,E,n,w;return d=new C({}),c=new Tt({props:{code:`from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
model = AutoModel.from_pretrained("gpt2")

encoded = tokenizer("Hey!", return_tensors="pt")
result = model(**encoded)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
model = AutoModel.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)

encoded = tokenizer(<span class="hljs-string">&quot;Hey!&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
result = model(**encoded)`}}),n=new j({props:{choices:[{text:"\u4E0D\uFF0C\u770B\u8D77\u6765\u662F\u5BF9\u7684\u3002",explain:"\u4E0D\u5E78\u7684\u662F\uFF0C\u5C06\u4E00\u4E2A\u6A21\u578B\u4E0E\u4E00\u4E2A\u7528\u4E0D\u540CCheckpoint(\u68C0\u67E5\u70B9)\u8BAD\u7EC3\u7684Tokenizer(\u6807\u8BB0\u5668)\u8026\u5408\u5728\u5E76\u4E0D\u662F\u4E00\u4E2A\u597D\u4E3B\u610F\u3002\u6A21\u578B\u6CA1\u6709\u5728\u8FD9\u4E2A\u8FD9\u4E2ATokenizer(\u6807\u8BB0\u5668)\u4E0A\u8BAD\u7EC3\u6765\u7406\u89E3Tokenizer(\u6807\u8BB0\u5668)\u7684\u8F93\u51FA\uFF0C\u56E0\u6B64\u6A21\u578B\u8F93\u51FA(\u5982\u679C\u5B83\u53EF\u4EE5\u8FD0\u884C\u7684\u8BDD)\u4E0D\u4F1A\u6709\u4EFB\u4F55\u610F\u4E49\u3002"},{text:"Tokenizer(\u6807\u8BB0\u5668)\u548C\u6A21\u578B\u5E94\u8BE5\u6765\u81EA\u76F8\u540C\u7684Checkpoint(\u68C0\u67E5\u70B9)\u3002",explain:"\u5BF9\uFF01",correct:!0},{text:"\u7531\u4E8E\u6BCF\u4E2A\u8F93\u5165\u90FD\u662F\u4E00\u4E2ABatch\uFF0C\u56E0\u6B64\u53EF\u4EE5\u4F7F\u7528\u6807\u8BB0\u5668(Tokenizer)\u5BF9\u5176\u8FDB\u884C\u5E73\u79FB\u548C\u622A\u65AD\u6765\u6539\u5584\u8FD9\u6BB5\u4EE3\u7801\u3002",explain:"\u7684\u786E\uFF0C\u6BCF\u4E2A\u6A21\u578B\u90FD\u9700\u8981Batch\u7C7B\u578B\u7684\u8F93\u5165\u3002\u7136\u800C\uFF0C\u622A\u65AD\u6216\u586B\u5145\u8FD9\u4E2A\u5E8F\u5217\u5E76\u4E0D\u4E00\u5B9A\u6709\u610F\u4E49\uFF0C\u8FD9\u91CC\u53EA\u6709\u4E00\u53E5\u8BDD\uFF0C\u800C\u8FD9\u4E9B\u6280\u672F\u662F\u7528\u6765\u6279\u5904\u7406\u4E00\u4E2A\u53E5\u5B50\u5217\u8868\u7684\u3002"}]}}),{c(){f=a("h3"),h=a("a"),k=a("span"),A(d.$$.fragment),S=$(),y=a("span"),q=H("10.\u4E0B\u9762\u7684\u4EE3\u7801\u6709\u4EC0\u4E48\u9519\u8BEF\u5417\uFF1F"),g=$(),A(c.$$.fragment),E=$(),A(n.$$.fragment),this.h()},l(o){f=i(o,"H3",{class:!0});var x=p(f);h=i(x,"A",{id:!0,class:!0,href:!0});var P=p(h);k=i(P,"SPAN",{});var M=p(k);z(d.$$.fragment,M),M.forEach(t),P.forEach(t),S=m(x),y=i(x,"SPAN",{});var O=p(y);q=N(O,"10.\u4E0B\u9762\u7684\u4EE3\u7801\u6709\u4EC0\u4E48\u9519\u8BEF\u5417\uFF1F"),O.forEach(t),x.forEach(t),g=m(o),z(c.$$.fragment,o),E=m(o),z(n.$$.fragment,o),this.h()},h(){s(h,"id","10.\u4E0B\u9762\u7684\u4EE3\u7801\u6709\u4EC0\u4E48\u9519\u8BEF\u5417\uFF1F"),s(h,"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"),s(h,"href","#10.\u4E0B\u9762\u7684\u4EE3\u7801\u6709\u4EC0\u4E48\u9519\u8BEF\u5417\uFF1F"),s(f,"class","relative group")},m(o,x){u(o,f,x),r(f,h),r(h,k),b(d,k,null),r(f,S),r(f,y),r(y,q),u(o,g,x),b(c,o,x),u(o,E,x),b(n,o,x),w=!0},i(o){w||(_(d.$$.fragment,o),_(c.$$.fragment,o),_(n.$$.fragment,o),w=!0)},o(o){v(d.$$.fragment,o),v(c.$$.fragment,o),v(n.$$.fragment,o),w=!1},d(o){o&&t(f),T(d),o&&t(g),T(c,o),o&&t(E),T(n,o)}}}function cr(B){let f,h,k,d,S,y,q,g,c,E,n,w,o,x,P,M,O,Q,V,be,ne,ft,Te,ht,Le,ae,De,U,X,ye,ie,ut,Ee,ct,Oe,se,Qe,G,Y,Se,le,$t,qe,mt,Ue,pe,Ge,F,I,ge,J,Z,Pe,fe,dt,He,kt,Je,he,Re,R,ee,Ne,ue,vt,Me,_t,We,ce,Ke,W,te,Ce,$e,wt,je,xt,Ve,me,Xe,K,re,Be,de,gt,ke,At,Fe,zt,bt,Ye,ve,Ze,_e,et,L,D,Ae,tt;k=new lr({props:{fw:B[0]}}),n=new C({}),M=new j({props:{choices:[{text:"\u9996\u5148\u662F\u6A21\u578B\u5B83\u5904\u7406\u6587\u672C\u5E76\u8FD4\u56DE\u539F\u59CB\u9884\u6D4B\u3002\u7136\u540E\uFF0C\u5206\u8BCD\u5668\u4F1A\u5BF9\u8FD9\u4E9B\u9884\u6D4B\u8FDB\u884C\u89E3\u91CA\uFF0C\u5E76\u5728\u9700\u8981\u65F6\u5C06\u5B83\u4EEC\u8F6C\u6362\u56DE\u6587\u672C",explain:"\u6A21\u578B\u4E0D\u80FD\u7406\u89E3\u6587\u672C\uFF01\u5FC5\u987B\u9996\u5148\u4F7F\u7528\u6807\u8BB0\u5668(Tokenizer)\u5C06\u6587\u672C\u8F6C\u6362\u4E3Aid\uFF0C\u4E4B\u540E\u624D\u53EF\u4EE5\u8F93\u5165\u7ED9\u6A21\u578B\u3002"},{text:"\u9996\u5148\u662F \u6807\u8BB0\u5668(Tokenizer)\uFF0C\u5B83\u5904\u7406\u6587\u672C\u5E76\u8FD4\u56DEid\u3002\u6A21\u578B\u6839\u636E\u8FD9\u4E9B id \u5E76\u8F93\u51FA\u9884\u6D4B\uFF0C\u53EF\u4EE5\u662F\u4E00\u4E9B\u6587\u672C\u3002",explain:"\u8BE5\u6A21\u578B\u7684\u9884\u6D4B\u7ED3\u679C\u662Fid\u800C\u4E0D\u662F\u6587\u672C\u3002\u4E3A\u4E86\u5C06\u9884\u6D4B\u8F6C\u6362\u56DE\u6587\u672C\uFF0C\u5FC5\u987B\u4F7F\u7528\u6807\u8BB0\u5668(Tokenizer)\uFF01"},{text:"\u6807\u8BB0\u5668(Tokenizer) \u5904\u7406\u6587\u672C\u5E76\u8FD4\u56DE id\u3002\u6A21\u578B\u5904\u7406\u8FD9\u4E9B id \u5E76\u8F93\u51FA\u4E00\u4E2A\u9884\u6D4B\u3002\u7136\u540E\u53EF\u4EE5\u518D\u6B21\u4F7F\u7528 \u6807\u8BB0\u5668(Tokenizer) \u5C06\u8FD9\u4E9B\u9884\u6D4B\u8F6C\u6362\u56DE\u67D0\u4E9B\u6587\u672C\u3002",explain:"\u6B63\u786E! \u6807\u8BB0\u5668(Tokenizer)\u53EF\u4EE5\u7528\u4E8Eid\u4E0E\u6587\u672C\u7684\u76F8\u4E92\u8F6C\u6362\u3002",correct:!0}]}}),ne=new C({}),ae=new j({props:{choices:[{text:"2\u4E2A\u7EF4\u5EA6\uFF0C\u5206\u522B\u662F: \u5E8F\u5217\u957F\u5EA6(Sequence Length)\u548C\u6279\u6B21\u5927\u5C0F(Batch Size)",explain:"\u9519! \u8BE5\u6A21\u578B\u7684\u5F20\u91CF\u8F93\u51FA\u8FD8\u5177\u6709\u7B2C\u4E09\u4E2A\u7EF4\u5EA6: \u9690\u85CF\u5C42\u5927\u5C0F(Hidden Size)\u3002"},{text:"2\u4E2A\u7EF4\u5EA6\uFF0C\u5206\u522B\u662F: \u5E8F\u5217\u957F\u5EA6(Sequence Length)\u548C\u9690\u85CF\u5C42\u5927\u5C0F(Hidden Size)",explain:"\u9519! \u6240\u6709Transformer\u6A21\u578B\u90FD\u6279\u91CF\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5373\u4F7F\u662F\u5355\u4E2A\u5E8F\u5217; \u90A3\u4E48\u6279\u6B21\u5927\u5C0F(Batch Size)\u4E3A1\uFF01"},{text:"3\u4E2A\u7EF4\u5EA6\uFF0C\u5206\u522B\u662F: \u5E8F\u5217\u957F\u5EA6(Sequence Length)\u3001\u6279\u6B21\u5927\u5C0F(Batch Size)\u548C\u9690\u85CF\u5C42\u5927\u5C0F(Hidden Size)",explain:"\u6B63\u786E\uFF01",correct:!0}]}}),ie=new C({}),se=new j({props:{choices:[{text:"WordPiece",explain:"\u662F\u7684\uFF0C\u8FD9\u662F\u4E00\u4E2ASubword \u6807\u8BB0\u5316(Tokenization)\u7684\u4F8B\u5B50\uFF01",correct:!0},{text:"\u57FA\u4E8E\u5355\u4E2A\u5B57\u7B26\u7684\u6807\u8BB0(Tokenization)",explain:"\u57FA\u4E8E\u5B57\u7B26\u7684\u6807\u8BB0(Tokenization)\u4E0D\u662F\u4E00\u79CDSubword \u6807\u8BB0\u5316(Tokenization)\u3002"},{text:"\u57FA\u4E8E\u7A7A\u683C\u548C\u6807\u70B9\u7B26\u53F7\u7684\u5206\u5272",explain:"\u8FD9\u662F\u4E00\u79CD\u57FA\u4E8E\u5355\u8BCD\u6807\u8BB0\u5316(Tokenization)\uFF01"},{text:"BPE(Byte Pair Encoding)",explain:"\u662F\u7684\uFF0C\u8FD9\u662F\u4E00\u4E2ASubword \u6807\u8BB0\u5316(Tokenization)\u7684\u4F8B\u5B50\uFF01",correct:!0},{text:"Unigram",explain:"\u662F\u7684\uFF0C\u8FD9\u662F\u4E00\u4E2ASubword \u6807\u8BB0\u5316(Tokenization)\u7684\u4F8B\u5B50\uFF01",correct:!0},{text:"\u4EE5\u4E0A\u90FD\u4E0D\u662F",explain:"\u4E0D\u5BF9\uFF01"}]}}),le=new C({}),pe=new j({props:{choices:[{text:"\u539F\u59CBTransformer\u7F51\u7EDC\u7684\u4E00\u79CD\u7EC4\u4EF6\uFF0C\u5C06\u5F20\u91CF(Tensors)\u91CD\u5B9A\u5411\u5230\u5B83\u4EEC\u7684\u6B63\u786E\u5C42",explain:"\u4E0D\u5BF9! \u6CA1\u6709\u8FD9\u6837\u7684\u7EC4\u4EF6\u3002"},{text:"\u4E5F\u79F0\u4E3A\u81EA\u6CE8\u610F\u529B(self-attention)\u673A\u5236\uFF0C\u5B83\u6839\u636E\u5E8F\u5217\u4E2D\u7684\u5176\u4ED6\u6807\u8BB0(Token)\u6765\u8C03\u6574\u4E00\u4E2A\u6807\u8BB0(Token)",explain:"\u4E0D\u5BF9\uFF01 \u81EA\u6CE8\u610F\u529B\u5C42\u786E\u5B9E\u5305\u542B\u6CE8\u610F\u529B\u201CHead\u201D\u5C42\uFF0C\u4F46\u8FD9\u4E9B\u4E0D\u662F\u6A21\u578B\u7684head\u5C42\u3002"},{text:"\u4E00\u4E2A\u9644\u52A0\u7EC4\u4EF6\uFF0C\u901A\u5E38\u7531\u4E00\u4E2A\u6216\u51E0\u4E2A\u5C42\u7EC4\u6210\uFF0C\u7528\u4E8E\u5C06Transformer\u7684\u9884\u6D4B\u8F6C\u6362\u4E3A\u7279\u5B9A\u4E8E\u4EFB\u52A1\u7684\u8F93\u51FA",explain:"\u6CA1\u9519\u3002\u5B83\u7684\u5168\u540D\u662FAdaptation Heads\uFF0C\u4E5F\u88AB\u7B80\u5355\u5730\u79F0\u4E3A\u6A21\u578B\u7684\u5934\u90E8\uFF0C\u5728\u4E0D\u540C\u7684\u4EFB\u52A1\u4E0A\u6709\u4E0D\u540C\u7684\u5F62\u5F0F: \u8BED\u8A00\u6A21\u578BHeads\uFF0C\u95EE\u9898\u56DE\u7B54Heads\uFF0C\u5E8F\u5217\u5206\u7C7BHeads..\u3002",correct:!0}]}});const yt=[fr,pr],we=[];function Et(e,l){return e[0]==="pt"?0:1}F=Et(B),I=we[F]=yt[F](B),fe=new C({}),he=new j({props:{choices:[{text:"\u622A\u77ED",explain:"\u662F\u7684\uFF0C\u622A\u65AD\u662F\u4E00\u4E2A\u6B63\u786E\u7684\u65B9\u5F0F\uFF0C\u53EF\u4EE5\u5C06\u4ED6\u4EEC\u8F6C\u5316\u4E3A\u4E00\u4E2A\u56FA\u5B9A\u957F\u5EA6\u7684\u77E9\u5F62\u5E8F\u5217\u3002\u8FD9\u662F\u552F\u4E00\u7684\u4E00\u4E2A\u7B54\u6848\u5417\uFF1F",correct:!0},{text:"\u8FD4\u56DETensors",explain:"\u867D\u7136\u5176\u4ED6\u6280\u672F\u5141\u8BB8\u8FD4\u56DE\u77E9\u5F62\u5F20\u91CF\uFF0C\u4F46\u5728\u6279\u5904\u7406\u5E8F\u5217\u65F6\u4E0D\u53EF\u4EE5\u76F4\u63A5\u8FD4\u56DE\u957F\u5EA6\u4E0D\u4E00\u81F4\u7684Tensors\u3002(\u5E8F\u5217\u5FC5\u987B\u662F\u56FA\u5B9A\u957F\u5EA6)"},{text:"\u586B\u5145",explain:"\u662F\u7684\uFF0C\u586B\u5145\u662F\u4E00\u4E2A\u6B63\u786E\u7684\u65B9\u5F0F\uFF0C\u53EF\u4EE5\u5C06\u4ED6\u4EEC\u8F6C\u5316\u4E3A\u4E00\u4E2A\u56FA\u5B9A\u957F\u5EA6\u7684\u77E9\u5F62\u5E8F\u5217\u3002\u8FD9\u662F\u552F\u4E00\u7684\u4E00\u4E2A\u7B54\u6848\u5417\uFF1F",correct:!0},{text:"\u6CE8\u610F\u529B\u906E\u853D(Attention masking)",explain:"\u5F53\u7136\uFF01\u5F53\u5904\u7406\u4E0D\u540C\u957F\u5EA6\u7684\u5E8F\u5217\u65F6\uFF0C\u6CE8\u610F\u529B\u906E\u853D\u662F\u6700\u91CD\u8981\u7684\u3002\u7136\u800C\uFF0C\u8FD9\u5E76\u4E0D\u662F\u552F\u4E00\u9700\u8981\u8FDB\u884C\u7684\u5904\u7406\u3002",correct:!0}]}}),ue=new C({}),ce=new j({props:{choices:[{text:"\u5B83\u8F6F\u5316\u4E86logits\u8F93\u51FA\uFF0C\u4F7F\u7ED3\u679C\u66F4\u53EF\u9760\u3002",explain:"\u4E0D\uFF0C SoftMax\u6FC0\u6D3B\u51FD\u6570\u4E0D\u4F1A\u5F71\u54CD\u7ED3\u679C\u7684\u53EF\u9760\u6027\u3002"},{text:"\u5B83\u9650\u5B9A\u4E86\u4E0A\u4E0B\u754C\uFF0C\u4F7F\u6A21\u578B\u7684\u8F93\u51FA\u7ED3\u679C\u53EF\u4EE5\u88AB\u89E3\u91CA\u3002",explain:"\u6B63\u786E\uFF01\u7ED3\u679C\u503C\u88AB\u538B\u7F29\u5230\u4E860\u548C1\u4E4B\u95F4\u3002\u4E0D\u8FC7\uFF0C\u8FD9\u5E76\u4E0D\u662F\u6211\u4EEC\u4F7F\u7528SoftMax\u6FC0\u6D3B\u51FD\u6570\u7684\u552F\u4E00\u539F\u56E0\u3002",correct:!0},{text:"\u8F93\u51FA\u7684\u548C\u662F1\uFF0C\u4ECE\u800C\u4EA7\u751F\u4E00\u4E2A\u53EF\u80FD\u7684\u6982\u7387\u89E3\u91CA\u3002",explain:"\u6CA1\u9519\uFF0C\u4F46\u8FD9\u5E76\u4E0D\u662F\u6211\u4EEC\u4F7F\u7528SoftMax\u6FC0\u6D3B\u51FD\u6570\u7684\u552F\u4E00\u539F\u56E0\u3002",correct:!0}]}}),$e=new C({}),me=new j({props:{choices:[{text:"<code>\u7F16\u7801</code> \uFF0C\u56E0\u4E3A\u5B83\u53EF\u4EE5\u5C06\u6587\u672C\u7F16\u7801\u4E3Aid\uFF0C\u5C06\u9884\u6D4B\u7684id\u89E3\u7801\u4E3A\u6587\u672C",explain:"\u9519! \u867D\u7136 <code>\u7F16\u7801</code> \u65B9\u6CD5\u786E\u5B9E\u5B58\u5728\u4E8E\u6807\u8BB0\u5668\u4E2D\uFF0C\u4F46\u662F\u5B83\u4E0D\u5B58\u5728\u4E8E\u6A21\u578B\u4E2D\u3002"},{text:"\u76F4\u63A5\u8C03\u7528\u6807\u8BB0\u5668(Tokenizer)\u5BF9\u8C61\u3002",explain:"\u5B8C\u5168\u6B63\u786E\uFF01\u6807\u8BB0\u5316\u5668(Tokenizer) \u7684 <code>__call__</code>\u65B9\u6CD5\u662F\u4E00\u4E2A\u975E\u5E38\u5F3A\u5927\u7684\u65B9\u6CD5\uFF0C\u53EF\u4EE5\u5904\u7406\u51E0\u4E4E\u4EFB\u4F55\u4E8B\u60C5\u3002\u5B83\u4E5F\u662F\u4ECE\u6A21\u578B\u4E2D\u83B7\u53D6\u9884\u6D4B\u7684\u65B9\u6CD5\u3002",correct:!0},{text:"<code>pad</code>(\u586B\u5145)",explain:"\u9519! <code>pad</code>(\u586B\u5145)\u975E\u5E38\u6709\u7528\uFF0C\u4F46\u5B83\u53EA\u662F\u6807\u8BB0\u5668(Tokenizer) API\u7684\u4E00\u90E8\u5206\u3002"},{text:"<code>tokenize</code>(\u6807\u8BB0)",explain:"\u53EF\u4EE5\u8BF4\uFF0C<code>tokenize</code>(\u6807\u8BB0)\u65B9\u6CD5\u662F\u6700\u6709\u7528\u7684\u65B9\u6CD5\u4E4B\u4E00\uFF0C\u4F46\u5B83\u4E0D\u662F\u6807\u8BB0\u5668(Tokenizer) API\u7684\u6838\u5FC3\u65B9\u6CD5\u3002"}]}}),de=new C({}),ve=new Tt({props:{code:`from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
result = tokenizer.tokenize("Hello!")`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
result = tokenizer.tokenize(<span class="hljs-string">&quot;Hello!&quot;</span>)`}}),_e=new j({props:{choices:[{text:"\u5B57\u7B26\u4E32\u5217\u8868\uFF0C\u6BCF\u4E2A\u5B57\u7B26\u4E32\u90FD\u662F\u4E00\u4E2A\u6807\u8BB0(Token)",explain:"\u6B63\u786E! \u628A\u8FD9\u4E2A\u8F6C\u6362\u6210id\u540E\uFF0C\u5C31\u53EF\u4EE5\u4F20\u8F93\u7ED9\u6A21\u578B\u4E86\uFF01",correct:!0},{text:"\u4E00\u4E2AID\u7684\u5217\u8868",explain:"\u4E0D\u6B63\u786E; \u8FD9\u5C31\u662F <code>__call__</code> \u6216 <code>convert_tokens_to_ids</code>\u65B9\u6CD5\u7684\u4F5C\u7528\uFF01"},{text:"\u5305\u542B\u6240\u6709\u6807\u8BB0(Token)\u7684\u5B57\u7B26\u4E32",explain:"\u8FD9\u5C06\u662F\u6B21\u4F18\u7684\uFF0C\u56E0\u4E3ATokenizer\u4F1A\u5C06\u5B57\u7B26\u4E32\u62C6\u5206\u4E3A\u591A\u4E2A\u6807\u8BB0\u7684\u5217\u8868\u3002"}]}});const St=[ur,hr],xe=[];function qt(e,l){return e[0]==="pt"?0:1}return L=qt(B),D=xe[L]=St[L](B),{c(){f=a("meta"),h=$(),A(k.$$.fragment),d=$(),S=a("h1"),y=H("\u7AE0\u672B\u5C0F\u6D4B\u8BD5"),q=$(),g=a("h3"),c=a("a"),E=a("span"),A(n.$$.fragment),w=$(),o=a("span"),x=H("1. \u8BED\u8A00\u5EFA\u6A21 Pipeline \u7684\u987A\u5E8F\u662F\u4EC0\u4E48\uFF1F"),P=$(),A(M.$$.fragment),O=$(),Q=a("h3"),V=a("a"),be=a("span"),A(ne.$$.fragment),ft=$(),Te=a("span"),ht=H("2. Transformer\u6A21\u578B\u7684\u8F93\u51FA\u6709\u591A\u5C11\u4E2A\u7EF4\u5EA6\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u522B\u662F\u4EC0\u4E48\uFF1F"),Le=$(),A(ae.$$.fragment),De=$(),U=a("h3"),X=a("a"),ye=a("span"),A(ie.$$.fragment),ut=$(),Ee=a("span"),ct=H("3.\u4E0B\u5217\u54EA\u4E00\u4E2A\u662FSubword\u6807\u8BB0(Tokenization)\u7684\u4F8B\u5B50\uFF08\u4ECE\u5206\u8BCD\u7684\u9897\u7C92\u5EA6\u6765\u5212\u5206\uFF09\uFF1F"),Oe=$(),A(se.$$.fragment),Qe=$(),G=a("h3"),Y=a("a"),Se=a("span"),A(le.$$.fragment),$t=$(),qe=a("span"),mt=H("4.\u4EC0\u4E48\u662F\u6A21\u578B\u7684Head\u5C42\uFF1F"),Ue=$(),A(pe.$$.fragment),Ge=$(),I.c(),ge=$(),J=a("h3"),Z=a("a"),Pe=a("span"),A(fe.$$.fragment),dt=$(),He=a("span"),kt=H("6.\u5F53\u5C06\u4E0D\u540C\u957F\u5EA6\u7684\u5E8F\u5217\u6279\u5904\u7406\u5728\u4E00\u8D77\u65F6\uFF0C\u9700\u8981\u8FDB\u884C\u54EA\u4E9B\u5904\u7406\uFF1F"),Je=$(),A(he.$$.fragment),Re=$(),R=a("h3"),ee=a("a"),Ne=a("span"),A(ue.$$.fragment),vt=$(),Me=a("span"),_t=H("7.\u5C06 SoftMax\u6FC0\u6D3B\u51FD\u6570\u5E94\u7528\u4E8E\u5E8F\u5217\u5206\u7C7B(Sequence Classification)\u6A21\u578B\u7684 logits \u8F93\u51FA\u6709\u4EC0\u4E48\u610F\u4E49\uFF1F"),We=$(),A(ce.$$.fragment),Ke=$(),W=a("h3"),te=a("a"),Ce=a("span"),A($e.$$.fragment),wt=$(),je=a("span"),xt=H("8.\u5927\u591A\u6570\u6807\u8BB0\u5668(Tokenizer)\u7684API\u4EE5\u4EC0\u4E48\u65B9\u6CD5\u4E3A\u6838\u5FC3\uFF1F"),Ve=$(),A(me.$$.fragment),Xe=$(),K=a("h3"),re=a("a"),Be=a("span"),A(de.$$.fragment),gt=$(),ke=a("span"),At=H("9.\u8FD9\u4E2A\u4EE3\u7801\u793A\u4F8B\u4E2D\u7684"),Fe=a("code"),zt=H("result"),bt=H("\u53D8\u91CF\u5305\u542B\u4EC0\u4E48\uFF1F"),Ye=$(),A(ve.$$.fragment),Ze=$(),A(_e.$$.fragment),et=$(),D.c(),Ae=er(),this.h()},l(e){const l=ir('[data-svelte="svelte-1phssyn"]',document.head);f=i(l,"META",{name:!0,content:!0}),l.forEach(t),h=m(e),z(k.$$.fragment,e),d=m(e),S=i(e,"H1",{id:!0});var Ie=p(S);y=N(Ie,"\u7AE0\u672B\u5C0F\u6D4B\u8BD5"),Ie.forEach(t),q=m(e),g=i(e,"H3",{class:!0});var oe=p(g);c=i(oe,"A",{id:!0,class:!0,href:!0});var ze=p(c);E=i(ze,"SPAN",{});var Pt=p(E);z(n.$$.fragment,Pt),Pt.forEach(t),ze.forEach(t),w=m(oe),o=i(oe,"SPAN",{});var Ht=p(o);x=N(Ht,"1. \u8BED\u8A00\u5EFA\u6A21 Pipeline \u7684\u987A\u5E8F\u662F\u4EC0\u4E48\uFF1F"),Ht.forEach(t),oe.forEach(t),P=m(e),z(M.$$.fragment,e),O=m(e),Q=i(e,"H3",{class:!0});var rt=p(Q);V=i(rt,"A",{id:!0,class:!0,href:!0});var Nt=p(V);be=i(Nt,"SPAN",{});var Mt=p(be);z(ne.$$.fragment,Mt),Mt.forEach(t),Nt.forEach(t),ft=m(rt),Te=i(rt,"SPAN",{});var Ct=p(Te);ht=N(Ct,"2. Transformer\u6A21\u578B\u7684\u8F93\u51FA\u6709\u591A\u5C11\u4E2A\u7EF4\u5EA6\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u522B\u662F\u4EC0\u4E48\uFF1F"),Ct.forEach(t),rt.forEach(t),Le=m(e),z(ae.$$.fragment,e),De=m(e),U=i(e,"H3",{class:!0});var ot=p(U);X=i(ot,"A",{id:!0,class:!0,href:!0});var jt=p(X);ye=i(jt,"SPAN",{});var Bt=p(ye);z(ie.$$.fragment,Bt),Bt.forEach(t),jt.forEach(t),ut=m(ot),Ee=i(ot,"SPAN",{});var Ft=p(Ee);ct=N(Ft,"3.\u4E0B\u5217\u54EA\u4E00\u4E2A\u662FSubword\u6807\u8BB0(Tokenization)\u7684\u4F8B\u5B50\uFF08\u4ECE\u5206\u8BCD\u7684\u9897\u7C92\u5EA6\u6765\u5212\u5206\uFF09\uFF1F"),Ft.forEach(t),ot.forEach(t),Oe=m(e),z(se.$$.fragment,e),Qe=m(e),G=i(e,"H3",{class:!0});var nt=p(G);Y=i(nt,"A",{id:!0,class:!0,href:!0});var It=p(Y);Se=i(It,"SPAN",{});var Lt=p(Se);z(le.$$.fragment,Lt),Lt.forEach(t),It.forEach(t),$t=m(nt),qe=i(nt,"SPAN",{});var Dt=p(qe);mt=N(Dt,"4.\u4EC0\u4E48\u662F\u6A21\u578B\u7684Head\u5C42\uFF1F"),Dt.forEach(t),nt.forEach(t),Ue=m(e),z(pe.$$.fragment,e),Ge=m(e),I.l(e),ge=m(e),J=i(e,"H3",{class:!0});var at=p(J);Z=i(at,"A",{id:!0,class:!0,href:!0});var Ot=p(Z);Pe=i(Ot,"SPAN",{});var Qt=p(Pe);z(fe.$$.fragment,Qt),Qt.forEach(t),Ot.forEach(t),dt=m(at),He=i(at,"SPAN",{});var Ut=p(He);kt=N(Ut,"6.\u5F53\u5C06\u4E0D\u540C\u957F\u5EA6\u7684\u5E8F\u5217\u6279\u5904\u7406\u5728\u4E00\u8D77\u65F6\uFF0C\u9700\u8981\u8FDB\u884C\u54EA\u4E9B\u5904\u7406\uFF1F"),Ut.forEach(t),at.forEach(t),Je=m(e),z(he.$$.fragment,e),Re=m(e),R=i(e,"H3",{class:!0});var it=p(R);ee=i(it,"A",{id:!0,class:!0,href:!0});var Gt=p(ee);Ne=i(Gt,"SPAN",{});var Jt=p(Ne);z(ue.$$.fragment,Jt),Jt.forEach(t),Gt.forEach(t),vt=m(it),Me=i(it,"SPAN",{});var Rt=p(Me);_t=N(Rt,"7.\u5C06 SoftMax\u6FC0\u6D3B\u51FD\u6570\u5E94\u7528\u4E8E\u5E8F\u5217\u5206\u7C7B(Sequence Classification)\u6A21\u578B\u7684 logits \u8F93\u51FA\u6709\u4EC0\u4E48\u610F\u4E49\uFF1F"),Rt.forEach(t),it.forEach(t),We=m(e),z(ce.$$.fragment,e),Ke=m(e),W=i(e,"H3",{class:!0});var st=p(W);te=i(st,"A",{id:!0,class:!0,href:!0});var Wt=p(te);Ce=i(Wt,"SPAN",{});var Kt=p(Ce);z($e.$$.fragment,Kt),Kt.forEach(t),Wt.forEach(t),wt=m(st),je=i(st,"SPAN",{});var Vt=p(je);xt=N(Vt,"8.\u5927\u591A\u6570\u6807\u8BB0\u5668(Tokenizer)\u7684API\u4EE5\u4EC0\u4E48\u65B9\u6CD5\u4E3A\u6838\u5FC3\uFF1F"),Vt.forEach(t),st.forEach(t),Ve=m(e),z(me.$$.fragment,e),Xe=m(e),K=i(e,"H3",{class:!0});var lt=p(K);re=i(lt,"A",{id:!0,class:!0,href:!0});var Xt=p(re);Be=i(Xt,"SPAN",{});var Yt=p(Be);z(de.$$.fragment,Yt),Yt.forEach(t),Xt.forEach(t),gt=m(lt),ke=i(lt,"SPAN",{});var pt=p(ke);At=N(pt,"9.\u8FD9\u4E2A\u4EE3\u7801\u793A\u4F8B\u4E2D\u7684"),Fe=i(pt,"CODE",{});var Zt=p(Fe);zt=N(Zt,"result"),Zt.forEach(t),bt=N(pt,"\u53D8\u91CF\u5305\u542B\u4EC0\u4E48\uFF1F"),pt.forEach(t),lt.forEach(t),Ye=m(e),z(ve.$$.fragment,e),Ze=m(e),z(_e.$$.fragment,e),et=m(e),D.l(e),Ae=er(),this.h()},h(){s(f,"name","hf:doc:metadata"),s(f,"content",JSON.stringify($r)),s(S,"id",""),s(c,"id","1.-\u8BED\u8A00\u5EFA\u6A21-pipeline-\u7684\u987A\u5E8F\u662F\u4EC0\u4E48\uFF1F"),s(c,"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"),s(c,"href","#1.-\u8BED\u8A00\u5EFA\u6A21-pipeline-\u7684\u987A\u5E8F\u662F\u4EC0\u4E48\uFF1F"),s(g,"class","relative group"),s(V,"id","2.-transformer\u6A21\u578B\u7684\u8F93\u51FA\u6709\u591A\u5C11\u4E2A\u7EF4\u5EA6\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u522B\u662F\u4EC0\u4E48\uFF1F"),s(V,"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"),s(V,"href","#2.-transformer\u6A21\u578B\u7684\u8F93\u51FA\u6709\u591A\u5C11\u4E2A\u7EF4\u5EA6\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u522B\u662F\u4EC0\u4E48\uFF1F"),s(Q,"class","relative group"),s(X,"id","3.\u4E0B\u5217\u54EA\u4E00\u4E2A\u662Fsubword\u6807\u8BB0(tokenization)\u7684\u4F8B\u5B50\uFF08\u4ECE\u5206\u8BCD\u7684\u9897\u7C92\u5EA6\u6765\u5212\u5206\uFF09\uFF1F"),s(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"),s(X,"href","#3.\u4E0B\u5217\u54EA\u4E00\u4E2A\u662Fsubword\u6807\u8BB0(tokenization)\u7684\u4F8B\u5B50\uFF08\u4ECE\u5206\u8BCD\u7684\u9897\u7C92\u5EA6\u6765\u5212\u5206\uFF09\uFF1F"),s(U,"class","relative group"),s(Y,"id","4.\u4EC0\u4E48\u662F\u6A21\u578B\u7684head\u5C42\uFF1F"),s(Y,"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"),s(Y,"href","#4.\u4EC0\u4E48\u662F\u6A21\u578B\u7684head\u5C42\uFF1F"),s(G,"class","relative group"),s(Z,"id","6.\u5F53\u5C06\u4E0D\u540C\u957F\u5EA6\u7684\u5E8F\u5217\u6279\u5904\u7406\u5728\u4E00\u8D77\u65F6\uFF0C\u9700\u8981\u8FDB\u884C\u54EA\u4E9B\u5904\u7406\uFF1F"),s(Z,"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"),s(Z,"href","#6.\u5F53\u5C06\u4E0D\u540C\u957F\u5EA6\u7684\u5E8F\u5217\u6279\u5904\u7406\u5728\u4E00\u8D77\u65F6\uFF0C\u9700\u8981\u8FDB\u884C\u54EA\u4E9B\u5904\u7406\uFF1F"),s(J,"class","relative group"),s(ee,"id","7.\u5C06-softmax\u6FC0\u6D3B\u51FD\u6570\u5E94\u7528\u4E8E\u5E8F\u5217\u5206\u7C7B(sequence-classification)\u6A21\u578B\u7684-logits-\u8F93\u51FA\u6709\u4EC0\u4E48\u610F\u4E49\uFF1F"),s(ee,"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"),s(ee,"href","#7.\u5C06-softmax\u6FC0\u6D3B\u51FD\u6570\u5E94\u7528\u4E8E\u5E8F\u5217\u5206\u7C7B(sequence-classification)\u6A21\u578B\u7684-logits-\u8F93\u51FA\u6709\u4EC0\u4E48\u610F\u4E49\uFF1F"),s(R,"class","relative group"),s(te,"id","8.\u5927\u591A\u6570\u6807\u8BB0\u5668(tokenizer)\u7684api\u4EE5\u4EC0\u4E48\u65B9\u6CD5\u4E3A\u6838\u5FC3\uFF1F"),s(te,"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"),s(te,"href","#8.\u5927\u591A\u6570\u6807\u8BB0\u5668(tokenizer)\u7684api\u4EE5\u4EC0\u4E48\u65B9\u6CD5\u4E3A\u6838\u5FC3\uFF1F"),s(W,"class","relative group"),s(re,"id","9.\u8FD9\u4E2A\u4EE3\u7801\u793A\u4F8B\u4E2D\u7684<code>result</code>\u53D8\u91CF\u5305\u542B\u4EC0\u4E48\uFF1F"),s(re,"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"),s(re,"href","#9.\u8FD9\u4E2A\u4EE3\u7801\u793A\u4F8B\u4E2D\u7684<code>result</code>\u53D8\u91CF\u5305\u542B\u4EC0\u4E48\uFF1F"),s(K,"class","relative group")},m(e,l){r(document.head,f),u(e,h,l),b(k,e,l),u(e,d,l),u(e,S,l),r(S,y),u(e,q,l),u(e,g,l),r(g,c),r(c,E),b(n,E,null),r(g,w),r(g,o),r(o,x),u(e,P,l),b(M,e,l),u(e,O,l),u(e,Q,l),r(Q,V),r(V,be),b(ne,be,null),r(Q,ft),r(Q,Te),r(Te,ht),u(e,Le,l),b(ae,e,l),u(e,De,l),u(e,U,l),r(U,X),r(X,ye),b(ie,ye,null),r(U,ut),r(U,Ee),r(Ee,ct),u(e,Oe,l),b(se,e,l),u(e,Qe,l),u(e,G,l),r(G,Y),r(Y,Se),b(le,Se,null),r(G,$t),r(G,qe),r(qe,mt),u(e,Ue,l),b(pe,e,l),u(e,Ge,l),we[F].m(e,l),u(e,ge,l),u(e,J,l),r(J,Z),r(Z,Pe),b(fe,Pe,null),r(J,dt),r(J,He),r(He,kt),u(e,Je,l),b(he,e,l),u(e,Re,l),u(e,R,l),r(R,ee),r(ee,Ne),b(ue,Ne,null),r(R,vt),r(R,Me),r(Me,_t),u(e,We,l),b(ce,e,l),u(e,Ke,l),u(e,W,l),r(W,te),r(te,Ce),b($e,Ce,null),r(W,wt),r(W,je),r(je,xt),u(e,Ve,l),b(me,e,l),u(e,Xe,l),u(e,K,l),r(K,re),r(re,Be),b(de,Be,null),r(K,gt),r(K,ke),r(ke,At),r(ke,Fe),r(Fe,zt),r(ke,bt),u(e,Ye,l),b(ve,e,l),u(e,Ze,l),b(_e,e,l),u(e,et,l),xe[L].m(e,l),u(e,Ae,l),tt=!0},p(e,[l]){const Ie={};l&1&&(Ie.fw=e[0]),k.$set(Ie);let oe=F;F=Et(e),F!==oe&&(rr(),v(we[oe],1,1,()=>{we[oe]=null}),tr(),I=we[F],I||(I=we[F]=yt[F](e),I.c()),_(I,1),I.m(ge.parentNode,ge));let ze=L;L=qt(e),L!==ze&&(rr(),v(xe[ze],1,1,()=>{xe[ze]=null}),tr(),D=xe[L],D||(D=xe[L]=St[L](e),D.c()),_(D,1),D.m(Ae.parentNode,Ae))},i(e){tt||(_(k.$$.fragment,e),_(n.$$.fragment,e),_(M.$$.fragment,e),_(ne.$$.fragment,e),_(ae.$$.fragment,e),_(ie.$$.fragment,e),_(se.$$.fragment,e),_(le.$$.fragment,e),_(pe.$$.fragment,e),_(I),_(fe.$$.fragment,e),_(he.$$.fragment,e),_(ue.$$.fragment,e),_(ce.$$.fragment,e),_($e.$$.fragment,e),_(me.$$.fragment,e),_(de.$$.fragment,e),_(ve.$$.fragment,e),_(_e.$$.fragment,e),_(D),tt=!0)},o(e){v(k.$$.fragment,e),v(n.$$.fragment,e),v(M.$$.fragment,e),v(ne.$$.fragment,e),v(ae.$$.fragment,e),v(ie.$$.fragment,e),v(se.$$.fragment,e),v(le.$$.fragment,e),v(pe.$$.fragment,e),v(I),v(fe.$$.fragment,e),v(he.$$.fragment,e),v(ue.$$.fragment,e),v(ce.$$.fragment,e),v($e.$$.fragment,e),v(me.$$.fragment,e),v(de.$$.fragment,e),v(ve.$$.fragment,e),v(_e.$$.fragment,e),v(D),tt=!1},d(e){t(f),e&&t(h),T(k,e),e&&t(d),e&&t(S),e&&t(q),e&&t(g),T(n),e&&t(P),T(M,e),e&&t(O),e&&t(Q),T(ne),e&&t(Le),T(ae,e),e&&t(De),e&&t(U),T(ie),e&&t(Oe),T(se,e),e&&t(Qe),e&&t(G),T(le),e&&t(Ue),T(pe,e),e&&t(Ge),we[F].d(e),e&&t(ge),e&&t(J),T(fe),e&&t(Je),T(he,e),e&&t(Re),e&&t(R),T(ue),e&&t(We),T(ce,e),e&&t(Ke),e&&t(W),T($e),e&&t(Ve),T(me,e),e&&t(Xe),e&&t(K),T(de),e&&t(Ye),T(ve,e),e&&t(Ze),T(_e,e),e&&t(et),xe[L].d(e),e&&t(Ae)}}}const $r={local:"",title:"\u7AE0\u672B\u5C0F\u6D4B\u8BD5"};function mr(B,f,h){let k="pt";return sr(()=>{const d=new URLSearchParams(window.location.search);h(0,k=d.get("fw")||"pt")}),[k]}class xr extends or{constructor(f){super();nr(this,f,mr,cr,ar,{})}}export{xr as default,$r as metadata};
