import{s as ae,n as oe,o as ie}from"../chunks/scheduler.9bc65507.js";import{S as se,i as re,g as i,s as a,r as S,A as pe,h as s,f as l,c as o,j as te,u as F,x as p,k as le,y as fe,a as n,v as q,d as E,t as N,w as Q}from"../chunks/index.707bf1b6.js";import{C as me}from"../chunks/CodeBlock.54a9f38d.js";import{H as ne}from"../chunks/Heading.342b1fa6.js";function de(I){let r,$,b,C,f,k,m,M,d,O=`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.`,L,g,V="One can directly plug in the weights of T5v1.1 into a T5 model, like so:",H,h,P,u,X="T5 Version 1.1 includes the following improvements compared to the original T5 model:",j,c,Y=`<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>`,G,v,z=`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.`,U,x,A="Google has released the following variants:",Z,_,D='<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>',W,w,K='One can refer to <a href="t5">T5’s documentation page</a> for all tips, code examples and notebooks.',B,T,ee=`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>.`,J,y,R;return f=new ne({props:{title:"T5v1.1",local:"t5v11",headingTag:"h1"}}),m=new ne({props:{title:"Overview",local:"overview",headingTag:"h2"}}),h=new me({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(){r=i("meta"),$=a(),b=i("p"),C=a(),S(f.$$.fragment),k=a(),S(m.$$.fragment),M=a(),d=i("p"),d.innerHTML=O,L=a(),g=i("p"),g.textContent=V,H=a(),S(h.$$.fragment),P=a(),u=i("p"),u.textContent=X,j=a(),c=i("ul"),c.innerHTML=Y,G=a(),v=i("p"),v.innerHTML=z,U=a(),x=i("p"),x.textContent=A,Z=a(),_=i("ul"),_.innerHTML=D,W=a(),w=i("p"),w.innerHTML=K,B=a(),T=i("p"),T.innerHTML=ee,J=a(),y=i("p"),this.h()},l(e){const t=pe("svelte-u9bgzb",document.head);r=s(t,"META",{name:!0,content:!0}),t.forEach(l),$=o(e),b=s(e,"P",{}),te(b).forEach(l),C=o(e),F(f.$$.fragment,e),k=o(e),F(m.$$.fragment,e),M=o(e),d=s(e,"P",{"data-svelte-h":!0}),p(d)!=="svelte-1oes7ji"&&(d.innerHTML=O),L=o(e),g=s(e,"P",{"data-svelte-h":!0}),p(g)!=="svelte-vf87kd"&&(g.textContent=V),H=o(e),F(h.$$.fragment,e),P=o(e),u=s(e,"P",{"data-svelte-h":!0}),p(u)!=="svelte-x07s8t"&&(u.textContent=X),j=o(e),c=s(e,"UL",{"data-svelte-h":!0}),p(c)!=="svelte-195t2dj"&&(c.innerHTML=Y),G=o(e),v=s(e,"P",{"data-svelte-h":!0}),p(v)!=="svelte-7k8pn0"&&(v.innerHTML=z),U=o(e),x=s(e,"P",{"data-svelte-h":!0}),p(x)!=="svelte-1p0jqca"&&(x.textContent=A),Z=o(e),_=s(e,"UL",{"data-svelte-h":!0}),p(_)!=="svelte-1rz8hcf"&&(_.innerHTML=D),W=o(e),w=s(e,"P",{"data-svelte-h":!0}),p(w)!=="svelte-8fydse"&&(w.innerHTML=K),B=o(e),T=s(e,"P",{"data-svelte-h":!0}),p(T)!=="svelte-7hosb6"&&(T.innerHTML=ee),J=o(e),y=s(e,"P",{}),te(y).forEach(l),this.h()},h(){le(r,"name","hf:doc:metadata"),le(r,"content",ge)},m(e,t){fe(document.head,r),n(e,$,t),n(e,b,t),n(e,C,t),q(f,e,t),n(e,k,t),q(m,e,t),n(e,M,t),n(e,d,t),n(e,L,t),n(e,g,t),n(e,H,t),q(h,e,t),n(e,P,t),n(e,u,t),n(e,j,t),n(e,c,t),n(e,G,t),n(e,v,t),n(e,U,t),n(e,x,t),n(e,Z,t),n(e,_,t),n(e,W,t),n(e,w,t),n(e,B,t),n(e,T,t),n(e,J,t),n(e,y,t),R=!0},p:oe,i(e){R||(E(f.$$.fragment,e),E(m.$$.fragment,e),E(h.$$.fragment,e),R=!0)},o(e){N(f.$$.fragment,e),N(m.$$.fragment,e),N(h.$$.fragment,e),R=!1},d(e){e&&(l($),l(b),l(C),l(k),l(M),l(d),l(L),l(g),l(H),l(P),l(u),l(j),l(c),l(G),l(v),l(U),l(x),l(Z),l(_),l(W),l(w),l(B),l(T),l(J),l(y)),l(r),Q(f,e),Q(m,e),Q(h,e)}}}const ge='{"title":"T5v1.1","local":"t5v11","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2}],"depth":1}';function he(I){return ie(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _e extends se{constructor(r){super(),re(this,r,he,de,ae,{})}}export{_e as component};
