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 a,d as o,m as h,a as s,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=a(l,"P",{});var g=s(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=a(l,"P",{});var g=s(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=a(l,"P",{});var g=s(m);E=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(g,"CODE",{});var N=s(_);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=a(l,"P",{});var g=s(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=a(l,"P",{});var g=s(m);E=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(g,"CODE",{});var N=s(_);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=a(l,"P",{});var g=s(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,Rt,zn,Uo,oe,$n,$e,Jn,Un,qo,X,ne,Ft,Je,qn,Gt,Cn,Co,Z,jn,Nt,xn,Zn,Wt,In,Rn,At,Fn,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,ea,ta,Vt,oa,na,Lt,aa,sa,Ht,ra,ia,Ro,Ce,Fo,B,ae,Yt,je,la,Kt,da,Go,se,eo,ft,ca,ha,to,gt,pa,No,O,re,oo,xe,ma,no,ua,Wo,C,Ze,fa,D,ga,_t,_a,Ma,Ie,ya,ba,Ta,P,va,Mt,ka,wa,yt,Ea,za,$a,ie,Ao,V,le,ao,Re,Ja,so,Ua,Qo,z,Fe,qa,Ge,Ca,Ne,ja,xa,Za,We,Ia,bt,Ra,Fa,Ga,de,Na,I,Ae,Wa,Qe,Aa,ro,Qa,Sa,Xa,Se,Xe,io,Ba,Oa,lo,Da,Pa,Be,co,Va,La,ho,Ha,Ya,po,Ka,es,ce,Oe,ts,De,os,mo,ns,as,ss,W,Pe,rs,Tt,is,vt,ls,ds,uo,cs,hs,kt,Ve,So,L,he,fo,Le,ps,go,ms,Xo,j,He,us,Ye,fs,wt,gs,_s,Ms,Ke,ys,et,bs,Ts,vs,R,tt,ks,H,ws,Et,Es,zs,_o,$s,Js,Us,pe,qs,me,Bo,Y,ue,Mo,ot,Cs,yo,js,Oo,x,nt,xs,at,Zs,zt,Is,Rs,Fs,st,Gs,rt,Ns,Ws,As,F,it,Qs,K,Ss,$t,Xs,Bs,bo,Os,Ds,Ps,fe,Vs,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}}}),Re=new we({}),Fe=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#L3101",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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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"),Rt=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"),Ft=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"),Rn=r(` is source language
id for source text and target language id for target text, with `),At=n("code"),Fn=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"),ea=r("decoder_start_token_id"),ta=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"),oa=r("forced_bos_token_id"),na=r(" parameter to the "),Lt=n("em"),aa=r("generate"),sa=r(` method. The following example shows how to translate between
Hindi to French and Chinese to English using the `),Ht=n("em"),ra=r("facebook/m2m100_418M"),ia=r(" checkpoint."),Ro=c(),y(Ce.$$.fragment),Fo=c(),B=n("h2"),ae=n("a"),Yt=n("span"),y(je.$$.fragment),la=c(),Kt=n("span"),da=r("Documentation resources"),Go=c(),se=n("ul"),eo=n("li"),ft=n("a"),ca=r("Translation task guide"),ha=c(),to=n("li"),gt=n("a"),pa=r("Summarization task guide"),No=c(),O=n("h2"),re=n("a"),oo=n("span"),y(xe.$$.fragment),ma=c(),no=n("span"),ua=r("M2M100Config"),Wo=c(),C=n("div"),y(Ze.$$.fragment),fa=c(),D=n("p"),ga=r("This is the configuration class to store the configuration of a "),_t=n("a"),_a=r("M2M100Model"),Ma=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"),ya=r("facebook/m2m100_418M"),ba=r(" architecture."),Ta=c(),P=n("p"),va=r("Configuration objects inherit from "),Mt=n("a"),ka=r("PretrainedConfig"),wa=r(` and can be used to control the model outputs. Read the
documentation from `),yt=n("a"),Ea=r("PretrainedConfig"),za=r(" for more information."),$a=c(),y(ie.$$.fragment),Ao=c(),V=n("h2"),le=n("a"),ao=n("span"),y(Re.$$.fragment),Ja=c(),so=n("span"),Ua=r("M2M100Tokenizer"),Qo=c(),z=n("div"),y(Fe.$$.fragment),qa=c(),Ge=n("p"),Ca=r("Construct an M2M100 tokenizer. Based on "),Ne=n("a"),ja=r("SentencePiece"),xa=r("."),Za=c(),We=n("p"),Ia=r("This tokenizer inherits from "),bt=n("a"),Ra=r("PreTrainedTokenizer"),Fa=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ga=c(),y(de.$$.fragment),Na=c(),I=n("div"),y(Ae.$$.fragment),Wa=c(),Qe=n("p"),Aa=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"),Qa=r("X"),Sa=r(" represents the sequence:"),Xa=c(),Se=n("ul"),Xe=n("li"),io=n("code"),Ba=r("input_ids"),Oa=r(" (for encoder) "),lo=n("code"),Da=r("X [eos, src_lang_code]"),Pa=c(),Be=n("li"),co=n("code"),Va=r("decoder_input_ids"),La=r(": (for decoder) "),ho=n("code"),Ha=r("X [eos, tgt_lang_code]"),Ya=c(),po=n("p"),Ka=r(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),es=c(),ce=n("div"),y(Oe.$$.fragment),ts=c(),De=n("p"),os=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"),ns=r("prepare_for_model"),as=r(" method."),ss=c(),W=n("div"),y(Pe.$$.fragment),rs=c(),Tt=n("p"),is=r("Create the token type IDs corresponding to the sequences passed. "),vt=n("a"),ls=r(`What are token type
IDs?`),ds=c(),uo=n("p"),cs=r("Should be overridden in a subclass if the model has a special way of building those."),hs=c(),kt=n("div"),y(Ve.$$.fragment),So=c(),L=n("h2"),he=n("a"),fo=n("span"),y(Le.$$.fragment),ps=c(),go=n("span"),ms=r("M2M100Model"),Xo=c(),j=n("div"),y(He.$$.fragment),us=c(),Ye=n("p"),fs=r(`The bare M2M100 Model outputting raw hidden-states without any specific head on top.
This model inherits from `),wt=n("a"),gs=r("PreTrainedModel"),_s=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.)`),Ms=c(),Ke=n("p"),ys=r("This model is also a PyTorch "),et=n("a"),bs=r("torch.nn.Module"),Ts=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vs=c(),R=n("div"),y(tt.$$.fragment),ks=c(),H=n("p"),ws=r("The "),Et=n("a"),Es=r("M2M100Model"),zs=r(" forward method, overrides the "),_o=n("code"),$s=r("__call__"),Js=r(" special method."),Us=c(),y(pe.$$.fragment),qs=c(),y(me.$$.fragment),Bo=c(),Y=n("h2"),ue=n("a"),Mo=n("span"),y(ot.$$.fragment),Cs=c(),yo=n("span"),js=r("M2M100ForConditionalGeneration"),Oo=c(),x=n("div"),y(nt.$$.fragment),xs=c(),at=n("p"),Zs=r(`The M2M100 Model with a language modeling head. Can be used for summarization.
This model inherits from `),zt=n("a"),Is=r("PreTrainedModel"),Rs=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.)`),Fs=c(),st=n("p"),Gs=r("This model is also a PyTorch "),rt=n("a"),Ns=r("torch.nn.Module"),Ws=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),As=c(),F=n("div"),y(it.$$.fragment),Qs=c(),K=n("p"),Ss=r("The "),$t=n("a"),Xs=r("M2M100ForConditionalGeneration"),Bs=r(" forward method, overrides the "),bo=n("code"),Os=r("__call__"),Ds=r(" special method."),Ps=c(),y(fe.$$.fragment),Vs=c(),y(ge.$$.fragment),this.h()},l(t){const p=gi('[data-svelte="svelte-1phssyn"]',document.head);m=a(p,"META",{name:!0,content:!0}),p.forEach(o),E=h(t),_=a(t,"H1",{class:!0});var lt=s(_);f=a(lt,"A",{id:!0,class:!0,href:!0});var To=s(f);M=a(To,"SPAN",{});var vo=s(M);b(l.$$.fragment,vo),vo.forEach(o),To.forEach(o),g=h(lt),N=a(lt,"SPAN",{});var ko=s(N);yn=i(ko,"M2M100"),ko.forEach(o),lt.forEach(o),Eo=h(t),S=a(t,"H2",{class:!0});var dt=s(S);ee=a(dt,"A",{id:!0,class:!0,href:!0});var wo=s(ee);Zt=a(wo,"SPAN",{});var Hs=s(Zt);b(Ee.$$.fragment,Hs),Hs.forEach(o),wo.forEach(o),bn=h(dt),It=a(dt,"SPAN",{});var Ys=s(It);Tn=i(Ys,"Overview"),Ys.forEach(o),dt.forEach(o),zo=h(t),te=a(t,"P",{});var Po=s(te);vn=i(Po,"The M2M100 model was proposed in "),ze=a(Po,"A",{href:!0,rel:!0});var Ks=s(ze);kn=i(Ks,"Beyond English-Centric Multilingual Machine Translation"),Ks.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=a(t,"P",{});var er=s(ct);En=i(er,"The abstract from the paper is the following:"),er.forEach(o),Jo=h(t),ht=a(t,"P",{});var tr=s(ht);Rt=a(tr,"EM",{});var or=s(Rt);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=a(t,"P",{});var Vo=s(oe);$n=i(Vo,"This model was contributed by "),$e=a(Vo,"A",{href:!0,rel:!0});var nr=s($e);Jn=i(nr,"valhalla"),nr.forEach(o),Un=i(Vo,"."),Vo.forEach(o),qo=h(t),X=a(t,"H3",{class:!0});var Lo=s(X);ne=a(Lo,"A",{id:!0,class:!0,href:!0});var ar=s(ne);Ft=a(ar,"SPAN",{});var sr=s(Ft);b(Je.$$.fragment,sr),sr.forEach(o),ar.forEach(o),qn=h(Lo),Gt=a(Lo,"SPAN",{});var rr=s(Gt);Cn=i(rr,"Training and Generation"),rr.forEach(o),Lo.forEach(o),Co=h(t),Z=a(t,"P",{});var _e=s(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=a(_e,"CODE",{});var ir=s(Nt);xn=i(ir,"[lang_code] X [eos]"),ir.forEach(o),Zn=i(_e,", where "),Wt=a(_e,"CODE",{});var lr=s(Wt);In=i(lr,"lang_code"),lr.forEach(o),Rn=i(_e,` is source language
id for source text and target language id for target text, with `),At=a(_e,"CODE",{});var dr=s(At);Fn=i(dr,"X"),dr.forEach(o),Gn=i(_e," being the source or target text."),_e.forEach(o),jo=h(t),q=a(t,"P",{});var A=s(q);Nn=i(A,"The "),pt=a(A,"A",{href:!0});var cr=s(pt);Wn=i(cr,"M2M100Tokenizer"),cr.forEach(o),An=i(A," depends on "),Qt=a(A,"CODE",{});var hr=s(Qt);Qn=i(hr,"sentencepiece"),hr.forEach(o),Sn=i(A,` so be sure to install it before running the
examples. To install `),St=a(A,"CODE",{});var pr=s(St);Xn=i(pr,"sentencepiece"),pr.forEach(o),Bn=i(A," run "),Xt=a(A,"CODE",{});var mr=s(Xt);On=i(mr,"pip install sentencepiece"),mr.forEach(o),Dn=i(A,"."),A.forEach(o),xo=h(t),mt=a(t,"UL",{});var ur=s(mt);Bt=a(ur,"LI",{});var fr=s(Bt);Pn=i(fr,"Supervised Training"),fr.forEach(o),ur.forEach(o),Zo=h(t),b(Ue.$$.fragment,t),Io=h(t),ut=a(t,"UL",{});var gr=s(ut);qe=a(gr,"LI",{});var Ho=s(qe);Ot=a(Ho,"P",{});var _r=s(Ot);Vn=i(_r,"Generation"),_r.forEach(o),Ln=h(Ho),J=a(Ho,"P",{});var G=s(J);Hn=i(G,"M2M100 uses the "),Dt=a(G,"CODE",{});var Mr=s(Dt);Yn=i(Mr,"eos_token_id"),Mr.forEach(o),Kn=i(G," as the "),Pt=a(G,"CODE",{});var yr=s(Pt);ea=i(yr,"decoder_start_token_id"),yr.forEach(o),ta=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=a(G,"EM",{});var br=s(Vt);oa=i(br,"forced_bos_token_id"),br.forEach(o),na=i(G," parameter to the "),Lt=a(G,"EM",{});var Tr=s(Lt);aa=i(Tr,"generate"),Tr.forEach(o),sa=i(G,` method. The following example shows how to translate between
Hindi to French and Chinese to English using the `),Ht=a(G,"EM",{});var vr=s(Ht);ra=i(vr,"facebook/m2m100_418M"),vr.forEach(o),ia=i(G," checkpoint."),G.forEach(o),Ho.forEach(o),gr.forEach(o),Ro=h(t),b(Ce.$$.fragment,t),Fo=h(t),B=a(t,"H2",{class:!0});var Yo=s(B);ae=a(Yo,"A",{id:!0,class:!0,href:!0});var kr=s(ae);Yt=a(kr,"SPAN",{});var wr=s(Yt);b(je.$$.fragment,wr),wr.forEach(o),kr.forEach(o),la=h(Yo),Kt=a(Yo,"SPAN",{});var Er=s(Kt);da=i(Er,"Documentation resources"),Er.forEach(o),Yo.forEach(o),Go=h(t),se=a(t,"UL",{});var Ko=s(se);eo=a(Ko,"LI",{});var zr=s(eo);ft=a(zr,"A",{href:!0});var $r=s(ft);ca=i($r,"Translation task guide"),$r.forEach(o),zr.forEach(o),ha=h(Ko),to=a(Ko,"LI",{});var Jr=s(to);gt=a(Jr,"A",{href:!0});var Ur=s(gt);pa=i(Ur,"Summarization task guide"),Ur.forEach(o),Jr.forEach(o),Ko.forEach(o),No=h(t),O=a(t,"H2",{class:!0});var en=s(O);re=a(en,"A",{id:!0,class:!0,href:!0});var qr=s(re);oo=a(qr,"SPAN",{});var Cr=s(oo);b(xe.$$.fragment,Cr),Cr.forEach(o),qr.forEach(o),ma=h(en),no=a(en,"SPAN",{});var jr=s(no);ua=i(jr,"M2M100Config"),jr.forEach(o),en.forEach(o),Wo=h(t),C=a(t,"DIV",{class:!0});var Me=s(C);b(Ze.$$.fragment,Me),fa=h(Me),D=a(Me,"P",{});var Jt=s(D);ga=i(Jt,"This is the configuration class to store the configuration of a "),_t=a(Jt,"A",{href:!0});var xr=s(_t);_a=i(xr,"M2M100Model"),xr.forEach(o),Ma=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=a(Jt,"A",{href:!0,rel:!0});var Zr=s(Ie);ya=i(Zr,"facebook/m2m100_418M"),Zr.forEach(o),ba=i(Jt," architecture."),Jt.forEach(o),Ta=h(Me),P=a(Me,"P",{});var Ut=s(P);va=i(Ut,"Configuration objects inherit from "),Mt=a(Ut,"A",{href:!0});var Ir=s(Mt);ka=i(Ir,"PretrainedConfig"),Ir.forEach(o),wa=i(Ut,` and can be used to control the model outputs. Read the
documentation from `),yt=a(Ut,"A",{href:!0});var Rr=s(yt);Ea=i(Rr,"PretrainedConfig"),Rr.forEach(o),za=i(Ut," for more information."),Ut.forEach(o),$a=h(Me),b(ie.$$.fragment,Me),Me.forEach(o),Ao=h(t),V=a(t,"H2",{class:!0});var tn=s(V);le=a(tn,"A",{id:!0,class:!0,href:!0});var Fr=s(le);ao=a(Fr,"SPAN",{});var Gr=s(ao);b(Re.$$.fragment,Gr),Gr.forEach(o),Fr.forEach(o),Ja=h(tn),so=a(tn,"SPAN",{});var Nr=s(so);Ua=i(Nr,"M2M100Tokenizer"),Nr.forEach(o),tn.forEach(o),Qo=h(t),z=a(t,"DIV",{class:!0});var $=s(z);b(Fe.$$.fragment,$),qa=h($),Ge=a($,"P",{});var on=s(Ge);Ca=i(on,"Construct an M2M100 tokenizer. Based on "),Ne=a(on,"A",{href:!0,rel:!0});var Wr=s(Ne);ja=i(Wr,"SentencePiece"),Wr.forEach(o),xa=i(on,"."),on.forEach(o),Za=h($),We=a($,"P",{});var nn=s(We);Ia=i(nn,"This tokenizer inherits from "),bt=a(nn,"A",{href:!0});var Ar=s(bt);Ra=i(Ar,"PreTrainedTokenizer"),Ar.forEach(o),Fa=i(nn,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),nn.forEach(o),Ga=h($),b(de.$$.fragment,$),Na=h($),I=a($,"DIV",{class:!0});var ye=s(I);b(Ae.$$.fragment,ye),Wa=h(ye),Qe=a(ye,"P",{});var an=s(Qe);Aa=i(an,`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=a(an,"CODE",{});var Qr=s(ro);Qa=i(Qr,"X"),Qr.forEach(o),Sa=i(an," represents the sequence:"),an.forEach(o),Xa=h(ye),Se=a(ye,"UL",{});var sn=s(Se);Xe=a(sn,"LI",{});var rn=s(Xe);io=a(rn,"CODE",{});var Sr=s(io);Ba=i(Sr,"input_ids"),Sr.forEach(o),Oa=i(rn," (for encoder) "),lo=a(rn,"CODE",{});var Xr=s(lo);Da=i(Xr,"X [eos, src_lang_code]"),Xr.forEach(o),rn.forEach(o),Pa=h(sn),Be=a(sn,"LI",{});var ln=s(Be);co=a(ln,"CODE",{});var Br=s(co);Va=i(Br,"decoder_input_ids"),Br.forEach(o),La=i(ln,": (for decoder) "),ho=a(ln,"CODE",{});var Or=s(ho);Ha=i(Or,"X [eos, tgt_lang_code]"),Or.forEach(o),ln.forEach(o),sn.forEach(o),Ya=h(ye),po=a(ye,"P",{});var Dr=s(po);Ka=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),es=h($),ce=a($,"DIV",{class:!0});var dn=s(ce);b(Oe.$$.fragment,dn),ts=h(dn),De=a(dn,"P",{});var cn=s(De);os=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=a(cn,"CODE",{});var Pr=s(mo);ns=i(Pr,"prepare_for_model"),Pr.forEach(o),as=i(cn," method."),cn.forEach(o),dn.forEach(o),ss=h($),W=a($,"DIV",{class:!0});var qt=s(W);b(Pe.$$.fragment,qt),rs=h(qt),Tt=a(qt,"P",{});var Ls=s(Tt);is=i(Ls,"Create the token type IDs corresponding to the sequences passed. "),vt=a(Ls,"A",{href:!0});var Vr=s(vt);ls=i(Vr,`What are token type
IDs?`),Vr.forEach(o),Ls.forEach(o),ds=h(qt),uo=a(qt,"P",{});var Lr=s(uo);cs=i(Lr,"Should be overridden in a subclass if the model has a special way of building those."),Lr.forEach(o),qt.forEach(o),hs=h($),kt=a($,"DIV",{class:!0});var Hr=s(kt);b(Ve.$$.fragment,Hr),Hr.forEach(o),$.forEach(o),So=h(t),L=a(t,"H2",{class:!0});var hn=s(L);he=a(hn,"A",{id:!0,class:!0,href:!0});var Yr=s(he);fo=a(Yr,"SPAN",{});var Kr=s(fo);b(Le.$$.fragment,Kr),Kr.forEach(o),Yr.forEach(o),ps=h(hn),go=a(hn,"SPAN",{});var ei=s(go);ms=i(ei,"M2M100Model"),ei.forEach(o),hn.forEach(o),Xo=h(t),j=a(t,"DIV",{class:!0});var be=s(j);b(He.$$.fragment,be),us=h(be),Ye=a(be,"P",{});var pn=s(Ye);fs=i(pn,`The bare M2M100 Model outputting raw hidden-states without any specific head on top.
This model inherits from `),wt=a(pn,"A",{href:!0});var ti=s(wt);gs=i(ti,"PreTrainedModel"),ti.forEach(o),_s=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),Ms=h(be),Ke=a(be,"P",{});var mn=s(Ke);ys=i(mn,"This model is also a PyTorch "),et=a(mn,"A",{href:!0,rel:!0});var oi=s(et);bs=i(oi,"torch.nn.Module"),oi.forEach(o),Ts=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),vs=h(be),R=a(be,"DIV",{class:!0});var Te=s(R);b(tt.$$.fragment,Te),ks=h(Te),H=a(Te,"P",{});var Ct=s(H);ws=i(Ct,"The "),Et=a(Ct,"A",{href:!0});var ni=s(Et);Es=i(ni,"M2M100Model"),ni.forEach(o),zs=i(Ct," forward method, overrides the "),_o=a(Ct,"CODE",{});var ai=s(_o);$s=i(ai,"__call__"),ai.forEach(o),Js=i(Ct," special method."),Ct.forEach(o),Us=h(Te),b(pe.$$.fragment,Te),qs=h(Te),b(me.$$.fragment,Te),Te.forEach(o),be.forEach(o),Bo=h(t),Y=a(t,"H2",{class:!0});var un=s(Y);ue=a(un,"A",{id:!0,class:!0,href:!0});var si=s(ue);Mo=a(si,"SPAN",{});var ri=s(Mo);b(ot.$$.fragment,ri),ri.forEach(o),si.forEach(o),Cs=h(un),yo=a(un,"SPAN",{});var ii=s(yo);js=i(ii,"M2M100ForConditionalGeneration"),ii.forEach(o),un.forEach(o),Oo=h(t),x=a(t,"DIV",{class:!0});var ve=s(x);b(nt.$$.fragment,ve),xs=h(ve),at=a(ve,"P",{});var fn=s(at);Zs=i(fn,`The M2M100 Model with a language modeling head. Can be used for summarization.
This model inherits from `),zt=a(fn,"A",{href:!0});var li=s(zt);Is=i(li,"PreTrainedModel"),li.forEach(o),Rs=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),Fs=h(ve),st=a(ve,"P",{});var gn=s(st);Gs=i(gn,"This model is also a PyTorch "),rt=a(gn,"A",{href:!0,rel:!0});var di=s(rt);Ns=i(di,"torch.nn.Module"),di.forEach(o),Ws=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),As=h(ve),F=a(ve,"DIV",{class:!0});var ke=s(F);b(it.$$.fragment,ke),Qs=h(ke),K=a(ke,"P",{});var jt=s(K);Ss=i(jt,"The "),$t=a(jt,"A",{href:!0});var ci=s($t);Xs=i(ci,"M2M100ForConditionalGeneration"),ci.forEach(o),Bs=i(jt," forward method, overrides the "),bo=a(jt,"CODE",{});var hi=s(bo);Os=i(hi,"__call__"),hi.forEach(o),Ds=i(jt," special method."),jt.forEach(o),Ps=h(ke),b(fe.$$.fragment,ke),Vs=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(ae,"id","documentation-resources"),d(ae,"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(ae,"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(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(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(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(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,Rt),e(Rt,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,Ft),T(Je,Ft,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,Rn),e(Z,At),e(At,Fn),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,ea),e(J,ta),e(J,Vt),e(Vt,oa),e(J,na),e(J,Lt),e(Lt,aa),e(J,sa),e(J,Ht),e(Ht,ra),e(J,ia),u(t,Ro,p),T(Ce,t,p),u(t,Fo,p),u(t,B,p),e(B,ae),e(ae,Yt),T(je,Yt,null),e(B,la),e(B,Kt),e(Kt,da),u(t,Go,p),u(t,se,p),e(se,eo),e(eo,ft),e(ft,ca),e(se,ha),e(se,to),e(to,gt),e(gt,pa),u(t,No,p),u(t,O,p),e(O,re),e(re,oo),T(xe,oo,null),e(O,ma),e(O,no),e(no,ua),u(t,Wo,p),u(t,C,p),T(Ze,C,null),e(C,fa),e(C,D),e(D,ga),e(D,_t),e(_t,_a),e(D,Ma),e(D,Ie),e(Ie,ya),e(D,ba),e(C,Ta),e(C,P),e(P,va),e(P,Mt),e(Mt,ka),e(P,wa),e(P,yt),e(yt,Ea),e(P,za),e(C,$a),T(ie,C,null),u(t,Ao,p),u(t,V,p),e(V,le),e(le,ao),T(Re,ao,null),e(V,Ja),e(V,so),e(so,Ua),u(t,Qo,p),u(t,z,p),T(Fe,z,null),e(z,qa),e(z,Ge),e(Ge,Ca),e(Ge,Ne),e(Ne,ja),e(Ge,xa),e(z,Za),e(z,We),e(We,Ia),e(We,bt),e(bt,Ra),e(We,Fa),e(z,Ga),T(de,z,null),e(z,Na),e(z,I),T(Ae,I,null),e(I,Wa),e(I,Qe),e(Qe,Aa),e(Qe,ro),e(ro,Qa),e(Qe,Sa),e(I,Xa),e(I,Se),e(Se,Xe),e(Xe,io),e(io,Ba),e(Xe,Oa),e(Xe,lo),e(lo,Da),e(Se,Pa),e(Se,Be),e(Be,co),e(co,Va),e(Be,La),e(Be,ho),e(ho,Ha),e(I,Ya),e(I,po),e(po,Ka),e(z,es),e(z,ce),T(Oe,ce,null),e(ce,ts),e(ce,De),e(De,os),e(De,mo),e(mo,ns),e(De,as),e(z,ss),e(z,W),T(Pe,W,null),e(W,rs),e(W,Tt),e(Tt,is),e(Tt,vt),e(vt,ls),e(W,ds),e(W,uo),e(uo,cs),e(z,hs),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,ps),e(L,go),e(go,ms),u(t,Xo,p),u(t,j,p),T(He,j,null),e(j,us),e(j,Ye),e(Ye,fs),e(Ye,wt),e(wt,gs),e(Ye,_s),e(j,Ms),e(j,Ke),e(Ke,ys),e(Ke,et),e(et,bs),e(Ke,Ts),e(j,vs),e(j,R),T(tt,R,null),e(R,ks),e(R,H),e(H,ws),e(H,Et),e(Et,Es),e(H,zs),e(H,_o),e(_o,$s),e(H,Js),e(R,Us),T(pe,R,null),e(R,qs),T(me,R,null),u(t,Bo,p),u(t,Y,p),e(Y,ue),e(ue,Mo),T(ot,Mo,null),e(Y,Cs),e(Y,yo),e(yo,js),u(t,Oo,p),u(t,x,p),T(nt,x,null),e(x,xs),e(x,at),e(at,Zs),e(at,zt),e(zt,Is),e(at,Rs),e(x,Fs),e(x,st),e(st,Gs),e(st,rt),e(rt,Ns),e(st,Ws),e(x,As),e(x,F),T(it,F,null),e(F,Qs),e(F,K),e(K,Ss),e(K,$t),e($t,Xs),e(K,Bs),e(K,bo),e(bo,Os),e(K,Ds),e(F,Ps),T(fe,F,null),e(F,Vs),T(ge,F,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(Re.$$.fragment,t),v(Fe.$$.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(Re.$$.fragment,t),k(Fe.$$.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(Ro),w(Ce,t),t&&o(Fo),t&&o(B),w(je),t&&o(Go),t&&o(se),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(Re),t&&o(Qo),t&&o(z),w(Fe),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};
