import{s as me,o as pe,n as de}from"../chunks/scheduler.25b97de1.js";import{S as ue,i as ge,g as i,s,r as L,A as fe,h as r,f as a,c as o,j as oe,u as j,x as p,k as ie,y as ce,a as l,v as k,d as D,t as Z,w as U}from"../chunks/index.d9030fc9.js";import{T as he}from"../chunks/Tip.baa67368.js";import{C as Me}from"../chunks/CodeBlock.e6cd0d95.js";import{H as re,E as be}from"../chunks/EditOnGithub.91d95064.js";function ve(E){let n,u='Refer to <a href="t5">T5’s documentation page</a> for all API references, code examples, and notebooks. For more details regarding training and evaluation of the MADLAD-400, refer to the model card.';return{c(){n=i("p"),n.innerHTML=u},l(m){n=r(m,"P",{"data-svelte-h":!0}),p(n)!=="svelte-1r5ii45"&&(n.innerHTML=u)},m(m,A){l(m,n,A)},p:de,d(m){m&&a(n)}}}function $e(E){let n,u,m,A,g,H,f,z,c,Q="MADLAD-400 models were released in the paper [MADLAD-400: A Multilingual And Document-Level Large Audited Dataset](MADLAD-400: A Multilingual And Document-Level Large Audited Dataset).",F,h,Y="The abstract from the paper is the following:",S,M,K=`<em>We introduce MADLAD-400, a manually audited, general domain 3T token monolingual dataset based on CommonCrawl, spanning 419 languages. We discuss
the limitations revealed by self-auditing MADLAD-400, and the role data auditing
had in the dataset creation process. We then train and release a 10.7B-parameter
multilingual machine translation model on 250 billion tokens covering over 450
languages using publicly available data, and find that it is competitive with models
that are significantly larger, and report the results on different domains. In addition, we train a 8B-parameter language model, and assess the results on few-shot
translation. We make the baseline models 1
available to the research community.</em>`,q,b,O='This model was added by <a href="https://huggingface.co/jbochi" rel="nofollow">Juarez Bochi</a>. The original checkpoints can be found <a href="https://github.com/google-research/google-research/tree/master/madlad_400" rel="nofollow">here</a>.',G,v,ee="This is a machine translation model that supports many low-resource languages, and that is competitive with models that are significantly larger.",J,$,te="One can directly use MADLAD-400 weights without finetuning the model:",P,w,B,y,ae="Google has released the following variants:",R,T,le='<li><p><a href="https://huggingface.co/google/madlad400-3b-mt" rel="nofollow">google/madlad400-3b-mt</a></p></li> <li><p><a href="https://huggingface.co/google/madlad400-7b-mt" rel="nofollow">google/madlad400-7b-mt</a></p></li> <li><p><a href="https://huggingface.co/google/madlad400-7b-mt-bt" rel="nofollow">google/madlad400-7b-mt-bt</a></p></li> <li><p><a href="https://huggingface.co/google/madlad400-10b-mt" rel="nofollow">google/madlad400-10b-mt</a></p></li>',W,_,ne='The original checkpoints can be found <a href="https://github.com/google-research/google-research/tree/master/madlad_400" rel="nofollow">here</a>.',I,d,X,C,N,x,V;return g=new re({props:{title:"MADLAD-400",local:"madlad-400",headingTag:"h1"}}),f=new re({props:{title:"Overview",local:"overview",headingTag:"h2"}}),w=new Me({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTSUyQyUyMEF1dG9Ub2tlbml6ZXIlMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGbWFkbGFkNDAwLTNiLW10JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRm1hZGxhZDQwMC0zYi1tdCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyJTNDMnB0JTNFJTIwSSUyMGxvdmUlMjBwaXp6YSElMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEFwcmludCh0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKG91dHB1dHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSkp",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/madlad400-3b-mt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/madlad400-3b-mt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;&lt;2pt&gt; I love pizza!&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;Eu amo pizza!&#x27;</span>]`,wrap:!1}}),d=new he({props:{$$slots:{default:[ve]},$$scope:{ctx:E}}}),C=new be({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/madlad-400.md"}}),{c(){n=i("meta"),u=s(),m=i("p"),A=s(),L(g.$$.fragment),H=s(),L(f.$$.fragment),z=s(),c=i("p"),c.textContent=Q,F=s(),h=i("p"),h.textContent=Y,S=s(),M=i("p"),M.innerHTML=K,q=s(),b=i("p"),b.innerHTML=O,G=s(),v=i("p"),v.textContent=ee,J=s(),$=i("p"),$.textContent=te,P=s(),L(w.$$.fragment),B=s(),y=i("p"),y.textContent=ae,R=s(),T=i("ul"),T.innerHTML=le,W=s(),_=i("p"),_.innerHTML=ne,I=s(),L(d.$$.fragment),X=s(),L(C.$$.fragment),N=s(),x=i("p"),this.h()},l(e){const t=fe("svelte-u9bgzb",document.head);n=r(t,"META",{name:!0,content:!0}),t.forEach(a),u=o(e),m=r(e,"P",{}),oe(m).forEach(a),A=o(e),j(g.$$.fragment,e),H=o(e),j(f.$$.fragment,e),z=o(e),c=r(e,"P",{"data-svelte-h":!0}),p(c)!=="svelte-s429a9"&&(c.textContent=Q),F=o(e),h=r(e,"P",{"data-svelte-h":!0}),p(h)!=="svelte-auuxi2"&&(h.textContent=Y),S=o(e),M=r(e,"P",{"data-svelte-h":!0}),p(M)!=="svelte-44wcro"&&(M.innerHTML=K),q=o(e),b=r(e,"P",{"data-svelte-h":!0}),p(b)!=="svelte-1qcpk4i"&&(b.innerHTML=O),G=o(e),v=r(e,"P",{"data-svelte-h":!0}),p(v)!=="svelte-1yvayop"&&(v.textContent=ee),J=o(e),$=r(e,"P",{"data-svelte-h":!0}),p($)!=="svelte-1iz0fs1"&&($.textContent=te),P=o(e),j(w.$$.fragment,e),B=o(e),y=r(e,"P",{"data-svelte-h":!0}),p(y)!=="svelte-1p0jqca"&&(y.textContent=ae),R=o(e),T=r(e,"UL",{"data-svelte-h":!0}),p(T)!=="svelte-1s9lf6e"&&(T.innerHTML=le),W=o(e),_=r(e,"P",{"data-svelte-h":!0}),p(_)!=="svelte-ffgnqr"&&(_.innerHTML=ne),I=o(e),j(d.$$.fragment,e),X=o(e),j(C.$$.fragment,e),N=o(e),x=r(e,"P",{}),oe(x).forEach(a),this.h()},h(){ie(n,"name","hf:doc:metadata"),ie(n,"content",we)},m(e,t){ce(document.head,n),l(e,u,t),l(e,m,t),l(e,A,t),k(g,e,t),l(e,H,t),k(f,e,t),l(e,z,t),l(e,c,t),l(e,F,t),l(e,h,t),l(e,S,t),l(e,M,t),l(e,q,t),l(e,b,t),l(e,G,t),l(e,v,t),l(e,J,t),l(e,$,t),l(e,P,t),k(w,e,t),l(e,B,t),l(e,y,t),l(e,R,t),l(e,T,t),l(e,W,t),l(e,_,t),l(e,I,t),k(d,e,t),l(e,X,t),k(C,e,t),l(e,N,t),l(e,x,t),V=!0},p(e,[t]){const se={};t&2&&(se.$$scope={dirty:t,ctx:e}),d.$set(se)},i(e){V||(D(g.$$.fragment,e),D(f.$$.fragment,e),D(w.$$.fragment,e),D(d.$$.fragment,e),D(C.$$.fragment,e),V=!0)},o(e){Z(g.$$.fragment,e),Z(f.$$.fragment,e),Z(w.$$.fragment,e),Z(d.$$.fragment,e),Z(C.$$.fragment,e),V=!1},d(e){e&&(a(u),a(m),a(A),a(H),a(z),a(c),a(F),a(h),a(S),a(M),a(q),a(b),a(G),a(v),a(J),a($),a(P),a(B),a(y),a(R),a(T),a(W),a(_),a(I),a(X),a(N),a(x)),a(n),U(g,e),U(f,e),U(w,e),U(d,e),U(C,e)}}}const we='{"title":"MADLAD-400","local":"madlad-400","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2}],"depth":1}';function ye(E){return pe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Le extends ue{constructor(n){super(),ge(this,n,ye,$e,me,{})}}export{Le as component};
