import{s as G,n as I,o as J}from"../chunks/scheduler.37c15a92.js";import{S as O,i as Q,g as r,s as n,r as A,A as V,h as m,f as a,c as s,j as N,u as j,x,k as D,y as W,a as l,v as B,d as R,t as S,w as k}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(z){let o,v,d,w,i,C,f,T,p,b,u,U="編碼器-解碼器模型（也稱爲序列到序列模型)同時使用 Transformer 架構的編碼器和解碼器兩個部分。在每個階段，編碼器的注意力層可以訪問初始句子中的所有單詞，而解碼器的注意力層只能訪問位於輸入中將要預測單詞前面的單詞。",P,c,Y='這些模型的預訓練可以使用訓練編碼器或解碼器模型的方式來完成，但通常涉及更復雜的內容。例如，<a href="https://huggingface.co/t5-base" rel="nofollow">T5</a>通過將文本的隨機跨度（可以包含多個單詞）替換爲單個特殊單詞來進行預訓練，然後目標是預測該掩碼單詞替換的文本。',M,h,q="序列到序列模型最適合於圍繞根據給定輸入生成新句子的任務，如摘要、翻譯或生成性問答。",y,_,F="該系列模型的典型代表有：",E,$,K='<li><a href="https://huggingface.co/transformers/model_doc/bart.html" rel="nofollow">BART</a></li> <li><a href="https://huggingface.co/transformers/model_doc/mbart.html" rel="nofollow">mBART</a></li> <li><a href="https://huggingface.co/transformers/model_doc/marian.html" rel="nofollow">Marian</a></li> <li><a href="https://huggingface.co/transformers/model_doc/t5.html" rel="nofollow">T5</a></li>',H,g,L;return i=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:"0_4KEb08xrE"}}),{c(){o=r("meta"),v=n(),d=r("p"),w=n(),A(i.$$.fragment),C=n(),A(f.$$.fragment),T=n(),A(p.$$.fragment),b=n(),u=r("p"),u.textContent=U,P=n(),c=r("p"),c.innerHTML=Y,M=n(),h=r("p"),h.textContent=q,y=n(),_=r("p"),_.textContent=F,E=n(),$=r("ul"),$.innerHTML=K,H=n(),g=r("p"),this.h()},l(t){const e=V("svelte-u9bgzb",document.head);o=m(e,"META",{name:!0,content:!0}),e.forEach(a),v=s(t),d=m(t,"P",{}),N(d).forEach(a),w=s(t),j(i.$$.fragment,t),C=s(t),j(f.$$.fragment,t),T=s(t),j(p.$$.fragment,t),b=s(t),u=m(t,"P",{"data-svelte-h":!0}),x(u)!=="svelte-110rerd"&&(u.textContent=U),P=s(t),c=m(t,"P",{"data-svelte-h":!0}),x(c)!=="svelte-1oj1w9e"&&(c.innerHTML=Y),M=s(t),h=m(t,"P",{"data-svelte-h":!0}),x(h)!=="svelte-150k9e3"&&(h.textContent=q),y=s(t),_=m(t,"P",{"data-svelte-h":!0}),x(_)!=="svelte-rjc8nv"&&(_.textContent=F),E=s(t),$=m(t,"UL",{"data-svelte-h":!0}),x($)!=="svelte-1lyffe"&&($.innerHTML=K),H=s(t),g=m(t,"P",{}),N(g).forEach(a),this.h()},h(){D(o,"name","hf:doc:metadata"),D(o,"content",at)},m(t,e){W(document.head,o),l(t,v,e),l(t,d,e),l(t,w,e),B(i,t,e),l(t,C,e),B(f,t,e),l(t,T,e),B(p,t,e),l(t,b,e),l(t,u,e),l(t,P,e),l(t,c,e),l(t,M,e),l(t,h,e),l(t,y,e),l(t,_,e),l(t,E,e),l(t,$,e),l(t,H,e),l(t,g,e),L=!0},p:I,i(t){L||(R(i.$$.fragment,t),R(f.$$.fragment,t),R(p.$$.fragment,t),L=!0)},o(t){S(i.$$.fragment,t),S(f.$$.fragment,t),S(p.$$.fragment,t),L=!1},d(t){t&&(a(v),a(d),a(w),a(C),a(T),a(b),a(u),a(P),a(c),a(M),a(h),a(y),a(_),a(E),a($),a(H),a(g)),a(o),k(i,t),k(f,t),k(p,t)}}}const at='{"title":"序列到序列模型","local":"序列到序列模型","sections":[],"depth":1}';function lt(z){return J(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class it extends O{constructor(o){super(),Q(this,o,lt,et,G,{})}}export{it as component};
