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 a,r as E,A as V,h as i,f as n,c as o,j as N,u as S,x as v,k as D,y as W,a as s,v as A,d as j,t as k,w as z}from"../chunks/index.2bf4358c.js";import{Y as X}from"../chunks/Youtube.1e50a667.js";import{C as Z}from"../chunks/CourseFloatingBanner.15ba07e6.js";import{H as ee}from"../chunks/Heading.8ada512a.js";function te(R){let l,w,_,q,c,b,m,x,u,T,f,B="Encoder-decoder models (also called <em>sequence-to-sequence models</em>) use both parts of the Transformer architecture. At each stage, the attention layers of the encoder can access all the words in the initial sentence, whereas the attention layers of the decoder can only access the words positioned before a given word in the input.",C,p,F='The pretraining of these models can be done using the objectives of encoder or decoder models, but usually involves something a bit more complex. For instance, <a href="https://huggingface.co/t5-base" rel="nofollow">T5</a> is pretrained by replacing random spans of text (that can contain several words) with a single mask special word, and the objective is then to predict the text that this mask word replaces.',y,d,U="Sequence-to-sequence models are best suited for tasks revolving around generating new sentences depending on a given input, such as summarization, translation, or generative question answering.",P,h,Y="Representatives of this family of models include:",M,g,K='<li><a href="https://huggingface.co/transformers/model_doc/bart" rel="nofollow">BART</a></li> <li><a href="https://huggingface.co/transformers/model_doc/mbart" rel="nofollow">mBART</a></li> <li><a href="https://huggingface.co/transformers/model_doc/marian" rel="nofollow">Marian</a></li> <li><a href="https://huggingface.co/transformers/model_doc/t5" rel="nofollow">T5</a></li>',H,$,L;return c=new ee({props:{title:"Sequence-to-sequence models sequence-to-sequence-models",local:"sequence-to-sequence-models-sequence-to-sequence-models",headingTag:"h1"}}),m=new Z({props:{chapter:1,classNames:"absolute z-10 right-0 top-0"}}),u=new X({props:{id:"0_4KEb08xrE"}}),{c(){l=r("meta"),w=a(),_=r("p"),q=a(),E(c.$$.fragment),b=a(),E(m.$$.fragment),x=a(),E(u.$$.fragment),T=a(),f=r("p"),f.innerHTML=B,C=a(),p=r("p"),p.innerHTML=F,y=a(),d=r("p"),d.textContent=U,P=a(),h=r("p"),h.textContent=Y,M=a(),g=r("ul"),g.innerHTML=K,H=a(),$=r("p"),this.h()},l(e){const t=V("svelte-u9bgzb",document.head);l=i(t,"META",{name:!0,content:!0}),t.forEach(n),w=o(e),_=i(e,"P",{}),N(_).forEach(n),q=o(e),S(c.$$.fragment,e),b=o(e),S(m.$$.fragment,e),x=o(e),S(u.$$.fragment,e),T=o(e),f=i(e,"P",{"data-svelte-h":!0}),v(f)!=="svelte-jlh9xs"&&(f.innerHTML=B),C=o(e),p=i(e,"P",{"data-svelte-h":!0}),v(p)!=="svelte-14c390x"&&(p.innerHTML=F),y=o(e),d=i(e,"P",{"data-svelte-h":!0}),v(d)!=="svelte-pfbuhi"&&(d.textContent=U),P=o(e),h=i(e,"P",{"data-svelte-h":!0}),v(h)!=="svelte-s27rrg"&&(h.textContent=Y),M=o(e),g=i(e,"UL",{"data-svelte-h":!0}),v(g)!=="svelte-cz4hgg"&&(g.innerHTML=K),H=o(e),$=i(e,"P",{}),N($).forEach(n),this.h()},h(){D(l,"name","hf:doc:metadata"),D(l,"content",ne)},m(e,t){W(document.head,l),s(e,w,t),s(e,_,t),s(e,q,t),A(c,e,t),s(e,b,t),A(m,e,t),s(e,x,t),A(u,e,t),s(e,T,t),s(e,f,t),s(e,C,t),s(e,p,t),s(e,y,t),s(e,d,t),s(e,P,t),s(e,h,t),s(e,M,t),s(e,g,t),s(e,H,t),s(e,$,t),L=!0},p:I,i(e){L||(j(c.$$.fragment,e),j(m.$$.fragment,e),j(u.$$.fragment,e),L=!0)},o(e){k(c.$$.fragment,e),k(m.$$.fragment,e),k(u.$$.fragment,e),L=!1},d(e){e&&(n(w),n(_),n(q),n(b),n(x),n(T),n(f),n(C),n(p),n(y),n(d),n(P),n(h),n(M),n(g),n(H),n($)),n(l),z(c,e),z(m,e),z(u,e)}}}const ne='{"title":"Sequence-to-sequence models sequence-to-sequence-models","local":"sequence-to-sequence-models-sequence-to-sequence-models","sections":[],"depth":1}';function se(R){return J(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ce extends O{constructor(l){super(),Q(this,l,se,te,G,{})}}export{ce as component};
