Buckets:

rtrm's picture
download
raw
6.42 kB
import{s as ee,o as te,n as le}from"../chunks/scheduler.25b97de1.js";import{S as ae,i as ne,g as r,s,r as _,A as se,h as p,f as l,c as o,j as O,u as x,x as w,k as K,y as oe,a,v as U,d as C,t as L,w as Z}from"../chunks/index.d9030fc9.js";import{T as ie}from"../chunks/Tip.baa67368.js";import{C as re}from"../chunks/CodeBlock.e6cd0d95.js";import{H as D,E as pe}from"../chunks/EditOnGithub.91d95064.js";function fe(j){let n,m='Refer to <a href="t5">T5’s documentation page</a> for all API reference, code examples and notebooks. For more details regarding training and evaluation of the FLAN-T5, refer to the model card.';return{c(){n=r("p"),n.innerHTML=m},l(i){n=p(i,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1nt6z6l"&&(n.innerHTML=m)},m(i,y){a(i,n,y)},p:le,d(i){i&&l(n)}}}function me(j){let n,m,i,y,g,F,c,R,u,q='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.',k,h,I="One can directly use FLAN-T5 weights without finetuning the model:",H,d,X,T,P='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.)',G,$,V="Google has released the following variants:",S,b,B='<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>',z,M,Q='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>.',E,f,N,v,A,J,W;return g=new D({props:{title:"FLAN-T5",local:"flan-t5",headingTag:"h1"}}),c=new D({props:{title:"Overview",local:"overview",headingTag:"h2"}}),d=new re({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}}),f=new ie({props:{$$slots:{default:[fe]},$$scope:{ctx:j}}}),v=new pe({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/flan-t5.md"}}),{c(){n=r("meta"),m=s(),i=r("p"),y=s(),_(g.$$.fragment),F=s(),_(c.$$.fragment),R=s(),u=r("p"),u.innerHTML=q,k=s(),h=r("p"),h.textContent=I,H=s(),_(d.$$.fragment),X=s(),T=r("p"),T.innerHTML=P,G=s(),$=r("p"),$.textContent=V,S=s(),b=r("ul"),b.innerHTML=B,z=s(),M=r("p"),M.innerHTML=Q,E=s(),_(f.$$.fragment),N=s(),_(v.$$.fragment),A=s(),J=r("p"),this.h()},l(e){const t=se("svelte-u9bgzb",document.head);n=p(t,"META",{name:!0,content:!0}),t.forEach(l),m=o(e),i=p(e,"P",{}),O(i).forEach(l),y=o(e),x(g.$$.fragment,e),F=o(e),x(c.$$.fragment,e),R=o(e),u=p(e,"P",{"data-svelte-h":!0}),w(u)!=="svelte-7w66g2"&&(u.innerHTML=q),k=o(e),h=p(e,"P",{"data-svelte-h":!0}),w(h)!=="svelte-1d2rojm"&&(h.textContent=I),H=o(e),x(d.$$.fragment,e),X=o(e),T=p(e,"P",{"data-svelte-h":!0}),w(T)!=="svelte-1ex43ys"&&(T.innerHTML=P),G=o(e),$=p(e,"P",{"data-svelte-h":!0}),w($)!=="svelte-1p0jqca"&&($.textContent=V),S=o(e),b=p(e,"UL",{"data-svelte-h":!0}),w(b)!=="svelte-1i34rzv"&&(b.innerHTML=B),z=o(e),M=p(e,"P",{"data-svelte-h":!0}),w(M)!=="svelte-1u9gfp2"&&(M.innerHTML=Q),E=o(e),x(f.$$.fragment,e),N=o(e),x(v.$$.fragment,e),A=o(e),J=p(e,"P",{}),O(J).forEach(l),this.h()},h(){K(n,"name","hf:doc:metadata"),K(n,"content",ge)},m(e,t){oe(document.head,n),a(e,m,t),a(e,i,t),a(e,y,t),U(g,e,t),a(e,F,t),U(c,e,t),a(e,R,t),a(e,u,t),a(e,k,t),a(e,h,t),a(e,H,t),U(d,e,t),a(e,X,t),a(e,T,t),a(e,G,t),a(e,$,t),a(e,S,t),a(e,b,t),a(e,z,t),a(e,M,t),a(e,E,t),U(f,e,t),a(e,N,t),U(v,e,t),a(e,A,t),a(e,J,t),W=!0},p(e,[t]){const Y={};t&2&&(Y.$$scope={dirty:t,ctx:e}),f.$set(Y)},i(e){W||(C(g.$$.fragment,e),C(c.$$.fragment,e),C(d.$$.fragment,e),C(f.$$.fragment,e),C(v.$$.fragment,e),W=!0)},o(e){L(g.$$.fragment,e),L(c.$$.fragment,e),L(d.$$.fragment,e),L(f.$$.fragment,e),L(v.$$.fragment,e),W=!1},d(e){e&&(l(m),l(i),l(y),l(F),l(R),l(u),l(k),l(h),l(H),l(X),l(T),l(G),l($),l(S),l(b),l(z),l(M),l(E),l(N),l(A),l(J)),l(n),Z(g,e),Z(c,e),Z(d,e),Z(f,e),Z(v,e)}}}const ge='{"title":"FLAN-T5","local":"flan-t5","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2}],"depth":1}';function ce(j){return te(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class be extends ae{constructor(n){super(),ne(this,n,ce,me,ee,{})}}export{be as component};

Xet Storage Details

Size:
6.42 kB
·
Xet hash:
5caa9dadf001cc87b8c7794742f3d97865f15bfd43c8569ae8bd71e483fa52e1

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.