import{S as mi,i as ui,s as fi,e as n,k as c,w as y,t as r,M as gi,c as s,d as o,m as h,a,x as b,h as i,b as d,G as e,g as u,y as T,q as v,o as k,B as w,v as _i,L as Mn}from"../../chunks/vendor-hf-doc-builder.js";import{T as pi}from"../../chunks/Tip-hf-doc-builder.js";import{D as Q}from"../../chunks/Docstring-hf-doc-builder.js";import{C as xt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as we}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as _n}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Mi(U){let m,E,_,f,M;return f=new xt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME0yTTEwMENvbmZpZyUyQyUyME0yTTEwME1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyME0yTTEwMCUyMGZhY2Vib29rJTJGbTJtMTAwXzQxOE0lMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwTTJNMTAwQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGZhY2Vib29rJTJGbTJtMTAwXzQxOE0lMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyME0yTTEwME1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> M2M100Config, M2M100Model

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a M2M100 facebook/m2m100_418M style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = M2M100Config()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/m2m100_418M style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = M2M100Model(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){m=n("p"),E=r("Example:"),_=c(),y(f.$$.fragment)},l(l){m=s(l,"P",{});var g=a(m);E=i(g,"Example:"),g.forEach(o),_=h(l),b(f.$$.fragment,l)},m(l,g){u(l,m,g),e(m,E),u(l,_,g),T(f,l,g),M=!0},p:Mn,i(l){M||(v(f.$$.fragment,l),M=!0)},o(l){k(f.$$.fragment,l),M=!1},d(l){l&&o(m),l&&o(_),w(f,l)}}}function yi(U){let m,E,_,f,M;return f=new xt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME0yTTEwMEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUyQyUyME0yTTEwMFRva2VuaXplciUwQSUwQW1vZGVsJTIwJTNEJTIwTTJNMTAwRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm0ybTEwMF80MThNJTIyKSUwQXRva2VuaXplciUyMCUzRCUyME0yTTEwMFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtMm0xMDBfNDE4TSUyMiUyQyUyMHNyY19sYW5nJTNEJTIyZW4lMjIlMkMlMjB0Z3RfbGFuZyUzRCUyMnJvJTIyKSUwQXNyY190ZXh0JTIwJTNEJTIwJTIyJTIwVU4lMjBDaGllZiUyMFNheXMlMjBUaGVyZSUyMElzJTIwTm8lMjBNaWxpdGFyeSUyMFNvbHV0aW9uJTIwaW4lMjBTeXJpYSUyMiUwQXRndF90ZXh0JTIwJTNEJTIwJTIyJUM1JTlFZWZ1bCUyME9OVSUyMGRlY2xhciVDNCU4MyUyMGMlQzQlODMlMjBudSUyMGV4aXN0JUM0JTgzJTIwbyUyMHNvbHUlQzUlQTNpZSUyMG1pbGl0YXIlQzQlODMlMjAlQzMlQUVuJTIwU2lyaWElMjIlMEFtb2RlbF9pbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoc3JjX3RleHQlMkMlMjB0ZXh0X3RhcmdldCUzRHRndF90ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiptb2RlbF9pbnB1dHMpJTIwJTIwJTIzJTIwc2hvdWxkJTIwd29yaw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> M2M100ForConditionalGeneration, M2M100Tokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = M2M100ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = M2M100Tokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>, src_lang=<span class="hljs-string">&quot;en&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>src_text = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tgt_text = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**model_inputs)  <span class="hljs-comment"># should work</span>`}}),{c(){m=n("p"),E=r("Examples:"),_=c(),y(f.$$.fragment)},l(l){m=s(l,"P",{});var g=a(m);E=i(g,"Examples:"),g.forEach(o),_=h(l),b(f.$$.fragment,l)},m(l,g){u(l,m,g),e(m,E),u(l,_,g),T(f,l,g),M=!0},p:Mn,i(l){M||(v(f.$$.fragment,l),M=!0)},o(l){k(f.$$.fragment,l),M=!1},d(l){l&&o(m),l&&o(_),w(f,l)}}}function bi(U){let m,E,_,f,M;return{c(){m=n("p"),E=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=r("Module"),M=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){m=s(l,"P",{});var g=a(m);E=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(g,"CODE",{});var N=a(_);f=i(N,"Module"),N.forEach(o),M=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(l,g){u(l,m,g),e(m,E),e(m,_),e(_,f),e(m,M)},d(l){l&&o(m)}}}function Ti(U){let m,E,_,f,M;return f=new xt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNMk0xMDBNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtMm0xMDBfNDE4TSUyMiklMEFtb2RlbCUyMCUzRCUyME0yTTEwME1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm0ybTEwMF80MThNJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, M2M100Model
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = M2M100Model.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){m=n("p"),E=r("Example:"),_=c(),y(f.$$.fragment)},l(l){m=s(l,"P",{});var g=a(m);E=i(g,"Example:"),g.forEach(o),_=h(l),b(f.$$.fragment,l)},m(l,g){u(l,m,g),e(m,E),u(l,_,g),T(f,l,g),M=!0},p:Mn,i(l){M||(v(f.$$.fragment,l),M=!0)},o(l){k(f.$$.fragment,l),M=!1},d(l){l&&o(m),l&&o(_),w(f,l)}}}function vi(U){let m,E,_,f,M;return{c(){m=n("p"),E=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=r("Module"),M=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){m=s(l,"P",{});var g=a(m);E=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(g,"CODE",{});var N=a(_);f=i(N,"Module"),N.forEach(o),M=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(l,g){u(l,m,g),e(m,E),e(m,_),e(_,f),e(m,M)},d(l){l&&o(m)}}}function ki(U){let m,E,_,f,M;return f=new xt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNMk0xMDBGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyME0yTTEwMEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtMm0xMDBfNDE4TSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm0ybTEwMF80MThNJTIyKSUwQSUwQXRleHRfdG9fdHJhbnNsYXRlJTIwJTNEJTIwJTIyTGlmZSUyMGlzJTIwbGlrZSUyMGElMjBib3glMjBvZiUyMGNob2NvbGF0ZXMlMjIlMEFtb2RlbF9pbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dF90b190cmFuc2xhdGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMHRyYW5zbGF0ZSUyMHRvJTIwRnJlbmNoJTBBZ2VuX3Rva2VucyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqbW9kZWxfaW5wdXRzJTJDJTIwZm9yY2VkX2Jvc190b2tlbl9pZCUzRHRva2VuaXplci5nZXRfbGFuZ19pZCglMjJmciUyMikpJTBBcHJpbnQodG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5fdG9rZW5zJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, M2M100ForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = M2M100ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text_to_translate = <span class="hljs-string">&quot;Life is like a box of chocolates&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer(text_to_translate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># translate to French</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>gen_tokens = model.generate(**model_inputs, forced_bos_token_id=tokenizer.get_lang_id(<span class="hljs-string">&quot;fr&quot;</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer.batch_decode(gen_tokens, skip_special_tokens=<span class="hljs-literal">True</span>))`}}),{c(){m=n("p"),E=r("Translation example:"),_=c(),y(f.$$.fragment)},l(l){m=s(l,"P",{});var g=a(m);E=i(g,"Translation example:"),g.forEach(o),_=h(l),b(f.$$.fragment,l)},m(l,g){u(l,m,g),e(m,E),u(l,_,g),T(f,l,g),M=!0},p:Mn,i(l){M||(v(f.$$.fragment,l),M=!0)},o(l){k(f.$$.fragment,l),M=!1},d(l){l&&o(m),l&&o(_),w(f,l)}}}function wi(U){let m,E,_,f,M,l,g,N,yn,Eo,S,ee,Zt,Ee,bn,It,Tn,zo,te,vn,ze,kn,wn,$o,ct,En,Jo,ht,Ft,zn,Uo,oe,$n,$e,Jn,Un,qo,X,ne,Rt,Je,qn,Gt,Cn,Co,Z,jn,Nt,xn,Zn,Wt,In,Fn,At,Rn,Gn,jo,q,Nn,pt,Wn,An,Qt,Qn,Sn,St,Xn,Bn,Xt,On,Dn,xo,mt,Bt,Pn,Zo,Ue,Io,ut,qe,Ot,Vn,Ln,J,Hn,Dt,Yn,Kn,Pt,es,ts,Vt,os,ns,Lt,ss,as,Ht,rs,is,Fo,Ce,Ro,B,se,Yt,je,ls,Kt,ds,Go,ae,eo,ft,cs,hs,to,gt,ps,No,O,re,oo,xe,ms,no,us,Wo,C,Ze,fs,D,gs,_t,_s,Ms,Ie,ys,bs,Ts,P,vs,Mt,ks,ws,yt,Es,zs,$s,ie,Ao,V,le,so,Fe,Js,ao,Us,Qo,z,Re,qs,Ge,Cs,Ne,js,xs,Zs,We,Is,bt,Fs,Rs,Gs,de,Ns,I,Ae,Ws,Qe,As,ro,Qs,Ss,Xs,Se,Xe,io,Bs,Os,lo,Ds,Ps,Be,co,Vs,Ls,ho,Hs,Ys,po,Ks,ea,ce,Oe,ta,De,oa,mo,na,sa,aa,W,Pe,ra,Tt,ia,vt,la,da,uo,ca,ha,kt,Ve,So,L,he,fo,Le,pa,go,ma,Xo,j,He,ua,Ye,fa,wt,ga,_a,Ma,Ke,ya,et,ba,Ta,va,F,tt,ka,H,wa,Et,Ea,za,_o,$a,Ja,Ua,pe,qa,me,Bo,Y,ue,Mo,ot,Ca,yo,ja,Oo,x,nt,xa,st,Za,zt,Ia,Fa,Ra,at,Ga,rt,Na,Wa,Aa,R,it,Qa,K,Sa,$t,Xa,Ba,bo,Oa,Da,Pa,fe,Va,ge,Do;return l=new we({}),Ee=new we({}),Je=new we({}),Ue=new xt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME0yTTEwMENvbmZpZyUyQyUyME0yTTEwMEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUyQyUyME0yTTEwMFRva2VuaXplciUwQSUwQW1vZGVsJTIwJTNEJTIwTTJNMTAwRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm0ybTEwMF80MThNJTIyKSUwQXRva2VuaXplciUyMCUzRCUyME0yTTEwMFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtMm0xMDBfNDE4TSUyMiUyQyUyMHNyY19sYW5nJTNEJTIyZW4lMjIlMkMlMjB0Z3RfbGFuZyUzRCUyMmZyJTIyKSUwQSUwQXNyY190ZXh0JTIwJTNEJTIwJTIyTGlmZSUyMGlzJTIwbGlrZSUyMGElMjBib3glMjBvZiUyMGNob2NvbGF0ZXMuJTIyJTBBdGd0X3RleHQlMjAlM0QlMjAlMjJMYSUyMHZpZSUyMGVzdCUyMGNvbW1lJTIwdW5lJTIwYm8lQzMlQUV0ZSUyMGRlJTIwY2hvY29sYXQuJTIyJTBBJTBBbW9kZWxfaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHNyY190ZXh0JTJDJTIwdGV4dF90YXJnZXQlM0R0Z3RfdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqbW9kZWxfaW5wdXRzKS5sb3NzJTIwJTIwJTIzJTIwZm9yd2FyZCUyMHBhc3M=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> M2M100Config, M2M100ForConditionalGeneration, M2M100Tokenizer

model = M2M100ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>)
tokenizer = M2M100Tokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>, src_lang=<span class="hljs-string">&quot;en&quot;</span>, tgt_lang=<span class="hljs-string">&quot;fr&quot;</span>)

src_text = <span class="hljs-string">&quot;Life is like a box of chocolates.&quot;</span>
tgt_text = <span class="hljs-string">&quot;La vie est comme une bo\xEEte de chocolat.&quot;</span>

model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

loss = model(**model_inputs).loss  <span class="hljs-comment"># forward pass</span>`}}),Ce=new xt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME0yTTEwMEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUyQyUyME0yTTEwMFRva2VuaXplciUwQSUwQWhpX3RleHQlMjAlM0QlMjAlMjIlRTAlQTQlOUMlRTAlQTUlODAlRTAlQTQlQjUlRTAlQTQlQTglMjAlRTAlQTQlOEYlRTAlQTQlOTUlMjAlRTAlQTQlOUElRTAlQTUlODklRTAlQTQlOTUlRTAlQTQlQjIlRTAlQTUlODclRTAlQTQlOUYlMjAlRTAlQTQlQUMlRTAlQTUlODklRTAlQTQlOTUlRTAlQTUlOEQlRTAlQTQlQjglMjAlRTAlQTQlOTUlRTAlQTUlODAlMjAlRTAlQTQlQTQlRTAlQTQlQjAlRTAlQTQlQjklMjAlRTAlQTQlQjklRTAlQTUlODglRTAlQTUlQTQlMjIlMEFjaGluZXNlX3RleHQlMjAlM0QlMjAlMjIlRTclOTQlOUYlRTYlQjQlQkIlRTUlQjAlQjElRTUlODMlOEYlRTQlQjglODAlRTclOUIlOTIlRTUlQjclQTclRTUlODUlOEIlRTUlOEElOUIlRTMlODAlODIlMjIlMEElMEFtb2RlbCUyMCUzRCUyME0yTTEwMEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtMm0xMDBfNDE4TSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBNMk0xMDBUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbTJtMTAwXzQxOE0lMjIpJTBBJTBBJTIzJTIwdHJhbnNsYXRlJTIwSGluZGklMjB0byUyMEZyZW5jaCUwQXRva2VuaXplci5zcmNfbGFuZyUyMCUzRCUyMCUyMmhpJTIyJTBBZW5jb2RlZF9oaSUyMCUzRCUyMHRva2VuaXplcihoaV90ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFnZW5lcmF0ZWRfdG9rZW5zJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKiplbmNvZGVkX2hpJTJDJTIwZm9yY2VkX2Jvc190b2tlbl9pZCUzRHRva2VuaXplci5nZXRfbGFuZ19pZCglMjJmciUyMikpJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfdG9rZW5zJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBJTBBJTIzJTIwdHJhbnNsYXRlJTIwQ2hpbmVzZSUyMHRvJTIwRW5nbGlzaCUwQXRva2VuaXplci5zcmNfbGFuZyUyMCUzRCUyMCUyMnpoJTIyJTBBZW5jb2RlZF96aCUyMCUzRCUyMHRva2VuaXplcihjaGluZXNlX3RleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWdlbmVyYXRlZF90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmVuY29kZWRfemglMkMlMjBmb3JjZWRfYm9zX3Rva2VuX2lkJTNEdG9rZW5pemVyLmdldF9sYW5nX2lkKCUyMmVuJTIyKSklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF90b2tlbnMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> M2M100ForConditionalGeneration, M2M100Tokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>hi_text = <span class="hljs-string">&quot;\u091C\u0940\u0935\u0928 \u090F\u0915 \u091A\u0949\u0915\u0932\u0947\u091F \u092C\u0949\u0915\u094D\u0938 \u0915\u0940 \u0924\u0930\u0939 \u0939\u0948\u0964&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>chinese_text = <span class="hljs-string">&quot;\u751F\u6D3B\u5C31\u50CF\u4E00\u76D2\u5DE7\u514B\u529B\u3002&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>model = M2M100ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = M2M100Tokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/m2m100_418M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># translate Hindi to French</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.src_lang = <span class="hljs-string">&quot;hi&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_hi = tokenizer(hi_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_tokens = model.generate(**encoded_hi, forced_bos_token_id=tokenizer.get_lang_id(<span class="hljs-string">&quot;fr&quot;</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&quot;La vie est comme une bo\xEEte de chocolat.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># translate Chinese to English</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.src_lang = <span class="hljs-string">&quot;zh&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_zh = tokenizer(chinese_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_tokens = model.generate(**encoded_zh, forced_bos_token_id=tokenizer.get_lang_id(<span class="hljs-string">&quot;en&quot;</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&quot;Life is like a box of chocolate.&quot;</span>`}}),je=new we({}),xe=new we({}),Ze=new Q({props:{name:"class transformers.M2M100Config",anchor:"transformers.M2M100Config",parameters:[{name:"vocab_size",val:" = 128112"},{name:"max_position_embeddings",val:" = 1024"},{name:"encoder_layers",val:" = 12"},{name:"encoder_ffn_dim",val:" = 4096"},{name:"encoder_attention_heads",val:" = 16"},{name:"decoder_layers",val:" = 12"},{name:"decoder_ffn_dim",val:" = 4096"},{name:"decoder_attention_heads",val:" = 16"},{name:"encoder_layerdrop",val:" = 0.05"},{name:"decoder_layerdrop",val:" = 0.05"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'relu'"},{name:"d_model",val:" = 1024"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"decoder_start_token_id",val:" = 2"},{name:"scale_embedding",val:" = True"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.M2M100Config.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the M2M100 model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/m2m_100#transformers.M2M100Model">M2M100Model</a> or`,name:"vocab_size"},{anchor:"transformers.M2M100Config.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.M2M100Config.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.M2M100Config.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.M2M100Config.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.M2M100Config.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.M2M100Config.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.M2M100Config.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.M2M100Config.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.M2M100Config.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.M2M100Config.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.M2M100Config.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.M2M100Config.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for classifier.`,name:"classifier_dropout"},{anchor:"transformers.M2M100Config.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.M2M100Config.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"init_std"},{anchor:"transformers.M2M100Config.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.M2M100Config.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the decoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"decoder_layerdrop"},{anchor:"transformers.M2M100Config.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/m2m_100/configuration_m2m_100.py#L34"}}),ie=new _n({props:{anchor:"transformers.M2M100Config.example",$$slots:{default:[Mi]},$$scope:{ctx:U}}}),Fe=new we({}),Re=new Q({props:{name:"class transformers.M2M100Tokenizer",anchor:"transformers.M2M100Tokenizer",parameters:[{name:"vocab_file",val:""},{name:"spm_file",val:""},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"unk_token",val:" = '<unk>'"},{name:"language_codes",val:" = 'm2m100'"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"num_madeup_words",val:" = 8"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.M2M100Tokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.M2M100Tokenizer.spm_file",description:`<strong>spm_file</strong> (<code>str</code>) &#x2014;
Path to <a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a .spm extension) that
contains the vocabulary.`,name:"spm_file"},{anchor:"transformers.M2M100Tokenizer.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the source language.`,name:"src_lang"},{anchor:"transformers.M2M100Tokenizer.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language.`,name:"tgt_lang"},{anchor:"transformers.M2M100Tokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.M2M100Tokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.M2M100Tokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.M2M100Tokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.M2M100Tokenizer.language_codes",description:`<strong>language_codes</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;m2m100&quot;</code>) &#x2014;
What language codes to use. Should be one of <code>&quot;m2m100&quot;</code> or <code>&quot;wmt21&quot;</code>.`,name:"language_codes"},{anchor:"transformers.M2M100Tokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/m2m_100/tokenization_m2m_100.py#L64"}}),de=new _n({props:{anchor:"transformers.M2M100Tokenizer.example",$$slots:{default:[yi]},$$scope:{ctx:U}}}),Ae=new Q({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.M2M100Tokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.M2M100Tokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.M2M100Tokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/m2m_100/tokenization_m2m_100.py#L266",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Oe=new Q({props:{name:"get_special_tokens_mask",anchor:"transformers.M2M100Tokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.M2M100Tokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.M2M100Tokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.M2M100Tokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/m2m_100/tokenization_m2m_100.py#L236",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Pe=new Q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.M2M100Tokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.M2M100Tokenizer.create_token_type_ids_from_sequences.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.M2M100Tokenizer.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3217",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ve=new Q({props:{name:"save_vocabulary",anchor:"transformers.M2M100Tokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/m2m_100/tokenization_m2m_100.py#L312"}}),Le=new we({}),He=new Q({props:{name:"class transformers.M2M100Model",anchor:"transformers.M2M100Model",parameters:[{name:"config",val:": M2M100Config"}],parametersDescription:[{anchor:"transformers.M2M100Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/m2m_100#transformers.M2M100Config">M2M100Config</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/m2m_100/modeling_m2m_100.py#L1140"}}),tt=new Q({props:{name:"forward",anchor:"transformers.M2M100Model.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.M2M100Model.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.M2M100Model.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.M2M100Model.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>M2M100 uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.M2M100Model.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.M2M100Model.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.M2M100Model.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.M2M100Model.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.M2M100Model.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.M2M100Model.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.M2M100Model.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.M2M100Model.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.M2M100Model.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.M2M100Model.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.M2M100Model.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/m2m_100/modeling_m2m_100.py#L1169",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/m2m_100#transformers.M2M100Config"
>M2M100Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pe=new pi({props:{$$slots:{default:[bi]},$$scope:{ctx:U}}}),me=new _n({props:{anchor:"transformers.M2M100Model.forward.example",$$slots:{default:[Ti]},$$scope:{ctx:U}}}),ot=new we({}),nt=new Q({props:{name:"class transformers.M2M100ForConditionalGeneration",anchor:"transformers.M2M100ForConditionalGeneration",parameters:[{name:"config",val:": M2M100Config"}],parametersDescription:[{anchor:"transformers.M2M100ForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/m2m_100#transformers.M2M100Config">M2M100Config</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/m2m_100/modeling_m2m_100.py#L1252"}}),it=new Q({props:{name:"forward",anchor:"transformers.M2M100ForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.M2M100ForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>M2M100 uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.M2M100ForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/m2m_100/modeling_m2m_100.py#L1276",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/m2m_100#transformers.M2M100Config"
>M2M100Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fe=new pi({props:{$$slots:{default:[vi]},$$scope:{ctx:U}}}),ge=new _n({props:{anchor:"transformers.M2M100ForConditionalGeneration.forward.example",$$slots:{default:[ki]},$$scope:{ctx:U}}}),{c(){m=n("meta"),E=c(),_=n("h1"),f=n("a"),M=n("span"),y(l.$$.fragment),g=c(),N=n("span"),yn=r("M2M100"),Eo=c(),S=n("h2"),ee=n("a"),Zt=n("span"),y(Ee.$$.fragment),bn=c(),It=n("span"),Tn=r("Overview"),zo=c(),te=n("p"),vn=r("The M2M100 model was proposed in "),ze=n("a"),kn=r("Beyond English-Centric Multilingual Machine Translation"),wn=r(` by Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky,
Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy
Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin.`),$o=c(),ct=n("p"),En=r("The abstract from the paper is the following:"),Jo=c(),ht=n("p"),Ft=n("em"),zn=r(`Existing work in translation demonstrated the potential of massively multilingual machine translation by training a
single model able to translate between any pair of languages. However, much of this work is English-Centric by training
only on data which was translated from or to English. While this is supported by large sources of training data, it
does not reflect translation needs worldwide. In this work, we create a true Many-to-Many multilingual translation
model that can translate directly between any pair of 100 languages. We build and open source a training dataset that
covers thousands of language directions with supervised data, created through large-scale mining. Then, we explore how
to effectively increase model capacity through a combination of dense scaling and language-specific sparse parameters
to create high quality models. Our focus on non-English-Centric models brings gains of more than 10 BLEU when directly
translating between non-English directions while performing competitively to the best single systems of WMT. We
open-source our scripts so that others may reproduce the data, evaluation, and final M2M-100 model.`),Uo=c(),oe=n("p"),$n=r("This model was contributed by "),$e=n("a"),Jn=r("valhalla"),Un=r("."),qo=c(),X=n("h3"),ne=n("a"),Rt=n("span"),y(Je.$$.fragment),qn=c(),Gt=n("span"),Cn=r("Training and Generation"),Co=c(),Z=n("p"),jn=r(`M2M100 is a multilingual encoder-decoder (seq-to-seq) model primarily intended for translation tasks. As the model is
multilingual it expects the sequences in a certain format: A special language id token is used as prefix in both the
source and target text. The source text format is `),Nt=n("code"),xn=r("[lang_code] X [eos]"),Zn=r(", where "),Wt=n("code"),In=r("lang_code"),Fn=r(` is source language
id for source text and target language id for target text, with `),At=n("code"),Rn=r("X"),Gn=r(" being the source or target text."),jo=c(),q=n("p"),Nn=r("The "),pt=n("a"),Wn=r("M2M100Tokenizer"),An=r(" depends on "),Qt=n("code"),Qn=r("sentencepiece"),Sn=r(` so be sure to install it before running the
examples. To install `),St=n("code"),Xn=r("sentencepiece"),Bn=r(" run "),Xt=n("code"),On=r("pip install sentencepiece"),Dn=r("."),xo=c(),mt=n("ul"),Bt=n("li"),Pn=r("Supervised Training"),Zo=c(),y(Ue.$$.fragment),Io=c(),ut=n("ul"),qe=n("li"),Ot=n("p"),Vn=r("Generation"),Ln=c(),J=n("p"),Hn=r("M2M100 uses the "),Dt=n("code"),Yn=r("eos_token_id"),Kn=r(" as the "),Pt=n("code"),es=r("decoder_start_token_id"),ts=r(` for generation with the target language id
being forced as the first generated token. To force the target language id as the first generated token, pass the
`),Vt=n("em"),os=r("forced_bos_token_id"),ns=r(" parameter to the "),Lt=n("em"),ss=r("generate"),as=r(` method. The following example shows how to translate between
Hindi to French and Chinese to English using the `),Ht=n("em"),rs=r("facebook/m2m100_418M"),is=r(" checkpoint."),Fo=c(),y(Ce.$$.fragment),Ro=c(),B=n("h2"),se=n("a"),Yt=n("span"),y(je.$$.fragment),ls=c(),Kt=n("span"),ds=r("Documentation resources"),Go=c(),ae=n("ul"),eo=n("li"),ft=n("a"),cs=r("Translation task guide"),hs=c(),to=n("li"),gt=n("a"),ps=r("Summarization task guide"),No=c(),O=n("h2"),re=n("a"),oo=n("span"),y(xe.$$.fragment),ms=c(),no=n("span"),us=r("M2M100Config"),Wo=c(),C=n("div"),y(Ze.$$.fragment),fs=c(),D=n("p"),gs=r("This is the configuration class to store the configuration of a "),_t=n("a"),_s=r("M2M100Model"),Ms=r(`. It is used to instantiate an
M2M100 model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the M2M100
`),Ie=n("a"),ys=r("facebook/m2m100_418M"),bs=r(" architecture."),Ts=c(),P=n("p"),vs=r("Configuration objects inherit from "),Mt=n("a"),ks=r("PretrainedConfig"),ws=r(` and can be used to control the model outputs. Read the
documentation from `),yt=n("a"),Es=r("PretrainedConfig"),zs=r(" for more information."),$s=c(),y(ie.$$.fragment),Ao=c(),V=n("h2"),le=n("a"),so=n("span"),y(Fe.$$.fragment),Js=c(),ao=n("span"),Us=r("M2M100Tokenizer"),Qo=c(),z=n("div"),y(Re.$$.fragment),qs=c(),Ge=n("p"),Cs=r("Construct an M2M100 tokenizer. Based on "),Ne=n("a"),js=r("SentencePiece"),xs=r("."),Zs=c(),We=n("p"),Is=r("This tokenizer inherits from "),bt=n("a"),Fs=r("PreTrainedTokenizer"),Rs=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Gs=c(),y(de.$$.fragment),Ns=c(),I=n("div"),y(Ae.$$.fragment),Ws=c(),Qe=n("p"),As=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART sequence has the following format, where `),ro=n("code"),Qs=r("X"),Ss=r(" represents the sequence:"),Xs=c(),Se=n("ul"),Xe=n("li"),io=n("code"),Bs=r("input_ids"),Os=r(" (for encoder) "),lo=n("code"),Ds=r("X [eos, src_lang_code]"),Ps=c(),Be=n("li"),co=n("code"),Vs=r("decoder_input_ids"),Ls=r(": (for decoder) "),ho=n("code"),Hs=r("X [eos, tgt_lang_code]"),Ys=c(),po=n("p"),Ks=r(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),ea=c(),ce=n("div"),y(Oe.$$.fragment),ta=c(),De=n("p"),oa=r(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),mo=n("code"),na=r("prepare_for_model"),sa=r(" method."),aa=c(),W=n("div"),y(Pe.$$.fragment),ra=c(),Tt=n("p"),ia=r("Create the token type IDs corresponding to the sequences passed. "),vt=n("a"),la=r(`What are token type
IDs?`),da=c(),uo=n("p"),ca=r("Should be overridden in a subclass if the model has a special way of building those."),ha=c(),kt=n("div"),y(Ve.$$.fragment),So=c(),L=n("h2"),he=n("a"),fo=n("span"),y(Le.$$.fragment),pa=c(),go=n("span"),ma=r("M2M100Model"),Xo=c(),j=n("div"),y(He.$$.fragment),ua=c(),Ye=n("p"),fa=r(`The bare M2M100 Model outputting raw hidden-states without any specific head on top.
This model inherits from `),wt=n("a"),ga=r("PreTrainedModel"),_a=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ma=c(),Ke=n("p"),ya=r("This model is also a PyTorch "),et=n("a"),ba=r("torch.nn.Module"),Ta=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),va=c(),F=n("div"),y(tt.$$.fragment),ka=c(),H=n("p"),wa=r("The "),Et=n("a"),Ea=r("M2M100Model"),za=r(" forward method, overrides the "),_o=n("code"),$a=r("__call__"),Ja=r(" special method."),Ua=c(),y(pe.$$.fragment),qa=c(),y(me.$$.fragment),Bo=c(),Y=n("h2"),ue=n("a"),Mo=n("span"),y(ot.$$.fragment),Ca=c(),yo=n("span"),ja=r("M2M100ForConditionalGeneration"),Oo=c(),x=n("div"),y(nt.$$.fragment),xa=c(),st=n("p"),Za=r(`The M2M100 Model with a language modeling head. Can be used for summarization.
This model inherits from `),zt=n("a"),Ia=r("PreTrainedModel"),Fa=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ra=c(),at=n("p"),Ga=r("This model is also a PyTorch "),rt=n("a"),Na=r("torch.nn.Module"),Wa=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Aa=c(),R=n("div"),y(it.$$.fragment),Qa=c(),K=n("p"),Sa=r("The "),$t=n("a"),Xa=r("M2M100ForConditionalGeneration"),Ba=r(" forward method, overrides the "),bo=n("code"),Oa=r("__call__"),Da=r(" special method."),Pa=c(),y(fe.$$.fragment),Va=c(),y(ge.$$.fragment),this.h()},l(t){const p=gi('[data-svelte="svelte-1phssyn"]',document.head);m=s(p,"META",{name:!0,content:!0}),p.forEach(o),E=h(t),_=s(t,"H1",{class:!0});var lt=a(_);f=s(lt,"A",{id:!0,class:!0,href:!0});var To=a(f);M=s(To,"SPAN",{});var vo=a(M);b(l.$$.fragment,vo),vo.forEach(o),To.forEach(o),g=h(lt),N=s(lt,"SPAN",{});var ko=a(N);yn=i(ko,"M2M100"),ko.forEach(o),lt.forEach(o),Eo=h(t),S=s(t,"H2",{class:!0});var dt=a(S);ee=s(dt,"A",{id:!0,class:!0,href:!0});var wo=a(ee);Zt=s(wo,"SPAN",{});var Ha=a(Zt);b(Ee.$$.fragment,Ha),Ha.forEach(o),wo.forEach(o),bn=h(dt),It=s(dt,"SPAN",{});var Ya=a(It);Tn=i(Ya,"Overview"),Ya.forEach(o),dt.forEach(o),zo=h(t),te=s(t,"P",{});var Po=a(te);vn=i(Po,"The M2M100 model was proposed in "),ze=s(Po,"A",{href:!0,rel:!0});var Ka=a(ze);kn=i(Ka,"Beyond English-Centric Multilingual Machine Translation"),Ka.forEach(o),wn=i(Po,` by Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky,
Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy
Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin.`),Po.forEach(o),$o=h(t),ct=s(t,"P",{});var er=a(ct);En=i(er,"The abstract from the paper is the following:"),er.forEach(o),Jo=h(t),ht=s(t,"P",{});var tr=a(ht);Ft=s(tr,"EM",{});var or=a(Ft);zn=i(or,`Existing work in translation demonstrated the potential of massively multilingual machine translation by training a
single model able to translate between any pair of languages. However, much of this work is English-Centric by training
only on data which was translated from or to English. While this is supported by large sources of training data, it
does not reflect translation needs worldwide. In this work, we create a true Many-to-Many multilingual translation
model that can translate directly between any pair of 100 languages. We build and open source a training dataset that
covers thousands of language directions with supervised data, created through large-scale mining. Then, we explore how
to effectively increase model capacity through a combination of dense scaling and language-specific sparse parameters
to create high quality models. Our focus on non-English-Centric models brings gains of more than 10 BLEU when directly
translating between non-English directions while performing competitively to the best single systems of WMT. We
open-source our scripts so that others may reproduce the data, evaluation, and final M2M-100 model.`),or.forEach(o),tr.forEach(o),Uo=h(t),oe=s(t,"P",{});var Vo=a(oe);$n=i(Vo,"This model was contributed by "),$e=s(Vo,"A",{href:!0,rel:!0});var nr=a($e);Jn=i(nr,"valhalla"),nr.forEach(o),Un=i(Vo,"."),Vo.forEach(o),qo=h(t),X=s(t,"H3",{class:!0});var Lo=a(X);ne=s(Lo,"A",{id:!0,class:!0,href:!0});var sr=a(ne);Rt=s(sr,"SPAN",{});var ar=a(Rt);b(Je.$$.fragment,ar),ar.forEach(o),sr.forEach(o),qn=h(Lo),Gt=s(Lo,"SPAN",{});var rr=a(Gt);Cn=i(rr,"Training and Generation"),rr.forEach(o),Lo.forEach(o),Co=h(t),Z=s(t,"P",{});var _e=a(Z);jn=i(_e,`M2M100 is a multilingual encoder-decoder (seq-to-seq) model primarily intended for translation tasks. As the model is
multilingual it expects the sequences in a certain format: A special language id token is used as prefix in both the
source and target text. The source text format is `),Nt=s(_e,"CODE",{});var ir=a(Nt);xn=i(ir,"[lang_code] X [eos]"),ir.forEach(o),Zn=i(_e,", where "),Wt=s(_e,"CODE",{});var lr=a(Wt);In=i(lr,"lang_code"),lr.forEach(o),Fn=i(_e,` is source language
id for source text and target language id for target text, with `),At=s(_e,"CODE",{});var dr=a(At);Rn=i(dr,"X"),dr.forEach(o),Gn=i(_e," being the source or target text."),_e.forEach(o),jo=h(t),q=s(t,"P",{});var A=a(q);Nn=i(A,"The "),pt=s(A,"A",{href:!0});var cr=a(pt);Wn=i(cr,"M2M100Tokenizer"),cr.forEach(o),An=i(A," depends on "),Qt=s(A,"CODE",{});var hr=a(Qt);Qn=i(hr,"sentencepiece"),hr.forEach(o),Sn=i(A,` so be sure to install it before running the
examples. To install `),St=s(A,"CODE",{});var pr=a(St);Xn=i(pr,"sentencepiece"),pr.forEach(o),Bn=i(A," run "),Xt=s(A,"CODE",{});var mr=a(Xt);On=i(mr,"pip install sentencepiece"),mr.forEach(o),Dn=i(A,"."),A.forEach(o),xo=h(t),mt=s(t,"UL",{});var ur=a(mt);Bt=s(ur,"LI",{});var fr=a(Bt);Pn=i(fr,"Supervised Training"),fr.forEach(o),ur.forEach(o),Zo=h(t),b(Ue.$$.fragment,t),Io=h(t),ut=s(t,"UL",{});var gr=a(ut);qe=s(gr,"LI",{});var Ho=a(qe);Ot=s(Ho,"P",{});var _r=a(Ot);Vn=i(_r,"Generation"),_r.forEach(o),Ln=h(Ho),J=s(Ho,"P",{});var G=a(J);Hn=i(G,"M2M100 uses the "),Dt=s(G,"CODE",{});var Mr=a(Dt);Yn=i(Mr,"eos_token_id"),Mr.forEach(o),Kn=i(G," as the "),Pt=s(G,"CODE",{});var yr=a(Pt);es=i(yr,"decoder_start_token_id"),yr.forEach(o),ts=i(G,` for generation with the target language id
being forced as the first generated token. To force the target language id as the first generated token, pass the
`),Vt=s(G,"EM",{});var br=a(Vt);os=i(br,"forced_bos_token_id"),br.forEach(o),ns=i(G," parameter to the "),Lt=s(G,"EM",{});var Tr=a(Lt);ss=i(Tr,"generate"),Tr.forEach(o),as=i(G,` method. The following example shows how to translate between
Hindi to French and Chinese to English using the `),Ht=s(G,"EM",{});var vr=a(Ht);rs=i(vr,"facebook/m2m100_418M"),vr.forEach(o),is=i(G," checkpoint."),G.forEach(o),Ho.forEach(o),gr.forEach(o),Fo=h(t),b(Ce.$$.fragment,t),Ro=h(t),B=s(t,"H2",{class:!0});var Yo=a(B);se=s(Yo,"A",{id:!0,class:!0,href:!0});var kr=a(se);Yt=s(kr,"SPAN",{});var wr=a(Yt);b(je.$$.fragment,wr),wr.forEach(o),kr.forEach(o),ls=h(Yo),Kt=s(Yo,"SPAN",{});var Er=a(Kt);ds=i(Er,"Documentation resources"),Er.forEach(o),Yo.forEach(o),Go=h(t),ae=s(t,"UL",{});var Ko=a(ae);eo=s(Ko,"LI",{});var zr=a(eo);ft=s(zr,"A",{href:!0});var $r=a(ft);cs=i($r,"Translation task guide"),$r.forEach(o),zr.forEach(o),hs=h(Ko),to=s(Ko,"LI",{});var Jr=a(to);gt=s(Jr,"A",{href:!0});var Ur=a(gt);ps=i(Ur,"Summarization task guide"),Ur.forEach(o),Jr.forEach(o),Ko.forEach(o),No=h(t),O=s(t,"H2",{class:!0});var en=a(O);re=s(en,"A",{id:!0,class:!0,href:!0});var qr=a(re);oo=s(qr,"SPAN",{});var Cr=a(oo);b(xe.$$.fragment,Cr),Cr.forEach(o),qr.forEach(o),ms=h(en),no=s(en,"SPAN",{});var jr=a(no);us=i(jr,"M2M100Config"),jr.forEach(o),en.forEach(o),Wo=h(t),C=s(t,"DIV",{class:!0});var Me=a(C);b(Ze.$$.fragment,Me),fs=h(Me),D=s(Me,"P",{});var Jt=a(D);gs=i(Jt,"This is the configuration class to store the configuration of a "),_t=s(Jt,"A",{href:!0});var xr=a(_t);_s=i(xr,"M2M100Model"),xr.forEach(o),Ms=i(Jt,`. It is used to instantiate an
M2M100 model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the M2M100
`),Ie=s(Jt,"A",{href:!0,rel:!0});var Zr=a(Ie);ys=i(Zr,"facebook/m2m100_418M"),Zr.forEach(o),bs=i(Jt," architecture."),Jt.forEach(o),Ts=h(Me),P=s(Me,"P",{});var Ut=a(P);vs=i(Ut,"Configuration objects inherit from "),Mt=s(Ut,"A",{href:!0});var Ir=a(Mt);ks=i(Ir,"PretrainedConfig"),Ir.forEach(o),ws=i(Ut,` and can be used to control the model outputs. Read the
documentation from `),yt=s(Ut,"A",{href:!0});var Fr=a(yt);Es=i(Fr,"PretrainedConfig"),Fr.forEach(o),zs=i(Ut," for more information."),Ut.forEach(o),$s=h(Me),b(ie.$$.fragment,Me),Me.forEach(o),Ao=h(t),V=s(t,"H2",{class:!0});var tn=a(V);le=s(tn,"A",{id:!0,class:!0,href:!0});var Rr=a(le);so=s(Rr,"SPAN",{});var Gr=a(so);b(Fe.$$.fragment,Gr),Gr.forEach(o),Rr.forEach(o),Js=h(tn),ao=s(tn,"SPAN",{});var Nr=a(ao);Us=i(Nr,"M2M100Tokenizer"),Nr.forEach(o),tn.forEach(o),Qo=h(t),z=s(t,"DIV",{class:!0});var $=a(z);b(Re.$$.fragment,$),qs=h($),Ge=s($,"P",{});var on=a(Ge);Cs=i(on,"Construct an M2M100 tokenizer. Based on "),Ne=s(on,"A",{href:!0,rel:!0});var Wr=a(Ne);js=i(Wr,"SentencePiece"),Wr.forEach(o),xs=i(on,"."),on.forEach(o),Zs=h($),We=s($,"P",{});var nn=a(We);Is=i(nn,"This tokenizer inherits from "),bt=s(nn,"A",{href:!0});var Ar=a(bt);Fs=i(Ar,"PreTrainedTokenizer"),Ar.forEach(o),Rs=i(nn,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),nn.forEach(o),Gs=h($),b(de.$$.fragment,$),Ns=h($),I=s($,"DIV",{class:!0});var ye=a(I);b(Ae.$$.fragment,ye),Ws=h(ye),Qe=s(ye,"P",{});var sn=a(Qe);As=i(sn,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART sequence has the following format, where `),ro=s(sn,"CODE",{});var Qr=a(ro);Qs=i(Qr,"X"),Qr.forEach(o),Ss=i(sn," represents the sequence:"),sn.forEach(o),Xs=h(ye),Se=s(ye,"UL",{});var an=a(Se);Xe=s(an,"LI",{});var rn=a(Xe);io=s(rn,"CODE",{});var Sr=a(io);Bs=i(Sr,"input_ids"),Sr.forEach(o),Os=i(rn," (for encoder) "),lo=s(rn,"CODE",{});var Xr=a(lo);Ds=i(Xr,"X [eos, src_lang_code]"),Xr.forEach(o),rn.forEach(o),Ps=h(an),Be=s(an,"LI",{});var ln=a(Be);co=s(ln,"CODE",{});var Br=a(co);Vs=i(Br,"decoder_input_ids"),Br.forEach(o),Ls=i(ln,": (for decoder) "),ho=s(ln,"CODE",{});var Or=a(ho);Hs=i(Or,"X [eos, tgt_lang_code]"),Or.forEach(o),ln.forEach(o),an.forEach(o),Ys=h(ye),po=s(ye,"P",{});var Dr=a(po);Ks=i(Dr,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Dr.forEach(o),ye.forEach(o),ea=h($),ce=s($,"DIV",{class:!0});var dn=a(ce);b(Oe.$$.fragment,dn),ta=h(dn),De=s(dn,"P",{});var cn=a(De);oa=i(cn,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),mo=s(cn,"CODE",{});var Pr=a(mo);na=i(Pr,"prepare_for_model"),Pr.forEach(o),sa=i(cn," method."),cn.forEach(o),dn.forEach(o),aa=h($),W=s($,"DIV",{class:!0});var qt=a(W);b(Pe.$$.fragment,qt),ra=h(qt),Tt=s(qt,"P",{});var La=a(Tt);ia=i(La,"Create the token type IDs corresponding to the sequences passed. "),vt=s(La,"A",{href:!0});var Vr=a(vt);la=i(Vr,`What are token type
IDs?`),Vr.forEach(o),La.forEach(o),da=h(qt),uo=s(qt,"P",{});var Lr=a(uo);ca=i(Lr,"Should be overridden in a subclass if the model has a special way of building those."),Lr.forEach(o),qt.forEach(o),ha=h($),kt=s($,"DIV",{class:!0});var Hr=a(kt);b(Ve.$$.fragment,Hr),Hr.forEach(o),$.forEach(o),So=h(t),L=s(t,"H2",{class:!0});var hn=a(L);he=s(hn,"A",{id:!0,class:!0,href:!0});var Yr=a(he);fo=s(Yr,"SPAN",{});var Kr=a(fo);b(Le.$$.fragment,Kr),Kr.forEach(o),Yr.forEach(o),pa=h(hn),go=s(hn,"SPAN",{});var ei=a(go);ma=i(ei,"M2M100Model"),ei.forEach(o),hn.forEach(o),Xo=h(t),j=s(t,"DIV",{class:!0});var be=a(j);b(He.$$.fragment,be),ua=h(be),Ye=s(be,"P",{});var pn=a(Ye);fa=i(pn,`The bare M2M100 Model outputting raw hidden-states without any specific head on top.
This model inherits from `),wt=s(pn,"A",{href:!0});var ti=a(wt);ga=i(ti,"PreTrainedModel"),ti.forEach(o),_a=i(pn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),pn.forEach(o),Ma=h(be),Ke=s(be,"P",{});var mn=a(Ke);ya=i(mn,"This model is also a PyTorch "),et=s(mn,"A",{href:!0,rel:!0});var oi=a(et);ba=i(oi,"torch.nn.Module"),oi.forEach(o),Ta=i(mn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),mn.forEach(o),va=h(be),F=s(be,"DIV",{class:!0});var Te=a(F);b(tt.$$.fragment,Te),ka=h(Te),H=s(Te,"P",{});var Ct=a(H);wa=i(Ct,"The "),Et=s(Ct,"A",{href:!0});var ni=a(Et);Ea=i(ni,"M2M100Model"),ni.forEach(o),za=i(Ct," forward method, overrides the "),_o=s(Ct,"CODE",{});var si=a(_o);$a=i(si,"__call__"),si.forEach(o),Ja=i(Ct," special method."),Ct.forEach(o),Ua=h(Te),b(pe.$$.fragment,Te),qa=h(Te),b(me.$$.fragment,Te),Te.forEach(o),be.forEach(o),Bo=h(t),Y=s(t,"H2",{class:!0});var un=a(Y);ue=s(un,"A",{id:!0,class:!0,href:!0});var ai=a(ue);Mo=s(ai,"SPAN",{});var ri=a(Mo);b(ot.$$.fragment,ri),ri.forEach(o),ai.forEach(o),Ca=h(un),yo=s(un,"SPAN",{});var ii=a(yo);ja=i(ii,"M2M100ForConditionalGeneration"),ii.forEach(o),un.forEach(o),Oo=h(t),x=s(t,"DIV",{class:!0});var ve=a(x);b(nt.$$.fragment,ve),xa=h(ve),st=s(ve,"P",{});var fn=a(st);Za=i(fn,`The M2M100 Model with a language modeling head. Can be used for summarization.
This model inherits from `),zt=s(fn,"A",{href:!0});var li=a(zt);Ia=i(li,"PreTrainedModel"),li.forEach(o),Fa=i(fn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fn.forEach(o),Ra=h(ve),at=s(ve,"P",{});var gn=a(at);Ga=i(gn,"This model is also a PyTorch "),rt=s(gn,"A",{href:!0,rel:!0});var di=a(rt);Na=i(di,"torch.nn.Module"),di.forEach(o),Wa=i(gn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),gn.forEach(o),Aa=h(ve),R=s(ve,"DIV",{class:!0});var ke=a(R);b(it.$$.fragment,ke),Qa=h(ke),K=s(ke,"P",{});var jt=a(K);Sa=i(jt,"The "),$t=s(jt,"A",{href:!0});var ci=a($t);Xa=i(ci,"M2M100ForConditionalGeneration"),ci.forEach(o),Ba=i(jt," forward method, overrides the "),bo=s(jt,"CODE",{});var hi=a(bo);Oa=i(hi,"__call__"),hi.forEach(o),Da=i(jt," special method."),jt.forEach(o),Pa=h(ke),b(fe.$$.fragment,ke),Va=h(ke),b(ge.$$.fragment,ke),ke.forEach(o),ve.forEach(o),this.h()},h(){d(m,"name","hf:doc:metadata"),d(m,"content",JSON.stringify(Ei)),d(f,"id","m2m100"),d(f,"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"),d(f,"href","#m2m100"),d(_,"class","relative group"),d(ee,"id","overview"),d(ee,"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"),d(ee,"href","#overview"),d(S,"class","relative group"),d(ze,"href","https://arxiv.org/abs/2010.11125"),d(ze,"rel","nofollow"),d($e,"href","https://huggingface.co/valhalla"),d($e,"rel","nofollow"),d(ne,"id","training-and-generation"),d(ne,"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"),d(ne,"href","#training-and-generation"),d(X,"class","relative group"),d(pt,"href","/docs/transformers/main/en/model_doc/m2m_100#transformers.M2M100Tokenizer"),d(se,"id","documentation-resources"),d(se,"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"),d(se,"href","#documentation-resources"),d(B,"class","relative group"),d(ft,"href","../tasks/translation"),d(gt,"href","../tasks/summarization"),d(re,"id","transformers.M2M100Config"),d(re,"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"),d(re,"href","#transformers.M2M100Config"),d(O,"class","relative group"),d(_t,"href","/docs/transformers/main/en/model_doc/m2m_100#transformers.M2M100Model"),d(Ie,"href","https://huggingface.co/facebook/m2m100_418M"),d(Ie,"rel","nofollow"),d(Mt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(yt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(le,"id","transformers.M2M100Tokenizer"),d(le,"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"),d(le,"href","#transformers.M2M100Tokenizer"),d(V,"class","relative group"),d(Ne,"href","https://github.com/google/sentencepiece"),d(Ne,"rel","nofollow"),d(bt,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(vt,"href","../glossary#token-type-ids"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(he,"id","transformers.M2M100Model"),d(he,"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"),d(he,"href","#transformers.M2M100Model"),d(L,"class","relative group"),d(wt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(et,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(et,"rel","nofollow"),d(Et,"href","/docs/transformers/main/en/model_doc/m2m_100#transformers.M2M100Model"),d(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ue,"id","transformers.M2M100ForConditionalGeneration"),d(ue,"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"),d(ue,"href","#transformers.M2M100ForConditionalGeneration"),d(Y,"class","relative group"),d(zt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(rt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(rt,"rel","nofollow"),d($t,"href","/docs/transformers/main/en/model_doc/m2m_100#transformers.M2M100ForConditionalGeneration"),d(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,p){e(document.head,m),u(t,E,p),u(t,_,p),e(_,f),e(f,M),T(l,M,null),e(_,g),e(_,N),e(N,yn),u(t,Eo,p),u(t,S,p),e(S,ee),e(ee,Zt),T(Ee,Zt,null),e(S,bn),e(S,It),e(It,Tn),u(t,zo,p),u(t,te,p),e(te,vn),e(te,ze),e(ze,kn),e(te,wn),u(t,$o,p),u(t,ct,p),e(ct,En),u(t,Jo,p),u(t,ht,p),e(ht,Ft),e(Ft,zn),u(t,Uo,p),u(t,oe,p),e(oe,$n),e(oe,$e),e($e,Jn),e(oe,Un),u(t,qo,p),u(t,X,p),e(X,ne),e(ne,Rt),T(Je,Rt,null),e(X,qn),e(X,Gt),e(Gt,Cn),u(t,Co,p),u(t,Z,p),e(Z,jn),e(Z,Nt),e(Nt,xn),e(Z,Zn),e(Z,Wt),e(Wt,In),e(Z,Fn),e(Z,At),e(At,Rn),e(Z,Gn),u(t,jo,p),u(t,q,p),e(q,Nn),e(q,pt),e(pt,Wn),e(q,An),e(q,Qt),e(Qt,Qn),e(q,Sn),e(q,St),e(St,Xn),e(q,Bn),e(q,Xt),e(Xt,On),e(q,Dn),u(t,xo,p),u(t,mt,p),e(mt,Bt),e(Bt,Pn),u(t,Zo,p),T(Ue,t,p),u(t,Io,p),u(t,ut,p),e(ut,qe),e(qe,Ot),e(Ot,Vn),e(qe,Ln),e(qe,J),e(J,Hn),e(J,Dt),e(Dt,Yn),e(J,Kn),e(J,Pt),e(Pt,es),e(J,ts),e(J,Vt),e(Vt,os),e(J,ns),e(J,Lt),e(Lt,ss),e(J,as),e(J,Ht),e(Ht,rs),e(J,is),u(t,Fo,p),T(Ce,t,p),u(t,Ro,p),u(t,B,p),e(B,se),e(se,Yt),T(je,Yt,null),e(B,ls),e(B,Kt),e(Kt,ds),u(t,Go,p),u(t,ae,p),e(ae,eo),e(eo,ft),e(ft,cs),e(ae,hs),e(ae,to),e(to,gt),e(gt,ps),u(t,No,p),u(t,O,p),e(O,re),e(re,oo),T(xe,oo,null),e(O,ms),e(O,no),e(no,us),u(t,Wo,p),u(t,C,p),T(Ze,C,null),e(C,fs),e(C,D),e(D,gs),e(D,_t),e(_t,_s),e(D,Ms),e(D,Ie),e(Ie,ys),e(D,bs),e(C,Ts),e(C,P),e(P,vs),e(P,Mt),e(Mt,ks),e(P,ws),e(P,yt),e(yt,Es),e(P,zs),e(C,$s),T(ie,C,null),u(t,Ao,p),u(t,V,p),e(V,le),e(le,so),T(Fe,so,null),e(V,Js),e(V,ao),e(ao,Us),u(t,Qo,p),u(t,z,p),T(Re,z,null),e(z,qs),e(z,Ge),e(Ge,Cs),e(Ge,Ne),e(Ne,js),e(Ge,xs),e(z,Zs),e(z,We),e(We,Is),e(We,bt),e(bt,Fs),e(We,Rs),e(z,Gs),T(de,z,null),e(z,Ns),e(z,I),T(Ae,I,null),e(I,Ws),e(I,Qe),e(Qe,As),e(Qe,ro),e(ro,Qs),e(Qe,Ss),e(I,Xs),e(I,Se),e(Se,Xe),e(Xe,io),e(io,Bs),e(Xe,Os),e(Xe,lo),e(lo,Ds),e(Se,Ps),e(Se,Be),e(Be,co),e(co,Vs),e(Be,Ls),e(Be,ho),e(ho,Hs),e(I,Ys),e(I,po),e(po,Ks),e(z,ea),e(z,ce),T(Oe,ce,null),e(ce,ta),e(ce,De),e(De,oa),e(De,mo),e(mo,na),e(De,sa),e(z,aa),e(z,W),T(Pe,W,null),e(W,ra),e(W,Tt),e(Tt,ia),e(Tt,vt),e(vt,la),e(W,da),e(W,uo),e(uo,ca),e(z,ha),e(z,kt),T(Ve,kt,null),u(t,So,p),u(t,L,p),e(L,he),e(he,fo),T(Le,fo,null),e(L,pa),e(L,go),e(go,ma),u(t,Xo,p),u(t,j,p),T(He,j,null),e(j,ua),e(j,Ye),e(Ye,fa),e(Ye,wt),e(wt,ga),e(Ye,_a),e(j,Ma),e(j,Ke),e(Ke,ya),e(Ke,et),e(et,ba),e(Ke,Ta),e(j,va),e(j,F),T(tt,F,null),e(F,ka),e(F,H),e(H,wa),e(H,Et),e(Et,Ea),e(H,za),e(H,_o),e(_o,$a),e(H,Ja),e(F,Ua),T(pe,F,null),e(F,qa),T(me,F,null),u(t,Bo,p),u(t,Y,p),e(Y,ue),e(ue,Mo),T(ot,Mo,null),e(Y,Ca),e(Y,yo),e(yo,ja),u(t,Oo,p),u(t,x,p),T(nt,x,null),e(x,xa),e(x,st),e(st,Za),e(st,zt),e(zt,Ia),e(st,Fa),e(x,Ra),e(x,at),e(at,Ga),e(at,rt),e(rt,Na),e(at,Wa),e(x,Aa),e(x,R),T(it,R,null),e(R,Qa),e(R,K),e(K,Sa),e(K,$t),e($t,Xa),e(K,Ba),e(K,bo),e(bo,Oa),e(K,Da),e(R,Pa),T(fe,R,null),e(R,Va),T(ge,R,null),Do=!0},p(t,[p]){const lt={};p&2&&(lt.$$scope={dirty:p,ctx:t}),ie.$set(lt);const To={};p&2&&(To.$$scope={dirty:p,ctx:t}),de.$set(To);const vo={};p&2&&(vo.$$scope={dirty:p,ctx:t}),pe.$set(vo);const ko={};p&2&&(ko.$$scope={dirty:p,ctx:t}),me.$set(ko);const dt={};p&2&&(dt.$$scope={dirty:p,ctx:t}),fe.$set(dt);const wo={};p&2&&(wo.$$scope={dirty:p,ctx:t}),ge.$set(wo)},i(t){Do||(v(l.$$.fragment,t),v(Ee.$$.fragment,t),v(Je.$$.fragment,t),v(Ue.$$.fragment,t),v(Ce.$$.fragment,t),v(je.$$.fragment,t),v(xe.$$.fragment,t),v(Ze.$$.fragment,t),v(ie.$$.fragment,t),v(Fe.$$.fragment,t),v(Re.$$.fragment,t),v(de.$$.fragment,t),v(Ae.$$.fragment,t),v(Oe.$$.fragment,t),v(Pe.$$.fragment,t),v(Ve.$$.fragment,t),v(Le.$$.fragment,t),v(He.$$.fragment,t),v(tt.$$.fragment,t),v(pe.$$.fragment,t),v(me.$$.fragment,t),v(ot.$$.fragment,t),v(nt.$$.fragment,t),v(it.$$.fragment,t),v(fe.$$.fragment,t),v(ge.$$.fragment,t),Do=!0)},o(t){k(l.$$.fragment,t),k(Ee.$$.fragment,t),k(Je.$$.fragment,t),k(Ue.$$.fragment,t),k(Ce.$$.fragment,t),k(je.$$.fragment,t),k(xe.$$.fragment,t),k(Ze.$$.fragment,t),k(ie.$$.fragment,t),k(Fe.$$.fragment,t),k(Re.$$.fragment,t),k(de.$$.fragment,t),k(Ae.$$.fragment,t),k(Oe.$$.fragment,t),k(Pe.$$.fragment,t),k(Ve.$$.fragment,t),k(Le.$$.fragment,t),k(He.$$.fragment,t),k(tt.$$.fragment,t),k(pe.$$.fragment,t),k(me.$$.fragment,t),k(ot.$$.fragment,t),k(nt.$$.fragment,t),k(it.$$.fragment,t),k(fe.$$.fragment,t),k(ge.$$.fragment,t),Do=!1},d(t){o(m),t&&o(E),t&&o(_),w(l),t&&o(Eo),t&&o(S),w(Ee),t&&o(zo),t&&o(te),t&&o($o),t&&o(ct),t&&o(Jo),t&&o(ht),t&&o(Uo),t&&o(oe),t&&o(qo),t&&o(X),w(Je),t&&o(Co),t&&o(Z),t&&o(jo),t&&o(q),t&&o(xo),t&&o(mt),t&&o(Zo),w(Ue,t),t&&o(Io),t&&o(ut),t&&o(Fo),w(Ce,t),t&&o(Ro),t&&o(B),w(je),t&&o(Go),t&&o(ae),t&&o(No),t&&o(O),w(xe),t&&o(Wo),t&&o(C),w(Ze),w(ie),t&&o(Ao),t&&o(V),w(Fe),t&&o(Qo),t&&o(z),w(Re),w(de),w(Ae),w(Oe),w(Pe),w(Ve),t&&o(So),t&&o(L),w(Le),t&&o(Xo),t&&o(j),w(He),w(tt),w(pe),w(me),t&&o(Bo),t&&o(Y),w(ot),t&&o(Oo),t&&o(x),w(nt),w(it),w(fe),w(ge)}}}const Ei={local:"m2m100",sections:[{local:"overview",sections:[{local:"training-and-generation",title:"Training and Generation"}],title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.M2M100Config",title:"M2M100Config"},{local:"transformers.M2M100Tokenizer",title:"M2M100Tokenizer"},{local:"transformers.M2M100Model",title:"M2M100Model"},{local:"transformers.M2M100ForConditionalGeneration",title:"M2M100ForConditionalGeneration"}],title:"M2M100"};function zi(U){return _i(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xi extends mi{constructor(m){super();ui(this,m,zi,wi,fi,{})}}export{xi as default,Ei as metadata};
