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