import{S as Z0,i as G0,s as W0,e as a,k as c,w as M,t as i,M as N0,c as s,d as t,m as p,a as r,x as T,h as l,b as m,N as I0,G as e,g as _,y as k,q as v,o as w,B as J,v as R0,L as q}from"../../chunks/vendor-hf-doc-builder.js";import{T as yt}from"../../chunks/Tip-hf-doc-builder.js";import{D as B}from"../../chunks/Docstring-hf-doc-builder.js";import{C as x}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as A}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as C}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function X0(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Q29uZmlnJTJDJTIwTUJhcnRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBNQkFSVCUyMGZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBNQmFydENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyME1CYXJ0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartConfig, MBartModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a MBART facebook/mbart-large-cc25 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MBartConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/mbart-large-cc25 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartModel(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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function V0(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0VG9rZW5pemVyJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwTUJhcnRUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtZW4tcm8lMjIlMkMlMjBzcmNfbGFuZyUzRCUyMmVuX1hYJTIyJTJDJTIwdGd0X2xhbmclM0QlMjJyb19STyUyMiklMEFleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTIwJTNEJTIwJTIyJTIwVU4lMjBDaGllZiUyMFNheXMlMjBUaGVyZSUyMElzJTIwTm8lMjBNaWxpdGFyeSUyMFNvbHV0aW9uJTIwaW4lMjBTeXJpYSUyMiUwQWV4cGVjdGVkX3RyYW5zbGF0aW9uX3JvbWFuaWFuJTIwJTNEJTIwJTIyJUM1JTlFZWZ1bCUyME9OVSUyMGRlY2xhciVDNCU4MyUyMGMlQzQlODMlMjBudSUyMGV4aXN0JUM0JTgzJTIwbyUyMHNvbHUlQzUlQTNpZSUyMG1pbGl0YXIlQzQlODMlMjAlQzMlQUVuJTIwU2lyaWElMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoZXhhbXBsZV9lbmdsaXNoX3BocmFzZSUyQyUyMHRleHRfdGFyZ2V0JTNEZXhwZWN0ZWRfdHJhbnNsYXRpb25fcm9tYW5pYW4lMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBartTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_romanian = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_romanian, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`}}),{c(){d=a("p"),b=i("Examples:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function S0(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0VG9rZW5pemVyRmFzdCUwQSUwQXRva2VuaXplciUyMCUzRCUyME1CYXJ0VG9rZW5pemVyRmFzdC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiUyQyUyMHNyY19sYW5nJTNEJTIyZW5fWFglMjIlMkMlMjB0Z3RfbGFuZyUzRCUyMnJvX1JPJTIyJTBBKSUwQWV4YW1wbGVfZW5nbGlzaF9waHJhc2UlMjAlM0QlMjAlMjIlMjBVTiUyMENoaWVmJTIwU2F5cyUyMFRoZXJlJTIwSXMlMjBObyUyME1pbGl0YXJ5JTIwU29sdXRpb24lMjBpbiUyMFN5cmlhJTIyJTBBZXhwZWN0ZWRfdHJhbnNsYXRpb25fcm9tYW5pYW4lMjAlM0QlMjAlMjIlQzUlOUVlZnVsJTIwT05VJTIwZGVjbGFyJUM0JTgzJTIwYyVDNCU4MyUyMG51JTIwZXhpc3QlQzQlODMlMjBvJTIwc29sdSVDNSVBM2llJTIwbWlsaXRhciVDNCU4MyUyMCVDMyVBRW4lMjBTaXJpYSUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTJDJTIwdGV4dF90YXJnZXQlM0RleHBlY3RlZF90cmFuc2xhdGlvbl9yb21hbmlhbiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBartTokenizerFast.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_romanian = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_romanian, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`}}),{c(){d=a("p"),b=i("Examples:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function A0(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0NTBUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBNQmFydDUwVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLTUwJTIyJTJDJTIwc3JjX2xhbmclM0QlMjJlbl9YWCUyMiUyQyUyMHRndF9sYW5nJTNEJTIycm9fUk8lMjIpJTBBc3JjX3RleHQlMjAlM0QlMjAlMjIlMjBVTiUyMENoaWVmJTIwU2F5cyUyMFRoZXJlJTIwSXMlMjBObyUyME1pbGl0YXJ5JTIwU29sdXRpb24lMjBpbiUyMFN5cmlhJTIyJTBBdGd0X3RleHQlMjAlM0QlMjAlMjIlQzUlOUVlZnVsJTIwT05VJTIwZGVjbGFyJUM0JTgzJTIwYyVDNCU4MyUyMG51JTIwZXhpc3QlQzQlODMlMjBvJTIwc29sdSVDNSVBM2llJTIwbWlsaXRhciVDNCU4MyUyMCVDMyVBRW4lMjBTaXJpYSUyMiUwQW1vZGVsX2lucHV0cyUyMCUzRCUyMHRva2VuaXplcihzcmNfdGV4dCUyQyUyMHRleHRfdGFyZ2V0JTNEdGd0X3RleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUyMyUyMG1vZGVsKCoqbW9kZWxfaW5wdXRzKSUyMHNob3VsZCUyMHdvcms=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBart50Tokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBart50Tokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>src_text = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tgt_text = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model(**model_inputs) should work</span>`}}),{c(){d=a("p"),b=i("Examples:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function Y0(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0NTBUb2tlbml6ZXJGYXN0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwTUJhcnQ1MFRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtNTAlMjIlMkMlMjBzcmNfbGFuZyUzRCUyMmVuX1hYJTIyJTJDJTIwdGd0X2xhbmclM0QlMjJyb19STyUyMiklMEFzcmNfdGV4dCUyMCUzRCUyMCUyMiUyMFVOJTIwQ2hpZWYlMjBTYXlzJTIwVGhlcmUlMjBJcyUyME5vJTIwTWlsaXRhcnklMjBTb2x1dGlvbiUyMGluJTIwU3lyaWElMjIlMEF0Z3RfdGV4dCUyMCUzRCUyMCUyMiVDNSU5RWVmdWwlMjBPTlUlMjBkZWNsYXIlQzQlODMlMjBjJUM0JTgzJTIwbnUlMjBleGlzdCVDNCU4MyUyMG8lMjBzb2x1JUM1JUEzaWUlMjBtaWxpdGFyJUM0JTgzJTIwJUMzJUFFbiUyMFNpcmlhJTIyJTBBbW9kZWxfaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHNyY190ZXh0JTJDJTIwdGV4dF90YXJnZXQlM0R0Z3RfdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTIzJTIwbW9kZWwoKiptb2RlbF9pbnB1dHMpJTIwc2hvdWxkJTIwd29yaw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBart50TokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBart50TokenizerFast.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>src_text = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tgt_text = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model(**model_inputs) should work</span>`}}),{c(){d=a("p"),b=i("Examples:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function Q0(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function P0(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBbW9kZWwlMjAlM0QlMjBNQmFydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartModel.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function O0(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function D0(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwTUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtZW4tcm8lMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiklMEElMEFleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTIwJTNEJTIwJTIyNDIlMjBpcyUyMHRoZSUyMGFuc3dlciUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBUcmFuc2xhdGUlMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMlMkMlMjBudW1fYmVhbXMlM0Q0JTJDJTIwbWF4X2xlbmd0aCUzRDUpJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot;42 is the answer&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Translate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, num_beams=<span class="hljs-number">4</span>, max_length=<span class="hljs-number">5</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;42 este r\u0103spuns&#x27;</span>`}}),{c(){d=a("p"),b=i("Translation example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Translation example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function H0(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwTUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBJTIzJTIwZGVfREUlMjBpcyUyMHRoZSUyMGxhbmd1YWdlJTIwc3ltYm9sJTIwaWQlMjAlM0NMSUQlM0UlMjBmb3IlMjBHZXJtYW4lMEFUWFQlMjAlM0QlMjAlMjIlM0MlMkZzJTNFJTIwTWVpbmUlMjBGcmV1bmRlJTIwc2luZCUyMCUzQ21hc2slM0UlMjBuZXR0JTIwYWJlciUyMHNpZSUyMGVzc2VuJTIwenUlMjB2aWVsJTIwS3VjaGVuLiUyMCUzQyUyRnMlM0UlMjBkZV9ERSUyMiUwQSUwQWlucHV0X2lkcyUyMCUzRCUyMHRva2VuaXplciglNUJUWFQlNUQlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRfaWRzKS5sb2dpdHMlMEElMEFtYXNrZWRfaW5kZXglMjAlM0QlMjAoaW5wdXRfaWRzJTVCMCU1RCUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKS5ub256ZXJvKCkuaXRlbSgpJTBBcHJvYnMlMjAlM0QlMjBsb2dpdHMlNUIwJTJDJTIwbWFza2VkX2luZGV4JTVELnNvZnRtYXgoZGltJTNEMCklMEF2YWx1ZXMlMkMlMjBwcmVkaWN0aW9ucyUyMCUzRCUyMHByb2JzLnRvcGsoNSklMEElMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3Rpb25zKS5zcGxpdCgp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># de_DE is the language symbol id &lt;LID&gt; for German</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;&lt;/s&gt; Meine Freunde sind &lt;mask&gt; nett aber sie essen zu viel Kuchen. &lt;/s&gt; de_DE&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(input_ids).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>masked_index = (input_ids[<span class="hljs-number">0</span>] == tokenizer.mask_token_id).nonzero().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits[<span class="hljs-number">0</span>, masked_index].softmax(dim=<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>values, predictions = probs.topk(<span class="hljs-number">5</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predictions).split()
[<span class="hljs-string">&#x27;nett&#x27;</span>, <span class="hljs-string">&#x27;sehr&#x27;</span>, <span class="hljs-string">&#x27;ganz&#x27;</span>, <span class="hljs-string">&#x27;nicht&#x27;</span>, <span class="hljs-string">&#x27;so&#x27;</span>]`}}),{c(){d=a("p"),b=i("Mask filling example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Mask filling example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function L0(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function K0(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBbW9kZWwlMjAlM0QlMjBNQmFydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEElMEElMjMlMjB0YXJnZXQlMjBpcyUyMCUyMm5pY2UlMjBwdXBwZXQlMjIlMEF0YXJnZXRfc3RhcnRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNSU1RCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBzdGFydF9wb3NpdGlvbnMlM0R0YXJnZXRfc3RhcnRfaW5kZXglMkMlMjBlbmRfcG9zaXRpb25zJTNEdGFyZ2V0X2VuZF9pbmRleCklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function eJ(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function tJ(F){let d,b,f,h,y;return h=new x({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyME1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyME1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoKS5pdGVtKCklMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBNQmFydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=a("p"),b=i("Example of single-label classification:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example of single-label classification:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function oJ(F){let d,b,f,h,y;return h=new x({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyME1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyME1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBNQmFydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&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><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=a("p"),b=i("Example of multi-label classification:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example of multi-label classification:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function nJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydEZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQW1vZGVsJTIwJTNEJTIwTUJhcnRGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyJTJDJTIwYWRkX2Nyb3NzX2F0dGVudGlvbiUzREZhbHNlKSUwQWFzc2VydCUyMG1vZGVsLmNvbmZpZy5pc19kZWNvZGVyJTJDJTIwZiUyMiU3Qm1vZGVsLl9fY2xhc3NfXyU3RCUyMGhhcyUyMHRvJTIwYmUlMjBjb25maWd1cmVkJTIwYXMlMjBhJTIwZGVjb2Rlci4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTBBZXhwZWN0ZWRfc2hhcGUlMjAlM0QlMjAlNUIxJTJDJTIwaW5wdXRzLmlucHV0X2lkcy5zaGFwZSU1Qi0xJTVEJTJDJTIwbW9kZWwuY29uZmlnLnZvY2FiX3NpemUlNUQlMEFsaXN0KGxvZ2l0cy5zaGFwZSklMjAlM0QlM0QlMjBleHBlY3RlZF9zaGFwZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function aJ(F){let d,b,f,h,y,n,u,z,bt,ot,Y,Ie,he,j,Mt,ee,Ze,Wt,me,re,Ye,ke,Tt,ve,we,kt,nt,Q,fe,Qe,ie,Z,G,vt,ge,_e,wt,H,Jt,Ft,S,Ge,Je,at,le,Fe,Ue,Ut,de,Be,ze,st,L,I,Pe,W,Bt,Oe;return{c(){d=a("p"),b=i("TensorFlow models and layers in "),f=a("code"),h=i("transformers"),y=i(" accept two formats as input:"),n=c(),u=a("ul"),z=a("li"),bt=i("having all inputs as keyword arguments (like PyTorch models), or"),ot=c(),Y=a("li"),Ie=i("having all inputs as a list, tuple or dict in the first positional argument."),he=c(),j=a("p"),Mt=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 `),ee=a("code"),Ze=i("model.fit()"),Wt=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=a("code"),re=i("model.fit()"),Ye=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),ke=a("code"),Tt=i("fit()"),ve=i(" and "),we=a("code"),kt=i("predict()"),nt=i(`, such as when creating your own layers or models with
the Keras `),Q=a("code"),fe=i("Functional"),Qe=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ie=c(),Z=a("ul"),G=a("li"),vt=i("a single Tensor with "),ge=a("code"),_e=i("input_ids"),wt=i(" only and nothing else: "),H=a("code"),Jt=i("model(input_ids)"),Ft=c(),S=a("li"),Ge=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Je=a("code"),at=i("model([input_ids, attention_mask])"),le=i(" or "),Fe=a("code"),Ue=i("model([input_ids, attention_mask, token_type_ids])"),Ut=c(),de=a("li"),Be=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ze=a("code"),st=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),L=c(),I=a("p"),Pe=i(`Note that when creating models and layers with
`),W=a("a"),Bt=i("subclassing"),Oe=i(` 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(U){d=s(U,"P",{});var $=r(d);b=l($,"TensorFlow models and layers in "),f=s($,"CODE",{});var D=r(f);h=l(D,"transformers"),D.forEach(t),y=l($," accept two formats as input:"),$.forEach(t),n=p(U),u=s(U,"UL",{});var De=r(u);z=s(De,"LI",{});var zt=r(z);bt=l(zt,"having all inputs as keyword arguments (like PyTorch models), or"),zt.forEach(t),ot=p(De),Y=s(De,"LI",{});var Ht=r(Y);Ie=l(Ht,"having all inputs as a list, tuple or dict in the first positional argument."),Ht.forEach(t),De.forEach(t),he=p(U),j=s(U,"P",{});var E=r(j);Mt=l(E,`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 `),ee=s(E,"CODE",{});var jt=r(ee);Ze=l(jt,"model.fit()"),jt.forEach(t),Wt=l(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=s(E,"CODE",{});var Lt=r(me);re=l(Lt,"model.fit()"),Lt.forEach(t),Ye=l(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),ke=s(E,"CODE",{});var Kt=r(ke);Tt=l(Kt,"fit()"),Kt.forEach(t),ve=l(E," and "),we=s(E,"CODE",{});var $t=r(we);kt=l($t,"predict()"),$t.forEach(t),nt=l(E,`, such as when creating your own layers or models with
the Keras `),Q=s(E,"CODE",{});var eo=r(Q);fe=l(eo,"Functional"),eo.forEach(t),Qe=l(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ie=p(U),Z=s(U,"UL",{});var ce=r(Z);G=s(ce,"LI",{});var pe=r(G);vt=l(pe,"a single Tensor with "),ge=s(pe,"CODE",{});var to=r(ge);_e=l(to,"input_ids"),to.forEach(t),wt=l(pe," only and nothing else: "),H=s(pe,"CODE",{});var oo=r(H);Jt=l(oo,"model(input_ids)"),oo.forEach(t),pe.forEach(t),Ft=p(ce),S=s(ce,"LI",{});var ye=r(S);Ge=l(ye,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Je=s(ye,"CODE",{});var te=r(Je);at=l(te,"model([input_ids, attention_mask])"),te.forEach(t),le=l(ye," or "),Fe=s(ye,"CODE",{});var no=r(Fe);Ue=l(no,"model([input_ids, attention_mask, token_type_ids])"),no.forEach(t),ye.forEach(t),Ut=p(ce),de=s(ce,"LI",{});var je=r(de);Be=l(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ze=s(je,"CODE",{});var xt=r(ze);st=l(xt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xt.forEach(t),je.forEach(t),ce.forEach(t),L=p(U),I=s(U,"P",{});var He=r(I);Pe=l(He,`Note that when creating models and layers with
`),W=s(He,"A",{href:!0,rel:!0});var ao=r(W);Bt=l(ao,"subclassing"),ao.forEach(t),Oe=l(He,` 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!`),He.forEach(t),this.h()},h(){m(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(W,"rel","nofollow")},m(U,$){_(U,d,$),e(d,b),e(d,f),e(f,h),e(d,y),_(U,n,$),_(U,u,$),e(u,z),e(z,bt),e(u,ot),e(u,Y),e(Y,Ie),_(U,he,$),_(U,j,$),e(j,Mt),e(j,ee),e(ee,Ze),e(j,Wt),e(j,me),e(me,re),e(j,Ye),e(j,ke),e(ke,Tt),e(j,ve),e(j,we),e(we,kt),e(j,nt),e(j,Q),e(Q,fe),e(j,Qe),_(U,ie,$),_(U,Z,$),e(Z,G),e(G,vt),e(G,ge),e(ge,_e),e(G,wt),e(G,H),e(H,Jt),e(Z,Ft),e(Z,S),e(S,Ge),e(S,Je),e(Je,at),e(S,le),e(S,Fe),e(Fe,Ue),e(Z,Ut),e(Z,de),e(de,Be),e(de,ze),e(ze,st),_(U,L,$),_(U,I,$),e(I,Pe),e(I,W),e(W,Bt),e(I,Oe)},d(U){U&&t(d),U&&t(n),U&&t(u),U&&t(he),U&&t(j),U&&t(ie),U&&t(Z),U&&t(L),U&&t(I)}}}function sJ(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function rJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURk1CYXJ0TW9kZWwlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGTUJhcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMBartModel
<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;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMBartModel.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function iJ(F){let d,b,f,h,y,n,u,z,bt,ot,Y,Ie,he,j,Mt,ee,Ze,Wt,me,re,Ye,ke,Tt,ve,we,kt,nt,Q,fe,Qe,ie,Z,G,vt,ge,_e,wt,H,Jt,Ft,S,Ge,Je,at,le,Fe,Ue,Ut,de,Be,ze,st,L,I,Pe,W,Bt,Oe;return{c(){d=a("p"),b=i("TensorFlow models and layers in "),f=a("code"),h=i("transformers"),y=i(" accept two formats as input:"),n=c(),u=a("ul"),z=a("li"),bt=i("having all inputs as keyword arguments (like PyTorch models), or"),ot=c(),Y=a("li"),Ie=i("having all inputs as a list, tuple or dict in the first positional argument."),he=c(),j=a("p"),Mt=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 `),ee=a("code"),Ze=i("model.fit()"),Wt=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=a("code"),re=i("model.fit()"),Ye=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),ke=a("code"),Tt=i("fit()"),ve=i(" and "),we=a("code"),kt=i("predict()"),nt=i(`, such as when creating your own layers or models with
the Keras `),Q=a("code"),fe=i("Functional"),Qe=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ie=c(),Z=a("ul"),G=a("li"),vt=i("a single Tensor with "),ge=a("code"),_e=i("input_ids"),wt=i(" only and nothing else: "),H=a("code"),Jt=i("model(input_ids)"),Ft=c(),S=a("li"),Ge=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Je=a("code"),at=i("model([input_ids, attention_mask])"),le=i(" or "),Fe=a("code"),Ue=i("model([input_ids, attention_mask, token_type_ids])"),Ut=c(),de=a("li"),Be=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ze=a("code"),st=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),L=c(),I=a("p"),Pe=i(`Note that when creating models and layers with
`),W=a("a"),Bt=i("subclassing"),Oe=i(` 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(U){d=s(U,"P",{});var $=r(d);b=l($,"TensorFlow models and layers in "),f=s($,"CODE",{});var D=r(f);h=l(D,"transformers"),D.forEach(t),y=l($," accept two formats as input:"),$.forEach(t),n=p(U),u=s(U,"UL",{});var De=r(u);z=s(De,"LI",{});var zt=r(z);bt=l(zt,"having all inputs as keyword arguments (like PyTorch models), or"),zt.forEach(t),ot=p(De),Y=s(De,"LI",{});var Ht=r(Y);Ie=l(Ht,"having all inputs as a list, tuple or dict in the first positional argument."),Ht.forEach(t),De.forEach(t),he=p(U),j=s(U,"P",{});var E=r(j);Mt=l(E,`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 `),ee=s(E,"CODE",{});var jt=r(ee);Ze=l(jt,"model.fit()"),jt.forEach(t),Wt=l(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=s(E,"CODE",{});var Lt=r(me);re=l(Lt,"model.fit()"),Lt.forEach(t),Ye=l(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),ke=s(E,"CODE",{});var Kt=r(ke);Tt=l(Kt,"fit()"),Kt.forEach(t),ve=l(E," and "),we=s(E,"CODE",{});var $t=r(we);kt=l($t,"predict()"),$t.forEach(t),nt=l(E,`, such as when creating your own layers or models with
the Keras `),Q=s(E,"CODE",{});var eo=r(Q);fe=l(eo,"Functional"),eo.forEach(t),Qe=l(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ie=p(U),Z=s(U,"UL",{});var ce=r(Z);G=s(ce,"LI",{});var pe=r(G);vt=l(pe,"a single Tensor with "),ge=s(pe,"CODE",{});var to=r(ge);_e=l(to,"input_ids"),to.forEach(t),wt=l(pe," only and nothing else: "),H=s(pe,"CODE",{});var oo=r(H);Jt=l(oo,"model(input_ids)"),oo.forEach(t),pe.forEach(t),Ft=p(ce),S=s(ce,"LI",{});var ye=r(S);Ge=l(ye,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Je=s(ye,"CODE",{});var te=r(Je);at=l(te,"model([input_ids, attention_mask])"),te.forEach(t),le=l(ye," or "),Fe=s(ye,"CODE",{});var no=r(Fe);Ue=l(no,"model([input_ids, attention_mask, token_type_ids])"),no.forEach(t),ye.forEach(t),Ut=p(ce),de=s(ce,"LI",{});var je=r(de);Be=l(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ze=s(je,"CODE",{});var xt=r(ze);st=l(xt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xt.forEach(t),je.forEach(t),ce.forEach(t),L=p(U),I=s(U,"P",{});var He=r(I);Pe=l(He,`Note that when creating models and layers with
`),W=s(He,"A",{href:!0,rel:!0});var ao=r(W);Bt=l(ao,"subclassing"),ao.forEach(t),Oe=l(He,` 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!`),He.forEach(t),this.h()},h(){m(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(W,"rel","nofollow")},m(U,$){_(U,d,$),e(d,b),e(d,f),e(f,h),e(d,y),_(U,n,$),_(U,u,$),e(u,z),e(z,bt),e(u,ot),e(u,Y),e(Y,Ie),_(U,he,$),_(U,j,$),e(j,Mt),e(j,ee),e(ee,Ze),e(j,Wt),e(j,me),e(me,re),e(j,Ye),e(j,ke),e(ke,Tt),e(j,ve),e(j,we),e(we,kt),e(j,nt),e(j,Q),e(Q,fe),e(j,Qe),_(U,ie,$),_(U,Z,$),e(Z,G),e(G,vt),e(G,ge),e(ge,_e),e(G,wt),e(G,H),e(H,Jt),e(Z,Ft),e(Z,S),e(S,Ge),e(S,Je),e(Je,at),e(S,le),e(S,Fe),e(Fe,Ue),e(Z,Ut),e(Z,de),e(de,Be),e(de,ze),e(ze,st),_(U,L,$),_(U,I,$),e(I,Pe),e(I,W),e(W,Bt),e(I,Oe)},d(U){U&&t(d),U&&t(n),U&&t(u),U&&t(he),U&&t(j),U&&t(ie),U&&t(Z),U&&t(L),U&&t(I)}}}function lJ(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function dJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURk1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBURk1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWVuLXJvJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtZW4tcm8lMjIpJTBBJTBBZXhhbXBsZV9lbmdsaXNoX3BocmFzZSUyMCUzRCUyMCUyMjQyJTIwaXMlMjB0aGUlMjBhbnN3ZXIlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoZXhhbXBsZV9lbmdsaXNoX3BocmFzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBJTBBJTIzJTIwVHJhbnNsYXRlJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwbnVtX2JlYW1zJTNENCUyQyUyMG1heF9sZW5ndGglM0Q1KSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot;42 is the answer&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Translate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, num_beams=<span class="hljs-number">4</span>, max_length=<span class="hljs-number">5</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;42 este r\u0103spuns&#x27;</span>`}}),{c(){d=a("p"),b=i("Translation example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Translation example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function cJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURk1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEFtb2RlbCUyMCUzRCUyMFRGTUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBJTIzJTIwZGVfREUlMjBpcyUyMHRoZSUyMGxhbmd1YWdlJTIwc3ltYm9sJTIwaWQlMjAlM0NMSUQlM0UlMjBmb3IlMjBHZXJtYW4lMEFUWFQlMjAlM0QlMjAlMjIlM0MlMkZzJTNFJTIwTWVpbmUlMjBGcmV1bmRlJTIwc2luZCUyMCUzQ21hc2slM0UlMjBuZXR0JTIwYWJlciUyMHNpZSUyMGVzc2VuJTIwenUlMjB2aWVsJTIwS3VjaGVuLiUyMCUzQyUyRnMlM0UlMjBkZV9ERSUyMiUwQSUwQWlucHV0X2lkcyUyMCUzRCUyMHRva2VuaXplciglNUJUWFQlNUQlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRfaWRzKS5sb2dpdHMlMEElMEFtYXNrZWRfaW5kZXglMjAlM0QlMjB0Zi53aGVyZShpbnB1dF9pZHMlNUIwJTVEJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCUyQyUyMDAlNUQlMEFwcm9icyUyMCUzRCUyMHRmLm5uLnNvZnRtYXgobG9naXRzJTVCMCUyQyUyMG1hc2tlZF9pbmRleCU1RCUyQyUyMGF4aXMlM0QwKSUwQXZhbHVlcyUyQyUyMHByZWRpY3Rpb25zJTIwJTNEJTIwdGYubWF0aC50b3Bfayhwcm9icyUyQyUyMDUpJTBBJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0aW9ucykuc3BsaXQoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMBartForConditionalGeneration
<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>model = TFMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># de_DE is the language symbol id &lt;LID&gt; for German</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;&lt;/s&gt; Meine Freunde sind &lt;mask&gt; nett aber sie essen zu viel Kuchen. &lt;/s&gt; de_DE&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(input_ids).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>masked_index = tf.where(input_ids[<span class="hljs-number">0</span>] == tokenizer.mask_token_id)[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = tf.nn.softmax(logits[<span class="hljs-number">0</span>, masked_index], axis=<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>values, predictions = tf.math.top_k(probs, <span class="hljs-number">5</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predictions).split()
[<span class="hljs-string">&#x27;nett&#x27;</span>, <span class="hljs-string">&#x27;sehr&#x27;</span>, <span class="hljs-string">&#x27;ganz&#x27;</span>, <span class="hljs-string">&#x27;nicht&#x27;</span>, <span class="hljs-string">&#x27;so&#x27;</span>]`}}),{c(){d=a("p"),b=i("Mask filling example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Mask filling example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function pJ(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function uJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRNb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartModel.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function hJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function mJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyklMEElMEFkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTIwJTNEJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMGpucC5vbmVzKChpbnB1dHMuaW5wdXRfaWRzLnNoYXBlJTVCMCU1RCUyQyUyMDEpJTJDJTIwZHR5cGUlM0QlMjJpNCUyMiklMjAqJTIwZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5kZWNvZGUoZGVjb2Rlcl9pbnB1dF9pZHMlMkMlMjBlbmNvZGVyX291dHB1dHMpJTBBbGFzdF9kZWNvZGVyX2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_decoder_hidden_states = outputs.last_hidden_state`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function fJ(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function gJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMjBNQmFydENvbmZpZyUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheE1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQSUwQUFSVElDTEVfVE9fU1VNTUFSSVpFJTIwJTNEJTIwJTIyTWVpbmUlMjBGcmV1bmRlJTIwc2luZCUyMGNvb2wlMkMlMjBhYmVyJTIwc2llJTIwZXNzZW4lMjB6dSUyMHZpZWwlMjBLdWNoZW4uJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QkFSVElDTEVfVE9fU1VNTUFSSVpFJTVEJTJDJTIwbWF4X2xlbmd0aCUzRDEwMjQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTIwU3VtbWFyeSUwQXN1bW1hcnlfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTJDJTIwbnVtX2JlYW1zJTNENCUyQyUyMG1heF9sZW5ndGglM0Q1KS5zZXF1ZW5jZXMlMEFwcmludCh0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKHN1bW1hcnlfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration, MBartConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>ARTICLE_TO_SUMMARIZE = <span class="hljs-string">&quot;Meine Freunde sind cool, aber sie essen zu viel Kuchen.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate Summary</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>summary_ids = model.generate(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>], num_beams=<span class="hljs-number">4</span>, max_length=<span class="hljs-number">5</span>).sequences
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer.batch_decode(summary_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>))`}}),{c(){d=a("p"),b=i("Summarization example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Summarization example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function _J(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEElMjMlMjBkZV9ERSUyMGlzJTIwdGhlJTIwbGFuZ3VhZ2UlMjBzeW1ib2wlMjBpZCUyMCUzQ0xJRCUzRSUyMGZvciUyMEdlcm1hbiUwQVRYVCUyMCUzRCUyMCUyMiUzQyUyRnMlM0UlMjBNZWluZSUyMEZyZXVuZGUlMjBzaW5kJTIwJTNDbWFzayUzRSUyMG5ldHQlMjBhYmVyJTIwc2llJTIwZXNzZW4lMjB6dSUyMHZpZWwlMjBLdWNoZW4uJTIwJTNDJTJGcyUzRSUyMGRlX0RFJTIyJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QlRYVCU1RCUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbChpbnB1dF9pZHMpLmxvZ2l0cyUwQW1hc2tlZF9pbmRleCUyMCUzRCUyMChpbnB1dF9pZHMlNUIwJTVEJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpLm5vbnplcm8oKSU1QjAlNUQuaXRlbSgpJTBBcHJvYnMlMjAlM0QlMjBsb2dpdHMlNUIwJTJDJTIwbWFza2VkX2luZGV4JTVELnNvZnRtYXgoZGltJTNEMCklMEF2YWx1ZXMlMkMlMjBwcmVkaWN0aW9ucyUyMCUzRCUyMHByb2JzLnRvcGsoNSklMEElMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3Rpb25zKS5zcGxpdCgp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># de_DE is the language symbol id &lt;LID&gt; for German</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;&lt;/s&gt; Meine Freunde sind &lt;mask&gt; nett aber sie essen zu viel Kuchen. &lt;/s&gt; de_DE&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(input_ids).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>masked_index = (input_ids[<span class="hljs-number">0</span>] == tokenizer.mask_token_id).nonzero()[<span class="hljs-number">0</span>].item()
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits[<span class="hljs-number">0</span>, masked_index].softmax(dim=<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>values, predictions = probs.topk(<span class="hljs-number">5</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predictions).split()`}}),{c(){d=a("p"),b=i("Mask filling example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Mask filling example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function yJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function bJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyklMEElMEFkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTIwJTNEJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMGpucC5vbmVzKChpbnB1dHMuaW5wdXRfaWRzLnNoYXBlJTVCMCU1RCUyQyUyMDEpJTJDJTIwZHR5cGUlM0QlMjJpNCUyMiklMjAqJTIwZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5kZWNvZGUoZGVjb2Rlcl9pbnB1dF9pZHMlMkMlMjBlbmNvZGVyX291dHB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function MJ(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function TJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheE1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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>logits = outputs.logits`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function kJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function vJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyklMEElMEFkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTIwJTNEJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMGpucC5vbmVzKChpbnB1dHMuaW5wdXRfaWRzLnNoYXBlJTVCMCU1RCUyQyUyMDEpJTJDJTIwZHR5cGUlM0QlMjJpNCUyMiklMjAqJTIwZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5kZWNvZGUoZGVjb2Rlcl9pbnB1dF9pZHMlMkMlMjBlbmNvZGVyX291dHB1dHMpJTBBbGFzdF9kZWNvZGVyX2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_decoder_hidden_states = outputs.last_hidden_state`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function wJ(F){let d,b,f,h,y;return{c(){d=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),y=i(`
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(n){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);h=l(z,"Module"),z.forEach(t),y=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(n,u){_(n,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function JJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JRdWVzdGlvbkFuc3dlcmluZyUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQXN0YXJ0X3Njb3JlcyUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzJTBBZW5kX3Njb3JlcyUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, 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>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function FJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function UJ(F){let d,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyklMEElMEFkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTIwJTNEJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMGpucC5vbmVzKChpbnB1dHMuaW5wdXRfaWRzLnNoYXBlJTVCMCU1RCUyQyUyMDEpJTJDJTIwZHR5cGUlM0QlMjJpNCUyMiklMjAqJTIwZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5kZWNvZGUoZGVjb2Rlcl9pbnB1dF9pZHMlMkMlMjBlbmNvZGVyX291dHB1dHMpJTBBbGFzdF9kZWNvZGVyX2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_decoder_hidden_states = outputs.last_hidden_state`}}),{c(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function BJ(F){let d,b,f,h,y,n,u,z,bt,ot,Y,Ie,he,j,Mt,ee,Ze,Wt,me,re,Ye,ke,Tt,ve,we,kt,nt,Q,fe,Qe,ie,Z,G,vt,ge,_e,wt,H,Jt,Ft,S,Ge,Je,at,le,Fe,Ue,Ut,de,Be,ze,st,L,I,Pe,W,Bt,Oe,U,$,D,De,zt,Ht,E,jt,Lt,Kt,$t,eo,ce,pe,to,oo,ye,te,no,je,xt,He,ao,lm,zl,dm,cm,jl,pm,um,Wp,Fi,$l,hm,Np,Ia,Rp,Ui,Za,xl,mm,fm,so,gm,El,_m,ym,Cl,bm,Mm,Xp,Ga,Vp,ro,Yo,ql,Wa,Tm,Il,km,Sp,Nt,vm,Na,wm,Jm,Zl,Fm,Um,Ap,Bi,Bm,Yp,zi,Gl,zm,Qp,io,Qo,Wl,Ra,jm,Nl,$m,Pp,rt,xm,Rl,Em,Cm,Xl,qm,Im,Vl,Zm,Gm,Op,Po,Wm,ji,Nm,Rm,Dp,$i,Sl,Xm,Hp,Xa,Lp,xi,Va,Al,Vm,Sm,$e,Am,Yl,Ym,Qm,Ql,Pm,Om,Pl,Dm,Hm,Ol,Lm,Km,Dl,ef,tf,Kp,Sa,eu,lo,Oo,Hl,Aa,of,Ll,nf,tu,be,Kl,Ei,af,sf,ed,Ci,rf,lf,td,qi,df,cf,od,Ii,pf,uf,nd,Zi,hf,mf,ad,Gi,ff,ou,co,Do,sd,Ya,gf,rd,_f,nu,Le,Qa,yf,po,bf,Wi,Mf,Tf,Pa,kf,vf,wf,uo,Jf,Ni,Ff,Uf,Ri,Bf,zf,jf,Ho,au,ho,Lo,id,Oa,$f,ld,xf,su,ue,Da,Ef,dd,Cf,qf,Et,If,Xi,Zf,Gf,Vi,Wf,Nf,Ha,Rf,Xf,Vf,mo,Sf,cd,Af,Yf,pd,Qf,Pf,Of,Ko,Df,it,La,Hf,Ka,Lf,ud,Kf,eg,tg,es,ts,hd,og,ng,md,ag,sg,os,fd,rg,ig,gd,lg,dg,_d,cg,ru,fo,en,yd,ns,pg,bd,ug,iu,N,as,hg,go,mg,Md,fg,gg,ss,_g,yg,bg,rs,Mg,Si,Tg,kg,vg,_o,wg,Td,Jg,Fg,kd,Ug,Bg,zg,tn,jg,We,is,$g,vd,xg,Eg,ls,Cg,wd,qg,Ig,Zg,ds,cs,Jd,Gg,Wg,Fd,Ng,Rg,ps,Ud,Xg,Vg,Bd,Sg,Ag,zd,Yg,Qg,on,us,Pg,jd,Og,Dg,nn,hs,Hg,$d,Lg,Kg,an,ms,e_,xd,t_,lu,yo,sn,Ed,fs,o_,Cd,n_,du,R,gs,a_,_s,s_,ys,r_,i_,l_,bs,d_,Ai,c_,p_,u_,rn,h_,lt,Ms,m_,Ts,f_,qd,g_,__,y_,ks,vs,Id,b_,M_,Zd,T_,k_,ws,Gd,v_,w_,Wd,J_,F_,Nd,U_,B_,ln,Js,z_,Rd,j_,$_,dn,Fs,x_,Us,E_,Xd,C_,q_,I_,cn,Bs,Z_,Vd,G_,W_,pn,zs,N_,Sd,R_,cu,bo,un,Ad,js,X_,Yd,V_,pu,K,$s,S_,Mo,A_,Qd,Y_,Q_,xs,P_,O_,D_,Es,H_,Yi,L_,K_,ey,hn,ty,Ne,Cs,oy,Pd,ny,ay,qs,sy,Od,ry,iy,ly,Is,Zs,Dd,dy,cy,Hd,py,uy,Gs,Ld,hy,my,Kd,fy,gy,ec,_y,yy,mn,Ws,by,tc,My,Ty,fn,Ns,ky,oc,vy,uu,To,gn,nc,Rs,wy,ac,Jy,hu,Ke,Xs,Fy,Vs,Uy,Qi,By,zy,jy,Ss,$y,As,xy,Ey,Cy,dt,Ys,qy,ko,Iy,Pi,Zy,Gy,sc,Wy,Ny,Ry,_n,Xy,yn,mu,vo,bn,rc,Qs,Vy,ic,Sy,fu,et,Ps,Ay,Os,Yy,Oi,Qy,Py,Oy,Ds,Dy,Hs,Hy,Ly,Ky,Re,Ls,eb,wo,tb,Di,ob,nb,lc,ab,sb,rb,Mn,ib,Tn,lb,kn,gu,Jo,vn,dc,Ks,db,cc,cb,_u,xe,er,pb,Fo,ub,pc,hb,mb,uc,fb,gb,_b,tr,yb,Hi,bb,Mb,Tb,or,kb,nr,vb,wb,Jb,ct,ar,Fb,Uo,Ub,Li,Bb,zb,hc,jb,$b,xb,wn,Eb,Jn,yu,Bo,Fn,mc,sr,Cb,fc,qb,bu,Ee,rr,Ib,gc,Zb,Gb,ir,Wb,Ki,Nb,Rb,Xb,lr,Vb,dr,Sb,Ab,Yb,Xe,cr,Qb,zo,Pb,el,Ob,Db,_c,Hb,Lb,Kb,Un,eM,Bn,tM,zn,Mu,jo,jn,yc,pr,oM,bc,nM,Tu,$o,ur,aM,$n,hr,sM,xn,ku,xo,En,Mc,mr,rM,Tc,iM,vu,Ce,fr,lM,gr,dM,tl,cM,pM,uM,_r,hM,yr,mM,fM,gM,Cn,_M,pt,br,yM,Eo,bM,ol,MM,TM,kc,kM,vM,wM,qn,JM,In,wu,Co,Zn,vc,Mr,FM,wc,UM,Ju,qe,Tr,BM,kr,zM,nl,jM,$M,xM,vr,EM,wr,CM,qM,IM,Gn,ZM,Ve,Jr,GM,qo,WM,al,NM,RM,Jc,XM,VM,SM,Wn,AM,Nn,YM,Rn,Fu,Io,Xn,Fc,Fr,QM,Uc,PM,Uu,P,Ur,OM,Br,DM,sl,HM,LM,KM,zr,eT,jr,tT,oT,nT,Bc,aT,sT,Ct,zc,$r,rT,iT,jc,xr,lT,dT,$c,Er,cT,pT,xc,Cr,uT,hT,ut,qr,mT,Zo,fT,Ec,gT,_T,Cc,yT,bT,MT,Vn,TT,Sn,kT,An,Ir,vT,Yn,wT,Qn,Zr,JT,Pn,Bu,Go,On,qc,Gr,FT,Ic,UT,zu,O,Wr,BT,Nr,zT,rl,jT,$T,xT,Rr,ET,Xr,CT,qT,IT,Zc,ZT,GT,qt,Gc,Vr,WT,NT,Wc,Sr,RT,XT,Nc,Ar,VT,ST,Rc,Yr,AT,YT,Se,Qr,QT,Wo,PT,Xc,OT,DT,Vc,HT,LT,KT,Dn,ek,Hn,tk,Ln,ok,Kn,Pr,nk,ea,ak,ta,Or,sk,oa,ju,No,na,Sc,Dr,rk,Ac,ik,$u,X,Hr,lk,Yc,dk,ck,Lr,pk,il,uk,hk,mk,Kr,fk,ei,gk,_k,yk,Qc,bk,Mk,It,Pc,ti,Tk,kk,Oc,oi,vk,wk,Dc,ni,Jk,Fk,Hc,ai,Uk,Bk,ht,si,zk,Ro,jk,Lc,$k,xk,Kc,Ek,Ck,qk,aa,Ik,sa,Zk,ra,ri,Gk,ia,Wk,la,ii,Nk,da,xu,Xo,ca,ep,li,Rk,tp,Xk,Eu,V,di,Vk,Vo,Sk,op,Ak,Yk,np,Qk,Pk,Ok,ci,Dk,ll,Hk,Lk,Kk,pi,ev,ui,tv,ov,nv,ap,av,sv,Zt,sp,hi,rv,iv,rp,mi,lv,dv,ip,fi,cv,pv,lp,gi,uv,hv,mt,_i,mv,So,fv,dp,gv,_v,cp,yv,bv,Mv,pa,Tv,ua,kv,ha,yi,vv,ma,wv,fa,bi,Jv,ga,Cu;return n=new A({}),ie=new A({}),W=new A({}),Ia=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwTUJhcnRUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBNQmFydFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiUyQyUyMHNyY19sYW5nJTNEJTIyZW5fWFglMjIlMkMlMjB0Z3RfbGFuZyUzRCUyMnJvX1JPJTIyKSUwQWV4YW1wbGVfZW5nbGlzaF9waHJhc2UlMjAlM0QlMjAlMjJVTiUyMENoaWVmJTIwU2F5cyUyMFRoZXJlJTIwSXMlMjBObyUyME1pbGl0YXJ5JTIwU29sdXRpb24lMjBpbiUyMFN5cmlhJTIyJTBBZXhwZWN0ZWRfdHJhbnNsYXRpb25fcm9tYW5pYW4lMjAlM0QlMjAlMjIlQzUlOUVlZnVsJTIwT05VJTIwZGVjbGFyJUM0JTgzJTIwYyVDNCU4MyUyMG51JTIwZXhpc3QlQzQlODMlMjBvJTIwc29sdSVDNSVBM2llJTIwbWlsaXRhciVDNCU4MyUyMCVDMyVBRW4lMjBTaXJpYSUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTJDJTIwdGV4dF90YXJnZXQlM0RleHBlY3RlZF90cmFuc2xhdGlvbl9yb21hbmlhbiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBbW9kZWwlMjAlM0QlMjBNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiklMEElMjMlMjBmb3J3YXJkJTIwcGFzcyUwQW1vZGVsKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartForConditionalGeneration, MBartTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBartTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot;UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_romanian = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_romanian, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model(**inputs)`}}),Ga=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwTUJhcnRUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBNQmFydFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiUyQyUyMHNyY19sYW5nJTNEJTIyZW5fWFglMjIpJTBBYXJ0aWNsZSUyMCUzRCUyMCUyMlVOJTIwQ2hpZWYlMjBTYXlzJTIwVGhlcmUlMjBJcyUyME5vJTIwTWlsaXRhcnklMjBTb2x1dGlvbiUyMGluJTIwU3lyaWElMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoYXJ0aWNsZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBdHJhbnNsYXRlZF90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyUyQyUyMGRlY29kZXJfc3RhcnRfdG9rZW5faWQlM0R0b2tlbml6ZXIubGFuZ19jb2RlX3RvX2lkJTVCJTIycm9fUk8lMjIlNUQpJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZSh0cmFuc2xhdGVkX3Rva2VucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartForConditionalGeneration, MBartTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBartTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>article = <span class="hljs-string">&quot;UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(article, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>translated_tokens = model.generate(**inputs, decoder_start_token_id=tokenizer.lang_code_to_id[<span class="hljs-string">&quot;ro_RO&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(translated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>`}}),Wa=new A({}),Ra=new A({}),Xa=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwTUJhcnQ1MFRva2VuaXplckZhc3QlMEElMEFtb2RlbCUyMCUzRCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLTUwJTIyKSUwQXRva2VuaXplciUyMCUzRCUyME1CYXJ0NTBUb2tlbml6ZXJGYXN0LmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLTUwJTIyJTJDJTIwc3JjX2xhbmclM0QlMjJlbl9YWCUyMiUyQyUyMHRndF9sYW5nJTNEJTIycm9fUk8lMjIpJTBBJTBBc3JjX3RleHQlMjAlM0QlMjAlMjIlMjBVTiUyMENoaWVmJTIwU2F5cyUyMFRoZXJlJTIwSXMlMjBObyUyME1pbGl0YXJ5JTIwU29sdXRpb24lMjBpbiUyMFN5cmlhJTIyJTBBdGd0X3RleHQlMjAlM0QlMjAlMjIlQzUlOUVlZnVsJTIwT05VJTIwZGVjbGFyJUM0JTgzJTIwYyVDNCU4MyUyMG51JTIwZXhpc3QlQzQlODMlMjBvJTIwc29sdSVDNSVBM2llJTIwbWlsaXRhciVDNCU4MyUyMCVDMyVBRW4lMjBTaXJpYSUyMiUwQSUwQW1vZGVsX2lucHV0cyUyMCUzRCUyMHRva2VuaXplcihzcmNfdGV4dCUyQyUyMHRleHRfdGFyZ2V0JTNEdGd0X3RleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW1vZGVsKCoqbW9kZWxfaW5wdXRzKSUyMCUyMCUyMyUyMGZvcndhcmQlMjBwYXNz",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartForConditionalGeneration, MBart50TokenizerFast

model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50&quot;</span>)
tokenizer = MBart50TokenizerFast.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)

src_text = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
tgt_text = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>

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

model(**model_inputs)  <span class="hljs-comment"># forward pass</span>`}}),Sa=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwTUJhcnQ1MFRva2VuaXplckZhc3QlMEElMEFhcnRpY2xlX2hpJTIwJTNEJTIwJTIyJUUwJUE0JUI4JUUwJUE0JTgyJUUwJUE0JUFGJUUwJUE1JTgxJUUwJUE0JTk1JUUwJUE1JThEJUUwJUE0JUE0JTIwJUUwJUE0JUIwJUUwJUE0JUJFJUUwJUE0JUI3JUUwJUE1JThEJUUwJUE0JTlGJUUwJUE1JThEJUUwJUE0JUIwJTIwJUUwJUE0JTk1JUUwJUE1JTg3JTIwJUUwJUE0JUFBJUUwJUE1JThEJUUwJUE0JUIwJUUwJUE0JUFFJUUwJUE1JTgxJUUwJUE0JTk2JTIwJUUwJUE0JTk1JUUwJUE0JUJFJTIwJUUwJUE0JTk1JUUwJUE0JUI5JUUwJUE0JUE4JUUwJUE0JUJFJTIwJUUwJUE0JUI5JUUwJUE1JTg4JTIwJUUwJUE0JTk1JUUwJUE0JUJGJTIwJUUwJUE0JUI4JUUwJUE1JTgwJUUwJUE0JUIwJUUwJUE0JUJGJUUwJUE0JUFGJUUwJUE0JUJFJTIwJUUwJUE0JUFFJUUwJUE1JTg3JUUwJUE0JTgyJTIwJUUwJUE0JTk1JUUwJUE1JThCJUUwJUE0JTg4JTIwJUUwJUE0JUI4JUUwJUE1JTg4JUUwJUE0JUE4JUUwJUE1JThEJUUwJUE0JUFGJTIwJUUwJUE0JUI4JUUwJUE0JUFFJUUwJUE0JUJFJUUwJUE0JUE3JUUwJUE0JUJFJUUwJUE0JUE4JTIwJUUwJUE0JUE4JUUwJUE0JUI5JUUwJUE1JTgwJUUwJUE0JTgyJTIwJUUwJUE0JUI5JUUwJUE1JTg4JTIyJTBBYXJ0aWNsZV9hciUyMCUzRCUyMCUyMiVEOCVBNyVEOSU4NCVEOCVBMyVEOSU4NSVEOSU4QSVEOSU4NiUyMCVEOCVBNyVEOSU4NCVEOCVCOSVEOCVBNyVEOSU4NSUyMCVEOSU4NCVEOSU4NCVEOCVBMyVEOSU4NSVEOSU4NSUyMCVEOCVBNyVEOSU4NCVEOSU4NSVEOCVBQSVEOCVBRCVEOCVBRiVEOCVBOSUyMCVEOSU4QSVEOSU4MiVEOSU4OCVEOSU4NCUyMCVEOCVBNSVEOSU4NiVEOSU4NyUyMCVEOSU4NCVEOCVBNyUyMCVEOSU4QSVEOSU4OCVEOCVBQyVEOCVBRiUyMCVEOCVBRCVEOSU4NCUyMCVEOCVCOSVEOCVCMyVEOSU4MyVEOCVCMSVEOSU4QSUyMCVEOSU4MSVEOSU4QSUyMCVEOCVCMyVEOSU4OCVEOCVCMSVEOSU4QSVEOCVBNy4lMjIlMEElMEFtb2RlbCUyMCUzRCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLTUwLW1hbnktdG8tbWFueS1tbXQlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwTUJhcnQ1MFRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtNTAtbWFueS10by1tYW55LW1tdCUyMiklMEElMEElMjMlMjB0cmFuc2xhdGUlMjBIaW5kaSUyMHRvJTIwRnJlbmNoJTBBdG9rZW5pemVyLnNyY19sYW5nJTIwJTNEJTIwJTIyaGlfSU4lMjIlMEFlbmNvZGVkX2hpJTIwJTNEJTIwdG9rZW5pemVyKGFydGljbGVfaGklMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWdlbmVyYXRlZF90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmVuY29kZWRfaGklMkMlMjBmb3JjZWRfYm9zX3Rva2VuX2lkJTNEdG9rZW5pemVyLmxhbmdfY29kZV90b19pZCU1QiUyMmZyX1hYJTIyJTVEKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX3Rva2VucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQSUyMyUyMCUzRCUzRSUyMCUyMkxlJTIwY2hlZiUyMGRlJTIwbCUyMCdPTlUlMjBhZmZpcm1lJTIwcXUlMjAnaWwlMjBuJTIwJ3klMjBhJTIwcGFzJTIwZGUlMjBzb2x1dGlvbiUyMG1pbGl0YWlyZSUyMGVuJTIwU3lyaWEuJTIyJTBBJTBBJTIzJTIwdHJhbnNsYXRlJTIwQXJhYmljJTIwdG8lMjBFbmdsaXNoJTBBdG9rZW5pemVyLnNyY19sYW5nJTIwJTNEJTIwJTIyYXJfQVIlMjIlMEFlbmNvZGVkX2FyJTIwJTNEJTIwdG9rZW5pemVyKGFydGljbGVfYXIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWdlbmVyYXRlZF90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmVuY29kZWRfYXIlMkMlMjBmb3JjZWRfYm9zX3Rva2VuX2lkJTNEdG9rZW5pemVyLmxhbmdfY29kZV90b19pZCU1QiUyMmVuX1hYJTIyJTVEKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX3Rva2VucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQSUyMyUyMCUzRCUzRSUyMCUyMlRoZSUyMFNlY3JldGFyeS1HZW5lcmFsJTIwb2YlMjB0aGUlMjBVbml0ZWQlMjBOYXRpb25zJTIwc2F5cyUyMHRoZXJlJTIwaXMlMjBubyUyMG1pbGl0YXJ5JTIwc29sdXRpb24lMjBpbiUyMFN5cmlhLiUyMg==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartForConditionalGeneration, MBart50TokenizerFast

article_hi = <span class="hljs-string">&quot;\u0938\u0902\u092F\u0941\u0915\u094D\u0924 \u0930\u093E\u0937\u094D\u091F\u094D\u0930 \u0915\u0947 \u092A\u094D\u0930\u092E\u0941\u0916 \u0915\u093E \u0915\u0939\u0928\u093E \u0939\u0948 \u0915\u093F \u0938\u0940\u0930\u093F\u092F\u093E \u092E\u0947\u0902 \u0915\u094B\u0908 \u0938\u0948\u0928\u094D\u092F \u0938\u092E\u093E\u0927\u093E\u0928 \u0928\u0939\u0940\u0902 \u0939\u0948&quot;</span>
article_ar = <span class="hljs-string">&quot;\u0627\u0644\u0623\u0645\u064A\u0646 \u0627\u0644\u0639\u0627\u0645 \u0644\u0644\u0623\u0645\u0645 \u0627\u0644\u0645\u062A\u062D\u062F\u0629 \u064A\u0642\u0648\u0644 \u0625\u0646\u0647 \u0644\u0627 \u064A\u0648\u062C\u062F \u062D\u0644 \u0639\u0633\u0643\u0631\u064A \u0641\u064A \u0633\u0648\u0631\u064A\u0627.&quot;</span>

model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50-many-to-many-mmt&quot;</span>)
tokenizer = MBart50TokenizerFast.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50-many-to-many-mmt&quot;</span>)

<span class="hljs-comment"># translate Hindi to French</span>
tokenizer.src_lang = <span class="hljs-string">&quot;hi_IN&quot;</span>
encoded_hi = tokenizer(article_hi, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
generated_tokens = model.generate(**encoded_hi, forced_bos_token_id=tokenizer.lang_code_to_id[<span class="hljs-string">&quot;fr_XX&quot;</span>])
tokenizer.batch_decode(generated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-comment"># =&gt; &quot;Le chef de l &#x27;ONU affirme qu &#x27;il n &#x27;y a pas de solution militaire en Syria.&quot;</span>

<span class="hljs-comment"># translate Arabic to English</span>
tokenizer.src_lang = <span class="hljs-string">&quot;ar_AR&quot;</span>
encoded_ar = tokenizer(article_ar, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
generated_tokens = model.generate(**encoded_ar, forced_bos_token_id=tokenizer.lang_code_to_id[<span class="hljs-string">&quot;en_XX&quot;</span>])
tokenizer.batch_decode(generated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-comment"># =&gt; &quot;The Secretary-General of the United Nations says there is no military solution in Syria.&quot;</span>`}}),Aa=new A({}),Ya=new A({}),Qa=new B({props:{name:"class transformers.MBartConfig",anchor:"transformers.MBartConfig",parameters:[{name:"vocab_size",val:" = 50265"},{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:"classifier_dropout",val:" = 0.0"},{name:"scale_embedding",val:" = False"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"forced_eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MBartConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the MBART model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartModel">MBartModel</a> or <a href="/docs/transformers/main/en/model_doc/mbart#transformers.TFMBartModel">TFMBartModel</a>.`,name:"vocab_size"},{anchor:"transformers.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for classifier.`,name:"classifier_dropout"},{anchor:"transformers.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.forced_eos_token_id",description:`<strong>forced_eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#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/main/src/transformers/models/mbart/configuration_mbart.py#L34"}}),Ho=new C({props:{anchor:"transformers.MBartConfig.example",$$slots:{default:[X0]},$$scope:{ctx:F}}}),Oa=new A({}),Da=new B({props:{name:"class transformers.MBartTokenizer",anchor:"transformers.MBartTokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"tokenizer_file",val:" = None"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"additional_special_tokens",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/tokenization_mbart.py#L53"}}),Ko=new C({props:{anchor:"transformers.MBartTokenizer.example",$$slots:{default:[V0]},$$scope:{ctx:F}}}),La=new B({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MBartTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.MBartTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.MBartTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/tokenization_mbart.py#L217",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ns=new A({}),as=new B({props:{name:"class transformers.MBartTokenizerFast",anchor:"transformers.MBartTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"additional_special_tokens",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L63"}}),tn=new C({props:{anchor:"transformers.MBartTokenizerFast.example",$$slots:{default:[S0]},$$scope:{ctx:F}}}),is=new B({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MBartTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.MBartTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.MBartTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L161",returnDescription:`
<p>list of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),us=new B({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MBartTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.MBartTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.MBartTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L190",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),hs=new B({props:{name:"set_src_lang_special_tokens",anchor:"transformers.MBartTokenizerFast.set_src_lang_special_tokens",parameters:[{name:"src_lang",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L245"}}),ms=new B({props:{name:"set_tgt_lang_special_tokens",anchor:"transformers.MBartTokenizerFast.set_tgt_lang_special_tokens",parameters:[{name:"lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L260"}}),fs=new A({}),gs=new B({props:{name:"class transformers.MBart50Tokenizer",anchor:"transformers.MBart50Tokenizer",parameters:[{name:"vocab_file",val:""},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MBart50Tokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.MBart50Tokenizer.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the source language.`,name:"src_lang"},{anchor:"transformers.MBart50Tokenizer.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language.`,name:"tgt_lang"},{anchor:"transformers.MBart50Tokenizer.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.MBart50Tokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.MBart50Tokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.MBart50Tokenizer.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.MBart50Tokenizer.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.MBart50Tokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.MBart50Tokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50.py#L49"}}),rn=new C({props:{anchor:"transformers.MBart50Tokenizer.example",$$slots:{default:[A0]},$$scope:{ctx:F}}}),Ms=new B({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MBart50Tokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.MBart50Tokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.MBart50Tokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50.py#L301",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Js=new B({props:{name:"convert_tokens_to_string",anchor:"transformers.MBart50Tokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50.py#L235"}}),Fs=new B({props:{name:"get_special_tokens_mask",anchor:"transformers.MBart50Tokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.MBart50Tokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.MBart50Tokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.MBart50Tokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50.py#L271",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Bs=new B({props:{name:"set_src_lang_special_tokens",anchor:"transformers.MBart50Tokenizer.set_src_lang_special_tokens",parameters:[{name:"src_lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50.py#L358"}}),zs=new B({props:{name:"set_tgt_lang_special_tokens",anchor:"transformers.MBart50Tokenizer.set_tgt_lang_special_tokens",parameters:[{name:"tgt_lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50.py#L364"}}),js=new A({}),$s=new B({props:{name:"class transformers.MBart50TokenizerFast",anchor:"transformers.MBart50TokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MBart50TokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.MBart50TokenizerFast.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the source language.`,name:"src_lang"},{anchor:"transformers.MBart50TokenizerFast.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language.`,name:"tgt_lang"},{anchor:"transformers.MBart50TokenizerFast.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.MBart50TokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.MBart50TokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.MBart50TokenizerFast.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.MBart50TokenizerFast.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.MBart50TokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L59"}}),hn=new C({props:{anchor:"transformers.MBart50TokenizerFast.example",$$slots:{default:[Y0]},$$scope:{ctx:F}}}),Cs=new B({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MBart50TokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.MBart50TokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.MBart50TokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L170",returnDescription:`
<p>list of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ws=new B({props:{name:"set_src_lang_special_tokens",anchor:"transformers.MBart50TokenizerFast.set_src_lang_special_tokens",parameters:[{name:"src_lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L217"}}),Ns=new B({props:{name:"set_tgt_lang_special_tokens",anchor:"transformers.MBart50TokenizerFast.set_tgt_lang_special_tokens",parameters:[{name:"tgt_lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L232"}}),Rs=new A({}),Xs=new B({props:{name:"class transformers.MBartModel",anchor:"transformers.MBartModel",parameters:[{name:"config",val:": MBartConfig"}],parametersDescription:[{anchor:"transformers.MBartModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1158"}}),Ys=new B({props:{name:"forward",anchor:"transformers.MBartModel.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.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MBartModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartModel.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.MBartModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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>).</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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1187",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_n=new yt({props:{$$slots:{default:[Q0]},$$scope:{ctx:F}}}),yn=new C({props:{anchor:"transformers.MBartModel.forward.example",$$slots:{default:[P0]},$$scope:{ctx:F}}}),Qs=new A({}),Ps=new B({props:{name:"class transformers.MBartForConditionalGeneration",anchor:"transformers.MBartForConditionalGeneration",parameters:[{name:"config",val:": MBartConfig"}],parametersDescription:[{anchor:"transformers.MBartForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1277"}}),Ls=new B({props:{name:"forward",anchor:"transformers.MBartForConditionalGeneration.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.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MBartForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForConditionalGeneration.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.MBartForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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>).</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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MBartForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1317",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mn=new yt({props:{$$slots:{default:[O0]},$$scope:{ctx:F}}}),Tn=new C({props:{anchor:"transformers.MBartForConditionalGeneration.forward.example",$$slots:{default:[D0]},$$scope:{ctx:F}}}),kn=new C({props:{anchor:"transformers.MBartForConditionalGeneration.forward.example-2",$$slots:{default:[H0]},$$scope:{ctx:F}}}),Ks=new A({}),er=new B({props:{name:"class transformers.MBartForQuestionAnswering",anchor:"transformers.MBartForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MBartForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1575"}}),ar=new B({props:{name:"forward",anchor:"transformers.MBartForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": Tensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = 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.MBartForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForQuestionAnswering.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.MBartForQuestionAnswering.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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>).</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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MBartForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<em>sequence_length</em>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.MBartForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<em>sequence_length</em>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1590",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</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 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),wn=new yt({props:{$$slots:{default:[L0]},$$scope:{ctx:F}}}),Jn=new C({props:{anchor:"transformers.MBartForQuestionAnswering.forward.example",$$slots:{default:[K0]},$$scope:{ctx:F}}}),sr=new A({}),rr=new B({props:{name:"class transformers.MBartForSequenceClassification",anchor:"transformers.MBartForSequenceClassification",parameters:[{name:"config",val:": MBartConfig"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MBartForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1446"}}),cr=new B({props:{name:"forward",anchor:"transformers.MBartForSequenceClassification.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.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.List[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.MBartForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForSequenceClassification.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.MBartForSequenceClassification.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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>).</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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MBartForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1462",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput"
>transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</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>label</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput"
>transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Un=new yt({props:{$$slots:{default:[eJ]},$$scope:{ctx:F}}}),Bn=new C({props:{anchor:"transformers.MBartForSequenceClassification.forward.example",$$slots:{default:[tJ]},$$scope:{ctx:F}}}),zn=new C({props:{anchor:"transformers.MBartForSequenceClassification.forward.example-2",$$slots:{default:[oJ]},$$scope:{ctx:F}}}),pr=new A({}),ur=new B({props:{name:"class transformers.MBartForCausalLM",anchor:"transformers.MBartForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1708"}}),hr=new B({props:{name:"forward",anchor:"transformers.MBartForCausalLM.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.MBartForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
provide it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1741",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xn=new C({props:{anchor:"transformers.MBartForCausalLM.forward.example",$$slots:{default:[nJ]},$$scope:{ctx:F}}}),mr=new A({}),fr=new B({props:{name:"class transformers.TFMBartModel",anchor:"transformers.TFMBartModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMBartModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_tf_mbart.py#L1162"}}),Cn=new yt({props:{$$slots:{default:[aJ]},$$scope:{ctx:F}}}),br=new B({props:{name:"call",anchor:"transformers.TFMBartModel.call",parameters:[{name:"input_ids",val:": TFModelInputType = 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[Union[Tuple, 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:"training",val:": Optional[bool] = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMBartModel.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMBartModel.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.TFMBartModel.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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>).</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.TFMBartModel.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.TFMBartModel.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.TFMBartModel.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.TFMBartModel.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.TFMBartModel.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.TFMBartModel.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.TFMBartModel.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.TFMBartModel.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.TFMBartModel.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.TFMBartModel.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.TFMBartModel.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/main/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.TFMBartModel.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/main/src/transformers/models/mbart/modeling_tf_mbart.py#L1174",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),qn=new yt({props:{$$slots:{default:[sJ]},$$scope:{ctx:F}}}),In=new C({props:{anchor:"transformers.TFMBartModel.call.example",$$slots:{default:[rJ]},$$scope:{ctx:F}}}),Mr=new A({}),Tr=new B({props:{name:"class transformers.TFMBartForConditionalGeneration",anchor:"transformers.TFMBartForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMBartForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_tf_mbart.py#L1267"}}),Gn=new yt({props:{$$slots:{default:[iJ]},$$scope:{ctx:F}}}),Jr=new B({props:{name:"call",anchor:"transformers.TFMBartForConditionalGeneration.call",parameters:[{name:"input_ids",val:": TFModelInputType = 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"},{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:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFMBartForConditionalGeneration.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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>).</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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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/main/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.TFMBartForConditionalGeneration.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.TFMBartForConditionalGeneration.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/main/src/transformers/models/mbart/modeling_tf_mbart.py#L1305",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Wn=new yt({props:{$$slots:{default:[lJ]},$$scope:{ctx:F}}}),Nn=new C({props:{anchor:"transformers.TFMBartForConditionalGeneration.call.example",$$slots:{default:[dJ]},$$scope:{ctx:F}}}),Rn=new C({props:{anchor:"transformers.TFMBartForConditionalGeneration.call.example-2",$$slots:{default:[cJ]},$$scope:{ctx:F}}}),Fr=new A({}),Ur=new B({props:{name:"class transformers.FlaxMBartModel",anchor:"transformers.FlaxMBartModel",parameters:[{name:"config",val:": MBartConfig"},{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.FlaxMBartModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMBartModel.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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1276"}}),qr=new B({props:{name:"__call__",anchor:"transformers.FlaxMBartModel.__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.FlaxMBartModel.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartModel.__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.FlaxMBartModel.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartModel.__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.FlaxMBartModel.__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.FlaxMBartModel.__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.FlaxMBartModel.__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.FlaxMBartModel.__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.FlaxMBartModel.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vn=new yt({props:{$$slots:{default:[pJ]},$$scope:{ctx:F}}}),Sn=new C({props:{anchor:"transformers.FlaxMBartModel.__call__.example",$$slots:{default:[uJ]},$$scope:{ctx:F}}}),Ir=new B({props:{name:"encode",anchor:"transformers.FlaxMBartModel.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"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.FlaxMBartModel.encode.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartModel.encode.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.FlaxMBartModel.encode.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.FlaxMBartModel.encode.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.FlaxMBartModel.encode.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.FlaxMBartModel.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) 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 model.</p>
</li>
<li>
<p><strong>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Yn=new C({props:{anchor:"transformers.FlaxMBartModel.encode.example",$$slots:{default:[hJ]},$$scope:{ctx:F}}}),Zr=new B({props:{name:"decode",anchor:"transformers.FlaxMBartModel.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = None"},{name:"past_key_values",val:": dict = 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.FlaxMBartModel.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartModel.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#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.FlaxMBartModel.decode.encoder_attention_mask",description:`<strong>encoder_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:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartModel.decode.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.FlaxMBartModel.decode.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.FlaxMBartModel.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartModel.decode.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.FlaxMBartModel.decode.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.FlaxMBartModel.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) 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 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 optionally if
<code>config.is_encoder_decoder=True</code> 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 optionally if
<code>config.is_encoder_decoder=True</code> 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>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 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> and <code>config.add_cross_attention=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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pn=new C({props:{anchor:"transformers.FlaxMBartModel.decode.example",$$slots:{default:[mJ]},$$scope:{ctx:F}}}),Gr=new A({}),Wr=new B({props:{name:"class transformers.FlaxMBartForConditionalGeneration",anchor:"transformers.FlaxMBartForConditionalGeneration",parameters:[{name:"config",val:": MBartConfig"},{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.FlaxMBartForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMBartForConditionalGeneration.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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1361"}}),Qr=new B({props:{name:"__call__",anchor:"transformers.FlaxMBartForConditionalGeneration.__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.FlaxMBartForConditionalGeneration.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__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.FlaxMBartForConditionalGeneration.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForConditionalGeneration.__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.FlaxMBartForConditionalGeneration.__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.FlaxMBartForConditionalGeneration.__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.FlaxMBartForConditionalGeneration.__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.FlaxMBartForConditionalGeneration.__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.FlaxMBartForConditionalGeneration.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Dn=new yt({props:{$$slots:{default:[fJ]},$$scope:{ctx:F}}}),Hn=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.example",$$slots:{default:[gJ]},$$scope:{ctx:F}}}),Ln=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.example-2",$$slots:{default:[_J]},$$scope:{ctx:F}}}),Pr=new B({props:{name:"encode",anchor:"transformers.FlaxMBartForConditionalGeneration.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"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.FlaxMBartForConditionalGeneration.encode.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.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.FlaxMBartForConditionalGeneration.encode.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.FlaxMBartForConditionalGeneration.encode.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.FlaxMBartForConditionalGeneration.encode.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.FlaxMBartForConditionalGeneration.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) 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 model.</p>
</li>
<li>
<p><strong>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ea=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.example",$$slots:{default:[yJ]},$$scope:{ctx:F}}}),Or=new B({props:{name:"decode",anchor:"transformers.FlaxMBartForConditionalGeneration.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = None"},{name:"past_key_values",val:": dict = 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.FlaxMBartForConditionalGeneration.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForConditionalGeneration.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#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.FlaxMBartForConditionalGeneration.decode.encoder_attention_mask",description:`<strong>encoder_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:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.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.FlaxMBartForConditionalGeneration.decode.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.FlaxMBartForConditionalGeneration.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.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.FlaxMBartForConditionalGeneration.decode.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.FlaxMBartForConditionalGeneration.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1365",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) 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>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 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>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(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>jnp.ndarray</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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oa=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.example",$$slots:{default:[bJ]},$$scope:{ctx:F}}}),Dr=new A({}),Hr=new B({props:{name:"class transformers.FlaxMBartForSequenceClassification",anchor:"transformers.FlaxMBartForSequenceClassification",parameters:[{name:"config",val:": MBartConfig"},{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.FlaxMBartForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMBartForSequenceClassification.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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1674"}}),si=new B({props:{name:"__call__",anchor:"transformers.FlaxMBartForSequenceClassification.__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.FlaxMBartForSequenceClassification.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.__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.FlaxMBartForSequenceClassification.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForSequenceClassification.__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.FlaxMBartForSequenceClassification.__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.FlaxMBartForSequenceClassification.__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.FlaxMBartForSequenceClassification.__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.FlaxMBartForSequenceClassification.__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.FlaxMBartForSequenceClassification.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),aa=new yt({props:{$$slots:{default:[MJ]},$$scope:{ctx:F}}}),sa=new C({props:{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.example",$$slots:{default:[TJ]},$$scope:{ctx:F}}}),ri=new B({props:{name:"encode",anchor:"transformers.FlaxMBartForSequenceClassification.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"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.FlaxMBartForSequenceClassification.encode.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.encode.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.FlaxMBartForSequenceClassification.encode.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.FlaxMBartForSequenceClassification.encode.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.FlaxMBartForSequenceClassification.encode.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.FlaxMBartForSequenceClassification.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) 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 model.</p>
</li>
<li>
<p><strong>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ia=new C({props:{anchor:"transformers.FlaxMBartForSequenceClassification.encode.example",$$slots:{default:[kJ]},$$scope:{ctx:F}}}),ii=new B({props:{name:"decode",anchor:"transformers.FlaxMBartForSequenceClassification.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = None"},{name:"past_key_values",val:": dict = 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.FlaxMBartForSequenceClassification.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForSequenceClassification.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#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.FlaxMBartForSequenceClassification.decode.encoder_attention_mask",description:`<strong>encoder_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:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.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.FlaxMBartForSequenceClassification.decode.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.FlaxMBartForSequenceClassification.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.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.FlaxMBartForSequenceClassification.decode.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.FlaxMBartForSequenceClassification.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) 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 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 optionally if
<code>config.is_encoder_decoder=True</code> 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 optionally if
<code>config.is_encoder_decoder=True</code> 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>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 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> and <code>config.add_cross_attention=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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),da=new C({props:{anchor:"transformers.FlaxMBartForSequenceClassification.decode.example",$$slots:{default:[vJ]},$$scope:{ctx:F}}}),li=new A({}),di=new B({props:{name:"class transformers.FlaxMBartForQuestionAnswering",anchor:"transformers.FlaxMBartForQuestionAnswering",parameters:[{name:"config",val:": MBartConfig"},{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.FlaxMBartForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMBartForQuestionAnswering.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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1761"}}),_i=new B({props:{name:"__call__",anchor:"transformers.FlaxMBartForQuestionAnswering.__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.FlaxMBartForQuestionAnswering.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__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.FlaxMBartForQuestionAnswering.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForQuestionAnswering.__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.FlaxMBartForQuestionAnswering.__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.FlaxMBartForQuestionAnswering.__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.FlaxMBartForQuestionAnswering.__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.FlaxMBartForQuestionAnswering.__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.FlaxMBartForQuestionAnswering.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pa=new yt({props:{$$slots:{default:[wJ]},$$scope:{ctx:F}}}),ua=new C({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.example",$$slots:{default:[JJ]},$$scope:{ctx:F}}}),yi=new B({props:{name:"encode",anchor:"transformers.FlaxMBartForQuestionAnswering.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"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.FlaxMBartForQuestionAnswering.encode.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.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.FlaxMBartForQuestionAnswering.encode.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.FlaxMBartForQuestionAnswering.encode.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.FlaxMBartForQuestionAnswering.encode.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.FlaxMBartForQuestionAnswering.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) 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 model.</p>
</li>
<li>
<p><strong>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ma=new C({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.example",$$slots:{default:[FJ]},$$scope:{ctx:F}}}),bi=new B({props:{name:"decode",anchor:"transformers.FlaxMBartForQuestionAnswering.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = None"},{name:"past_key_values",val:": dict = 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.FlaxMBartForQuestionAnswering.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForQuestionAnswering.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#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.FlaxMBartForQuestionAnswering.decode.encoder_attention_mask",description:`<strong>encoder_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:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.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.FlaxMBartForQuestionAnswering.decode.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.FlaxMBartForQuestionAnswering.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.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.FlaxMBartForQuestionAnswering.decode.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.FlaxMBartForQuestionAnswering.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) 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 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 optionally if
<code>config.is_encoder_decoder=True</code> 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 optionally if
<code>config.is_encoder_decoder=True</code> 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>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 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> and <code>config.add_cross_attention=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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ga=new C({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.example",$$slots:{default:[UJ]},$$scope:{ctx:F}}}),{c(){d=a("meta"),b=c(),f=a("h1"),h=a("a"),y=a("span"),M(n.$$.fragment),u=c(),z=a("span"),bt=i("MBart and MBart-50"),ot=c(),Y=a("div"),Ie=a("a"),he=a("img"),Mt=c(),ee=a("a"),Ze=a("img"),me=c(),re=a("p"),Ye=a("strong"),ke=i("DISCLAIMER:"),Tt=i(" If you see something strange, file a "),ve=a("a"),we=i("Github Issue"),kt=i(` and assign
@patrickvonplaten`),nt=c(),Q=a("h2"),fe=a("a"),Qe=a("span"),M(ie.$$.fragment),Z=c(),G=a("span"),vt=i("Overview of MBart"),ge=c(),_e=a("p"),wt=i("The MBart model was presented in "),H=a("a"),Jt=i("Multilingual Denoising Pre-training for Neural Machine Translation"),Ft=i(` by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov Marjan
Ghazvininejad, Mike Lewis, Luke Zettlemoyer.`),S=c(),Ge=a("p"),Je=i(`According to the abstract, MBART is a sequence-to-sequence denoising auto-encoder pretrained on large-scale monolingual
corpora in many languages using the BART objective. mBART is one of the first methods for pretraining a complete
sequence-to-sequence model by denoising full texts in multiple languages, while previous approaches have focused only
on the encoder, decoder, or reconstructing parts of the text.`),at=c(),le=a("p"),Fe=i("This model was contributed by "),Ue=a("a"),Ut=i("valhalla"),de=i(". The Authors\u2019 code can be found "),Be=a("a"),ze=i("here"),st=c(),L=a("h3"),I=a("a"),Pe=a("span"),M(W.$$.fragment),Bt=c(),Oe=a("span"),U=i("Training of MBart"),$=c(),D=a("p"),De=i(`MBart is a multilingual encoder-decoder (sequence-to-sequence) model primarily intended for translation task. As the
model is multilingual it expects the sequences in a different format. A special language id token is added in both the
source and target text. The source text format is `),zt=a("code"),Ht=i("X [eos, src_lang_code]"),E=i(" where "),jt=a("code"),Lt=i("X"),Kt=i(` is the source text. The
target text format is `),$t=a("code"),eo=i("[tgt_lang_code] X [eos]"),ce=i(". "),pe=a("code"),to=i("bos"),oo=i(" is never used."),ye=c(),te=a("p"),no=i("The regular "),je=a("a"),xt=a("strong"),He=i("call"),ao=i("()"),lm=i(" will encode source text format passed as first argument or with the "),zl=a("code"),dm=i("text"),cm=i(`
keyword, and target text format passed with the `),jl=a("code"),pm=i("text_label"),um=i(" keyword argument."),Wp=c(),Fi=a("ul"),$l=a("li"),hm=i("Supervised training"),Np=c(),M(Ia.$$.fragment),Rp=c(),Ui=a("ul"),Za=a("li"),xl=a("p"),mm=i("Generation"),fm=c(),so=a("p"),gm=i("While generating the target text set the "),El=a("code"),_m=i("decoder_start_token_id"),ym=i(` to the target language id. The following
example shows how to translate English to Romanian using the `),Cl=a("em"),bm=i("facebook/mbart-large-en-ro"),Mm=i(" model."),Xp=c(),M(Ga.$$.fragment),Vp=c(),ro=a("h2"),Yo=a("a"),ql=a("span"),M(Wa.$$.fragment),Tm=c(),Il=a("span"),km=i("Overview of MBart-50"),Sp=c(),Nt=a("p"),vm=i("MBart-50 was introduced in the "),Na=a("a"),wm=i("Multilingual Translation with Extensible Multilingual Pretraining and Finetuning"),Jm=i(` paper by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav
Chaudhary, Jiatao Gu, Angela Fan. MBart-50 is created using the original `),Zl=a("em"),Fm=i("mbart-large-cc25"),Um=i(` checkpoint by extendeding
its embedding layers with randomly initialized vectors for an extra set of 25 language tokens and then pretrained on 50
languages.`),Ap=c(),Bi=a("p"),Bm=i("According to the abstract"),Yp=c(),zi=a("p"),Gl=a("em"),zm=i(`Multilingual translation models can be created through multilingual finetuning. Instead of finetuning on one
direction, a pretrained model is finetuned on many directions at the same time. It demonstrates that pretrained models
can be extended to incorporate additional languages without loss of performance. Multilingual finetuning improves on
average 1 BLEU over the strongest baselines (being either multilingual from scratch or bilingual finetuning) while
improving 9.3 BLEU on average over bilingual baselines from scratch.`),Qp=c(),io=a("h3"),Qo=a("a"),Wl=a("span"),M(Ra.$$.fragment),jm=c(),Nl=a("span"),$m=i("Training of MBart-50"),Pp=c(),rt=a("p"),xm=i(`The text format for MBart-50 is slightly different from mBART. For MBart-50 the language id token is used as a prefix
for both source and target text i.e the text format is `),Rl=a("code"),Em=i("[lang_code] X [eos]"),Cm=i(", where "),Xl=a("code"),qm=i("lang_code"),Im=i(` is source
language id for source text and target language id for target text, with `),Vl=a("code"),Zm=i("X"),Gm=i(` being the source or target text
respectively.`),Op=c(),Po=a("p"),Wm=i("MBart-50 has its own tokenizer "),ji=a("a"),Nm=i("MBart50Tokenizer"),Rm=i("."),Dp=c(),$i=a("ul"),Sl=a("li"),Xm=i("Supervised training"),Hp=c(),M(Xa.$$.fragment),Lp=c(),xi=a("ul"),Va=a("li"),Al=a("p"),Vm=i("Generation"),Sm=c(),$e=a("p"),Am=i("To generate using the mBART-50 multilingual translation models, "),Yl=a("code"),Ym=i("eos_token_id"),Qm=i(` is used as the
`),Ql=a("code"),Pm=i("decoder_start_token_id"),Om=i(` and the target language id is forced as the first generated token. To force the
target language id as the first generated token, pass the `),Pl=a("em"),Dm=i("forced_bos_token_id"),Hm=i(" parameter to the "),Ol=a("em"),Lm=i("generate"),Km=i(` method.
The following example shows how to translate between Hindi to French and Arabic to English using the
`),Dl=a("em"),ef=i("facebook/mbart-50-large-many-to-many"),tf=i(" checkpoint."),Kp=c(),M(Sa.$$.fragment),eu=c(),lo=a("h2"),Oo=a("a"),Hl=a("span"),M(Aa.$$.fragment),of=c(),Ll=a("span"),nf=i("Documentation resources"),tu=c(),be=a("ul"),Kl=a("li"),Ei=a("a"),af=i("Text classification task guide"),sf=c(),ed=a("li"),Ci=a("a"),rf=i("Question answering task guide"),lf=c(),td=a("li"),qi=a("a"),df=i("Causal language modeling task guide"),cf=c(),od=a("li"),Ii=a("a"),pf=i("Masked language modeling task guide"),uf=c(),nd=a("li"),Zi=a("a"),hf=i("Translation task guide"),mf=c(),ad=a("li"),Gi=a("a"),ff=i("Summarization task guide"),ou=c(),co=a("h2"),Do=a("a"),sd=a("span"),M(Ya.$$.fragment),gf=c(),rd=a("span"),_f=i("MBartConfig"),nu=c(),Le=a("div"),M(Qa.$$.fragment),yf=c(),po=a("p"),bf=i("This is the configuration class to store the configuration of a "),Wi=a("a"),Mf=i("MBartModel"),Tf=i(`. It is used to instantiate an MBART
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 MBART
`),Pa=a("a"),kf=i("facebook/mbart-large-cc25"),vf=i(" architecture."),wf=c(),uo=a("p"),Jf=i("Configuration objects inherit from "),Ni=a("a"),Ff=i("PretrainedConfig"),Uf=i(` and can be used to control the model outputs. Read the
documentation from `),Ri=a("a"),Bf=i("PretrainedConfig"),zf=i(" for more information."),jf=c(),M(Ho.$$.fragment),au=c(),ho=a("h2"),Lo=a("a"),id=a("span"),M(Oa.$$.fragment),$f=c(),ld=a("span"),xf=i("MBartTokenizer"),su=c(),ue=a("div"),M(Da.$$.fragment),Ef=c(),dd=a("p"),Cf=i("Construct an MBART tokenizer."),qf=c(),Et=a("p"),If=i("Adapted from "),Xi=a("a"),Zf=i("RobertaTokenizer"),Gf=i(" and "),Vi=a("a"),Wf=i("XLNetTokenizer"),Nf=i(`. Based on
`),Ha=a("a"),Rf=i("SentencePiece"),Xf=i("."),Vf=c(),mo=a("p"),Sf=i("The tokenization method is "),cd=a("code"),Af=i("<tokens> <eos> <language code>"),Yf=i(" for source language documents, and "),pd=a("code"),Qf=i("<language code> <tokens> <eos>"),Pf=i(" for target language documents."),Of=c(),M(Ko.$$.fragment),Df=c(),it=a("div"),M(La.$$.fragment),Hf=c(),Ka=a("p"),Lf=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART sequence has the following format, where `),ud=a("code"),Kf=i("X"),eg=i(" represents the sequence:"),tg=c(),es=a("ul"),ts=a("li"),hd=a("code"),og=i("input_ids"),ng=i(" (for encoder) "),md=a("code"),ag=i("X [eos, src_lang_code]"),sg=c(),os=a("li"),fd=a("code"),rg=i("decoder_input_ids"),ig=i(": (for decoder) "),gd=a("code"),lg=i("X [eos, tgt_lang_code]"),dg=c(),_d=a("p"),cg=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),ru=c(),fo=a("h2"),en=a("a"),yd=a("span"),M(ns.$$.fragment),pg=c(),bd=a("span"),ug=i("MBartTokenizerFast"),iu=c(),N=a("div"),M(as.$$.fragment),hg=c(),go=a("p"),mg=i("Construct a \u201Cfast\u201D MBART tokenizer (backed by HuggingFace\u2019s "),Md=a("em"),fg=i("tokenizers"),gg=i(` library). Based on
`),ss=a("a"),_g=i("BPE"),yg=i("."),bg=c(),rs=a("p"),Mg=i("This tokenizer inherits from "),Si=a("a"),Tg=i("PreTrainedTokenizerFast"),kg=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),vg=c(),_o=a("p"),wg=i("The tokenization method is "),Td=a("code"),Jg=i("<tokens> <eos> <language code>"),Fg=i(" for source language documents, and "),kd=a("code"),Ug=i("<language code> <tokens> <eos>"),Bg=i(" for target language documents."),zg=c(),M(tn.$$.fragment),jg=c(),We=a("div"),M(is.$$.fragment),$g=c(),vd=a("p"),xg=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),Eg=c(),ls=a("p"),Cg=i("An MBART sequence has the following format, where "),wd=a("code"),qg=i("X"),Ig=i(" represents the sequence:"),Zg=c(),ds=a("ul"),cs=a("li"),Jd=a("code"),Gg=i("input_ids"),Wg=i(" (for encoder) "),Fd=a("code"),Ng=i("X [eos, src_lang_code]"),Rg=c(),ps=a("li"),Ud=a("code"),Xg=i("decoder_input_ids"),Vg=i(": (for decoder) "),Bd=a("code"),Sg=i("X [eos, tgt_lang_code]"),Ag=c(),zd=a("p"),Yg=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Qg=c(),on=a("div"),M(us.$$.fragment),Pg=c(),jd=a("p"),Og=i(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. mBART does not
make use of token type ids, therefore a list of zeros is returned.`),Dg=c(),nn=a("div"),M(hs.$$.fragment),Hg=c(),$d=a("p"),Lg=i("Reset the special tokens to the source lang setting. No prefix and suffix=[eos, src_lang_code]."),Kg=c(),an=a("div"),M(ms.$$.fragment),e_=c(),xd=a("p"),t_=i("Reset the special tokens to the target language setting. No prefix and suffix=[eos, tgt_lang_code]."),lu=c(),yo=a("h2"),sn=a("a"),Ed=a("span"),M(fs.$$.fragment),o_=c(),Cd=a("span"),n_=i("MBart50Tokenizer"),du=c(),R=a("div"),M(gs.$$.fragment),a_=c(),_s=a("p"),s_=i("Construct a MBart50 tokenizer. Based on "),ys=a("a"),r_=i("SentencePiece"),i_=i("."),l_=c(),bs=a("p"),d_=i("This tokenizer inherits from "),Ai=a("a"),c_=i("PreTrainedTokenizer"),p_=i(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),u_=c(),M(rn.$$.fragment),h_=c(),lt=a("div"),M(Ms.$$.fragment),m_=c(),Ts=a("p"),f_=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART-50 sequence has the following format, where `),qd=a("code"),g_=i("X"),__=i(" represents the sequence:"),y_=c(),ks=a("ul"),vs=a("li"),Id=a("code"),b_=i("input_ids"),M_=i(" (for encoder) "),Zd=a("code"),T_=i("[src_lang_code] X [eos]"),k_=c(),ws=a("li"),Gd=a("code"),v_=i("labels"),w_=i(": (for decoder) "),Wd=a("code"),J_=i("[tgt_lang_code] X [eos]"),F_=c(),Nd=a("p"),U_=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),B_=c(),ln=a("div"),M(Js.$$.fragment),z_=c(),Rd=a("p"),j_=i("Converts a sequence of tokens (string) in a single string."),$_=c(),dn=a("div"),M(Fs.$$.fragment),x_=c(),Us=a("p"),E_=i(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Xd=a("code"),C_=i("prepare_for_model"),q_=i(" method."),I_=c(),cn=a("div"),M(Bs.$$.fragment),Z_=c(),Vd=a("p"),G_=i("Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),W_=c(),pn=a("div"),M(zs.$$.fragment),N_=c(),Sd=a("p"),R_=i("Reset the special tokens to the target language setting. prefix=[tgt_lang_code] and suffix=[eos]."),cu=c(),bo=a("h2"),un=a("a"),Ad=a("span"),M(js.$$.fragment),X_=c(),Yd=a("span"),V_=i("MBart50TokenizerFast"),pu=c(),K=a("div"),M($s.$$.fragment),S_=c(),Mo=a("p"),A_=i("Construct a \u201Cfast\u201D MBART tokenizer for mBART-50 (backed by HuggingFace\u2019s "),Qd=a("em"),Y_=i("tokenizers"),Q_=i(` library). Based on
`),xs=a("a"),P_=i("BPE"),O_=i("."),D_=c(),Es=a("p"),H_=i("This tokenizer inherits from "),Yi=a("a"),L_=i("PreTrainedTokenizerFast"),K_=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ey=c(),M(hn.$$.fragment),ty=c(),Ne=a("div"),M(Cs.$$.fragment),oy=c(),Pd=a("p"),ny=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),ay=c(),qs=a("p"),sy=i("An MBART-50 sequence has the following format, where "),Od=a("code"),ry=i("X"),iy=i(" represents the sequence:"),ly=c(),Is=a("ul"),Zs=a("li"),Dd=a("code"),dy=i("input_ids"),cy=i(" (for encoder) "),Hd=a("code"),py=i("[src_lang_code] X [eos]"),uy=c(),Gs=a("li"),Ld=a("code"),hy=i("labels"),my=i(": (for decoder) "),Kd=a("code"),fy=i("[tgt_lang_code] X [eos]"),gy=c(),ec=a("p"),_y=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),yy=c(),mn=a("div"),M(Ws.$$.fragment),by=c(),tc=a("p"),My=i("Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),Ty=c(),fn=a("div"),M(Ns.$$.fragment),ky=c(),oc=a("p"),vy=i("Reset the special tokens to the target language setting. prefix=[src_lang_code] and suffix=[eos]."),uu=c(),To=a("h2"),gn=a("a"),nc=a("span"),M(Rs.$$.fragment),wy=c(),ac=a("span"),Jy=i("MBartModel"),hu=c(),Ke=a("div"),M(Xs.$$.fragment),Fy=c(),Vs=a("p"),Uy=i(`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Qi=a("a"),By=i("PreTrainedModel"),zy=i(`. 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.)`),jy=c(),Ss=a("p"),$y=i("This model is also a PyTorch "),As=a("a"),xy=i("torch.nn.Module"),Ey=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Cy=c(),dt=a("div"),M(Ys.$$.fragment),qy=c(),ko=a("p"),Iy=i("The "),Pi=a("a"),Zy=i("MBartModel"),Gy=i(" forward method, overrides the "),sc=a("code"),Wy=i("__call__"),Ny=i(" special method."),Ry=c(),M(_n.$$.fragment),Xy=c(),M(yn.$$.fragment),mu=c(),vo=a("h2"),bn=a("a"),rc=a("span"),M(Qs.$$.fragment),Vy=c(),ic=a("span"),Sy=i("MBartForConditionalGeneration"),fu=c(),et=a("div"),M(Ps.$$.fragment),Ay=c(),Os=a("p"),Yy=i(`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),Oi=a("a"),Qy=i("PreTrainedModel"),Py=i(`. 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.)`),Oy=c(),Ds=a("p"),Dy=i("This model is also a PyTorch "),Hs=a("a"),Hy=i("torch.nn.Module"),Ly=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ky=c(),Re=a("div"),M(Ls.$$.fragment),eb=c(),wo=a("p"),tb=i("The "),Di=a("a"),ob=i("MBartForConditionalGeneration"),nb=i(" forward method, overrides the "),lc=a("code"),ab=i("__call__"),sb=i(" special method."),rb=c(),M(Mn.$$.fragment),ib=c(),M(Tn.$$.fragment),lb=c(),M(kn.$$.fragment),gu=c(),Jo=a("h2"),vn=a("a"),dc=a("span"),M(Ks.$$.fragment),db=c(),cc=a("span"),cb=i("MBartForQuestionAnswering"),_u=c(),xe=a("div"),M(er.$$.fragment),pb=c(),Fo=a("p"),ub=i(`MBART Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),pc=a("code"),hb=i("span start logits"),mb=i(" and "),uc=a("code"),fb=i("span end logits"),gb=i(")."),_b=c(),tr=a("p"),yb=i("This model inherits from "),Hi=a("a"),bb=i("PreTrainedModel"),Mb=i(`. 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.)`),Tb=c(),or=a("p"),kb=i("This model is also a PyTorch "),nr=a("a"),vb=i("torch.nn.Module"),wb=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jb=c(),ct=a("div"),M(ar.$$.fragment),Fb=c(),Uo=a("p"),Ub=i("The "),Li=a("a"),Bb=i("MBartForQuestionAnswering"),zb=i(" forward method, overrides the "),hc=a("code"),jb=i("__call__"),$b=i(" special method."),xb=c(),M(wn.$$.fragment),Eb=c(),M(Jn.$$.fragment),yu=c(),Bo=a("h2"),Fn=a("a"),mc=a("span"),M(sr.$$.fragment),Cb=c(),fc=a("span"),qb=i("MBartForSequenceClassification"),bu=c(),Ee=a("div"),M(rr.$$.fragment),Ib=c(),gc=a("p"),Zb=i(`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),Gb=c(),ir=a("p"),Wb=i("This model inherits from "),Ki=a("a"),Nb=i("PreTrainedModel"),Rb=i(`. 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.)`),Xb=c(),lr=a("p"),Vb=i("This model is also a PyTorch "),dr=a("a"),Sb=i("torch.nn.Module"),Ab=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Yb=c(),Xe=a("div"),M(cr.$$.fragment),Qb=c(),zo=a("p"),Pb=i("The "),el=a("a"),Ob=i("MBartForSequenceClassification"),Db=i(" forward method, overrides the "),_c=a("code"),Hb=i("__call__"),Lb=i(" special method."),Kb=c(),M(Un.$$.fragment),eM=c(),M(Bn.$$.fragment),tM=c(),M(zn.$$.fragment),Mu=c(),jo=a("h2"),jn=a("a"),yc=a("span"),M(pr.$$.fragment),oM=c(),bc=a("span"),nM=i("MBartForCausalLM"),Tu=c(),$o=a("div"),M(ur.$$.fragment),aM=c(),$n=a("div"),M(hr.$$.fragment),sM=c(),M(xn.$$.fragment),ku=c(),xo=a("h2"),En=a("a"),Mc=a("span"),M(mr.$$.fragment),rM=c(),Tc=a("span"),iM=i("TFMBartModel"),vu=c(),Ce=a("div"),M(fr.$$.fragment),lM=c(),gr=a("p"),dM=i(`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),tl=a("a"),cM=i("TFPreTrainedModel"),pM=i(`. 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.)`),uM=c(),_r=a("p"),hM=i("This model is also a "),yr=a("a"),mM=i("tf.keras.Model"),fM=i(` 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.`),gM=c(),M(Cn.$$.fragment),_M=c(),pt=a("div"),M(br.$$.fragment),yM=c(),Eo=a("p"),bM=i("The "),ol=a("a"),MM=i("TFMBartModel"),TM=i(" forward method, overrides the "),kc=a("code"),kM=i("__call__"),vM=i(" special method."),wM=c(),M(qn.$$.fragment),JM=c(),M(In.$$.fragment),wu=c(),Co=a("h2"),Zn=a("a"),vc=a("span"),M(Mr.$$.fragment),FM=c(),wc=a("span"),UM=i("TFMBartForConditionalGeneration"),Ju=c(),qe=a("div"),M(Tr.$$.fragment),BM=c(),kr=a("p"),zM=i(`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),nl=a("a"),jM=i("TFPreTrainedModel"),$M=i(`. 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.)`),xM=c(),vr=a("p"),EM=i("This model is also a "),wr=a("a"),CM=i("tf.keras.Model"),qM=i(` 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.`),IM=c(),M(Gn.$$.fragment),ZM=c(),Ve=a("div"),M(Jr.$$.fragment),GM=c(),qo=a("p"),WM=i("The "),al=a("a"),NM=i("TFMBartForConditionalGeneration"),RM=i(" forward method, overrides the "),Jc=a("code"),XM=i("__call__"),VM=i(" special method."),SM=c(),M(Wn.$$.fragment),AM=c(),M(Nn.$$.fragment),YM=c(),M(Rn.$$.fragment),Fu=c(),Io=a("h2"),Xn=a("a"),Fc=a("span"),M(Fr.$$.fragment),QM=c(),Uc=a("span"),PM=i("FlaxMBartModel"),Uu=c(),P=a("div"),M(Ur.$$.fragment),OM=c(),Br=a("p"),DM=i(`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),sl=a("a"),HM=i("FlaxPreTrainedModel"),LM=i(`. 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.)`),KM=c(),zr=a("p"),eT=i(`This model is also a Flax Linen
`),jr=a("a"),tT=i("flax.nn.Module"),oT=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),nT=c(),Bc=a("p"),aT=i("Finally, this model supports inherent JAX features such as:"),sT=c(),Ct=a("ul"),zc=a("li"),$r=a("a"),rT=i("Just-In-Time (JIT) compilation"),iT=c(),jc=a("li"),xr=a("a"),lT=i("Automatic Differentiation"),dT=c(),$c=a("li"),Er=a("a"),cT=i("Vectorization"),pT=c(),xc=a("li"),Cr=a("a"),uT=i("Parallelization"),hT=c(),ut=a("div"),M(qr.$$.fragment),mT=c(),Zo=a("p"),fT=i("The "),Ec=a("code"),gT=i("FlaxMBartPreTrainedModel"),_T=i(" forward method, overrides the "),Cc=a("code"),yT=i("__call__"),bT=i(" special method."),MT=c(),M(Vn.$$.fragment),TT=c(),M(Sn.$$.fragment),kT=c(),An=a("div"),M(Ir.$$.fragment),vT=c(),M(Yn.$$.fragment),wT=c(),Qn=a("div"),M(Zr.$$.fragment),JT=c(),M(Pn.$$.fragment),Bu=c(),Go=a("h2"),On=a("a"),qc=a("span"),M(Gr.$$.fragment),FT=c(),Ic=a("span"),UT=i("FlaxMBartForConditionalGeneration"),zu=c(),O=a("div"),M(Wr.$$.fragment),BT=c(),Nr=a("p"),zT=i(`The MMBart Model with a language modeling head. Can be used for summarization.
This model inherits from `),rl=a("a"),jT=i("FlaxPreTrainedModel"),$T=i(`. 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.)`),xT=c(),Rr=a("p"),ET=i(`This model is also a Flax Linen
`),Xr=a("a"),CT=i("flax.nn.Module"),qT=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),IT=c(),Zc=a("p"),ZT=i("Finally, this model supports inherent JAX features such as:"),GT=c(),qt=a("ul"),Gc=a("li"),Vr=a("a"),WT=i("Just-In-Time (JIT) compilation"),NT=c(),Wc=a("li"),Sr=a("a"),RT=i("Automatic Differentiation"),XT=c(),Nc=a("li"),Ar=a("a"),VT=i("Vectorization"),ST=c(),Rc=a("li"),Yr=a("a"),AT=i("Parallelization"),YT=c(),Se=a("div"),M(Qr.$$.fragment),QT=c(),Wo=a("p"),PT=i("The "),Xc=a("code"),OT=i("FlaxMBartPreTrainedModel"),DT=i(" forward method, overrides the "),Vc=a("code"),HT=i("__call__"),LT=i(" special method."),KT=c(),M(Dn.$$.fragment),ek=c(),M(Hn.$$.fragment),tk=c(),M(Ln.$$.fragment),ok=c(),Kn=a("div"),M(Pr.$$.fragment),nk=c(),M(ea.$$.fragment),ak=c(),ta=a("div"),M(Or.$$.fragment),sk=c(),M(oa.$$.fragment),ju=c(),No=a("h2"),na=a("a"),Sc=a("span"),M(Dr.$$.fragment),rk=c(),Ac=a("span"),ik=i("FlaxMBartForSequenceClassification"),$u=c(),X=a("div"),M(Hr.$$.fragment),lk=c(),Yc=a("p"),dk=i(`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),ck=c(),Lr=a("p"),pk=i("This model inherits from "),il=a("a"),uk=i("FlaxPreTrainedModel"),hk=i(`. 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.)`),mk=c(),Kr=a("p"),fk=i(`This model is also a Flax Linen
`),ei=a("a"),gk=i("flax.nn.Module"),_k=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),yk=c(),Qc=a("p"),bk=i("Finally, this model supports inherent JAX features such as:"),Mk=c(),It=a("ul"),Pc=a("li"),ti=a("a"),Tk=i("Just-In-Time (JIT) compilation"),kk=c(),Oc=a("li"),oi=a("a"),vk=i("Automatic Differentiation"),wk=c(),Dc=a("li"),ni=a("a"),Jk=i("Vectorization"),Fk=c(),Hc=a("li"),ai=a("a"),Uk=i("Parallelization"),Bk=c(),ht=a("div"),M(si.$$.fragment),zk=c(),Ro=a("p"),jk=i("The "),Lc=a("code"),$k=i("FlaxMBartPreTrainedModel"),xk=i(" forward method, overrides the "),Kc=a("code"),Ek=i("__call__"),Ck=i(" special method."),qk=c(),M(aa.$$.fragment),Ik=c(),M(sa.$$.fragment),Zk=c(),ra=a("div"),M(ri.$$.fragment),Gk=c(),M(ia.$$.fragment),Wk=c(),la=a("div"),M(ii.$$.fragment),Nk=c(),M(da.$$.fragment),xu=c(),Xo=a("h2"),ca=a("a"),ep=a("span"),M(li.$$.fragment),Rk=c(),tp=a("span"),Xk=i("FlaxMBartForQuestionAnswering"),Eu=c(),V=a("div"),M(di.$$.fragment),Vk=c(),Vo=a("p"),Sk=i(`MBart Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),op=a("code"),Ak=i("span start logits"),Yk=i(" and "),np=a("code"),Qk=i("span end logits"),Pk=i(")."),Ok=c(),ci=a("p"),Dk=i("This model inherits from "),ll=a("a"),Hk=i("FlaxPreTrainedModel"),Lk=i(`. 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.)`),Kk=c(),pi=a("p"),ev=i(`This model is also a Flax Linen
`),ui=a("a"),tv=i("flax.nn.Module"),ov=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),nv=c(),ap=a("p"),av=i("Finally, this model supports inherent JAX features such as:"),sv=c(),Zt=a("ul"),sp=a("li"),hi=a("a"),rv=i("Just-In-Time (JIT) compilation"),iv=c(),rp=a("li"),mi=a("a"),lv=i("Automatic Differentiation"),dv=c(),ip=a("li"),fi=a("a"),cv=i("Vectorization"),pv=c(),lp=a("li"),gi=a("a"),uv=i("Parallelization"),hv=c(),mt=a("div"),M(_i.$$.fragment),mv=c(),So=a("p"),fv=i("The "),dp=a("code"),gv=i("FlaxMBartPreTrainedModel"),_v=i(" forward method, overrides the "),cp=a("code"),yv=i("__call__"),bv=i(" special method."),Mv=c(),M(pa.$$.fragment),Tv=c(),M(ua.$$.fragment),kv=c(),ha=a("div"),M(yi.$$.fragment),vv=c(),M(ma.$$.fragment),wv=c(),fa=a("div"),M(bi.$$.fragment),Jv=c(),M(ga.$$.fragment),this.h()},l(o){const g=N0('[data-svelte="svelte-1phssyn"]',document.head);d=s(g,"META",{name:!0,content:!0}),g.forEach(t),b=p(o),f=s(o,"H1",{class:!0});var Mi=r(f);h=s(Mi,"A",{id:!0,class:!0,href:!0});var pp=r(h);y=s(pp,"SPAN",{});var up=r(y);T(n.$$.fragment,up),up.forEach(t),pp.forEach(t),u=p(Mi),z=s(Mi,"SPAN",{});var hp=r(z);bt=l(hp,"MBart and MBart-50"),hp.forEach(t),Mi.forEach(t),ot=p(o),Y=s(o,"DIV",{class:!0});var Ti=r(Y);Ie=s(Ti,"A",{href:!0});var mp=r(Ie);he=s(mp,"IMG",{alt:!0,src:!0}),mp.forEach(t),Mt=p(Ti),ee=s(Ti,"A",{href:!0});var fp=r(ee);Ze=s(fp,"IMG",{alt:!0,src:!0}),fp.forEach(t),Ti.forEach(t),me=p(o),re=s(o,"P",{});var _a=r(re);Ye=s(_a,"STRONG",{});var gp=r(Ye);ke=l(gp,"DISCLAIMER:"),gp.forEach(t),Tt=l(_a," If you see something strange, file a "),ve=s(_a,"A",{href:!0,rel:!0});var _p=r(ve);we=l(_p,"Github Issue"),_p.forEach(t),kt=l(_a,` and assign
@patrickvonplaten`),_a.forEach(t),nt=p(o),Q=s(o,"H2",{class:!0});var ki=r(Q);fe=s(ki,"A",{id:!0,class:!0,href:!0});var yp=r(fe);Qe=s(yp,"SPAN",{});var bp=r(Qe);T(ie.$$.fragment,bp),bp.forEach(t),yp.forEach(t),Z=p(ki),G=s(ki,"SPAN",{});var Mp=r(G);vt=l(Mp,"Overview of MBart"),Mp.forEach(t),ki.forEach(t),ge=p(o),_e=s(o,"P",{});var vi=r(_e);wt=l(vi,"The MBart model was presented in "),H=s(vi,"A",{href:!0,rel:!0});var Tp=r(H);Jt=l(Tp,"Multilingual Denoising Pre-training for Neural Machine Translation"),Tp.forEach(t),Ft=l(vi,` by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov Marjan
Ghazvininejad, Mike Lewis, Luke Zettlemoyer.`),vi.forEach(t),S=p(o),Ge=s(o,"P",{});var kp=r(Ge);Je=l(kp,`According to the abstract, MBART is a sequence-to-sequence denoising auto-encoder pretrained on large-scale monolingual
corpora in many languages using the BART objective. mBART is one of the first methods for pretraining a complete
sequence-to-sequence model by denoising full texts in multiple languages, while previous approaches have focused only
on the encoder, decoder, or reconstructing parts of the text.`),kp.forEach(t),at=p(o),le=s(o,"P",{});var ya=r(le);Fe=l(ya,"This model was contributed by "),Ue=s(ya,"A",{href:!0,rel:!0});var vp=r(Ue);Ut=l(vp,"valhalla"),vp.forEach(t),de=l(ya,". The Authors\u2019 code can be found "),Be=s(ya,"A",{href:!0,rel:!0});var wp=r(Be);ze=l(wp,"here"),wp.forEach(t),ya.forEach(t),st=p(o),L=s(o,"H3",{class:!0});var wi=r(L);I=s(wi,"A",{id:!0,class:!0,href:!0});var Jp=r(I);Pe=s(Jp,"SPAN",{});var Fp=r(Pe);T(W.$$.fragment,Fp),Fp.forEach(t),Jp.forEach(t),Bt=p(wi),Oe=s(wi,"SPAN",{});var Up=r(Oe);U=l(Up,"Training of MBart"),Up.forEach(t),wi.forEach(t),$=p(o),D=s(o,"P",{});var tt=r(D);De=l(tt,`MBart is a multilingual encoder-decoder (sequence-to-sequence) model primarily intended for translation task. As the
model is multilingual it expects the sequences in a different format. A special language id token is added in both the
source and target text. The source text format is `),zt=s(tt,"CODE",{});var Bp=r(zt);Ht=l(Bp,"X [eos, src_lang_code]"),Bp.forEach(t),E=l(tt," where "),jt=s(tt,"CODE",{});var zp=r(jt);Lt=l(zp,"X"),zp.forEach(t),Kt=l(tt,` is the source text. The
target text format is `),$t=s(tt,"CODE",{});var jp=r($t);eo=l(jp,"[tgt_lang_code] X [eos]"),jp.forEach(t),ce=l(tt,". "),pe=s(tt,"CODE",{});var $p=r(pe);to=l($p,"bos"),$p.forEach(t),oo=l(tt," is never used."),tt.forEach(t),ye=p(o),te=s(o,"P",{});var Gt=r(te);no=l(Gt,"The regular "),je=s(Gt,"A",{href:!0});var dl=r(je);xt=s(dl,"STRONG",{});var xp=r(xt);He=l(xp,"call"),xp.forEach(t),ao=l(dl,"()"),dl.forEach(t),lm=l(Gt," will encode source text format passed as first argument or with the "),zl=s(Gt,"CODE",{});var Ep=r(zl);dm=l(Ep,"text"),Ep.forEach(t),cm=l(Gt,`
keyword, and target text format passed with the `),jl=s(Gt,"CODE",{});var Cp=r(jl);pm=l(Cp,"text_label"),Cp.forEach(t),um=l(Gt," keyword argument."),Gt.forEach(t),Wp=p(o),Fi=s(o,"UL",{});var qp=r(Fi);$l=s(qp,"LI",{});var Ip=r($l);hm=l(Ip,"Supervised training"),Ip.forEach(t),qp.forEach(t),Np=p(o),T(Ia.$$.fragment,o),Rp=p(o),Ui=s(o,"UL",{});var Zp=r(Ui);Za=s(Zp,"LI",{});var Ji=r(Za);xl=s(Ji,"P",{});var Gp=r(xl);mm=l(Gp,"Generation"),Gp.forEach(t),fm=p(Ji),so=s(Ji,"P",{});var Ao=r(so);gm=l(Ao,"While generating the target text set the "),El=s(Ao,"CODE",{});var Fv=r(El);_m=l(Fv,"decoder_start_token_id"),Fv.forEach(t),ym=l(Ao,` to the target language id. The following
example shows how to translate English to Romanian using the `),Cl=s(Ao,"EM",{});var Uv=r(Cl);bm=l(Uv,"facebook/mbart-large-en-ro"),Uv.forEach(t),Mm=l(Ao," model."),Ao.forEach(t),Ji.forEach(t),Zp.forEach(t),Xp=p(o),T(Ga.$$.fragment,o),Vp=p(o),ro=s(o,"H2",{class:!0});var qu=r(ro);Yo=s(qu,"A",{id:!0,class:!0,href:!0});var Bv=r(Yo);ql=s(Bv,"SPAN",{});var zv=r(ql);T(Wa.$$.fragment,zv),zv.forEach(t),Bv.forEach(t),Tm=p(qu),Il=s(qu,"SPAN",{});var jv=r(Il);km=l(jv,"Overview of MBart-50"),jv.forEach(t),qu.forEach(t),Sp=p(o),Nt=s(o,"P",{});var cl=r(Nt);vm=l(cl,"MBart-50 was introduced in the "),Na=s(cl,"A",{href:!0,rel:!0});var $v=r(Na);wm=l($v,"Multilingual Translation with Extensible Multilingual Pretraining and Finetuning"),$v.forEach(t),Jm=l(cl,` paper by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav
Chaudhary, Jiatao Gu, Angela Fan. MBart-50 is created using the original `),Zl=s(cl,"EM",{});var xv=r(Zl);Fm=l(xv,"mbart-large-cc25"),xv.forEach(t),Um=l(cl,` checkpoint by extendeding
its embedding layers with randomly initialized vectors for an extra set of 25 language tokens and then pretrained on 50
languages.`),cl.forEach(t),Ap=p(o),Bi=s(o,"P",{});var Ev=r(Bi);Bm=l(Ev,"According to the abstract"),Ev.forEach(t),Yp=p(o),zi=s(o,"P",{});var Cv=r(zi);Gl=s(Cv,"EM",{});var qv=r(Gl);zm=l(qv,`Multilingual translation models can be created through multilingual finetuning. Instead of finetuning on one
direction, a pretrained model is finetuned on many directions at the same time. It demonstrates that pretrained models
can be extended to incorporate additional languages without loss of performance. Multilingual finetuning improves on
average 1 BLEU over the strongest baselines (being either multilingual from scratch or bilingual finetuning) while
improving 9.3 BLEU on average over bilingual baselines from scratch.`),qv.forEach(t),Cv.forEach(t),Qp=p(o),io=s(o,"H3",{class:!0});var Iu=r(io);Qo=s(Iu,"A",{id:!0,class:!0,href:!0});var Iv=r(Qo);Wl=s(Iv,"SPAN",{});var Zv=r(Wl);T(Ra.$$.fragment,Zv),Zv.forEach(t),Iv.forEach(t),jm=p(Iu),Nl=s(Iu,"SPAN",{});var Gv=r(Nl);$m=l(Gv,"Training of MBart-50"),Gv.forEach(t),Iu.forEach(t),Pp=p(o),rt=s(o,"P",{});var ba=r(rt);xm=l(ba,`The text format for MBart-50 is slightly different from mBART. For MBart-50 the language id token is used as a prefix
for both source and target text i.e the text format is `),Rl=s(ba,"CODE",{});var Wv=r(Rl);Em=l(Wv,"[lang_code] X [eos]"),Wv.forEach(t),Cm=l(ba,", where "),Xl=s(ba,"CODE",{});var Nv=r(Xl);qm=l(Nv,"lang_code"),Nv.forEach(t),Im=l(ba,` is source
language id for source text and target language id for target text, with `),Vl=s(ba,"CODE",{});var Rv=r(Vl);Zm=l(Rv,"X"),Rv.forEach(t),Gm=l(ba,` being the source or target text
respectively.`),ba.forEach(t),Op=p(o),Po=s(o,"P",{});var Zu=r(Po);Wm=l(Zu,"MBart-50 has its own tokenizer "),ji=s(Zu,"A",{href:!0});var Xv=r(ji);Nm=l(Xv,"MBart50Tokenizer"),Xv.forEach(t),Rm=l(Zu,"."),Zu.forEach(t),Dp=p(o),$i=s(o,"UL",{});var Vv=r($i);Sl=s(Vv,"LI",{});var Sv=r(Sl);Xm=l(Sv,"Supervised training"),Sv.forEach(t),Vv.forEach(t),Hp=p(o),T(Xa.$$.fragment,o),Lp=p(o),xi=s(o,"UL",{});var Av=r(xi);Va=s(Av,"LI",{});var Gu=r(Va);Al=s(Gu,"P",{});var Yv=r(Al);Vm=l(Yv,"Generation"),Yv.forEach(t),Sm=p(Gu),$e=s(Gu,"P",{});var ft=r($e);Am=l(ft,"To generate using the mBART-50 multilingual translation models, "),Yl=s(ft,"CODE",{});var Qv=r(Yl);Ym=l(Qv,"eos_token_id"),Qv.forEach(t),Qm=l(ft,` is used as the
`),Ql=s(ft,"CODE",{});var Pv=r(Ql);Pm=l(Pv,"decoder_start_token_id"),Pv.forEach(t),Om=l(ft,` and the target language id is forced as the first generated token. To force the
target language id as the first generated token, pass the `),Pl=s(ft,"EM",{});var Ov=r(Pl);Dm=l(Ov,"forced_bos_token_id"),Ov.forEach(t),Hm=l(ft," parameter to the "),Ol=s(ft,"EM",{});var Dv=r(Ol);Lm=l(Dv,"generate"),Dv.forEach(t),Km=l(ft,` method.
The following example shows how to translate between Hindi to French and Arabic to English using the
`),Dl=s(ft,"EM",{});var Hv=r(Dl);ef=l(Hv,"facebook/mbart-50-large-many-to-many"),Hv.forEach(t),tf=l(ft," checkpoint."),ft.forEach(t),Gu.forEach(t),Av.forEach(t),Kp=p(o),T(Sa.$$.fragment,o),eu=p(o),lo=s(o,"H2",{class:!0});var Wu=r(lo);Oo=s(Wu,"A",{id:!0,class:!0,href:!0});var Lv=r(Oo);Hl=s(Lv,"SPAN",{});var Kv=r(Hl);T(Aa.$$.fragment,Kv),Kv.forEach(t),Lv.forEach(t),of=p(Wu),Ll=s(Wu,"SPAN",{});var ew=r(Ll);nf=l(ew,"Documentation resources"),ew.forEach(t),Wu.forEach(t),tu=p(o),be=s(o,"UL",{});var gt=r(be);Kl=s(gt,"LI",{});var tw=r(Kl);Ei=s(tw,"A",{href:!0});var ow=r(Ei);af=l(ow,"Text classification task guide"),ow.forEach(t),tw.forEach(t),sf=p(gt),ed=s(gt,"LI",{});var nw=r(ed);Ci=s(nw,"A",{href:!0});var aw=r(Ci);rf=l(aw,"Question answering task guide"),aw.forEach(t),nw.forEach(t),lf=p(gt),td=s(gt,"LI",{});var sw=r(td);qi=s(sw,"A",{href:!0});var rw=r(qi);df=l(rw,"Causal language modeling task guide"),rw.forEach(t),sw.forEach(t),cf=p(gt),od=s(gt,"LI",{});var iw=r(od);Ii=s(iw,"A",{href:!0});var lw=r(Ii);pf=l(lw,"Masked language modeling task guide"),lw.forEach(t),iw.forEach(t),uf=p(gt),nd=s(gt,"LI",{});var dw=r(nd);Zi=s(dw,"A",{href:!0});var cw=r(Zi);hf=l(cw,"Translation task guide"),cw.forEach(t),dw.forEach(t),mf=p(gt),ad=s(gt,"LI",{});var pw=r(ad);Gi=s(pw,"A",{href:!0});var uw=r(Gi);ff=l(uw,"Summarization task guide"),uw.forEach(t),pw.forEach(t),gt.forEach(t),ou=p(o),co=s(o,"H2",{class:!0});var Nu=r(co);Do=s(Nu,"A",{id:!0,class:!0,href:!0});var hw=r(Do);sd=s(hw,"SPAN",{});var mw=r(sd);T(Ya.$$.fragment,mw),mw.forEach(t),hw.forEach(t),gf=p(Nu),rd=s(Nu,"SPAN",{});var fw=r(rd);_f=l(fw,"MBartConfig"),fw.forEach(t),Nu.forEach(t),nu=p(o),Le=s(o,"DIV",{class:!0});var Ma=r(Le);T(Qa.$$.fragment,Ma),yf=p(Ma),po=s(Ma,"P",{});var pl=r(po);bf=l(pl,"This is the configuration class to store the configuration of a "),Wi=s(pl,"A",{href:!0});var gw=r(Wi);Mf=l(gw,"MBartModel"),gw.forEach(t),Tf=l(pl,`. It is used to instantiate an MBART
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 MBART
`),Pa=s(pl,"A",{href:!0,rel:!0});var _w=r(Pa);kf=l(_w,"facebook/mbart-large-cc25"),_w.forEach(t),vf=l(pl," architecture."),pl.forEach(t),wf=p(Ma),uo=s(Ma,"P",{});var ul=r(uo);Jf=l(ul,"Configuration objects inherit from "),Ni=s(ul,"A",{href:!0});var yw=r(Ni);Ff=l(yw,"PretrainedConfig"),yw.forEach(t),Uf=l(ul,` and can be used to control the model outputs. Read the
documentation from `),Ri=s(ul,"A",{href:!0});var bw=r(Ri);Bf=l(bw,"PretrainedConfig"),bw.forEach(t),zf=l(ul," for more information."),ul.forEach(t),jf=p(Ma),T(Ho.$$.fragment,Ma),Ma.forEach(t),au=p(o),ho=s(o,"H2",{class:!0});var Ru=r(ho);Lo=s(Ru,"A",{id:!0,class:!0,href:!0});var Mw=r(Lo);id=s(Mw,"SPAN",{});var Tw=r(id);T(Oa.$$.fragment,Tw),Tw.forEach(t),Mw.forEach(t),$f=p(Ru),ld=s(Ru,"SPAN",{});var kw=r(ld);xf=l(kw,"MBartTokenizer"),kw.forEach(t),Ru.forEach(t),su=p(o),ue=s(o,"DIV",{class:!0});var _t=r(ue);T(Da.$$.fragment,_t),Ef=p(_t),dd=s(_t,"P",{});var vw=r(dd);Cf=l(vw,"Construct an MBART tokenizer."),vw.forEach(t),qf=p(_t),Et=s(_t,"P",{});var Ta=r(Et);If=l(Ta,"Adapted from "),Xi=s(Ta,"A",{href:!0});var ww=r(Xi);Zf=l(ww,"RobertaTokenizer"),ww.forEach(t),Gf=l(Ta," and "),Vi=s(Ta,"A",{href:!0});var Jw=r(Vi);Wf=l(Jw,"XLNetTokenizer"),Jw.forEach(t),Nf=l(Ta,`. Based on
`),Ha=s(Ta,"A",{href:!0,rel:!0});var Fw=r(Ha);Rf=l(Fw,"SentencePiece"),Fw.forEach(t),Xf=l(Ta,"."),Ta.forEach(t),Vf=p(_t),mo=s(_t,"P",{});var hl=r(mo);Sf=l(hl,"The tokenization method is "),cd=s(hl,"CODE",{});var Uw=r(cd);Af=l(Uw,"<tokens> <eos> <language code>"),Uw.forEach(t),Yf=l(hl," for source language documents, and "),pd=s(hl,"CODE",{});var Bw=r(pd);Qf=l(Bw,"<language code> <tokens> <eos>"),Bw.forEach(t),Pf=l(hl," for target language documents."),hl.forEach(t),Of=p(_t),T(Ko.$$.fragment,_t),Df=p(_t),it=s(_t,"DIV",{class:!0});var ka=r(it);T(La.$$.fragment,ka),Hf=p(ka),Ka=s(ka,"P",{});var Xu=r(Ka);Lf=l(Xu,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART sequence has the following format, where `),ud=s(Xu,"CODE",{});var zw=r(ud);Kf=l(zw,"X"),zw.forEach(t),eg=l(Xu," represents the sequence:"),Xu.forEach(t),tg=p(ka),es=s(ka,"UL",{});var Vu=r(es);ts=s(Vu,"LI",{});var Su=r(ts);hd=s(Su,"CODE",{});var jw=r(hd);og=l(jw,"input_ids"),jw.forEach(t),ng=l(Su," (for encoder) "),md=s(Su,"CODE",{});var $w=r(md);ag=l($w,"X [eos, src_lang_code]"),$w.forEach(t),Su.forEach(t),sg=p(Vu),os=s(Vu,"LI",{});var Au=r(os);fd=s(Au,"CODE",{});var xw=r(fd);rg=l(xw,"decoder_input_ids"),xw.forEach(t),ig=l(Au,": (for decoder) "),gd=s(Au,"CODE",{});var Ew=r(gd);lg=l(Ew,"X [eos, tgt_lang_code]"),Ew.forEach(t),Au.forEach(t),Vu.forEach(t),dg=p(ka),_d=s(ka,"P",{});var Cw=r(_d);cg=l(Cw,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Cw.forEach(t),ka.forEach(t),_t.forEach(t),ru=p(o),fo=s(o,"H2",{class:!0});var Yu=r(fo);en=s(Yu,"A",{id:!0,class:!0,href:!0});var qw=r(en);yd=s(qw,"SPAN",{});var Iw=r(yd);T(ns.$$.fragment,Iw),Iw.forEach(t),qw.forEach(t),pg=p(Yu),bd=s(Yu,"SPAN",{});var Zw=r(bd);ug=l(Zw,"MBartTokenizerFast"),Zw.forEach(t),Yu.forEach(t),iu=p(o),N=s(o,"DIV",{class:!0});var oe=r(N);T(as.$$.fragment,oe),hg=p(oe),go=s(oe,"P",{});var ml=r(go);mg=l(ml,"Construct a \u201Cfast\u201D MBART tokenizer (backed by HuggingFace\u2019s "),Md=s(ml,"EM",{});var Gw=r(Md);fg=l(Gw,"tokenizers"),Gw.forEach(t),gg=l(ml,` library). Based on
`),ss=s(ml,"A",{href:!0,rel:!0});var Ww=r(ss);_g=l(Ww,"BPE"),Ww.forEach(t),yg=l(ml,"."),ml.forEach(t),bg=p(oe),rs=s(oe,"P",{});var Qu=r(rs);Mg=l(Qu,"This tokenizer inherits from "),Si=s(Qu,"A",{href:!0});var Nw=r(Si);Tg=l(Nw,"PreTrainedTokenizerFast"),Nw.forEach(t),kg=l(Qu,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Qu.forEach(t),vg=p(oe),_o=s(oe,"P",{});var fl=r(_o);wg=l(fl,"The tokenization method is "),Td=s(fl,"CODE",{});var Rw=r(Td);Jg=l(Rw,"<tokens> <eos> <language code>"),Rw.forEach(t),Fg=l(fl," for source language documents, and "),kd=s(fl,"CODE",{});var Xw=r(kd);Ug=l(Xw,"<language code> <tokens> <eos>"),Xw.forEach(t),Bg=l(fl," for target language documents."),fl.forEach(t),zg=p(oe),T(tn.$$.fragment,oe),jg=p(oe),We=s(oe,"DIV",{class:!0});var Rt=r(We);T(is.$$.fragment,Rt),$g=p(Rt),vd=s(Rt,"P",{});var Vw=r(vd);xg=l(Vw,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),Vw.forEach(t),Eg=p(Rt),ls=s(Rt,"P",{});var Pu=r(ls);Cg=l(Pu,"An MBART sequence has the following format, where "),wd=s(Pu,"CODE",{});var Sw=r(wd);qg=l(Sw,"X"),Sw.forEach(t),Ig=l(Pu," represents the sequence:"),Pu.forEach(t),Zg=p(Rt),ds=s(Rt,"UL",{});var Ou=r(ds);cs=s(Ou,"LI",{});var Du=r(cs);Jd=s(Du,"CODE",{});var Aw=r(Jd);Gg=l(Aw,"input_ids"),Aw.forEach(t),Wg=l(Du," (for encoder) "),Fd=s(Du,"CODE",{});var Yw=r(Fd);Ng=l(Yw,"X [eos, src_lang_code]"),Yw.forEach(t),Du.forEach(t),Rg=p(Ou),ps=s(Ou,"LI",{});var Hu=r(ps);Ud=s(Hu,"CODE",{});var Qw=r(Ud);Xg=l(Qw,"decoder_input_ids"),Qw.forEach(t),Vg=l(Hu,": (for decoder) "),Bd=s(Hu,"CODE",{});var Pw=r(Bd);Sg=l(Pw,"X [eos, tgt_lang_code]"),Pw.forEach(t),Hu.forEach(t),Ou.forEach(t),Ag=p(Rt),zd=s(Rt,"P",{});var Ow=r(zd);Yg=l(Ow,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Ow.forEach(t),Rt.forEach(t),Qg=p(oe),on=s(oe,"DIV",{class:!0});var Lu=r(on);T(us.$$.fragment,Lu),Pg=p(Lu),jd=s(Lu,"P",{});var Dw=r(jd);Og=l(Dw,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. mBART does not
make use of token type ids, therefore a list of zeros is returned.`),Dw.forEach(t),Lu.forEach(t),Dg=p(oe),nn=s(oe,"DIV",{class:!0});var Ku=r(nn);T(hs.$$.fragment,Ku),Hg=p(Ku),$d=s(Ku,"P",{});var Hw=r($d);Lg=l(Hw,"Reset the special tokens to the source lang setting. No prefix and suffix=[eos, src_lang_code]."),Hw.forEach(t),Ku.forEach(t),Kg=p(oe),an=s(oe,"DIV",{class:!0});var eh=r(an);T(ms.$$.fragment,eh),e_=p(eh),xd=s(eh,"P",{});var Lw=r(xd);t_=l(Lw,"Reset the special tokens to the target language setting. No prefix and suffix=[eos, tgt_lang_code]."),Lw.forEach(t),eh.forEach(t),oe.forEach(t),lu=p(o),yo=s(o,"H2",{class:!0});var th=r(yo);sn=s(th,"A",{id:!0,class:!0,href:!0});var Kw=r(sn);Ed=s(Kw,"SPAN",{});var e2=r(Ed);T(fs.$$.fragment,e2),e2.forEach(t),Kw.forEach(t),o_=p(th),Cd=s(th,"SPAN",{});var t2=r(Cd);n_=l(t2,"MBart50Tokenizer"),t2.forEach(t),th.forEach(t),du=p(o),R=s(o,"DIV",{class:!0});var ne=r(R);T(gs.$$.fragment,ne),a_=p(ne),_s=s(ne,"P",{});var oh=r(_s);s_=l(oh,"Construct a MBart50 tokenizer. Based on "),ys=s(oh,"A",{href:!0,rel:!0});var o2=r(ys);r_=l(o2,"SentencePiece"),o2.forEach(t),i_=l(oh,"."),oh.forEach(t),l_=p(ne),bs=s(ne,"P",{});var nh=r(bs);d_=l(nh,"This tokenizer inherits from "),Ai=s(nh,"A",{href:!0});var n2=r(Ai);c_=l(n2,"PreTrainedTokenizer"),n2.forEach(t),p_=l(nh,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),nh.forEach(t),u_=p(ne),T(rn.$$.fragment,ne),h_=p(ne),lt=s(ne,"DIV",{class:!0});var va=r(lt);T(Ms.$$.fragment,va),m_=p(va),Ts=s(va,"P",{});var ah=r(Ts);f_=l(ah,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART-50 sequence has the following format, where `),qd=s(ah,"CODE",{});var a2=r(qd);g_=l(a2,"X"),a2.forEach(t),__=l(ah," represents the sequence:"),ah.forEach(t),y_=p(va),ks=s(va,"UL",{});var sh=r(ks);vs=s(sh,"LI",{});var rh=r(vs);Id=s(rh,"CODE",{});var s2=r(Id);b_=l(s2,"input_ids"),s2.forEach(t),M_=l(rh," (for encoder) "),Zd=s(rh,"CODE",{});var r2=r(Zd);T_=l(r2,"[src_lang_code] X [eos]"),r2.forEach(t),rh.forEach(t),k_=p(sh),ws=s(sh,"LI",{});var ih=r(ws);Gd=s(ih,"CODE",{});var i2=r(Gd);v_=l(i2,"labels"),i2.forEach(t),w_=l(ih,": (for decoder) "),Wd=s(ih,"CODE",{});var l2=r(Wd);J_=l(l2,"[tgt_lang_code] X [eos]"),l2.forEach(t),ih.forEach(t),sh.forEach(t),F_=p(va),Nd=s(va,"P",{});var d2=r(Nd);U_=l(d2,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),d2.forEach(t),va.forEach(t),B_=p(ne),ln=s(ne,"DIV",{class:!0});var lh=r(ln);T(Js.$$.fragment,lh),z_=p(lh),Rd=s(lh,"P",{});var c2=r(Rd);j_=l(c2,"Converts a sequence of tokens (string) in a single string."),c2.forEach(t),lh.forEach(t),$_=p(ne),dn=s(ne,"DIV",{class:!0});var dh=r(dn);T(Fs.$$.fragment,dh),x_=p(dh),Us=s(dh,"P",{});var ch=r(Us);E_=l(ch,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Xd=s(ch,"CODE",{});var p2=r(Xd);C_=l(p2,"prepare_for_model"),p2.forEach(t),q_=l(ch," method."),ch.forEach(t),dh.forEach(t),I_=p(ne),cn=s(ne,"DIV",{class:!0});var ph=r(cn);T(Bs.$$.fragment,ph),Z_=p(ph),Vd=s(ph,"P",{});var u2=r(Vd);G_=l(u2,"Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),u2.forEach(t),ph.forEach(t),W_=p(ne),pn=s(ne,"DIV",{class:!0});var uh=r(pn);T(zs.$$.fragment,uh),N_=p(uh),Sd=s(uh,"P",{});var h2=r(Sd);R_=l(h2,"Reset the special tokens to the target language setting. prefix=[tgt_lang_code] and suffix=[eos]."),h2.forEach(t),uh.forEach(t),ne.forEach(t),cu=p(o),bo=s(o,"H2",{class:!0});var hh=r(bo);un=s(hh,"A",{id:!0,class:!0,href:!0});var m2=r(un);Ad=s(m2,"SPAN",{});var f2=r(Ad);T(js.$$.fragment,f2),f2.forEach(t),m2.forEach(t),X_=p(hh),Yd=s(hh,"SPAN",{});var g2=r(Yd);V_=l(g2,"MBart50TokenizerFast"),g2.forEach(t),hh.forEach(t),pu=p(o),K=s(o,"DIV",{class:!0});var Ae=r(K);T($s.$$.fragment,Ae),S_=p(Ae),Mo=s(Ae,"P",{});var gl=r(Mo);A_=l(gl,"Construct a \u201Cfast\u201D MBART tokenizer for mBART-50 (backed by HuggingFace\u2019s "),Qd=s(gl,"EM",{});var _2=r(Qd);Y_=l(_2,"tokenizers"),_2.forEach(t),Q_=l(gl,` library). Based on
`),xs=s(gl,"A",{href:!0,rel:!0});var y2=r(xs);P_=l(y2,"BPE"),y2.forEach(t),O_=l(gl,"."),gl.forEach(t),D_=p(Ae),Es=s(Ae,"P",{});var mh=r(Es);H_=l(mh,"This tokenizer inherits from "),Yi=s(mh,"A",{href:!0});var b2=r(Yi);L_=l(b2,"PreTrainedTokenizerFast"),b2.forEach(t),K_=l(mh,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),mh.forEach(t),ey=p(Ae),T(hn.$$.fragment,Ae),ty=p(Ae),Ne=s(Ae,"DIV",{class:!0});var Xt=r(Ne);T(Cs.$$.fragment,Xt),oy=p(Xt),Pd=s(Xt,"P",{});var M2=r(Pd);ny=l(M2,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),M2.forEach(t),ay=p(Xt),qs=s(Xt,"P",{});var fh=r(qs);sy=l(fh,"An MBART-50 sequence has the following format, where "),Od=s(fh,"CODE",{});var T2=r(Od);ry=l(T2,"X"),T2.forEach(t),iy=l(fh," represents the sequence:"),fh.forEach(t),ly=p(Xt),Is=s(Xt,"UL",{});var gh=r(Is);Zs=s(gh,"LI",{});var _h=r(Zs);Dd=s(_h,"CODE",{});var k2=r(Dd);dy=l(k2,"input_ids"),k2.forEach(t),cy=l(_h," (for encoder) "),Hd=s(_h,"CODE",{});var v2=r(Hd);py=l(v2,"[src_lang_code] X [eos]"),v2.forEach(t),_h.forEach(t),uy=p(gh),Gs=s(gh,"LI",{});var yh=r(Gs);Ld=s(yh,"CODE",{});var w2=r(Ld);hy=l(w2,"labels"),w2.forEach(t),my=l(yh,": (for decoder) "),Kd=s(yh,"CODE",{});var J2=r(Kd);fy=l(J2,"[tgt_lang_code] X [eos]"),J2.forEach(t),yh.forEach(t),gh.forEach(t),gy=p(Xt),ec=s(Xt,"P",{});var F2=r(ec);_y=l(F2,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),F2.forEach(t),Xt.forEach(t),yy=p(Ae),mn=s(Ae,"DIV",{class:!0});var bh=r(mn);T(Ws.$$.fragment,bh),by=p(bh),tc=s(bh,"P",{});var U2=r(tc);My=l(U2,"Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),U2.forEach(t),bh.forEach(t),Ty=p(Ae),fn=s(Ae,"DIV",{class:!0});var Mh=r(fn);T(Ns.$$.fragment,Mh),ky=p(Mh),oc=s(Mh,"P",{});var B2=r(oc);vy=l(B2,"Reset the special tokens to the target language setting. prefix=[src_lang_code] and suffix=[eos]."),B2.forEach(t),Mh.forEach(t),Ae.forEach(t),uu=p(o),To=s(o,"H2",{class:!0});var Th=r(To);gn=s(Th,"A",{id:!0,class:!0,href:!0});var z2=r(gn);nc=s(z2,"SPAN",{});var j2=r(nc);T(Rs.$$.fragment,j2),j2.forEach(t),z2.forEach(t),wy=p(Th),ac=s(Th,"SPAN",{});var $2=r(ac);Jy=l($2,"MBartModel"),$2.forEach(t),Th.forEach(t),hu=p(o),Ke=s(o,"DIV",{class:!0});var wa=r(Ke);T(Xs.$$.fragment,wa),Fy=p(wa),Vs=s(wa,"P",{});var kh=r(Vs);Uy=l(kh,`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Qi=s(kh,"A",{href:!0});var x2=r(Qi);By=l(x2,"PreTrainedModel"),x2.forEach(t),zy=l(kh,`. 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.)`),kh.forEach(t),jy=p(wa),Ss=s(wa,"P",{});var vh=r(Ss);$y=l(vh,"This model is also a PyTorch "),As=s(vh,"A",{href:!0,rel:!0});var E2=r(As);xy=l(E2,"torch.nn.Module"),E2.forEach(t),Ey=l(vh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vh.forEach(t),Cy=p(wa),dt=s(wa,"DIV",{class:!0});var Ja=r(dt);T(Ys.$$.fragment,Ja),qy=p(Ja),ko=s(Ja,"P",{});var _l=r(ko);Iy=l(_l,"The "),Pi=s(_l,"A",{href:!0});var C2=r(Pi);Zy=l(C2,"MBartModel"),C2.forEach(t),Gy=l(_l," forward method, overrides the "),sc=s(_l,"CODE",{});var q2=r(sc);Wy=l(q2,"__call__"),q2.forEach(t),Ny=l(_l," special method."),_l.forEach(t),Ry=p(Ja),T(_n.$$.fragment,Ja),Xy=p(Ja),T(yn.$$.fragment,Ja),Ja.forEach(t),wa.forEach(t),mu=p(o),vo=s(o,"H2",{class:!0});var wh=r(vo);bn=s(wh,"A",{id:!0,class:!0,href:!0});var I2=r(bn);rc=s(I2,"SPAN",{});var Z2=r(rc);T(Qs.$$.fragment,Z2),Z2.forEach(t),I2.forEach(t),Vy=p(wh),ic=s(wh,"SPAN",{});var G2=r(ic);Sy=l(G2,"MBartForConditionalGeneration"),G2.forEach(t),wh.forEach(t),fu=p(o),et=s(o,"DIV",{class:!0});var Fa=r(et);T(Ps.$$.fragment,Fa),Ay=p(Fa),Os=s(Fa,"P",{});var Jh=r(Os);Yy=l(Jh,`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),Oi=s(Jh,"A",{href:!0});var W2=r(Oi);Qy=l(W2,"PreTrainedModel"),W2.forEach(t),Py=l(Jh,`. 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.)`),Jh.forEach(t),Oy=p(Fa),Ds=s(Fa,"P",{});var Fh=r(Ds);Dy=l(Fh,"This model is also a PyTorch "),Hs=s(Fh,"A",{href:!0,rel:!0});var N2=r(Hs);Hy=l(N2,"torch.nn.Module"),N2.forEach(t),Ly=l(Fh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fh.forEach(t),Ky=p(Fa),Re=s(Fa,"DIV",{class:!0});var Vt=r(Re);T(Ls.$$.fragment,Vt),eb=p(Vt),wo=s(Vt,"P",{});var yl=r(wo);tb=l(yl,"The "),Di=s(yl,"A",{href:!0});var R2=r(Di);ob=l(R2,"MBartForConditionalGeneration"),R2.forEach(t),nb=l(yl," forward method, overrides the "),lc=s(yl,"CODE",{});var X2=r(lc);ab=l(X2,"__call__"),X2.forEach(t),sb=l(yl," special method."),yl.forEach(t),rb=p(Vt),T(Mn.$$.fragment,Vt),ib=p(Vt),T(Tn.$$.fragment,Vt),lb=p(Vt),T(kn.$$.fragment,Vt),Vt.forEach(t),Fa.forEach(t),gu=p(o),Jo=s(o,"H2",{class:!0});var Uh=r(Jo);vn=s(Uh,"A",{id:!0,class:!0,href:!0});var V2=r(vn);dc=s(V2,"SPAN",{});var S2=r(dc);T(Ks.$$.fragment,S2),S2.forEach(t),V2.forEach(t),db=p(Uh),cc=s(Uh,"SPAN",{});var A2=r(cc);cb=l(A2,"MBartForQuestionAnswering"),A2.forEach(t),Uh.forEach(t),_u=p(o),xe=s(o,"DIV",{class:!0});var St=r(xe);T(er.$$.fragment,St),pb=p(St),Fo=s(St,"P",{});var bl=r(Fo);ub=l(bl,`MBART Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),pc=s(bl,"CODE",{});var Y2=r(pc);hb=l(Y2,"span start logits"),Y2.forEach(t),mb=l(bl," and "),uc=s(bl,"CODE",{});var Q2=r(uc);fb=l(Q2,"span end logits"),Q2.forEach(t),gb=l(bl,")."),bl.forEach(t),_b=p(St),tr=s(St,"P",{});var Bh=r(tr);yb=l(Bh,"This model inherits from "),Hi=s(Bh,"A",{href:!0});var P2=r(Hi);bb=l(P2,"PreTrainedModel"),P2.forEach(t),Mb=l(Bh,`. 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.)`),Bh.forEach(t),Tb=p(St),or=s(St,"P",{});var zh=r(or);kb=l(zh,"This model is also a PyTorch "),nr=s(zh,"A",{href:!0,rel:!0});var O2=r(nr);vb=l(O2,"torch.nn.Module"),O2.forEach(t),wb=l(zh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),zh.forEach(t),Jb=p(St),ct=s(St,"DIV",{class:!0});var Ua=r(ct);T(ar.$$.fragment,Ua),Fb=p(Ua),Uo=s(Ua,"P",{});var Ml=r(Uo);Ub=l(Ml,"The "),Li=s(Ml,"A",{href:!0});var D2=r(Li);Bb=l(D2,"MBartForQuestionAnswering"),D2.forEach(t),zb=l(Ml," forward method, overrides the "),hc=s(Ml,"CODE",{});var H2=r(hc);jb=l(H2,"__call__"),H2.forEach(t),$b=l(Ml," special method."),Ml.forEach(t),xb=p(Ua),T(wn.$$.fragment,Ua),Eb=p(Ua),T(Jn.$$.fragment,Ua),Ua.forEach(t),St.forEach(t),yu=p(o),Bo=s(o,"H2",{class:!0});var jh=r(Bo);Fn=s(jh,"A",{id:!0,class:!0,href:!0});var L2=r(Fn);mc=s(L2,"SPAN",{});var K2=r(mc);T(sr.$$.fragment,K2),K2.forEach(t),L2.forEach(t),Cb=p(jh),fc=s(jh,"SPAN",{});var e1=r(fc);qb=l(e1,"MBartForSequenceClassification"),e1.forEach(t),jh.forEach(t),bu=p(o),Ee=s(o,"DIV",{class:!0});var At=r(Ee);T(rr.$$.fragment,At),Ib=p(At),gc=s(At,"P",{});var t1=r(gc);Zb=l(t1,`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),t1.forEach(t),Gb=p(At),ir=s(At,"P",{});var $h=r(ir);Wb=l($h,"This model inherits from "),Ki=s($h,"A",{href:!0});var o1=r(Ki);Nb=l(o1,"PreTrainedModel"),o1.forEach(t),Rb=l($h,`. 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.)`),$h.forEach(t),Xb=p(At),lr=s(At,"P",{});var xh=r(lr);Vb=l(xh,"This model is also a PyTorch "),dr=s(xh,"A",{href:!0,rel:!0});var n1=r(dr);Sb=l(n1,"torch.nn.Module"),n1.forEach(t),Ab=l(xh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),xh.forEach(t),Yb=p(At),Xe=s(At,"DIV",{class:!0});var Yt=r(Xe);T(cr.$$.fragment,Yt),Qb=p(Yt),zo=s(Yt,"P",{});var Tl=r(zo);Pb=l(Tl,"The "),el=s(Tl,"A",{href:!0});var a1=r(el);Ob=l(a1,"MBartForSequenceClassification"),a1.forEach(t),Db=l(Tl," forward method, overrides the "),_c=s(Tl,"CODE",{});var s1=r(_c);Hb=l(s1,"__call__"),s1.forEach(t),Lb=l(Tl," special method."),Tl.forEach(t),Kb=p(Yt),T(Un.$$.fragment,Yt),eM=p(Yt),T(Bn.$$.fragment,Yt),tM=p(Yt),T(zn.$$.fragment,Yt),Yt.forEach(t),At.forEach(t),Mu=p(o),jo=s(o,"H2",{class:!0});var Eh=r(jo);jn=s(Eh,"A",{id:!0,class:!0,href:!0});var r1=r(jn);yc=s(r1,"SPAN",{});var i1=r(yc);T(pr.$$.fragment,i1),i1.forEach(t),r1.forEach(t),oM=p(Eh),bc=s(Eh,"SPAN",{});var l1=r(bc);nM=l(l1,"MBartForCausalLM"),l1.forEach(t),Eh.forEach(t),Tu=p(o),$o=s(o,"DIV",{class:!0});var Ch=r($o);T(ur.$$.fragment,Ch),aM=p(Ch),$n=s(Ch,"DIV",{class:!0});var qh=r($n);T(hr.$$.fragment,qh),sM=p(qh),T(xn.$$.fragment,qh),qh.forEach(t),Ch.forEach(t),ku=p(o),xo=s(o,"H2",{class:!0});var Ih=r(xo);En=s(Ih,"A",{id:!0,class:!0,href:!0});var d1=r(En);Mc=s(d1,"SPAN",{});var c1=r(Mc);T(mr.$$.fragment,c1),c1.forEach(t),d1.forEach(t),rM=p(Ih),Tc=s(Ih,"SPAN",{});var p1=r(Tc);iM=l(p1,"TFMBartModel"),p1.forEach(t),Ih.forEach(t),vu=p(o),Ce=s(o,"DIV",{class:!0});var Qt=r(Ce);T(fr.$$.fragment,Qt),lM=p(Qt),gr=s(Qt,"P",{});var Zh=r(gr);dM=l(Zh,`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),tl=s(Zh,"A",{href:!0});var u1=r(tl);cM=l(u1,"TFPreTrainedModel"),u1.forEach(t),pM=l(Zh,`. 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.)`),Zh.forEach(t),uM=p(Qt),_r=s(Qt,"P",{});var Gh=r(_r);hM=l(Gh,"This model is also a "),yr=s(Gh,"A",{href:!0,rel:!0});var h1=r(yr);mM=l(h1,"tf.keras.Model"),h1.forEach(t),fM=l(Gh,` 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.`),Gh.forEach(t),gM=p(Qt),T(Cn.$$.fragment,Qt),_M=p(Qt),pt=s(Qt,"DIV",{class:!0});var Ba=r(pt);T(br.$$.fragment,Ba),yM=p(Ba),Eo=s(Ba,"P",{});var kl=r(Eo);bM=l(kl,"The "),ol=s(kl,"A",{href:!0});var m1=r(ol);MM=l(m1,"TFMBartModel"),m1.forEach(t),TM=l(kl," forward method, overrides the "),kc=s(kl,"CODE",{});var f1=r(kc);kM=l(f1,"__call__"),f1.forEach(t),vM=l(kl," special method."),kl.forEach(t),wM=p(Ba),T(qn.$$.fragment,Ba),JM=p(Ba),T(In.$$.fragment,Ba),Ba.forEach(t),Qt.forEach(t),wu=p(o),Co=s(o,"H2",{class:!0});var Wh=r(Co);Zn=s(Wh,"A",{id:!0,class:!0,href:!0});var g1=r(Zn);vc=s(g1,"SPAN",{});var _1=r(vc);T(Mr.$$.fragment,_1),_1.forEach(t),g1.forEach(t),FM=p(Wh),wc=s(Wh,"SPAN",{});var y1=r(wc);UM=l(y1,"TFMBartForConditionalGeneration"),y1.forEach(t),Wh.forEach(t),Ju=p(o),qe=s(o,"DIV",{class:!0});var Pt=r(qe);T(Tr.$$.fragment,Pt),BM=p(Pt),kr=s(Pt,"P",{});var Nh=r(kr);zM=l(Nh,`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),nl=s(Nh,"A",{href:!0});var b1=r(nl);jM=l(b1,"TFPreTrainedModel"),b1.forEach(t),$M=l(Nh,`. 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.)`),Nh.forEach(t),xM=p(Pt),vr=s(Pt,"P",{});var Rh=r(vr);EM=l(Rh,"This model is also a "),wr=s(Rh,"A",{href:!0,rel:!0});var M1=r(wr);CM=l(M1,"tf.keras.Model"),M1.forEach(t),qM=l(Rh,` 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.`),Rh.forEach(t),IM=p(Pt),T(Gn.$$.fragment,Pt),ZM=p(Pt),Ve=s(Pt,"DIV",{class:!0});var Ot=r(Ve);T(Jr.$$.fragment,Ot),GM=p(Ot),qo=s(Ot,"P",{});var vl=r(qo);WM=l(vl,"The "),al=s(vl,"A",{href:!0});var T1=r(al);NM=l(T1,"TFMBartForConditionalGeneration"),T1.forEach(t),RM=l(vl," forward method, overrides the "),Jc=s(vl,"CODE",{});var k1=r(Jc);XM=l(k1,"__call__"),k1.forEach(t),VM=l(vl," special method."),vl.forEach(t),SM=p(Ot),T(Wn.$$.fragment,Ot),AM=p(Ot),T(Nn.$$.fragment,Ot),YM=p(Ot),T(Rn.$$.fragment,Ot),Ot.forEach(t),Pt.forEach(t),Fu=p(o),Io=s(o,"H2",{class:!0});var Xh=r(Io);Xn=s(Xh,"A",{id:!0,class:!0,href:!0});var v1=r(Xn);Fc=s(v1,"SPAN",{});var w1=r(Fc);T(Fr.$$.fragment,w1),w1.forEach(t),v1.forEach(t),QM=p(Xh),Uc=s(Xh,"SPAN",{});var J1=r(Uc);PM=l(J1,"FlaxMBartModel"),J1.forEach(t),Xh.forEach(t),Uu=p(o),P=s(o,"DIV",{class:!0});var Me=r(P);T(Ur.$$.fragment,Me),OM=p(Me),Br=s(Me,"P",{});var Vh=r(Br);DM=l(Vh,`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),sl=s(Vh,"A",{href:!0});var F1=r(sl);HM=l(F1,"FlaxPreTrainedModel"),F1.forEach(t),LM=l(Vh,`. 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.)`),Vh.forEach(t),KM=p(Me),zr=s(Me,"P",{});var Sh=r(zr);eT=l(Sh,`This model is also a Flax Linen
`),jr=s(Sh,"A",{href:!0,rel:!0});var U1=r(jr);tT=l(U1,"flax.nn.Module"),U1.forEach(t),oT=l(Sh,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Sh.forEach(t),nT=p(Me),Bc=s(Me,"P",{});var B1=r(Bc);aT=l(B1,"Finally, this model supports inherent JAX features such as:"),B1.forEach(t),sT=p(Me),Ct=s(Me,"UL",{});var za=r(Ct);zc=s(za,"LI",{});var z1=r(zc);$r=s(z1,"A",{href:!0,rel:!0});var j1=r($r);rT=l(j1,"Just-In-Time (JIT) compilation"),j1.forEach(t),z1.forEach(t),iT=p(za),jc=s(za,"LI",{});var $1=r(jc);xr=s($1,"A",{href:!0,rel:!0});var x1=r(xr);lT=l(x1,"Automatic Differentiation"),x1.forEach(t),$1.forEach(t),dT=p(za),$c=s(za,"LI",{});var E1=r($c);Er=s(E1,"A",{href:!0,rel:!0});var C1=r(Er);cT=l(C1,"Vectorization"),C1.forEach(t),E1.forEach(t),pT=p(za),xc=s(za,"LI",{});var q1=r(xc);Cr=s(q1,"A",{href:!0,rel:!0});var I1=r(Cr);uT=l(I1,"Parallelization"),I1.forEach(t),q1.forEach(t),za.forEach(t),hT=p(Me),ut=s(Me,"DIV",{class:!0});var ja=r(ut);T(qr.$$.fragment,ja),mT=p(ja),Zo=s(ja,"P",{});var wl=r(Zo);fT=l(wl,"The "),Ec=s(wl,"CODE",{});var Z1=r(Ec);gT=l(Z1,"FlaxMBartPreTrainedModel"),Z1.forEach(t),_T=l(wl," forward method, overrides the "),Cc=s(wl,"CODE",{});var G1=r(Cc);yT=l(G1,"__call__"),G1.forEach(t),bT=l(wl," special method."),wl.forEach(t),MT=p(ja),T(Vn.$$.fragment,ja),TT=p(ja),T(Sn.$$.fragment,ja),ja.forEach(t),kT=p(Me),An=s(Me,"DIV",{class:!0});var Ah=r(An);T(Ir.$$.fragment,Ah),vT=p(Ah),T(Yn.$$.fragment,Ah),Ah.forEach(t),wT=p(Me),Qn=s(Me,"DIV",{class:!0});var Yh=r(Qn);T(Zr.$$.fragment,Yh),JT=p(Yh),T(Pn.$$.fragment,Yh),Yh.forEach(t),Me.forEach(t),Bu=p(o),Go=s(o,"H2",{class:!0});var Qh=r(Go);On=s(Qh,"A",{id:!0,class:!0,href:!0});var W1=r(On);qc=s(W1,"SPAN",{});var N1=r(qc);T(Gr.$$.fragment,N1),N1.forEach(t),W1.forEach(t),FT=p(Qh),Ic=s(Qh,"SPAN",{});var R1=r(Ic);UT=l(R1,"FlaxMBartForConditionalGeneration"),R1.forEach(t),Qh.forEach(t),zu=p(o),O=s(o,"DIV",{class:!0});var Te=r(O);T(Wr.$$.fragment,Te),BT=p(Te),Nr=s(Te,"P",{});var Ph=r(Nr);zT=l(Ph,`The MMBart Model with a language modeling head. Can be used for summarization.
This model inherits from `),rl=s(Ph,"A",{href:!0});var X1=r(rl);jT=l(X1,"FlaxPreTrainedModel"),X1.forEach(t),$T=l(Ph,`. 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.)`),Ph.forEach(t),xT=p(Te),Rr=s(Te,"P",{});var Oh=r(Rr);ET=l(Oh,`This model is also a Flax Linen
`),Xr=s(Oh,"A",{href:!0,rel:!0});var V1=r(Xr);CT=l(V1,"flax.nn.Module"),V1.forEach(t),qT=l(Oh,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Oh.forEach(t),IT=p(Te),Zc=s(Te,"P",{});var S1=r(Zc);ZT=l(S1,"Finally, this model supports inherent JAX features such as:"),S1.forEach(t),GT=p(Te),qt=s(Te,"UL",{});var $a=r(qt);Gc=s($a,"LI",{});var A1=r(Gc);Vr=s(A1,"A",{href:!0,rel:!0});var Y1=r(Vr);WT=l(Y1,"Just-In-Time (JIT) compilation"),Y1.forEach(t),A1.forEach(t),NT=p($a),Wc=s($a,"LI",{});var Q1=r(Wc);Sr=s(Q1,"A",{href:!0,rel:!0});var P1=r(Sr);RT=l(P1,"Automatic Differentiation"),P1.forEach(t),Q1.forEach(t),XT=p($a),Nc=s($a,"LI",{});var O1=r(Nc);Ar=s(O1,"A",{href:!0,rel:!0});var D1=r(Ar);VT=l(D1,"Vectorization"),D1.forEach(t),O1.forEach(t),ST=p($a),Rc=s($a,"LI",{});var H1=r(Rc);Yr=s(H1,"A",{href:!0,rel:!0});var L1=r(Yr);AT=l(L1,"Parallelization"),L1.forEach(t),H1.forEach(t),$a.forEach(t),YT=p(Te),Se=s(Te,"DIV",{class:!0});var Dt=r(Se);T(Qr.$$.fragment,Dt),QT=p(Dt),Wo=s(Dt,"P",{});var Jl=r(Wo);PT=l(Jl,"The "),Xc=s(Jl,"CODE",{});var K1=r(Xc);OT=l(K1,"FlaxMBartPreTrainedModel"),K1.forEach(t),DT=l(Jl," forward method, overrides the "),Vc=s(Jl,"CODE",{});var e0=r(Vc);HT=l(e0,"__call__"),e0.forEach(t),LT=l(Jl," special method."),Jl.forEach(t),KT=p(Dt),T(Dn.$$.fragment,Dt),ek=p(Dt),T(Hn.$$.fragment,Dt),tk=p(Dt),T(Ln.$$.fragment,Dt),Dt.forEach(t),ok=p(Te),Kn=s(Te,"DIV",{class:!0});var Dh=r(Kn);T(Pr.$$.fragment,Dh),nk=p(Dh),T(ea.$$.fragment,Dh),Dh.forEach(t),ak=p(Te),ta=s(Te,"DIV",{class:!0});var Hh=r(ta);T(Or.$$.fragment,Hh),sk=p(Hh),T(oa.$$.fragment,Hh),Hh.forEach(t),Te.forEach(t),ju=p(o),No=s(o,"H2",{class:!0});var Lh=r(No);na=s(Lh,"A",{id:!0,class:!0,href:!0});var t0=r(na);Sc=s(t0,"SPAN",{});var o0=r(Sc);T(Dr.$$.fragment,o0),o0.forEach(t),t0.forEach(t),rk=p(Lh),Ac=s(Lh,"SPAN",{});var n0=r(Ac);ik=l(n0,"FlaxMBartForSequenceClassification"),n0.forEach(t),Lh.forEach(t),$u=p(o),X=s(o,"DIV",{class:!0});var ae=r(X);T(Hr.$$.fragment,ae),lk=p(ae),Yc=s(ae,"P",{});var a0=r(Yc);dk=l(a0,`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),a0.forEach(t),ck=p(ae),Lr=s(ae,"P",{});var Kh=r(Lr);pk=l(Kh,"This model inherits from "),il=s(Kh,"A",{href:!0});var s0=r(il);uk=l(s0,"FlaxPreTrainedModel"),s0.forEach(t),hk=l(Kh,`. 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.)`),Kh.forEach(t),mk=p(ae),Kr=s(ae,"P",{});var em=r(Kr);fk=l(em,`This model is also a Flax Linen
`),ei=s(em,"A",{href:!0,rel:!0});var r0=r(ei);gk=l(r0,"flax.nn.Module"),r0.forEach(t),_k=l(em,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),em.forEach(t),yk=p(ae),Qc=s(ae,"P",{});var i0=r(Qc);bk=l(i0,"Finally, this model supports inherent JAX features such as:"),i0.forEach(t),Mk=p(ae),It=s(ae,"UL",{});var xa=r(It);Pc=s(xa,"LI",{});var l0=r(Pc);ti=s(l0,"A",{href:!0,rel:!0});var d0=r(ti);Tk=l(d0,"Just-In-Time (JIT) compilation"),d0.forEach(t),l0.forEach(t),kk=p(xa),Oc=s(xa,"LI",{});var c0=r(Oc);oi=s(c0,"A",{href:!0,rel:!0});var p0=r(oi);vk=l(p0,"Automatic Differentiation"),p0.forEach(t),c0.forEach(t),wk=p(xa),Dc=s(xa,"LI",{});var u0=r(Dc);ni=s(u0,"A",{href:!0,rel:!0});var h0=r(ni);Jk=l(h0,"Vectorization"),h0.forEach(t),u0.forEach(t),Fk=p(xa),Hc=s(xa,"LI",{});var m0=r(Hc);ai=s(m0,"A",{href:!0,rel:!0});var f0=r(ai);Uk=l(f0,"Parallelization"),f0.forEach(t),m0.forEach(t),xa.forEach(t),Bk=p(ae),ht=s(ae,"DIV",{class:!0});var Ea=r(ht);T(si.$$.fragment,Ea),zk=p(Ea),Ro=s(Ea,"P",{});var Fl=r(Ro);jk=l(Fl,"The "),Lc=s(Fl,"CODE",{});var g0=r(Lc);$k=l(g0,"FlaxMBartPreTrainedModel"),g0.forEach(t),xk=l(Fl," forward method, overrides the "),Kc=s(Fl,"CODE",{});var _0=r(Kc);Ek=l(_0,"__call__"),_0.forEach(t),Ck=l(Fl," special method."),Fl.forEach(t),qk=p(Ea),T(aa.$$.fragment,Ea),Ik=p(Ea),T(sa.$$.fragment,Ea),Ea.forEach(t),Zk=p(ae),ra=s(ae,"DIV",{class:!0});var tm=r(ra);T(ri.$$.fragment,tm),Gk=p(tm),T(ia.$$.fragment,tm),tm.forEach(t),Wk=p(ae),la=s(ae,"DIV",{class:!0});var om=r(la);T(ii.$$.fragment,om),Nk=p(om),T(da.$$.fragment,om),om.forEach(t),ae.forEach(t),xu=p(o),Xo=s(o,"H2",{class:!0});var nm=r(Xo);ca=s(nm,"A",{id:!0,class:!0,href:!0});var y0=r(ca);ep=s(y0,"SPAN",{});var b0=r(ep);T(li.$$.fragment,b0),b0.forEach(t),y0.forEach(t),Rk=p(nm),tp=s(nm,"SPAN",{});var M0=r(tp);Xk=l(M0,"FlaxMBartForQuestionAnswering"),M0.forEach(t),nm.forEach(t),Eu=p(o),V=s(o,"DIV",{class:!0});var se=r(V);T(di.$$.fragment,se),Vk=p(se),Vo=s(se,"P",{});var Ul=r(Vo);Sk=l(Ul,`MBart Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),op=s(Ul,"CODE",{});var T0=r(op);Ak=l(T0,"span start logits"),T0.forEach(t),Yk=l(Ul," and "),np=s(Ul,"CODE",{});var k0=r(np);Qk=l(k0,"span end logits"),k0.forEach(t),Pk=l(Ul,")."),Ul.forEach(t),Ok=p(se),ci=s(se,"P",{});var am=r(ci);Dk=l(am,"This model inherits from "),ll=s(am,"A",{href:!0});var v0=r(ll);Hk=l(v0,"FlaxPreTrainedModel"),v0.forEach(t),Lk=l(am,`. 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.)`),am.forEach(t),Kk=p(se),pi=s(se,"P",{});var sm=r(pi);ev=l(sm,`This model is also a Flax Linen
`),ui=s(sm,"A",{href:!0,rel:!0});var w0=r(ui);tv=l(w0,"flax.nn.Module"),w0.forEach(t),ov=l(sm,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),sm.forEach(t),nv=p(se),ap=s(se,"P",{});var J0=r(ap);av=l(J0,"Finally, this model supports inherent JAX features such as:"),J0.forEach(t),sv=p(se),Zt=s(se,"UL",{});var Ca=r(Zt);sp=s(Ca,"LI",{});var F0=r(sp);hi=s(F0,"A",{href:!0,rel:!0});var U0=r(hi);rv=l(U0,"Just-In-Time (JIT) compilation"),U0.forEach(t),F0.forEach(t),iv=p(Ca),rp=s(Ca,"LI",{});var B0=r(rp);mi=s(B0,"A",{href:!0,rel:!0});var z0=r(mi);lv=l(z0,"Automatic Differentiation"),z0.forEach(t),B0.forEach(t),dv=p(Ca),ip=s(Ca,"LI",{});var j0=r(ip);fi=s(j0,"A",{href:!0,rel:!0});var $0=r(fi);cv=l($0,"Vectorization"),$0.forEach(t),j0.forEach(t),pv=p(Ca),lp=s(Ca,"LI",{});var x0=r(lp);gi=s(x0,"A",{href:!0,rel:!0});var E0=r(gi);uv=l(E0,"Parallelization"),E0.forEach(t),x0.forEach(t),Ca.forEach(t),hv=p(se),mt=s(se,"DIV",{class:!0});var qa=r(mt);T(_i.$$.fragment,qa),mv=p(qa),So=s(qa,"P",{});var Bl=r(So);fv=l(Bl,"The "),dp=s(Bl,"CODE",{});var C0=r(dp);gv=l(C0,"FlaxMBartPreTrainedModel"),C0.forEach(t),_v=l(Bl," forward method, overrides the "),cp=s(Bl,"CODE",{});var q0=r(cp);yv=l(q0,"__call__"),q0.forEach(t),bv=l(Bl," special method."),Bl.forEach(t),Mv=p(qa),T(pa.$$.fragment,qa),Tv=p(qa),T(ua.$$.fragment,qa),qa.forEach(t),kv=p(se),ha=s(se,"DIV",{class:!0});var rm=r(ha);T(yi.$$.fragment,rm),vv=p(rm),T(ma.$$.fragment,rm),rm.forEach(t),wv=p(se),fa=s(se,"DIV",{class:!0});var im=r(fa);T(bi.$$.fragment,im),Jv=p(im),T(ga.$$.fragment,im),im.forEach(t),se.forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(zJ)),m(h,"id","mbart-and-mbart50"),m(h,"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"),m(h,"href","#mbart-and-mbart50"),m(f,"class","relative group"),m(he,"alt","Models"),I0(he.src,j="https://img.shields.io/badge/All_model_pages-mbart-blueviolet")||m(he,"src",j),m(Ie,"href","https://huggingface.co/models?filter=mbart"),m(Ze,"alt","Spaces"),I0(Ze.src,Wt="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||m(Ze,"src",Wt),m(ee,"href","https://huggingface.co/spaces/docs-demos/mbart-large-50-one-to-many-mmt"),m(Y,"class","flex flex-wrap space-x-1"),m(ve,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),m(ve,"rel","nofollow"),m(fe,"id","overview-of-mbart"),m(fe,"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"),m(fe,"href","#overview-of-mbart"),m(Q,"class","relative group"),m(H,"href","https://arxiv.org/abs/2001.08210"),m(H,"rel","nofollow"),m(Ue,"href","https://huggingface.co/valhalla"),m(Ue,"rel","nofollow"),m(Be,"href","https://github.com/pytorch/fairseq/tree/master/examples/mbart"),m(Be,"rel","nofollow"),m(I,"id","training-of-mbart"),m(I,"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"),m(I,"href","#training-of-mbart"),m(L,"class","relative group"),m(je,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),m(Yo,"id","overview-of-mbart50"),m(Yo,"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"),m(Yo,"href","#overview-of-mbart50"),m(ro,"class","relative group"),m(Na,"href","https://arxiv.org/abs/2008.00401"),m(Na,"rel","nofollow"),m(Qo,"id","training-of-mbart50"),m(Qo,"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"),m(Qo,"href","#training-of-mbart50"),m(io,"class","relative group"),m(ji,"href","/docs/transformers/main/en/model_doc/mbart#transformers.MBart50Tokenizer"),m(Oo,"id","documentation-resources"),m(Oo,"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"),m(Oo,"href","#documentation-resources"),m(lo,"class","relative group"),m(Ei,"href","../tasks/sequence_classification"),m(Ci,"href","../tasks/question_answering"),m(qi,"href","../tasks/language_modeling"),m(Ii,"href","../tasks/masked_language_modeling"),m(Zi,"href","../tasks/translation"),m(Gi,"href","../tasks/summarization"),m(Do,"id","transformers.MBartConfig"),m(Do,"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"),m(Do,"href","#transformers.MBartConfig"),m(co,"class","relative group"),m(Wi,"href","/docs/transformers/main/en/model_doc/mbart#transformers.MBartModel"),m(Pa,"href","https://huggingface.co/facebook/mbart-large-cc25"),m(Pa,"rel","nofollow"),m(Ni,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(Ri,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Lo,"id","transformers.MBartTokenizer"),m(Lo,"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"),m(Lo,"href","#transformers.MBartTokenizer"),m(ho,"class","relative group"),m(Xi,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizer"),m(Vi,"href","/docs/transformers/main/en/model_doc/xlnet#transformers.XLNetTokenizer"),m(Ha,"href","https://github.com/google/sentencepiece"),m(Ha,"rel","nofollow"),m(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(en,"id","transformers.MBartTokenizerFast"),m(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"),m(en,"href","#transformers.MBartTokenizerFast"),m(fo,"class","relative group"),m(ss,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),m(ss,"rel","nofollow"),m(Si,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(on,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(an,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(sn,"id","transformers.MBart50Tokenizer"),m(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"),m(sn,"href","#transformers.MBart50Tokenizer"),m(yo,"class","relative group"),m(ys,"href","https://github.com/google/sentencepiece"),m(ys,"rel","nofollow"),m(Ai,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ln,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(dn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(un,"id","transformers.MBart50TokenizerFast"),m(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"),m(un,"href","#transformers.MBart50TokenizerFast"),m(bo,"class","relative group"),m(xs,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),m(xs,"rel","nofollow"),m(Yi,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(mn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(gn,"id","transformers.MBartModel"),m(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"),m(gn,"href","#transformers.MBartModel"),m(To,"class","relative group"),m(Qi,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(As,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(As,"rel","nofollow"),m(Pi,"href","/docs/transformers/main/en/model_doc/mbart#transformers.MBartModel"),m(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(bn,"id","transformers.MBartForConditionalGeneration"),m(bn,"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"),m(bn,"href","#transformers.MBartForConditionalGeneration"),m(vo,"class","relative group"),m(Oi,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(Hs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Hs,"rel","nofollow"),m(Di,"href","/docs/transformers/main/en/model_doc/mbart#transformers.MBartForConditionalGeneration"),m(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(vn,"id","transformers.MBartForQuestionAnswering"),m(vn,"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"),m(vn,"href","#transformers.MBartForQuestionAnswering"),m(Jo,"class","relative group"),m(Hi,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(nr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(nr,"rel","nofollow"),m(Li,"href","/docs/transformers/main/en/model_doc/mbart#transformers.MBartForQuestionAnswering"),m(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Fn,"id","transformers.MBartForSequenceClassification"),m(Fn,"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"),m(Fn,"href","#transformers.MBartForSequenceClassification"),m(Bo,"class","relative group"),m(Ki,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(dr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(dr,"rel","nofollow"),m(el,"href","/docs/transformers/main/en/model_doc/mbart#transformers.MBartForSequenceClassification"),m(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(jn,"id","transformers.MBartForCausalLM"),m(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"),m(jn,"href","#transformers.MBartForCausalLM"),m(jo,"class","relative group"),m($n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($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(En,"id","transformers.TFMBartModel"),m(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"),m(En,"href","#transformers.TFMBartModel"),m(xo,"class","relative group"),m(tl,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),m(yr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(yr,"rel","nofollow"),m(ol,"href","/docs/transformers/main/en/model_doc/mbart#transformers.TFMBartModel"),m(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Zn,"id","transformers.TFMBartForConditionalGeneration"),m(Zn,"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"),m(Zn,"href","#transformers.TFMBartForConditionalGeneration"),m(Co,"class","relative group"),m(nl,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),m(wr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(wr,"rel","nofollow"),m(al,"href","/docs/transformers/main/en/model_doc/mbart#transformers.TFMBartForConditionalGeneration"),m(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Xn,"id","transformers.FlaxMBartModel"),m(Xn,"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"),m(Xn,"href","#transformers.FlaxMBartModel"),m(Io,"class","relative group"),m(sl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(jr,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(jr,"rel","nofollow"),m($r,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m($r,"rel","nofollow"),m(xr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(xr,"rel","nofollow"),m(Er,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Er,"rel","nofollow"),m(Cr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Cr,"rel","nofollow"),m(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(An,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Qn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(On,"id","transformers.FlaxMBartForConditionalGeneration"),m(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"),m(On,"href","#transformers.FlaxMBartForConditionalGeneration"),m(Go,"class","relative group"),m(rl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Xr,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Xr,"rel","nofollow"),m(Vr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Vr,"rel","nofollow"),m(Sr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Sr,"rel","nofollow"),m(Ar,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Ar,"rel","nofollow"),m(Yr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Yr,"rel","nofollow"),m(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Kn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ta,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(na,"id","transformers.FlaxMBartForSequenceClassification"),m(na,"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"),m(na,"href","#transformers.FlaxMBartForSequenceClassification"),m(No,"class","relative group"),m(il,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ei,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(ei,"rel","nofollow"),m(ti,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(ti,"rel","nofollow"),m(oi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(oi,"rel","nofollow"),m(ni,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(ni,"rel","nofollow"),m(ai,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(ai,"rel","nofollow"),m(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ra,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(la,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ca,"id","transformers.FlaxMBartForQuestionAnswering"),m(ca,"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"),m(ca,"href","#transformers.FlaxMBartForQuestionAnswering"),m(Xo,"class","relative group"),m(ll,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ui,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(ui,"rel","nofollow"),m(hi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(hi,"rel","nofollow"),m(mi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(mi,"rel","nofollow"),m(fi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(fi,"rel","nofollow"),m(gi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(gi,"rel","nofollow"),m(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ha,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){e(document.head,d),_(o,b,g),_(o,f,g),e(f,h),e(h,y),k(n,y,null),e(f,u),e(f,z),e(z,bt),_(o,ot,g),_(o,Y,g),e(Y,Ie),e(Ie,he),e(Y,Mt),e(Y,ee),e(ee,Ze),_(o,me,g),_(o,re,g),e(re,Ye),e(Ye,ke),e(re,Tt),e(re,ve),e(ve,we),e(re,kt),_(o,nt,g),_(o,Q,g),e(Q,fe),e(fe,Qe),k(ie,Qe,null),e(Q,Z),e(Q,G),e(G,vt),_(o,ge,g),_(o,_e,g),e(_e,wt),e(_e,H),e(H,Jt),e(_e,Ft),_(o,S,g),_(o,Ge,g),e(Ge,Je),_(o,at,g),_(o,le,g),e(le,Fe),e(le,Ue),e(Ue,Ut),e(le,de),e(le,Be),e(Be,ze),_(o,st,g),_(o,L,g),e(L,I),e(I,Pe),k(W,Pe,null),e(L,Bt),e(L,Oe),e(Oe,U),_(o,$,g),_(o,D,g),e(D,De),e(D,zt),e(zt,Ht),e(D,E),e(D,jt),e(jt,Lt),e(D,Kt),e(D,$t),e($t,eo),e(D,ce),e(D,pe),e(pe,to),e(D,oo),_(o,ye,g),_(o,te,g),e(te,no),e(te,je),e(je,xt),e(xt,He),e(je,ao),e(te,lm),e(te,zl),e(zl,dm),e(te,cm),e(te,jl),e(jl,pm),e(te,um),_(o,Wp,g),_(o,Fi,g),e(Fi,$l),e($l,hm),_(o,Np,g),k(Ia,o,g),_(o,Rp,g),_(o,Ui,g),e(Ui,Za),e(Za,xl),e(xl,mm),e(Za,fm),e(Za,so),e(so,gm),e(so,El),e(El,_m),e(so,ym),e(so,Cl),e(Cl,bm),e(so,Mm),_(o,Xp,g),k(Ga,o,g),_(o,Vp,g),_(o,ro,g),e(ro,Yo),e(Yo,ql),k(Wa,ql,null),e(ro,Tm),e(ro,Il),e(Il,km),_(o,Sp,g),_(o,Nt,g),e(Nt,vm),e(Nt,Na),e(Na,wm),e(Nt,Jm),e(Nt,Zl),e(Zl,Fm),e(Nt,Um),_(o,Ap,g),_(o,Bi,g),e(Bi,Bm),_(o,Yp,g),_(o,zi,g),e(zi,Gl),e(Gl,zm),_(o,Qp,g),_(o,io,g),e(io,Qo),e(Qo,Wl),k(Ra,Wl,null),e(io,jm),e(io,Nl),e(Nl,$m),_(o,Pp,g),_(o,rt,g),e(rt,xm),e(rt,Rl),e(Rl,Em),e(rt,Cm),e(rt,Xl),e(Xl,qm),e(rt,Im),e(rt,Vl),e(Vl,Zm),e(rt,Gm),_(o,Op,g),_(o,Po,g),e(Po,Wm),e(Po,ji),e(ji,Nm),e(Po,Rm),_(o,Dp,g),_(o,$i,g),e($i,Sl),e(Sl,Xm),_(o,Hp,g),k(Xa,o,g),_(o,Lp,g),_(o,xi,g),e(xi,Va),e(Va,Al),e(Al,Vm),e(Va,Sm),e(Va,$e),e($e,Am),e($e,Yl),e(Yl,Ym),e($e,Qm),e($e,Ql),e(Ql,Pm),e($e,Om),e($e,Pl),e(Pl,Dm),e($e,Hm),e($e,Ol),e(Ol,Lm),e($e,Km),e($e,Dl),e(Dl,ef),e($e,tf),_(o,Kp,g),k(Sa,o,g),_(o,eu,g),_(o,lo,g),e(lo,Oo),e(Oo,Hl),k(Aa,Hl,null),e(lo,of),e(lo,Ll),e(Ll,nf),_(o,tu,g),_(o,be,g),e(be,Kl),e(Kl,Ei),e(Ei,af),e(be,sf),e(be,ed),e(ed,Ci),e(Ci,rf),e(be,lf),e(be,td),e(td,qi),e(qi,df),e(be,cf),e(be,od),e(od,Ii),e(Ii,pf),e(be,uf),e(be,nd),e(nd,Zi),e(Zi,hf),e(be,mf),e(be,ad),e(ad,Gi),e(Gi,ff),_(o,ou,g),_(o,co,g),e(co,Do),e(Do,sd),k(Ya,sd,null),e(co,gf),e(co,rd),e(rd,_f),_(o,nu,g),_(o,Le,g),k(Qa,Le,null),e(Le,yf),e(Le,po),e(po,bf),e(po,Wi),e(Wi,Mf),e(po,Tf),e(po,Pa),e(Pa,kf),e(po,vf),e(Le,wf),e(Le,uo),e(uo,Jf),e(uo,Ni),e(Ni,Ff),e(uo,Uf),e(uo,Ri),e(Ri,Bf),e(uo,zf),e(Le,jf),k(Ho,Le,null),_(o,au,g),_(o,ho,g),e(ho,Lo),e(Lo,id),k(Oa,id,null),e(ho,$f),e(ho,ld),e(ld,xf),_(o,su,g),_(o,ue,g),k(Da,ue,null),e(ue,Ef),e(ue,dd),e(dd,Cf),e(ue,qf),e(ue,Et),e(Et,If),e(Et,Xi),e(Xi,Zf),e(Et,Gf),e(Et,Vi),e(Vi,Wf),e(Et,Nf),e(Et,Ha),e(Ha,Rf),e(Et,Xf),e(ue,Vf),e(ue,mo),e(mo,Sf),e(mo,cd),e(cd,Af),e(mo,Yf),e(mo,pd),e(pd,Qf),e(mo,Pf),e(ue,Of),k(Ko,ue,null),e(ue,Df),e(ue,it),k(La,it,null),e(it,Hf),e(it,Ka),e(Ka,Lf),e(Ka,ud),e(ud,Kf),e(Ka,eg),e(it,tg),e(it,es),e(es,ts),e(ts,hd),e(hd,og),e(ts,ng),e(ts,md),e(md,ag),e(es,sg),e(es,os),e(os,fd),e(fd,rg),e(os,ig),e(os,gd),e(gd,lg),e(it,dg),e(it,_d),e(_d,cg),_(o,ru,g),_(o,fo,g),e(fo,en),e(en,yd),k(ns,yd,null),e(fo,pg),e(fo,bd),e(bd,ug),_(o,iu,g),_(o,N,g),k(as,N,null),e(N,hg),e(N,go),e(go,mg),e(go,Md),e(Md,fg),e(go,gg),e(go,ss),e(ss,_g),e(go,yg),e(N,bg),e(N,rs),e(rs,Mg),e(rs,Si),e(Si,Tg),e(rs,kg),e(N,vg),e(N,_o),e(_o,wg),e(_o,Td),e(Td,Jg),e(_o,Fg),e(_o,kd),e(kd,Ug),e(_o,Bg),e(N,zg),k(tn,N,null),e(N,jg),e(N,We),k(is,We,null),e(We,$g),e(We,vd),e(vd,xg),e(We,Eg),e(We,ls),e(ls,Cg),e(ls,wd),e(wd,qg),e(ls,Ig),e(We,Zg),e(We,ds),e(ds,cs),e(cs,Jd),e(Jd,Gg),e(cs,Wg),e(cs,Fd),e(Fd,Ng),e(ds,Rg),e(ds,ps),e(ps,Ud),e(Ud,Xg),e(ps,Vg),e(ps,Bd),e(Bd,Sg),e(We,Ag),e(We,zd),e(zd,Yg),e(N,Qg),e(N,on),k(us,on,null),e(on,Pg),e(on,jd),e(jd,Og),e(N,Dg),e(N,nn),k(hs,nn,null),e(nn,Hg),e(nn,$d),e($d,Lg),e(N,Kg),e(N,an),k(ms,an,null),e(an,e_),e(an,xd),e(xd,t_),_(o,lu,g),_(o,yo,g),e(yo,sn),e(sn,Ed),k(fs,Ed,null),e(yo,o_),e(yo,Cd),e(Cd,n_),_(o,du,g),_(o,R,g),k(gs,R,null),e(R,a_),e(R,_s),e(_s,s_),e(_s,ys),e(ys,r_),e(_s,i_),e(R,l_),e(R,bs),e(bs,d_),e(bs,Ai),e(Ai,c_),e(bs,p_),e(R,u_),k(rn,R,null),e(R,h_),e(R,lt),k(Ms,lt,null),e(lt,m_),e(lt,Ts),e(Ts,f_),e(Ts,qd),e(qd,g_),e(Ts,__),e(lt,y_),e(lt,ks),e(ks,vs),e(vs,Id),e(Id,b_),e(vs,M_),e(vs,Zd),e(Zd,T_),e(ks,k_),e(ks,ws),e(ws,Gd),e(Gd,v_),e(ws,w_),e(ws,Wd),e(Wd,J_),e(lt,F_),e(lt,Nd),e(Nd,U_),e(R,B_),e(R,ln),k(Js,ln,null),e(ln,z_),e(ln,Rd),e(Rd,j_),e(R,$_),e(R,dn),k(Fs,dn,null),e(dn,x_),e(dn,Us),e(Us,E_),e(Us,Xd),e(Xd,C_),e(Us,q_),e(R,I_),e(R,cn),k(Bs,cn,null),e(cn,Z_),e(cn,Vd),e(Vd,G_),e(R,W_),e(R,pn),k(zs,pn,null),e(pn,N_),e(pn,Sd),e(Sd,R_),_(o,cu,g),_(o,bo,g),e(bo,un),e(un,Ad),k(js,Ad,null),e(bo,X_),e(bo,Yd),e(Yd,V_),_(o,pu,g),_(o,K,g),k($s,K,null),e(K,S_),e(K,Mo),e(Mo,A_),e(Mo,Qd),e(Qd,Y_),e(Mo,Q_),e(Mo,xs),e(xs,P_),e(Mo,O_),e(K,D_),e(K,Es),e(Es,H_),e(Es,Yi),e(Yi,L_),e(Es,K_),e(K,ey),k(hn,K,null),e(K,ty),e(K,Ne),k(Cs,Ne,null),e(Ne,oy),e(Ne,Pd),e(Pd,ny),e(Ne,ay),e(Ne,qs),e(qs,sy),e(qs,Od),e(Od,ry),e(qs,iy),e(Ne,ly),e(Ne,Is),e(Is,Zs),e(Zs,Dd),e(Dd,dy),e(Zs,cy),e(Zs,Hd),e(Hd,py),e(Is,uy),e(Is,Gs),e(Gs,Ld),e(Ld,hy),e(Gs,my),e(Gs,Kd),e(Kd,fy),e(Ne,gy),e(Ne,ec),e(ec,_y),e(K,yy),e(K,mn),k(Ws,mn,null),e(mn,by),e(mn,tc),e(tc,My),e(K,Ty),e(K,fn),k(Ns,fn,null),e(fn,ky),e(fn,oc),e(oc,vy),_(o,uu,g),_(o,To,g),e(To,gn),e(gn,nc),k(Rs,nc,null),e(To,wy),e(To,ac),e(ac,Jy),_(o,hu,g),_(o,Ke,g),k(Xs,Ke,null),e(Ke,Fy),e(Ke,Vs),e(Vs,Uy),e(Vs,Qi),e(Qi,By),e(Vs,zy),e(Ke,jy),e(Ke,Ss),e(Ss,$y),e(Ss,As),e(As,xy),e(Ss,Ey),e(Ke,Cy),e(Ke,dt),k(Ys,dt,null),e(dt,qy),e(dt,ko),e(ko,Iy),e(ko,Pi),e(Pi,Zy),e(ko,Gy),e(ko,sc),e(sc,Wy),e(ko,Ny),e(dt,Ry),k(_n,dt,null),e(dt,Xy),k(yn,dt,null),_(o,mu,g),_(o,vo,g),e(vo,bn),e(bn,rc),k(Qs,rc,null),e(vo,Vy),e(vo,ic),e(ic,Sy),_(o,fu,g),_(o,et,g),k(Ps,et,null),e(et,Ay),e(et,Os),e(Os,Yy),e(Os,Oi),e(Oi,Qy),e(Os,Py),e(et,Oy),e(et,Ds),e(Ds,Dy),e(Ds,Hs),e(Hs,Hy),e(Ds,Ly),e(et,Ky),e(et,Re),k(Ls,Re,null),e(Re,eb),e(Re,wo),e(wo,tb),e(wo,Di),e(Di,ob),e(wo,nb),e(wo,lc),e(lc,ab),e(wo,sb),e(Re,rb),k(Mn,Re,null),e(Re,ib),k(Tn,Re,null),e(Re,lb),k(kn,Re,null),_(o,gu,g),_(o,Jo,g),e(Jo,vn),e(vn,dc),k(Ks,dc,null),e(Jo,db),e(Jo,cc),e(cc,cb),_(o,_u,g),_(o,xe,g),k(er,xe,null),e(xe,pb),e(xe,Fo),e(Fo,ub),e(Fo,pc),e(pc,hb),e(Fo,mb),e(Fo,uc),e(uc,fb),e(Fo,gb),e(xe,_b),e(xe,tr),e(tr,yb),e(tr,Hi),e(Hi,bb),e(tr,Mb),e(xe,Tb),e(xe,or),e(or,kb),e(or,nr),e(nr,vb),e(or,wb),e(xe,Jb),e(xe,ct),k(ar,ct,null),e(ct,Fb),e(ct,Uo),e(Uo,Ub),e(Uo,Li),e(Li,Bb),e(Uo,zb),e(Uo,hc),e(hc,jb),e(Uo,$b),e(ct,xb),k(wn,ct,null),e(ct,Eb),k(Jn,ct,null),_(o,yu,g),_(o,Bo,g),e(Bo,Fn),e(Fn,mc),k(sr,mc,null),e(Bo,Cb),e(Bo,fc),e(fc,qb),_(o,bu,g),_(o,Ee,g),k(rr,Ee,null),e(Ee,Ib),e(Ee,gc),e(gc,Zb),e(Ee,Gb),e(Ee,ir),e(ir,Wb),e(ir,Ki),e(Ki,Nb),e(ir,Rb),e(Ee,Xb),e(Ee,lr),e(lr,Vb),e(lr,dr),e(dr,Sb),e(lr,Ab),e(Ee,Yb),e(Ee,Xe),k(cr,Xe,null),e(Xe,Qb),e(Xe,zo),e(zo,Pb),e(zo,el),e(el,Ob),e(zo,Db),e(zo,_c),e(_c,Hb),e(zo,Lb),e(Xe,Kb),k(Un,Xe,null),e(Xe,eM),k(Bn,Xe,null),e(Xe,tM),k(zn,Xe,null),_(o,Mu,g),_(o,jo,g),e(jo,jn),e(jn,yc),k(pr,yc,null),e(jo,oM),e(jo,bc),e(bc,nM),_(o,Tu,g),_(o,$o,g),k(ur,$o,null),e($o,aM),e($o,$n),k(hr,$n,null),e($n,sM),k(xn,$n,null),_(o,ku,g),_(o,xo,g),e(xo,En),e(En,Mc),k(mr,Mc,null),e(xo,rM),e(xo,Tc),e(Tc,iM),_(o,vu,g),_(o,Ce,g),k(fr,Ce,null),e(Ce,lM),e(Ce,gr),e(gr,dM),e(gr,tl),e(tl,cM),e(gr,pM),e(Ce,uM),e(Ce,_r),e(_r,hM),e(_r,yr),e(yr,mM),e(_r,fM),e(Ce,gM),k(Cn,Ce,null),e(Ce,_M),e(Ce,pt),k(br,pt,null),e(pt,yM),e(pt,Eo),e(Eo,bM),e(Eo,ol),e(ol,MM),e(Eo,TM),e(Eo,kc),e(kc,kM),e(Eo,vM),e(pt,wM),k(qn,pt,null),e(pt,JM),k(In,pt,null),_(o,wu,g),_(o,Co,g),e(Co,Zn),e(Zn,vc),k(Mr,vc,null),e(Co,FM),e(Co,wc),e(wc,UM),_(o,Ju,g),_(o,qe,g),k(Tr,qe,null),e(qe,BM),e(qe,kr),e(kr,zM),e(kr,nl),e(nl,jM),e(kr,$M),e(qe,xM),e(qe,vr),e(vr,EM),e(vr,wr),e(wr,CM),e(vr,qM),e(qe,IM),k(Gn,qe,null),e(qe,ZM),e(qe,Ve),k(Jr,Ve,null),e(Ve,GM),e(Ve,qo),e(qo,WM),e(qo,al),e(al,NM),e(qo,RM),e(qo,Jc),e(Jc,XM),e(qo,VM),e(Ve,SM),k(Wn,Ve,null),e(Ve,AM),k(Nn,Ve,null),e(Ve,YM),k(Rn,Ve,null),_(o,Fu,g),_(o,Io,g),e(Io,Xn),e(Xn,Fc),k(Fr,Fc,null),e(Io,QM),e(Io,Uc),e(Uc,PM),_(o,Uu,g),_(o,P,g),k(Ur,P,null),e(P,OM),e(P,Br),e(Br,DM),e(Br,sl),e(sl,HM),e(Br,LM),e(P,KM),e(P,zr),e(zr,eT),e(zr,jr),e(jr,tT),e(zr,oT),e(P,nT),e(P,Bc),e(Bc,aT),e(P,sT),e(P,Ct),e(Ct,zc),e(zc,$r),e($r,rT),e(Ct,iT),e(Ct,jc),e(jc,xr),e(xr,lT),e(Ct,dT),e(Ct,$c),e($c,Er),e(Er,cT),e(Ct,pT),e(Ct,xc),e(xc,Cr),e(Cr,uT),e(P,hT),e(P,ut),k(qr,ut,null),e(ut,mT),e(ut,Zo),e(Zo,fT),e(Zo,Ec),e(Ec,gT),e(Zo,_T),e(Zo,Cc),e(Cc,yT),e(Zo,bT),e(ut,MT),k(Vn,ut,null),e(ut,TT),k(Sn,ut,null),e(P,kT),e(P,An),k(Ir,An,null),e(An,vT),k(Yn,An,null),e(P,wT),e(P,Qn),k(Zr,Qn,null),e(Qn,JT),k(Pn,Qn,null),_(o,Bu,g),_(o,Go,g),e(Go,On),e(On,qc),k(Gr,qc,null),e(Go,FT),e(Go,Ic),e(Ic,UT),_(o,zu,g),_(o,O,g),k(Wr,O,null),e(O,BT),e(O,Nr),e(Nr,zT),e(Nr,rl),e(rl,jT),e(Nr,$T),e(O,xT),e(O,Rr),e(Rr,ET),e(Rr,Xr),e(Xr,CT),e(Rr,qT),e(O,IT),e(O,Zc),e(Zc,ZT),e(O,GT),e(O,qt),e(qt,Gc),e(Gc,Vr),e(Vr,WT),e(qt,NT),e(qt,Wc),e(Wc,Sr),e(Sr,RT),e(qt,XT),e(qt,Nc),e(Nc,Ar),e(Ar,VT),e(qt,ST),e(qt,Rc),e(Rc,Yr),e(Yr,AT),e(O,YT),e(O,Se),k(Qr,Se,null),e(Se,QT),e(Se,Wo),e(Wo,PT),e(Wo,Xc),e(Xc,OT),e(Wo,DT),e(Wo,Vc),e(Vc,HT),e(Wo,LT),e(Se,KT),k(Dn,Se,null),e(Se,ek),k(Hn,Se,null),e(Se,tk),k(Ln,Se,null),e(O,ok),e(O,Kn),k(Pr,Kn,null),e(Kn,nk),k(ea,Kn,null),e(O,ak),e(O,ta),k(Or,ta,null),e(ta,sk),k(oa,ta,null),_(o,ju,g),_(o,No,g),e(No,na),e(na,Sc),k(Dr,Sc,null),e(No,rk),e(No,Ac),e(Ac,ik),_(o,$u,g),_(o,X,g),k(Hr,X,null),e(X,lk),e(X,Yc),e(Yc,dk),e(X,ck),e(X,Lr),e(Lr,pk),e(Lr,il),e(il,uk),e(Lr,hk),e(X,mk),e(X,Kr),e(Kr,fk),e(Kr,ei),e(ei,gk),e(Kr,_k),e(X,yk),e(X,Qc),e(Qc,bk),e(X,Mk),e(X,It),e(It,Pc),e(Pc,ti),e(ti,Tk),e(It,kk),e(It,Oc),e(Oc,oi),e(oi,vk),e(It,wk),e(It,Dc),e(Dc,ni),e(ni,Jk),e(It,Fk),e(It,Hc),e(Hc,ai),e(ai,Uk),e(X,Bk),e(X,ht),k(si,ht,null),e(ht,zk),e(ht,Ro),e(Ro,jk),e(Ro,Lc),e(Lc,$k),e(Ro,xk),e(Ro,Kc),e(Kc,Ek),e(Ro,Ck),e(ht,qk),k(aa,ht,null),e(ht,Ik),k(sa,ht,null),e(X,Zk),e(X,ra),k(ri,ra,null),e(ra,Gk),k(ia,ra,null),e(X,Wk),e(X,la),k(ii,la,null),e(la,Nk),k(da,la,null),_(o,xu,g),_(o,Xo,g),e(Xo,ca),e(ca,ep),k(li,ep,null),e(Xo,Rk),e(Xo,tp),e(tp,Xk),_(o,Eu,g),_(o,V,g),k(di,V,null),e(V,Vk),e(V,Vo),e(Vo,Sk),e(Vo,op),e(op,Ak),e(Vo,Yk),e(Vo,np),e(np,Qk),e(Vo,Pk),e(V,Ok),e(V,ci),e(ci,Dk),e(ci,ll),e(ll,Hk),e(ci,Lk),e(V,Kk),e(V,pi),e(pi,ev),e(pi,ui),e(ui,tv),e(pi,ov),e(V,nv),e(V,ap),e(ap,av),e(V,sv),e(V,Zt),e(Zt,sp),e(sp,hi),e(hi,rv),e(Zt,iv),e(Zt,rp),e(rp,mi),e(mi,lv),e(Zt,dv),e(Zt,ip),e(ip,fi),e(fi,cv),e(Zt,pv),e(Zt,lp),e(lp,gi),e(gi,uv),e(V,hv),e(V,mt),k(_i,mt,null),e(mt,mv),e(mt,So),e(So,fv),e(So,dp),e(dp,gv),e(So,_v),e(So,cp),e(cp,yv),e(So,bv),e(mt,Mv),k(pa,mt,null),e(mt,Tv),k(ua,mt,null),e(V,kv),e(V,ha),k(yi,ha,null),e(ha,vv),k(ma,ha,null),e(V,wv),e(V,fa),k(bi,fa,null),e(fa,Jv),k(ga,fa,null),Cu=!0},p(o,[g]){const Mi={};g&2&&(Mi.$$scope={dirty:g,ctx:o}),Ho.$set(Mi);const pp={};g&2&&(pp.$$scope={dirty:g,ctx:o}),Ko.$set(pp);const up={};g&2&&(up.$$scope={dirty:g,ctx:o}),tn.$set(up);const hp={};g&2&&(hp.$$scope={dirty:g,ctx:o}),rn.$set(hp);const Ti={};g&2&&(Ti.$$scope={dirty:g,ctx:o}),hn.$set(Ti);const mp={};g&2&&(mp.$$scope={dirty:g,ctx:o}),_n.$set(mp);const fp={};g&2&&(fp.$$scope={dirty:g,ctx:o}),yn.$set(fp);const _a={};g&2&&(_a.$$scope={dirty:g,ctx:o}),Mn.$set(_a);const gp={};g&2&&(gp.$$scope={dirty:g,ctx:o}),Tn.$set(gp);const _p={};g&2&&(_p.$$scope={dirty:g,ctx:o}),kn.$set(_p);const ki={};g&2&&(ki.$$scope={dirty:g,ctx:o}),wn.$set(ki);const yp={};g&2&&(yp.$$scope={dirty:g,ctx:o}),Jn.$set(yp);const bp={};g&2&&(bp.$$scope={dirty:g,ctx:o}),Un.$set(bp);const Mp={};g&2&&(Mp.$$scope={dirty:g,ctx:o}),Bn.$set(Mp);const vi={};g&2&&(vi.$$scope={dirty:g,ctx:o}),zn.$set(vi);const Tp={};g&2&&(Tp.$$scope={dirty:g,ctx:o}),xn.$set(Tp);const kp={};g&2&&(kp.$$scope={dirty:g,ctx:o}),Cn.$set(kp);const ya={};g&2&&(ya.$$scope={dirty:g,ctx:o}),qn.$set(ya);const vp={};g&2&&(vp.$$scope={dirty:g,ctx:o}),In.$set(vp);const wp={};g&2&&(wp.$$scope={dirty:g,ctx:o}),Gn.$set(wp);const wi={};g&2&&(wi.$$scope={dirty:g,ctx:o}),Wn.$set(wi);const Jp={};g&2&&(Jp.$$scope={dirty:g,ctx:o}),Nn.$set(Jp);const Fp={};g&2&&(Fp.$$scope={dirty:g,ctx:o}),Rn.$set(Fp);const Up={};g&2&&(Up.$$scope={dirty:g,ctx:o}),Vn.$set(Up);const tt={};g&2&&(tt.$$scope={dirty:g,ctx:o}),Sn.$set(tt);const Bp={};g&2&&(Bp.$$scope={dirty:g,ctx:o}),Yn.$set(Bp);const zp={};g&2&&(zp.$$scope={dirty:g,ctx:o}),Pn.$set(zp);const jp={};g&2&&(jp.$$scope={dirty:g,ctx:o}),Dn.$set(jp);const $p={};g&2&&($p.$$scope={dirty:g,ctx:o}),Hn.$set($p);const Gt={};g&2&&(Gt.$$scope={dirty:g,ctx:o}),Ln.$set(Gt);const dl={};g&2&&(dl.$$scope={dirty:g,ctx:o}),ea.$set(dl);const xp={};g&2&&(xp.$$scope={dirty:g,ctx:o}),oa.$set(xp);const Ep={};g&2&&(Ep.$$scope={dirty:g,ctx:o}),aa.$set(Ep);const Cp={};g&2&&(Cp.$$scope={dirty:g,ctx:o}),sa.$set(Cp);const qp={};g&2&&(qp.$$scope={dirty:g,ctx:o}),ia.$set(qp);const Ip={};g&2&&(Ip.$$scope={dirty:g,ctx:o}),da.$set(Ip);const Zp={};g&2&&(Zp.$$scope={dirty:g,ctx:o}),pa.$set(Zp);const Ji={};g&2&&(Ji.$$scope={dirty:g,ctx:o}),ua.$set(Ji);const Gp={};g&2&&(Gp.$$scope={dirty:g,ctx:o}),ma.$set(Gp);const Ao={};g&2&&(Ao.$$scope={dirty:g,ctx:o}),ga.$set(Ao)},i(o){Cu||(v(n.$$.fragment,o),v(ie.$$.fragment,o),v(W.$$.fragment,o),v(Ia.$$.fragment,o),v(Ga.$$.fragment,o),v(Wa.$$.fragment,o),v(Ra.$$.fragment,o),v(Xa.$$.fragment,o),v(Sa.$$.fragment,o),v(Aa.$$.fragment,o),v(Ya.$$.fragment,o),v(Qa.$$.fragment,o),v(Ho.$$.fragment,o),v(Oa.$$.fragment,o),v(Da.$$.fragment,o),v(Ko.$$.fragment,o),v(La.$$.fragment,o),v(ns.$$.fragment,o),v(as.$$.fragment,o),v(tn.$$.fragment,o),v(is.$$.fragment,o),v(us.$$.fragment,o),v(hs.$$.fragment,o),v(ms.$$.fragment,o),v(fs.$$.fragment,o),v(gs.$$.fragment,o),v(rn.$$.fragment,o),v(Ms.$$.fragment,o),v(Js.$$.fragment,o),v(Fs.$$.fragment,o),v(Bs.$$.fragment,o),v(zs.$$.fragment,o),v(js.$$.fragment,o),v($s.$$.fragment,o),v(hn.$$.fragment,o),v(Cs.$$.fragment,o),v(Ws.$$.fragment,o),v(Ns.$$.fragment,o),v(Rs.$$.fragment,o),v(Xs.$$.fragment,o),v(Ys.$$.fragment,o),v(_n.$$.fragment,o),v(yn.$$.fragment,o),v(Qs.$$.fragment,o),v(Ps.$$.fragment,o),v(Ls.$$.fragment,o),v(Mn.$$.fragment,o),v(Tn.$$.fragment,o),v(kn.$$.fragment,o),v(Ks.$$.fragment,o),v(er.$$.fragment,o),v(ar.$$.fragment,o),v(wn.$$.fragment,o),v(Jn.$$.fragment,o),v(sr.$$.fragment,o),v(rr.$$.fragment,o),v(cr.$$.fragment,o),v(Un.$$.fragment,o),v(Bn.$$.fragment,o),v(zn.$$.fragment,o),v(pr.$$.fragment,o),v(ur.$$.fragment,o),v(hr.$$.fragment,o),v(xn.$$.fragment,o),v(mr.$$.fragment,o),v(fr.$$.fragment,o),v(Cn.$$.fragment,o),v(br.$$.fragment,o),v(qn.$$.fragment,o),v(In.$$.fragment,o),v(Mr.$$.fragment,o),v(Tr.$$.fragment,o),v(Gn.$$.fragment,o),v(Jr.$$.fragment,o),v(Wn.$$.fragment,o),v(Nn.$$.fragment,o),v(Rn.$$.fragment,o),v(Fr.$$.fragment,o),v(Ur.$$.fragment,o),v(qr.$$.fragment,o),v(Vn.$$.fragment,o),v(Sn.$$.fragment,o),v(Ir.$$.fragment,o),v(Yn.$$.fragment,o),v(Zr.$$.fragment,o),v(Pn.$$.fragment,o),v(Gr.$$.fragment,o),v(Wr.$$.fragment,o),v(Qr.$$.fragment,o),v(Dn.$$.fragment,o),v(Hn.$$.fragment,o),v(Ln.$$.fragment,o),v(Pr.$$.fragment,o),v(ea.$$.fragment,o),v(Or.$$.fragment,o),v(oa.$$.fragment,o),v(Dr.$$.fragment,o),v(Hr.$$.fragment,o),v(si.$$.fragment,o),v(aa.$$.fragment,o),v(sa.$$.fragment,o),v(ri.$$.fragment,o),v(ia.$$.fragment,o),v(ii.$$.fragment,o),v(da.$$.fragment,o),v(li.$$.fragment,o),v(di.$$.fragment,o),v(_i.$$.fragment,o),v(pa.$$.fragment,o),v(ua.$$.fragment,o),v(yi.$$.fragment,o),v(ma.$$.fragment,o),v(bi.$$.fragment,o),v(ga.$$.fragment,o),Cu=!0)},o(o){w(n.$$.fragment,o),w(ie.$$.fragment,o),w(W.$$.fragment,o),w(Ia.$$.fragment,o),w(Ga.$$.fragment,o),w(Wa.$$.fragment,o),w(Ra.$$.fragment,o),w(Xa.$$.fragment,o),w(Sa.$$.fragment,o),w(Aa.$$.fragment,o),w(Ya.$$.fragment,o),w(Qa.$$.fragment,o),w(Ho.$$.fragment,o),w(Oa.$$.fragment,o),w(Da.$$.fragment,o),w(Ko.$$.fragment,o),w(La.$$.fragment,o),w(ns.$$.fragment,o),w(as.$$.fragment,o),w(tn.$$.fragment,o),w(is.$$.fragment,o),w(us.$$.fragment,o),w(hs.$$.fragment,o),w(ms.$$.fragment,o),w(fs.$$.fragment,o),w(gs.$$.fragment,o),w(rn.$$.fragment,o),w(Ms.$$.fragment,o),w(Js.$$.fragment,o),w(Fs.$$.fragment,o),w(Bs.$$.fragment,o),w(zs.$$.fragment,o),w(js.$$.fragment,o),w($s.$$.fragment,o),w(hn.$$.fragment,o),w(Cs.$$.fragment,o),w(Ws.$$.fragment,o),w(Ns.$$.fragment,o),w(Rs.$$.fragment,o),w(Xs.$$.fragment,o),w(Ys.$$.fragment,o),w(_n.$$.fragment,o),w(yn.$$.fragment,o),w(Qs.$$.fragment,o),w(Ps.$$.fragment,o),w(Ls.$$.fragment,o),w(Mn.$$.fragment,o),w(Tn.$$.fragment,o),w(kn.$$.fragment,o),w(Ks.$$.fragment,o),w(er.$$.fragment,o),w(ar.$$.fragment,o),w(wn.$$.fragment,o),w(Jn.$$.fragment,o),w(sr.$$.fragment,o),w(rr.$$.fragment,o),w(cr.$$.fragment,o),w(Un.$$.fragment,o),w(Bn.$$.fragment,o),w(zn.$$.fragment,o),w(pr.$$.fragment,o),w(ur.$$.fragment,o),w(hr.$$.fragment,o),w(xn.$$.fragment,o),w(mr.$$.fragment,o),w(fr.$$.fragment,o),w(Cn.$$.fragment,o),w(br.$$.fragment,o),w(qn.$$.fragment,o),w(In.$$.fragment,o),w(Mr.$$.fragment,o),w(Tr.$$.fragment,o),w(Gn.$$.fragment,o),w(Jr.$$.fragment,o),w(Wn.$$.fragment,o),w(Nn.$$.fragment,o),w(Rn.$$.fragment,o),w(Fr.$$.fragment,o),w(Ur.$$.fragment,o),w(qr.$$.fragment,o),w(Vn.$$.fragment,o),w(Sn.$$.fragment,o),w(Ir.$$.fragment,o),w(Yn.$$.fragment,o),w(Zr.$$.fragment,o),w(Pn.$$.fragment,o),w(Gr.$$.fragment,o),w(Wr.$$.fragment,o),w(Qr.$$.fragment,o),w(Dn.$$.fragment,o),w(Hn.$$.fragment,o),w(Ln.$$.fragment,o),w(Pr.$$.fragment,o),w(ea.$$.fragment,o),w(Or.$$.fragment,o),w(oa.$$.fragment,o),w(Dr.$$.fragment,o),w(Hr.$$.fragment,o),w(si.$$.fragment,o),w(aa.$$.fragment,o),w(sa.$$.fragment,o),w(ri.$$.fragment,o),w(ia.$$.fragment,o),w(ii.$$.fragment,o),w(da.$$.fragment,o),w(li.$$.fragment,o),w(di.$$.fragment,o),w(_i.$$.fragment,o),w(pa.$$.fragment,o),w(ua.$$.fragment,o),w(yi.$$.fragment,o),w(ma.$$.fragment,o),w(bi.$$.fragment,o),w(ga.$$.fragment,o),Cu=!1},d(o){t(d),o&&t(b),o&&t(f),J(n),o&&t(ot),o&&t(Y),o&&t(me),o&&t(re),o&&t(nt),o&&t(Q),J(ie),o&&t(ge),o&&t(_e),o&&t(S),o&&t(Ge),o&&t(at),o&&t(le),o&&t(st),o&&t(L),J(W),o&&t($),o&&t(D),o&&t(ye),o&&t(te),o&&t(Wp),o&&t(Fi),o&&t(Np),J(Ia,o),o&&t(Rp),o&&t(Ui),o&&t(Xp),J(Ga,o),o&&t(Vp),o&&t(ro),J(Wa),o&&t(Sp),o&&t(Nt),o&&t(Ap),o&&t(Bi),o&&t(Yp),o&&t(zi),o&&t(Qp),o&&t(io),J(Ra),o&&t(Pp),o&&t(rt),o&&t(Op),o&&t(Po),o&&t(Dp),o&&t($i),o&&t(Hp),J(Xa,o),o&&t(Lp),o&&t(xi),o&&t(Kp),J(Sa,o),o&&t(eu),o&&t(lo),J(Aa),o&&t(tu),o&&t(be),o&&t(ou),o&&t(co),J(Ya),o&&t(nu),o&&t(Le),J(Qa),J(Ho),o&&t(au),o&&t(ho),J(Oa),o&&t(su),o&&t(ue),J(Da),J(Ko),J(La),o&&t(ru),o&&t(fo),J(ns),o&&t(iu),o&&t(N),J(as),J(tn),J(is),J(us),J(hs),J(ms),o&&t(lu),o&&t(yo),J(fs),o&&t(du),o&&t(R),J(gs),J(rn),J(Ms),J(Js),J(Fs),J(Bs),J(zs),o&&t(cu),o&&t(bo),J(js),o&&t(pu),o&&t(K),J($s),J(hn),J(Cs),J(Ws),J(Ns),o&&t(uu),o&&t(To),J(Rs),o&&t(hu),o&&t(Ke),J(Xs),J(Ys),J(_n),J(yn),o&&t(mu),o&&t(vo),J(Qs),o&&t(fu),o&&t(et),J(Ps),J(Ls),J(Mn),J(Tn),J(kn),o&&t(gu),o&&t(Jo),J(Ks),o&&t(_u),o&&t(xe),J(er),J(ar),J(wn),J(Jn),o&&t(yu),o&&t(Bo),J(sr),o&&t(bu),o&&t(Ee),J(rr),J(cr),J(Un),J(Bn),J(zn),o&&t(Mu),o&&t(jo),J(pr),o&&t(Tu),o&&t($o),J(ur),J(hr),J(xn),o&&t(ku),o&&t(xo),J(mr),o&&t(vu),o&&t(Ce),J(fr),J(Cn),J(br),J(qn),J(In),o&&t(wu),o&&t(Co),J(Mr),o&&t(Ju),o&&t(qe),J(Tr),J(Gn),J(Jr),J(Wn),J(Nn),J(Rn),o&&t(Fu),o&&t(Io),J(Fr),o&&t(Uu),o&&t(P),J(Ur),J(qr),J(Vn),J(Sn),J(Ir),J(Yn),J(Zr),J(Pn),o&&t(Bu),o&&t(Go),J(Gr),o&&t(zu),o&&t(O),J(Wr),J(Qr),J(Dn),J(Hn),J(Ln),J(Pr),J(ea),J(Or),J(oa),o&&t(ju),o&&t(No),J(Dr),o&&t($u),o&&t(X),J(Hr),J(si),J(aa),J(sa),J(ri),J(ia),J(ii),J(da),o&&t(xu),o&&t(Xo),J(li),o&&t(Eu),o&&t(V),J(di),J(_i),J(pa),J(ua),J(yi),J(ma),J(bi),J(ga)}}}const zJ={local:"mbart-and-mbart50",sections:[{local:"overview-of-mbart",sections:[{local:"training-of-mbart",title:"Training of MBart"}],title:"Overview of MBart"},{local:"overview-of-mbart50",sections:[{local:"training-of-mbart50",title:"Training of MBart-50"}],title:"Overview of MBart-50"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.MBartConfig",title:"MBartConfig"},{local:"transformers.MBartTokenizer",title:"MBartTokenizer"},{local:"transformers.MBartTokenizerFast",title:"MBartTokenizerFast"},{local:"transformers.MBart50Tokenizer",title:"MBart50Tokenizer"},{local:"transformers.MBart50TokenizerFast",title:"MBart50TokenizerFast"},{local:"transformers.MBartModel",title:"MBartModel"},{local:"transformers.MBartForConditionalGeneration",title:"MBartForConditionalGeneration"},{local:"transformers.MBartForQuestionAnswering",title:"MBartForQuestionAnswering"},{local:"transformers.MBartForSequenceClassification",title:"MBartForSequenceClassification"},{local:"transformers.MBartForCausalLM",title:"MBartForCausalLM"},{local:"transformers.TFMBartModel",title:"TFMBartModel"},{local:"transformers.TFMBartForConditionalGeneration",title:"TFMBartForConditionalGeneration"},{local:"transformers.FlaxMBartModel",title:"FlaxMBartModel"},{local:"transformers.FlaxMBartForConditionalGeneration",title:"FlaxMBartForConditionalGeneration"},{local:"transformers.FlaxMBartForSequenceClassification",title:"FlaxMBartForSequenceClassification"},{local:"transformers.FlaxMBartForQuestionAnswering",title:"FlaxMBartForQuestionAnswering"}],title:"MBart and MBart-50"};function jJ(F){return R0(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ZJ extends Z0{constructor(d){super();G0(this,d,jJ,BJ,W0,{})}}export{ZJ as default,zJ as metadata};
