import{s as Q,n as G,o as I}from"../chunks/scheduler.37c15a92.js";import{S as K,i as O,g as r,s as n,r as M,A as V,h as i,f as l,c as o,j as F,u as k,x as g,k as J,y as W,a,v as z,d as A,t as H,w as j}from"../chunks/index.2bf4358c.js";import{Y as X}from"../chunks/Youtube.1e50a667.js";import{C as Z}from"../chunks/CourseFloatingBanner.06521e8b.js";import{H as tt}from"../chunks/Heading.8ada512a.js";function et(S){let s,v,d,C,m,w,f,b,p,P,u,U="“編碼器”模型指僅使用編碼器的Transformer模型。在每個階段，注意力層都可以獲取初始句子中的所有單詞。這些模型通常具有“雙向”注意力，被稱爲自編碼模型。",E,c,q="這些模型的預訓練通常圍繞着以某種方式破壞給定的句子（例如：通過隨機遮蓋其中的單詞），並讓模型尋找或重建給定的句子。",T,h,N="“編碼器”模型最適合於需要理解完整句子的任務，例如：句子分類、命名實體識別（以及更普遍的單詞分類）和閱讀理解後回答問題。",R,_,Y="該系列模型的典型代表有：",y,$,D='<li><a href="https://huggingface.co/transformers/model_doc/albert.html" rel="nofollow">ALBERT</a></li> <li><a href="https://huggingface.co/transformers/model_doc/bert.html" rel="nofollow">BERT</a></li> <li><a href="https://huggingface.co/transformers/model_doc/distilbert.html" rel="nofollow">DistilBERT</a></li> <li><a href="https://huggingface.co/transformers/model_doc/electra.html" rel="nofollow">ELECTRA</a></li> <li><a href="https://huggingface.co/transformers/model_doc/roberta.html" rel="nofollow">RoBERTa</a></li>',L,x,B;return m=new tt({props:{title:"“編碼器”模型",local:"編碼器模型",headingTag:"h1"}}),f=new Z({props:{chapter:1,classNames:"absolute z-10 right-0 top-0"}}),p=new X({props:{id:"MUqNwgPjJvQ"}}),{c(){s=r("meta"),v=n(),d=r("p"),C=n(),M(m.$$.fragment),w=n(),M(f.$$.fragment),b=n(),M(p.$$.fragment),P=n(),u=r("p"),u.textContent=U,E=n(),c=r("p"),c.textContent=q,T=n(),h=r("p"),h.textContent=N,R=n(),_=r("p"),_.textContent=Y,y=n(),$=r("ul"),$.innerHTML=D,L=n(),x=r("p"),this.h()},l(t){const e=V("svelte-u9bgzb",document.head);s=i(e,"META",{name:!0,content:!0}),e.forEach(l),v=o(t),d=i(t,"P",{}),F(d).forEach(l),C=o(t),k(m.$$.fragment,t),w=o(t),k(f.$$.fragment,t),b=o(t),k(p.$$.fragment,t),P=o(t),u=i(t,"P",{"data-svelte-h":!0}),g(u)!=="svelte-xoshct"&&(u.textContent=U),E=o(t),c=i(t,"P",{"data-svelte-h":!0}),g(c)!=="svelte-yvklkh"&&(c.textContent=q),T=o(t),h=i(t,"P",{"data-svelte-h":!0}),g(h)!=="svelte-1fxfxbf"&&(h.textContent=N),R=o(t),_=i(t,"P",{"data-svelte-h":!0}),g(_)!=="svelte-rjc8nv"&&(_.textContent=Y),y=o(t),$=i(t,"UL",{"data-svelte-h":!0}),g($)!=="svelte-18kzzol"&&($.innerHTML=D),L=o(t),x=i(t,"P",{}),F(x).forEach(l),this.h()},h(){J(s,"name","hf:doc:metadata"),J(s,"content",lt)},m(t,e){W(document.head,s),a(t,v,e),a(t,d,e),a(t,C,e),z(m,t,e),a(t,w,e),z(f,t,e),a(t,b,e),z(p,t,e),a(t,P,e),a(t,u,e),a(t,E,e),a(t,c,e),a(t,T,e),a(t,h,e),a(t,R,e),a(t,_,e),a(t,y,e),a(t,$,e),a(t,L,e),a(t,x,e),B=!0},p:G,i(t){B||(A(m.$$.fragment,t),A(f.$$.fragment,t),A(p.$$.fragment,t),B=!0)},o(t){H(m.$$.fragment,t),H(f.$$.fragment,t),H(p.$$.fragment,t),B=!1},d(t){t&&(l(v),l(d),l(C),l(w),l(b),l(P),l(u),l(E),l(c),l(T),l(h),l(R),l(_),l(y),l($),l(L),l(x)),l(s),j(m,t),j(f,t),j(p,t)}}}const lt='{"title":"“編碼器”模型","local":"編碼器模型","sections":[],"depth":1}';function at(S){return I(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mt extends K{constructor(s){super(),O(this,s,at,et,Q,{})}}export{mt as component};
