import{s as Te,n as Ce,o as ke}from"../chunks/scheduler.9bc65507.js";import{S as $e,i as Me,g as n,s as i,u as ee,A as Le,h as o,f as t,c as r,j as m,v as te,y as s,k as p,o as u,a,w as le,d as ae,t as ne,x as oe}from"../chunks/index.78c82d43.js";import{I as be}from"../chunks/IconCopyLink.bedaa44d.js";import{C as Pe}from"../chunks/CodeBlock.73e038be.js";function He(ie){let h,U,j,Z,f,c,S,g,z,P,re="T5v1.1",N,d,v,E,w,K,H,se="Overview",W,x,pe=`T5v1.1 was released in the <a href="https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511" rel="nofollow">google-research/text-to-text-transfer-transformer</a>
repository by Colin Raffel et al. It’s an improved version of the original T5 model.`,A,_,he="One can directly plug in the weights of T5v1.1 into a T5 model, like so:",B,y,J,b,fe="T5 Version 1.1 includes the following improvements compared to the original T5 model:",R,T,de=`<li><p>GEGLU activation in the feed-forward hidden layer, rather than ReLU. See <a href="https://arxiv.org/abs/2002.05202" rel="nofollow">this paper</a>.</p></li> <li><p>Dropout was turned off in pre-training (quality win). Dropout should be re-enabled during fine-tuning.</p></li> <li><p>Pre-trained on C4 only without mixing in the downstream tasks.</p></li> <li><p>No parameter sharing between the embedding and classifier layer.</p></li> <li><p>“xl” and “xxl” replace “3B” and “11B”. The model shapes are a bit different - larger <code>d_model</code> and smaller
<code>num_heads</code> and <code>d_ff</code>.</p></li>`,F,C,ue=`Note: T5 Version 1.1 was only pre-trained on <a href="https://huggingface.co/datasets/c4" rel="nofollow">C4</a> excluding any supervised
training. Therefore, this model has to be fine-tuned before it is usable on a downstream task, unlike the original T5
model. Since t5v1.1 was pre-trained unsupervisedly, there’s no real advantage to using a task prefix during single-task
fine-tuning. If you are doing multi-task fine-tuning, you should use a prefix.`,I,k,ce="Google has released the following variants:",q,$,ve='<li><p><a href="https://huggingface.co/google/t5-v1_1-small" rel="nofollow">google/t5-v1_1-small</a></p></li> <li><p><a href="https://huggingface.co/google/t5-v1_1-base" rel="nofollow">google/t5-v1_1-base</a></p></li> <li><p><a href="https://huggingface.co/google/t5-v1_1-large" rel="nofollow">google/t5-v1_1-large</a></p></li> <li><p><a href="https://huggingface.co/google/t5-v1_1-xl" rel="nofollow">google/t5-v1_1-xl</a></p></li> <li><p><a href="https://huggingface.co/google/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a>.</p></li>',O,M,me='One can refer to <a href="t5">T5’s documentation page</a> for all tips, code examples and notebooks.',Q,L,ge=`This model was contributed by <a href="https://huggingface.co/patrickvonplaten" rel="nofollow">patrickvonplaten</a>. The original code can be
found <a href="https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511" rel="nofollow">here</a>.`,V,G,X;return g=new be({}),w=new be({}),y=new Pe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFQ1Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBUNUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdDUtdjFfMS1iYXNlJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> T5ForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = T5ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;google/t5-v1_1-base&quot;</span>)`,wrap:!1}}),{c(){h=n("meta"),U=i(),j=n("p"),Z=i(),f=n("h1"),c=n("a"),S=n("span"),ee(g.$$.fragment),z=i(),P=n("span"),P.textContent=re,N=i(),d=n("h2"),v=n("a"),E=n("span"),ee(w.$$.fragment),K=i(),H=n("span"),H.textContent=se,W=i(),x=n("p"),x.innerHTML=pe,A=i(),_=n("p"),_.textContent=he,B=i(),ee(y.$$.fragment),J=i(),b=n("p"),b.textContent=fe,R=i(),T=n("ul"),T.innerHTML=de,F=i(),C=n("p"),C.innerHTML=ue,I=i(),k=n("p"),k.textContent=ce,q=i(),$=n("ul"),$.innerHTML=ve,O=i(),M=n("p"),M.innerHTML=me,Q=i(),L=n("p"),L.innerHTML=ge,V=i(),G=n("p"),this.h()},l(e){const l=Le("svelte-1phssyn",document.head);h=o(l,"META",{name:!0,content:!0}),l.forEach(t),U=r(e),j=o(e,"P",{}),m(j).forEach(t),Z=r(e),f=o(e,"H1",{class:!0});var Y=m(f);c=o(Y,"A",{id:!0,class:!0,href:!0});var we=m(c);S=o(we,"SPAN",{});var xe=m(S);te(g.$$.fragment,xe),xe.forEach(t),we.forEach(t),z=r(Y),P=o(Y,"SPAN",{"data-svelte-h":!0}),s(P)!=="svelte-1nuvg34"&&(P.textContent=re),Y.forEach(t),N=r(e),d=o(e,"H2",{class:!0});var D=m(d);v=o(D,"A",{id:!0,class:!0,href:!0});var _e=m(v);E=o(_e,"SPAN",{});var ye=m(E);te(w.$$.fragment,ye),ye.forEach(t),_e.forEach(t),K=r(D),H=o(D,"SPAN",{"data-svelte-h":!0}),s(H)!=="svelte-1jsw1pg"&&(H.textContent=se),D.forEach(t),W=r(e),x=o(e,"P",{"data-svelte-h":!0}),s(x)!=="svelte-1oes7ji"&&(x.innerHTML=pe),A=r(e),_=o(e,"P",{"data-svelte-h":!0}),s(_)!=="svelte-vf87kd"&&(_.textContent=he),B=r(e),te(y.$$.fragment,e),J=r(e),b=o(e,"P",{"data-svelte-h":!0}),s(b)!=="svelte-x07s8t"&&(b.textContent=fe),R=r(e),T=o(e,"UL",{"data-svelte-h":!0}),s(T)!=="svelte-195t2dj"&&(T.innerHTML=de),F=r(e),C=o(e,"P",{"data-svelte-h":!0}),s(C)!=="svelte-7k8pn0"&&(C.innerHTML=ue),I=r(e),k=o(e,"P",{"data-svelte-h":!0}),s(k)!=="svelte-1p0jqca"&&(k.textContent=ce),q=r(e),$=o(e,"UL",{"data-svelte-h":!0}),s($)!=="svelte-1rz8hcf"&&($.innerHTML=ve),O=r(e),M=o(e,"P",{"data-svelte-h":!0}),s(M)!=="svelte-8fydse"&&(M.innerHTML=me),Q=r(e),L=o(e,"P",{"data-svelte-h":!0}),s(L)!=="svelte-7hosb6"&&(L.innerHTML=ge),V=r(e),G=o(e,"P",{}),m(G).forEach(t),this.h()},h(){p(h,"name","hf:doc:metadata"),p(h,"content",JSON.stringify(je)),p(c,"id","t5v11"),p(c,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(c,"href","#t5v11"),p(f,"class","relative group"),p(v,"id","overview"),p(v,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(v,"href","#overview"),p(d,"class","relative group")},m(e,l){u(document.head,h),a(e,U,l),a(e,j,l),a(e,Z,l),a(e,f,l),u(f,c),u(c,S),le(g,S,null),u(f,z),u(f,P),a(e,N,l),a(e,d,l),u(d,v),u(v,E),le(w,E,null),u(d,K),u(d,H),a(e,W,l),a(e,x,l),a(e,A,l),a(e,_,l),a(e,B,l),le(y,e,l),a(e,J,l),a(e,b,l),a(e,R,l),a(e,T,l),a(e,F,l),a(e,C,l),a(e,I,l),a(e,k,l),a(e,q,l),a(e,$,l),a(e,O,l),a(e,M,l),a(e,Q,l),a(e,L,l),a(e,V,l),a(e,G,l),X=!0},p:Ce,i(e){X||(ae(g.$$.fragment,e),ae(w.$$.fragment,e),ae(y.$$.fragment,e),X=!0)},o(e){ne(g.$$.fragment,e),ne(w.$$.fragment,e),ne(y.$$.fragment,e),X=!1},d(e){e&&(t(U),t(j),t(Z),t(f),t(N),t(d),t(W),t(x),t(A),t(_),t(B),t(J),t(b),t(R),t(T),t(F),t(C),t(I),t(k),t(q),t($),t(O),t(M),t(Q),t(L),t(V),t(G)),t(h),oe(g),oe(w),oe(y,e)}}}const je={local:"t5v11",sections:[{local:"overview",title:"Overview"}],title:"T5v1.1"};function Se(ie){return ke(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ne extends $e{constructor(h){super(),Me(this,h,Se,He,Te,{})}}export{Ne as component};
