import{s as I,n as K,o as V}from"../chunks/scheduler.cc52f4b9.js";import{S as X,i as Z,e as r,s as a,c as b,h as tt,a as i,d as l,b as s,f as Q,g as v,j as w,k as W,l as et,m as n,n as E,t as T,o as P,p as y}from"../chunks/index.9480bb2b.js";import{C as lt,H as nt,E as at}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.52103c90.js";import{Y as st}from"../chunks/Youtube.7b12d9e8.js";import{C as ot}from"../chunks/CourseFloatingBanner.78fb31df.js";function rt(Y){let o,L,d,M,m,R,f,z,p,B,u,k,$,D="“編碼器”模型指僅使用編碼器的Transformer模型。在每個階段，注意力層都可以獲取初始句子中的所有單詞。這些模型通常具有“雙向”注意力，被稱爲自編碼模型。",H,c,F="這些模型的預訓練通常圍繞着以某種方式破壞給定的句子（例如：通過隨機遮蓋其中的單詞），並讓模型尋找或重建給定的句子。",S,h,G="“編碼器”模型最適合於需要理解完整句子的任務，例如：句子分類、命名實體識別（以及更普遍的單詞分類）和閱讀理解後回答問題。",j,g,J="該系列模型的典型代表有：",A,_,O='<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>',U,x,q,C,N;return m=new lt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),f=new nt({props:{title:"“編碼器”模型",local:"編碼器模型",headingTag:"h1"}}),p=new ot({props:{chapter:1,classNames:"absolute z-10 right-0 top-0"}}),u=new st({props:{id:"MUqNwgPjJvQ"}}),x=new at({props:{source:"https://github.com/huggingface/course/blob/main/chapters/zh-TW/chapter1/5.mdx"}}),{c(){o=r("meta"),L=a(),d=r("p"),M=a(),b(m.$$.fragment),R=a(),b(f.$$.fragment),z=a(),b(p.$$.fragment),B=a(),b(u.$$.fragment),k=a(),$=r("p"),$.textContent=D,H=a(),c=r("p"),c.textContent=F,S=a(),h=r("p"),h.textContent=G,j=a(),g=r("p"),g.textContent=J,A=a(),_=r("ul"),_.innerHTML=O,U=a(),b(x.$$.fragment),q=a(),C=r("p"),this.h()},l(t){const e=tt("svelte-u9bgzb",document.head);o=i(e,"META",{name:!0,content:!0}),e.forEach(l),L=s(t),d=i(t,"P",{}),Q(d).forEach(l),M=s(t),v(m.$$.fragment,t),R=s(t),v(f.$$.fragment,t),z=s(t),v(p.$$.fragment,t),B=s(t),v(u.$$.fragment,t),k=s(t),$=i(t,"P",{"data-svelte-h":!0}),w($)!=="svelte-xoshct"&&($.textContent=D),H=s(t),c=i(t,"P",{"data-svelte-h":!0}),w(c)!=="svelte-yvklkh"&&(c.textContent=F),S=s(t),h=i(t,"P",{"data-svelte-h":!0}),w(h)!=="svelte-1fxfxbf"&&(h.textContent=G),j=s(t),g=i(t,"P",{"data-svelte-h":!0}),w(g)!=="svelte-rjc8nv"&&(g.textContent=J),A=s(t),_=i(t,"UL",{"data-svelte-h":!0}),w(_)!=="svelte-18kzzol"&&(_.innerHTML=O),U=s(t),v(x.$$.fragment,t),q=s(t),C=i(t,"P",{}),Q(C).forEach(l),this.h()},h(){W(o,"name","hf:doc:metadata"),W(o,"content",it)},m(t,e){et(document.head,o),n(t,L,e),n(t,d,e),n(t,M,e),E(m,t,e),n(t,R,e),E(f,t,e),n(t,z,e),E(p,t,e),n(t,B,e),E(u,t,e),n(t,k,e),n(t,$,e),n(t,H,e),n(t,c,e),n(t,S,e),n(t,h,e),n(t,j,e),n(t,g,e),n(t,A,e),n(t,_,e),n(t,U,e),E(x,t,e),n(t,q,e),n(t,C,e),N=!0},p:K,i(t){N||(T(m.$$.fragment,t),T(f.$$.fragment,t),T(p.$$.fragment,t),T(u.$$.fragment,t),T(x.$$.fragment,t),N=!0)},o(t){P(m.$$.fragment,t),P(f.$$.fragment,t),P(p.$$.fragment,t),P(u.$$.fragment,t),P(x.$$.fragment,t),N=!1},d(t){t&&(l(L),l(d),l(M),l(R),l(z),l(B),l(k),l($),l(H),l(c),l(S),l(h),l(j),l(g),l(A),l(_),l(U),l(q),l(C)),l(o),y(m,t),y(f,t),y(p,t),y(u,t),y(x,t)}}}const it='{"title":"“編碼器”模型","local":"編碼器模型","sections":[],"depth":1}';function mt(Y){return V(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ht extends X{constructor(o){super(),Z(this,o,mt,rt,I,{})}}export{ht as component};
