import{s as ve,n as we,o as ye}from"../chunks/scheduler.9bc65507.js";import{S as Me,i as Te,g as n,s as o,u as O,A as be,h as s,f as t,c as r,j as d,v as Y,y as f,k as i,o as u,a,w as K,d as D,t as ee,x as te}from"../chunks/index.78c82d43.js";import{I as de}from"../chunks/IconCopyLink.bedaa44d.js";import{C as xe}from"../chunks/CodeBlock.73e038be.js";function _e(le){let p,F,j,R,h,m,L,v,B,k,ae="FLAN-T5",S,c,g,$,w,Q,U,ne="Overview",H,y,se='FLAN-T5 was released in the paper <a href="https://arxiv.org/pdf/2210.11416.pdf" rel="nofollow">Scaling Instruction-Finetuned Language Models</a> - it is an enhanced version of T5 that has been finetuned in a mixture of tasks.',A,M,oe="One can directly use FLAN-T5 weights without finetuning the model:",E,T,N,b,re='FLAN-T5 includes the same improvements as T5 version 1.1 (see <a href="https://huggingface.co/docs/transformers/model_doc/t5v1.1" rel="nofollow">here</a> for the full details of the model’s improvements.)',X,x,ie="Google has released the following variants:",G,_,pe='<li><p><a href="https://huggingface.co/google/flan-t5-small" rel="nofollow">google/flan-t5-small</a></p></li> <li><p><a href="https://huggingface.co/google/flan-t5-base" rel="nofollow">google/flan-t5-base</a></p></li> <li><p><a href="https://huggingface.co/google/flan-t5-large" rel="nofollow">google/flan-t5-large</a></p></li> <li><p><a href="https://huggingface.co/google/flan-t5-xl" rel="nofollow">google/flan-t5-xl</a></p></li> <li><p><a href="https://huggingface.co/google/flan-t5-xxl" rel="nofollow">google/flan-t5-xxl</a>.</p></li>',P,J,he='One can refer to <a href="t5">T5’s documentation page</a> for all tips, code examples and notebooks. As well as the FLAN-T5 model card for more details regarding training and evaluation of the model.',q,C,ce='The original checkpoints can be found <a href="https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints" rel="nofollow">here</a>.',z,Z,I;return v=new de({}),w=new de({}),T=new xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTSUyQyUyMEF1dG9Ub2tlbml6ZXIlMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZmxhbi10NS1zbWFsbCUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZmbGFuLXQ1LXNtYWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJBJTIwc3RlcCUyMGJ5JTIwc3RlcCUyMHJlY2lwZSUyMHRvJTIwbWFrZSUyMGJvbG9nbmVzZSUyMHBhc3RhJTNBJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMpJTBBcHJpbnQodG9rZW5pemVyLmJhdGNoX2RlY29kZShvdXRwdXRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;google/flan-t5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/flan-t5-small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;A step by step recipe to make bolognese pasta:&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer.batch_decode(outputs, skip_special_tokens=<span class="hljs-literal">True</span>))
[<span class="hljs-string">&#x27;Pour a cup of bolognese into a large bowl and add the pasta&#x27;</span>]`,wrap:!1}}),{c(){p=n("meta"),F=o(),j=n("p"),R=o(),h=n("h1"),m=n("a"),L=n("span"),O(v.$$.fragment),B=o(),k=n("span"),k.textContent=ae,S=o(),c=n("h2"),g=n("a"),$=n("span"),O(w.$$.fragment),Q=o(),U=n("span"),U.textContent=ne,H=o(),y=n("p"),y.innerHTML=se,A=o(),M=n("p"),M.textContent=oe,E=o(),O(T.$$.fragment),N=o(),b=n("p"),b.innerHTML=re,X=o(),x=n("p"),x.textContent=ie,G=o(),_=n("ul"),_.innerHTML=pe,P=o(),J=n("p"),J.innerHTML=he,q=o(),C=n("p"),C.innerHTML=ce,z=o(),Z=n("p"),this.h()},l(e){const l=be("svelte-1phssyn",document.head);p=s(l,"META",{name:!0,content:!0}),l.forEach(t),F=r(e),j=s(e,"P",{}),d(j).forEach(t),R=r(e),h=s(e,"H1",{class:!0});var W=d(h);m=s(W,"A",{id:!0,class:!0,href:!0});var fe=d(m);L=s(fe,"SPAN",{});var ue=d(L);Y(v.$$.fragment,ue),ue.forEach(t),fe.forEach(t),B=r(W),k=s(W,"SPAN",{"data-svelte-h":!0}),f(k)!=="svelte-1diljao"&&(k.textContent=ae),W.forEach(t),S=r(e),c=s(e,"H2",{class:!0});var V=d(c);g=s(V,"A",{id:!0,class:!0,href:!0});var me=d(g);$=s(me,"SPAN",{});var ge=d($);Y(w.$$.fragment,ge),ge.forEach(t),me.forEach(t),Q=r(V),U=s(V,"SPAN",{"data-svelte-h":!0}),f(U)!=="svelte-1jsw1pg"&&(U.textContent=ne),V.forEach(t),H=r(e),y=s(e,"P",{"data-svelte-h":!0}),f(y)!=="svelte-7w66g2"&&(y.innerHTML=se),A=r(e),M=s(e,"P",{"data-svelte-h":!0}),f(M)!=="svelte-1d2rojm"&&(M.textContent=oe),E=r(e),Y(T.$$.fragment,e),N=r(e),b=s(e,"P",{"data-svelte-h":!0}),f(b)!=="svelte-1ex43ys"&&(b.innerHTML=re),X=r(e),x=s(e,"P",{"data-svelte-h":!0}),f(x)!=="svelte-1p0jqca"&&(x.textContent=ie),G=r(e),_=s(e,"UL",{"data-svelte-h":!0}),f(_)!=="svelte-1i34rzv"&&(_.innerHTML=pe),P=r(e),J=s(e,"P",{"data-svelte-h":!0}),f(J)!=="svelte-lmluq6"&&(J.innerHTML=he),q=r(e),C=s(e,"P",{"data-svelte-h":!0}),f(C)!=="svelte-1u9gfp2"&&(C.innerHTML=ce),z=r(e),Z=s(e,"P",{}),d(Z).forEach(t),this.h()},h(){i(p,"name","hf:doc:metadata"),i(p,"content",JSON.stringify(Je)),i(m,"id","flant5"),i(m,"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"),i(m,"href","#flant5"),i(h,"class","relative group"),i(g,"id","overview"),i(g,"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"),i(g,"href","#overview"),i(c,"class","relative group")},m(e,l){u(document.head,p),a(e,F,l),a(e,j,l),a(e,R,l),a(e,h,l),u(h,m),u(m,L),K(v,L,null),u(h,B),u(h,k),a(e,S,l),a(e,c,l),u(c,g),u(g,$),K(w,$,null),u(c,Q),u(c,U),a(e,H,l),a(e,y,l),a(e,A,l),a(e,M,l),a(e,E,l),K(T,e,l),a(e,N,l),a(e,b,l),a(e,X,l),a(e,x,l),a(e,G,l),a(e,_,l),a(e,P,l),a(e,J,l),a(e,q,l),a(e,C,l),a(e,z,l),a(e,Z,l),I=!0},p:we,i(e){I||(D(v.$$.fragment,e),D(w.$$.fragment,e),D(T.$$.fragment,e),I=!0)},o(e){ee(v.$$.fragment,e),ee(w.$$.fragment,e),ee(T.$$.fragment,e),I=!1},d(e){e&&(t(F),t(j),t(R),t(h),t(S),t(c),t(H),t(y),t(A),t(M),t(E),t(N),t(b),t(X),t(x),t(G),t(_),t(P),t(J),t(q),t(C),t(z),t(Z)),t(p),te(v),te(w),te(T,e)}}}const Je={local:"flant5",sections:[{local:"overview",title:"Overview"}],title:"FLAN-T5"};function Ce(le){return ye(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $e extends Me{constructor(p){super(),Te(this,p,Ce,_e,ve,{})}}export{$e as component};
