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 q,A as V,h as m,f as a,c as s,j as N,u as A,x as v,k as D,y as W,a as l,v as k,d as B,t as R,w as S}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,x,g,C,i,w,f,b,p,T,u,U="编码器-解码器模型（也称为序列到序列模型)同时使用Transformer架构的编码器和解码器两个部分。在每个阶段，编码器的注意力层可以访问初始句子中的所有单词，而解码器的注意力层只能访问位于输入中将要预测单词前面的单词。",P,c,Y='这些模型的预训练可以使用训练编码器或解码器模型的方式来完成，但通常涉及更复杂的内容。例如，<a href="https://huggingface.co/t5-base" rel="nofollow">T5</a>通过将文本的随机跨度（可以包含多个单词）替换为单个特殊单词来进行预训练，然后目标是预测该掩码单词替换的文本。',y,h,j="序列到序列模型最适合于围绕根据给定输入生成新句子的任务，如摘要、翻译或生成性问答。",M,_,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,d,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"),x=n(),g=r("p"),C=n(),q(i.$$.fragment),w=n(),q(f.$$.fragment),b=n(),q(p.$$.fragment),T=n(),u=r("p"),u.textContent=U,P=n(),c=r("p"),c.innerHTML=Y,y=n(),h=r("p"),h.textContent=j,M=n(),_=r("p"),_.textContent=F,E=n(),$=r("ul"),$.innerHTML=K,H=n(),d=r("p"),this.h()},l(t){const e=V("svelte-u9bgzb",document.head);o=m(e,"META",{name:!0,content:!0}),e.forEach(a),x=s(t),g=m(t,"P",{}),N(g).forEach(a),C=s(t),A(i.$$.fragment,t),w=s(t),A(f.$$.fragment,t),b=s(t),A(p.$$.fragment,t),T=s(t),u=m(t,"P",{"data-svelte-h":!0}),v(u)!=="svelte-1pkvqmv"&&(u.textContent=U),P=s(t),c=m(t,"P",{"data-svelte-h":!0}),v(c)!=="svelte-140lkq"&&(c.innerHTML=Y),y=s(t),h=m(t,"P",{"data-svelte-h":!0}),v(h)!=="svelte-1x73vbl"&&(h.textContent=j),M=s(t),_=m(t,"P",{"data-svelte-h":!0}),v(_)!=="svelte-rgo3yq"&&(_.textContent=F),E=s(t),$=m(t,"UL",{"data-svelte-h":!0}),v($)!=="svelte-1lyffe"&&($.innerHTML=K),H=s(t),d=m(t,"P",{}),N(d).forEach(a),this.h()},h(){D(o,"name","hf:doc:metadata"),D(o,"content",at)},m(t,e){W(document.head,o),l(t,x,e),l(t,g,e),l(t,C,e),k(i,t,e),l(t,w,e),k(f,t,e),l(t,b,e),k(p,t,e),l(t,T,e),l(t,u,e),l(t,P,e),l(t,c,e),l(t,y,e),l(t,h,e),l(t,M,e),l(t,_,e),l(t,E,e),l(t,$,e),l(t,H,e),l(t,d,e),L=!0},p:I,i(t){L||(B(i.$$.fragment,t),B(f.$$.fragment,t),B(p.$$.fragment,t),L=!0)},o(t){R(i.$$.fragment,t),R(f.$$.fragment,t),R(p.$$.fragment,t),L=!1},d(t){t&&(a(x),a(g),a(C),a(w),a(b),a(T),a(u),a(P),a(c),a(y),a(h),a(M),a(_),a(E),a($),a(H),a(d)),a(o),S(i,t),S(f,t),S(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};
