import{s as K,n as D,o as ee}from"../chunks/scheduler.9bc65507.js";import{S as te,i as le,g as o,s as n,r as H,A as ae,h as i,f as l,c as s,j as Q,u as X,x as v,k as Y,y as ne,a,v as S,d as G,t as z,w as N}from"../chunks/index.707bf1b6.js";import{C as se}from"../chunks/CodeBlock.54a9f38d.js";import{H as O}from"../chunks/Heading.342b1fa6.js";function oe(q){let p,y,w,J,r,x,f,_,m,A='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.',U,c,E="One can directly use FLAN-T5 weights without finetuning the model:",$,g,C,u,W='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.)',L,h,I="Google has released the following variants:",Z,d,P='<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>',j,M,V='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.',F,T,B='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>.',R,b,k;return r=new O({props:{title:"FLAN-T5",local:"flan-t5",headingTag:"h1"}}),f=new O({props:{title:"Overview",local:"overview",headingTag:"h2"}}),g=new se({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=o("meta"),y=n(),w=o("p"),J=n(),H(r.$$.fragment),x=n(),H(f.$$.fragment),_=n(),m=o("p"),m.innerHTML=A,U=n(),c=o("p"),c.textContent=E,$=n(),H(g.$$.fragment),C=n(),u=o("p"),u.innerHTML=W,L=n(),h=o("p"),h.textContent=I,Z=n(),d=o("ul"),d.innerHTML=P,j=n(),M=o("p"),M.innerHTML=V,F=n(),T=o("p"),T.innerHTML=B,R=n(),b=o("p"),this.h()},l(e){const t=ae("svelte-u9bgzb",document.head);p=i(t,"META",{name:!0,content:!0}),t.forEach(l),y=s(e),w=i(e,"P",{}),Q(w).forEach(l),J=s(e),X(r.$$.fragment,e),x=s(e),X(f.$$.fragment,e),_=s(e),m=i(e,"P",{"data-svelte-h":!0}),v(m)!=="svelte-7w66g2"&&(m.innerHTML=A),U=s(e),c=i(e,"P",{"data-svelte-h":!0}),v(c)!=="svelte-1d2rojm"&&(c.textContent=E),$=s(e),X(g.$$.fragment,e),C=s(e),u=i(e,"P",{"data-svelte-h":!0}),v(u)!=="svelte-1ex43ys"&&(u.innerHTML=W),L=s(e),h=i(e,"P",{"data-svelte-h":!0}),v(h)!=="svelte-1p0jqca"&&(h.textContent=I),Z=s(e),d=i(e,"UL",{"data-svelte-h":!0}),v(d)!=="svelte-1i34rzv"&&(d.innerHTML=P),j=s(e),M=i(e,"P",{"data-svelte-h":!0}),v(M)!=="svelte-lmluq6"&&(M.innerHTML=V),F=s(e),T=i(e,"P",{"data-svelte-h":!0}),v(T)!=="svelte-1u9gfp2"&&(T.innerHTML=B),R=s(e),b=i(e,"P",{}),Q(b).forEach(l),this.h()},h(){Y(p,"name","hf:doc:metadata"),Y(p,"content",ie)},m(e,t){ne(document.head,p),a(e,y,t),a(e,w,t),a(e,J,t),S(r,e,t),a(e,x,t),S(f,e,t),a(e,_,t),a(e,m,t),a(e,U,t),a(e,c,t),a(e,$,t),S(g,e,t),a(e,C,t),a(e,u,t),a(e,L,t),a(e,h,t),a(e,Z,t),a(e,d,t),a(e,j,t),a(e,M,t),a(e,F,t),a(e,T,t),a(e,R,t),a(e,b,t),k=!0},p:D,i(e){k||(G(r.$$.fragment,e),G(f.$$.fragment,e),G(g.$$.fragment,e),k=!0)},o(e){z(r.$$.fragment,e),z(f.$$.fragment,e),z(g.$$.fragment,e),k=!1},d(e){e&&(l(y),l(w),l(J),l(x),l(_),l(m),l(U),l(c),l($),l(C),l(u),l(L),l(h),l(Z),l(d),l(j),l(M),l(F),l(T),l(R),l(b)),l(p),N(r,e),N(f,e),N(g,e)}}}const ie='{"title":"FLAN-T5","local":"flan-t5","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2}],"depth":1}';function pe(q){return ee(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ge extends te{constructor(p){super(),le(this,p,pe,oe,K,{})}}export{ge as component};
