import{S as Mf,i as yf,s as Tf,e as o,k as c,w as b,t as r,M as bf,c as s,d as t,m as p,a,x as v,h as l,b as d,N as _f,G as e,g as f,y as k,q as w,o as x,B as j,v as vf,L as Ot}from"../../chunks/vendor-hf-doc-builder.js";import{T as Gn}from"../../chunks/Tip-hf-doc-builder.js";import{D}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ie}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as oe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function kf(J){let h,y,_,g,M;return g=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1hcmlhbk1vZGVsJTJDJTIwTWFyaWFuQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyME1hcmlhbiUyMEhlbHNpbmtpLU5MUCUyRm9wdXMtbXQtZW4tZGUlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwTWFyaWFuQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjBmcm9tJTIwdGhlJTIwSGVsc2lua2ktTkxQJTJGb3B1cy1tdC1lbi1kZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwTWFyaWFuTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarianModel, MarianConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Marian Helsinki-NLP/opus-mt-en-de style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MarianConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the Helsinki-NLP/opus-mt-en-de style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarianModel(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(){h=o("p"),y=r("Examples:"),_=c(),b(g.$$.fragment)},l(i){h=s(i,"P",{});var u=a(h);y=l(u,"Examples:"),u.forEach(t),_=p(i),v(g.$$.fragment,i)},m(i,u){f(i,h,u),e(h,y),f(i,_,u),k(g,i,u),M=!0},p:Ot,i(i){M||(w(g.$$.fragment,i),M=!0)},o(i){x(g.$$.fragment,i),M=!1},d(i){i&&t(h),i&&t(_),j(g,i)}}}function wf(J){let h,y,_,g,M;return g=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1hcmlhbkZvckNhdXNhbExNJTJDJTIwTWFyaWFuVG9rZW5pemVyJTBBJTBBbW9kZWwlMjAlM0QlMjBNYXJpYW5Gb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIySGVsc2lua2ktTkxQJTJGb3B1cy1tdC1lbi1kZSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBNYXJpYW5Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMkhlbHNpbmtpLU5MUCUyRm9wdXMtbXQtZW4tZGUlMjIpJTBBc3JjX3RleHRzJTIwJTNEJTIwJTVCJTIySSUyMGFtJTIwYSUyMHNtYWxsJTIwZnJvZy4lMjIlMkMlMjAlMjJUb20lMjBhc2tlZCUyMGhpcyUyMHRlYWNoZXIlMjBmb3IlMjBhZHZpY2UuJTIyJTVEJTBBdGd0X3RleHRzJTIwJTNEJTIwJTVCJTIySWNoJTIwYmluJTIwZWluJTIwa2xlaW5lciUyMEZyb3NjaC4lMjIlMkMlMjAlMjJUb20lMjBiYXQlMjBzZWluZW4lMjBMZWhyZXIlMjB1bSUyMFJhdC4lMjIlNUQlMjAlMjAlMjMlMjBvcHRpb25hbCUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihzcmNfdGV4dHMlMkMlMjB0ZXh0X3RhcmdldCUzRHRndF90ZXh0cyUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTIwJTIwJTIzJTIwc2hvdWxkJTIwd29yaw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarianForCausalLM, MarianTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarianForCausalLM.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MarianTokenizer.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>src_texts = [<span class="hljs-string">&quot;I am a small frog.&quot;</span>, <span class="hljs-string">&quot;Tom asked his teacher for advice.&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tgt_texts = [<span class="hljs-string">&quot;Ich bin ein kleiner Frosch.&quot;</span>, <span class="hljs-string">&quot;Tom bat seinen Lehrer um Rat.&quot;</span>]  <span class="hljs-comment"># optional</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(src_texts, text_target=tgt_texts, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)  <span class="hljs-comment"># should work</span>`}}),{c(){h=o("p"),y=r("Examples:"),_=c(),b(g.$$.fragment)},l(i){h=s(i,"P",{});var u=a(h);y=l(u,"Examples:"),u.forEach(t),_=p(i),v(g.$$.fragment,i)},m(i,u){f(i,h,u),e(h,y),f(i,_,u),k(g,i,u),M=!0},p:Ot,i(i){M||(w(g.$$.fragment,i),M=!0)},o(i){x(g.$$.fragment,i),M=!1},d(i){i&&t(h),i&&t(_),j(g,i)}}}function xf(J){let h,y,_,g,M;return{c(){h=o("p"),y=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=o("code"),g=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(i){h=s(i,"P",{});var u=a(h);y=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);g=l(z,"Module"),z.forEach(t),M=l(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){f(i,h,u),e(h,y),e(h,_),e(_,g),e(h,M)},d(i){i&&t(h)}}}function jf(J){let h,y,_,g,M;return g=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNYXJpYW5Nb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMkhlbHNpbmtpLU5MUCUyRm9wdXMtbXQtZW4tZGUlMjIpJTBBbW9kZWwlMjAlM0QlMjBNYXJpYW5Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIySGVsc2lua2ktTkxQJTJGb3B1cy1tdC1lbi1kZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyU3R1ZGllcyUyMGhhdmUlMjBiZWVuJTIwc2hvd24lMjB0aGF0JTIwb3duaW5nJTIwYSUyMGRvZyUyMGlzJTIwZ29vZCUyMGZvciUyMHlvdSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBZGVjb2Rlcl9pbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIyJTNDcGFkJTNFJTIwU3R1ZGllbiUyMGhhYmVuJTIwZ2V6ZWlndCUyMGRhc3MlMjBlcyUyMGhpbGZyZWljaCUyMGlzdCUyMGVpbmVuJTIwSHVuZCUyMHp1JTIwYmVzaXR6ZW4lMjIlMkMlMEElMjAlMjAlMjAlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTBBJTIwJTIwJTIwJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMEEpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyUzRGlucHV0cy5pbnB1dF9pZHMlMkMlMjBkZWNvZGVyX2lucHV0X2lkcyUzRGRlY29kZXJfaW5wdXRzLmlucHV0X2lkcyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MarianModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarianModel.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Studies have been shown that owning a dog is good for you&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;&lt;pad&gt; Studien haben gezeigt dass es hilfreich ist einen Hund zu besitzen&quot;</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>    add_special_tokens=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids=inputs.input_ids, decoder_input_ids=decoder_inputs.input_ids)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">26</span>, <span class="hljs-number">512</span>]`}}),{c(){h=o("p"),y=r("Example:"),_=c(),b(g.$$.fragment)},l(i){h=s(i,"P",{});var u=a(h);y=l(u,"Example:"),u.forEach(t),_=p(i),v(g.$$.fragment,i)},m(i,u){f(i,h,u),e(h,y),f(i,_,u),k(g,i,u),M=!0},p:Ot,i(i){M||(w(g.$$.fragment,i),M=!0)},o(i){x(g.$$.fragment,i),M=!1},d(i){i&&t(h),i&&t(_),j(g,i)}}}function Jf(J){let h,y,_,g,M;return{c(){h=o("p"),y=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=o("code"),g=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(i){h=s(i,"P",{});var u=a(h);y=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);g=l(z,"Module"),z.forEach(t),M=l(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){f(i,h,u),e(h,y),e(h,_),e(_,g),e(h,M)},d(i){i&&t(h)}}}function $f(J){let h,y,_,g,M;return g=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNYXJpYW5NVE1vZGVsJTBBJTBBc3JjJTIwJTNEJTIwJTIyZnIlMjIlMjAlMjAlMjMlMjBzb3VyY2UlMjBsYW5ndWFnZSUwQXRyZyUyMCUzRCUyMCUyMmVuJTIyJTIwJTIwJTIzJTIwdGFyZ2V0JTIwbGFuZ3VhZ2UlMEElMEFtb2RlbF9uYW1lJTIwJTNEJTIwZiUyMkhlbHNpbmtpLU5MUCUyRm9wdXMtbXQtJTdCc3JjJTdELSU3QnRyZyU3RCUyMiUwQW1vZGVsJTIwJTNEJTIwTWFyaWFuTVRNb2RlbC5mcm9tX3ByZXRyYWluZWQobW9kZWxfbmFtZSklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKSUwQSUwQXNhbXBsZV90ZXh0JTIwJTNEJTIwJTIybyVDMyVCOSUyMGVzdCUyMGwnYXJyJUMzJUFBdCUyMGRlJTIwYnVzJTIwJTNGJTIyJTBBYmF0Y2glMjAlM0QlMjB0b2tlbml6ZXIoJTVCc2FtcGxlX3RleHQlNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmJhdGNoKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MarianMTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>src = <span class="hljs-string">&quot;fr&quot;</span>  <span class="hljs-comment"># source language</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>trg = <span class="hljs-string">&quot;en&quot;</span>  <span class="hljs-comment"># target language</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">f&quot;Helsinki-NLP/opus-mt-<span class="hljs-subst">{src}</span>-<span class="hljs-subst">{trg}</span>&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarianMTModel.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_name)

<span class="hljs-meta">&gt;&gt;&gt; </span>sample_text = <span class="hljs-string">&quot;o\xF9 est l&#x27;arr\xEAt de bus ?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>batch = tokenizer([sample_text], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**batch)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;Where&#x27;s the bus stop?&quot;</span>`}}),{c(){h=o("p"),y=r("Examples:"),_=c(),b(g.$$.fragment)},l(i){h=s(i,"P",{});var u=a(h);y=l(u,"Examples:"),u.forEach(t),_=p(i),v(g.$$.fragment,i)},m(i,u){f(i,h,u),e(h,y),f(i,_,u),k(g,i,u),M=!0},p:Ot,i(i){M||(w(g.$$.fragment,i),M=!0)},o(i){x(g.$$.fragment,i),M=!1},d(i){i&&t(h),i&&t(_),j(g,i)}}}function zf(J){let h,y,_,g,M;return g=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNYXJpYW5Gb3JDYXVzYWxMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMkhlbHNpbmtpLU5MUCUyRm9wdXMtbXQtZnItZW4lMjIpJTBBbW9kZWwlMjAlM0QlMjBNYXJpYW5Gb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIySGVsc2lua2ktTkxQJTJGb3B1cy1tdC1mci1lbiUyMiUyQyUyMGFkZF9jcm9zc19hdHRlbnRpb24lM0RGYWxzZSklMEFhc3NlcnQlMjBtb2RlbC5jb25maWcuaXNfZGVjb2RlciUyQyUyMGYlMjIlN0Jtb2RlbC5fX2NsYXNzX18lN0QlMjBoYXMlMjB0byUyMGJlJTIwY29uZmlndXJlZCUyMGFzJTIwYSUyMGRlY29kZXIuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQWV4cGVjdGVkX3NoYXBlJTIwJTNEJTIwJTVCMSUyQyUyMGlucHV0cy5pbnB1dF9pZHMuc2hhcGUlNUItMSU1RCUyQyUyMG1vZGVsLmNvbmZpZy52b2NhYl9zaXplJTVEJTBBbGlzdChsb2dpdHMuc2hhcGUpJTIwJTNEJTNEJTIwZXhwZWN0ZWRfc2hhcGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MarianForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-fr-en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarianForCausalLM.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-fr-en&quot;</span>, add_cross_attention=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> model.config.is_decoder, <span class="hljs-string">f&quot;<span class="hljs-subst">{model.__class__}</span> has to be configured as a decoder.&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>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_shape = [<span class="hljs-number">1</span>, inputs.input_ids.shape[-<span class="hljs-number">1</span>], model.config.vocab_size]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape) == expected_shape
<span class="hljs-literal">True</span>`}}),{c(){h=o("p"),y=r("Example:"),_=c(),b(g.$$.fragment)},l(i){h=s(i,"P",{});var u=a(h);y=l(u,"Example:"),u.forEach(t),_=p(i),v(g.$$.fragment,i)},m(i,u){f(i,h,u),e(h,y),f(i,_,u),k(g,i,u),M=!0},p:Ot,i(i){M||(w(g.$$.fragment,i),M=!0)},o(i){x(g.$$.fragment,i),M=!1},d(i){i&&t(h),i&&t(_),j(g,i)}}}function Uf(J){let h,y,_,g,M,i,u,z,Le,Fe,Z,he,Y,$,He,S,ue,ct,K,B,_e,se,Qe,ae,re,Oe,Ce,P,De,Ne,ee,F,q,me,V,Ye,qe,A,te,Me,C,Ke,R,et,Ze,E,ye,Te,G,tt,X,le,be,N,nt,W,ot,ve;return{c(){h=o("p"),y=r("TensorFlow models and layers in "),_=o("code"),g=r("transformers"),M=r(" accept two formats as input:"),i=c(),u=o("ul"),z=o("li"),Le=r("having all inputs as keyword arguments (like PyTorch models), or"),Fe=c(),Z=o("li"),he=r("having all inputs as a list, tuple or dict in the first positional argument."),Y=c(),$=o("p"),He=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=o("code"),ue=r("model.fit()"),ct=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),K=o("code"),B=r("model.fit()"),_e=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),se=o("code"),Qe=r("fit()"),ae=r(" and "),re=o("code"),Oe=r("predict()"),Ce=r(`, such as when creating your own layers or models with
the Keras `),P=o("code"),De=r("Functional"),Ne=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),F=o("ul"),q=o("li"),me=r("a single Tensor with "),V=o("code"),Ye=r("input_ids"),qe=r(" only and nothing else: "),A=o("code"),te=r("model(input_ids)"),Me=c(),C=o("li"),Ke=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=o("code"),et=r("model([input_ids, attention_mask])"),Ze=r(" or "),E=o("code"),ye=r("model([input_ids, attention_mask, token_type_ids])"),Te=c(),G=o("li"),tt=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=o("code"),le=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),be=c(),N=o("p"),nt=r(`Note that when creating models and layers with
`),W=o("a"),ot=r("subclassing"),ve=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){h=s(T,"P",{});var U=a(h);y=l(U,"TensorFlow models and layers in "),_=s(U,"CODE",{});var ke=a(_);g=l(ke,"transformers"),ke.forEach(t),M=l(U," accept two formats as input:"),U.forEach(t),i=p(T),u=s(T,"UL",{});var we=a(u);z=s(we,"LI",{});var _t=a(z);Le=l(_t,"having all inputs as keyword arguments (like PyTorch models), or"),_t.forEach(t),Fe=p(we),Z=s(we,"LI",{});var xe=a(Z);he=l(xe,"having all inputs as a list, tuple or dict in the first positional argument."),xe.forEach(t),we.forEach(t),Y=p(T),$=s(T,"P",{});var I=a($);He=l(I,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=s(I,"CODE",{});var Mt=a(S);ue=l(Mt,"model.fit()"),Mt.forEach(t),ct=l(I,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),K=s(I,"CODE",{});var yt=a(K);B=l(yt,"model.fit()"),yt.forEach(t),_e=l(I,` supports! If, however, you want to use the second
format outside of Keras methods like `),se=s(I,"CODE",{});var st=a(se);Qe=l(st,"fit()"),st.forEach(t),ae=l(I," and "),re=s(I,"CODE",{});var at=a(re);Oe=l(at,"predict()"),at.forEach(t),Ce=l(I,`, such as when creating your own layers or models with
the Keras `),P=s(I,"CODE",{});var Tt=a(P);De=l(Tt,"Functional"),Tt.forEach(t),Ne=l(I,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),I.forEach(t),ee=p(T),F=s(T,"UL",{});var L=a(F);q=s(L,"LI",{});var H=a(q);me=l(H,"a single Tensor with "),V=s(H,"CODE",{});var rt=a(V);Ye=l(rt,"input_ids"),rt.forEach(t),qe=l(H," only and nothing else: "),A=s(H,"CODE",{});var bt=a(A);te=l(bt,"model(input_ids)"),bt.forEach(t),H.forEach(t),Me=p(L),C=s(L,"LI",{});var ie=a(C);Ke=l(ie,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=s(ie,"CODE",{});var je=a(R);et=l(je,"model([input_ids, attention_mask])"),je.forEach(t),Ze=l(ie," or "),E=s(ie,"CODE",{});var Je=a(E);ye=l(Je,"model([input_ids, attention_mask, token_type_ids])"),Je.forEach(t),ie.forEach(t),Te=p(L),G=s(L,"LI",{});var lt=a(G);tt=l(lt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=s(lt,"CODE",{});var Ae=a(X);le=l(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(t),lt.forEach(t),L.forEach(t),be=p(T),N=s(T,"P",{});var $e=a(N);nt=l($e,`Note that when creating models and layers with
`),W=s($e,"A",{href:!0,rel:!0});var vt=a(W);ot=l(vt,"subclassing"),vt.forEach(t),ve=l($e,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),$e.forEach(t),this.h()},h(){d(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),d(W,"rel","nofollow")},m(T,U){f(T,h,U),e(h,y),e(h,_),e(_,g),e(h,M),f(T,i,U),f(T,u,U),e(u,z),e(z,Le),e(u,Fe),e(u,Z),e(Z,he),f(T,Y,U),f(T,$,U),e($,He),e($,S),e(S,ue),e($,ct),e($,K),e(K,B),e($,_e),e($,se),e(se,Qe),e($,ae),e($,re),e(re,Oe),e($,Ce),e($,P),e(P,De),e($,Ne),f(T,ee,U),f(T,F,U),e(F,q),e(q,me),e(q,V),e(V,Ye),e(q,qe),e(q,A),e(A,te),e(F,Me),e(F,C),e(C,Ke),e(C,R),e(R,et),e(C,Ze),e(C,E),e(E,ye),e(F,Te),e(F,G),e(G,tt),e(G,X),e(X,le),f(T,be,U),f(T,N,U),e(N,nt),e(N,W),e(W,ot),e(N,ve)},d(T){T&&t(h),T&&t(i),T&&t(u),T&&t(Y),T&&t($),T&&t(ee),T&&t(F),T&&t(be),T&&t(N)}}}function Ef(J){let h,y,_,g,M;return{c(){h=o("p"),y=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=o("code"),g=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(i){h=s(i,"P",{});var u=a(h);y=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);g=l(z,"Module"),z.forEach(t),M=l(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){f(i,h,u),e(h,y),e(h,_),e(_,g),e(h,M)},d(i){i&&t(h)}}}function If(J){let h,y,_,g,M;return g=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURk1hcmlhbk1vZGVsJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJIZWxzaW5raS1OTFAlMkZvcHVzLW10LWVuLWRlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZNYXJpYW5Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIySGVsc2lua2ktTkxQJTJGb3B1cy1tdC1lbi1kZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMarianModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMarianModel.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&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;tf&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(){h=o("p"),y=r("Example:"),_=c(),b(g.$$.fragment)},l(i){h=s(i,"P",{});var u=a(h);y=l(u,"Example:"),u.forEach(t),_=p(i),v(g.$$.fragment,i)},m(i,u){f(i,h,u),e(h,y),f(i,_,u),k(g,i,u),M=!0},p:Ot,i(i){M||(w(g.$$.fragment,i),M=!0)},o(i){x(g.$$.fragment,i),M=!1},d(i){i&&t(h),i&&t(_),j(g,i)}}}function Ff(J){let h,y,_,g,M,i,u,z,Le,Fe,Z,he,Y,$,He,S,ue,ct,K,B,_e,se,Qe,ae,re,Oe,Ce,P,De,Ne,ee,F,q,me,V,Ye,qe,A,te,Me,C,Ke,R,et,Ze,E,ye,Te,G,tt,X,le,be,N,nt,W,ot,ve;return{c(){h=o("p"),y=r("TensorFlow models and layers in "),_=o("code"),g=r("transformers"),M=r(" accept two formats as input:"),i=c(),u=o("ul"),z=o("li"),Le=r("having all inputs as keyword arguments (like PyTorch models), or"),Fe=c(),Z=o("li"),he=r("having all inputs as a list, tuple or dict in the first positional argument."),Y=c(),$=o("p"),He=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=o("code"),ue=r("model.fit()"),ct=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),K=o("code"),B=r("model.fit()"),_e=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),se=o("code"),Qe=r("fit()"),ae=r(" and "),re=o("code"),Oe=r("predict()"),Ce=r(`, such as when creating your own layers or models with
the Keras `),P=o("code"),De=r("Functional"),Ne=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),F=o("ul"),q=o("li"),me=r("a single Tensor with "),V=o("code"),Ye=r("input_ids"),qe=r(" only and nothing else: "),A=o("code"),te=r("model(input_ids)"),Me=c(),C=o("li"),Ke=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=o("code"),et=r("model([input_ids, attention_mask])"),Ze=r(" or "),E=o("code"),ye=r("model([input_ids, attention_mask, token_type_ids])"),Te=c(),G=o("li"),tt=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=o("code"),le=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),be=c(),N=o("p"),nt=r(`Note that when creating models and layers with
`),W=o("a"),ot=r("subclassing"),ve=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){h=s(T,"P",{});var U=a(h);y=l(U,"TensorFlow models and layers in "),_=s(U,"CODE",{});var ke=a(_);g=l(ke,"transformers"),ke.forEach(t),M=l(U," accept two formats as input:"),U.forEach(t),i=p(T),u=s(T,"UL",{});var we=a(u);z=s(we,"LI",{});var _t=a(z);Le=l(_t,"having all inputs as keyword arguments (like PyTorch models), or"),_t.forEach(t),Fe=p(we),Z=s(we,"LI",{});var xe=a(Z);he=l(xe,"having all inputs as a list, tuple or dict in the first positional argument."),xe.forEach(t),we.forEach(t),Y=p(T),$=s(T,"P",{});var I=a($);He=l(I,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=s(I,"CODE",{});var Mt=a(S);ue=l(Mt,"model.fit()"),Mt.forEach(t),ct=l(I,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),K=s(I,"CODE",{});var yt=a(K);B=l(yt,"model.fit()"),yt.forEach(t),_e=l(I,` supports! If, however, you want to use the second
format outside of Keras methods like `),se=s(I,"CODE",{});var st=a(se);Qe=l(st,"fit()"),st.forEach(t),ae=l(I," and "),re=s(I,"CODE",{});var at=a(re);Oe=l(at,"predict()"),at.forEach(t),Ce=l(I,`, such as when creating your own layers or models with
the Keras `),P=s(I,"CODE",{});var Tt=a(P);De=l(Tt,"Functional"),Tt.forEach(t),Ne=l(I,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),I.forEach(t),ee=p(T),F=s(T,"UL",{});var L=a(F);q=s(L,"LI",{});var H=a(q);me=l(H,"a single Tensor with "),V=s(H,"CODE",{});var rt=a(V);Ye=l(rt,"input_ids"),rt.forEach(t),qe=l(H," only and nothing else: "),A=s(H,"CODE",{});var bt=a(A);te=l(bt,"model(input_ids)"),bt.forEach(t),H.forEach(t),Me=p(L),C=s(L,"LI",{});var ie=a(C);Ke=l(ie,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=s(ie,"CODE",{});var je=a(R);et=l(je,"model([input_ids, attention_mask])"),je.forEach(t),Ze=l(ie," or "),E=s(ie,"CODE",{});var Je=a(E);ye=l(Je,"model([input_ids, attention_mask, token_type_ids])"),Je.forEach(t),ie.forEach(t),Te=p(L),G=s(L,"LI",{});var lt=a(G);tt=l(lt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=s(lt,"CODE",{});var Ae=a(X);le=l(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(t),lt.forEach(t),L.forEach(t),be=p(T),N=s(T,"P",{});var $e=a(N);nt=l($e,`Note that when creating models and layers with
`),W=s($e,"A",{href:!0,rel:!0});var vt=a(W);ot=l(vt,"subclassing"),vt.forEach(t),ve=l($e,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),$e.forEach(t),this.h()},h(){d(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),d(W,"rel","nofollow")},m(T,U){f(T,h,U),e(h,y),e(h,_),e(_,g),e(h,M),f(T,i,U),f(T,u,U),e(u,z),e(z,Le),e(u,Fe),e(u,Z),e(Z,he),f(T,Y,U),f(T,$,U),e($,He),e($,S),e(S,ue),e($,ct),e($,K),e(K,B),e($,_e),e($,se),e(se,Qe),e($,ae),e($,re),e(re,Oe),e($,Ce),e($,P),e(P,De),e($,Ne),f(T,ee,U),f(T,F,U),e(F,q),e(q,me),e(q,V),e(V,Ye),e(q,qe),e(q,A),e(A,te),e(F,Me),e(F,C),e(C,Ke),e(C,R),e(R,et),e(C,Ze),e(C,E),e(E,ye),e(F,Te),e(F,G),e(G,tt),e(G,X),e(X,le),f(T,be,U),f(T,N,U),e(N,nt),e(N,W),e(W,ot),e(N,ve)},d(T){T&&t(h),T&&t(i),T&&t(u),T&&t(Y),T&&t($),T&&t(ee),T&&t(F),T&&t(be),T&&t(N)}}}function Cf(J){let h,y,_,g,M;return{c(){h=o("p"),y=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=o("code"),g=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(i){h=s(i,"P",{});var u=a(h);y=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);g=l(z,"Module"),z.forEach(t),M=l(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){f(i,h,u),e(h,y),e(h,_),e(_,g),e(h,M)},d(i){i&&t(h)}}}function Nf(J){let h,y,_,g,M;return g=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURk1hcmlhbk1UTW9kZWwlMEFmcm9tJTIwdHlwaW5nJTIwaW1wb3J0JTIwTGlzdCUwQSUwQXNyYyUyMCUzRCUyMCUyMmZyJTIyJTIwJTIwJTIzJTIwc291cmNlJTIwbGFuZ3VhZ2UlMEF0cmclMjAlM0QlMjAlMjJlbiUyMiUyMCUyMCUyMyUyMHRhcmdldCUyMGxhbmd1YWdlJTBBc2FtcGxlX3RleHQlMjAlM0QlMjAlMjJvJUMzJUI5JTIwZXN0JTIwbCdhcnIlQzMlQUF0JTIwZGUlMjBidXMlMjAlM0YlMjIlMEFtb2RlbF9uYW1lJTIwJTNEJTIwZiUyMkhlbHNpbmtpLU5MUCUyRm9wdXMtbXQtJTdCc3JjJTdELSU3QnRyZyU3RCUyMiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZNYXJpYW5NVE1vZGVsLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX25hbWUpJTBBYmF0Y2glMjAlM0QlMjB0b2tlbml6ZXIoJTVCc2FtcGxlX3RleHQlNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQWdlbiUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqYmF0Y2gpJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW4lMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMarianMTModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> typing <span class="hljs-keyword">import</span> <span class="hljs-type">List</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>src = <span class="hljs-string">&quot;fr&quot;</span>  <span class="hljs-comment"># source language</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>trg = <span class="hljs-string">&quot;en&quot;</span>  <span class="hljs-comment"># target language</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>sample_text = <span class="hljs-string">&quot;o\xF9 est l&#x27;arr\xEAt de bus ?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">f&quot;Helsinki-NLP/opus-mt-<span class="hljs-subst">{src}</span>-<span class="hljs-subst">{trg}</span>&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMarianMTModel.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>batch = tokenizer([sample_text], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>gen = model.generate(**batch)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(gen, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&quot;Where is the bus stop ?&quot;</span>`}}),{c(){h=o("p"),y=r("Examples:"),_=c(),b(g.$$.fragment)},l(i){h=s(i,"P",{});var u=a(h);y=l(u,"Examples:"),u.forEach(t),_=p(i),v(g.$$.fragment,i)},m(i,u){f(i,h,u),e(h,y),f(i,_,u),k(g,i,u),M=!0},p:Ot,i(i){M||(w(g.$$.fragment,i),M=!0)},o(i){x(g.$$.fragment,i),M=!1},d(i){i&&t(h),i&&t(_),j(g,i)}}}function qf(J){let h,y,_,g,M;return{c(){h=o("p"),y=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=o("code"),g=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(i){h=s(i,"P",{});var u=a(h);y=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);g=l(z,"Module"),z.forEach(t),M=l(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){f(i,h,u),e(h,y),e(h,_),e(_,g),e(h,M)},d(i){i&&t(h)}}}function Zf(J){let h,y,_,g,M;return g=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TWFyaWFuTW9kZWwlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJIZWxzaW5raS1OTFAlMkZvcHVzLW10LWVuLWRlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheE1hcmlhbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJIZWxzaW5raS1OTFAlMkZvcHVzLW10LWVuLWRlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMarianModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMarianModel.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&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;jax&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(){h=o("p"),y=r("Example:"),_=c(),b(g.$$.fragment)},l(i){h=s(i,"P",{});var u=a(h);y=l(u,"Example:"),u.forEach(t),_=p(i),v(g.$$.fragment,i)},m(i,u){f(i,h,u),e(h,y),f(i,_,u),k(g,i,u),M=!0},p:Ot,i(i){M||(w(g.$$.fragment,i),M=!0)},o(i){x(g.$$.fragment,i),M=!1},d(i){i&&t(h),i&&t(_),j(g,i)}}}function Af(J){let h,y,_,g,M;return{c(){h=o("p"),y=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=o("code"),g=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(i){h=s(i,"P",{});var u=a(h);y=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);g=l(z,"Module"),z.forEach(t),M=l(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){f(i,h,u),e(h,y),e(h,_),e(_,g),e(h,M)},d(i){i&&t(h)}}}function Wf(J){let h,y,_,g,M;return g=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TWFyaWFuTVRNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheE1hcmlhbk1UTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMkhlbHNpbmtpLU5MUCUyRm9wdXMtbXQtZW4tZGUlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIySGVsc2lua2ktTkxQJTJGb3B1cy1tdC1lbi1kZSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNENjQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMikuaW5wdXRfaWRzJTBBJTBBc2VxdWVuY2VzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRfaWRzJTJDJTIwbWF4X2xlbmd0aCUzRDY0JTJDJTIwbnVtX2JlYW1zJTNEMikuc2VxdWVuY2VzJTBBJTBBb3V0cHV0cyUyMCUzRCUyMHRva2VuaXplci5iYXRjaF9kZWNvZGUoc2VxdWVuY2VzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBJTIzJTIwc2hvdWxkJTIwZ2l2ZSUyMCpNZWluZSUyMEZyZXVuZGUlMjBzaW5kJTIwY29vbCUyQyUyMGFiZXIlMjBzaWUlMjBlc3NlbiUyMHp1JTIwdmllbGUlMjBLb2hsZW5oeWRyYXRlLio=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMarianMTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMarianMTModel.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-de&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(text, max_length=<span class="hljs-number">64</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>sequences = model.generate(input_ids, max_length=<span class="hljs-number">64</span>, num_beams=<span class="hljs-number">2</span>).sequences

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = tokenizer.batch_decode(sequences, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># should give *Meine Freunde sind cool, aber sie essen zu viele Kohlenhydrate.*</span>`}}),{c(){h=o("p"),y=r("Example:"),_=c(),b(g.$$.fragment)},l(i){h=s(i,"P",{});var u=a(h);y=l(u,"Example:"),u.forEach(t),_=p(i),v(g.$$.fragment,i)},m(i,u){f(i,h,u),e(h,y),f(i,_,u),k(g,i,u),M=!0},p:Ot,i(i){M||(w(g.$$.fragment,i),M=!0)},o(i){x(g.$$.fragment,i),M=!1},d(i){i&&t(h),i&&t(_),j(g,i)}}}function Sf(J){let h,y,_,g,M,i,u,z,Le,Fe,Z,he,Y,$,He,S,ue,ct,K,B,_e,se,Qe,ae,re,Oe,Ce,P,De,Ne,ee,F,q,me,V,Ye,qe,A,te,Me,C,Ke,R,et,Ze,E,ye,Te,G,tt,X,le,be,N,nt,W,ot,ve,T,U,ke,we,_t,xe,I,Mt,yt,st,at,Tt,L,H,rt,bt,ie,je,Je,lt,Ae,$e,vt,ai,kt,Xn,ri,aa,li,ii,di,Ln,ci,ra,pi,hi,ui,wt,mi,la,fi,gi,ia,_i,Mi,yi,da,Hn,Ti,ca,bi,vi,ki,pa,Qn,wi,On,xi,ji,Ur,xt,Dt,ha,Dn,Ji,ua,$i,Er,We,xs,zi,ma,Ui,Ei,Yn,Ii,Kn,Fi,Ci,Ni,jt,qi,fa,Zi,Ai,ga,Wi,Si,Pi,_a,Bi,Ir,Jt,Yt,Ma,eo,Vi,ya,Ri,Fr,Kt,Ta,Gi,Xi,ba,to,Li,Cr,$t,en,va,no,Hi,ka,Qi,Nr,Se,oo,Oi,wa,Di,Yi,Ki,so,ed,xa,td,nd,od,ao,sd,ro,ad,rd,ld,lo,id,ja,dd,cd,qr,tn,pd,io,hd,ud,Zr,co,Ar,js,md,Wr,po,Sr,zt,nn,Ja,ho,fd,$a,gd,Pr,Js,_d,Br,uo,Vr,$s,Md,Rr,mo,Gr,Ut,on,za,fo,yd,Ua,Td,Xr,pt,Ea,zs,bd,vd,Ia,Us,kd,wd,Fa,Es,xd,Lr,Et,sn,Ca,go,jd,Na,Jd,Hr,ze,_o,$d,It,zd,Is,Ud,Ed,Mo,Id,Fd,Cd,Ft,Nd,Fs,qd,Zd,Cs,Ad,Wd,Sd,an,Qr,Ct,rn,qa,yo,Pd,Za,Bd,Or,de,To,Vd,bo,Rd,vo,Gd,Xd,Ld,ko,Hd,Ns,Qd,Od,Dd,ln,Yd,dn,wo,Kd,Aa,ec,Dr,Nt,cn,Wa,xo,tc,Sa,nc,Yr,Ue,jo,oc,Jo,sc,qs,ac,rc,lc,$o,ic,zo,dc,cc,pc,Pe,Uo,hc,qt,uc,Zs,mc,fc,Pa,gc,_c,Mc,pn,yc,hn,Kr,Zt,un,Ba,Eo,Tc,Va,bc,el,Ee,Io,vc,Fo,kc,As,wc,xc,jc,Co,Jc,No,$c,zc,Uc,fe,qo,Ec,At,Ic,Ws,Fc,Cc,Ra,Nc,qc,Zc,mn,Ac,Zo,Wc,Ao,Sc,Pc,Bc,fn,tl,Wt,gn,Ga,Wo,Vc,Xa,Rc,nl,St,So,Gc,_n,Po,Xc,Mn,ol,Pt,yn,La,Bo,Lc,Ha,Hc,sl,ce,Vo,Qc,Ro,Oc,Ss,Dc,Yc,Kc,Go,ep,Xo,tp,np,op,Tn,sp,Be,Lo,ap,Bt,rp,Ps,lp,ip,Qa,dp,cp,pp,bn,hp,vn,al,Vt,kn,Oa,Ho,up,Da,mp,rl,pe,Qo,fp,Oo,gp,Bs,_p,Mp,yp,Do,Tp,Yo,bp,vp,kp,wn,wp,ge,Ko,xp,Rt,jp,Vs,Jp,$p,Ya,zp,Up,Ep,xn,Ip,es,Fp,ts,Cp,Np,qp,jn,ll,Gt,Jn,Ka,ns,Zp,er,Ap,il,Q,os,Wp,ss,Sp,Rs,Pp,Bp,Vp,as,Rp,rs,Gp,Xp,Lp,tr,Hp,Qp,it,nr,ls,Op,Dp,or,is,Yp,Kp,sr,ds,eh,th,ar,cs,nh,oh,Ve,ps,sh,Xt,ah,rr,rh,lh,lr,ih,dh,ch,$n,ph,zn,dl,Lt,Un,ir,hs,hh,dr,uh,cl,O,us,mh,ms,fh,Gs,gh,_h,Mh,fs,yh,gs,Th,bh,vh,cr,kh,wh,dt,pr,_s,xh,jh,hr,Ms,Jh,$h,ur,ys,zh,Uh,mr,Ts,Eh,Ih,Re,bs,Fh,Ht,Ch,fr,Nh,qh,gr,Zh,Ah,Wh,En,Sh,In,pl;return i=new oe({}),C=new oe({}),Dn=new oe({}),eo=new oe({}),no=new oe({}),co=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1hcmlhbk1UTW9kZWwlMkMlMjBNYXJpYW5Ub2tlbml6ZXIlMEElMEFzcmNfdGV4dCUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMiUzRSUzRWZyYSUzQyUzQyUyMHRoaXMlMjBpcyUyMGElMjBzZW50ZW5jZSUyMGluJTIwZW5nbGlzaCUyMHRoYXQlMjB3ZSUyMHdhbnQlMjB0byUyMHRyYW5zbGF0ZSUyMHRvJTIwZnJlbmNoJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyJTNFJTNFcG9yJTNDJTNDJTIwVGhpcyUyMHNob3VsZCUyMGdvJTIwdG8lMjBwb3J0dWd1ZXNlJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyJTNFJTNFZXNwJTNDJTNDJTIwQW5kJTIwdGhpcyUyMHRvJTIwU3BhbmlzaCUyMiUyQyUwQSU1RCUwQSUwQW1vZGVsX25hbWUlMjAlM0QlMjAlMjJIZWxzaW5raS1OTFAlMkZvcHVzLW10LWVuLXJvYSUyMiUwQXRva2VuaXplciUyMCUzRCUyME1hcmlhblRva2VuaXplci5mcm9tX3ByZXRyYWluZWQobW9kZWxfbmFtZSklMEFwcmludCh0b2tlbml6ZXIuc3VwcG9ydGVkX2xhbmd1YWdlX2NvZGVzKSUwQSUwQW1vZGVsJTIwJTNEJTIwTWFyaWFuTVRNb2RlbC5mcm9tX3ByZXRyYWluZWQobW9kZWxfbmFtZSklMEF0cmFuc2xhdGVkJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKip0b2tlbml6ZXIoc3JjX3RleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpKSUwQSU1QnRva2VuaXplci5kZWNvZGUodCUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUyMGZvciUyMHQlMjBpbiUyMHRyYW5zbGF0ZWQlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarianMTModel, MarianTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>src_text = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;&gt;&gt;fra&lt;&lt; this is a sentence in english that we want to translate to french&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;&gt;&gt;por&lt;&lt; This should go to portuguese&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;&gt;&gt;esp&lt;&lt; And this to Spanish&quot;</span>,
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-roa&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MarianTokenizer.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer.supported_language_codes)
[<span class="hljs-string">&#x27;&gt;&gt;zlm_Latn&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;mfe&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;hat&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;pap&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;ast&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;cat&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;ind&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;glg&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;wln&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;spa&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;fra&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;ron&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;por&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;ita&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;oci&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;arg&lt;&lt;&#x27;</span>, <span class="hljs-string">&#x27;&gt;&gt;min&lt;&lt;&#x27;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarianMTModel.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>translated = model.generate(**tokenizer(src_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>[tokenizer.decode(t, skip_special_tokens=<span class="hljs-literal">True</span>) <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> translated]
[<span class="hljs-string">&quot;c&#x27;est une phrase en anglais que nous voulons traduire en fran\xE7ais&quot;</span>,
 <span class="hljs-string">&#x27;Isto deve ir para o portugu\xEAs.&#x27;</span>,
 <span class="hljs-string">&#x27;Y esto al espa\xF1ol&#x27;</span>]`}}),po=new Ie({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGxpc3RfbW9kZWxzJTBBJTBBbW9kZWxfbGlzdCUyMCUzRCUyMGxpc3RfbW9kZWxzKCklMEFvcmclMjAlM0QlMjAlMjJIZWxzaW5raS1OTFAlMjIlMEFtb2RlbF9pZHMlMjAlM0QlMjAlNUJ4Lm1vZGVsSWQlMjBmb3IlMjB4JTIwaW4lMjBtb2RlbF9saXN0JTIwaWYlMjB4Lm1vZGVsSWQuc3RhcnRzd2l0aChvcmcpJTVEJTBBc3VmZml4JTIwJTNEJTIwJTVCeC5zcGxpdCglMjIlMkYlMjIpJTVCMSU1RCUyMGZvciUyMHglMjBpbiUyMG1vZGVsX2lkcyU1RCUwQW9sZF9zdHlsZV9tdWx0aV9tb2RlbHMlMjAlM0QlMjAlNUJmJTIyJTdCb3JnJTdEJTJGJTdCcyU3RCUyMiUyMGZvciUyMHMlMjBpbiUyMHN1ZmZpeCUyMGlmJTIwcyUyMCElM0QlMjBzLmxvd2VyKCklNUQ=",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> list_models

model_list = list_models()
org = <span class="hljs-string">&quot;Helsinki-NLP&quot;</span>
model_ids = [x.modelId <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> model_list <span class="hljs-keyword">if</span> x.modelId.startswith(org)]
suffix = [x.split(<span class="hljs-string">&quot;/&quot;</span>)[<span class="hljs-number">1</span>] <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> model_ids]
old_style_multi_models = [<span class="hljs-string">f&quot;<span class="hljs-subst">{org}</span>/<span class="hljs-subst">{s}</span>&quot;</span> <span class="hljs-keyword">for</span> s <span class="hljs-keyword">in</span> suffix <span class="hljs-keyword">if</span> s != s.lower()]`}}),ho=new oe({}),uo=new Ie({props:{code:"JTVCJ0hlbHNpbmtpLU5MUCUyRm9wdXMtbXQtTk9SVEhfRVUtTk9SVEhfRVUnJTJDJTBBJTIwJ0hlbHNpbmtpLU5MUCUyRm9wdXMtbXQtUk9NQU5DRS1lbiclMkMlMEElMjAnSGVsc2lua2ktTkxQJTJGb3B1cy1tdC1TQ0FORElOQVZJQS1TQ0FORElOQVZJQSclMkMlMEElMjAnSGVsc2lua2ktTkxQJTJGb3B1cy1tdC1kZS1aSCclMkMlMEElMjAnSGVsc2lua2ktTkxQJTJGb3B1cy1tdC1lbi1DRUxUSUMnJTJDJTBBJTIwJ0hlbHNpbmtpLU5MUCUyRm9wdXMtbXQtZW4tUk9NQU5DRSclMkMlMEElMjAnSGVsc2lua2ktTkxQJTJGb3B1cy1tdC1lcy1OT1JXQVknJTJDJTBBJTIwJ0hlbHNpbmtpLU5MUCUyRm9wdXMtbXQtZmktTk9SV0FZJyUyQyUwQSUyMCdIZWxzaW5raS1OTFAlMkZvcHVzLW10LWZpLVpIJyUyQyUwQSUyMCdIZWxzaW5raS1OTFAlMkZvcHVzLW10LWZpX25iX25vX25uX3J1X3N2X2VuLVNBTUknJTJDJTBBJTIwJ0hlbHNpbmtpLU5MUCUyRm9wdXMtbXQtc3YtTk9SV0FZJyUyQyUwQSUyMCdIZWxzaW5raS1OTFAlMkZvcHVzLW10LXN2LVpIJyU1RCUwQUdST1VQX01FTUJFUlMlMjAlM0QlMjAlN0IlMEElMjAnWkgnJTNBJTIwJTVCJ2NtbiclMkMlMjAnY24nJTJDJTIwJ3l1ZSclMkMlMjAnemVfemgnJTJDJTIwJ3poX2NuJyUyQyUyMCd6aF9DTiclMkMlMjAnemhfSEsnJTJDJTIwJ3poX3R3JyUyQyUyMCd6aF9UVyclMkMlMjAnemhfeXVlJyUyQyUyMCd6aHMnJTJDJTIwJ3podCclMkMlMjAnemgnJTVEJTJDJTBBJTIwJ1JPTUFOQ0UnJTNBJTIwJTVCJ2ZyJyUyQyUyMCdmcl9CRSclMkMlMjAnZnJfQ0EnJTJDJTIwJ2ZyX0ZSJyUyQyUyMCd3YSclMkMlMjAnZnJwJyUyQyUyMCdvYyclMkMlMjAnY2EnJTJDJTIwJ3JtJyUyQyUyMCdsbGQnJTJDJTIwJ2Z1ciclMkMlMjAnbGlqJyUyQyUyMCdsbW8nJTJDJTIwJ2VzJyUyQyUyMCdlc19BUiclMkMlMjAnZXNfQ0wnJTJDJTIwJ2VzX0NPJyUyQyUyMCdlc19DUiclMkMlMjAnZXNfRE8nJTJDJTIwJ2VzX0VDJyUyQyUyMCdlc19FUyclMkMlMjAnZXNfR1QnJTJDJTIwJ2VzX0hOJyUyQyUyMCdlc19NWCclMkMlMjAnZXNfTkknJTJDJTIwJ2VzX1BBJyUyQyUyMCdlc19QRSclMkMlMjAnZXNfUFInJTJDJTIwJ2VzX1NWJyUyQyUyMCdlc19VWSclMkMlMjAnZXNfVkUnJTJDJTIwJ3B0JyUyQyUyMCdwdF9iciclMkMlMjAncHRfQlInJTJDJTIwJ3B0X1BUJyUyQyUyMCdnbCclMkMlMjAnbGFkJyUyQyUyMCdhbiclMkMlMjAnbXdsJyUyQyUyMCdpdCclMkMlMjAnaXRfSVQnJTJDJTIwJ2NvJyUyQyUyMCduYXAnJTJDJTIwJ3NjbiclMkMlMjAndmVjJyUyQyUyMCdzYyclMkMlMjAncm8nJTJDJTIwJ2xhJyU1RCUyQyUwQSUyMCdOT1JUSF9FVSclM0ElMjAlNUInZGUnJTJDJTIwJ25sJyUyQyUyMCdmeSclMkMlMjAnYWYnJTJDJTIwJ2RhJyUyQyUyMCdmbyclMkMlMjAnaXMnJTJDJTIwJ25vJyUyQyUyMCduYiclMkMlMjAnbm4nJTJDJTIwJ3N2JyU1RCUyQyUwQSUyMCdTQ0FORElOQVZJQSclM0ElMjAlNUInZGEnJTJDJTIwJ2ZvJyUyQyUyMCdpcyclMkMlMjAnbm8nJTJDJTIwJ25iJyUyQyUyMCdubiclMkMlMjAnc3YnJTVEJTJDJTBBJTIwJ1NBTUknJTNBJTIwJTVCJ3NlJyUyQyUyMCdzbWEnJTJDJTIwJ3NtaiclMkMlMjAnc21uJyUyQyUyMCdzbXMnJTVEJTJDJTBBJTIwJ05PUldBWSclM0ElMjAlNUInbmJfTk8nJTJDJTIwJ25iJyUyQyUyMCdubl9OTyclMkMlMjAnbm4nJTJDJTIwJ25vZyclMkMlMjAnbm9fbmInJTJDJTIwJ25vJyU1RCUyQyUwQSUyMCdDRUxUSUMnJTNBJTIwJTVCJ2dhJyUyQyUyMCdjeSclMkMlMjAnYnInJTJDJTIwJ2dkJyUyQyUyMCdrdyclMkMlMjAnZ3YnJTVEJTBBJTdE",highlighted:`[<span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-NORTH_EU-NORTH_EU&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-ROMANCE-en&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-SCANDINAVIA-SCANDINAVIA&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-de-ZH&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-en-CELTIC&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-en-ROMANCE&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-es-NORWAY&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-fi-NORWAY&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-fi-ZH&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-fi_nb_no_nn_ru_sv_en-SAMI&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-sv-NORWAY&#x27;</span>,
 <span class="hljs-string">&#x27;Helsinki-NLP/opus-mt-sv-ZH&#x27;</span>]
GROUP_MEMBERS = {
 <span class="hljs-string">&#x27;ZH&#x27;</span>: [<span class="hljs-string">&#x27;cmn&#x27;</span>, <span class="hljs-string">&#x27;cn&#x27;</span>, <span class="hljs-string">&#x27;yue&#x27;</span>, <span class="hljs-string">&#x27;ze_zh&#x27;</span>, <span class="hljs-string">&#x27;zh_cn&#x27;</span>, <span class="hljs-string">&#x27;zh_CN&#x27;</span>, <span class="hljs-string">&#x27;zh_HK&#x27;</span>, <span class="hljs-string">&#x27;zh_tw&#x27;</span>, <span class="hljs-string">&#x27;zh_TW&#x27;</span>, <span class="hljs-string">&#x27;zh_yue&#x27;</span>, <span class="hljs-string">&#x27;zhs&#x27;</span>, <span class="hljs-string">&#x27;zht&#x27;</span>, <span class="hljs-string">&#x27;zh&#x27;</span>],
 <span class="hljs-string">&#x27;ROMANCE&#x27;</span>: [<span class="hljs-string">&#x27;fr&#x27;</span>, <span class="hljs-string">&#x27;fr_BE&#x27;</span>, <span class="hljs-string">&#x27;fr_CA&#x27;</span>, <span class="hljs-string">&#x27;fr_FR&#x27;</span>, <span class="hljs-string">&#x27;wa&#x27;</span>, <span class="hljs-string">&#x27;frp&#x27;</span>, <span class="hljs-string">&#x27;oc&#x27;</span>, <span class="hljs-string">&#x27;ca&#x27;</span>, <span class="hljs-string">&#x27;rm&#x27;</span>, <span class="hljs-string">&#x27;lld&#x27;</span>, <span class="hljs-string">&#x27;fur&#x27;</span>, <span class="hljs-string">&#x27;lij&#x27;</span>, <span class="hljs-string">&#x27;lmo&#x27;</span>, <span class="hljs-string">&#x27;es&#x27;</span>, <span class="hljs-string">&#x27;es_AR&#x27;</span>, <span class="hljs-string">&#x27;es_CL&#x27;</span>, <span class="hljs-string">&#x27;es_CO&#x27;</span>, <span class="hljs-string">&#x27;es_CR&#x27;</span>, <span class="hljs-string">&#x27;es_DO&#x27;</span>, <span class="hljs-string">&#x27;es_EC&#x27;</span>, <span class="hljs-string">&#x27;es_ES&#x27;</span>, <span class="hljs-string">&#x27;es_GT&#x27;</span>, <span class="hljs-string">&#x27;es_HN&#x27;</span>, <span class="hljs-string">&#x27;es_MX&#x27;</span>, <span class="hljs-string">&#x27;es_NI&#x27;</span>, <span class="hljs-string">&#x27;es_PA&#x27;</span>, <span class="hljs-string">&#x27;es_PE&#x27;</span>, <span class="hljs-string">&#x27;es_PR&#x27;</span>, <span class="hljs-string">&#x27;es_SV&#x27;</span>, <span class="hljs-string">&#x27;es_UY&#x27;</span>, <span class="hljs-string">&#x27;es_VE&#x27;</span>, <span class="hljs-string">&#x27;pt&#x27;</span>, <span class="hljs-string">&#x27;pt_br&#x27;</span>, <span class="hljs-string">&#x27;pt_BR&#x27;</span>, <span class="hljs-string">&#x27;pt_PT&#x27;</span>, <span class="hljs-string">&#x27;gl&#x27;</span>, <span class="hljs-string">&#x27;lad&#x27;</span>, <span class="hljs-string">&#x27;an&#x27;</span>, <span class="hljs-string">&#x27;mwl&#x27;</span>, <span class="hljs-string">&#x27;it&#x27;</span>, <span class="hljs-string">&#x27;it_IT&#x27;</span>, <span class="hljs-string">&#x27;co&#x27;</span>, <span class="hljs-string">&#x27;nap&#x27;</span>, <span class="hljs-string">&#x27;scn&#x27;</span>, <span class="hljs-string">&#x27;vec&#x27;</span>, <span class="hljs-string">&#x27;sc&#x27;</span>, <span class="hljs-string">&#x27;ro&#x27;</span>, <span class="hljs-string">&#x27;la&#x27;</span>],
 <span class="hljs-string">&#x27;NORTH_EU&#x27;</span>: [<span class="hljs-string">&#x27;de&#x27;</span>, <span class="hljs-string">&#x27;nl&#x27;</span>, <span class="hljs-string">&#x27;fy&#x27;</span>, <span class="hljs-string">&#x27;af&#x27;</span>, <span class="hljs-string">&#x27;da&#x27;</span>, <span class="hljs-string">&#x27;fo&#x27;</span>, <span class="hljs-string">&#x27;is&#x27;</span>, <span class="hljs-string">&#x27;no&#x27;</span>, <span class="hljs-string">&#x27;nb&#x27;</span>, <span class="hljs-string">&#x27;nn&#x27;</span>, <span class="hljs-string">&#x27;sv&#x27;</span>],
 <span class="hljs-string">&#x27;SCANDINAVIA&#x27;</span>: [<span class="hljs-string">&#x27;da&#x27;</span>, <span class="hljs-string">&#x27;fo&#x27;</span>, <span class="hljs-string">&#x27;is&#x27;</span>, <span class="hljs-string">&#x27;no&#x27;</span>, <span class="hljs-string">&#x27;nb&#x27;</span>, <span class="hljs-string">&#x27;nn&#x27;</span>, <span class="hljs-string">&#x27;sv&#x27;</span>],
 <span class="hljs-string">&#x27;SAMI&#x27;</span>: [<span class="hljs-string">&#x27;se&#x27;</span>, <span class="hljs-string">&#x27;sma&#x27;</span>, <span class="hljs-string">&#x27;smj&#x27;</span>, <span class="hljs-string">&#x27;smn&#x27;</span>, <span class="hljs-string">&#x27;sms&#x27;</span>],
 <span class="hljs-string">&#x27;NORWAY&#x27;</span>: [<span class="hljs-string">&#x27;nb_NO&#x27;</span>, <span class="hljs-string">&#x27;nb&#x27;</span>, <span class="hljs-string">&#x27;nn_NO&#x27;</span>, <span class="hljs-string">&#x27;nn&#x27;</span>, <span class="hljs-string">&#x27;nog&#x27;</span>, <span class="hljs-string">&#x27;no_nb&#x27;</span>, <span class="hljs-string">&#x27;no&#x27;</span>],
 <span class="hljs-string">&#x27;CELTIC&#x27;</span>: [<span class="hljs-string">&#x27;ga&#x27;</span>, <span class="hljs-string">&#x27;cy&#x27;</span>, <span class="hljs-string">&#x27;br&#x27;</span>, <span class="hljs-string">&#x27;gd&#x27;</span>, <span class="hljs-string">&#x27;kw&#x27;</span>, <span class="hljs-string">&#x27;gv&#x27;</span>]
}`}}),mo=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1hcmlhbk1UTW9kZWwlMkMlMjBNYXJpYW5Ub2tlbml6ZXIlMEElMEFzcmNfdGV4dCUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMiUzRSUzRWZyJTNDJTNDJTIwdGhpcyUyMGlzJTIwYSUyMHNlbnRlbmNlJTIwaW4lMjBlbmdsaXNoJTIwdGhhdCUyMHdlJTIwd2FudCUyMHRvJTIwdHJhbnNsYXRlJTIwdG8lMjBmcmVuY2glMjIlMkMlMEElMjAlMjAlMjAlMjAlMjIlM0UlM0VwdCUzQyUzQyUyMFRoaXMlMjBzaG91bGQlMjBnbyUyMHRvJTIwcG9ydHVndWVzZSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMiUzRSUzRWVzJTNDJTNDJTIwQW5kJTIwdGhpcyUyMHRvJTIwU3BhbmlzaCUyMiUyQyUwQSU1RCUwQSUwQW1vZGVsX25hbWUlMjAlM0QlMjAlMjJIZWxzaW5raS1OTFAlMkZvcHVzLW10LWVuLVJPTUFOQ0UlMjIlMEF0b2tlbml6ZXIlMjAlM0QlMjBNYXJpYW5Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX25hbWUpJTBBJTBBbW9kZWwlMjAlM0QlMjBNYXJpYW5NVE1vZGVsLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKSUwQXRyYW5zbGF0ZWQlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKnRva2VuaXplcihzcmNfdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSkpJTBBdGd0X3RleHQlMjAlM0QlMjAlNUJ0b2tlbml6ZXIuZGVjb2RlKHQlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMjBmb3IlMjB0JTIwaW4lMjB0cmFuc2xhdGVkJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarianMTModel, MarianTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>src_text = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;&gt;&gt;fr&lt;&lt; this is a sentence in english that we want to translate to french&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;&gt;&gt;pt&lt;&lt; This should go to portuguese&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;&gt;&gt;es&lt;&lt; And this to Spanish&quot;</span>,
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;Helsinki-NLP/opus-mt-en-ROMANCE&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MarianTokenizer.from_pretrained(model_name)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarianMTModel.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>translated = model.generate(**tokenizer(src_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>tgt_text = [tokenizer.decode(t, skip_special_tokens=<span class="hljs-literal">True</span>) <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> translated]
[<span class="hljs-string">&quot;c&#x27;est une phrase en anglais que nous voulons traduire en fran\xE7ais&quot;</span>, 
 <span class="hljs-string">&#x27;Isto deve ir para o portugu\xEAs.&#x27;</span>,
 <span class="hljs-string">&#x27;Y esto al espa\xF1ol&#x27;</span>]`}}),fo=new oe({}),go=new oe({}),_o=new D({props:{name:"class transformers.MarianConfig",anchor:"transformers.MarianConfig",parameters:[{name:"vocab_size",val:" = 58101"},{name:"decoder_vocab_size",val:" = None"},{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.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'gelu'"},{name:"d_model",val:" = 1024"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"decoder_start_token_id",val:" = 58100"},{name:"scale_embedding",val:" = False"},{name:"pad_token_id",val:" = 58100"},{name:"eos_token_id",val:" = 0"},{name:"forced_eos_token_id",val:" = 0"},{name:"share_encoder_decoder_embeddings",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MarianConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 58101) &#x2014;
Vocabulary size of the Marian model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianModel">MarianModel</a> or <a href="/docs/transformers/v4.32.0/en/model_doc/marian#transformers.TFMarianModel">TFMarianModel</a>.`,name:"vocab_size"},{anchor:"transformers.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.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.MarianConfig.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.MarianConfig.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"},{anchor:"transformers.MarianConfig.forced_eos_token_id",description:`<strong>forced_eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the token to force as the last generated token when <code>max_length</code> is reached. Usually set to
<code>eos_token_id</code>.`,name:"forced_eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/configuration_marian.py#L34"}}),an=new Qt({props:{anchor:"transformers.MarianConfig.example",$$slots:{default:[kf]},$$scope:{ctx:J}}}),yo=new oe({}),To=new D({props:{name:"class transformers.MarianTokenizer",anchor:"transformers.MarianTokenizer",parameters:[{name:"source_spm",val:""},{name:"target_spm",val:""},{name:"vocab",val:""},{name:"target_vocab_file",val:" = None"},{name:"source_lang",val:" = None"},{name:"target_lang",val:" = None"},{name:"unk_token",val:" = '<unk>'"},{name:"eos_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"model_max_length",val:" = 512"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"separate_vocabs",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MarianTokenizer.source_spm",description:`<strong>source_spm</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a .spm extension) that
contains the vocabulary for the source language.`,name:"source_spm"},{anchor:"transformers.MarianTokenizer.target_spm",description:`<strong>target_spm</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a .spm extension) that
contains the vocabulary for the target language.`,name:"target_spm"},{anchor:"transformers.MarianTokenizer.source_lang",description:`<strong>source_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the source language.`,name:"source_lang"},{anchor:"transformers.MarianTokenizer.target_lang",description:`<strong>target_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language.`,name:"target_lang"},{anchor:"transformers.MarianTokenizer.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.MarianTokenizer.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.MarianTokenizer.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.MarianTokenizer.model_max_length",description:`<strong>model_max_length</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sentence length the model accepts.`,name:"model_max_length"},{anchor:"transformers.MarianTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;eop&gt;&quot;, &quot;&lt;eod&gt;&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.MarianTokenizer.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/v4.32.0/src/transformers/models/marian/tokenization_marian.py#L61"}}),ln=new Qt({props:{anchor:"transformers.MarianTokenizer.example",$$slots:{default:[wf]},$$scope:{ctx:J}}}),wo=new D({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MarianTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/tokenization_marian.py#L283"}}),xo=new oe({}),jo=new D({props:{name:"class transformers.MarianModel",anchor:"transformers.MarianModel",parameters:[{name:"config",val:": MarianConfig"}],parametersDescription:[{anchor:"transformers.MarianModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianConfig">MarianConfig</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/v4.32.0/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/v4.32.0/src/transformers/models/marian/modeling_marian.py#L1106"}}),Uo=new D({props:{name:"forward",anchor:"transformers.MarianModel.forward",parameters:[{name:"input_ids",val:": 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.Tensor] = 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.Union[typing.Tuple[torch.Tensor], transformers.modeling_outputs.BaseModelOutput, NoneType] = 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.MarianModel.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.MarianModel.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.MarianModel.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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>Marian uses the <code>pad_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.MarianModel.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.MarianModel.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.MarianModel.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.MarianModel.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.MarianModel.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.MarianModel.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>.`,name:"past_key_values"},{anchor:"transformers.MarianModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
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:"inputs_embeds"},{anchor:"transformers.MarianModel.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.MarianModel.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.MarianModel.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.MarianModel.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.MarianModel.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_marian.py#L1190",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/marian#transformers.MarianConfig"
>MarianConfig</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/v4.32.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pn=new Gn({props:{$$slots:{default:[xf]},$$scope:{ctx:J}}}),hn=new Qt({props:{anchor:"transformers.MarianModel.forward.example",$$slots:{default:[jf]},$$scope:{ctx:J}}}),Eo=new oe({}),Io=new D({props:{name:"class transformers.MarianMTModel",anchor:"transformers.MarianMTModel",parameters:[{name:"config",val:": MarianConfig"}],parametersDescription:[{anchor:"transformers.MarianMTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianConfig">MarianConfig</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/v4.32.0/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/v4.32.0/src/transformers/models/marian/modeling_marian.py#L1292"}}),qo=new D({props:{name:"forward",anchor:"transformers.MarianMTModel.forward",parameters:[{name:"input_ids",val:": 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.Tensor] = 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.Union[typing.Tuple[torch.Tensor], transformers.modeling_outputs.BaseModelOutput, NoneType] = 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.MarianMTModel.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.MarianMTModel.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.MarianMTModel.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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>Marian uses the <code>pad_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.MarianMTModel.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.MarianMTModel.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.MarianMTModel.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.MarianMTModel.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.MarianMTModel.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.MarianMTModel.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>.`,name:"past_key_values"},{anchor:"transformers.MarianMTModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
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:"inputs_embeds"},{anchor:"transformers.MarianMTModel.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.MarianMTModel.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.MarianMTModel.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.MarianMTModel.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.MarianMTModel.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MarianMTModel.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/v4.32.0/src/transformers/models/marian/modeling_marian.py#L1416",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/marian#transformers.MarianConfig"
>MarianConfig</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/v4.32.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mn=new Gn({props:{$$slots:{default:[Jf]},$$scope:{ctx:J}}}),fn=new Qt({props:{anchor:"transformers.MarianMTModel.forward.example",$$slots:{default:[$f]},$$scope:{ctx:J}}}),Wo=new oe({}),So=new D({props:{name:"class transformers.MarianForCausalLM",anchor:"transformers.MarianForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_marian.py#L1556"}}),Po=new D({props:{name:"forward",anchor:"transformers.MarianForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"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.MarianForCausalLM.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.MarianForCausalLM.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.MarianForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention
if the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.MarianForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used
in the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,name:"encoder_attention_mask"},{anchor:"transformers.MarianForCausalLM.forward.head_mask",description:`<strong>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. 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.MarianForCausalLM.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. 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.MarianForCausalLM.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>. The two additional
tensors are only required when the model is used as a decoder in a Sequence to Sequence model.</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>.`,name:"past_key_values"},{anchor:"transformers.MarianForCausalLM.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"},{anchor:"transformers.MarianForCausalLM.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>).</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"use_cache"},{anchor:"transformers.MarianForCausalLM.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.MarianForCausalLM.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.MarianForCausalLM.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_marian.py#L1589",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</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/v4.32.0/en/model_doc/marian#transformers.MarianConfig"
>MarianConfig</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 (for next-token prediction).</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>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 model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>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 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>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</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>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mn=new Qt({props:{anchor:"transformers.MarianForCausalLM.forward.example",$$slots:{default:[zf]},$$scope:{ctx:J}}}),Bo=new oe({}),Vo=new D({props:{name:"class transformers.TFMarianModel",anchor:"transformers.TFMarianModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMarianModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianConfig">MarianConfig</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/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_tf_marian.py#L1157"}}),Tn=new Gn({props:{$$slots:{default:[Uf]},$$scope:{ctx:J}}}),Lo=new D({props:{name:"call",anchor:"transformers.TFMarianModel.call",parameters:[{name:"input_ids",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_input_ids",val:": tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_position_ids",val:": tf.Tensor | None = None"},{name:"head_mask",val:": tf.Tensor | None = None"},{name:"decoder_head_mask",val:": tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": tf.Tensor | None = None"},{name:"encoder_outputs",val:": tf.Tensor | None = None"},{name:"past_key_values",val:": Tuple[Tuple[tf.Tensor]] | None = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"decoder_inputs_embeds",val:": tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMarianModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.TFMarianModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.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.TFMarianModel.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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>Marian uses the <code>pad_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.TFMarianModel.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFMarianModel.call.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.TFMarianModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.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.TFMarianModel.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.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.TFMarianModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.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. 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.TFMarianModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFMarianModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
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>.`,name:"past_key_values"},{anchor:"transformers.TFMarianModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#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>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFMarianModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFMarianModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFMarianModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMarianModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_tf_marian.py#L1169",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</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/v4.32.0/en/model_doc/marian#transformers.MarianConfig"
>MarianConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</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>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder 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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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(tf.Tensor)</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>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</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>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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(tf.Tensor)</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>tf.Tensor</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/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),bn=new Gn({props:{$$slots:{default:[Ef]},$$scope:{ctx:J}}}),vn=new Qt({props:{anchor:"transformers.TFMarianModel.call.example",$$slots:{default:[If]},$$scope:{ctx:J}}}),Ho=new oe({}),Qo=new D({props:{name:"class transformers.TFMarianMTModel",anchor:"transformers.TFMarianMTModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMarianMTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianConfig">MarianConfig</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/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_tf_marian.py#L1262"}}),wn=new Gn({props:{$$slots:{default:[Ff]},$$scope:{ctx:J}}}),Ko=new D({props:{name:"call",anchor:"transformers.TFMarianMTModel.call",parameters:[{name:"input_ids",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_input_ids",val:": tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_position_ids",val:": tf.Tensor | None = None"},{name:"head_mask",val:": tf.Tensor | None = None"},{name:"decoder_head_mask",val:": tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": tf.Tensor | None = None"},{name:"encoder_outputs",val:": Optional[TFBaseModelOutput] = None"},{name:"past_key_values",val:": Tuple[Tuple[tf.Tensor]] | None = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"decoder_inputs_embeds",val:": tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFMarianMTModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.TFMarianMTModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>({0})</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.TFMarianMTModel.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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>Marian uses the <code>pad_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.TFMarianMTModel.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFMarianMTModel.call.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.TFMarianMTModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.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.TFMarianMTModel.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.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.TFMarianMTModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.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. 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.TFMarianMTModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFMarianMTModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
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>.`,name:"past_key_values"},{anchor:"transformers.TFMarianMTModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#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>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFMarianMTModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFMarianMTModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFMarianMTModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMarianMTModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFMarianMTModel.call.labels",description:`<strong>labels</strong> (<code>tf.tensor</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/v4.32.0/src/transformers/models/marian/modeling_tf_marian.py#L1300",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</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/v4.32.0/en/model_doc/marian#transformers.MarianConfig"
>MarianConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</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>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder 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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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(tf.Tensor)</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>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</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>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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(tf.Tensor)</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>tf.Tensor</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/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),xn=new Gn({props:{$$slots:{default:[Cf]},$$scope:{ctx:J}}}),jn=new Qt({props:{anchor:"transformers.TFMarianMTModel.call.example",$$slots:{default:[Nf]},$$scope:{ctx:J}}}),ns=new oe({}),os=new D({props:{name:"class transformers.FlaxMarianModel",anchor:"transformers.FlaxMarianModel",parameters:[{name:"config",val:": MarianConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxMarianModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianConfig">MarianConfig</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/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMarianModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_flax_marian.py#L1205"}}),ps=new D({props:{name:"__call__",anchor:"transformers.FlaxMarianModel.__call__",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMarianModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.FlaxMarianModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMarianModel.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMarianModel.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMarianModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMarianModel.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMarianModel.__call__.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.FlaxMarianModel.__call__.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.FlaxMarianModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_flax_marian.py#L1140",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</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/v4.32.0/en/model_doc/marian#transformers.MarianConfig"
>MarianConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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(jnp.ndarray))</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(jnp.ndarray)</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + 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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + 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(jnp.ndarray)</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>jnp.ndarray</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/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$n=new Gn({props:{$$slots:{default:[qf]},$$scope:{ctx:J}}}),zn=new Qt({props:{anchor:"transformers.FlaxMarianModel.__call__.example",$$slots:{default:[Zf]},$$scope:{ctx:J}}}),hs=new oe({}),us=new D({props:{name:"class transformers.FlaxMarianMTModel",anchor:"transformers.FlaxMarianMTModel",parameters:[{name:"config",val:": MarianConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxMarianMTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianConfig">MarianConfig</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/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMarianMTModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_flax_marian.py#L1289"}}),bs=new D({props:{name:"__call__",anchor:"transformers.FlaxMarianMTModel.__call__",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMarianMTModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.FlaxMarianMTModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMarianMTModel.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMarianMTModel.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMarianMTModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMarianMTModel.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMarianMTModel.__call__.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.FlaxMarianMTModel.__call__.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.FlaxMarianMTModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/marian/modeling_flax_marian.py#L1140",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</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/v4.32.0/en/model_doc/marian#transformers.MarianConfig"
>MarianConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray))</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(jnp.ndarray)</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + 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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + 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(jnp.ndarray)</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>jnp.ndarray</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/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),En=new Gn({props:{$$slots:{default:[Af]},$$scope:{ctx:J}}}),In=new Qt({props:{anchor:"transformers.FlaxMarianMTModel.__call__.example",$$slots:{default:[Wf]},$$scope:{ctx:J}}}),{c(){h=o("meta"),y=c(),_=o("h1"),g=o("a"),M=o("span"),b(i.$$.fragment),u=c(),z=o("span"),Le=r("MarianMT"),Fe=c(),Z=o("div"),he=o("a"),Y=o("img"),He=c(),S=o("a"),ue=o("img"),K=c(),B=o("p"),_e=o("strong"),se=r("Bugs:"),Qe=r(" If you see something strange, file a "),ae=o("a"),re=r("Github Issue"),Oe=r(`
and assign @patrickvonplaten.`),Ce=c(),P=o("p"),De=r("Translations should be similar, but not identical to output in the test set linked to in each model card."),Ne=c(),ee=o("p"),F=r("Tips:"),q=c(),me=o("ul"),V=o("li"),Ye=r("A framework for translation models, using the same models as BART."),qe=c(),A=o("h2"),te=o("a"),Me=o("span"),b(C.$$.fragment),Ke=c(),R=o("span"),et=r("Implementation Notes"),Ze=c(),E=o("ul"),ye=o("li"),Te=o("p"),G=r("Each model is about 298 MB on disk, there are more than 1,000 models."),tt=c(),X=o("li"),le=o("p"),be=r("The list of supported language pairs can be found "),N=o("a"),nt=r("here"),W=r("."),ot=c(),ve=o("li"),T=o("p"),U=r("Models were originally trained by "),ke=o("a"),we=r("J\xF6rg Tiedemann"),_t=r(" using the "),xe=o("a"),I=r("Marian"),Mt=r(" C++ library, which supports fast training and translation."),yt=c(),st=o("li"),at=o("p"),Tt=r(`All models are transformer encoder-decoders with 6 layers in each component. Each model\u2019s performance is documented
in a model card.`),L=c(),H=o("li"),rt=o("p"),bt=r("The 80 opus models that require BPE preprocessing are not supported."),ie=c(),je=o("li"),Je=o("p"),lt=r("The modeling code is the same as "),Ae=o("a"),$e=r("BartForConditionalGeneration"),vt=r(" with a few minor modifications:"),ai=c(),kt=o("ul"),Xn=o("li"),ri=r("static (sinusoid) positional embeddings ("),aa=o("code"),li=r("MarianConfig.static_position_embeddings=True"),ii=r(")"),di=c(),Ln=o("li"),ci=r("no layernorm_embedding ("),ra=o("code"),pi=r("MarianConfig.normalize_embedding=False"),hi=r(")"),ui=c(),wt=o("li"),mi=r("the model starts generating with "),la=o("code"),fi=r("pad_token_id"),gi=r(` (which has 0 as a token_embedding) as the prefix (Bart uses
`),ia=o("code"),_i=r("<s/>"),Mi=r("),"),yi=c(),da=o("li"),Hn=o("p"),Ti=r("Code to bulk convert models can be found in "),ca=o("code"),bi=r("convert_marian_to_pytorch.py"),vi=r("."),ki=c(),pa=o("li"),Qn=o("p"),wi=r("This model was contributed by "),On=o("a"),xi=r("sshleifer"),ji=r("."),Ur=c(),xt=o("h2"),Dt=o("a"),ha=o("span"),b(Dn.$$.fragment),Ji=c(),ua=o("span"),$i=r("Naming"),Er=c(),We=o("ul"),xs=o("li"),zi=r("All model names use the following format: "),ma=o("code"),Ui=r("Helsinki-NLP/opus-mt-{src}-{tgt}"),Ei=c(),Yn=o("li"),Ii=r("The language codes used to name models are inconsistent. Two digit codes can usually be found "),Kn=o("a"),Fi=r("here"),Ci=r(`, three digit codes require googling \u201Clanguage
code {code}\u201C.`),Ni=c(),jt=o("li"),qi=r("Codes formatted like "),fa=o("code"),Zi=r("es_AR"),Ai=r(" are usually "),ga=o("code"),Wi=r("code_{region}"),Si=r(". That one is Spanish from Argentina."),Pi=c(),_a=o("li"),Bi=r(`The models were converted in two stages. The first 1000 models use ISO-639-2 codes to identify languages, the second
group use a combination of ISO-639-5 codes and ISO-639-2 codes.`),Ir=c(),Jt=o("h2"),Yt=o("a"),Ma=o("span"),b(eo.$$.fragment),Vi=c(),ya=o("span"),Ri=r("Examples"),Fr=c(),Kt=o("ul"),Ta=o("li"),Gi=r(`Since Marian models are smaller than many other translation models available in the library, they can be useful for
fine-tuning experiments and integration tests.`),Xi=c(),ba=o("li"),to=o("a"),Li=r("Fine-tune on GPU"),Cr=c(),$t=o("h2"),en=o("a"),va=o("span"),b(no.$$.fragment),Hi=c(),ka=o("span"),Qi=r("Multilingual Models"),Nr=c(),Se=o("ul"),oo=o("li"),Oi=r("All model names use the following format: "),wa=o("code"),Di=r("Helsinki-NLP/opus-mt-{src}-{tgt}"),Yi=r(":"),Ki=c(),so=o("li"),ed=r(`If a model can output multiple languages, and you should specify a language code by prepending the desired output
language to the `),xa=o("code"),td=r("src_text"),nd=r("."),od=c(),ao=o("li"),sd=r("You can see a models\u2019s supported language codes in its model card, under target constituents, like in "),ro=o("a"),ad=r("opus-mt-en-roa"),rd=r("."),ld=c(),lo=o("li"),id=r("Note that if a model is only multilingual on the source side, like "),ja=o("code"),dd=r("Helsinki-NLP/opus-mt-roa-en"),cd=r(`, no language
codes are required.`),qr=c(),tn=o("p"),pd=r("New multi-lingual models from the "),io=o("a"),hd=r("Tatoeba-Challenge repo"),ud=r(`
require 3 character language codes:`),Zr=c(),b(co.$$.fragment),Ar=c(),js=o("p"),md=r("Here is the code to see all available pretrained models on the hub:"),Wr=c(),b(po.$$.fragment),Sr=c(),zt=o("h2"),nn=o("a"),Ja=o("span"),b(ho.$$.fragment),fd=c(),$a=o("span"),gd=r("Old Style Multi-Lingual Models"),Pr=c(),Js=o("p"),_d=r(`These are the old style multi-lingual models ported from the OPUS-MT-Train repo: and the members of each language
group:`),Br=c(),b(uo.$$.fragment),Vr=c(),$s=o("p"),Md=r("Example of translating english to many romance languages, using old-style 2 character language codes"),Rr=c(),b(mo.$$.fragment),Gr=c(),Ut=o("h2"),on=o("a"),za=o("span"),b(fo.$$.fragment),yd=c(),Ua=o("span"),Td=r("Documentation resources"),Xr=c(),pt=o("ul"),Ea=o("li"),zs=o("a"),bd=r("Translation task guide"),vd=c(),Ia=o("li"),Us=o("a"),kd=r("Summarization task guide"),wd=c(),Fa=o("li"),Es=o("a"),xd=r("Causal language modeling task guide"),Lr=c(),Et=o("h2"),sn=o("a"),Ca=o("span"),b(go.$$.fragment),jd=c(),Na=o("span"),Jd=r("MarianConfig"),Hr=c(),ze=o("div"),b(_o.$$.fragment),$d=c(),It=o("p"),zd=r("This is the configuration class to store the configuration of a "),Is=o("a"),Ud=r("MarianModel"),Ed=r(`. It is used to instantiate an
Marian 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 Marian
`),Mo=o("a"),Id=r("Helsinki-NLP/opus-mt-en-de"),Fd=r(" architecture."),Cd=c(),Ft=o("p"),Nd=r("Configuration objects inherit from "),Fs=o("a"),qd=r("PretrainedConfig"),Zd=r(` and can be used to control the model outputs. Read the
documentation from `),Cs=o("a"),Ad=r("PretrainedConfig"),Wd=r(" for more information."),Sd=c(),b(an.$$.fragment),Qr=c(),Ct=o("h2"),rn=o("a"),qa=o("span"),b(yo.$$.fragment),Pd=c(),Za=o("span"),Bd=r("MarianTokenizer"),Or=c(),de=o("div"),b(To.$$.fragment),Vd=c(),bo=o("p"),Rd=r("Construct a Marian tokenizer. Based on "),vo=o("a"),Gd=r("SentencePiece"),Xd=r("."),Ld=c(),ko=o("p"),Hd=r("This tokenizer inherits from "),Ns=o("a"),Qd=r("PreTrainedTokenizer"),Od=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Dd=c(),b(ln.$$.fragment),Yd=c(),dn=o("div"),b(wo.$$.fragment),Kd=c(),Aa=o("p"),ec=r("Build model inputs from a sequence by appending eos_token_id."),Dr=c(),Nt=o("h2"),cn=o("a"),Wa=o("span"),b(xo.$$.fragment),tc=c(),Sa=o("span"),nc=r("MarianModel"),Yr=c(),Ue=o("div"),b(jo.$$.fragment),oc=c(),Jo=o("p"),sc=r(`The bare Marian Model outputting raw hidden-states without any specific head on top.
This model inherits from `),qs=o("a"),ac=r("PreTrainedModel"),rc=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.)`),lc=c(),$o=o("p"),ic=r("This model is also a PyTorch "),zo=o("a"),dc=r("torch.nn.Module"),cc=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),pc=c(),Pe=o("div"),b(Uo.$$.fragment),hc=c(),qt=o("p"),uc=r("The "),Zs=o("a"),mc=r("MarianModel"),fc=r(" forward method, overrides the "),Pa=o("code"),gc=r("__call__"),_c=r(" special method."),Mc=c(),b(pn.$$.fragment),yc=c(),b(hn.$$.fragment),Kr=c(),Zt=o("h2"),un=o("a"),Ba=o("span"),b(Eo.$$.fragment),Tc=c(),Va=o("span"),bc=r("MarianMTModel"),el=c(),Ee=o("div"),b(Io.$$.fragment),vc=c(),Fo=o("p"),kc=r(`The Marian Model with a language modeling head. Can be used for summarization.
This model inherits from `),As=o("a"),wc=r("PreTrainedModel"),xc=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.)`),jc=c(),Co=o("p"),Jc=r("This model is also a PyTorch "),No=o("a"),$c=r("torch.nn.Module"),zc=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Uc=c(),fe=o("div"),b(qo.$$.fragment),Ec=c(),At=o("p"),Ic=r("The "),Ws=o("a"),Fc=r("MarianMTModel"),Cc=r(" forward method, overrides the "),Ra=o("code"),Nc=r("__call__"),qc=r(" special method."),Zc=c(),b(mn.$$.fragment),Ac=c(),Zo=o("p"),Wc=r(`Pytorch version of marian-nmt\u2019s transformer.h (c++). Designed for the OPUS-NMT translation checkpoints. Available
models are listed `),Ao=o("a"),Sc=r("here"),Pc=r("."),Bc=c(),b(fn.$$.fragment),tl=c(),Wt=o("h2"),gn=o("a"),Ga=o("span"),b(Wo.$$.fragment),Vc=c(),Xa=o("span"),Rc=r("MarianForCausalLM"),nl=c(),St=o("div"),b(So.$$.fragment),Gc=c(),_n=o("div"),b(Po.$$.fragment),Xc=c(),b(Mn.$$.fragment),ol=c(),Pt=o("h2"),yn=o("a"),La=o("span"),b(Bo.$$.fragment),Lc=c(),Ha=o("span"),Hc=r("TFMarianModel"),sl=c(),ce=o("div"),b(Vo.$$.fragment),Qc=c(),Ro=o("p"),Oc=r(`The bare MARIAN Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ss=o("a"),Dc=r("TFPreTrainedModel"),Yc=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.)`),Kc=c(),Go=o("p"),ep=r("This model is also a "),Xo=o("a"),tp=r("tf.keras.Model"),np=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),op=c(),b(Tn.$$.fragment),sp=c(),Be=o("div"),b(Lo.$$.fragment),ap=c(),Bt=o("p"),rp=r("The "),Ps=o("a"),lp=r("TFMarianModel"),ip=r(" forward method, overrides the "),Qa=o("code"),dp=r("__call__"),cp=r(" special method."),pp=c(),b(bn.$$.fragment),hp=c(),b(vn.$$.fragment),al=c(),Vt=o("h2"),kn=o("a"),Oa=o("span"),b(Ho.$$.fragment),up=c(),Da=o("span"),mp=r("TFMarianMTModel"),rl=c(),pe=o("div"),b(Qo.$$.fragment),fp=c(),Oo=o("p"),gp=r(`The MARIAN Model with a language modeling head. Can be used for summarization.
This model inherits from `),Bs=o("a"),_p=r("TFPreTrainedModel"),Mp=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.)`),yp=c(),Do=o("p"),Tp=r("This model is also a "),Yo=o("a"),bp=r("tf.keras.Model"),vp=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),kp=c(),b(wn.$$.fragment),wp=c(),ge=o("div"),b(Ko.$$.fragment),xp=c(),Rt=o("p"),jp=r("The "),Vs=o("a"),Jp=r("TFMarianMTModel"),$p=r(" forward method, overrides the "),Ya=o("code"),zp=r("__call__"),Up=r(" special method."),Ep=c(),b(xn.$$.fragment),Ip=c(),es=o("p"),Fp=r(`TF version of marian-nmt\u2019s transformer.h (c++). Designed for the OPUS-NMT translation checkpoints. Available
models are listed `),ts=o("a"),Cp=r("here"),Np=r("."),qp=c(),b(jn.$$.fragment),ll=c(),Gt=o("h2"),Jn=o("a"),Ka=o("span"),b(ns.$$.fragment),Zp=c(),er=o("span"),Ap=r("FlaxMarianModel"),il=c(),Q=o("div"),b(os.$$.fragment),Wp=c(),ss=o("p"),Sp=r(`The bare Marian Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Rs=o("a"),Pp=r("FlaxPreTrainedModel"),Bp=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.)`),Vp=c(),as=o("p"),Rp=r(`This model is also a Flax Linen
`),rs=o("a"),Gp=r("flax.nn.Module"),Xp=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Lp=c(),tr=o("p"),Hp=r("Finally, this model supports inherent JAX features such as:"),Qp=c(),it=o("ul"),nr=o("li"),ls=o("a"),Op=r("Just-In-Time (JIT) compilation"),Dp=c(),or=o("li"),is=o("a"),Yp=r("Automatic Differentiation"),Kp=c(),sr=o("li"),ds=o("a"),eh=r("Vectorization"),th=c(),ar=o("li"),cs=o("a"),nh=r("Parallelization"),oh=c(),Ve=o("div"),b(ps.$$.fragment),sh=c(),Xt=o("p"),ah=r("The "),rr=o("code"),rh=r("FlaxMarianPreTrainedModel"),lh=r(" forward method, overrides the "),lr=o("code"),ih=r("__call__"),dh=r(" special method."),ch=c(),b($n.$$.fragment),ph=c(),b(zn.$$.fragment),dl=c(),Lt=o("h2"),Un=o("a"),ir=o("span"),b(hs.$$.fragment),hh=c(),dr=o("span"),uh=r("FlaxMarianMTModel"),cl=c(),O=o("div"),b(us.$$.fragment),mh=c(),ms=o("p"),fh=r(`The MARIAN Model with a language modeling head. Can be used for translation.
This model inherits from `),Gs=o("a"),gh=r("FlaxPreTrainedModel"),_h=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.)`),Mh=c(),fs=o("p"),yh=r(`This model is also a Flax Linen
`),gs=o("a"),Th=r("flax.nn.Module"),bh=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),vh=c(),cr=o("p"),kh=r("Finally, this model supports inherent JAX features such as:"),wh=c(),dt=o("ul"),pr=o("li"),_s=o("a"),xh=r("Just-In-Time (JIT) compilation"),jh=c(),hr=o("li"),Ms=o("a"),Jh=r("Automatic Differentiation"),$h=c(),ur=o("li"),ys=o("a"),zh=r("Vectorization"),Uh=c(),mr=o("li"),Ts=o("a"),Eh=r("Parallelization"),Ih=c(),Re=o("div"),b(bs.$$.fragment),Fh=c(),Ht=o("p"),Ch=r("The "),fr=o("code"),Nh=r("FlaxMarianPreTrainedModel"),qh=r(" forward method, overrides the "),gr=o("code"),Zh=r("__call__"),Ah=r(" special method."),Wh=c(),b(En.$$.fragment),Sh=c(),b(In.$$.fragment),this.h()},l(n){const m=bf('[data-svelte="svelte-1phssyn"]',document.head);h=s(m,"META",{name:!0,content:!0}),m.forEach(t),y=p(n),_=s(n,"H1",{class:!0});var vs=a(_);g=s(vs,"A",{id:!0,class:!0,href:!0});var _r=a(g);M=s(_r,"SPAN",{});var Mr=a(M);v(i.$$.fragment,Mr),Mr.forEach(t),_r.forEach(t),u=p(vs),z=s(vs,"SPAN",{});var yr=a(z);Le=l(yr,"MarianMT"),yr.forEach(t),vs.forEach(t),Fe=p(n),Z=s(n,"DIV",{class:!0});var ks=a(Z);he=s(ks,"A",{href:!0});var Tr=a(he);Y=s(Tr,"IMG",{alt:!0,src:!0}),Tr.forEach(t),He=p(ks),S=s(ks,"A",{href:!0});var br=a(S);ue=s(br,"IMG",{alt:!0,src:!0}),br.forEach(t),ks.forEach(t),K=p(n),B=s(n,"P",{});var Fn=a(B);_e=s(Fn,"STRONG",{});var vr=a(_e);se=l(vr,"Bugs:"),vr.forEach(t),Qe=l(Fn," If you see something strange, file a "),ae=s(Fn,"A",{href:!0,rel:!0});var kr=a(ae);re=l(kr,"Github Issue"),kr.forEach(t),Oe=l(Fn,`
and assign @patrickvonplaten.`),Fn.forEach(t),Ce=p(n),P=s(n,"P",{});var wr=a(P);De=l(wr,"Translations should be similar, but not identical to output in the test set linked to in each model card."),wr.forEach(t),Ne=p(n),ee=s(n,"P",{});var xr=a(ee);F=l(xr,"Tips:"),xr.forEach(t),q=p(n),me=s(n,"UL",{});var jr=a(me);V=s(jr,"LI",{});var Jr=a(V);Ye=l(Jr,"A framework for translation models, using the same models as BART."),Jr.forEach(t),jr.forEach(t),qe=p(n),A=s(n,"H2",{class:!0});var ws=a(A);te=s(ws,"A",{id:!0,class:!0,href:!0});var $r=a(te);Me=s($r,"SPAN",{});var zr=a(Me);v(C.$$.fragment,zr),zr.forEach(t),$r.forEach(t),Ke=p(ws),R=s(ws,"SPAN",{});var Bh=a(R);et=l(Bh,"Implementation Notes"),Bh.forEach(t),ws.forEach(t),Ze=p(n),E=s(n,"UL",{});var ne=a(E);ye=s(ne,"LI",{});var Vh=a(ye);Te=s(Vh,"P",{});var Rh=a(Te);G=l(Rh,"Each model is about 298 MB on disk, there are more than 1,000 models."),Rh.forEach(t),Vh.forEach(t),tt=p(ne),X=s(ne,"LI",{});var Gh=a(X);le=s(Gh,"P",{});var hl=a(le);be=l(hl,"The list of supported language pairs can be found "),N=s(hl,"A",{href:!0,rel:!0});var Xh=a(N);nt=l(Xh,"here"),Xh.forEach(t),W=l(hl,"."),hl.forEach(t),Gh.forEach(t),ot=p(ne),ve=s(ne,"LI",{});var Lh=a(ve);T=s(Lh,"P",{});var Xs=a(T);U=l(Xs,"Models were originally trained by "),ke=s(Xs,"A",{href:!0,rel:!0});var Hh=a(ke);we=l(Hh,"J\xF6rg Tiedemann"),Hh.forEach(t),_t=l(Xs," using the "),xe=s(Xs,"A",{href:!0,rel:!0});var Qh=a(xe);I=l(Qh,"Marian"),Qh.forEach(t),Mt=l(Xs," C++ library, which supports fast training and translation."),Xs.forEach(t),Lh.forEach(t),yt=p(ne),st=s(ne,"LI",{});var Oh=a(st);at=s(Oh,"P",{});var Dh=a(at);Tt=l(Dh,`All models are transformer encoder-decoders with 6 layers in each component. Each model\u2019s performance is documented
in a model card.`),Dh.forEach(t),Oh.forEach(t),L=p(ne),H=s(ne,"LI",{});var Yh=a(H);rt=s(Yh,"P",{});var Kh=a(rt);bt=l(Kh,"The 80 opus models that require BPE preprocessing are not supported."),Kh.forEach(t),Yh.forEach(t),ie=p(ne),je=s(ne,"LI",{});var ul=a(je);Je=s(ul,"P",{});var ml=a(Je);lt=l(ml,"The modeling code is the same as "),Ae=s(ml,"A",{href:!0});var eu=a(Ae);$e=l(eu,"BartForConditionalGeneration"),eu.forEach(t),vt=l(ml," with a few minor modifications:"),ml.forEach(t),ai=p(ul),kt=s(ul,"UL",{});var Ls=a(kt);Xn=s(Ls,"LI",{});var fl=a(Xn);ri=l(fl,"static (sinusoid) positional embeddings ("),aa=s(fl,"CODE",{});var tu=a(aa);li=l(tu,"MarianConfig.static_position_embeddings=True"),tu.forEach(t),ii=l(fl,")"),fl.forEach(t),di=p(Ls),Ln=s(Ls,"LI",{});var gl=a(Ln);ci=l(gl,"no layernorm_embedding ("),ra=s(gl,"CODE",{});var nu=a(ra);pi=l(nu,"MarianConfig.normalize_embedding=False"),nu.forEach(t),hi=l(gl,")"),gl.forEach(t),ui=p(Ls),wt=s(Ls,"LI",{});var Hs=a(wt);mi=l(Hs,"the model starts generating with "),la=s(Hs,"CODE",{});var ou=a(la);fi=l(ou,"pad_token_id"),ou.forEach(t),gi=l(Hs,` (which has 0 as a token_embedding) as the prefix (Bart uses
`),ia=s(Hs,"CODE",{});var su=a(ia);_i=l(su,"<s/>"),su.forEach(t),Mi=l(Hs,"),"),Hs.forEach(t),Ls.forEach(t),ul.forEach(t),yi=p(ne),da=s(ne,"LI",{});var au=a(da);Hn=s(au,"P",{});var _l=a(Hn);Ti=l(_l,"Code to bulk convert models can be found in "),ca=s(_l,"CODE",{});var ru=a(ca);bi=l(ru,"convert_marian_to_pytorch.py"),ru.forEach(t),vi=l(_l,"."),_l.forEach(t),au.forEach(t),ki=p(ne),pa=s(ne,"LI",{});var lu=a(pa);Qn=s(lu,"P",{});var Ml=a(Qn);wi=l(Ml,"This model was contributed by "),On=s(Ml,"A",{href:!0,rel:!0});var iu=a(On);xi=l(iu,"sshleifer"),iu.forEach(t),ji=l(Ml,"."),Ml.forEach(t),lu.forEach(t),ne.forEach(t),Ur=p(n),xt=s(n,"H2",{class:!0});var yl=a(xt);Dt=s(yl,"A",{id:!0,class:!0,href:!0});var du=a(Dt);ha=s(du,"SPAN",{});var cu=a(ha);v(Dn.$$.fragment,cu),cu.forEach(t),du.forEach(t),Ji=p(yl),ua=s(yl,"SPAN",{});var pu=a(ua);$i=l(pu,"Naming"),pu.forEach(t),yl.forEach(t),Er=p(n),We=s(n,"UL",{});var Cn=a(We);xs=s(Cn,"LI",{});var Ph=a(xs);zi=l(Ph,"All model names use the following format: "),ma=s(Ph,"CODE",{});var hu=a(ma);Ui=l(hu,"Helsinki-NLP/opus-mt-{src}-{tgt}"),hu.forEach(t),Ph.forEach(t),Ei=p(Cn),Yn=s(Cn,"LI",{});var Tl=a(Yn);Ii=l(Tl,"The language codes used to name models are inconsistent. Two digit codes can usually be found "),Kn=s(Tl,"A",{href:!0,rel:!0});var uu=a(Kn);Fi=l(uu,"here"),uu.forEach(t),Ci=l(Tl,`, three digit codes require googling \u201Clanguage
code {code}\u201C.`),Tl.forEach(t),Ni=p(Cn),jt=s(Cn,"LI",{});var Qs=a(jt);qi=l(Qs,"Codes formatted like "),fa=s(Qs,"CODE",{});var mu=a(fa);Zi=l(mu,"es_AR"),mu.forEach(t),Ai=l(Qs," are usually "),ga=s(Qs,"CODE",{});var fu=a(ga);Wi=l(fu,"code_{region}"),fu.forEach(t),Si=l(Qs,". That one is Spanish from Argentina."),Qs.forEach(t),Pi=p(Cn),_a=s(Cn,"LI",{});var gu=a(_a);Bi=l(gu,`The models were converted in two stages. The first 1000 models use ISO-639-2 codes to identify languages, the second
group use a combination of ISO-639-5 codes and ISO-639-2 codes.`),gu.forEach(t),Cn.forEach(t),Ir=p(n),Jt=s(n,"H2",{class:!0});var bl=a(Jt);Yt=s(bl,"A",{id:!0,class:!0,href:!0});var _u=a(Yt);Ma=s(_u,"SPAN",{});var Mu=a(Ma);v(eo.$$.fragment,Mu),Mu.forEach(t),_u.forEach(t),Vi=p(bl),ya=s(bl,"SPAN",{});var yu=a(ya);Ri=l(yu,"Examples"),yu.forEach(t),bl.forEach(t),Fr=p(n),Kt=s(n,"UL",{});var vl=a(Kt);Ta=s(vl,"LI",{});var Tu=a(Ta);Gi=l(Tu,`Since Marian models are smaller than many other translation models available in the library, they can be useful for
fine-tuning experiments and integration tests.`),Tu.forEach(t),Xi=p(vl),ba=s(vl,"LI",{});var bu=a(ba);to=s(bu,"A",{href:!0,rel:!0});var vu=a(to);Li=l(vu,"Fine-tune on GPU"),vu.forEach(t),bu.forEach(t),vl.forEach(t),Cr=p(n),$t=s(n,"H2",{class:!0});var kl=a($t);en=s(kl,"A",{id:!0,class:!0,href:!0});var ku=a(en);va=s(ku,"SPAN",{});var wu=a(va);v(no.$$.fragment,wu),wu.forEach(t),ku.forEach(t),Hi=p(kl),ka=s(kl,"SPAN",{});var xu=a(ka);Qi=l(xu,"Multilingual Models"),xu.forEach(t),kl.forEach(t),Nr=p(n),Se=s(n,"UL",{});var Nn=a(Se);oo=s(Nn,"LI",{});var wl=a(oo);Oi=l(wl,"All model names use the following format: "),wa=s(wl,"CODE",{});var ju=a(wa);Di=l(ju,"Helsinki-NLP/opus-mt-{src}-{tgt}"),ju.forEach(t),Yi=l(wl,":"),wl.forEach(t),Ki=p(Nn),so=s(Nn,"LI",{});var xl=a(so);ed=l(xl,`If a model can output multiple languages, and you should specify a language code by prepending the desired output
language to the `),xa=s(xl,"CODE",{});var Ju=a(xa);td=l(Ju,"src_text"),Ju.forEach(t),nd=l(xl,"."),xl.forEach(t),od=p(Nn),ao=s(Nn,"LI",{});var jl=a(ao);sd=l(jl,"You can see a models\u2019s supported language codes in its model card, under target constituents, like in "),ro=s(jl,"A",{href:!0,rel:!0});var $u=a(ro);ad=l($u,"opus-mt-en-roa"),$u.forEach(t),rd=l(jl,"."),jl.forEach(t),ld=p(Nn),lo=s(Nn,"LI",{});var Jl=a(lo);id=l(Jl,"Note that if a model is only multilingual on the source side, like "),ja=s(Jl,"CODE",{});var zu=a(ja);dd=l(zu,"Helsinki-NLP/opus-mt-roa-en"),zu.forEach(t),cd=l(Jl,`, no language
codes are required.`),Jl.forEach(t),Nn.forEach(t),qr=p(n),tn=s(n,"P",{});var $l=a(tn);pd=l($l,"New multi-lingual models from the "),io=s($l,"A",{href:!0,rel:!0});var Uu=a(io);hd=l(Uu,"Tatoeba-Challenge repo"),Uu.forEach(t),ud=l($l,`
require 3 character language codes:`),$l.forEach(t),Zr=p(n),v(co.$$.fragment,n),Ar=p(n),js=s(n,"P",{});var Eu=a(js);md=l(Eu,"Here is the code to see all available pretrained models on the hub:"),Eu.forEach(t),Wr=p(n),v(po.$$.fragment,n),Sr=p(n),zt=s(n,"H2",{class:!0});var zl=a(zt);nn=s(zl,"A",{id:!0,class:!0,href:!0});var Iu=a(nn);Ja=s(Iu,"SPAN",{});var Fu=a(Ja);v(ho.$$.fragment,Fu),Fu.forEach(t),Iu.forEach(t),fd=p(zl),$a=s(zl,"SPAN",{});var Cu=a($a);gd=l(Cu,"Old Style Multi-Lingual Models"),Cu.forEach(t),zl.forEach(t),Pr=p(n),Js=s(n,"P",{});var Nu=a(Js);_d=l(Nu,`These are the old style multi-lingual models ported from the OPUS-MT-Train repo: and the members of each language
group:`),Nu.forEach(t),Br=p(n),v(uo.$$.fragment,n),Vr=p(n),$s=s(n,"P",{});var qu=a($s);Md=l(qu,"Example of translating english to many romance languages, using old-style 2 character language codes"),qu.forEach(t),Rr=p(n),v(mo.$$.fragment,n),Gr=p(n),Ut=s(n,"H2",{class:!0});var Ul=a(Ut);on=s(Ul,"A",{id:!0,class:!0,href:!0});var Zu=a(on);za=s(Zu,"SPAN",{});var Au=a(za);v(fo.$$.fragment,Au),Au.forEach(t),Zu.forEach(t),yd=p(Ul),Ua=s(Ul,"SPAN",{});var Wu=a(Ua);Td=l(Wu,"Documentation resources"),Wu.forEach(t),Ul.forEach(t),Xr=p(n),pt=s(n,"UL",{});var Os=a(pt);Ea=s(Os,"LI",{});var Su=a(Ea);zs=s(Su,"A",{href:!0});var Pu=a(zs);bd=l(Pu,"Translation task guide"),Pu.forEach(t),Su.forEach(t),vd=p(Os),Ia=s(Os,"LI",{});var Bu=a(Ia);Us=s(Bu,"A",{href:!0});var Vu=a(Us);kd=l(Vu,"Summarization task guide"),Vu.forEach(t),Bu.forEach(t),wd=p(Os),Fa=s(Os,"LI",{});var Ru=a(Fa);Es=s(Ru,"A",{href:!0});var Gu=a(Es);xd=l(Gu,"Causal language modeling task guide"),Gu.forEach(t),Ru.forEach(t),Os.forEach(t),Lr=p(n),Et=s(n,"H2",{class:!0});var El=a(Et);sn=s(El,"A",{id:!0,class:!0,href:!0});var Xu=a(sn);Ca=s(Xu,"SPAN",{});var Lu=a(Ca);v(go.$$.fragment,Lu),Lu.forEach(t),Xu.forEach(t),jd=p(El),Na=s(El,"SPAN",{});var Hu=a(Na);Jd=l(Hu,"MarianConfig"),Hu.forEach(t),El.forEach(t),Hr=p(n),ze=s(n,"DIV",{class:!0});var qn=a(ze);v(_o.$$.fragment,qn),$d=p(qn),It=s(qn,"P",{});var Ds=a(It);zd=l(Ds,"This is the configuration class to store the configuration of a "),Is=s(Ds,"A",{href:!0});var Qu=a(Is);Ud=l(Qu,"MarianModel"),Qu.forEach(t),Ed=l(Ds,`. It is used to instantiate an
Marian 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 Marian
`),Mo=s(Ds,"A",{href:!0,rel:!0});var Ou=a(Mo);Id=l(Ou,"Helsinki-NLP/opus-mt-en-de"),Ou.forEach(t),Fd=l(Ds," architecture."),Ds.forEach(t),Cd=p(qn),Ft=s(qn,"P",{});var Ys=a(Ft);Nd=l(Ys,"Configuration objects inherit from "),Fs=s(Ys,"A",{href:!0});var Du=a(Fs);qd=l(Du,"PretrainedConfig"),Du.forEach(t),Zd=l(Ys,` and can be used to control the model outputs. Read the
documentation from `),Cs=s(Ys,"A",{href:!0});var Yu=a(Cs);Ad=l(Yu,"PretrainedConfig"),Yu.forEach(t),Wd=l(Ys," for more information."),Ys.forEach(t),Sd=p(qn),v(an.$$.fragment,qn),qn.forEach(t),Qr=p(n),Ct=s(n,"H2",{class:!0});var Il=a(Ct);rn=s(Il,"A",{id:!0,class:!0,href:!0});var Ku=a(rn);qa=s(Ku,"SPAN",{});var em=a(qa);v(yo.$$.fragment,em),em.forEach(t),Ku.forEach(t),Pd=p(Il),Za=s(Il,"SPAN",{});var tm=a(Za);Bd=l(tm,"MarianTokenizer"),tm.forEach(t),Il.forEach(t),Or=p(n),de=s(n,"DIV",{class:!0});var ht=a(de);v(To.$$.fragment,ht),Vd=p(ht),bo=s(ht,"P",{});var Fl=a(bo);Rd=l(Fl,"Construct a Marian tokenizer. Based on "),vo=s(Fl,"A",{href:!0,rel:!0});var nm=a(vo);Gd=l(nm,"SentencePiece"),nm.forEach(t),Xd=l(Fl,"."),Fl.forEach(t),Ld=p(ht),ko=s(ht,"P",{});var Cl=a(ko);Hd=l(Cl,"This tokenizer inherits from "),Ns=s(Cl,"A",{href:!0});var om=a(Ns);Qd=l(om,"PreTrainedTokenizer"),om.forEach(t),Od=l(Cl,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Cl.forEach(t),Dd=p(ht),v(ln.$$.fragment,ht),Yd=p(ht),dn=s(ht,"DIV",{class:!0});var Nl=a(dn);v(wo.$$.fragment,Nl),Kd=p(Nl),Aa=s(Nl,"P",{});var sm=a(Aa);ec=l(sm,"Build model inputs from a sequence by appending eos_token_id."),sm.forEach(t),Nl.forEach(t),ht.forEach(t),Dr=p(n),Nt=s(n,"H2",{class:!0});var ql=a(Nt);cn=s(ql,"A",{id:!0,class:!0,href:!0});var am=a(cn);Wa=s(am,"SPAN",{});var rm=a(Wa);v(xo.$$.fragment,rm),rm.forEach(t),am.forEach(t),tc=p(ql),Sa=s(ql,"SPAN",{});var lm=a(Sa);nc=l(lm,"MarianModel"),lm.forEach(t),ql.forEach(t),Yr=p(n),Ue=s(n,"DIV",{class:!0});var Zn=a(Ue);v(jo.$$.fragment,Zn),oc=p(Zn),Jo=s(Zn,"P",{});var Zl=a(Jo);sc=l(Zl,`The bare Marian Model outputting raw hidden-states without any specific head on top.
This model inherits from `),qs=s(Zl,"A",{href:!0});var im=a(qs);ac=l(im,"PreTrainedModel"),im.forEach(t),rc=l(Zl,`. 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.)`),Zl.forEach(t),lc=p(Zn),$o=s(Zn,"P",{});var Al=a($o);ic=l(Al,"This model is also a PyTorch "),zo=s(Al,"A",{href:!0,rel:!0});var dm=a(zo);dc=l(dm,"torch.nn.Module"),dm.forEach(t),cc=l(Al,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Al.forEach(t),pc=p(Zn),Pe=s(Zn,"DIV",{class:!0});var An=a(Pe);v(Uo.$$.fragment,An),hc=p(An),qt=s(An,"P",{});var Ks=a(qt);uc=l(Ks,"The "),Zs=s(Ks,"A",{href:!0});var cm=a(Zs);mc=l(cm,"MarianModel"),cm.forEach(t),fc=l(Ks," forward method, overrides the "),Pa=s(Ks,"CODE",{});var pm=a(Pa);gc=l(pm,"__call__"),pm.forEach(t),_c=l(Ks," special method."),Ks.forEach(t),Mc=p(An),v(pn.$$.fragment,An),yc=p(An),v(hn.$$.fragment,An),An.forEach(t),Zn.forEach(t),Kr=p(n),Zt=s(n,"H2",{class:!0});var Wl=a(Zt);un=s(Wl,"A",{id:!0,class:!0,href:!0});var hm=a(un);Ba=s(hm,"SPAN",{});var um=a(Ba);v(Eo.$$.fragment,um),um.forEach(t),hm.forEach(t),Tc=p(Wl),Va=s(Wl,"SPAN",{});var mm=a(Va);bc=l(mm,"MarianMTModel"),mm.forEach(t),Wl.forEach(t),el=p(n),Ee=s(n,"DIV",{class:!0});var Wn=a(Ee);v(Io.$$.fragment,Wn),vc=p(Wn),Fo=s(Wn,"P",{});var Sl=a(Fo);kc=l(Sl,`The Marian Model with a language modeling head. Can be used for summarization.
This model inherits from `),As=s(Sl,"A",{href:!0});var fm=a(As);wc=l(fm,"PreTrainedModel"),fm.forEach(t),xc=l(Sl,`. 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.)`),Sl.forEach(t),jc=p(Wn),Co=s(Wn,"P",{});var Pl=a(Co);Jc=l(Pl,"This model is also a PyTorch "),No=s(Pl,"A",{href:!0,rel:!0});var gm=a(No);$c=l(gm,"torch.nn.Module"),gm.forEach(t),zc=l(Pl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pl.forEach(t),Uc=p(Wn),fe=s(Wn,"DIV",{class:!0});var ut=a(fe);v(qo.$$.fragment,ut),Ec=p(ut),At=s(ut,"P",{});var ea=a(At);Ic=l(ea,"The "),Ws=s(ea,"A",{href:!0});var _m=a(Ws);Fc=l(_m,"MarianMTModel"),_m.forEach(t),Cc=l(ea," forward method, overrides the "),Ra=s(ea,"CODE",{});var Mm=a(Ra);Nc=l(Mm,"__call__"),Mm.forEach(t),qc=l(ea," special method."),ea.forEach(t),Zc=p(ut),v(mn.$$.fragment,ut),Ac=p(ut),Zo=s(ut,"P",{});var Bl=a(Zo);Wc=l(Bl,`Pytorch version of marian-nmt\u2019s transformer.h (c++). Designed for the OPUS-NMT translation checkpoints. Available
models are listed `),Ao=s(Bl,"A",{href:!0,rel:!0});var ym=a(Ao);Sc=l(ym,"here"),ym.forEach(t),Pc=l(Bl,"."),Bl.forEach(t),Bc=p(ut),v(fn.$$.fragment,ut),ut.forEach(t),Wn.forEach(t),tl=p(n),Wt=s(n,"H2",{class:!0});var Vl=a(Wt);gn=s(Vl,"A",{id:!0,class:!0,href:!0});var Tm=a(gn);Ga=s(Tm,"SPAN",{});var bm=a(Ga);v(Wo.$$.fragment,bm),bm.forEach(t),Tm.forEach(t),Vc=p(Vl),Xa=s(Vl,"SPAN",{});var vm=a(Xa);Rc=l(vm,"MarianForCausalLM"),vm.forEach(t),Vl.forEach(t),nl=p(n),St=s(n,"DIV",{class:!0});var Rl=a(St);v(So.$$.fragment,Rl),Gc=p(Rl),_n=s(Rl,"DIV",{class:!0});var Gl=a(_n);v(Po.$$.fragment,Gl),Xc=p(Gl),v(Mn.$$.fragment,Gl),Gl.forEach(t),Rl.forEach(t),ol=p(n),Pt=s(n,"H2",{class:!0});var Xl=a(Pt);yn=s(Xl,"A",{id:!0,class:!0,href:!0});var km=a(yn);La=s(km,"SPAN",{});var wm=a(La);v(Bo.$$.fragment,wm),wm.forEach(t),km.forEach(t),Lc=p(Xl),Ha=s(Xl,"SPAN",{});var xm=a(Ha);Hc=l(xm,"TFMarianModel"),xm.forEach(t),Xl.forEach(t),sl=p(n),ce=s(n,"DIV",{class:!0});var mt=a(ce);v(Vo.$$.fragment,mt),Qc=p(mt),Ro=s(mt,"P",{});var Ll=a(Ro);Oc=l(Ll,`The bare MARIAN Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ss=s(Ll,"A",{href:!0});var jm=a(Ss);Dc=l(jm,"TFPreTrainedModel"),jm.forEach(t),Yc=l(Ll,`. 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.)`),Ll.forEach(t),Kc=p(mt),Go=s(mt,"P",{});var Hl=a(Go);ep=l(Hl,"This model is also a "),Xo=s(Hl,"A",{href:!0,rel:!0});var Jm=a(Xo);tp=l(Jm,"tf.keras.Model"),Jm.forEach(t),np=l(Hl,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Hl.forEach(t),op=p(mt),v(Tn.$$.fragment,mt),sp=p(mt),Be=s(mt,"DIV",{class:!0});var Sn=a(Be);v(Lo.$$.fragment,Sn),ap=p(Sn),Bt=s(Sn,"P",{});var ta=a(Bt);rp=l(ta,"The "),Ps=s(ta,"A",{href:!0});var $m=a(Ps);lp=l($m,"TFMarianModel"),$m.forEach(t),ip=l(ta," forward method, overrides the "),Qa=s(ta,"CODE",{});var zm=a(Qa);dp=l(zm,"__call__"),zm.forEach(t),cp=l(ta," special method."),ta.forEach(t),pp=p(Sn),v(bn.$$.fragment,Sn),hp=p(Sn),v(vn.$$.fragment,Sn),Sn.forEach(t),mt.forEach(t),al=p(n),Vt=s(n,"H2",{class:!0});var Ql=a(Vt);kn=s(Ql,"A",{id:!0,class:!0,href:!0});var Um=a(kn);Oa=s(Um,"SPAN",{});var Em=a(Oa);v(Ho.$$.fragment,Em),Em.forEach(t),Um.forEach(t),up=p(Ql),Da=s(Ql,"SPAN",{});var Im=a(Da);mp=l(Im,"TFMarianMTModel"),Im.forEach(t),Ql.forEach(t),rl=p(n),pe=s(n,"DIV",{class:!0});var ft=a(pe);v(Qo.$$.fragment,ft),fp=p(ft),Oo=s(ft,"P",{});var Ol=a(Oo);gp=l(Ol,`The MARIAN Model with a language modeling head. Can be used for summarization.
This model inherits from `),Bs=s(Ol,"A",{href:!0});var Fm=a(Bs);_p=l(Fm,"TFPreTrainedModel"),Fm.forEach(t),Mp=l(Ol,`. 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.)`),Ol.forEach(t),yp=p(ft),Do=s(ft,"P",{});var Dl=a(Do);Tp=l(Dl,"This model is also a "),Yo=s(Dl,"A",{href:!0,rel:!0});var Cm=a(Yo);bp=l(Cm,"tf.keras.Model"),Cm.forEach(t),vp=l(Dl,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Dl.forEach(t),kp=p(ft),v(wn.$$.fragment,ft),wp=p(ft),ge=s(ft,"DIV",{class:!0});var gt=a(ge);v(Ko.$$.fragment,gt),xp=p(gt),Rt=s(gt,"P",{});var na=a(Rt);jp=l(na,"The "),Vs=s(na,"A",{href:!0});var Nm=a(Vs);Jp=l(Nm,"TFMarianMTModel"),Nm.forEach(t),$p=l(na," forward method, overrides the "),Ya=s(na,"CODE",{});var qm=a(Ya);zp=l(qm,"__call__"),qm.forEach(t),Up=l(na," special method."),na.forEach(t),Ep=p(gt),v(xn.$$.fragment,gt),Ip=p(gt),es=s(gt,"P",{});var Yl=a(es);Fp=l(Yl,`TF version of marian-nmt\u2019s transformer.h (c++). Designed for the OPUS-NMT translation checkpoints. Available
models are listed `),ts=s(Yl,"A",{href:!0,rel:!0});var Zm=a(ts);Cp=l(Zm,"here"),Zm.forEach(t),Np=l(Yl,"."),Yl.forEach(t),qp=p(gt),v(jn.$$.fragment,gt),gt.forEach(t),ft.forEach(t),ll=p(n),Gt=s(n,"H2",{class:!0});var Kl=a(Gt);Jn=s(Kl,"A",{id:!0,class:!0,href:!0});var Am=a(Jn);Ka=s(Am,"SPAN",{});var Wm=a(Ka);v(ns.$$.fragment,Wm),Wm.forEach(t),Am.forEach(t),Zp=p(Kl),er=s(Kl,"SPAN",{});var Sm=a(er);Ap=l(Sm,"FlaxMarianModel"),Sm.forEach(t),Kl.forEach(t),il=p(n),Q=s(n,"DIV",{class:!0});var Ge=a(Q);v(os.$$.fragment,Ge),Wp=p(Ge),ss=s(Ge,"P",{});var ei=a(ss);Sp=l(ei,`The bare Marian Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Rs=s(ei,"A",{href:!0});var Pm=a(Rs);Pp=l(Pm,"FlaxPreTrainedModel"),Pm.forEach(t),Bp=l(ei,`. 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.)`),ei.forEach(t),Vp=p(Ge),as=s(Ge,"P",{});var ti=a(as);Rp=l(ti,`This model is also a Flax Linen
`),rs=s(ti,"A",{href:!0,rel:!0});var Bm=a(rs);Gp=l(Bm,"flax.nn.Module"),Bm.forEach(t),Xp=l(ti,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),ti.forEach(t),Lp=p(Ge),tr=s(Ge,"P",{});var Vm=a(tr);Hp=l(Vm,"Finally, this model supports inherent JAX features such as:"),Vm.forEach(t),Qp=p(Ge),it=s(Ge,"UL",{});var Pn=a(it);nr=s(Pn,"LI",{});var Rm=a(nr);ls=s(Rm,"A",{href:!0,rel:!0});var Gm=a(ls);Op=l(Gm,"Just-In-Time (JIT) compilation"),Gm.forEach(t),Rm.forEach(t),Dp=p(Pn),or=s(Pn,"LI",{});var Xm=a(or);is=s(Xm,"A",{href:!0,rel:!0});var Lm=a(is);Yp=l(Lm,"Automatic Differentiation"),Lm.forEach(t),Xm.forEach(t),Kp=p(Pn),sr=s(Pn,"LI",{});var Hm=a(sr);ds=s(Hm,"A",{href:!0,rel:!0});var Qm=a(ds);eh=l(Qm,"Vectorization"),Qm.forEach(t),Hm.forEach(t),th=p(Pn),ar=s(Pn,"LI",{});var Om=a(ar);cs=s(Om,"A",{href:!0,rel:!0});var Dm=a(cs);nh=l(Dm,"Parallelization"),Dm.forEach(t),Om.forEach(t),Pn.forEach(t),oh=p(Ge),Ve=s(Ge,"DIV",{class:!0});var Bn=a(Ve);v(ps.$$.fragment,Bn),sh=p(Bn),Xt=s(Bn,"P",{});var oa=a(Xt);ah=l(oa,"The "),rr=s(oa,"CODE",{});var Ym=a(rr);rh=l(Ym,"FlaxMarianPreTrainedModel"),Ym.forEach(t),lh=l(oa," forward method, overrides the "),lr=s(oa,"CODE",{});var Km=a(lr);ih=l(Km,"__call__"),Km.forEach(t),dh=l(oa," special method."),oa.forEach(t),ch=p(Bn),v($n.$$.fragment,Bn),ph=p(Bn),v(zn.$$.fragment,Bn),Bn.forEach(t),Ge.forEach(t),dl=p(n),Lt=s(n,"H2",{class:!0});var ni=a(Lt);Un=s(ni,"A",{id:!0,class:!0,href:!0});var ef=a(Un);ir=s(ef,"SPAN",{});var tf=a(ir);v(hs.$$.fragment,tf),tf.forEach(t),ef.forEach(t),hh=p(ni),dr=s(ni,"SPAN",{});var nf=a(dr);uh=l(nf,"FlaxMarianMTModel"),nf.forEach(t),ni.forEach(t),cl=p(n),O=s(n,"DIV",{class:!0});var Xe=a(O);v(us.$$.fragment,Xe),mh=p(Xe),ms=s(Xe,"P",{});var oi=a(ms);fh=l(oi,`The MARIAN Model with a language modeling head. Can be used for translation.
This model inherits from `),Gs=s(oi,"A",{href:!0});var of=a(Gs);gh=l(of,"FlaxPreTrainedModel"),of.forEach(t),_h=l(oi,`. 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.)`),oi.forEach(t),Mh=p(Xe),fs=s(Xe,"P",{});var si=a(fs);yh=l(si,`This model is also a Flax Linen
`),gs=s(si,"A",{href:!0,rel:!0});var sf=a(gs);Th=l(sf,"flax.nn.Module"),sf.forEach(t),bh=l(si,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),si.forEach(t),vh=p(Xe),cr=s(Xe,"P",{});var af=a(cr);kh=l(af,"Finally, this model supports inherent JAX features such as:"),af.forEach(t),wh=p(Xe),dt=s(Xe,"UL",{});var Vn=a(dt);pr=s(Vn,"LI",{});var rf=a(pr);_s=s(rf,"A",{href:!0,rel:!0});var lf=a(_s);xh=l(lf,"Just-In-Time (JIT) compilation"),lf.forEach(t),rf.forEach(t),jh=p(Vn),hr=s(Vn,"LI",{});var df=a(hr);Ms=s(df,"A",{href:!0,rel:!0});var cf=a(Ms);Jh=l(cf,"Automatic Differentiation"),cf.forEach(t),df.forEach(t),$h=p(Vn),ur=s(Vn,"LI",{});var pf=a(ur);ys=s(pf,"A",{href:!0,rel:!0});var hf=a(ys);zh=l(hf,"Vectorization"),hf.forEach(t),pf.forEach(t),Uh=p(Vn),mr=s(Vn,"LI",{});var uf=a(mr);Ts=s(uf,"A",{href:!0,rel:!0});var mf=a(Ts);Eh=l(mf,"Parallelization"),mf.forEach(t),uf.forEach(t),Vn.forEach(t),Ih=p(Xe),Re=s(Xe,"DIV",{class:!0});var Rn=a(Re);v(bs.$$.fragment,Rn),Fh=p(Rn),Ht=s(Rn,"P",{});var sa=a(Ht);Ch=l(sa,"The "),fr=s(sa,"CODE",{});var ff=a(fr);Nh=l(ff,"FlaxMarianPreTrainedModel"),ff.forEach(t),qh=l(sa," forward method, overrides the "),gr=s(sa,"CODE",{});var gf=a(gr);Zh=l(gf,"__call__"),gf.forEach(t),Ah=l(sa," special method."),sa.forEach(t),Wh=p(Rn),v(En.$$.fragment,Rn),Sh=p(Rn),v(In.$$.fragment,Rn),Rn.forEach(t),Xe.forEach(t),this.h()},h(){d(h,"name","hf:doc:metadata"),d(h,"content",JSON.stringify(Pf)),d(g,"id","marianmt"),d(g,"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(g,"href","#marianmt"),d(_,"class","relative group"),d(Y,"alt","Models"),_f(Y.src,$="https://img.shields.io/badge/All_model_pages-marian-blueviolet")||d(Y,"src",$),d(he,"href","https://huggingface.co/models?filter=marian"),d(ue,"alt","Spaces"),_f(ue.src,ct="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||d(ue,"src",ct),d(S,"href","https://huggingface.co/spaces/docs-demos/opus-mt-zh-en"),d(Z,"class","flex flex-wrap space-x-1"),d(ae,"href","https://github.com/huggingface/transformers/issues/new?assignees=sshleifer&labels=&template=bug-report.md&title"),d(ae,"rel","nofollow"),d(te,"id","implementation-notes"),d(te,"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(te,"href","#implementation-notes"),d(A,"class","relative group"),d(N,"href","https://huggingface.co/Helsinki-NLP"),d(N,"rel","nofollow"),d(ke,"href","https://researchportal.helsinki.fi/en/persons/j%C3%B6rg-tiedemann"),d(ke,"rel","nofollow"),d(xe,"href","https://marian-nmt.github.io/"),d(xe,"rel","nofollow"),d(Ae,"href","/docs/transformers/v4.32.0/en/model_doc/bart#transformers.BartForConditionalGeneration"),d(On,"href","https://huggingface.co/sshleifer"),d(On,"rel","nofollow"),d(Dt,"id","naming"),d(Dt,"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(Dt,"href","#naming"),d(xt,"class","relative group"),d(Kn,"href","https://developers.google.com/admin-sdk/directory/v1/languages"),d(Kn,"rel","nofollow"),d(Yt,"id","examples"),d(Yt,"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(Yt,"href","#examples"),d(Jt,"class","relative group"),d(to,"href","https://github.com/huggingface/transformers/blob/master/examples/legacy/seq2seq/train_distil_marian_enro.sh"),d(to,"rel","nofollow"),d(en,"id","multilingual-models"),d(en,"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(en,"href","#multilingual-models"),d($t,"class","relative group"),d(ro,"href","https://huggingface.co/Helsinki-NLP/opus-mt-en-roa"),d(ro,"rel","nofollow"),d(io,"href","https://github.com/Helsinki-NLP/Tatoeba-Challenge"),d(io,"rel","nofollow"),d(nn,"id","old-style-multilingual-models"),d(nn,"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(nn,"href","#old-style-multilingual-models"),d(zt,"class","relative group"),d(on,"id","documentation-resources"),d(on,"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(on,"href","#documentation-resources"),d(Ut,"class","relative group"),d(zs,"href","../tasks/translation"),d(Us,"href","../tasks/summarization"),d(Es,"href","../tasks/language_modeling"),d(sn,"id","transformers.MarianConfig"),d(sn,"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(sn,"href","#transformers.MarianConfig"),d(Et,"class","relative group"),d(Is,"href","/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianModel"),d(Mo,"href","https://huggingface.co/Helsinki-NLP/opus-mt-en-de"),d(Mo,"rel","nofollow"),d(Fs,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(Cs,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(rn,"id","transformers.MarianTokenizer"),d(rn,"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(rn,"href","#transformers.MarianTokenizer"),d(Ct,"class","relative group"),d(vo,"href","https://github.com/google/sentencepiece"),d(vo,"rel","nofollow"),d(Ns,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),d(dn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(cn,"id","transformers.MarianModel"),d(cn,"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(cn,"href","#transformers.MarianModel"),d(Nt,"class","relative group"),d(qs,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),d(zo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(zo,"rel","nofollow"),d(Zs,"href","/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianModel"),d(Pe,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(un,"id","transformers.MarianMTModel"),d(un,"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(un,"href","#transformers.MarianMTModel"),d(Zt,"class","relative group"),d(As,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),d(No,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(No,"rel","nofollow"),d(Ws,"href","/docs/transformers/v4.32.0/en/model_doc/marian#transformers.MarianMTModel"),d(Ao,"href","https://huggingface.co/models?search=Helsinki-NLP"),d(Ao,"rel","nofollow"),d(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(gn,"id","transformers.MarianForCausalLM"),d(gn,"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(gn,"href","#transformers.MarianForCausalLM"),d(Wt,"class","relative group"),d(_n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(yn,"id","transformers.TFMarianModel"),d(yn,"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(yn,"href","#transformers.TFMarianModel"),d(Pt,"class","relative group"),d(Ss,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),d(Xo,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),d(Xo,"rel","nofollow"),d(Ps,"href","/docs/transformers/v4.32.0/en/model_doc/marian#transformers.TFMarianModel"),d(Be,"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(kn,"id","transformers.TFMarianMTModel"),d(kn,"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(kn,"href","#transformers.TFMarianMTModel"),d(Vt,"class","relative group"),d(Bs,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),d(Yo,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),d(Yo,"rel","nofollow"),d(Vs,"href","/docs/transformers/v4.32.0/en/model_doc/marian#transformers.TFMarianMTModel"),d(ts,"href","https://huggingface.co/models?search=Helsinki-NLP"),d(ts,"rel","nofollow"),d(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Jn,"id","transformers.FlaxMarianModel"),d(Jn,"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(Jn,"href","#transformers.FlaxMarianModel"),d(Gt,"class","relative group"),d(Rs,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(rs,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),d(rs,"rel","nofollow"),d(ls,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(ls,"rel","nofollow"),d(is,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(is,"rel","nofollow"),d(ds,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(ds,"rel","nofollow"),d(cs,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(cs,"rel","nofollow"),d(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Un,"id","transformers.FlaxMarianMTModel"),d(Un,"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(Un,"href","#transformers.FlaxMarianMTModel"),d(Lt,"class","relative group"),d(Gs,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(gs,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),d(gs,"rel","nofollow"),d(_s,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(_s,"rel","nofollow"),d(Ms,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(Ms,"rel","nofollow"),d(ys,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(ys,"rel","nofollow"),d(Ts,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(Ts,"rel","nofollow"),d(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(n,m){e(document.head,h),f(n,y,m),f(n,_,m),e(_,g),e(g,M),k(i,M,null),e(_,u),e(_,z),e(z,Le),f(n,Fe,m),f(n,Z,m),e(Z,he),e(he,Y),e(Z,He),e(Z,S),e(S,ue),f(n,K,m),f(n,B,m),e(B,_e),e(_e,se),e(B,Qe),e(B,ae),e(ae,re),e(B,Oe),f(n,Ce,m),f(n,P,m),e(P,De),f(n,Ne,m),f(n,ee,m),e(ee,F),f(n,q,m),f(n,me,m),e(me,V),e(V,Ye),f(n,qe,m),f(n,A,m),e(A,te),e(te,Me),k(C,Me,null),e(A,Ke),e(A,R),e(R,et),f(n,Ze,m),f(n,E,m),e(E,ye),e(ye,Te),e(Te,G),e(E,tt),e(E,X),e(X,le),e(le,be),e(le,N),e(N,nt),e(le,W),e(E,ot),e(E,ve),e(ve,T),e(T,U),e(T,ke),e(ke,we),e(T,_t),e(T,xe),e(xe,I),e(T,Mt),e(E,yt),e(E,st),e(st,at),e(at,Tt),e(E,L),e(E,H),e(H,rt),e(rt,bt),e(E,ie),e(E,je),e(je,Je),e(Je,lt),e(Je,Ae),e(Ae,$e),e(Je,vt),e(je,ai),e(je,kt),e(kt,Xn),e(Xn,ri),e(Xn,aa),e(aa,li),e(Xn,ii),e(kt,di),e(kt,Ln),e(Ln,ci),e(Ln,ra),e(ra,pi),e(Ln,hi),e(kt,ui),e(kt,wt),e(wt,mi),e(wt,la),e(la,fi),e(wt,gi),e(wt,ia),e(ia,_i),e(wt,Mi),e(E,yi),e(E,da),e(da,Hn),e(Hn,Ti),e(Hn,ca),e(ca,bi),e(Hn,vi),e(E,ki),e(E,pa),e(pa,Qn),e(Qn,wi),e(Qn,On),e(On,xi),e(Qn,ji),f(n,Ur,m),f(n,xt,m),e(xt,Dt),e(Dt,ha),k(Dn,ha,null),e(xt,Ji),e(xt,ua),e(ua,$i),f(n,Er,m),f(n,We,m),e(We,xs),e(xs,zi),e(xs,ma),e(ma,Ui),e(We,Ei),e(We,Yn),e(Yn,Ii),e(Yn,Kn),e(Kn,Fi),e(Yn,Ci),e(We,Ni),e(We,jt),e(jt,qi),e(jt,fa),e(fa,Zi),e(jt,Ai),e(jt,ga),e(ga,Wi),e(jt,Si),e(We,Pi),e(We,_a),e(_a,Bi),f(n,Ir,m),f(n,Jt,m),e(Jt,Yt),e(Yt,Ma),k(eo,Ma,null),e(Jt,Vi),e(Jt,ya),e(ya,Ri),f(n,Fr,m),f(n,Kt,m),e(Kt,Ta),e(Ta,Gi),e(Kt,Xi),e(Kt,ba),e(ba,to),e(to,Li),f(n,Cr,m),f(n,$t,m),e($t,en),e(en,va),k(no,va,null),e($t,Hi),e($t,ka),e(ka,Qi),f(n,Nr,m),f(n,Se,m),e(Se,oo),e(oo,Oi),e(oo,wa),e(wa,Di),e(oo,Yi),e(Se,Ki),e(Se,so),e(so,ed),e(so,xa),e(xa,td),e(so,nd),e(Se,od),e(Se,ao),e(ao,sd),e(ao,ro),e(ro,ad),e(ao,rd),e(Se,ld),e(Se,lo),e(lo,id),e(lo,ja),e(ja,dd),e(lo,cd),f(n,qr,m),f(n,tn,m),e(tn,pd),e(tn,io),e(io,hd),e(tn,ud),f(n,Zr,m),k(co,n,m),f(n,Ar,m),f(n,js,m),e(js,md),f(n,Wr,m),k(po,n,m),f(n,Sr,m),f(n,zt,m),e(zt,nn),e(nn,Ja),k(ho,Ja,null),e(zt,fd),e(zt,$a),e($a,gd),f(n,Pr,m),f(n,Js,m),e(Js,_d),f(n,Br,m),k(uo,n,m),f(n,Vr,m),f(n,$s,m),e($s,Md),f(n,Rr,m),k(mo,n,m),f(n,Gr,m),f(n,Ut,m),e(Ut,on),e(on,za),k(fo,za,null),e(Ut,yd),e(Ut,Ua),e(Ua,Td),f(n,Xr,m),f(n,pt,m),e(pt,Ea),e(Ea,zs),e(zs,bd),e(pt,vd),e(pt,Ia),e(Ia,Us),e(Us,kd),e(pt,wd),e(pt,Fa),e(Fa,Es),e(Es,xd),f(n,Lr,m),f(n,Et,m),e(Et,sn),e(sn,Ca),k(go,Ca,null),e(Et,jd),e(Et,Na),e(Na,Jd),f(n,Hr,m),f(n,ze,m),k(_o,ze,null),e(ze,$d),e(ze,It),e(It,zd),e(It,Is),e(Is,Ud),e(It,Ed),e(It,Mo),e(Mo,Id),e(It,Fd),e(ze,Cd),e(ze,Ft),e(Ft,Nd),e(Ft,Fs),e(Fs,qd),e(Ft,Zd),e(Ft,Cs),e(Cs,Ad),e(Ft,Wd),e(ze,Sd),k(an,ze,null),f(n,Qr,m),f(n,Ct,m),e(Ct,rn),e(rn,qa),k(yo,qa,null),e(Ct,Pd),e(Ct,Za),e(Za,Bd),f(n,Or,m),f(n,de,m),k(To,de,null),e(de,Vd),e(de,bo),e(bo,Rd),e(bo,vo),e(vo,Gd),e(bo,Xd),e(de,Ld),e(de,ko),e(ko,Hd),e(ko,Ns),e(Ns,Qd),e(ko,Od),e(de,Dd),k(ln,de,null),e(de,Yd),e(de,dn),k(wo,dn,null),e(dn,Kd),e(dn,Aa),e(Aa,ec),f(n,Dr,m),f(n,Nt,m),e(Nt,cn),e(cn,Wa),k(xo,Wa,null),e(Nt,tc),e(Nt,Sa),e(Sa,nc),f(n,Yr,m),f(n,Ue,m),k(jo,Ue,null),e(Ue,oc),e(Ue,Jo),e(Jo,sc),e(Jo,qs),e(qs,ac),e(Jo,rc),e(Ue,lc),e(Ue,$o),e($o,ic),e($o,zo),e(zo,dc),e($o,cc),e(Ue,pc),e(Ue,Pe),k(Uo,Pe,null),e(Pe,hc),e(Pe,qt),e(qt,uc),e(qt,Zs),e(Zs,mc),e(qt,fc),e(qt,Pa),e(Pa,gc),e(qt,_c),e(Pe,Mc),k(pn,Pe,null),e(Pe,yc),k(hn,Pe,null),f(n,Kr,m),f(n,Zt,m),e(Zt,un),e(un,Ba),k(Eo,Ba,null),e(Zt,Tc),e(Zt,Va),e(Va,bc),f(n,el,m),f(n,Ee,m),k(Io,Ee,null),e(Ee,vc),e(Ee,Fo),e(Fo,kc),e(Fo,As),e(As,wc),e(Fo,xc),e(Ee,jc),e(Ee,Co),e(Co,Jc),e(Co,No),e(No,$c),e(Co,zc),e(Ee,Uc),e(Ee,fe),k(qo,fe,null),e(fe,Ec),e(fe,At),e(At,Ic),e(At,Ws),e(Ws,Fc),e(At,Cc),e(At,Ra),e(Ra,Nc),e(At,qc),e(fe,Zc),k(mn,fe,null),e(fe,Ac),e(fe,Zo),e(Zo,Wc),e(Zo,Ao),e(Ao,Sc),e(Zo,Pc),e(fe,Bc),k(fn,fe,null),f(n,tl,m),f(n,Wt,m),e(Wt,gn),e(gn,Ga),k(Wo,Ga,null),e(Wt,Vc),e(Wt,Xa),e(Xa,Rc),f(n,nl,m),f(n,St,m),k(So,St,null),e(St,Gc),e(St,_n),k(Po,_n,null),e(_n,Xc),k(Mn,_n,null),f(n,ol,m),f(n,Pt,m),e(Pt,yn),e(yn,La),k(Bo,La,null),e(Pt,Lc),e(Pt,Ha),e(Ha,Hc),f(n,sl,m),f(n,ce,m),k(Vo,ce,null),e(ce,Qc),e(ce,Ro),e(Ro,Oc),e(Ro,Ss),e(Ss,Dc),e(Ro,Yc),e(ce,Kc),e(ce,Go),e(Go,ep),e(Go,Xo),e(Xo,tp),e(Go,np),e(ce,op),k(Tn,ce,null),e(ce,sp),e(ce,Be),k(Lo,Be,null),e(Be,ap),e(Be,Bt),e(Bt,rp),e(Bt,Ps),e(Ps,lp),e(Bt,ip),e(Bt,Qa),e(Qa,dp),e(Bt,cp),e(Be,pp),k(bn,Be,null),e(Be,hp),k(vn,Be,null),f(n,al,m),f(n,Vt,m),e(Vt,kn),e(kn,Oa),k(Ho,Oa,null),e(Vt,up),e(Vt,Da),e(Da,mp),f(n,rl,m),f(n,pe,m),k(Qo,pe,null),e(pe,fp),e(pe,Oo),e(Oo,gp),e(Oo,Bs),e(Bs,_p),e(Oo,Mp),e(pe,yp),e(pe,Do),e(Do,Tp),e(Do,Yo),e(Yo,bp),e(Do,vp),e(pe,kp),k(wn,pe,null),e(pe,wp),e(pe,ge),k(Ko,ge,null),e(ge,xp),e(ge,Rt),e(Rt,jp),e(Rt,Vs),e(Vs,Jp),e(Rt,$p),e(Rt,Ya),e(Ya,zp),e(Rt,Up),e(ge,Ep),k(xn,ge,null),e(ge,Ip),e(ge,es),e(es,Fp),e(es,ts),e(ts,Cp),e(es,Np),e(ge,qp),k(jn,ge,null),f(n,ll,m),f(n,Gt,m),e(Gt,Jn),e(Jn,Ka),k(ns,Ka,null),e(Gt,Zp),e(Gt,er),e(er,Ap),f(n,il,m),f(n,Q,m),k(os,Q,null),e(Q,Wp),e(Q,ss),e(ss,Sp),e(ss,Rs),e(Rs,Pp),e(ss,Bp),e(Q,Vp),e(Q,as),e(as,Rp),e(as,rs),e(rs,Gp),e(as,Xp),e(Q,Lp),e(Q,tr),e(tr,Hp),e(Q,Qp),e(Q,it),e(it,nr),e(nr,ls),e(ls,Op),e(it,Dp),e(it,or),e(or,is),e(is,Yp),e(it,Kp),e(it,sr),e(sr,ds),e(ds,eh),e(it,th),e(it,ar),e(ar,cs),e(cs,nh),e(Q,oh),e(Q,Ve),k(ps,Ve,null),e(Ve,sh),e(Ve,Xt),e(Xt,ah),e(Xt,rr),e(rr,rh),e(Xt,lh),e(Xt,lr),e(lr,ih),e(Xt,dh),e(Ve,ch),k($n,Ve,null),e(Ve,ph),k(zn,Ve,null),f(n,dl,m),f(n,Lt,m),e(Lt,Un),e(Un,ir),k(hs,ir,null),e(Lt,hh),e(Lt,dr),e(dr,uh),f(n,cl,m),f(n,O,m),k(us,O,null),e(O,mh),e(O,ms),e(ms,fh),e(ms,Gs),e(Gs,gh),e(ms,_h),e(O,Mh),e(O,fs),e(fs,yh),e(fs,gs),e(gs,Th),e(fs,bh),e(O,vh),e(O,cr),e(cr,kh),e(O,wh),e(O,dt),e(dt,pr),e(pr,_s),e(_s,xh),e(dt,jh),e(dt,hr),e(hr,Ms),e(Ms,Jh),e(dt,$h),e(dt,ur),e(ur,ys),e(ys,zh),e(dt,Uh),e(dt,mr),e(mr,Ts),e(Ts,Eh),e(O,Ih),e(O,Re),k(bs,Re,null),e(Re,Fh),e(Re,Ht),e(Ht,Ch),e(Ht,fr),e(fr,Nh),e(Ht,qh),e(Ht,gr),e(gr,Zh),e(Ht,Ah),e(Re,Wh),k(En,Re,null),e(Re,Sh),k(In,Re,null),pl=!0},p(n,[m]){const vs={};m&2&&(vs.$$scope={dirty:m,ctx:n}),an.$set(vs);const _r={};m&2&&(_r.$$scope={dirty:m,ctx:n}),ln.$set(_r);const Mr={};m&2&&(Mr.$$scope={dirty:m,ctx:n}),pn.$set(Mr);const yr={};m&2&&(yr.$$scope={dirty:m,ctx:n}),hn.$set(yr);const ks={};m&2&&(ks.$$scope={dirty:m,ctx:n}),mn.$set(ks);const Tr={};m&2&&(Tr.$$scope={dirty:m,ctx:n}),fn.$set(Tr);const br={};m&2&&(br.$$scope={dirty:m,ctx:n}),Mn.$set(br);const Fn={};m&2&&(Fn.$$scope={dirty:m,ctx:n}),Tn.$set(Fn);const vr={};m&2&&(vr.$$scope={dirty:m,ctx:n}),bn.$set(vr);const kr={};m&2&&(kr.$$scope={dirty:m,ctx:n}),vn.$set(kr);const wr={};m&2&&(wr.$$scope={dirty:m,ctx:n}),wn.$set(wr);const xr={};m&2&&(xr.$$scope={dirty:m,ctx:n}),xn.$set(xr);const jr={};m&2&&(jr.$$scope={dirty:m,ctx:n}),jn.$set(jr);const Jr={};m&2&&(Jr.$$scope={dirty:m,ctx:n}),$n.$set(Jr);const ws={};m&2&&(ws.$$scope={dirty:m,ctx:n}),zn.$set(ws);const $r={};m&2&&($r.$$scope={dirty:m,ctx:n}),En.$set($r);const zr={};m&2&&(zr.$$scope={dirty:m,ctx:n}),In.$set(zr)},i(n){pl||(w(i.$$.fragment,n),w(C.$$.fragment,n),w(Dn.$$.fragment,n),w(eo.$$.fragment,n),w(no.$$.fragment,n),w(co.$$.fragment,n),w(po.$$.fragment,n),w(ho.$$.fragment,n),w(uo.$$.fragment,n),w(mo.$$.fragment,n),w(fo.$$.fragment,n),w(go.$$.fragment,n),w(_o.$$.fragment,n),w(an.$$.fragment,n),w(yo.$$.fragment,n),w(To.$$.fragment,n),w(ln.$$.fragment,n),w(wo.$$.fragment,n),w(xo.$$.fragment,n),w(jo.$$.fragment,n),w(Uo.$$.fragment,n),w(pn.$$.fragment,n),w(hn.$$.fragment,n),w(Eo.$$.fragment,n),w(Io.$$.fragment,n),w(qo.$$.fragment,n),w(mn.$$.fragment,n),w(fn.$$.fragment,n),w(Wo.$$.fragment,n),w(So.$$.fragment,n),w(Po.$$.fragment,n),w(Mn.$$.fragment,n),w(Bo.$$.fragment,n),w(Vo.$$.fragment,n),w(Tn.$$.fragment,n),w(Lo.$$.fragment,n),w(bn.$$.fragment,n),w(vn.$$.fragment,n),w(Ho.$$.fragment,n),w(Qo.$$.fragment,n),w(wn.$$.fragment,n),w(Ko.$$.fragment,n),w(xn.$$.fragment,n),w(jn.$$.fragment,n),w(ns.$$.fragment,n),w(os.$$.fragment,n),w(ps.$$.fragment,n),w($n.$$.fragment,n),w(zn.$$.fragment,n),w(hs.$$.fragment,n),w(us.$$.fragment,n),w(bs.$$.fragment,n),w(En.$$.fragment,n),w(In.$$.fragment,n),pl=!0)},o(n){x(i.$$.fragment,n),x(C.$$.fragment,n),x(Dn.$$.fragment,n),x(eo.$$.fragment,n),x(no.$$.fragment,n),x(co.$$.fragment,n),x(po.$$.fragment,n),x(ho.$$.fragment,n),x(uo.$$.fragment,n),x(mo.$$.fragment,n),x(fo.$$.fragment,n),x(go.$$.fragment,n),x(_o.$$.fragment,n),x(an.$$.fragment,n),x(yo.$$.fragment,n),x(To.$$.fragment,n),x(ln.$$.fragment,n),x(wo.$$.fragment,n),x(xo.$$.fragment,n),x(jo.$$.fragment,n),x(Uo.$$.fragment,n),x(pn.$$.fragment,n),x(hn.$$.fragment,n),x(Eo.$$.fragment,n),x(Io.$$.fragment,n),x(qo.$$.fragment,n),x(mn.$$.fragment,n),x(fn.$$.fragment,n),x(Wo.$$.fragment,n),x(So.$$.fragment,n),x(Po.$$.fragment,n),x(Mn.$$.fragment,n),x(Bo.$$.fragment,n),x(Vo.$$.fragment,n),x(Tn.$$.fragment,n),x(Lo.$$.fragment,n),x(bn.$$.fragment,n),x(vn.$$.fragment,n),x(Ho.$$.fragment,n),x(Qo.$$.fragment,n),x(wn.$$.fragment,n),x(Ko.$$.fragment,n),x(xn.$$.fragment,n),x(jn.$$.fragment,n),x(ns.$$.fragment,n),x(os.$$.fragment,n),x(ps.$$.fragment,n),x($n.$$.fragment,n),x(zn.$$.fragment,n),x(hs.$$.fragment,n),x(us.$$.fragment,n),x(bs.$$.fragment,n),x(En.$$.fragment,n),x(In.$$.fragment,n),pl=!1},d(n){t(h),n&&t(y),n&&t(_),j(i),n&&t(Fe),n&&t(Z),n&&t(K),n&&t(B),n&&t(Ce),n&&t(P),n&&t(Ne),n&&t(ee),n&&t(q),n&&t(me),n&&t(qe),n&&t(A),j(C),n&&t(Ze),n&&t(E),n&&t(Ur),n&&t(xt),j(Dn),n&&t(Er),n&&t(We),n&&t(Ir),n&&t(Jt),j(eo),n&&t(Fr),n&&t(Kt),n&&t(Cr),n&&t($t),j(no),n&&t(Nr),n&&t(Se),n&&t(qr),n&&t(tn),n&&t(Zr),j(co,n),n&&t(Ar),n&&t(js),n&&t(Wr),j(po,n),n&&t(Sr),n&&t(zt),j(ho),n&&t(Pr),n&&t(Js),n&&t(Br),j(uo,n),n&&t(Vr),n&&t($s),n&&t(Rr),j(mo,n),n&&t(Gr),n&&t(Ut),j(fo),n&&t(Xr),n&&t(pt),n&&t(Lr),n&&t(Et),j(go),n&&t(Hr),n&&t(ze),j(_o),j(an),n&&t(Qr),n&&t(Ct),j(yo),n&&t(Or),n&&t(de),j(To),j(ln),j(wo),n&&t(Dr),n&&t(Nt),j(xo),n&&t(Yr),n&&t(Ue),j(jo),j(Uo),j(pn),j(hn),n&&t(Kr),n&&t(Zt),j(Eo),n&&t(el),n&&t(Ee),j(Io),j(qo),j(mn),j(fn),n&&t(tl),n&&t(Wt),j(Wo),n&&t(nl),n&&t(St),j(So),j(Po),j(Mn),n&&t(ol),n&&t(Pt),j(Bo),n&&t(sl),n&&t(ce),j(Vo),j(Tn),j(Lo),j(bn),j(vn),n&&t(al),n&&t(Vt),j(Ho),n&&t(rl),n&&t(pe),j(Qo),j(wn),j(Ko),j(xn),j(jn),n&&t(ll),n&&t(Gt),j(ns),n&&t(il),n&&t(Q),j(os),j(ps),j($n),j(zn),n&&t(dl),n&&t(Lt),j(hs),n&&t(cl),n&&t(O),j(us),j(bs),j(En),j(In)}}}const Pf={local:"marianmt",sections:[{local:"implementation-notes",title:"Implementation Notes"},{local:"naming",title:"Naming"},{local:"examples",title:"Examples"},{local:"multilingual-models",title:"Multilingual Models"},{local:"old-style-multilingual-models",title:"Old Style Multi-Lingual Models"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.MarianConfig",title:"MarianConfig"},{local:"transformers.MarianTokenizer",title:"MarianTokenizer"},{local:"transformers.MarianModel",title:"MarianModel"},{local:"transformers.MarianMTModel",title:"MarianMTModel"},{local:"transformers.MarianForCausalLM",title:"MarianForCausalLM"},{local:"transformers.TFMarianModel",title:"TFMarianModel"},{local:"transformers.TFMarianMTModel",title:"TFMarianMTModel"},{local:"transformers.FlaxMarianModel",title:"FlaxMarianModel"},{local:"transformers.FlaxMarianMTModel",title:"FlaxMarianMTModel"}],title:"MarianMT"};function Bf(J){return vf(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qf extends Mf{constructor(h){super();yf(this,h,Bf,Sf,Tf,{})}}export{Qf as default,Pf as metadata};
