Buckets:
| import{s as Q,n as V,o as W}from"../chunks/scheduler.893fe8c9.js";import{S as X,i as Z,e as i,s as l,c as d,h as tt,a as o,d as n,b as s,f as I,g as v,j as w,k as J,l as et,m as a,n as T,t as P,o as y,p as M}from"../chunks/index.2d09ebb4.js";import{C as nt,H as at,E as lt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.fcdcb9db.js";import{Y as st}from"../chunks/Youtube.b7012d06.js";import{C as rt}from"../chunks/CourseFloatingBanner.e3aeab73.js";function it(k){let r,E,b,L,m,H,f,z,p,S,u,A,$,F="编码器-解码器模型(也称为序列到序列模型)同时使用 Transformer 架构的编码器和解码器两个部分。在每个阶段,编码器的注意力层可以访问输入句子中的所有单词,而解码器的注意力层只能访问位于输入中将要预测单词前面的单词。",B,c,G='这些模型的预训练可以使用训练编码器或解码器模型的方式来完成,但通常会更加复杂。例如, <a href="https://huggingface.co/t5-base" rel="nofollow">T5</a> 通过用单个掩码特殊词替换随机文本范围(可能包含多个词)进行预训练,然后目标是预测被遮盖单词原始的文本。',R,g,K="序列到序列模型最适合于围绕根据给定输入生成新句子的任务,如摘要、翻译或生成性问答。",q,h,O="该系列模型的典型代表有:",N,_,D='<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>',U,x,Y,C,j;return m=new nt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),f=new at({props:{title:"编码器-解码器模型",local:"编码器-解码器模型",headingTag:"h1"}}),p=new rt({props:{chapter:1,classNames:"absolute z-10 right-0 top-0"}}),u=new st({props:{id:"0_4KEb08xrE"}}),x=new lt({props:{source:"https://github.com/huggingface/course/blob/main/chapters/zh-CN/chapter1/7.mdx"}}),{c(){r=i("meta"),E=l(),b=i("p"),L=l(),d(m.$$.fragment),H=l(),d(f.$$.fragment),z=l(),d(p.$$.fragment),S=l(),d(u.$$.fragment),A=l(),$=i("p"),$.textContent=F,B=l(),c=i("p"),c.innerHTML=G,R=l(),g=i("p"),g.textContent=K,q=l(),h=i("p"),h.textContent=O,N=l(),_=i("ul"),_.innerHTML=D,U=l(),d(x.$$.fragment),Y=l(),C=i("p"),this.h()},l(t){const e=tt("svelte-u9bgzb",document.head);r=o(e,"META",{name:!0,content:!0}),e.forEach(n),E=s(t),b=o(t,"P",{}),I(b).forEach(n),L=s(t),v(m.$$.fragment,t),H=s(t),v(f.$$.fragment,t),z=s(t),v(p.$$.fragment,t),S=s(t),v(u.$$.fragment,t),A=s(t),$=o(t,"P",{"data-svelte-h":!0}),w($)!=="svelte-1w1vxs9"&&($.textContent=F),B=s(t),c=o(t,"P",{"data-svelte-h":!0}),w(c)!=="svelte-bopefu"&&(c.innerHTML=G),R=s(t),g=o(t,"P",{"data-svelte-h":!0}),w(g)!=="svelte-1x73vbl"&&(g.textContent=K),q=s(t),h=o(t,"P",{"data-svelte-h":!0}),w(h)!=="svelte-rgo3yq"&&(h.textContent=O),N=s(t),_=o(t,"UL",{"data-svelte-h":!0}),w(_)!=="svelte-1w8l38s"&&(_.innerHTML=D),U=s(t),v(x.$$.fragment,t),Y=s(t),C=o(t,"P",{}),I(C).forEach(n),this.h()},h(){J(r,"name","hf:doc:metadata"),J(r,"content",ot)},m(t,e){et(document.head,r),a(t,E,e),a(t,b,e),a(t,L,e),T(m,t,e),a(t,H,e),T(f,t,e),a(t,z,e),T(p,t,e),a(t,S,e),T(u,t,e),a(t,A,e),a(t,$,e),a(t,B,e),a(t,c,e),a(t,R,e),a(t,g,e),a(t,q,e),a(t,h,e),a(t,N,e),a(t,_,e),a(t,U,e),T(x,t,e),a(t,Y,e),a(t,C,e),j=!0},p:V,i(t){j||(P(m.$$.fragment,t),P(f.$$.fragment,t),P(p.$$.fragment,t),P(u.$$.fragment,t),P(x.$$.fragment,t),j=!0)},o(t){y(m.$$.fragment,t),y(f.$$.fragment,t),y(p.$$.fragment,t),y(u.$$.fragment,t),y(x.$$.fragment,t),j=!1},d(t){t&&(n(E),n(b),n(L),n(H),n(z),n(S),n(A),n($),n(B),n(c),n(R),n(g),n(q),n(h),n(N),n(_),n(U),n(Y),n(C)),n(r),M(m,t),M(f,t),M(p,t),M(u,t),M(x,t)}}}const ot='{"title":"编码器-解码器模型","local":"编码器-解码器模型","sections":[],"depth":1}';function mt(k){return W(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gt extends X{constructor(r){super(),Z(this,r,mt,it,Q,{})}}export{gt as component}; | |
Xet Storage Details
- Size:
- 4.19 kB
- Xet hash:
- 4770a57a526cb5c9c35d1ebab3d40782adc33f3c1721fd31c4d2b36c39011604
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.