import{S as jx,i as Bx,s as zx,e as n,k as c,w as v,t as i,M as Jx,c as a,d as t,m as p,a as s,x as k,h as d,b as h,N as $x,G as e,g as _,y as T,q as w,o as M,B as F,v as qx,L as R}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ie}from"../../chunks/Tip-hf-doc-builder.js";import{D as q}from"../../chunks/Docstring-hf-doc-builder.js";import{C as G}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ae}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as N}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as oM}from"../../chunks/PipelineTag-hf-doc-builder.js";function Ex($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJhcnRDb25maWclMkMlMjBCYXJ0TW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQkFSVCUyMGZhY2Vib29rJTJGYmFydC1sYXJnZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCYXJ0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGZhY2Vib29rJTJGYmFydC1sYXJnZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQmFydE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BartConfig, BartModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BART facebook/bart-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BartConfig()

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BartTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">31414</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">20920</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]`}}),{c(){l=n("p"),y=i("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Ux($){let l,y,f,m,b;return{c(){l=n("p"),y=i("When used with "),f=n("code"),m=i("is_split_into_words=True"),b=i(", this tokenizer will add a space before each word (even the first one).")},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"When used with "),f=a(u,"CODE",{});var j=s(f);m=d(j,"is_split_into_words=True"),j.forEach(t),b=d(u,", this tokenizer will add a space before each word (even the first one)."),u.forEach(t)},m(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function Ix($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJhcnRUb2tlbml6ZXJGYXN0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQmFydFRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmFydC1iYXNlJTIyKSUwQXRva2VuaXplciglMjJIZWxsbyUyMHdvcmxkJTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUwQXRva2VuaXplciglMjIlMjBIZWxsbyUyMHdvcmxkJTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BartTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BartTokenizerFast.from_pretrained(<span class="hljs-string">&quot;facebook/bart-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">31414</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">20920</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]`}}),{c(){l=n("p"),y=i("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Zx($){let l,y,f,m,b,r,u,j;return{c(){l=n("p"),y=i("When used with "),f=n("code"),m=i("is_split_into_words=True"),b=i(", this tokenizer needs to be instantiated with "),r=n("code"),u=i("add_prefix_space=True"),j=i(".")},l(se){l=a(se,"P",{});var P=s(l);y=d(P,"When used with "),f=a(P,"CODE",{});var Z=s(f);m=d(Z,"is_split_into_words=True"),Z.forEach(t),b=d(P,", this tokenizer needs to be instantiated with "),r=a(P,"CODE",{});var re=s(r);u=d(re,"add_prefix_space=True"),re.forEach(t),j=d(P,"."),P.forEach(t)},m(se,P){_(se,l,P),e(l,y),e(l,f),e(f,m),e(l,b),e(l,r),e(r,u),e(l,j)},d(se){se&&t(l)}}}function Gx($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function Wx($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCYXJ0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmFydC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmFydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BartModel
<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/bart-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BartModel.from_pretrained(<span class="hljs-string">&quot;facebook/bart-base&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Ax($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function Sx($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBCYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UtY25uJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmFydC1sYXJnZS1jbm4lMjIpJTBBJTBBQVJUSUNMRV9UT19TVU1NQVJJWkUlMjAlM0QlMjAoJTBBJTIwJTIwJTIwJTIwJTIyUEclMjZFJTIwc3RhdGVkJTIwaXQlMjBzY2hlZHVsZWQlMjB0aGUlMjBibGFja291dHMlMjBpbiUyMHJlc3BvbnNlJTIwdG8lMjBmb3JlY2FzdHMlMjBmb3IlMjBoaWdoJTIwd2luZHMlMjAlMjIlMEElMjAlMjAlMjAlMjAlMjJhbWlkJTIwZHJ5JTIwY29uZGl0aW9ucy4lMjBUaGUlMjBhaW0lMjBpcyUyMHRvJTIwcmVkdWNlJTIwdGhlJTIwcmlzayUyMG9mJTIwd2lsZGZpcmVzLiUyME5lYXJseSUyMDgwMCUyMHRob3VzYW5kJTIwY3VzdG9tZXJzJTIwd2VyZSUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMnNjaGVkdWxlZCUyMHRvJTIwYmUlMjBhZmZlY3RlZCUyMGJ5JTIwdGhlJTIwc2h1dG9mZnMlMjB3aGljaCUyMHdlcmUlMjBleHBlY3RlZCUyMHRvJTIwbGFzdCUyMHRocm91Z2glMjBhdCUyMGxlYXN0JTIwbWlkZGF5JTIwdG9tb3Jyb3cuJTIyJTBBKSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUJBUlRJQ0xFX1RPX1NVTU1BUklaRSU1RCUyQyUyMG1heF9sZW5ndGglM0QxMDI0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUyMFN1bW1hcnklMEFzdW1tYXJ5X2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RCUyQyUyMG51bV9iZWFtcyUzRDIlMkMlMjBtaW5fbGVuZ3RoJTNEMCUyQyUyMG1heF9sZW5ndGglM0QyMCklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKHN1bW1hcnlfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BartForConditionalGeneration

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

<span class="hljs-meta">&gt;&gt;&gt; </span>ARTICLE_TO_SUMMARIZE = (
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;PG&amp;E stated it scheduled the blackouts in response to forecasts for high winds &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;amid dry conditions. The aim is to reduce the risk of wildfires. Nearly 800 thousand customers were &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;scheduled to be affected by the shutoffs which were expected to last through at least midday tomorrow.&quot;</span>
<span class="hljs-meta">... </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;pt&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">2</span>, min_length=<span class="hljs-number">0</span>, max_length=<span class="hljs-number">20</span>)
<span class="hljs-meta">&gt;&gt;&gt; </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>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;PG&amp;E scheduled the blackouts in response to forecasts for high winds amid dry conditions&#x27;</span>`}}),{c(){l=n("p"),y=i("Summarization example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Summarization example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Nx($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBCYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtYmFzZSUyMiklMEElMEFUWFQlMjAlM0QlMjAlMjJNeSUyMGZyaWVuZHMlMjBhcmUlMjAlM0NtYXNrJTNFJTIwYnV0JTIwdGhleSUyMGVhdCUyMHRvbyUyMG1hbnklMjBjYXJicy4lMjIlMEFpbnB1dF9pZHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCVFhUJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEFsb2dpdHMlMjAlM0QlMjBtb2RlbChpbnB1dF9pZHMpLmxvZ2l0cyUwQSUwQW1hc2tlZF9pbmRleCUyMCUzRCUyMChpbnB1dF9pZHMlNUIwJTVEJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpLm5vbnplcm8oKS5pdGVtKCklMEFwcm9icyUyMCUzRCUyMGxvZ2l0cyU1QjAlMkMlMjBtYXNrZWRfaW5kZXglNUQuc29mdG1heChkaW0lM0QwKSUwQXZhbHVlcyUyQyUyMHByZWRpY3Rpb25zJTIwJTNEJTIwcHJvYnMudG9wayg1KSUwQSUwQXRva2VuaXplci5kZWNvZGUocHJlZGljdGlvbnMpLnNwbGl0KCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BartForConditionalGeneration

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

<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;My friends are &lt;mask&gt; but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], 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;not&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>, <span class="hljs-string">&#x27;healthy&#x27;</span>, <span class="hljs-string">&#x27;great&#x27;</span>, <span class="hljs-string">&#x27;very&#x27;</span>]`}}),{c(){l=n("p"),y=i("Mask filling example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Mask filling example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Rx($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function Xx($){let l,y,f,m,b;return m=new G({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJhcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydmFsaGFsbGElMkZiYXJ0LWxhcmdlLXNzdDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBCYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydmFsaGFsbGElMkZiYXJ0LWxhcmdlLXNzdDIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEJhcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ2YWxoYWxsYSUyRmJhcnQtbGFyZ2Utc3N0MiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",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, BartForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;valhalla/bart-large-sst2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;valhalla/bart-large-sst2&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>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;POSITIVE&#x27;</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 = BartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;valhalla/bart-large-sst2&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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.0</span>`}}),{c(){l=n("p"),y=i("Example of single-label classification:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example of single-label classification:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Vx($){let l,y,f,m,b;return m=new G({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJhcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydmFsaGFsbGElMkZiYXJ0LWxhcmdlLXNzdDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBCYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydmFsaGFsbGElMkZiYXJ0LWxhcmdlLXNzdDIlMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEJhcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJ2YWxoYWxsYSUyRmJhcnQtbGFyZ2Utc3N0MiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, BartForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;valhalla/bart-large-sst2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;valhalla/bart-large-sst2&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 = BartForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;valhalla/bart-large-sst2&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(){l=n("p"),y=i("Example of multi-label classification:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example of multi-label classification:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Px($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function Qx($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCYXJ0Rm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnZhbGhhbGxhJTJGYmFydC1sYXJnZS1maW5ldHVuZWQtc3F1YWR2MSUyMiklMEFtb2RlbCUyMCUzRCUyMEJhcnRGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIydmFsaGFsbGElMkZiYXJ0LWxhcmdlLWZpbmV0dW5lZC1zcXVhZHYxJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0QlMjBvdXRwdXRzLnN0YXJ0X2xvZ2l0cy5hcmdtYXgoKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBvdXRwdXRzLmVuZF9sb2dpdHMuYXJnbWF4KCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVEJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEElMEElMjMlMjB0YXJnZXQlMjBpcyUyMCUyMm5pY2UlMjBwdXBwZXQlMjIlMEF0YXJnZXRfc3RhcnRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNSU1RCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBzdGFydF9wb3NpdGlvbnMlM0R0YXJnZXRfc3RhcnRfaW5kZXglMkMlMjBlbmRfcG9zaXRpb25zJTNEdGFyZ2V0X2VuZF9pbmRleCklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBcm91bmQobG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BartForQuestionAnswering
<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;valhalla/bart-large-finetuned-squadv1&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BartForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;valhalla/bart-large-finetuned-squadv1&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>tokenizer.decode(predict_answer_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27; nice puppet&#x27;</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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.59</span>`}}),{c(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Yx($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCYXJ0Rm9yQ2F1c2FsTE0lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEJhcnRGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWJhc2UlMjIlMkMlMjBhZGRfY3Jvc3NfYXR0ZW50aW9uJTNERmFsc2UpJTBBYXNzZXJ0JTIwbW9kZWwuY29uZmlnLmlzX2RlY29kZXIlMkMlMjBmJTIyJTdCbW9kZWwuX19jbGFzc19fJTdEJTIwaGFzJTIwdG8lMjBiZSUyMGNvbmZpZ3VyZWQlMjBhcyUyMGElMjBkZWNvZGVyLiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlMEFleHBlY3RlZF9zaGFwZSUyMCUzRCUyMCU1QjElMkMlMjBpbnB1dHMuaW5wdXRfaWRzLnNoYXBlJTVCLTElNUQlMkMlMjBtb2RlbC5jb25maWcudm9jYWJfc2l6ZSU1RCUwQWxpc3QobG9naXRzLnNoYXBlKSUyMCUzRCUzRCUyMGV4cGVjdGVkX3NoYXBl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BartForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BartForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/bart-base&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Lx($){let l,y,f,m,b,r,u,j,se,P,Z,re,ie,B,Ve,Y,Fe,it,D,de,qe,le,Pe,we,ce,Qe,Ze,W,be,Ee,K,E,C,Ye,ee,ye,Le,Q,Oe,He,U,xe,pe,Ge,te,L,De,Ke,X,et,he,Ce,$e,I,je,A,We,ve;return{c(){l=n("p"),y=i("TensorFlow models and layers in "),f=n("code"),m=i("transformers"),b=i(" accept two formats as input:"),r=c(),u=n("ul"),j=n("li"),se=i("having all inputs as keyword arguments (like PyTorch models), or"),P=c(),Z=n("li"),re=i("having all inputs as a list, tuple or dict in the first positional argument."),ie=c(),B=n("p"),Ve=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 `),Y=n("code"),Fe=i("model.fit()"),it=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n("code"),de=i("model.fit()"),qe=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),le=n("code"),Pe=i("fit()"),we=i(" and "),ce=n("code"),Qe=i("predict()"),Ze=i(`, such as when creating your own layers or models with
the Keras `),W=n("code"),be=i("Functional"),Ee=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),K=c(),E=n("ul"),C=n("li"),Ye=i("a single Tensor with "),ee=n("code"),ye=i("input_ids"),Le=i(" only and nothing else: "),Q=n("code"),Oe=i("model(input_ids)"),He=c(),U=n("li"),xe=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),pe=n("code"),Ge=i("model([input_ids, attention_mask])"),te=i(" or "),L=n("code"),De=i("model([input_ids, attention_mask, token_type_ids])"),Ke=c(),X=n("li"),et=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),he=n("code"),Ce=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),$e=c(),I=n("p"),je=i(`Note that when creating models and layers with
`),A=n("a"),We=i("subclassing"),ve=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(x){l=a(x,"P",{});var z=s(l);y=d(z,"TensorFlow models and layers in "),f=a(z,"CODE",{});var wt=s(f);m=d(wt,"transformers"),wt.forEach(t),b=d(z," accept two formats as input:"),z.forEach(t),r=p(x),u=a(x,"UL",{});var Be=s(u);j=a(Be,"LI",{});var Ae=s(j);se=d(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),P=p(Be),Z=a(Be,"LI",{});var dt=s(Z);re=d(dt,"having all inputs as a list, tuple or dict in the first positional argument."),dt.forEach(t),Be.forEach(t),ie=p(x),B=a(x,"P",{});var J=s(B);Ve=d(J,`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 `),Y=a(J,"CODE",{});var Mt=s(Y);Fe=d(Mt,"model.fit()"),Mt.forEach(t),it=d(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=a(J,"CODE",{});var oe=s(D);de=d(oe,"model.fit()"),oe.forEach(t),qe=d(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),le=a(J,"CODE",{});var lt=s(le);Pe=d(lt,"fit()"),lt.forEach(t),we=d(J," and "),ce=a(J,"CODE",{});var Ft=s(ce);Qe=d(Ft,"predict()"),Ft.forEach(t),Ze=d(J,`, such as when creating your own layers or models with
the Keras `),W=a(J,"CODE",{});var xt=s(W);be=d(xt,"Functional"),xt.forEach(t),Ee=d(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),K=p(x),E=a(x,"UL",{});var V=s(E);C=a(V,"LI",{});var ue=s(C);Ye=d(ue,"a single Tensor with "),ee=a(ue,"CODE",{});var $t=s(ee);ye=d($t,"input_ids"),$t.forEach(t),Le=d(ue," only and nothing else: "),Q=a(ue,"CODE",{});var ct=s(Q);Oe=d(ct,"model(input_ids)"),ct.forEach(t),ue.forEach(t),He=p(V),U=a(V,"LI",{});var me=s(U);xe=d(me,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),pe=a(me,"CODE",{});var jt=s(pe);Ge=d(jt,"model([input_ids, attention_mask])"),jt.forEach(t),te=d(me," or "),L=a(me,"CODE",{});var pt=s(L);De=d(pt,"model([input_ids, attention_mask, token_type_ids])"),pt.forEach(t),me.forEach(t),Ke=p(V),X=a(V,"LI",{});var tt=s(X);et=d(tt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),he=a(tt,"CODE",{});var Bt=s(he);Ce=d(Bt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Bt.forEach(t),tt.forEach(t),V.forEach(t),$e=p(x),I=a(x,"P",{});var ke=s(I);je=d(ke,`Note that when creating models and layers with
`),A=a(ke,"A",{href:!0,rel:!0});var zt=s(A);We=d(zt,"subclassing"),zt.forEach(t),ve=d(ke,` 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!`),ke.forEach(t),this.h()},h(){h(A,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(A,"rel","nofollow")},m(x,z){_(x,l,z),e(l,y),e(l,f),e(f,m),e(l,b),_(x,r,z),_(x,u,z),e(u,j),e(j,se),e(u,P),e(u,Z),e(Z,re),_(x,ie,z),_(x,B,z),e(B,Ve),e(B,Y),e(Y,Fe),e(B,it),e(B,D),e(D,de),e(B,qe),e(B,le),e(le,Pe),e(B,we),e(B,ce),e(ce,Qe),e(B,Ze),e(B,W),e(W,be),e(B,Ee),_(x,K,z),_(x,E,z),e(E,C),e(C,Ye),e(C,ee),e(ee,ye),e(C,Le),e(C,Q),e(Q,Oe),e(E,He),e(E,U),e(U,xe),e(U,pe),e(pe,Ge),e(U,te),e(U,L),e(L,De),e(E,Ke),e(E,X),e(X,et),e(X,he),e(he,Ce),_(x,$e,z),_(x,I,z),e(I,je),e(I,A),e(A,We),e(I,ve)},d(x){x&&t(l),x&&t(r),x&&t(u),x&&t(ie),x&&t(B),x&&t(K),x&&t(E),x&&t($e),x&&t(I)}}}function Ox($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function Hx($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJhcnRNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWxhcmdlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZCYXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmFydC1sYXJnZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBartModel
<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/bart-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBartModel.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function Dx($){let l,y,f,m,b,r,u,j,se,P,Z,re,ie,B,Ve,Y,Fe,it,D,de,qe,le,Pe,we,ce,Qe,Ze,W,be,Ee,K,E,C,Ye,ee,ye,Le,Q,Oe,He,U,xe,pe,Ge,te,L,De,Ke,X,et,he,Ce,$e,I,je,A,We,ve;return{c(){l=n("p"),y=i("TensorFlow models and layers in "),f=n("code"),m=i("transformers"),b=i(" accept two formats as input:"),r=c(),u=n("ul"),j=n("li"),se=i("having all inputs as keyword arguments (like PyTorch models), or"),P=c(),Z=n("li"),re=i("having all inputs as a list, tuple or dict in the first positional argument."),ie=c(),B=n("p"),Ve=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 `),Y=n("code"),Fe=i("model.fit()"),it=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n("code"),de=i("model.fit()"),qe=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),le=n("code"),Pe=i("fit()"),we=i(" and "),ce=n("code"),Qe=i("predict()"),Ze=i(`, such as when creating your own layers or models with
the Keras `),W=n("code"),be=i("Functional"),Ee=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),K=c(),E=n("ul"),C=n("li"),Ye=i("a single Tensor with "),ee=n("code"),ye=i("input_ids"),Le=i(" only and nothing else: "),Q=n("code"),Oe=i("model(input_ids)"),He=c(),U=n("li"),xe=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),pe=n("code"),Ge=i("model([input_ids, attention_mask])"),te=i(" or "),L=n("code"),De=i("model([input_ids, attention_mask, token_type_ids])"),Ke=c(),X=n("li"),et=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),he=n("code"),Ce=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),$e=c(),I=n("p"),je=i(`Note that when creating models and layers with
`),A=n("a"),We=i("subclassing"),ve=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(x){l=a(x,"P",{});var z=s(l);y=d(z,"TensorFlow models and layers in "),f=a(z,"CODE",{});var wt=s(f);m=d(wt,"transformers"),wt.forEach(t),b=d(z," accept two formats as input:"),z.forEach(t),r=p(x),u=a(x,"UL",{});var Be=s(u);j=a(Be,"LI",{});var Ae=s(j);se=d(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),P=p(Be),Z=a(Be,"LI",{});var dt=s(Z);re=d(dt,"having all inputs as a list, tuple or dict in the first positional argument."),dt.forEach(t),Be.forEach(t),ie=p(x),B=a(x,"P",{});var J=s(B);Ve=d(J,`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 `),Y=a(J,"CODE",{});var Mt=s(Y);Fe=d(Mt,"model.fit()"),Mt.forEach(t),it=d(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=a(J,"CODE",{});var oe=s(D);de=d(oe,"model.fit()"),oe.forEach(t),qe=d(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),le=a(J,"CODE",{});var lt=s(le);Pe=d(lt,"fit()"),lt.forEach(t),we=d(J," and "),ce=a(J,"CODE",{});var Ft=s(ce);Qe=d(Ft,"predict()"),Ft.forEach(t),Ze=d(J,`, such as when creating your own layers or models with
the Keras `),W=a(J,"CODE",{});var xt=s(W);be=d(xt,"Functional"),xt.forEach(t),Ee=d(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),K=p(x),E=a(x,"UL",{});var V=s(E);C=a(V,"LI",{});var ue=s(C);Ye=d(ue,"a single Tensor with "),ee=a(ue,"CODE",{});var $t=s(ee);ye=d($t,"input_ids"),$t.forEach(t),Le=d(ue," only and nothing else: "),Q=a(ue,"CODE",{});var ct=s(Q);Oe=d(ct,"model(input_ids)"),ct.forEach(t),ue.forEach(t),He=p(V),U=a(V,"LI",{});var me=s(U);xe=d(me,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),pe=a(me,"CODE",{});var jt=s(pe);Ge=d(jt,"model([input_ids, attention_mask])"),jt.forEach(t),te=d(me," or "),L=a(me,"CODE",{});var pt=s(L);De=d(pt,"model([input_ids, attention_mask, token_type_ids])"),pt.forEach(t),me.forEach(t),Ke=p(V),X=a(V,"LI",{});var tt=s(X);et=d(tt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),he=a(tt,"CODE",{});var Bt=s(he);Ce=d(Bt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Bt.forEach(t),tt.forEach(t),V.forEach(t),$e=p(x),I=a(x,"P",{});var ke=s(I);je=d(ke,`Note that when creating models and layers with
`),A=a(ke,"A",{href:!0,rel:!0});var zt=s(A);We=d(zt,"subclassing"),zt.forEach(t),ve=d(ke,` 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!`),ke.forEach(t),this.h()},h(){h(A,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(A,"rel","nofollow")},m(x,z){_(x,l,z),e(l,y),e(l,f),e(f,m),e(l,b),_(x,r,z),_(x,u,z),e(u,j),e(j,se),e(u,P),e(u,Z),e(Z,re),_(x,ie,z),_(x,B,z),e(B,Ve),e(B,Y),e(Y,Fe),e(B,it),e(B,D),e(D,de),e(B,qe),e(B,le),e(le,Pe),e(B,we),e(B,ce),e(ce,Qe),e(B,Ze),e(B,W),e(W,be),e(B,Ee),_(x,K,z),_(x,E,z),e(E,C),e(C,Ye),e(C,ee),e(ee,ye),e(C,Le),e(C,Q),e(Q,Oe),e(E,He),e(E,U),e(U,xe),e(U,pe),e(pe,Ge),e(U,te),e(U,L),e(L,De),e(E,Ke),e(E,X),e(X,et),e(X,he),e(he,Ce),_(x,$e,z),_(x,I,z),e(I,je),e(I,A),e(A,We),e(I,ve)},d(x){x&&t(l),x&&t(r),x&&t(u),x&&t(ie),x&&t(B),x&&t(K),x&&t(E),x&&t($e),x&&t(I)}}}function Kx($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function e$($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMFRGQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWxhcmdlJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmFydC1sYXJnZSUyMiklMEElMEFBUlRJQ0xFX1RPX1NVTU1BUklaRSUyMCUzRCUyMCUyMk15JTIwZnJpZW5kcyUyMGFyZSUyMGNvb2wlMjBidXQlMjB0aGV5JTIwZWF0JTIwdG9vJTIwbWFueSUyMGNhcmJzLiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUJBUlRJQ0xFX1RPX1NVTU1BUklaRSU1RCUyQyUyMG1heF9sZW5ndGglM0QxMDI0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUyMFN1bW1hcnklMEFzdW1tYXJ5X2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RCUyQyUyMG51bV9iZWFtcyUzRDQlMkMlMjBtYXhfbGVuZ3RoJTNENSklMEFwcmludCh0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKHN1bW1hcnlfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBartForConditionalGeneration

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

<span class="hljs-meta">&gt;&gt;&gt; </span>ARTICLE_TO_SUMMARIZE = <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([ARTICLE_TO_SUMMARIZE], max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;tf&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>)
<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(){l=n("p"),y=i("Summarization example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Summarization example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function t$($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UlMjIpJTBBVFhUJTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwJTNDbWFzayUzRSUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBJTBBbW9kZWwlMjAlM0QlMjBURkJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmFydC1sYXJnZSUyMiklMEFpbnB1dF9pZHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCVFhUJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEFsb2dpdHMlMjAlM0QlMjBtb2RlbChpbnB1dF9pZHMpLmxvZ2l0cyUwQXByb2JzJTIwJTNEJTIwdGYubm4uc29mdG1heChsb2dpdHMlNUIwJTVEKSUwQSUyMyUyMHByb2JzJTVCNSU1RCUyMGlzJTIwYXNzb2NpYXRlZCUyMHdpdGglMjB0aGUlMjBtYXNrJTIwdG9rZW4=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;My friends are &lt;mask&gt; but they eat too many carbs.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], 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>probs = tf.nn.softmax(logits[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># probs[5] is associated with the mask token</span>`}}),{c(){l=n("p"),y=i("Mask filling example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Mask filling example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function o$($){let l,y,f,m,b,r,u,j,se,P,Z,re,ie,B,Ve,Y,Fe,it,D,de,qe,le,Pe,we,ce,Qe,Ze,W,be,Ee,K,E,C,Ye,ee,ye,Le,Q,Oe,He,U,xe,pe,Ge,te,L,De,Ke,X,et,he,Ce,$e,I,je,A,We,ve;return{c(){l=n("p"),y=i("TensorFlow models and layers in "),f=n("code"),m=i("transformers"),b=i(" accept two formats as input:"),r=c(),u=n("ul"),j=n("li"),se=i("having all inputs as keyword arguments (like PyTorch models), or"),P=c(),Z=n("li"),re=i("having all inputs as a list, tuple or dict in the first positional argument."),ie=c(),B=n("p"),Ve=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 `),Y=n("code"),Fe=i("model.fit()"),it=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n("code"),de=i("model.fit()"),qe=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),le=n("code"),Pe=i("fit()"),we=i(" and "),ce=n("code"),Qe=i("predict()"),Ze=i(`, such as when creating your own layers or models with
the Keras `),W=n("code"),be=i("Functional"),Ee=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),K=c(),E=n("ul"),C=n("li"),Ye=i("a single Tensor with "),ee=n("code"),ye=i("input_ids"),Le=i(" only and nothing else: "),Q=n("code"),Oe=i("model(input_ids)"),He=c(),U=n("li"),xe=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),pe=n("code"),Ge=i("model([input_ids, attention_mask])"),te=i(" or "),L=n("code"),De=i("model([input_ids, attention_mask, token_type_ids])"),Ke=c(),X=n("li"),et=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),he=n("code"),Ce=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),$e=c(),I=n("p"),je=i(`Note that when creating models and layers with
`),A=n("a"),We=i("subclassing"),ve=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(x){l=a(x,"P",{});var z=s(l);y=d(z,"TensorFlow models and layers in "),f=a(z,"CODE",{});var wt=s(f);m=d(wt,"transformers"),wt.forEach(t),b=d(z," accept two formats as input:"),z.forEach(t),r=p(x),u=a(x,"UL",{});var Be=s(u);j=a(Be,"LI",{});var Ae=s(j);se=d(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),P=p(Be),Z=a(Be,"LI",{});var dt=s(Z);re=d(dt,"having all inputs as a list, tuple or dict in the first positional argument."),dt.forEach(t),Be.forEach(t),ie=p(x),B=a(x,"P",{});var J=s(B);Ve=d(J,`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 `),Y=a(J,"CODE",{});var Mt=s(Y);Fe=d(Mt,"model.fit()"),Mt.forEach(t),it=d(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=a(J,"CODE",{});var oe=s(D);de=d(oe,"model.fit()"),oe.forEach(t),qe=d(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),le=a(J,"CODE",{});var lt=s(le);Pe=d(lt,"fit()"),lt.forEach(t),we=d(J," and "),ce=a(J,"CODE",{});var Ft=s(ce);Qe=d(Ft,"predict()"),Ft.forEach(t),Ze=d(J,`, such as when creating your own layers or models with
the Keras `),W=a(J,"CODE",{});var xt=s(W);be=d(xt,"Functional"),xt.forEach(t),Ee=d(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),K=p(x),E=a(x,"UL",{});var V=s(E);C=a(V,"LI",{});var ue=s(C);Ye=d(ue,"a single Tensor with "),ee=a(ue,"CODE",{});var $t=s(ee);ye=d($t,"input_ids"),$t.forEach(t),Le=d(ue," only and nothing else: "),Q=a(ue,"CODE",{});var ct=s(Q);Oe=d(ct,"model(input_ids)"),ct.forEach(t),ue.forEach(t),He=p(V),U=a(V,"LI",{});var me=s(U);xe=d(me,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),pe=a(me,"CODE",{});var jt=s(pe);Ge=d(jt,"model([input_ids, attention_mask])"),jt.forEach(t),te=d(me," or "),L=a(me,"CODE",{});var pt=s(L);De=d(pt,"model([input_ids, attention_mask, token_type_ids])"),pt.forEach(t),me.forEach(t),Ke=p(V),X=a(V,"LI",{});var tt=s(X);et=d(tt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),he=a(tt,"CODE",{});var Bt=s(he);Ce=d(Bt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Bt.forEach(t),tt.forEach(t),V.forEach(t),$e=p(x),I=a(x,"P",{});var ke=s(I);je=d(ke,`Note that when creating models and layers with
`),A=a(ke,"A",{href:!0,rel:!0});var zt=s(A);We=d(zt,"subclassing"),zt.forEach(t),ve=d(ke,` 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!`),ke.forEach(t),this.h()},h(){h(A,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(A,"rel","nofollow")},m(x,z){_(x,l,z),e(l,y),e(l,f),e(f,m),e(l,b),_(x,r,z),_(x,u,z),e(u,j),e(j,se),e(u,P),e(u,Z),e(Z,re),_(x,ie,z),_(x,B,z),e(B,Ve),e(B,Y),e(Y,Fe),e(B,it),e(B,D),e(D,de),e(B,qe),e(B,le),e(le,Pe),e(B,we),e(B,ce),e(ce,Qe),e(B,Ze),e(B,W),e(W,be),e(B,Ee),_(x,K,z),_(x,E,z),e(E,C),e(C,Ye),e(C,ee),e(ee,ye),e(C,Le),e(C,Q),e(Q,Oe),e(E,He),e(E,U),e(U,xe),e(U,pe),e(pe,Ge),e(U,te),e(U,L),e(L,De),e(E,Ke),e(E,X),e(X,et),e(X,he),e(he,Ce),_(x,$e,z),_(x,I,z),e(I,je),e(I,A),e(A,We),e(I,ve)},d(x){x&&t(l),x&&t(r),x&&t(u),x&&t(ie),x&&t(B),x&&t(K),x&&t(E),x&&t($e),x&&t(I)}}}function n$($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function a$($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function s$($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmFydE1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmFydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBartModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function i$($){let l,y,f,m,b;return m=new G({props:{code:"aW1wb3J0JTIwamF4Lm51bXB5JTIwYXMlMjBqbnAlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZsYXhCYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWxhcmdlLWNubiUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UtY25uJTIyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJNeSUyMGZyaWVuZHMlMjBhcmUlMjBjb29sJTIwYnV0JTIwdGhleSUyMGVhdCUyMHRvbyUyMG1hbnklMjBjYXJicy4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUyQyUyMG1heF9sZW5ndGglM0QxMDI0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBZW5jb2Rlcl9vdXRwdXRzJTIwJTNEJTIwbW9kZWwuZW5jb2RlKCoqaW5wdXRzKSUwQSUwQWRlY29kZXJfc3RhcnRfdG9rZW5faWQlMjAlM0QlMjBtb2RlbC5jb25maWcuZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQWRlY29kZXJfaW5wdXRfaWRzJTIwJTNEJTIwam5wLm9uZXMoKGlucHV0cy5pbnB1dF9pZHMuc2hhcGUlNUIwJTVEJTJDJTIwMSklMkMlMjBkdHlwZSUzRCUyMmk0JTIyKSUyMColMjBkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmRlY29kZShkZWNvZGVyX2lucHV0X2lkcyUyQyUyMGVuY29kZXJfb3V0cHV0cyklMEFsYXN0X2RlY29kZXJfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax.numpy <span class="hljs-keyword">as</span> jnp
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function d$($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function l$($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheEJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmFydC1sYXJnZS1jbm4lMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWxhcmdlLWNubiUyMiklMEElMEFBUlRJQ0xFX1RPX1NVTU1BUklaRSUyMCUzRCUyMCUyMk15JTIwZnJpZW5kcyUyMGFyZSUyMGNvb2wlMjBidXQlMjB0aGV5JTIwZWF0JTIwdG9vJTIwbWFueSUyMGNhcmJzLiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUJBUlRJQ0xFX1RPX1NVTU1BUklaRSU1RCUyQyUyMG1heF9sZW5ndGglM0QxMDI0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUyMFN1bW1hcnklMEFzdW1tYXJ5X2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RCkuc2VxdWVuY2VzJTBBcHJpbnQodG9rZW5pemVyLmJhdGNoX2RlY29kZShzdW1tYXJ5X2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBartForConditionalGeneration

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

<span class="hljs-meta">&gt;&gt;&gt; </span>ARTICLE_TO_SUMMARIZE = <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([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>]).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(){l=n("p"),y=i("Summarization example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Summarization example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function c$($){let l,y,f,m,b;return m=new G({props:{code:"aW1wb3J0JTIwamF4JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheEJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmFydC1sYXJnZSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UlMjIpJTBBJTBBVFhUJTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwJTNDbWFzayUzRSUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QlRYVCU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcykubG9naXRzJTBBbWFza2VkX2luZGV4JTIwJTNEJTIwKGlucHV0X2lkcyU1QjAlNUQlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCkubm9uemVybygpJTVCMCU1RC5pdGVtKCklMEFwcm9icyUyMCUzRCUyMGpheC5ubi5zb2Z0bWF4KGxvZ2l0cyU1QjAlMkMlMjBtYXNrZWRfaW5kZXglNUQlMkMlMjBheGlzJTNEMCklMEF2YWx1ZXMlMkMlMjBwcmVkaWN0aW9ucyUyMCUzRCUyMGpheC5sYXgudG9wX2socHJvYnMlMkMlMjBrJTNEMSklMEElMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3Rpb25zKS5zcGxpdCgp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBartForConditionalGeneration

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

<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;My friends are &lt;mask&gt; but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], return_tensors=<span class="hljs-string">&quot;jax&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 = jax.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 = jax.lax.top_k(probs, k=<span class="hljs-number">1</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function u$($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function m$($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmFydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBartForSequenceClassification

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

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function g$($){let l,y,f,m,b;return m=new G({props:{code:"aW1wb3J0JTIwamF4Lm51bXB5JTIwYXMlMjBqbnAlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZsYXhCYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWxhcmdlLWNubiUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UtY25uJTIyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJNeSUyMGZyaWVuZHMlMjBhcmUlMjBjb29sJTIwYnV0JTIwdGhleSUyMGVhdCUyMHRvbyUyMG1hbnklMjBjYXJicy4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUyQyUyMG1heF9sZW5ndGglM0QxMDI0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBZW5jb2Rlcl9vdXRwdXRzJTIwJTNEJTIwbW9kZWwuZW5jb2RlKCoqaW5wdXRzKSUwQSUwQWRlY29kZXJfc3RhcnRfdG9rZW5faWQlMjAlM0QlMjBtb2RlbC5jb25maWcuZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQWRlY29kZXJfaW5wdXRfaWRzJTIwJTNEJTIwam5wLm9uZXMoKGlucHV0cy5pbnB1dF9pZHMuc2hhcGUlNUIwJTVEJTJDJTIwMSklMkMlMjBkdHlwZSUzRCUyMmk0JTIyKSUyMColMjBkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmRlY29kZShkZWNvZGVyX2lucHV0X2lkcyUyQyUyMGVuY29kZXJfb3V0cHV0cyklMEFsYXN0X2RlY29kZXJfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax.numpy <span class="hljs-keyword">as</span> jnp
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function _$($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function b$($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmFydEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmFydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtYmFzZSUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBc3RhcnRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMlMEFlbmRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBartForQuestionAnswering

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

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function v$($){let l,y,f,m,b;return m=new G({props:{code:"aW1wb3J0JTIwamF4Lm51bXB5JTIwYXMlMjBqbnAlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZsYXhCYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWxhcmdlLWNubiUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UtY25uJTIyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJNeSUyMGZyaWVuZHMlMjBhcmUlMjBjb29sJTIwYnV0JTIwdGhleSUyMGVhdCUyMHRvbyUyMG1hbnklMjBjYXJicy4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUyQyUyMG1heF9sZW5ndGglM0QxMDI0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBZW5jb2Rlcl9vdXRwdXRzJTIwJTNEJTIwbW9kZWwuZW5jb2RlKCoqaW5wdXRzKSUwQSUwQWRlY29kZXJfc3RhcnRfdG9rZW5faWQlMjAlM0QlMjBtb2RlbC5jb25maWcuZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQWRlY29kZXJfaW5wdXRfaWRzJTIwJTNEJTIwam5wLm9uZXMoKGlucHV0cy5pbnB1dF9pZHMuc2hhcGUlNUIwJTVEJTJDJTIwMSklMkMlMjBkdHlwZSUzRCUyMmk0JTIyKSUyMColMjBkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmRlY29kZShkZWNvZGVyX2lucHV0X2lkcyUyQyUyMGVuY29kZXJfb3V0cHV0cyklMEFsYXN0X2RlY29kZXJfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax.numpy <span class="hljs-keyword">as</span> jnp
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large-cnn&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(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function k$($){let l,y,f,m,b;return{c(){l=n("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),b=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(r){l=a(r,"P",{});var u=s(l);y=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(u,"CODE",{});var j=s(f);m=d(j,"Module"),j.forEach(t),b=d(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(r,u){_(r,l,u),e(l,y),e(l,f),e(f,m),e(l,b)},d(r){r&&t(l)}}}function T$($){let l,y,f,m,b;return m=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmFydEZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZiYXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmFydEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMHJldHJpZXZlJTIwbG9ndHMlMjBmb3IlMjBuZXh0JTIwdG9rZW4lMEFuZXh0X3Rva2VuX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTVCJTNBJTJDJTIwLTElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBartForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBartForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/bart-base&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){l=n("p"),y=i("Example:"),f=c(),v(m.$$.fragment)},l(r){l=a(r,"P",{});var u=s(l);y=d(u,"Example:"),u.forEach(t),f=p(r),k(m.$$.fragment,r)},m(r,u){_(r,l,u),e(l,y),_(r,f,u),T(m,r,u),b=!0},p:R,i(r){b||(w(m.$$.fragment,r),b=!0)},o(r){M(m.$$.fragment,r),b=!1},d(r){r&&t(l),r&&t(f),F(m,r)}}}function w$($){let l,y,f,m,b,r,u,j,se,P,Z,re,ie,B,Ve,Y,Fe,it,D,de,qe,le,Pe,we,ce,Qe,Ze,W,be,Ee,K,E,C,Ye,ee,ye,Le,Q,Oe,He,U,xe,pe,Ge,te,L,De,Ke,X,et,he,Ce,$e,I,je,A,We,ve,x,z,wt,Be,Ae,dt,J,Mt,oe,lt,Ft,xt,V,ue,$t,ct,me,jt,pt,tt,Bt,ke,zt,Mh,Yt,Im,Ha,Zm,Gm,Da,Wm,Am,Fh,yo,dn,Ul,Ka,Sm,Il,Nm,xh,Lt,es,Rm,ts,Xm,Vm,Pm,At,Qm,fd,Ym,Lm,Zl,Om,Hm,os,Dm,Km,ef,ln,ns,tf,of,as,nf,af,$h,vo,cn,Gl,ss,sf,Wl,rf,jh,ht,St,df,Al,lf,cf,gd,pf,hf,_d,uf,mf,ff,ko,gf,bd,_f,bf,Sl,yf,vf,kf,To,Tf,Nl,wf,Mf,Rl,Ff,xf,$f,yd,vd,jf,Bf,zf,wo,Jf,Xl,qf,Ef,Vl,Cf,Uf,Bh,Mo,pn,Pl,rs,If,Ql,Zf,zh,Ot,Gf,Yl,Wf,Af,Ll,Sf,Nf,Jh,is,qh,Fo,hn,Ol,ds,Rf,Hl,Xf,Eh,kd,Vf,Ch,ls,Uh,Te,cs,Pf,ps,Qf,Yf,Lf,hs,Of,us,Hf,Df,Kf,ms,eg,fs,tg,og,ng,Ht,Td,ag,sg,gs,rg,ig,_s,dg,lg,cg,Dt,wd,pg,hg,bs,ug,mg,ys,fg,gg,_g,un,Md,bg,yg,vs,vg,kg,Tg,Fd,ks,wg,Mg,Fg,Dl,xd,xg,Ih,Ts,Zh,ut,Kt,$d,$g,jg,ws,Bg,zg,Ms,Jg,qg,Eg,eo,jd,Cg,Ug,Fs,Ig,Zg,xs,Gg,Wg,Ag,to,Bd,Sg,Ng,$s,Rg,Xg,js,Vg,Pg,Qg,zd,Bs,Yg,Lg,Og,Kl,Jd,Hg,Gh,zs,Wh,Jt,Js,Dg,qs,Kg,e_,t_,oo,qd,o_,n_,Es,a_,s_,Cs,r_,i_,d_,no,Ed,l_,c_,Us,p_,h_,Is,u_,m_,f_,ec,Cd,g_,Ah,Ud,__,Sh,ao,tc,Id,b_,y_,oc,Zd,v_,k_,nc,Gd,T_,Nh,xo,mn,ac,Zs,w_,sc,M_,Rh,yt,Gs,F_,$o,x_,Wd,$_,j_,Ws,B_,z_,J_,jo,q_,Ad,E_,C_,Sd,U_,I_,Z_,fn,Xh,Bo,gn,rc,As,G_,ic,W_,Vh,S,Ss,A_,dc,S_,N_,lc,R_,X_,_n,V_,Ns,P_,cc,Q_,Y_,L_,bn,O_,Rs,H_,Nd,D_,K_,eb,so,Xs,tb,pc,ob,nb,Vs,Rd,ab,hc,sb,rb,Xd,ib,uc,db,lb,yn,Ps,cb,mc,pb,hb,vn,Qs,ub,fc,mb,fb,kn,Ys,gb,Ls,_b,gc,bb,yb,Ph,zo,Tn,_c,Os,vb,bc,kb,Qh,fe,Hs,Tb,Ds,wb,yc,Mb,Fb,xb,vc,$b,jb,wn,Bb,Ks,zb,kc,Jb,qb,Eb,Mn,Cb,er,Ub,Vd,Ib,Zb,Gb,Fn,tr,Wb,Tc,Ab,Yh,Jo,xn,wc,or,Sb,Mc,Nb,Lh,vt,nr,Rb,ar,Xb,Pd,Vb,Pb,Qb,sr,Yb,rr,Lb,Ob,Hb,qt,ir,Db,qo,Kb,Qd,ey,ty,Fc,oy,ny,ay,$n,sy,jn,Oh,Eo,Bn,xc,dr,ry,$c,iy,Hh,kt,lr,dy,cr,ly,Yd,cy,py,hy,pr,uy,hr,my,fy,gy,mt,ur,_y,Co,by,Ld,yy,vy,jc,ky,Ty,wy,zn,My,Jn,Fy,qn,Dh,Uo,En,Bc,mr,xy,zc,$y,Kh,ot,fr,jy,Jc,By,zy,gr,Jy,Od,qy,Ey,Cy,_r,Uy,br,Iy,Zy,Gy,ft,yr,Wy,Io,Ay,Hd,Sy,Ny,qc,Ry,Xy,Vy,Cn,Py,Un,Qy,In,eu,Zo,Zn,Ec,vr,Yy,Cc,Ly,tu,nt,kr,Oy,Go,Hy,Uc,Dy,Ky,Ic,ev,tv,ov,Tr,nv,Dd,av,sv,rv,wr,iv,Mr,dv,lv,cv,Et,Fr,pv,Wo,hv,Kd,uv,mv,Zc,fv,gv,_v,Gn,bv,Wn,ou,Ao,An,Gc,xr,yv,Wc,vv,nu,at,$r,kv,Ac,Tv,wv,jr,Mv,el,Fv,xv,$v,Br,jv,zr,Bv,zv,Jv,Sn,Jr,qv,Nn,au,So,Rn,Sc,qr,Ev,Nc,Cv,su,st,Er,Uv,Cr,Iv,tl,Zv,Gv,Wv,Ur,Av,Ir,Sv,Nv,Rv,Xn,Xv,Ct,Zr,Vv,No,Pv,ol,Qv,Yv,Rc,Lv,Ov,Hv,Vn,Dv,Pn,ru,Ro,Qn,Xc,Gr,Kv,Vc,ek,iu,rt,Wr,tk,Ar,ok,nl,nk,ak,sk,Sr,rk,Nr,ik,dk,lk,Yn,ck,gt,Rr,pk,Xo,hk,al,uk,mk,Pc,fk,gk,_k,Ln,bk,On,yk,Hn,du,Vo,Dn,Qc,Xr,vk,Yc,kk,lu,Ue,Vr,Tk,Lc,wk,Mk,Pr,Fk,sl,xk,$k,jk,Qr,Bk,Yr,zk,Jk,qk,Kn,Ek,ro,Lr,Ck,Po,Uk,rl,Ik,Zk,Oc,Gk,Wk,Ak,ea,cu,Qo,ta,Hc,Or,Sk,Dc,Nk,pu,ge,Hr,Rk,Dr,Xk,il,Vk,Pk,Qk,Kr,Yk,ei,Lk,Ok,Hk,Kc,Dk,Kk,Nt,ep,ti,eT,tT,tp,oi,oT,nT,op,ni,aT,sT,np,ai,rT,iT,Ut,si,dT,Yo,lT,ap,cT,pT,sp,hT,uT,mT,oa,fT,na,gT,aa,ri,_T,sa,bT,ra,ii,yT,ia,hu,Lo,da,rp,di,vT,ip,kT,uu,_e,li,TT,ci,wT,dl,MT,FT,xT,pi,$T,hi,jT,BT,zT,dp,JT,qT,Rt,lp,ui,ET,CT,cp,mi,UT,IT,pp,fi,ZT,GT,hp,gi,WT,AT,_t,_i,ST,Oo,NT,up,RT,XT,mp,VT,PT,QT,la,YT,ca,LT,pa,OT,ha,bi,HT,ua,DT,ma,yi,KT,fa,mu,Ho,ga,fp,vi,ew,gp,tw,fu,O,ki,ow,_p,nw,aw,Ti,sw,ll,rw,iw,dw,wi,lw,Mi,cw,pw,hw,bp,uw,mw,Xt,yp,Fi,fw,gw,vp,xi,_w,bw,kp,$i,yw,vw,Tp,ji,kw,Tw,It,Bi,ww,Do,Mw,wp,Fw,xw,Mp,$w,jw,Bw,_a,zw,ba,Jw,ya,zi,qw,va,Ew,ka,Ji,Cw,Ta,gu,Ko,wa,Fp,qi,Uw,xp,Iw,_u,H,Ei,Zw,en,Gw,$p,Ww,Aw,jp,Sw,Nw,Rw,Ci,Xw,cl,Vw,Pw,Qw,Ui,Yw,Ii,Lw,Ow,Hw,Bp,Dw,Kw,Vt,zp,Zi,e0,t0,Jp,Gi,o0,n0,qp,Wi,a0,s0,Ep,Ai,r0,i0,Zt,Si,d0,tn,l0,Cp,c0,p0,Up,h0,u0,m0,Ma,f0,Fa,g0,xa,Ni,_0,$a,b0,ja,Ri,y0,Ba,bu,on,za,Ip,Xi,v0,Zp,k0,yu,Me,Vi,T0,Gp,w0,M0,Pi,F0,pl,x0,$0,j0,Qi,B0,Yi,z0,J0,q0,Wp,E0,C0,Pt,Ap,Li,U0,I0,Sp,Oi,Z0,G0,Np,Hi,W0,A0,Rp,Di,S0,N0,Gt,Ki,R0,nn,X0,Xp,V0,P0,Vp,Q0,Y0,L0,Ja,O0,qa,vu;return r=new ae({}),K=new ae({}),Ka=new ae({}),ss=new ae({}),rs=new ae({}),is=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMjBCYXJ0VG9rZW5pemVyJTBBJTBBbW9kZWwlMjAlM0QlMjBCYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UlMjIlMkMlMjBmb3JjZWRfYm9zX3Rva2VuX2lkJTNEMCklMEF0b2slMjAlM0QlMjBCYXJ0VG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UlMjIpJTBBZXhhbXBsZV9lbmdsaXNoX3BocmFzZSUyMCUzRCUyMCUyMlVOJTIwQ2hpZWYlMjBTYXlzJTIwVGhlcmUlMjBJcyUyME5vJTIwJTNDbWFzayUzRSUyMGluJTIwU3lyaWElMjIlMEFiYXRjaCUyMCUzRCUyMHRvayhleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoYmF0Y2glNUIlMjJpbnB1dF9pZHMlMjIlNUQpJTBBYXNzZXJ0JTIwdG9rLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTIwJTNEJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyVU4lMjBDaGllZiUyMFNheXMlMjBUaGVyZSUyMElzJTIwTm8lMjBQbGFuJTIwdG8lMjBTdG9wJTIwQ2hlbWljYWwlMjBXZWFwb25zJTIwaW4lMjBTeXJpYSUyMiUwQSU1RA==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BartForConditionalGeneration, BartTokenizer

model = BartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large&quot;</span>, forced_bos_token_id=<span class="hljs-number">0</span>)
tok = BartTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large&quot;</span>)
example_english_phrase = <span class="hljs-string">&quot;UN Chief Says There Is No &lt;mask&gt; in Syria&quot;</span>
batch = tok(example_english_phrase, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
generated_ids = model.generate(batch[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-keyword">assert</span> tok.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>) == [
    <span class="hljs-string">&quot;UN Chief Says There Is No Plan to Stop Chemical Weapons in Syria&quot;</span>
]`}}),ds=new ae({}),ls=new oM({props:{pipeline:"summarization"}}),Ts=new oM({props:{pipeline:"fill-mask"}}),zs=new oM({props:{pipeline:"translation"}}),Zs=new ae({}),Gs=new q({props:{name:"class transformers.BartConfig",anchor:"transformers.BartConfig",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:"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:"use_cache",val:" = True"},{name:"num_labels",val:" = 3"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"is_encoder_decoder",val:" = True"},{name:"decoder_start_token_id",val:" = 2"},{name:"forced_eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BartConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the BART model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartModel">BartModel</a> or <a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.TFBartModel">TFBartModel</a>.`,name:"vocab_size"},{anchor:"transformers.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.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.BartConfig.num_labels",description:`<strong>num_labels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of labels to use in <a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartForSequenceClassification">BartForSequenceClassification</a>.`,name:"num_labels"},{anchor:"transformers.BartConfig.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/v4.30.0/src/transformers/models/bart/configuration_bart.py#L35"}}),fn=new N({props:{anchor:"transformers.BartConfig.example",$$slots:{default:[Ex]},$$scope:{ctx:$}}}),As=new ae({}),Ss=new q({props:{name:"class transformers.BartTokenizer",anchor:"transformers.BartTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{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:"add_prefix_space",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BartTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.BartTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.BartTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.BartTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.BartTokenizer.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.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.BartTokenizer.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.BartTokenizer.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.BartTokenizer.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.BartTokenizer.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.BartTokenizer.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.BartTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (BART tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/tokenization_bart.py#L101"}}),_n=new N({props:{anchor:"transformers.BartTokenizer.example",$$slots:{default:[Cx]},$$scope:{ctx:$}}}),bn=new Ie({props:{$$slots:{default:[Ux]},$$scope:{ctx:$}}}),Xs=new q({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BartTokenizer.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.BartTokenizer.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.BartTokenizer.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/v4.30.0/src/transformers/models/bart/tokenization_bart.py#L340",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>
`}}),Ps=new q({props:{name:"convert_tokens_to_string",anchor:"transformers.BartTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/tokenization_bart.py#L305"}}),Qs=new q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BartTokenizer.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.BartTokenizer.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.BartTokenizer.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/v4.30.0/src/transformers/models/bart/tokenization_bart.py#L392",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ys=new q({props:{name:"get_special_tokens_mask",anchor:"transformers.BartTokenizer.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.BartTokenizer.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.BartTokenizer.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.BartTokenizer.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/v4.30.0/src/transformers/models/bart/tokenization_bart.py#L365",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>
`}}),Os=new ae({}),Hs=new q({props:{name:"class transformers.BartTokenizerFast",anchor:"transformers.BartTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"errors",val:" = 'replace'"},{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:"add_prefix_space",val:" = False"},{name:"trim_offsets",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BartTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.BartTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.BartTokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.BartTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.BartTokenizerFast.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.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.BartTokenizerFast.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.BartTokenizerFast.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.BartTokenizerFast.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.BartTokenizerFast.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.BartTokenizerFast.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.BartTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (BART tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.BartTokenizerFast.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the post processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/tokenization_bart_fast.py#L70"}}),wn=new N({props:{anchor:"transformers.BartTokenizerFast.example",$$slots:{default:[Ix]},$$scope:{ctx:$}}}),Mn=new Ie({props:{$$slots:{default:[Zx]},$$scope:{ctx:$}}}),tr=new q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BartTokenizerFast.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.BartTokenizerFast.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.BartTokenizerFast.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/v4.30.0/src/transformers/models/bart/tokenization_bart_fast.py#L285",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),or=new ae({}),nr=new q({props:{name:"class transformers.BartModel",anchor:"transformers.BartModel",parameters:[{name:"config",val:": BartConfig"}],parametersDescription:[{anchor:"transformers.BartModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1167"}}),ir=new q({props:{name:"forward",anchor:"transformers.BartModel.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:"past_key_values",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:"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.BartModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.BartModel.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.BartModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</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.BartModel.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.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and 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.BartModel.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.BartModel.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.BartModel.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.BartModel.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.BartModel.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.BartModel.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.BartModel.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.BartModel.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.BartModel.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.BartModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1196",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$n=new Ie({props:{$$slots:{default:[Gx]},$$scope:{ctx:$}}}),jn=new N({props:{anchor:"transformers.BartModel.forward.example",$$slots:{default:[Wx]},$$scope:{ctx:$}}}),dr=new ae({}),lr=new q({props:{name:"class transformers.BartForConditionalGeneration",anchor:"transformers.BartForConditionalGeneration",parameters:[{name:"config",val:": BartConfig"}],parametersDescription:[{anchor:"transformers.BartForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1294"}}),ur=new q({props:{name:"forward",anchor:"transformers.BartForConditionalGeneration.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:"past_key_values",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.BartForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.BartForConditionalGeneration.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.BartForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</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.BartForConditionalGeneration.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.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and 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.BartForConditionalGeneration.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.BartForConditionalGeneration.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.BartForConditionalGeneration.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.BartForConditionalGeneration.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.BartForConditionalGeneration.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.BartForConditionalGeneration.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.BartForConditionalGeneration.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.BartForConditionalGeneration.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.BartForConditionalGeneration.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.BartForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BartForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1338",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zn=new Ie({props:{$$slots:{default:[Ax]},$$scope:{ctx:$}}}),Jn=new N({props:{anchor:"transformers.BartForConditionalGeneration.forward.example",$$slots:{default:[Sx]},$$scope:{ctx:$}}}),qn=new N({props:{anchor:"transformers.BartForConditionalGeneration.forward.example-2",$$slots:{default:[Nx]},$$scope:{ctx:$}}}),mr=new ae({}),fr=new q({props:{name:"class transformers.BartForSequenceClassification",anchor:"transformers.BartForSequenceClassification",parameters:[{name:"config",val:": BartConfig"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BartForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1473"}}),yr=new q({props:{name:"forward",anchor:"transformers.BartForSequenceClassification.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.BartForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.BartForSequenceClassification.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.BartForSequenceClassification.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</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.BartForSequenceClassification.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.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and 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.BartForSequenceClassification.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.BartForSequenceClassification.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.BartForSequenceClassification.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.BartForSequenceClassification.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.BartForSequenceClassification.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.BartForSequenceClassification.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.BartForSequenceClassification.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.BartForSequenceClassification.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.BartForSequenceClassification.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.BartForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BartForSequenceClassification.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/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1489",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</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/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput"
>transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Cn=new Ie({props:{$$slots:{default:[Rx]},$$scope:{ctx:$}}}),Un=new N({props:{anchor:"transformers.BartForSequenceClassification.forward.example",$$slots:{default:[Xx]},$$scope:{ctx:$}}}),In=new N({props:{anchor:"transformers.BartForSequenceClassification.forward.example-2",$$slots:{default:[Vx]},$$scope:{ctx:$}}}),vr=new ae({}),kr=new q({props:{name:"class transformers.BartForQuestionAnswering",anchor:"transformers.BartForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BartForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1603"}}),Fr=new q({props:{name:"forward",anchor:"transformers.BartForQuestionAnswering.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.BartForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.BartForQuestionAnswering.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.BartForQuestionAnswering.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</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.BartForQuestionAnswering.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.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and 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.BartForQuestionAnswering.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.BartForQuestionAnswering.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.BartForQuestionAnswering.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.BartForQuestionAnswering.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.BartForQuestionAnswering.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.BartForQuestionAnswering.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.BartForQuestionAnswering.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.BartForQuestionAnswering.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.BartForQuestionAnswering.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.BartForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BartForQuestionAnswering.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.BartForQuestionAnswering.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/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1618",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</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/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gn=new Ie({props:{$$slots:{default:[Px]},$$scope:{ctx:$}}}),Wn=new N({props:{anchor:"transformers.BartForQuestionAnswering.forward.example",$$slots:{default:[Qx]},$$scope:{ctx:$}}}),xr=new ae({}),$r=new q({props:{name:"class transformers.BartForCausalLM",anchor:"transformers.BartForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BartForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1741"}}),Jr=new q({props:{name:"forward",anchor:"transformers.BartForCausalLM.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.BartForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
provide it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.BartForCausalLM.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.BartForCausalLM.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.BartForCausalLM.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.BartForCausalLM.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.BartForCausalLM.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.BartForCausalLM.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.BartForCausalLM.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.BartForCausalLM.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.BartForCausalLM.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.BartForCausalLM.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.BartForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_bart.py#L1774",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Nn=new N({props:{anchor:"transformers.BartForCausalLM.forward.example",$$slots:{default:[Yx]},$$scope:{ctx:$}}}),qr=new ae({}),Er=new q({props:{name:"class transformers.TFBartModel",anchor:"transformers.TFBartModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBartModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_tf_bart.py#L1151"}}),Xn=new Ie({props:{$$slots:{default:[Lx]},$$scope:{ctx:$}}}),Zr=new q({props:{name:"call",anchor:"transformers.TFBartModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_input_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_outputs",val:": Optional[Union[Tuple, TFBaseModelOutput]] = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_inputs_embeds",val:": np.ndarray | 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.TFBartModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.TFBartModel.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.TFBartModel.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</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.TFBartModel.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.TFBartModel.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.TFBartModel.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.TFBartModel.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.TFBartModel.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.TFBartModel.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.TFBartModel.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.TFBartModel.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.TFBartModel.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.TFBartModel.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.TFBartModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBartModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_tf_bart.py#L1165",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vn=new Ie({props:{$$slots:{default:[Ox]},$$scope:{ctx:$}}}),Pn=new N({props:{anchor:"transformers.TFBartModel.call.example",$$slots:{default:[Hx]},$$scope:{ctx:$}}}),Gr=new ae({}),Wr=new q({props:{name:"class transformers.TFBartForConditionalGeneration",anchor:"transformers.TFBartForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBartForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_tf_bart.py#L1256"}}),Yn=new Ie({props:{$$slots:{default:[Dx]},$$scope:{ctx:$}}}),Rr=new q({props:{name:"call",anchor:"transformers.TFBartForConditionalGeneration.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_input_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_outputs",val:": Optional[TFBaseModelOutput] = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_inputs_embeds",val:": np.ndarray | 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.TFBartForConditionalGeneration.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBartForConditionalGeneration.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.TFBartForConditionalGeneration.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_tf_bart.py#L1292",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ln=new Ie({props:{$$slots:{default:[Kx]},$$scope:{ctx:$}}}),On=new N({props:{anchor:"transformers.TFBartForConditionalGeneration.call.example",$$slots:{default:[e$]},$$scope:{ctx:$}}}),Hn=new N({props:{anchor:"transformers.TFBartForConditionalGeneration.call.example-2",$$slots:{default:[t$]},$$scope:{ctx:$}}}),Xr=new ae({}),Vr=new q({props:{name:"class transformers.TFBartForSequenceClassification",anchor:"transformers.TFBartForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBartForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_tf_bart.py#L1445"}}),Kn=new Ie({props:{$$slots:{default:[o$]},$$scope:{ctx:$}}}),Lr=new q({props:{name:"call",anchor:"transformers.TFBartForSequenceClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_input_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_outputs",val:": Optional[TFBaseModelOutput] = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_inputs_embeds",val:": np.ndarray | 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.TFBartForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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.TFBartForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBartForSequenceClassification.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.TFBartForSequenceClassification.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 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/v4.30.0/src/transformers/models/bart/modeling_tf_bart.py#L1453",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</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>tf.Tensor</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>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>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ea=new Ie({props:{$$slots:{default:[n$]},$$scope:{ctx:$}}}),Or=new ae({}),Hr=new q({props:{name:"class transformers.FlaxBartModel",anchor:"transformers.FlaxBartModel",parameters:[{name:"config",val:": BartConfig"},{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.FlaxBartModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBartModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1241"}}),si=new q({props:{name:"__call__",anchor:"transformers.FlaxBartModel.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartModel.__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.FlaxBartModel.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartModel.__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.FlaxBartModel.__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.FlaxBartModel.__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.FlaxBartModel.__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.FlaxBartModel.__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.FlaxBartModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1176",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(jnp.ndarray)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oa=new Ie({props:{$$slots:{default:[a$]},$$scope:{ctx:$}}}),na=new N({props:{anchor:"transformers.FlaxBartModel.__call__.example",$$slots:{default:[s$]},$$scope:{ctx:$}}}),ri=new q({props:{name:"encode",anchor:"transformers.FlaxBartModel.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartModel.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartModel.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.FlaxBartModel.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.FlaxBartModel.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.FlaxBartModel.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.FlaxBartModel.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L999",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.bart.configuration_bart.BartConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),sa=new N({props:{anchor:"transformers.FlaxBartModel.encode.example",$$slots:{default:[r$]},$$scope:{ctx:$}}}),ii=new q({props:{name:"decode",anchor:"transformers.FlaxBartModel.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartModel.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartModel.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.FlaxBartModel.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.FlaxBartModel.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.FlaxBartModel.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.FlaxBartModel.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.FlaxBartModel.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.FlaxBartModel.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.FlaxBartModel.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1062",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.bart.configuration_bart.BartConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ia=new N({props:{anchor:"transformers.FlaxBartModel.decode.example",$$slots:{default:[i$]},$$scope:{ctx:$}}}),di=new ae({}),li=new q({props:{name:"class transformers.FlaxBartForConditionalGeneration",anchor:"transformers.FlaxBartForConditionalGeneration",parameters:[{name:"config",val:": BartConfig"},{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.FlaxBartForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBartForConditionalGeneration.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1325"}}),_i=new q({props:{name:"__call__",anchor:"transformers.FlaxBartForConditionalGeneration.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartForConditionalGeneration.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForConditionalGeneration.__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.FlaxBartForConditionalGeneration.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForConditionalGeneration.__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.FlaxBartForConditionalGeneration.__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.FlaxBartForConditionalGeneration.__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.FlaxBartForConditionalGeneration.__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.FlaxBartForConditionalGeneration.__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.FlaxBartForConditionalGeneration.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1176",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(jnp.ndarray)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),la=new Ie({props:{$$slots:{default:[d$]},$$scope:{ctx:$}}}),ca=new N({props:{anchor:"transformers.FlaxBartForConditionalGeneration.__call__.example",$$slots:{default:[l$]},$$scope:{ctx:$}}}),pa=new N({props:{anchor:"transformers.FlaxBartForConditionalGeneration.__call__.example-2",$$slots:{default:[c$]},$$scope:{ctx:$}}}),bi=new q({props:{name:"encode",anchor:"transformers.FlaxBartForConditionalGeneration.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartForConditionalGeneration.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L999",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.bart.configuration_bart.BartConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ua=new N({props:{anchor:"transformers.FlaxBartForConditionalGeneration.encode.example",$$slots:{default:[p$]},$$scope:{ctx:$}}}),yi=new q({props:{name:"decode",anchor:"transformers.FlaxBartForConditionalGeneration.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartForConditionalGeneration.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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.FlaxBartForConditionalGeneration.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1329",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.bart.configuration_bart.BartConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fa=new N({props:{anchor:"transformers.FlaxBartForConditionalGeneration.decode.example",$$slots:{default:[h$]},$$scope:{ctx:$}}}),vi=new ae({}),ki=new q({props:{name:"class transformers.FlaxBartForSequenceClassification",anchor:"transformers.FlaxBartForSequenceClassification",parameters:[{name:"config",val:": BartConfig"},{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.FlaxBartForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBartForSequenceClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1638"}}),Bi=new q({props:{name:"__call__",anchor:"transformers.FlaxBartForSequenceClassification.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForSequenceClassification.__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.FlaxBartForSequenceClassification.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForSequenceClassification.__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.FlaxBartForSequenceClassification.__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.FlaxBartForSequenceClassification.__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.FlaxBartForSequenceClassification.__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.FlaxBartForSequenceClassification.__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.FlaxBartForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1176",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_a=new Ie({props:{$$slots:{default:[u$]},$$scope:{ctx:$}}}),ba=new N({props:{anchor:"transformers.FlaxBartForSequenceClassification.__call__.example",$$slots:{default:[m$]},$$scope:{ctx:$}}}),zi=new q({props:{name:"encode",anchor:"transformers.FlaxBartForSequenceClassification.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartForSequenceClassification.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L999",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.bart.configuration_bart.BartConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),va=new N({props:{anchor:"transformers.FlaxBartForSequenceClassification.encode.example",$$slots:{default:[f$]},$$scope:{ctx:$}}}),Ji=new q({props:{name:"decode",anchor:"transformers.FlaxBartForSequenceClassification.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartForSequenceClassification.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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.FlaxBartForSequenceClassification.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1062",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.bart.configuration_bart.BartConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new N({props:{anchor:"transformers.FlaxBartForSequenceClassification.decode.example",$$slots:{default:[g$]},$$scope:{ctx:$}}}),qi=new ae({}),Ei=new q({props:{name:"class transformers.FlaxBartForQuestionAnswering",anchor:"transformers.FlaxBartForQuestionAnswering",parameters:[{name:"config",val:": BartConfig"},{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.FlaxBartForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBartForQuestionAnswering.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1724"}}),Si=new q({props:{name:"__call__",anchor:"transformers.FlaxBartForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForQuestionAnswering.__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.FlaxBartForQuestionAnswering.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForQuestionAnswering.__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.FlaxBartForQuestionAnswering.__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.FlaxBartForQuestionAnswering.__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.FlaxBartForQuestionAnswering.__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.FlaxBartForQuestionAnswering.__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.FlaxBartForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1176",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ma=new Ie({props:{$$slots:{default:[_$]},$$scope:{ctx:$}}}),Fa=new N({props:{anchor:"transformers.FlaxBartForQuestionAnswering.__call__.example",$$slots:{default:[b$]},$$scope:{ctx:$}}}),Ni=new q({props:{name:"encode",anchor:"transformers.FlaxBartForQuestionAnswering.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartForQuestionAnswering.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L999",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.bart.configuration_bart.BartConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$a=new N({props:{anchor:"transformers.FlaxBartForQuestionAnswering.encode.example",$$slots:{default:[y$]},$$scope:{ctx:$}}}),Ri=new q({props:{name:"decode",anchor:"transformers.FlaxBartForQuestionAnswering.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.FlaxBartForQuestionAnswering.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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.FlaxBartForQuestionAnswering.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1062",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.bart.configuration_bart.BartConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ba=new N({props:{anchor:"transformers.FlaxBartForQuestionAnswering.decode.example",$$slots:{default:[v$]},$$scope:{ctx:$}}}),Xi=new ae({}),Vi=new q({props:{name:"class transformers.FlaxBartForCausalLM",anchor:"transformers.FlaxBartForCausalLM",parameters:[{name:"config",val:": BartConfig"},{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.FlaxBartForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig">BartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBartForCausalLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1960"}}),Ki=new q({props:{name:"__call__",anchor:"transformers.FlaxBartForCausalLM.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"encoder_hidden_states",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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:"past_key_values",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBartForCausalLM.__call__.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxBartForCausalLM.__call__.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.FlaxBartForCausalLM.__call__.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.FlaxBartForCausalLM.__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.FlaxBartForCausalLM.__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.FlaxBartForCausalLM.__call__.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.FlaxBartForCausalLM.__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.FlaxBartForCausalLM.__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.FlaxBartForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bart/modeling_flax_bart.py#L1798",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartConfig"
>BartConfig</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>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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ja=new Ie({props:{$$slots:{default:[k$]},$$scope:{ctx:$}}}),qa=new N({props:{anchor:"transformers.FlaxBartForCausalLM.__call__.example",$$slots:{default:[T$]},$$scope:{ctx:$}}}),{c(){l=n("meta"),y=c(),f=n("h1"),m=n("a"),b=n("span"),v(r.$$.fragment),u=c(),j=n("span"),se=i("BART"),P=c(),Z=n("div"),re=n("a"),ie=n("img"),Ve=c(),Y=n("a"),Fe=n("img"),D=c(),de=n("p"),qe=n("strong"),le=i("DISCLAIMER:"),Pe=i(" If you see something strange, file a "),we=n("a"),ce=i("Github Issue"),Qe=i(` and assign
@patrickvonplaten`),Ze=c(),W=n("h2"),be=n("a"),Ee=n("span"),v(K.$$.fragment),E=c(),C=n("span"),Ye=i("Overview"),ee=c(),ye=n("p"),Le=i("The Bart model was proposed in "),Q=n("a"),Oe=i(`BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation,
Translation, and Comprehension`),He=i(` by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan
Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer on 29 Oct, 2019.`),U=c(),xe=n("p"),pe=i("According to the abstract,"),Ge=c(),te=n("ul"),L=n("li"),De=i(`Bart uses a standard seq2seq/machine translation architecture with a bidirectional encoder (like BERT) and a
left-to-right decoder (like GPT).`),Ke=c(),X=n("li"),et=i(`The pretraining task involves randomly shuffling the order of the original sentences and a novel in-filling scheme,
where spans of text are replaced with a single mask token.`),he=c(),Ce=n("li"),$e=i(`BART is particularly effective when fine tuned for text generation but also works well for comprehension tasks. It
matches the performance of RoBERTa with comparable training resources on GLUE and SQuAD, achieves new
state-of-the-art results on a range of abstractive dialogue, question answering, and summarization tasks, with gains
of up to 6 ROUGE.`),I=c(),je=n("p"),A=i("Tips:"),We=c(),ve=n("ul"),x=n("li"),z=n("p"),wt=i(`BART is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),Be=c(),Ae=n("li"),dt=n("p"),J=i("Sequence-to-sequence model with an encoder and a decoder. Encoder is fed a corrupted version of the tokens, decoder is fed the original tokens (but has a mask to hide the future words like a regular transformers decoder). A composition of the following transformations are applied on the pretraining tasks for the encoder:"),Mt=c(),oe=n("ul"),lt=n("li"),Ft=i("mask random tokens (like in BERT)"),xt=c(),V=n("li"),ue=i("delete random tokens"),$t=c(),ct=n("li"),me=i("mask a span of k tokens with a single mask token (a span of 0 tokens is an insertion of a mask token)"),jt=c(),pt=n("li"),tt=i("permute sentences"),Bt=c(),ke=n("li"),zt=i("rotate the document to make it start at a specific token"),Mh=c(),Yt=n("p"),Im=i("This model was contributed by "),Ha=n("a"),Zm=i("sshleifer"),Gm=i(". The Authors\u2019 code can be found "),Da=n("a"),Wm=i("here"),Am=i("."),Fh=c(),yo=n("h3"),dn=n("a"),Ul=n("span"),v(Ka.$$.fragment),Sm=c(),Il=n("span"),Nm=i("Examples"),xh=c(),Lt=n("ul"),es=n("li"),Rm=i(`Examples and scripts for fine-tuning BART and other models for sequence to sequence tasks can be found in
`),ts=n("a"),Xm=i("examples/pytorch/summarization/"),Vm=i("."),Pm=c(),At=n("li"),Qm=i("An example of how to train "),fd=n("a"),Ym=i("BartForConditionalGeneration"),Lm=i(" with a Hugging Face "),Zl=n("code"),Om=i("datasets"),Hm=i(`
object can be found in this `),os=n("a"),Dm=i("forum discussion"),Km=i("."),ef=c(),ln=n("li"),ns=n("a"),tf=i("Distilled checkpoints"),of=i(" are described in this "),as=n("a"),nf=i("paper"),af=i("."),$h=c(),vo=n("h2"),cn=n("a"),Gl=n("span"),v(ss.$$.fragment),sf=c(),Wl=n("span"),rf=i("Implementation Notes"),jh=c(),ht=n("ul"),St=n("li"),df=i("Bart doesn\u2019t use "),Al=n("code"),lf=i("token_type_ids"),cf=i(" for sequence classification. Use "),gd=n("a"),pf=i("BartTokenizer"),hf=i(` or
`),_d=n("a"),uf=i("encode()"),mf=i(" to get the proper splitting."),ff=c(),ko=n("li"),gf=i("The forward pass of "),bd=n("a"),_f=i("BartModel"),bf=i(" will create the "),Sl=n("code"),yf=i("decoder_input_ids"),vf=i(` if they are not passed.
This is different than some other modeling APIs. A typical use case of this feature is mask filling.`),kf=c(),To=n("li"),Tf=i(`Model predictions are intended to be identical to the original implementation when
`),Nl=n("code"),wf=i("forced_bos_token_id=0"),Mf=i(`. This only works, however, if the string you pass to
`),Rl=n("code"),Ff=i("fairseq.encode"),xf=i(" starts with a space."),$f=c(),yd=n("li"),vd=n("a"),jf=i("generate()"),Bf=i(` should be used for conditional generation tasks like
summarization, see the example in that docstrings.`),zf=c(),wo=n("li"),Jf=i("Models that load the "),Xl=n("em"),qf=i("facebook/bart-large-cnn"),Ef=i(" weights will not have a "),Vl=n("code"),Cf=i("mask_token_id"),Uf=i(`, or be able to perform
mask-filling tasks.`),Bh=c(),Mo=n("h2"),pn=n("a"),Pl=n("span"),v(rs.$$.fragment),If=c(),Ql=n("span"),Zf=i("Mask Filling"),zh=c(),Ot=n("p"),Gf=i("The "),Yl=n("code"),Wf=i("facebook/bart-base"),Af=i(" and "),Ll=n("code"),Sf=i("facebook/bart-large"),Nf=i(" checkpoints can be used to fill multi-token masks."),Jh=c(),v(is.$$.fragment),qh=c(),Fo=n("h2"),hn=n("a"),Ol=n("span"),v(ds.$$.fragment),Rf=c(),Hl=n("span"),Xf=i("Resources"),Eh=c(),kd=n("p"),Vf=i("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with BART. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Ch=c(),v(ls.$$.fragment),Uh=c(),Te=n("ul"),cs=n("li"),Pf=i("A blog post on "),ps=n("a"),Qf=i("Distributed Training: Train BART/T5 for Summarization using \u{1F917} Transformers and Amazon SageMaker"),Yf=i("."),Lf=c(),hs=n("li"),Of=i("A notebook on how to "),us=n("a"),Hf=i("finetune BART for summarization with fastai using blurr"),Df=i(". \u{1F30E}"),Kf=c(),ms=n("li"),eg=i("A notebook on how to "),fs=n("a"),tg=i("finetune BART for summarization in two languages with Trainer class"),og=i(". \u{1F30E}"),ng=c(),Ht=n("li"),Td=n("a"),ag=i("BartForConditionalGeneration"),sg=i(" is supported by this "),gs=n("a"),rg=i("example script"),ig=i(" and "),_s=n("a"),dg=i("notebook"),lg=i("."),cg=c(),Dt=n("li"),wd=n("a"),pg=i("TFBartForConditionalGeneration"),hg=i(" is supported by this "),bs=n("a"),ug=i("example script"),mg=i(" and "),ys=n("a"),fg=i("notebook"),gg=i("."),_g=c(),un=n("li"),Md=n("a"),bg=i("FlaxBartForConditionalGeneration"),yg=i(" is supported by this "),vs=n("a"),vg=i("example script"),kg=i("."),Tg=c(),Fd=n("li"),ks=n("a"),wg=i("Summarization"),Mg=i(" chapter of the \u{1F917} Hugging Face course."),Fg=c(),Dl=n("li"),xd=n("a"),xg=i("Summarization task guide"),Ih=c(),v(Ts.$$.fragment),Zh=c(),ut=n("ul"),Kt=n("li"),$d=n("a"),$g=i("BartForConditionalGeneration"),jg=i(" is supported by this "),ws=n("a"),Bg=i("example script"),zg=i(" and "),Ms=n("a"),Jg=i("notebook"),qg=i("."),Eg=c(),eo=n("li"),jd=n("a"),Cg=i("TFBartForConditionalGeneration"),Ug=i(" is supported by this "),Fs=n("a"),Ig=i("example script"),Zg=i(" and "),xs=n("a"),Gg=i("notebook"),Wg=i("."),Ag=c(),to=n("li"),Bd=n("a"),Sg=i("FlaxBartForConditionalGeneration"),Ng=i(" is supported by this "),$s=n("a"),Rg=i("example script"),Xg=i(" and "),js=n("a"),Vg=i("notebook"),Pg=i("."),Qg=c(),zd=n("li"),Bs=n("a"),Yg=i("Masked language modeling"),Lg=i(" chapter of the \u{1F917} Hugging Face Course."),Og=c(),Kl=n("li"),Jd=n("a"),Hg=i("Masked language modeling task guide"),Gh=c(),v(zs.$$.fragment),Wh=c(),Jt=n("ul"),Js=n("li"),Dg=i("A notebook on how to "),qs=n("a"),Kg=i("finetune mBART using Seq2SeqTrainer for Hindi to English translation"),e_=i(". \u{1F30E}"),t_=c(),oo=n("li"),qd=n("a"),o_=i("BartForConditionalGeneration"),n_=i(" is supported by this "),Es=n("a"),a_=i("example script"),s_=i(" and "),Cs=n("a"),r_=i("notebook"),i_=i("."),d_=c(),no=n("li"),Ed=n("a"),l_=i("TFBartForConditionalGeneration"),c_=i(" is supported by this "),Us=n("a"),p_=i("example script"),h_=i(" and "),Is=n("a"),u_=i("notebook"),m_=i("."),f_=c(),ec=n("li"),Cd=n("a"),g_=i("Translation task guide"),Ah=c(),Ud=n("p"),__=i("See also:"),Sh=c(),ao=n("ul"),tc=n("li"),Id=n("a"),b_=i("Text classification task guide"),y_=c(),oc=n("li"),Zd=n("a"),v_=i("Question answering task guide"),k_=c(),nc=n("li"),Gd=n("a"),T_=i("Causal language modeling task guide"),Nh=c(),xo=n("h2"),mn=n("a"),ac=n("span"),v(Zs.$$.fragment),w_=c(),sc=n("span"),M_=i("BartConfig"),Rh=c(),yt=n("div"),v(Gs.$$.fragment),F_=c(),$o=n("p"),x_=i("This is the configuration class to store the configuration of a "),Wd=n("a"),$_=i("BartModel"),j_=i(`. It is used to instantiate a BART
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 BART
`),Ws=n("a"),B_=i("facebook/bart-large"),z_=i(" architecture."),J_=c(),jo=n("p"),q_=i("Configuration objects inherit from "),Ad=n("a"),E_=i("PretrainedConfig"),C_=i(` and can be used to control the model outputs. Read the
documentation from `),Sd=n("a"),U_=i("PretrainedConfig"),I_=i(" for more information."),Z_=c(),v(fn.$$.fragment),Xh=c(),Bo=n("h2"),gn=n("a"),rc=n("span"),v(As.$$.fragment),G_=c(),ic=n("span"),W_=i("BartTokenizer"),Vh=c(),S=n("div"),v(Ss.$$.fragment),A_=c(),dc=n("p"),S_=i("Constructs a BART tokenizer, which is smilar to the ROBERTa tokenizer, using byte-level Byte-Pair-Encoding."),N_=c(),lc=n("p"),R_=i("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),X_=c(),v(_n.$$.fragment),V_=c(),Ns=n("p"),P_=i("You can get around that behavior by passing "),cc=n("code"),Q_=i("add_prefix_space=True"),Y_=i(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),L_=c(),v(bn.$$.fragment),O_=c(),Rs=n("p"),H_=i("This tokenizer inherits from "),Nd=n("a"),D_=i("PreTrainedTokenizer"),K_=i(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),eb=c(),so=n("div"),v(Xs.$$.fragment),tb=c(),pc=n("p"),ob=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BART sequence has the following format:`),nb=c(),Vs=n("ul"),Rd=n("li"),ab=i("single sequence: "),hc=n("code"),sb=i("<s> X </s>"),rb=c(),Xd=n("li"),ib=i("pair of sequences: "),uc=n("code"),db=i("<s> A </s></s> B </s>"),lb=c(),yn=n("div"),v(Ps.$$.fragment),cb=c(),mc=n("p"),pb=i("Converts a sequence of tokens (string) in a single string."),hb=c(),vn=n("div"),v(Qs.$$.fragment),ub=c(),fc=n("p"),mb=i(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. BART does not
make use of token type ids, therefore a list of zeros is returned.`),fb=c(),kn=n("div"),v(Ys.$$.fragment),gb=c(),Ls=n("p"),_b=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 `),gc=n("code"),bb=i("prepare_for_model"),yb=i(" method."),Ph=c(),zo=n("h2"),Tn=n("a"),_c=n("span"),v(Os.$$.fragment),vb=c(),bc=n("span"),kb=i("BartTokenizerFast"),Qh=c(),fe=n("div"),v(Hs.$$.fragment),Tb=c(),Ds=n("p"),wb=i("Construct a \u201Cfast\u201D BART tokenizer (backed by HuggingFace\u2019s "),yc=n("em"),Mb=i("tokenizers"),Fb=i(` library), derived from the GPT-2 tokenizer,
using byte-level Byte-Pair-Encoding.`),xb=c(),vc=n("p"),$b=i("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),jb=c(),v(wn.$$.fragment),Bb=c(),Ks=n("p"),zb=i("You can get around that behavior by passing "),kc=n("code"),Jb=i("add_prefix_space=True"),qb=i(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),Eb=c(),v(Mn.$$.fragment),Cb=c(),er=n("p"),Ub=i("This tokenizer inherits from "),Vd=n("a"),Ib=i("PreTrainedTokenizerFast"),Zb=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Gb=c(),Fn=n("div"),v(tr.$$.fragment),Wb=c(),Tc=n("p"),Ab=i(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. BART does not
make use of token type ids, therefore a list of zeros is returned.`),Yh=c(),Jo=n("h2"),xn=n("a"),wc=n("span"),v(or.$$.fragment),Sb=c(),Mc=n("span"),Nb=i("BartModel"),Lh=c(),vt=n("div"),v(nr.$$.fragment),Rb=c(),ar=n("p"),Xb=i(`The bare BART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Pd=n("a"),Vb=i("PreTrainedModel"),Pb=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.)`),Qb=c(),sr=n("p"),Yb=i("This model is also a PyTorch "),rr=n("a"),Lb=i("torch.nn.Module"),Ob=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hb=c(),qt=n("div"),v(ir.$$.fragment),Db=c(),qo=n("p"),Kb=i("The "),Qd=n("a"),ey=i("BartModel"),ty=i(" forward method, overrides the "),Fc=n("code"),oy=i("__call__"),ny=i(" special method."),ay=c(),v($n.$$.fragment),sy=c(),v(jn.$$.fragment),Oh=c(),Eo=n("h2"),Bn=n("a"),xc=n("span"),v(dr.$$.fragment),ry=c(),$c=n("span"),iy=i("BartForConditionalGeneration"),Hh=c(),kt=n("div"),v(lr.$$.fragment),dy=c(),cr=n("p"),ly=i(`The BART Model with a language modeling head. Can be used for summarization.
This model inherits from `),Yd=n("a"),cy=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.)`),hy=c(),pr=n("p"),uy=i("This model is also a PyTorch "),hr=n("a"),my=i("torch.nn.Module"),fy=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),gy=c(),mt=n("div"),v(ur.$$.fragment),_y=c(),Co=n("p"),by=i("The "),Ld=n("a"),yy=i("BartForConditionalGeneration"),vy=i(" forward method, overrides the "),jc=n("code"),ky=i("__call__"),Ty=i(" special method."),wy=c(),v(zn.$$.fragment),My=c(),v(Jn.$$.fragment),Fy=c(),v(qn.$$.fragment),Dh=c(),Uo=n("h2"),En=n("a"),Bc=n("span"),v(mr.$$.fragment),xy=c(),zc=n("span"),$y=i("BartForSequenceClassification"),Kh=c(),ot=n("div"),v(fr.$$.fragment),jy=c(),Jc=n("p"),By=i(`Bart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),zy=c(),gr=n("p"),Jy=i("This model inherits from "),Od=n("a"),qy=i("PreTrainedModel"),Ey=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.)`),Cy=c(),_r=n("p"),Uy=i("This model is also a PyTorch "),br=n("a"),Iy=i("torch.nn.Module"),Zy=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gy=c(),ft=n("div"),v(yr.$$.fragment),Wy=c(),Io=n("p"),Ay=i("The "),Hd=n("a"),Sy=i("BartForSequenceClassification"),Ny=i(" forward method, overrides the "),qc=n("code"),Ry=i("__call__"),Xy=i(" special method."),Vy=c(),v(Cn.$$.fragment),Py=c(),v(Un.$$.fragment),Qy=c(),v(In.$$.fragment),eu=c(),Zo=n("h2"),Zn=n("a"),Ec=n("span"),v(vr.$$.fragment),Yy=c(),Cc=n("span"),Ly=i("BartForQuestionAnswering"),tu=c(),nt=n("div"),v(kr.$$.fragment),Oy=c(),Go=n("p"),Hy=i(`BART 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 `),Uc=n("code"),Dy=i("span start logits"),Ky=i(" and "),Ic=n("code"),ev=i("span end logits"),tv=i(")."),ov=c(),Tr=n("p"),nv=i("This model inherits from "),Dd=n("a"),av=i("PreTrainedModel"),sv=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.)`),rv=c(),wr=n("p"),iv=i("This model is also a PyTorch "),Mr=n("a"),dv=i("torch.nn.Module"),lv=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cv=c(),Et=n("div"),v(Fr.$$.fragment),pv=c(),Wo=n("p"),hv=i("The "),Kd=n("a"),uv=i("BartForQuestionAnswering"),mv=i(" forward method, overrides the "),Zc=n("code"),fv=i("__call__"),gv=i(" special method."),_v=c(),v(Gn.$$.fragment),bv=c(),v(Wn.$$.fragment),ou=c(),Ao=n("h2"),An=n("a"),Gc=n("span"),v(xr.$$.fragment),yv=c(),Wc=n("span"),vv=i("BartForCausalLM"),nu=c(),at=n("div"),v($r.$$.fragment),kv=c(),Ac=n("p"),Tv=i("BART decoder with with a language modeling head on top (linear layer with weights tied to the input embeddings)."),wv=c(),jr=n("p"),Mv=i("This model inherits from "),el=n("a"),Fv=i("PreTrainedModel"),xv=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.)`),$v=c(),Br=n("p"),jv=i("This model is also a PyTorch "),zr=n("a"),Bv=i("torch.nn.Module"),zv=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jv=c(),Sn=n("div"),v(Jr.$$.fragment),qv=c(),v(Nn.$$.fragment),au=c(),So=n("h2"),Rn=n("a"),Sc=n("span"),v(qr.$$.fragment),Ev=c(),Nc=n("span"),Cv=i("TFBartModel"),su=c(),st=n("div"),v(Er.$$.fragment),Uv=c(),Cr=n("p"),Iv=i(`The bare BART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),tl=n("a"),Zv=i("TFPreTrainedModel"),Gv=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.)`),Wv=c(),Ur=n("p"),Av=i("This model is also a "),Ir=n("a"),Sv=i("tf.keras.Model"),Nv=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.`),Rv=c(),v(Xn.$$.fragment),Xv=c(),Ct=n("div"),v(Zr.$$.fragment),Vv=c(),No=n("p"),Pv=i("The "),ol=n("a"),Qv=i("TFBartModel"),Yv=i(" forward method, overrides the "),Rc=n("code"),Lv=i("__call__"),Ov=i(" special method."),Hv=c(),v(Vn.$$.fragment),Dv=c(),v(Pn.$$.fragment),ru=c(),Ro=n("h2"),Qn=n("a"),Xc=n("span"),v(Gr.$$.fragment),Kv=c(),Vc=n("span"),ek=i("TFBartForConditionalGeneration"),iu=c(),rt=n("div"),v(Wr.$$.fragment),tk=c(),Ar=n("p"),ok=i(`The BART Model with a language modeling head. Can be used for summarization.
This model inherits from `),nl=n("a"),nk=i("TFPreTrainedModel"),ak=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.)`),sk=c(),Sr=n("p"),rk=i("This model is also a "),Nr=n("a"),ik=i("tf.keras.Model"),dk=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.`),lk=c(),v(Yn.$$.fragment),ck=c(),gt=n("div"),v(Rr.$$.fragment),pk=c(),Xo=n("p"),hk=i("The "),al=n("a"),uk=i("TFBartForConditionalGeneration"),mk=i(" forward method, overrides the "),Pc=n("code"),fk=i("__call__"),gk=i(" special method."),_k=c(),v(Ln.$$.fragment),bk=c(),v(On.$$.fragment),yk=c(),v(Hn.$$.fragment),du=c(),Vo=n("h2"),Dn=n("a"),Qc=n("span"),v(Xr.$$.fragment),vk=c(),Yc=n("span"),kk=i("TFBartForSequenceClassification"),lu=c(),Ue=n("div"),v(Vr.$$.fragment),Tk=c(),Lc=n("p"),wk=i(`Bart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),Mk=c(),Pr=n("p"),Fk=i("This model inherits from "),sl=n("a"),xk=i("TFPreTrainedModel"),$k=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.)`),jk=c(),Qr=n("p"),Bk=i("This model is also a "),Yr=n("a"),zk=i("tf.keras.Model"),Jk=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.`),qk=c(),v(Kn.$$.fragment),Ek=c(),ro=n("div"),v(Lr.$$.fragment),Ck=c(),Po=n("p"),Uk=i("The "),rl=n("a"),Ik=i("TFBartForSequenceClassification"),Zk=i(" forward method, overrides the "),Oc=n("code"),Gk=i("__call__"),Wk=i(" special method."),Ak=c(),v(ea.$$.fragment),cu=c(),Qo=n("h2"),ta=n("a"),Hc=n("span"),v(Or.$$.fragment),Sk=c(),Dc=n("span"),Nk=i("FlaxBartModel"),pu=c(),ge=n("div"),v(Hr.$$.fragment),Rk=c(),Dr=n("p"),Xk=i(`The bare Bart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),il=n("a"),Vk=i("FlaxPreTrainedModel"),Pk=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.)`),Qk=c(),Kr=n("p"),Yk=i(`This model is also a Flax Linen
`),ei=n("a"),Lk=i("flax.nn.Module"),Ok=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Hk=c(),Kc=n("p"),Dk=i("Finally, this model supports inherent JAX features such as:"),Kk=c(),Nt=n("ul"),ep=n("li"),ti=n("a"),eT=i("Just-In-Time (JIT) compilation"),tT=c(),tp=n("li"),oi=n("a"),oT=i("Automatic Differentiation"),nT=c(),op=n("li"),ni=n("a"),aT=i("Vectorization"),sT=c(),np=n("li"),ai=n("a"),rT=i("Parallelization"),iT=c(),Ut=n("div"),v(si.$$.fragment),dT=c(),Yo=n("p"),lT=i("The "),ap=n("code"),cT=i("FlaxBartPreTrainedModel"),pT=i(" forward method, overrides the "),sp=n("code"),hT=i("__call__"),uT=i(" special method."),mT=c(),v(oa.$$.fragment),fT=c(),v(na.$$.fragment),gT=c(),aa=n("div"),v(ri.$$.fragment),_T=c(),v(sa.$$.fragment),bT=c(),ra=n("div"),v(ii.$$.fragment),yT=c(),v(ia.$$.fragment),hu=c(),Lo=n("h2"),da=n("a"),rp=n("span"),v(di.$$.fragment),vT=c(),ip=n("span"),kT=i("FlaxBartForConditionalGeneration"),uu=c(),_e=n("div"),v(li.$$.fragment),TT=c(),ci=n("p"),wT=i(`The BART Model with a language modeling head. Can be used for summarization.
This model inherits from `),dl=n("a"),MT=i("FlaxPreTrainedModel"),FT=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(),pi=n("p"),$T=i(`This model is also a Flax Linen
`),hi=n("a"),jT=i("flax.nn.Module"),BT=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),zT=c(),dp=n("p"),JT=i("Finally, this model supports inherent JAX features such as:"),qT=c(),Rt=n("ul"),lp=n("li"),ui=n("a"),ET=i("Just-In-Time (JIT) compilation"),CT=c(),cp=n("li"),mi=n("a"),UT=i("Automatic Differentiation"),IT=c(),pp=n("li"),fi=n("a"),ZT=i("Vectorization"),GT=c(),hp=n("li"),gi=n("a"),WT=i("Parallelization"),AT=c(),_t=n("div"),v(_i.$$.fragment),ST=c(),Oo=n("p"),NT=i("The "),up=n("code"),RT=i("FlaxBartPreTrainedModel"),XT=i(" forward method, overrides the "),mp=n("code"),VT=i("__call__"),PT=i(" special method."),QT=c(),v(la.$$.fragment),YT=c(),v(ca.$$.fragment),LT=c(),v(pa.$$.fragment),OT=c(),ha=n("div"),v(bi.$$.fragment),HT=c(),v(ua.$$.fragment),DT=c(),ma=n("div"),v(yi.$$.fragment),KT=c(),v(fa.$$.fragment),mu=c(),Ho=n("h2"),ga=n("a"),fp=n("span"),v(vi.$$.fragment),ew=c(),gp=n("span"),tw=i("FlaxBartForSequenceClassification"),fu=c(),O=n("div"),v(ki.$$.fragment),ow=c(),_p=n("p"),nw=i(`Bart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),aw=c(),Ti=n("p"),sw=i("This model inherits from "),ll=n("a"),rw=i("FlaxPreTrainedModel"),iw=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.)`),dw=c(),wi=n("p"),lw=i(`This model is also a Flax Linen
`),Mi=n("a"),cw=i("flax.nn.Module"),pw=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),hw=c(),bp=n("p"),uw=i("Finally, this model supports inherent JAX features such as:"),mw=c(),Xt=n("ul"),yp=n("li"),Fi=n("a"),fw=i("Just-In-Time (JIT) compilation"),gw=c(),vp=n("li"),xi=n("a"),_w=i("Automatic Differentiation"),bw=c(),kp=n("li"),$i=n("a"),yw=i("Vectorization"),vw=c(),Tp=n("li"),ji=n("a"),kw=i("Parallelization"),Tw=c(),It=n("div"),v(Bi.$$.fragment),ww=c(),Do=n("p"),Mw=i("The "),wp=n("code"),Fw=i("FlaxBartPreTrainedModel"),xw=i(" forward method, overrides the "),Mp=n("code"),$w=i("__call__"),jw=i(" special method."),Bw=c(),v(_a.$$.fragment),zw=c(),v(ba.$$.fragment),Jw=c(),ya=n("div"),v(zi.$$.fragment),qw=c(),v(va.$$.fragment),Ew=c(),ka=n("div"),v(Ji.$$.fragment),Cw=c(),v(Ta.$$.fragment),gu=c(),Ko=n("h2"),wa=n("a"),Fp=n("span"),v(qi.$$.fragment),Uw=c(),xp=n("span"),Iw=i("FlaxBartForQuestionAnswering"),_u=c(),H=n("div"),v(Ei.$$.fragment),Zw=c(),en=n("p"),Gw=i(`BART 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 `),$p=n("code"),Ww=i("span start logits"),Aw=i(" and "),jp=n("code"),Sw=i("span end logits"),Nw=i(")."),Rw=c(),Ci=n("p"),Xw=i("This model inherits from "),cl=n("a"),Vw=i("FlaxPreTrainedModel"),Pw=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.)`),Qw=c(),Ui=n("p"),Yw=i(`This model is also a Flax Linen
`),Ii=n("a"),Lw=i("flax.nn.Module"),Ow=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Hw=c(),Bp=n("p"),Dw=i("Finally, this model supports inherent JAX features such as:"),Kw=c(),Vt=n("ul"),zp=n("li"),Zi=n("a"),e0=i("Just-In-Time (JIT) compilation"),t0=c(),Jp=n("li"),Gi=n("a"),o0=i("Automatic Differentiation"),n0=c(),qp=n("li"),Wi=n("a"),a0=i("Vectorization"),s0=c(),Ep=n("li"),Ai=n("a"),r0=i("Parallelization"),i0=c(),Zt=n("div"),v(Si.$$.fragment),d0=c(),tn=n("p"),l0=i("The "),Cp=n("code"),c0=i("FlaxBartPreTrainedModel"),p0=i(" forward method, overrides the "),Up=n("code"),h0=i("__call__"),u0=i(" special method."),m0=c(),v(Ma.$$.fragment),f0=c(),v(Fa.$$.fragment),g0=c(),xa=n("div"),v(Ni.$$.fragment),_0=c(),v($a.$$.fragment),b0=c(),ja=n("div"),v(Ri.$$.fragment),y0=c(),v(Ba.$$.fragment),bu=c(),on=n("h2"),za=n("a"),Ip=n("span"),v(Xi.$$.fragment),v0=c(),Zp=n("span"),k0=i("FlaxBartForCausalLM"),yu=c(),Me=n("div"),v(Vi.$$.fragment),T0=c(),Gp=n("p"),w0=i(`Bart Decoder Model with a language modeling head on top (linear layer with weights tied to the input embeddings)
e.g for autoregressive tasks.`),M0=c(),Pi=n("p"),F0=i("This model inherits from "),pl=n("a"),x0=i("FlaxPreTrainedModel"),$0=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.)`),j0=c(),Qi=n("p"),B0=i(`This model is also a Flax Linen
`),Yi=n("a"),z0=i("flax.nn.Module"),J0=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),q0=c(),Wp=n("p"),E0=i("Finally, this model supports inherent JAX features such as:"),C0=c(),Pt=n("ul"),Ap=n("li"),Li=n("a"),U0=i("Just-In-Time (JIT) compilation"),I0=c(),Sp=n("li"),Oi=n("a"),Z0=i("Automatic Differentiation"),G0=c(),Np=n("li"),Hi=n("a"),W0=i("Vectorization"),A0=c(),Rp=n("li"),Di=n("a"),S0=i("Parallelization"),N0=c(),Gt=n("div"),v(Ki.$$.fragment),R0=c(),nn=n("p"),X0=i("The "),Xp=n("code"),V0=i("FlaxBartDecoderPreTrainedModel"),P0=i(" forward method, overrides the "),Vp=n("code"),Q0=i("__call__"),Y0=i(" special method."),L0=c(),v(Ja.$$.fragment),O0=c(),v(qa.$$.fragment),this.h()},l(o){const g=Jx('[data-svelte="svelte-1phssyn"]',document.head);l=a(g,"META",{name:!0,content:!0}),g.forEach(t),y=p(o),f=a(o,"H1",{class:!0});var ed=s(f);m=a(ed,"A",{id:!0,class:!0,href:!0});var Pp=s(m);b=a(Pp,"SPAN",{});var Qp=s(b);k(r.$$.fragment,Qp),Qp.forEach(t),Pp.forEach(t),u=p(ed),j=a(ed,"SPAN",{});var Yp=s(j);se=d(Yp,"BART"),Yp.forEach(t),ed.forEach(t),P=p(o),Z=a(o,"DIV",{class:!0});var td=s(Z);re=a(td,"A",{href:!0});var Lp=s(re);ie=a(Lp,"IMG",{alt:!0,src:!0}),Lp.forEach(t),Ve=p(td),Y=a(td,"A",{href:!0});var Op=s(Y);Fe=a(Op,"IMG",{alt:!0,src:!0}),Op.forEach(t),td.forEach(t),D=p(o),de=a(o,"P",{});var Ea=s(de);qe=a(Ea,"STRONG",{});var Hp=s(qe);le=d(Hp,"DISCLAIMER:"),Hp.forEach(t),Pe=d(Ea," If you see something strange, file a "),we=a(Ea,"A",{href:!0,rel:!0});var Dp=s(we);ce=d(Dp,"Github Issue"),Dp.forEach(t),Qe=d(Ea,` and assign
@patrickvonplaten`),Ea.forEach(t),Ze=p(o),W=a(o,"H2",{class:!0});var od=s(W);be=a(od,"A",{id:!0,class:!0,href:!0});var Kp=s(be);Ee=a(Kp,"SPAN",{});var eh=s(Ee);k(K.$$.fragment,eh),eh.forEach(t),Kp.forEach(t),E=p(od),C=a(od,"SPAN",{});var th=s(C);Ye=d(th,"Overview"),th.forEach(t),od.forEach(t),ee=p(o),ye=a(o,"P",{});var nd=s(ye);Le=d(nd,"The Bart model was proposed in "),Q=a(nd,"A",{href:!0,rel:!0});var oh=s(Q);Oe=d(oh,`BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation,
Translation, and Comprehension`),oh.forEach(t),He=d(nd,` by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan
Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer on 29 Oct, 2019.`),nd.forEach(t),U=p(o),xe=a(o,"P",{});var nh=s(xe);pe=d(nh,"According to the abstract,"),nh.forEach(t),Ge=p(o),te=a(o,"UL",{});var an=s(te);L=a(an,"LI",{});var ah=s(L);De=d(ah,`Bart uses a standard seq2seq/machine translation architecture with a bidirectional encoder (like BERT) and a
left-to-right decoder (like GPT).`),ah.forEach(t),Ke=p(an),X=a(an,"LI",{});var sh=s(X);et=d(sh,`The pretraining task involves randomly shuffling the order of the original sentences and a novel in-filling scheme,
where spans of text are replaced with a single mask token.`),sh.forEach(t),he=p(an),Ce=a(an,"LI",{});var rh=s(Ce);$e=d(rh,`BART is particularly effective when fine tuned for text generation but also works well for comprehension tasks. It
matches the performance of RoBERTa with comparable training resources on GLUE and SQuAD, achieves new
state-of-the-art results on a range of abstractive dialogue, question answering, and summarization tasks, with gains
of up to 6 ROUGE.`),rh.forEach(t),an.forEach(t),I=p(o),je=a(o,"P",{});var ih=s(je);A=d(ih,"Tips:"),ih.forEach(t),We=p(o),ve=a(o,"UL",{});var ad=s(ve);x=a(ad,"LI",{});var dh=s(x);z=a(dh,"P",{});var lh=s(z);wt=d(lh,`BART is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),lh.forEach(t),dh.forEach(t),Be=p(ad),Ae=a(ad,"LI",{});var sd=s(Ae);dt=a(sd,"P",{});var ch=s(dt);J=d(ch,"Sequence-to-sequence model with an encoder and a decoder. Encoder is fed a corrupted version of the tokens, decoder is fed the original tokens (but has a mask to hide the future words like a regular transformers decoder). A composition of the following transformations are applied on the pretraining tasks for the encoder:"),ch.forEach(t),Mt=p(sd),oe=a(sd,"UL",{});var Tt=s(oe);lt=a(Tt,"LI",{});var ph=s(lt);Ft=d(ph,"mask random tokens (like in BERT)"),ph.forEach(t),xt=p(Tt),V=a(Tt,"LI",{});var hh=s(V);ue=d(hh,"delete random tokens"),hh.forEach(t),$t=p(Tt),ct=a(Tt,"LI",{});var uh=s(ct);me=d(uh,"mask a span of k tokens with a single mask token (a span of 0 tokens is an insertion of a mask token)"),uh.forEach(t),jt=p(Tt),pt=a(Tt,"LI",{});var mh=s(pt);tt=d(mh,"permute sentences"),mh.forEach(t),Bt=p(Tt),ke=a(Tt,"LI",{});var fh=s(ke);zt=d(fh,"rotate the document to make it start at a specific token"),fh.forEach(t),Tt.forEach(t),sd.forEach(t),ad.forEach(t),Mh=p(o),Yt=a(o,"P",{});var sn=s(Yt);Im=d(sn,"This model was contributed by "),Ha=a(sn,"A",{href:!0,rel:!0});var gh=s(Ha);Zm=d(gh,"sshleifer"),gh.forEach(t),Gm=d(sn,". The Authors\u2019 code can be found "),Da=a(sn,"A",{href:!0,rel:!0});var _h=s(Da);Wm=d(_h,"here"),_h.forEach(t),Am=d(sn,"."),sn.forEach(t),Fh=p(o),yo=a(o,"H3",{class:!0});var rd=s(yo);dn=a(rd,"A",{id:!0,class:!0,href:!0});var bh=s(dn);Ul=a(bh,"SPAN",{});var yh=s(Ul);k(Ka.$$.fragment,yh),yh.forEach(t),bh.forEach(t),Sm=p(rd),Il=a(rd,"SPAN",{});var vh=s(Il);Nm=d(vh,"Examples"),vh.forEach(t),rd.forEach(t),xh=p(o),Lt=a(o,"UL",{});var rn=s(Lt);es=a(rn,"LI",{});var id=s(es);Rm=d(id,`Examples and scripts for fine-tuning BART and other models for sequence to sequence tasks can be found in
`),ts=a(id,"A",{href:!0,rel:!0});var kh=s(ts);Xm=d(kh,"examples/pytorch/summarization/"),kh.forEach(t),Vm=d(id,"."),id.forEach(t),Pm=p(rn),At=a(rn,"LI",{});var Qt=s(At);Qm=d(Qt,"An example of how to train "),fd=a(Qt,"A",{href:!0});var nM=s(fd);Ym=d(nM,"BartForConditionalGeneration"),nM.forEach(t),Lm=d(Qt," with a Hugging Face "),Zl=a(Qt,"CODE",{});var aM=s(Zl);Om=d(aM,"datasets"),aM.forEach(t),Hm=d(Qt,`
object can be found in this `),os=a(Qt,"A",{href:!0,rel:!0});var sM=s(os);Dm=d(sM,"forum discussion"),sM.forEach(t),Km=d(Qt,"."),Qt.forEach(t),ef=p(rn),ln=a(rn,"LI",{});var Th=s(ln);ns=a(Th,"A",{href:!0,rel:!0});var rM=s(ns);tf=d(rM,"Distilled checkpoints"),rM.forEach(t),of=d(Th," are described in this "),as=a(Th,"A",{href:!0,rel:!0});var iM=s(as);nf=d(iM,"paper"),iM.forEach(t),af=d(Th,"."),Th.forEach(t),rn.forEach(t),$h=p(o),vo=a(o,"H2",{class:!0});var ku=s(vo);cn=a(ku,"A",{id:!0,class:!0,href:!0});var dM=s(cn);Gl=a(dM,"SPAN",{});var lM=s(Gl);k(ss.$$.fragment,lM),lM.forEach(t),dM.forEach(t),sf=p(ku),Wl=a(ku,"SPAN",{});var cM=s(Wl);rf=d(cM,"Implementation Notes"),cM.forEach(t),ku.forEach(t),jh=p(o),ht=a(o,"UL",{});var io=s(ht);St=a(io,"LI",{});var Ca=s(St);df=d(Ca,"Bart doesn\u2019t use "),Al=a(Ca,"CODE",{});var pM=s(Al);lf=d(pM,"token_type_ids"),pM.forEach(t),cf=d(Ca," for sequence classification. Use "),gd=a(Ca,"A",{href:!0});var hM=s(gd);pf=d(hM,"BartTokenizer"),hM.forEach(t),hf=d(Ca,` or
`),_d=a(Ca,"A",{href:!0});var uM=s(_d);uf=d(uM,"encode()"),uM.forEach(t),mf=d(Ca," to get the proper splitting."),Ca.forEach(t),ff=p(io),ko=a(io,"LI",{});var hl=s(ko);gf=d(hl,"The forward pass of "),bd=a(hl,"A",{href:!0});var mM=s(bd);_f=d(mM,"BartModel"),mM.forEach(t),bf=d(hl," will create the "),Sl=a(hl,"CODE",{});var fM=s(Sl);yf=d(fM,"decoder_input_ids"),fM.forEach(t),vf=d(hl,` if they are not passed.
This is different than some other modeling APIs. A typical use case of this feature is mask filling.`),hl.forEach(t),kf=p(io),To=a(io,"LI",{});var ul=s(To);Tf=d(ul,`Model predictions are intended to be identical to the original implementation when
`),Nl=a(ul,"CODE",{});var gM=s(Nl);wf=d(gM,"forced_bos_token_id=0"),gM.forEach(t),Mf=d(ul,`. This only works, however, if the string you pass to
`),Rl=a(ul,"CODE",{});var _M=s(Rl);Ff=d(_M,"fairseq.encode"),_M.forEach(t),xf=d(ul," starts with a space."),ul.forEach(t),$f=p(io),yd=a(io,"LI",{});var H0=s(yd);vd=a(H0,"A",{href:!0});var bM=s(vd);jf=d(bM,"generate()"),bM.forEach(t),Bf=d(H0,` should be used for conditional generation tasks like
summarization, see the example in that docstrings.`),H0.forEach(t),zf=p(io),wo=a(io,"LI",{});var ml=s(wo);Jf=d(ml,"Models that load the "),Xl=a(ml,"EM",{});var yM=s(Xl);qf=d(yM,"facebook/bart-large-cnn"),yM.forEach(t),Ef=d(ml," weights will not have a "),Vl=a(ml,"CODE",{});var vM=s(Vl);Cf=d(vM,"mask_token_id"),vM.forEach(t),Uf=d(ml,`, or be able to perform
mask-filling tasks.`),ml.forEach(t),io.forEach(t),Bh=p(o),Mo=a(o,"H2",{class:!0});var Tu=s(Mo);pn=a(Tu,"A",{id:!0,class:!0,href:!0});var kM=s(pn);Pl=a(kM,"SPAN",{});var TM=s(Pl);k(rs.$$.fragment,TM),TM.forEach(t),kM.forEach(t),If=p(Tu),Ql=a(Tu,"SPAN",{});var wM=s(Ql);Zf=d(wM,"Mask Filling"),wM.forEach(t),Tu.forEach(t),zh=p(o),Ot=a(o,"P",{});var fl=s(Ot);Gf=d(fl,"The "),Yl=a(fl,"CODE",{});var MM=s(Yl);Wf=d(MM,"facebook/bart-base"),MM.forEach(t),Af=d(fl," and "),Ll=a(fl,"CODE",{});var FM=s(Ll);Sf=d(FM,"facebook/bart-large"),FM.forEach(t),Nf=d(fl," checkpoints can be used to fill multi-token masks."),fl.forEach(t),Jh=p(o),k(is.$$.fragment,o),qh=p(o),Fo=a(o,"H2",{class:!0});var wu=s(Fo);hn=a(wu,"A",{id:!0,class:!0,href:!0});var xM=s(hn);Ol=a(xM,"SPAN",{});var $M=s(Ol);k(ds.$$.fragment,$M),$M.forEach(t),xM.forEach(t),Rf=p(wu),Hl=a(wu,"SPAN",{});var jM=s(Hl);Xf=d(jM,"Resources"),jM.forEach(t),wu.forEach(t),Eh=p(o),kd=a(o,"P",{});var BM=s(kd);Vf=d(BM,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with BART. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),BM.forEach(t),Ch=p(o),k(ls.$$.fragment,o),Uh=p(o),Te=a(o,"UL",{});var Se=s(Te);cs=a(Se,"LI",{});var Mu=s(cs);Pf=d(Mu,"A blog post on "),ps=a(Mu,"A",{href:!0,rel:!0});var zM=s(ps);Qf=d(zM,"Distributed Training: Train BART/T5 for Summarization using \u{1F917} Transformers and Amazon SageMaker"),zM.forEach(t),Yf=d(Mu,"."),Mu.forEach(t),Lf=p(Se),hs=a(Se,"LI",{});var Fu=s(hs);Of=d(Fu,"A notebook on how to "),us=a(Fu,"A",{href:!0,rel:!0});var JM=s(us);Hf=d(JM,"finetune BART for summarization with fastai using blurr"),JM.forEach(t),Df=d(Fu,". \u{1F30E}"),Fu.forEach(t),Kf=p(Se),ms=a(Se,"LI",{});var xu=s(ms);eg=d(xu,"A notebook on how to "),fs=a(xu,"A",{href:!0,rel:!0});var qM=s(fs);tg=d(qM,"finetune BART for summarization in two languages with Trainer class"),qM.forEach(t),og=d(xu,". \u{1F30E}"),xu.forEach(t),ng=p(Se),Ht=a(Se,"LI",{});var dd=s(Ht);Td=a(dd,"A",{href:!0});var EM=s(Td);ag=d(EM,"BartForConditionalGeneration"),EM.forEach(t),sg=d(dd," is supported by this "),gs=a(dd,"A",{href:!0,rel:!0});var CM=s(gs);rg=d(CM,"example script"),CM.forEach(t),ig=d(dd," and "),_s=a(dd,"A",{href:!0,rel:!0});var UM=s(_s);dg=d(UM,"notebook"),UM.forEach(t),lg=d(dd,"."),dd.forEach(t),cg=p(Se),Dt=a(Se,"LI",{});var ld=s(Dt);wd=a(ld,"A",{href:!0});var IM=s(wd);pg=d(IM,"TFBartForConditionalGeneration"),IM.forEach(t),hg=d(ld," is supported by this "),bs=a(ld,"A",{href:!0,rel:!0});var ZM=s(bs);ug=d(ZM,"example script"),ZM.forEach(t),mg=d(ld," and "),ys=a(ld,"A",{href:!0,rel:!0});var GM=s(ys);fg=d(GM,"notebook"),GM.forEach(t),gg=d(ld,"."),ld.forEach(t),_g=p(Se),un=a(Se,"LI",{});var wh=s(un);Md=a(wh,"A",{href:!0});var WM=s(Md);bg=d(WM,"FlaxBartForConditionalGeneration"),WM.forEach(t),yg=d(wh," is supported by this "),vs=a(wh,"A",{href:!0,rel:!0});var AM=s(vs);vg=d(AM,"example script"),AM.forEach(t),kg=d(wh,"."),wh.forEach(t),Tg=p(Se),Fd=a(Se,"LI",{});var D0=s(Fd);ks=a(D0,"A",{href:!0,rel:!0});var SM=s(ks);wg=d(SM,"Summarization"),SM.forEach(t),Mg=d(D0," chapter of the \u{1F917} Hugging Face course."),D0.forEach(t),Fg=p(Se),Dl=a(Se,"LI",{});var NM=s(Dl);xd=a(NM,"A",{href:!0});var RM=s(xd);xg=d(RM,"Summarization task guide"),RM.forEach(t),NM.forEach(t),Se.forEach(t),Ih=p(o),k(Ts.$$.fragment,o),Zh=p(o),ut=a(o,"UL",{});var lo=s(ut);Kt=a(lo,"LI",{});var cd=s(Kt);$d=a(cd,"A",{href:!0});var XM=s($d);$g=d(XM,"BartForConditionalGeneration"),XM.forEach(t),jg=d(cd," is supported by this "),ws=a(cd,"A",{href:!0,rel:!0});var VM=s(ws);Bg=d(VM,"example script"),VM.forEach(t),zg=d(cd," and "),Ms=a(cd,"A",{href:!0,rel:!0});var PM=s(Ms);Jg=d(PM,"notebook"),PM.forEach(t),qg=d(cd,"."),cd.forEach(t),Eg=p(lo),eo=a(lo,"LI",{});var pd=s(eo);jd=a(pd,"A",{href:!0});var QM=s(jd);Cg=d(QM,"TFBartForConditionalGeneration"),QM.forEach(t),Ug=d(pd," is supported by this "),Fs=a(pd,"A",{href:!0,rel:!0});var YM=s(Fs);Ig=d(YM,"example script"),YM.forEach(t),Zg=d(pd," and "),xs=a(pd,"A",{href:!0,rel:!0});var LM=s(xs);Gg=d(LM,"notebook"),LM.forEach(t),Wg=d(pd,"."),pd.forEach(t),Ag=p(lo),to=a(lo,"LI",{});var hd=s(to);Bd=a(hd,"A",{href:!0});var OM=s(Bd);Sg=d(OM,"FlaxBartForConditionalGeneration"),OM.forEach(t),Ng=d(hd," is supported by this "),$s=a(hd,"A",{href:!0,rel:!0});var HM=s($s);Rg=d(HM,"example script"),HM.forEach(t),Xg=d(hd," and "),js=a(hd,"A",{href:!0,rel:!0});var DM=s(js);Vg=d(DM,"notebook"),DM.forEach(t),Pg=d(hd,"."),hd.forEach(t),Qg=p(lo),zd=a(lo,"LI",{});var K0=s(zd);Bs=a(K0,"A",{href:!0,rel:!0});var KM=s(Bs);Yg=d(KM,"Masked language modeling"),KM.forEach(t),Lg=d(K0," chapter of the \u{1F917} Hugging Face Course."),K0.forEach(t),Og=p(lo),Kl=a(lo,"LI",{});var e1=s(Kl);Jd=a(e1,"A",{href:!0});var t1=s(Jd);Hg=d(t1,"Masked language modeling task guide"),t1.forEach(t),e1.forEach(t),lo.forEach(t),Gh=p(o),k(zs.$$.fragment,o),Wh=p(o),Jt=a(o,"UL",{});var Ua=s(Jt);Js=a(Ua,"LI",{});var $u=s(Js);Dg=d($u,"A notebook on how to "),qs=a($u,"A",{href:!0,rel:!0});var o1=s(qs);Kg=d(o1,"finetune mBART using Seq2SeqTrainer for Hindi to English translation"),o1.forEach(t),e_=d($u,". \u{1F30E}"),$u.forEach(t),t_=p(Ua),oo=a(Ua,"LI",{});var ud=s(oo);qd=a(ud,"A",{href:!0});var n1=s(qd);o_=d(n1,"BartForConditionalGeneration"),n1.forEach(t),n_=d(ud," is supported by this "),Es=a(ud,"A",{href:!0,rel:!0});var a1=s(Es);a_=d(a1,"example script"),a1.forEach(t),s_=d(ud," and "),Cs=a(ud,"A",{href:!0,rel:!0});var s1=s(Cs);r_=d(s1,"notebook"),s1.forEach(t),i_=d(ud,"."),ud.forEach(t),d_=p(Ua),no=a(Ua,"LI",{});var md=s(no);Ed=a(md,"A",{href:!0});var r1=s(Ed);l_=d(r1,"TFBartForConditionalGeneration"),r1.forEach(t),c_=d(md," is supported by this "),Us=a(md,"A",{href:!0,rel:!0});var i1=s(Us);p_=d(i1,"example script"),i1.forEach(t),h_=d(md," and "),Is=a(md,"A",{href:!0,rel:!0});var d1=s(Is);u_=d(d1,"notebook"),d1.forEach(t),m_=d(md,"."),md.forEach(t),f_=p(Ua),ec=a(Ua,"LI",{});var l1=s(ec);Cd=a(l1,"A",{href:!0});var c1=s(Cd);g_=d(c1,"Translation task guide"),c1.forEach(t),l1.forEach(t),Ua.forEach(t),Ah=p(o),Ud=a(o,"P",{});var p1=s(Ud);__=d(p1,"See also:"),p1.forEach(t),Sh=p(o),ao=a(o,"UL",{});var gl=s(ao);tc=a(gl,"LI",{});var h1=s(tc);Id=a(h1,"A",{href:!0});var u1=s(Id);b_=d(u1,"Text classification task guide"),u1.forEach(t),h1.forEach(t),y_=p(gl),oc=a(gl,"LI",{});var m1=s(oc);Zd=a(m1,"A",{href:!0});var f1=s(Zd);v_=d(f1,"Question answering task guide"),f1.forEach(t),m1.forEach(t),k_=p(gl),nc=a(gl,"LI",{});var g1=s(nc);Gd=a(g1,"A",{href:!0});var _1=s(Gd);T_=d(_1,"Causal language modeling task guide"),_1.forEach(t),g1.forEach(t),gl.forEach(t),Nh=p(o),xo=a(o,"H2",{class:!0});var ju=s(xo);mn=a(ju,"A",{id:!0,class:!0,href:!0});var b1=s(mn);ac=a(b1,"SPAN",{});var y1=s(ac);k(Zs.$$.fragment,y1),y1.forEach(t),b1.forEach(t),w_=p(ju),sc=a(ju,"SPAN",{});var v1=s(sc);M_=d(v1,"BartConfig"),v1.forEach(t),ju.forEach(t),Rh=p(o),yt=a(o,"DIV",{class:!0});var Ia=s(yt);k(Gs.$$.fragment,Ia),F_=p(Ia),$o=a(Ia,"P",{});var _l=s($o);x_=d(_l,"This is the configuration class to store the configuration of a "),Wd=a(_l,"A",{href:!0});var k1=s(Wd);$_=d(k1,"BartModel"),k1.forEach(t),j_=d(_l,`. It is used to instantiate a BART
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 BART
`),Ws=a(_l,"A",{href:!0,rel:!0});var T1=s(Ws);B_=d(T1,"facebook/bart-large"),T1.forEach(t),z_=d(_l," architecture."),_l.forEach(t),J_=p(Ia),jo=a(Ia,"P",{});var bl=s(jo);q_=d(bl,"Configuration objects inherit from "),Ad=a(bl,"A",{href:!0});var w1=s(Ad);E_=d(w1,"PretrainedConfig"),w1.forEach(t),C_=d(bl,` and can be used to control the model outputs. Read the
documentation from `),Sd=a(bl,"A",{href:!0});var M1=s(Sd);U_=d(M1,"PretrainedConfig"),M1.forEach(t),I_=d(bl," for more information."),bl.forEach(t),Z_=p(Ia),k(fn.$$.fragment,Ia),Ia.forEach(t),Xh=p(o),Bo=a(o,"H2",{class:!0});var Bu=s(Bo);gn=a(Bu,"A",{id:!0,class:!0,href:!0});var F1=s(gn);rc=a(F1,"SPAN",{});var x1=s(rc);k(As.$$.fragment,x1),x1.forEach(t),F1.forEach(t),G_=p(Bu),ic=a(Bu,"SPAN",{});var $1=s(ic);W_=d($1,"BartTokenizer"),$1.forEach(t),Bu.forEach(t),Vh=p(o),S=a(o,"DIV",{class:!0});var ne=s(S);k(Ss.$$.fragment,ne),A_=p(ne),dc=a(ne,"P",{});var j1=s(dc);S_=d(j1,"Constructs a BART tokenizer, which is smilar to the ROBERTa tokenizer, using byte-level Byte-Pair-Encoding."),j1.forEach(t),N_=p(ne),lc=a(ne,"P",{});var B1=s(lc);R_=d(B1,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),B1.forEach(t),X_=p(ne),k(_n.$$.fragment,ne),V_=p(ne),Ns=a(ne,"P",{});var zu=s(Ns);P_=d(zu,"You can get around that behavior by passing "),cc=a(zu,"CODE",{});var z1=s(cc);Q_=d(z1,"add_prefix_space=True"),z1.forEach(t),Y_=d(zu,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),zu.forEach(t),L_=p(ne),k(bn.$$.fragment,ne),O_=p(ne),Rs=a(ne,"P",{});var Ju=s(Rs);H_=d(Ju,"This tokenizer inherits from "),Nd=a(Ju,"A",{href:!0});var J1=s(Nd);D_=d(J1,"PreTrainedTokenizer"),J1.forEach(t),K_=d(Ju,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ju.forEach(t),eb=p(ne),so=a(ne,"DIV",{class:!0});var yl=s(so);k(Xs.$$.fragment,yl),tb=p(yl),pc=a(yl,"P",{});var q1=s(pc);ob=d(q1,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BART sequence has the following format:`),q1.forEach(t),nb=p(yl),Vs=a(yl,"UL",{});var qu=s(Vs);Rd=a(qu,"LI",{});var eM=s(Rd);ab=d(eM,"single sequence: "),hc=a(eM,"CODE",{});var E1=s(hc);sb=d(E1,"<s> X </s>"),E1.forEach(t),eM.forEach(t),rb=p(qu),Xd=a(qu,"LI",{});var tM=s(Xd);ib=d(tM,"pair of sequences: "),uc=a(tM,"CODE",{});var C1=s(uc);db=d(C1,"<s> A </s></s> B </s>"),C1.forEach(t),tM.forEach(t),qu.forEach(t),yl.forEach(t),lb=p(ne),yn=a(ne,"DIV",{class:!0});var Eu=s(yn);k(Ps.$$.fragment,Eu),cb=p(Eu),mc=a(Eu,"P",{});var U1=s(mc);pb=d(U1,"Converts a sequence of tokens (string) in a single string."),U1.forEach(t),Eu.forEach(t),hb=p(ne),vn=a(ne,"DIV",{class:!0});var Cu=s(vn);k(Qs.$$.fragment,Cu),ub=p(Cu),fc=a(Cu,"P",{});var I1=s(fc);mb=d(I1,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. BART does not
make use of token type ids, therefore a list of zeros is returned.`),I1.forEach(t),Cu.forEach(t),fb=p(ne),kn=a(ne,"DIV",{class:!0});var Uu=s(kn);k(Ys.$$.fragment,Uu),gb=p(Uu),Ls=a(Uu,"P",{});var Iu=s(Ls);_b=d(Iu,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),gc=a(Iu,"CODE",{});var Z1=s(gc);bb=d(Z1,"prepare_for_model"),Z1.forEach(t),yb=d(Iu," method."),Iu.forEach(t),Uu.forEach(t),ne.forEach(t),Ph=p(o),zo=a(o,"H2",{class:!0});var Zu=s(zo);Tn=a(Zu,"A",{id:!0,class:!0,href:!0});var G1=s(Tn);_c=a(G1,"SPAN",{});var W1=s(_c);k(Os.$$.fragment,W1),W1.forEach(t),G1.forEach(t),vb=p(Zu),bc=a(Zu,"SPAN",{});var A1=s(bc);kb=d(A1,"BartTokenizerFast"),A1.forEach(t),Zu.forEach(t),Qh=p(o),fe=a(o,"DIV",{class:!0});var Ne=s(fe);k(Hs.$$.fragment,Ne),Tb=p(Ne),Ds=a(Ne,"P",{});var Gu=s(Ds);wb=d(Gu,"Construct a \u201Cfast\u201D BART tokenizer (backed by HuggingFace\u2019s "),yc=a(Gu,"EM",{});var S1=s(yc);Mb=d(S1,"tokenizers"),S1.forEach(t),Fb=d(Gu,` library), derived from the GPT-2 tokenizer,
using byte-level Byte-Pair-Encoding.`),Gu.forEach(t),xb=p(Ne),vc=a(Ne,"P",{});var N1=s(vc);$b=d(N1,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),N1.forEach(t),jb=p(Ne),k(wn.$$.fragment,Ne),Bb=p(Ne),Ks=a(Ne,"P",{});var Wu=s(Ks);zb=d(Wu,"You can get around that behavior by passing "),kc=a(Wu,"CODE",{});var R1=s(kc);Jb=d(R1,"add_prefix_space=True"),R1.forEach(t),qb=d(Wu,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),Wu.forEach(t),Eb=p(Ne),k(Mn.$$.fragment,Ne),Cb=p(Ne),er=a(Ne,"P",{});var Au=s(er);Ub=d(Au,"This tokenizer inherits from "),Vd=a(Au,"A",{href:!0});var X1=s(Vd);Ib=d(X1,"PreTrainedTokenizerFast"),X1.forEach(t),Zb=d(Au,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Au.forEach(t),Gb=p(Ne),Fn=a(Ne,"DIV",{class:!0});var Su=s(Fn);k(tr.$$.fragment,Su),Wb=p(Su),Tc=a(Su,"P",{});var V1=s(Tc);Ab=d(V1,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. BART does not
make use of token type ids, therefore a list of zeros is returned.`),V1.forEach(t),Su.forEach(t),Ne.forEach(t),Yh=p(o),Jo=a(o,"H2",{class:!0});var Nu=s(Jo);xn=a(Nu,"A",{id:!0,class:!0,href:!0});var P1=s(xn);wc=a(P1,"SPAN",{});var Q1=s(wc);k(or.$$.fragment,Q1),Q1.forEach(t),P1.forEach(t),Sb=p(Nu),Mc=a(Nu,"SPAN",{});var Y1=s(Mc);Nb=d(Y1,"BartModel"),Y1.forEach(t),Nu.forEach(t),Lh=p(o),vt=a(o,"DIV",{class:!0});var Za=s(vt);k(nr.$$.fragment,Za),Rb=p(Za),ar=a(Za,"P",{});var Ru=s(ar);Xb=d(Ru,`The bare BART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Pd=a(Ru,"A",{href:!0});var L1=s(Pd);Vb=d(L1,"PreTrainedModel"),L1.forEach(t),Pb=d(Ru,`. 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.)`),Ru.forEach(t),Qb=p(Za),sr=a(Za,"P",{});var Xu=s(sr);Yb=d(Xu,"This model is also a PyTorch "),rr=a(Xu,"A",{href:!0,rel:!0});var O1=s(rr);Lb=d(O1,"torch.nn.Module"),O1.forEach(t),Ob=d(Xu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xu.forEach(t),Hb=p(Za),qt=a(Za,"DIV",{class:!0});var Ga=s(qt);k(ir.$$.fragment,Ga),Db=p(Ga),qo=a(Ga,"P",{});var vl=s(qo);Kb=d(vl,"The "),Qd=a(vl,"A",{href:!0});var H1=s(Qd);ey=d(H1,"BartModel"),H1.forEach(t),ty=d(vl," forward method, overrides the "),Fc=a(vl,"CODE",{});var D1=s(Fc);oy=d(D1,"__call__"),D1.forEach(t),ny=d(vl," special method."),vl.forEach(t),ay=p(Ga),k($n.$$.fragment,Ga),sy=p(Ga),k(jn.$$.fragment,Ga),Ga.forEach(t),Za.forEach(t),Oh=p(o),Eo=a(o,"H2",{class:!0});var Vu=s(Eo);Bn=a(Vu,"A",{id:!0,class:!0,href:!0});var K1=s(Bn);xc=a(K1,"SPAN",{});var e2=s(xc);k(dr.$$.fragment,e2),e2.forEach(t),K1.forEach(t),ry=p(Vu),$c=a(Vu,"SPAN",{});var t2=s($c);iy=d(t2,"BartForConditionalGeneration"),t2.forEach(t),Vu.forEach(t),Hh=p(o),kt=a(o,"DIV",{class:!0});var Wa=s(kt);k(lr.$$.fragment,Wa),dy=p(Wa),cr=a(Wa,"P",{});var Pu=s(cr);ly=d(Pu,`The BART Model with a language modeling head. Can be used for summarization.
This model inherits from `),Yd=a(Pu,"A",{href:!0});var o2=s(Yd);cy=d(o2,"PreTrainedModel"),o2.forEach(t),py=d(Pu,`. 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.)`),Pu.forEach(t),hy=p(Wa),pr=a(Wa,"P",{});var Qu=s(pr);uy=d(Qu,"This model is also a PyTorch "),hr=a(Qu,"A",{href:!0,rel:!0});var n2=s(hr);my=d(n2,"torch.nn.Module"),n2.forEach(t),fy=d(Qu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qu.forEach(t),gy=p(Wa),mt=a(Wa,"DIV",{class:!0});var co=s(mt);k(ur.$$.fragment,co),_y=p(co),Co=a(co,"P",{});var kl=s(Co);by=d(kl,"The "),Ld=a(kl,"A",{href:!0});var a2=s(Ld);yy=d(a2,"BartForConditionalGeneration"),a2.forEach(t),vy=d(kl," forward method, overrides the "),jc=a(kl,"CODE",{});var s2=s(jc);ky=d(s2,"__call__"),s2.forEach(t),Ty=d(kl," special method."),kl.forEach(t),wy=p(co),k(zn.$$.fragment,co),My=p(co),k(Jn.$$.fragment,co),Fy=p(co),k(qn.$$.fragment,co),co.forEach(t),Wa.forEach(t),Dh=p(o),Uo=a(o,"H2",{class:!0});var Yu=s(Uo);En=a(Yu,"A",{id:!0,class:!0,href:!0});var r2=s(En);Bc=a(r2,"SPAN",{});var i2=s(Bc);k(mr.$$.fragment,i2),i2.forEach(t),r2.forEach(t),xy=p(Yu),zc=a(Yu,"SPAN",{});var d2=s(zc);$y=d(d2,"BartForSequenceClassification"),d2.forEach(t),Yu.forEach(t),Kh=p(o),ot=a(o,"DIV",{class:!0});var po=s(ot);k(fr.$$.fragment,po),jy=p(po),Jc=a(po,"P",{});var l2=s(Jc);By=d(l2,`Bart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),l2.forEach(t),zy=p(po),gr=a(po,"P",{});var Lu=s(gr);Jy=d(Lu,"This model inherits from "),Od=a(Lu,"A",{href:!0});var c2=s(Od);qy=d(c2,"PreTrainedModel"),c2.forEach(t),Ey=d(Lu,`. 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.)`),Lu.forEach(t),Cy=p(po),_r=a(po,"P",{});var Ou=s(_r);Uy=d(Ou,"This model is also a PyTorch "),br=a(Ou,"A",{href:!0,rel:!0});var p2=s(br);Iy=d(p2,"torch.nn.Module"),p2.forEach(t),Zy=d(Ou,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ou.forEach(t),Gy=p(po),ft=a(po,"DIV",{class:!0});var ho=s(ft);k(yr.$$.fragment,ho),Wy=p(ho),Io=a(ho,"P",{});var Tl=s(Io);Ay=d(Tl,"The "),Hd=a(Tl,"A",{href:!0});var h2=s(Hd);Sy=d(h2,"BartForSequenceClassification"),h2.forEach(t),Ny=d(Tl," forward method, overrides the "),qc=a(Tl,"CODE",{});var u2=s(qc);Ry=d(u2,"__call__"),u2.forEach(t),Xy=d(Tl," special method."),Tl.forEach(t),Vy=p(ho),k(Cn.$$.fragment,ho),Py=p(ho),k(Un.$$.fragment,ho),Qy=p(ho),k(In.$$.fragment,ho),ho.forEach(t),po.forEach(t),eu=p(o),Zo=a(o,"H2",{class:!0});var Hu=s(Zo);Zn=a(Hu,"A",{id:!0,class:!0,href:!0});var m2=s(Zn);Ec=a(m2,"SPAN",{});var f2=s(Ec);k(vr.$$.fragment,f2),f2.forEach(t),m2.forEach(t),Yy=p(Hu),Cc=a(Hu,"SPAN",{});var g2=s(Cc);Ly=d(g2,"BartForQuestionAnswering"),g2.forEach(t),Hu.forEach(t),tu=p(o),nt=a(o,"DIV",{class:!0});var uo=s(nt);k(kr.$$.fragment,uo),Oy=p(uo),Go=a(uo,"P",{});var wl=s(Go);Hy=d(wl,`BART 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 `),Uc=a(wl,"CODE",{});var _2=s(Uc);Dy=d(_2,"span start logits"),_2.forEach(t),Ky=d(wl," and "),Ic=a(wl,"CODE",{});var b2=s(Ic);ev=d(b2,"span end logits"),b2.forEach(t),tv=d(wl,")."),wl.forEach(t),ov=p(uo),Tr=a(uo,"P",{});var Du=s(Tr);nv=d(Du,"This model inherits from "),Dd=a(Du,"A",{href:!0});var y2=s(Dd);av=d(y2,"PreTrainedModel"),y2.forEach(t),sv=d(Du,`. 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.)`),Du.forEach(t),rv=p(uo),wr=a(uo,"P",{});var Ku=s(wr);iv=d(Ku,"This model is also a PyTorch "),Mr=a(Ku,"A",{href:!0,rel:!0});var v2=s(Mr);dv=d(v2,"torch.nn.Module"),v2.forEach(t),lv=d(Ku,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ku.forEach(t),cv=p(uo),Et=a(uo,"DIV",{class:!0});var Aa=s(Et);k(Fr.$$.fragment,Aa),pv=p(Aa),Wo=a(Aa,"P",{});var Ml=s(Wo);hv=d(Ml,"The "),Kd=a(Ml,"A",{href:!0});var k2=s(Kd);uv=d(k2,"BartForQuestionAnswering"),k2.forEach(t),mv=d(Ml," forward method, overrides the "),Zc=a(Ml,"CODE",{});var T2=s(Zc);fv=d(T2,"__call__"),T2.forEach(t),gv=d(Ml," special method."),Ml.forEach(t),_v=p(Aa),k(Gn.$$.fragment,Aa),bv=p(Aa),k(Wn.$$.fragment,Aa),Aa.forEach(t),uo.forEach(t),ou=p(o),Ao=a(o,"H2",{class:!0});var em=s(Ao);An=a(em,"A",{id:!0,class:!0,href:!0});var w2=s(An);Gc=a(w2,"SPAN",{});var M2=s(Gc);k(xr.$$.fragment,M2),M2.forEach(t),w2.forEach(t),yv=p(em),Wc=a(em,"SPAN",{});var F2=s(Wc);vv=d(F2,"BartForCausalLM"),F2.forEach(t),em.forEach(t),nu=p(o),at=a(o,"DIV",{class:!0});var mo=s(at);k($r.$$.fragment,mo),kv=p(mo),Ac=a(mo,"P",{});var x2=s(Ac);Tv=d(x2,"BART decoder with with a language modeling head on top (linear layer with weights tied to the input embeddings)."),x2.forEach(t),wv=p(mo),jr=a(mo,"P",{});var tm=s(jr);Mv=d(tm,"This model inherits from "),el=a(tm,"A",{href:!0});var $2=s(el);Fv=d($2,"PreTrainedModel"),$2.forEach(t),xv=d(tm,`. 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.)`),tm.forEach(t),$v=p(mo),Br=a(mo,"P",{});var om=s(Br);jv=d(om,"This model is also a PyTorch "),zr=a(om,"A",{href:!0,rel:!0});var j2=s(zr);Bv=d(j2,"torch.nn.Module"),j2.forEach(t),zv=d(om,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),om.forEach(t),Jv=p(mo),Sn=a(mo,"DIV",{class:!0});var nm=s(Sn);k(Jr.$$.fragment,nm),qv=p(nm),k(Nn.$$.fragment,nm),nm.forEach(t),mo.forEach(t),au=p(o),So=a(o,"H2",{class:!0});var am=s(So);Rn=a(am,"A",{id:!0,class:!0,href:!0});var B2=s(Rn);Sc=a(B2,"SPAN",{});var z2=s(Sc);k(qr.$$.fragment,z2),z2.forEach(t),B2.forEach(t),Ev=p(am),Nc=a(am,"SPAN",{});var J2=s(Nc);Cv=d(J2,"TFBartModel"),J2.forEach(t),am.forEach(t),su=p(o),st=a(o,"DIV",{class:!0});var fo=s(st);k(Er.$$.fragment,fo),Uv=p(fo),Cr=a(fo,"P",{});var sm=s(Cr);Iv=d(sm,`The bare BART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),tl=a(sm,"A",{href:!0});var q2=s(tl);Zv=d(q2,"TFPreTrainedModel"),q2.forEach(t),Gv=d(sm,`. 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.)`),sm.forEach(t),Wv=p(fo),Ur=a(fo,"P",{});var rm=s(Ur);Av=d(rm,"This model is also a "),Ir=a(rm,"A",{href:!0,rel:!0});var E2=s(Ir);Sv=d(E2,"tf.keras.Model"),E2.forEach(t),Nv=d(rm,` 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.`),rm.forEach(t),Rv=p(fo),k(Xn.$$.fragment,fo),Xv=p(fo),Ct=a(fo,"DIV",{class:!0});var Sa=s(Ct);k(Zr.$$.fragment,Sa),Vv=p(Sa),No=a(Sa,"P",{});var Fl=s(No);Pv=d(Fl,"The "),ol=a(Fl,"A",{href:!0});var C2=s(ol);Qv=d(C2,"TFBartModel"),C2.forEach(t),Yv=d(Fl," forward method, overrides the "),Rc=a(Fl,"CODE",{});var U2=s(Rc);Lv=d(U2,"__call__"),U2.forEach(t),Ov=d(Fl," special method."),Fl.forEach(t),Hv=p(Sa),k(Vn.$$.fragment,Sa),Dv=p(Sa),k(Pn.$$.fragment,Sa),Sa.forEach(t),fo.forEach(t),ru=p(o),Ro=a(o,"H2",{class:!0});var im=s(Ro);Qn=a(im,"A",{id:!0,class:!0,href:!0});var I2=s(Qn);Xc=a(I2,"SPAN",{});var Z2=s(Xc);k(Gr.$$.fragment,Z2),Z2.forEach(t),I2.forEach(t),Kv=p(im),Vc=a(im,"SPAN",{});var G2=s(Vc);ek=d(G2,"TFBartForConditionalGeneration"),G2.forEach(t),im.forEach(t),iu=p(o),rt=a(o,"DIV",{class:!0});var go=s(rt);k(Wr.$$.fragment,go),tk=p(go),Ar=a(go,"P",{});var dm=s(Ar);ok=d(dm,`The BART Model with a language modeling head. Can be used for summarization.
This model inherits from `),nl=a(dm,"A",{href:!0});var W2=s(nl);nk=d(W2,"TFPreTrainedModel"),W2.forEach(t),ak=d(dm,`. 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.)`),dm.forEach(t),sk=p(go),Sr=a(go,"P",{});var lm=s(Sr);rk=d(lm,"This model is also a "),Nr=a(lm,"A",{href:!0,rel:!0});var A2=s(Nr);ik=d(A2,"tf.keras.Model"),A2.forEach(t),dk=d(lm,` 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.`),lm.forEach(t),lk=p(go),k(Yn.$$.fragment,go),ck=p(go),gt=a(go,"DIV",{class:!0});var _o=s(gt);k(Rr.$$.fragment,_o),pk=p(_o),Xo=a(_o,"P",{});var xl=s(Xo);hk=d(xl,"The "),al=a(xl,"A",{href:!0});var S2=s(al);uk=d(S2,"TFBartForConditionalGeneration"),S2.forEach(t),mk=d(xl," forward method, overrides the "),Pc=a(xl,"CODE",{});var N2=s(Pc);fk=d(N2,"__call__"),N2.forEach(t),gk=d(xl," special method."),xl.forEach(t),_k=p(_o),k(Ln.$$.fragment,_o),bk=p(_o),k(On.$$.fragment,_o),yk=p(_o),k(Hn.$$.fragment,_o),_o.forEach(t),go.forEach(t),du=p(o),Vo=a(o,"H2",{class:!0});var cm=s(Vo);Dn=a(cm,"A",{id:!0,class:!0,href:!0});var R2=s(Dn);Qc=a(R2,"SPAN",{});var X2=s(Qc);k(Xr.$$.fragment,X2),X2.forEach(t),R2.forEach(t),vk=p(cm),Yc=a(cm,"SPAN",{});var V2=s(Yc);kk=d(V2,"TFBartForSequenceClassification"),V2.forEach(t),cm.forEach(t),lu=p(o),Ue=a(o,"DIV",{class:!0});var Wt=s(Ue);k(Vr.$$.fragment,Wt),Tk=p(Wt),Lc=a(Wt,"P",{});var P2=s(Lc);wk=d(P2,`Bart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),P2.forEach(t),Mk=p(Wt),Pr=a(Wt,"P",{});var pm=s(Pr);Fk=d(pm,"This model inherits from "),sl=a(pm,"A",{href:!0});var Q2=s(sl);xk=d(Q2,"TFPreTrainedModel"),Q2.forEach(t),$k=d(pm,`. 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.)`),pm.forEach(t),jk=p(Wt),Qr=a(Wt,"P",{});var hm=s(Qr);Bk=d(hm,"This model is also a "),Yr=a(hm,"A",{href:!0,rel:!0});var Y2=s(Yr);zk=d(Y2,"tf.keras.Model"),Y2.forEach(t),Jk=d(hm,` 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.`),hm.forEach(t),qk=p(Wt),k(Kn.$$.fragment,Wt),Ek=p(Wt),ro=a(Wt,"DIV",{class:!0});var $l=s(ro);k(Lr.$$.fragment,$l),Ck=p($l),Po=a($l,"P",{});var jl=s(Po);Uk=d(jl,"The "),rl=a(jl,"A",{href:!0});var L2=s(rl);Ik=d(L2,"TFBartForSequenceClassification"),L2.forEach(t),Zk=d(jl," forward method, overrides the "),Oc=a(jl,"CODE",{});var O2=s(Oc);Gk=d(O2,"__call__"),O2.forEach(t),Wk=d(jl," special method."),jl.forEach(t),Ak=p($l),k(ea.$$.fragment,$l),$l.forEach(t),Wt.forEach(t),cu=p(o),Qo=a(o,"H2",{class:!0});var um=s(Qo);ta=a(um,"A",{id:!0,class:!0,href:!0});var H2=s(ta);Hc=a(H2,"SPAN",{});var D2=s(Hc);k(Or.$$.fragment,D2),D2.forEach(t),H2.forEach(t),Sk=p(um),Dc=a(um,"SPAN",{});var K2=s(Dc);Nk=d(K2,"FlaxBartModel"),K2.forEach(t),um.forEach(t),pu=p(o),ge=a(o,"DIV",{class:!0});var Re=s(ge);k(Hr.$$.fragment,Re),Rk=p(Re),Dr=a(Re,"P",{});var mm=s(Dr);Xk=d(mm,`The bare Bart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),il=a(mm,"A",{href:!0});var eF=s(il);Vk=d(eF,"FlaxPreTrainedModel"),eF.forEach(t),Pk=d(mm,`. 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.)`),mm.forEach(t),Qk=p(Re),Kr=a(Re,"P",{});var fm=s(Kr);Yk=d(fm,`This model is also a Flax Linen
`),ei=a(fm,"A",{href:!0,rel:!0});var tF=s(ei);Lk=d(tF,"flax.nn.Module"),tF.forEach(t),Ok=d(fm,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),fm.forEach(t),Hk=p(Re),Kc=a(Re,"P",{});var oF=s(Kc);Dk=d(oF,"Finally, this model supports inherent JAX features such as:"),oF.forEach(t),Kk=p(Re),Nt=a(Re,"UL",{});var Na=s(Nt);ep=a(Na,"LI",{});var nF=s(ep);ti=a(nF,"A",{href:!0,rel:!0});var aF=s(ti);eT=d(aF,"Just-In-Time (JIT) compilation"),aF.forEach(t),nF.forEach(t),tT=p(Na),tp=a(Na,"LI",{});var sF=s(tp);oi=a(sF,"A",{href:!0,rel:!0});var rF=s(oi);oT=d(rF,"Automatic Differentiation"),rF.forEach(t),sF.forEach(t),nT=p(Na),op=a(Na,"LI",{});var iF=s(op);ni=a(iF,"A",{href:!0,rel:!0});var dF=s(ni);aT=d(dF,"Vectorization"),dF.forEach(t),iF.forEach(t),sT=p(Na),np=a(Na,"LI",{});var lF=s(np);ai=a(lF,"A",{href:!0,rel:!0});var cF=s(ai);rT=d(cF,"Parallelization"),cF.forEach(t),lF.forEach(t),Na.forEach(t),iT=p(Re),Ut=a(Re,"DIV",{class:!0});var Ra=s(Ut);k(si.$$.fragment,Ra),dT=p(Ra),Yo=a(Ra,"P",{});var Bl=s(Yo);lT=d(Bl,"The "),ap=a(Bl,"CODE",{});var pF=s(ap);cT=d(pF,"FlaxBartPreTrainedModel"),pF.forEach(t),pT=d(Bl," forward method, overrides the "),sp=a(Bl,"CODE",{});var hF=s(sp);hT=d(hF,"__call__"),hF.forEach(t),uT=d(Bl," special method."),Bl.forEach(t),mT=p(Ra),k(oa.$$.fragment,Ra),fT=p(Ra),k(na.$$.fragment,Ra),Ra.forEach(t),gT=p(Re),aa=a(Re,"DIV",{class:!0});var gm=s(aa);k(ri.$$.fragment,gm),_T=p(gm),k(sa.$$.fragment,gm),gm.forEach(t),bT=p(Re),ra=a(Re,"DIV",{class:!0});var _m=s(ra);k(ii.$$.fragment,_m),yT=p(_m),k(ia.$$.fragment,_m),_m.forEach(t),Re.forEach(t),hu=p(o),Lo=a(o,"H2",{class:!0});var bm=s(Lo);da=a(bm,"A",{id:!0,class:!0,href:!0});var uF=s(da);rp=a(uF,"SPAN",{});var mF=s(rp);k(di.$$.fragment,mF),mF.forEach(t),uF.forEach(t),vT=p(bm),ip=a(bm,"SPAN",{});var fF=s(ip);kT=d(fF,"FlaxBartForConditionalGeneration"),fF.forEach(t),bm.forEach(t),uu=p(o),_e=a(o,"DIV",{class:!0});var Xe=s(_e);k(li.$$.fragment,Xe),TT=p(Xe),ci=a(Xe,"P",{});var ym=s(ci);wT=d(ym,`The BART Model with a language modeling head. Can be used for summarization.
This model inherits from `),dl=a(ym,"A",{href:!0});var gF=s(dl);MT=d(gF,"FlaxPreTrainedModel"),gF.forEach(t),FT=d(ym,`. 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.)`),ym.forEach(t),xT=p(Xe),pi=a(Xe,"P",{});var vm=s(pi);$T=d(vm,`This model is also a Flax Linen
`),hi=a(vm,"A",{href:!0,rel:!0});var _F=s(hi);jT=d(_F,"flax.nn.Module"),_F.forEach(t),BT=d(vm,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),vm.forEach(t),zT=p(Xe),dp=a(Xe,"P",{});var bF=s(dp);JT=d(bF,"Finally, this model supports inherent JAX features such as:"),bF.forEach(t),qT=p(Xe),Rt=a(Xe,"UL",{});var Xa=s(Rt);lp=a(Xa,"LI",{});var yF=s(lp);ui=a(yF,"A",{href:!0,rel:!0});var vF=s(ui);ET=d(vF,"Just-In-Time (JIT) compilation"),vF.forEach(t),yF.forEach(t),CT=p(Xa),cp=a(Xa,"LI",{});var kF=s(cp);mi=a(kF,"A",{href:!0,rel:!0});var TF=s(mi);UT=d(TF,"Automatic Differentiation"),TF.forEach(t),kF.forEach(t),IT=p(Xa),pp=a(Xa,"LI",{});var wF=s(pp);fi=a(wF,"A",{href:!0,rel:!0});var MF=s(fi);ZT=d(MF,"Vectorization"),MF.forEach(t),wF.forEach(t),GT=p(Xa),hp=a(Xa,"LI",{});var FF=s(hp);gi=a(FF,"A",{href:!0,rel:!0});var xF=s(gi);WT=d(xF,"Parallelization"),xF.forEach(t),FF.forEach(t),Xa.forEach(t),AT=p(Xe),_t=a(Xe,"DIV",{class:!0});var bo=s(_t);k(_i.$$.fragment,bo),ST=p(bo),Oo=a(bo,"P",{});var zl=s(Oo);NT=d(zl,"The "),up=a(zl,"CODE",{});var $F=s(up);RT=d($F,"FlaxBartPreTrainedModel"),$F.forEach(t),XT=d(zl," forward method, overrides the "),mp=a(zl,"CODE",{});var jF=s(mp);VT=d(jF,"__call__"),jF.forEach(t),PT=d(zl," special method."),zl.forEach(t),QT=p(bo),k(la.$$.fragment,bo),YT=p(bo),k(ca.$$.fragment,bo),LT=p(bo),k(pa.$$.fragment,bo),bo.forEach(t),OT=p(Xe),ha=a(Xe,"DIV",{class:!0});var km=s(ha);k(bi.$$.fragment,km),HT=p(km),k(ua.$$.fragment,km),km.forEach(t),DT=p(Xe),ma=a(Xe,"DIV",{class:!0});var Tm=s(ma);k(yi.$$.fragment,Tm),KT=p(Tm),k(fa.$$.fragment,Tm),Tm.forEach(t),Xe.forEach(t),mu=p(o),Ho=a(o,"H2",{class:!0});var wm=s(Ho);ga=a(wm,"A",{id:!0,class:!0,href:!0});var BF=s(ga);fp=a(BF,"SPAN",{});var zF=s(fp);k(vi.$$.fragment,zF),zF.forEach(t),BF.forEach(t),ew=p(wm),gp=a(wm,"SPAN",{});var JF=s(gp);tw=d(JF,"FlaxBartForSequenceClassification"),JF.forEach(t),wm.forEach(t),fu=p(o),O=a(o,"DIV",{class:!0});var ze=s(O);k(ki.$$.fragment,ze),ow=p(ze),_p=a(ze,"P",{});var qF=s(_p);nw=d(qF,`Bart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),qF.forEach(t),aw=p(ze),Ti=a(ze,"P",{});var Mm=s(Ti);sw=d(Mm,"This model inherits from "),ll=a(Mm,"A",{href:!0});var EF=s(ll);rw=d(EF,"FlaxPreTrainedModel"),EF.forEach(t),iw=d(Mm,`. 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.)`),Mm.forEach(t),dw=p(ze),wi=a(ze,"P",{});var Fm=s(wi);lw=d(Fm,`This model is also a Flax Linen
`),Mi=a(Fm,"A",{href:!0,rel:!0});var CF=s(Mi);cw=d(CF,"flax.nn.Module"),CF.forEach(t),pw=d(Fm,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Fm.forEach(t),hw=p(ze),bp=a(ze,"P",{});var UF=s(bp);uw=d(UF,"Finally, this model supports inherent JAX features such as:"),UF.forEach(t),mw=p(ze),Xt=a(ze,"UL",{});var Va=s(Xt);yp=a(Va,"LI",{});var IF=s(yp);Fi=a(IF,"A",{href:!0,rel:!0});var ZF=s(Fi);fw=d(ZF,"Just-In-Time (JIT) compilation"),ZF.forEach(t),IF.forEach(t),gw=p(Va),vp=a(Va,"LI",{});var GF=s(vp);xi=a(GF,"A",{href:!0,rel:!0});var WF=s(xi);_w=d(WF,"Automatic Differentiation"),WF.forEach(t),GF.forEach(t),bw=p(Va),kp=a(Va,"LI",{});var AF=s(kp);$i=a(AF,"A",{href:!0,rel:!0});var SF=s($i);yw=d(SF,"Vectorization"),SF.forEach(t),AF.forEach(t),vw=p(Va),Tp=a(Va,"LI",{});var NF=s(Tp);ji=a(NF,"A",{href:!0,rel:!0});var RF=s(ji);kw=d(RF,"Parallelization"),RF.forEach(t),NF.forEach(t),Va.forEach(t),Tw=p(ze),It=a(ze,"DIV",{class:!0});var Pa=s(It);k(Bi.$$.fragment,Pa),ww=p(Pa),Do=a(Pa,"P",{});var Jl=s(Do);Mw=d(Jl,"The "),wp=a(Jl,"CODE",{});var XF=s(wp);Fw=d(XF,"FlaxBartPreTrainedModel"),XF.forEach(t),xw=d(Jl," forward method, overrides the "),Mp=a(Jl,"CODE",{});var VF=s(Mp);$w=d(VF,"__call__"),VF.forEach(t),jw=d(Jl," special method."),Jl.forEach(t),Bw=p(Pa),k(_a.$$.fragment,Pa),zw=p(Pa),k(ba.$$.fragment,Pa),Pa.forEach(t),Jw=p(ze),ya=a(ze,"DIV",{class:!0});var xm=s(ya);k(zi.$$.fragment,xm),qw=p(xm),k(va.$$.fragment,xm),xm.forEach(t),Ew=p(ze),ka=a(ze,"DIV",{class:!0});var $m=s(ka);k(Ji.$$.fragment,$m),Cw=p($m),k(Ta.$$.fragment,$m),$m.forEach(t),ze.forEach(t),gu=p(o),Ko=a(o,"H2",{class:!0});var jm=s(Ko);wa=a(jm,"A",{id:!0,class:!0,href:!0});var PF=s(wa);Fp=a(PF,"SPAN",{});var QF=s(Fp);k(qi.$$.fragment,QF),QF.forEach(t),PF.forEach(t),Uw=p(jm),xp=a(jm,"SPAN",{});var YF=s(xp);Iw=d(YF,"FlaxBartForQuestionAnswering"),YF.forEach(t),jm.forEach(t),_u=p(o),H=a(o,"DIV",{class:!0});var Je=s(H);k(Ei.$$.fragment,Je),Zw=p(Je),en=a(Je,"P",{});var ql=s(en);Gw=d(ql,`BART 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 `),$p=a(ql,"CODE",{});var LF=s($p);Ww=d(LF,"span start logits"),LF.forEach(t),Aw=d(ql," and "),jp=a(ql,"CODE",{});var OF=s(jp);Sw=d(OF,"span end logits"),OF.forEach(t),Nw=d(ql,")."),ql.forEach(t),Rw=p(Je),Ci=a(Je,"P",{});var Bm=s(Ci);Xw=d(Bm,"This model inherits from "),cl=a(Bm,"A",{href:!0});var HF=s(cl);Vw=d(HF,"FlaxPreTrainedModel"),HF.forEach(t),Pw=d(Bm,`. 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.)`),Bm.forEach(t),Qw=p(Je),Ui=a(Je,"P",{});var zm=s(Ui);Yw=d(zm,`This model is also a Flax Linen
`),Ii=a(zm,"A",{href:!0,rel:!0});var DF=s(Ii);Lw=d(DF,"flax.nn.Module"),DF.forEach(t),Ow=d(zm,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),zm.forEach(t),Hw=p(Je),Bp=a(Je,"P",{});var KF=s(Bp);Dw=d(KF,"Finally, this model supports inherent JAX features such as:"),KF.forEach(t),Kw=p(Je),Vt=a(Je,"UL",{});var Qa=s(Vt);zp=a(Qa,"LI",{});var ex=s(zp);Zi=a(ex,"A",{href:!0,rel:!0});var tx=s(Zi);e0=d(tx,"Just-In-Time (JIT) compilation"),tx.forEach(t),ex.forEach(t),t0=p(Qa),Jp=a(Qa,"LI",{});var ox=s(Jp);Gi=a(ox,"A",{href:!0,rel:!0});var nx=s(Gi);o0=d(nx,"Automatic Differentiation"),nx.forEach(t),ox.forEach(t),n0=p(Qa),qp=a(Qa,"LI",{});var ax=s(qp);Wi=a(ax,"A",{href:!0,rel:!0});var sx=s(Wi);a0=d(sx,"Vectorization"),sx.forEach(t),ax.forEach(t),s0=p(Qa),Ep=a(Qa,"LI",{});var rx=s(Ep);Ai=a(rx,"A",{href:!0,rel:!0});var ix=s(Ai);r0=d(ix,"Parallelization"),ix.forEach(t),rx.forEach(t),Qa.forEach(t),i0=p(Je),Zt=a(Je,"DIV",{class:!0});var Ya=s(Zt);k(Si.$$.fragment,Ya),d0=p(Ya),tn=a(Ya,"P",{});var El=s(tn);l0=d(El,"The "),Cp=a(El,"CODE",{});var dx=s(Cp);c0=d(dx,"FlaxBartPreTrainedModel"),dx.forEach(t),p0=d(El," forward method, overrides the "),Up=a(El,"CODE",{});var lx=s(Up);h0=d(lx,"__call__"),lx.forEach(t),u0=d(El," special method."),El.forEach(t),m0=p(Ya),k(Ma.$$.fragment,Ya),f0=p(Ya),k(Fa.$$.fragment,Ya),Ya.forEach(t),g0=p(Je),xa=a(Je,"DIV",{class:!0});var Jm=s(xa);k(Ni.$$.fragment,Jm),_0=p(Jm),k($a.$$.fragment,Jm),Jm.forEach(t),b0=p(Je),ja=a(Je,"DIV",{class:!0});var qm=s(ja);k(Ri.$$.fragment,qm),y0=p(qm),k(Ba.$$.fragment,qm),qm.forEach(t),Je.forEach(t),bu=p(o),on=a(o,"H2",{class:!0});var Em=s(on);za=a(Em,"A",{id:!0,class:!0,href:!0});var cx=s(za);Ip=a(cx,"SPAN",{});var px=s(Ip);k(Xi.$$.fragment,px),px.forEach(t),cx.forEach(t),v0=p(Em),Zp=a(Em,"SPAN",{});var hx=s(Zp);k0=d(hx,"FlaxBartForCausalLM"),hx.forEach(t),Em.forEach(t),yu=p(o),Me=a(o,"DIV",{class:!0});var bt=s(Me);k(Vi.$$.fragment,bt),T0=p(bt),Gp=a(bt,"P",{});var ux=s(Gp);w0=d(ux,`Bart Decoder Model with a language modeling head on top (linear layer with weights tied to the input embeddings)
e.g for autoregressive tasks.`),ux.forEach(t),M0=p(bt),Pi=a(bt,"P",{});var Cm=s(Pi);F0=d(Cm,"This model inherits from "),pl=a(Cm,"A",{href:!0});var mx=s(pl);x0=d(mx,"FlaxPreTrainedModel"),mx.forEach(t),$0=d(Cm,`. 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.)`),Cm.forEach(t),j0=p(bt),Qi=a(bt,"P",{});var Um=s(Qi);B0=d(Um,`This model is also a Flax Linen
`),Yi=a(Um,"A",{href:!0,rel:!0});var fx=s(Yi);z0=d(fx,"flax.nn.Module"),fx.forEach(t),J0=d(Um,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Um.forEach(t),q0=p(bt),Wp=a(bt,"P",{});var gx=s(Wp);E0=d(gx,"Finally, this model supports inherent JAX features such as:"),gx.forEach(t),C0=p(bt),Pt=a(bt,"UL",{});var La=s(Pt);Ap=a(La,"LI",{});var _x=s(Ap);Li=a(_x,"A",{href:!0,rel:!0});var bx=s(Li);U0=d(bx,"Just-In-Time (JIT) compilation"),bx.forEach(t),_x.forEach(t),I0=p(La),Sp=a(La,"LI",{});var yx=s(Sp);Oi=a(yx,"A",{href:!0,rel:!0});var vx=s(Oi);Z0=d(vx,"Automatic Differentiation"),vx.forEach(t),yx.forEach(t),G0=p(La),Np=a(La,"LI",{});var kx=s(Np);Hi=a(kx,"A",{href:!0,rel:!0});var Tx=s(Hi);W0=d(Tx,"Vectorization"),Tx.forEach(t),kx.forEach(t),A0=p(La),Rp=a(La,"LI",{});var wx=s(Rp);Di=a(wx,"A",{href:!0,rel:!0});var Mx=s(Di);S0=d(Mx,"Parallelization"),Mx.forEach(t),wx.forEach(t),La.forEach(t),N0=p(bt),Gt=a(bt,"DIV",{class:!0});var Oa=s(Gt);k(Ki.$$.fragment,Oa),R0=p(Oa),nn=a(Oa,"P",{});var Cl=s(nn);X0=d(Cl,"The "),Xp=a(Cl,"CODE",{});var Fx=s(Xp);V0=d(Fx,"FlaxBartDecoderPreTrainedModel"),Fx.forEach(t),P0=d(Cl," forward method, overrides the "),Vp=a(Cl,"CODE",{});var xx=s(Vp);Q0=d(xx,"__call__"),xx.forEach(t),Y0=d(Cl," special method."),Cl.forEach(t),L0=p(Oa),k(Ja.$$.fragment,Oa),O0=p(Oa),k(qa.$$.fragment,Oa),Oa.forEach(t),bt.forEach(t),this.h()},h(){h(l,"name","hf:doc:metadata"),h(l,"content",JSON.stringify(M$)),h(m,"id","bart"),h(m,"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"),h(m,"href","#bart"),h(f,"class","relative group"),h(ie,"alt","Models"),$x(ie.src,B="https://img.shields.io/badge/All_model_pages-bart-blueviolet")||h(ie,"src",B),h(re,"href","https://huggingface.co/models?filter=bart"),h(Fe,"alt","Spaces"),$x(Fe.src,it="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||h(Fe,"src",it),h(Y,"href","https://huggingface.co/spaces/docs-demos/bart-large-mnli"),h(Z,"class","flex flex-wrap space-x-1"),h(we,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),h(we,"rel","nofollow"),h(be,"id","overview"),h(be,"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"),h(be,"href","#overview"),h(W,"class","relative group"),h(Q,"href","https://arxiv.org/abs/1910.13461"),h(Q,"rel","nofollow"),h(Ha,"href","https://huggingface.co/sshleifer"),h(Ha,"rel","nofollow"),h(Da,"href","https://github.com/pytorch/fairseq/tree/master/examples/bart"),h(Da,"rel","nofollow"),h(dn,"id","examples"),h(dn,"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"),h(dn,"href","#examples"),h(yo,"class","relative group"),h(ts,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/summarization/README.md"),h(ts,"rel","nofollow"),h(fd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartForConditionalGeneration"),h(os,"href","https://discuss.huggingface.co/t/train-bart-for-conditional-generation-e-g-summarization/1904"),h(os,"rel","nofollow"),h(ns,"href","https://huggingface.co/models?search=distilbart"),h(ns,"rel","nofollow"),h(as,"href","https://arxiv.org/abs/2010.13002"),h(as,"rel","nofollow"),h(cn,"id","implementation-notes"),h(cn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(cn,"href","#implementation-notes"),h(vo,"class","relative group"),h(gd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartTokenizer"),h(_d,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode"),h(bd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartModel"),h(vd,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.generate"),h(pn,"id","mask-filling"),h(pn,"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"),h(pn,"href","#mask-filling"),h(Mo,"class","relative group"),h(hn,"id","resources"),h(hn,"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"),h(hn,"href","#resources"),h(Fo,"class","relative group"),h(ps,"href","https://huggingface.co/blog/sagemaker-distributed-training-seq2seq"),h(ps,"rel","nofollow"),h(us,"href","https://colab.research.google.com/github/ohmeow/ohmeow_website/blob/master/posts/2021-05-25-mbart-sequence-classification-with-blurr.ipynb"),h(us,"rel","nofollow"),h(fs,"href","https://colab.research.google.com/github/elsanns/xai-nlp-notebooks/blob/master/fine_tune_bart_summarization_two_langs.ipynb"),h(fs,"rel","nofollow"),h(Td,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartForConditionalGeneration"),h(gs,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/summarization"),h(gs,"rel","nofollow"),h(_s,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/summarization.ipynb"),h(_s,"rel","nofollow"),h(wd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.TFBartForConditionalGeneration"),h(bs,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/summarization"),h(bs,"rel","nofollow"),h(ys,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/summarization-tf.ipynb"),h(ys,"rel","nofollow"),h(Md,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.FlaxBartForConditionalGeneration"),h(vs,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/summarization"),h(vs,"rel","nofollow"),h(ks,"href","https://huggingface.co/course/chapter7/5?fw=pt#summarization"),h(ks,"rel","nofollow"),h(xd,"href","../tasks/summarization"),h($d,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartForConditionalGeneration"),h(ws,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling"),h(ws,"rel","nofollow"),h(Ms,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),h(Ms,"rel","nofollow"),h(jd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.TFBartForConditionalGeneration"),h(Fs,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy"),h(Fs,"rel","nofollow"),h(xs,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb"),h(xs,"rel","nofollow"),h(Bd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.FlaxBartForConditionalGeneration"),h($s,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling"),h($s,"rel","nofollow"),h(js,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb"),h(js,"rel","nofollow"),h(Bs,"href","https://huggingface.co/course/chapter7/3?fw=pt"),h(Bs,"rel","nofollow"),h(Jd,"href","../tasks/masked_language_modeling"),h(qs,"href","https://colab.research.google.com/github/vasudevgupta7/huggingface-tutorials/blob/main/translation_training.ipynb"),h(qs,"rel","nofollow"),h(qd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartForConditionalGeneration"),h(Es,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/translation"),h(Es,"rel","nofollow"),h(Cs,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/translation.ipynb"),h(Cs,"rel","nofollow"),h(Ed,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.TFBartForConditionalGeneration"),h(Us,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/translation"),h(Us,"rel","nofollow"),h(Is,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/translation-tf.ipynb"),h(Is,"rel","nofollow"),h(Cd,"href","../tasks/translation"),h(Id,"href","../tasks/sequence_classification"),h(Zd,"href","../tasks/question_answering"),h(Gd,"href","../tasks/language_modeling"),h(mn,"id","transformers.BartConfig"),h(mn,"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"),h(mn,"href","#transformers.BartConfig"),h(xo,"class","relative group"),h(Wd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartModel"),h(Ws,"href","https://huggingface.co/facebook/bart-large"),h(Ws,"rel","nofollow"),h(Ad,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),h(Sd,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),h(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(gn,"id","transformers.BartTokenizer"),h(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"),h(gn,"href","#transformers.BartTokenizer"),h(Bo,"class","relative group"),h(Nd,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),h(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(vn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(kn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Tn,"id","transformers.BartTokenizerFast"),h(Tn,"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"),h(Tn,"href","#transformers.BartTokenizerFast"),h(zo,"class","relative group"),h(Vd,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),h(Fn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(xn,"id","transformers.BartModel"),h(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"),h(xn,"href","#transformers.BartModel"),h(Jo,"class","relative group"),h(Pd,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),h(rr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(rr,"rel","nofollow"),h(Qd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartModel"),h(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Bn,"id","transformers.BartForConditionalGeneration"),h(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"),h(Bn,"href","#transformers.BartForConditionalGeneration"),h(Eo,"class","relative group"),h(Yd,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),h(hr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(hr,"rel","nofollow"),h(Ld,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartForConditionalGeneration"),h(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(En,"id","transformers.BartForSequenceClassification"),h(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"),h(En,"href","#transformers.BartForSequenceClassification"),h(Uo,"class","relative group"),h(Od,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),h(br,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(br,"rel","nofollow"),h(Hd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartForSequenceClassification"),h(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Zn,"id","transformers.BartForQuestionAnswering"),h(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"),h(Zn,"href","#transformers.BartForQuestionAnswering"),h(Zo,"class","relative group"),h(Dd,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),h(Mr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Mr,"rel","nofollow"),h(Kd,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.BartForQuestionAnswering"),h(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(An,"id","transformers.BartForCausalLM"),h(An,"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"),h(An,"href","#transformers.BartForCausalLM"),h(Ao,"class","relative group"),h(el,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),h(zr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(zr,"rel","nofollow"),h(Sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Rn,"id","transformers.TFBartModel"),h(Rn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Rn,"href","#transformers.TFBartModel"),h(So,"class","relative group"),h(tl,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),h(Ir,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Ir,"rel","nofollow"),h(ol,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.TFBartModel"),h(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Qn,"id","transformers.TFBartForConditionalGeneration"),h(Qn,"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"),h(Qn,"href","#transformers.TFBartForConditionalGeneration"),h(Ro,"class","relative group"),h(nl,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),h(Nr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Nr,"rel","nofollow"),h(al,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.TFBartForConditionalGeneration"),h(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Dn,"id","transformers.TFBartForSequenceClassification"),h(Dn,"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"),h(Dn,"href","#transformers.TFBartForSequenceClassification"),h(Vo,"class","relative group"),h(sl,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),h(Yr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Yr,"rel","nofollow"),h(rl,"href","/docs/transformers/v4.30.0/en/model_doc/bart#transformers.TFBartForSequenceClassification"),h(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ta,"id","transformers.FlaxBartModel"),h(ta,"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"),h(ta,"href","#transformers.FlaxBartModel"),h(Qo,"class","relative group"),h(il,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(ei,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),h(ei,"rel","nofollow"),h(ti,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(ti,"rel","nofollow"),h(oi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(oi,"rel","nofollow"),h(ni,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(ni,"rel","nofollow"),h(ai,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(ai,"rel","nofollow"),h(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(aa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ra,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(da,"id","transformers.FlaxBartForConditionalGeneration"),h(da,"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"),h(da,"href","#transformers.FlaxBartForConditionalGeneration"),h(Lo,"class","relative group"),h(dl,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(hi,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),h(hi,"rel","nofollow"),h(ui,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(ui,"rel","nofollow"),h(mi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(mi,"rel","nofollow"),h(fi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(fi,"rel","nofollow"),h(gi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(gi,"rel","nofollow"),h(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ha,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ma,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ga,"id","transformers.FlaxBartForSequenceClassification"),h(ga,"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"),h(ga,"href","#transformers.FlaxBartForSequenceClassification"),h(Ho,"class","relative group"),h(ll,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Mi,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),h(Mi,"rel","nofollow"),h(Fi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Fi,"rel","nofollow"),h(xi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(xi,"rel","nofollow"),h($i,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h($i,"rel","nofollow"),h(ji,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(ji,"rel","nofollow"),h(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ya,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ka,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(wa,"id","transformers.FlaxBartForQuestionAnswering"),h(wa,"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"),h(wa,"href","#transformers.FlaxBartForQuestionAnswering"),h(Ko,"class","relative group"),h(cl,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Ii,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),h(Ii,"rel","nofollow"),h(Zi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Zi,"rel","nofollow"),h(Gi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Gi,"rel","nofollow"),h(Wi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Wi,"rel","nofollow"),h(Ai,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Ai,"rel","nofollow"),h(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(xa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ja,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(za,"id","transformers.FlaxBartForCausalLM"),h(za,"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"),h(za,"href","#transformers.FlaxBartForCausalLM"),h(on,"class","relative group"),h(pl,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Yi,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),h(Yi,"rel","nofollow"),h(Li,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Li,"rel","nofollow"),h(Oi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Oi,"rel","nofollow"),h(Hi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Hi,"rel","nofollow"),h(Di,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Di,"rel","nofollow"),h(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Me,"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,l),_(o,y,g),_(o,f,g),e(f,m),e(m,b),T(r,b,null),e(f,u),e(f,j),e(j,se),_(o,P,g),_(o,Z,g),e(Z,re),e(re,ie),e(Z,Ve),e(Z,Y),e(Y,Fe),_(o,D,g),_(o,de,g),e(de,qe),e(qe,le),e(de,Pe),e(de,we),e(we,ce),e(de,Qe),_(o,Ze,g),_(o,W,g),e(W,be),e(be,Ee),T(K,Ee,null),e(W,E),e(W,C),e(C,Ye),_(o,ee,g),_(o,ye,g),e(ye,Le),e(ye,Q),e(Q,Oe),e(ye,He),_(o,U,g),_(o,xe,g),e(xe,pe),_(o,Ge,g),_(o,te,g),e(te,L),e(L,De),e(te,Ke),e(te,X),e(X,et),e(te,he),e(te,Ce),e(Ce,$e),_(o,I,g),_(o,je,g),e(je,A),_(o,We,g),_(o,ve,g),e(ve,x),e(x,z),e(z,wt),e(ve,Be),e(ve,Ae),e(Ae,dt),e(dt,J),e(Ae,Mt),e(Ae,oe),e(oe,lt),e(lt,Ft),e(oe,xt),e(oe,V),e(V,ue),e(oe,$t),e(oe,ct),e(ct,me),e(oe,jt),e(oe,pt),e(pt,tt),e(oe,Bt),e(oe,ke),e(ke,zt),_(o,Mh,g),_(o,Yt,g),e(Yt,Im),e(Yt,Ha),e(Ha,Zm),e(Yt,Gm),e(Yt,Da),e(Da,Wm),e(Yt,Am),_(o,Fh,g),_(o,yo,g),e(yo,dn),e(dn,Ul),T(Ka,Ul,null),e(yo,Sm),e(yo,Il),e(Il,Nm),_(o,xh,g),_(o,Lt,g),e(Lt,es),e(es,Rm),e(es,ts),e(ts,Xm),e(es,Vm),e(Lt,Pm),e(Lt,At),e(At,Qm),e(At,fd),e(fd,Ym),e(At,Lm),e(At,Zl),e(Zl,Om),e(At,Hm),e(At,os),e(os,Dm),e(At,Km),e(Lt,ef),e(Lt,ln),e(ln,ns),e(ns,tf),e(ln,of),e(ln,as),e(as,nf),e(ln,af),_(o,$h,g),_(o,vo,g),e(vo,cn),e(cn,Gl),T(ss,Gl,null),e(vo,sf),e(vo,Wl),e(Wl,rf),_(o,jh,g),_(o,ht,g),e(ht,St),e(St,df),e(St,Al),e(Al,lf),e(St,cf),e(St,gd),e(gd,pf),e(St,hf),e(St,_d),e(_d,uf),e(St,mf),e(ht,ff),e(ht,ko),e(ko,gf),e(ko,bd),e(bd,_f),e(ko,bf),e(ko,Sl),e(Sl,yf),e(ko,vf),e(ht,kf),e(ht,To),e(To,Tf),e(To,Nl),e(Nl,wf),e(To,Mf),e(To,Rl),e(Rl,Ff),e(To,xf),e(ht,$f),e(ht,yd),e(yd,vd),e(vd,jf),e(yd,Bf),e(ht,zf),e(ht,wo),e(wo,Jf),e(wo,Xl),e(Xl,qf),e(wo,Ef),e(wo,Vl),e(Vl,Cf),e(wo,Uf),_(o,Bh,g),_(o,Mo,g),e(Mo,pn),e(pn,Pl),T(rs,Pl,null),e(Mo,If),e(Mo,Ql),e(Ql,Zf),_(o,zh,g),_(o,Ot,g),e(Ot,Gf),e(Ot,Yl),e(Yl,Wf),e(Ot,Af),e(Ot,Ll),e(Ll,Sf),e(Ot,Nf),_(o,Jh,g),T(is,o,g),_(o,qh,g),_(o,Fo,g),e(Fo,hn),e(hn,Ol),T(ds,Ol,null),e(Fo,Rf),e(Fo,Hl),e(Hl,Xf),_(o,Eh,g),_(o,kd,g),e(kd,Vf),_(o,Ch,g),T(ls,o,g),_(o,Uh,g),_(o,Te,g),e(Te,cs),e(cs,Pf),e(cs,ps),e(ps,Qf),e(cs,Yf),e(Te,Lf),e(Te,hs),e(hs,Of),e(hs,us),e(us,Hf),e(hs,Df),e(Te,Kf),e(Te,ms),e(ms,eg),e(ms,fs),e(fs,tg),e(ms,og),e(Te,ng),e(Te,Ht),e(Ht,Td),e(Td,ag),e(Ht,sg),e(Ht,gs),e(gs,rg),e(Ht,ig),e(Ht,_s),e(_s,dg),e(Ht,lg),e(Te,cg),e(Te,Dt),e(Dt,wd),e(wd,pg),e(Dt,hg),e(Dt,bs),e(bs,ug),e(Dt,mg),e(Dt,ys),e(ys,fg),e(Dt,gg),e(Te,_g),e(Te,un),e(un,Md),e(Md,bg),e(un,yg),e(un,vs),e(vs,vg),e(un,kg),e(Te,Tg),e(Te,Fd),e(Fd,ks),e(ks,wg),e(Fd,Mg),e(Te,Fg),e(Te,Dl),e(Dl,xd),e(xd,xg),_(o,Ih,g),T(Ts,o,g),_(o,Zh,g),_(o,ut,g),e(ut,Kt),e(Kt,$d),e($d,$g),e(Kt,jg),e(Kt,ws),e(ws,Bg),e(Kt,zg),e(Kt,Ms),e(Ms,Jg),e(Kt,qg),e(ut,Eg),e(ut,eo),e(eo,jd),e(jd,Cg),e(eo,Ug),e(eo,Fs),e(Fs,Ig),e(eo,Zg),e(eo,xs),e(xs,Gg),e(eo,Wg),e(ut,Ag),e(ut,to),e(to,Bd),e(Bd,Sg),e(to,Ng),e(to,$s),e($s,Rg),e(to,Xg),e(to,js),e(js,Vg),e(to,Pg),e(ut,Qg),e(ut,zd),e(zd,Bs),e(Bs,Yg),e(zd,Lg),e(ut,Og),e(ut,Kl),e(Kl,Jd),e(Jd,Hg),_(o,Gh,g),T(zs,o,g),_(o,Wh,g),_(o,Jt,g),e(Jt,Js),e(Js,Dg),e(Js,qs),e(qs,Kg),e(Js,e_),e(Jt,t_),e(Jt,oo),e(oo,qd),e(qd,o_),e(oo,n_),e(oo,Es),e(Es,a_),e(oo,s_),e(oo,Cs),e(Cs,r_),e(oo,i_),e(Jt,d_),e(Jt,no),e(no,Ed),e(Ed,l_),e(no,c_),e(no,Us),e(Us,p_),e(no,h_),e(no,Is),e(Is,u_),e(no,m_),e(Jt,f_),e(Jt,ec),e(ec,Cd),e(Cd,g_),_(o,Ah,g),_(o,Ud,g),e(Ud,__),_(o,Sh,g),_(o,ao,g),e(ao,tc),e(tc,Id),e(Id,b_),e(ao,y_),e(ao,oc),e(oc,Zd),e(Zd,v_),e(ao,k_),e(ao,nc),e(nc,Gd),e(Gd,T_),_(o,Nh,g),_(o,xo,g),e(xo,mn),e(mn,ac),T(Zs,ac,null),e(xo,w_),e(xo,sc),e(sc,M_),_(o,Rh,g),_(o,yt,g),T(Gs,yt,null),e(yt,F_),e(yt,$o),e($o,x_),e($o,Wd),e(Wd,$_),e($o,j_),e($o,Ws),e(Ws,B_),e($o,z_),e(yt,J_),e(yt,jo),e(jo,q_),e(jo,Ad),e(Ad,E_),e(jo,C_),e(jo,Sd),e(Sd,U_),e(jo,I_),e(yt,Z_),T(fn,yt,null),_(o,Xh,g),_(o,Bo,g),e(Bo,gn),e(gn,rc),T(As,rc,null),e(Bo,G_),e(Bo,ic),e(ic,W_),_(o,Vh,g),_(o,S,g),T(Ss,S,null),e(S,A_),e(S,dc),e(dc,S_),e(S,N_),e(S,lc),e(lc,R_),e(S,X_),T(_n,S,null),e(S,V_),e(S,Ns),e(Ns,P_),e(Ns,cc),e(cc,Q_),e(Ns,Y_),e(S,L_),T(bn,S,null),e(S,O_),e(S,Rs),e(Rs,H_),e(Rs,Nd),e(Nd,D_),e(Rs,K_),e(S,eb),e(S,so),T(Xs,so,null),e(so,tb),e(so,pc),e(pc,ob),e(so,nb),e(so,Vs),e(Vs,Rd),e(Rd,ab),e(Rd,hc),e(hc,sb),e(Vs,rb),e(Vs,Xd),e(Xd,ib),e(Xd,uc),e(uc,db),e(S,lb),e(S,yn),T(Ps,yn,null),e(yn,cb),e(yn,mc),e(mc,pb),e(S,hb),e(S,vn),T(Qs,vn,null),e(vn,ub),e(vn,fc),e(fc,mb),e(S,fb),e(S,kn),T(Ys,kn,null),e(kn,gb),e(kn,Ls),e(Ls,_b),e(Ls,gc),e(gc,bb),e(Ls,yb),_(o,Ph,g),_(o,zo,g),e(zo,Tn),e(Tn,_c),T(Os,_c,null),e(zo,vb),e(zo,bc),e(bc,kb),_(o,Qh,g),_(o,fe,g),T(Hs,fe,null),e(fe,Tb),e(fe,Ds),e(Ds,wb),e(Ds,yc),e(yc,Mb),e(Ds,Fb),e(fe,xb),e(fe,vc),e(vc,$b),e(fe,jb),T(wn,fe,null),e(fe,Bb),e(fe,Ks),e(Ks,zb),e(Ks,kc),e(kc,Jb),e(Ks,qb),e(fe,Eb),T(Mn,fe,null),e(fe,Cb),e(fe,er),e(er,Ub),e(er,Vd),e(Vd,Ib),e(er,Zb),e(fe,Gb),e(fe,Fn),T(tr,Fn,null),e(Fn,Wb),e(Fn,Tc),e(Tc,Ab),_(o,Yh,g),_(o,Jo,g),e(Jo,xn),e(xn,wc),T(or,wc,null),e(Jo,Sb),e(Jo,Mc),e(Mc,Nb),_(o,Lh,g),_(o,vt,g),T(nr,vt,null),e(vt,Rb),e(vt,ar),e(ar,Xb),e(ar,Pd),e(Pd,Vb),e(ar,Pb),e(vt,Qb),e(vt,sr),e(sr,Yb),e(sr,rr),e(rr,Lb),e(sr,Ob),e(vt,Hb),e(vt,qt),T(ir,qt,null),e(qt,Db),e(qt,qo),e(qo,Kb),e(qo,Qd),e(Qd,ey),e(qo,ty),e(qo,Fc),e(Fc,oy),e(qo,ny),e(qt,ay),T($n,qt,null),e(qt,sy),T(jn,qt,null),_(o,Oh,g),_(o,Eo,g),e(Eo,Bn),e(Bn,xc),T(dr,xc,null),e(Eo,ry),e(Eo,$c),e($c,iy),_(o,Hh,g),_(o,kt,g),T(lr,kt,null),e(kt,dy),e(kt,cr),e(cr,ly),e(cr,Yd),e(Yd,cy),e(cr,py),e(kt,hy),e(kt,pr),e(pr,uy),e(pr,hr),e(hr,my),e(pr,fy),e(kt,gy),e(kt,mt),T(ur,mt,null),e(mt,_y),e(mt,Co),e(Co,by),e(Co,Ld),e(Ld,yy),e(Co,vy),e(Co,jc),e(jc,ky),e(Co,Ty),e(mt,wy),T(zn,mt,null),e(mt,My),T(Jn,mt,null),e(mt,Fy),T(qn,mt,null),_(o,Dh,g),_(o,Uo,g),e(Uo,En),e(En,Bc),T(mr,Bc,null),e(Uo,xy),e(Uo,zc),e(zc,$y),_(o,Kh,g),_(o,ot,g),T(fr,ot,null),e(ot,jy),e(ot,Jc),e(Jc,By),e(ot,zy),e(ot,gr),e(gr,Jy),e(gr,Od),e(Od,qy),e(gr,Ey),e(ot,Cy),e(ot,_r),e(_r,Uy),e(_r,br),e(br,Iy),e(_r,Zy),e(ot,Gy),e(ot,ft),T(yr,ft,null),e(ft,Wy),e(ft,Io),e(Io,Ay),e(Io,Hd),e(Hd,Sy),e(Io,Ny),e(Io,qc),e(qc,Ry),e(Io,Xy),e(ft,Vy),T(Cn,ft,null),e(ft,Py),T(Un,ft,null),e(ft,Qy),T(In,ft,null),_(o,eu,g),_(o,Zo,g),e(Zo,Zn),e(Zn,Ec),T(vr,Ec,null),e(Zo,Yy),e(Zo,Cc),e(Cc,Ly),_(o,tu,g),_(o,nt,g),T(kr,nt,null),e(nt,Oy),e(nt,Go),e(Go,Hy),e(Go,Uc),e(Uc,Dy),e(Go,Ky),e(Go,Ic),e(Ic,ev),e(Go,tv),e(nt,ov),e(nt,Tr),e(Tr,nv),e(Tr,Dd),e(Dd,av),e(Tr,sv),e(nt,rv),e(nt,wr),e(wr,iv),e(wr,Mr),e(Mr,dv),e(wr,lv),e(nt,cv),e(nt,Et),T(Fr,Et,null),e(Et,pv),e(Et,Wo),e(Wo,hv),e(Wo,Kd),e(Kd,uv),e(Wo,mv),e(Wo,Zc),e(Zc,fv),e(Wo,gv),e(Et,_v),T(Gn,Et,null),e(Et,bv),T(Wn,Et,null),_(o,ou,g),_(o,Ao,g),e(Ao,An),e(An,Gc),T(xr,Gc,null),e(Ao,yv),e(Ao,Wc),e(Wc,vv),_(o,nu,g),_(o,at,g),T($r,at,null),e(at,kv),e(at,Ac),e(Ac,Tv),e(at,wv),e(at,jr),e(jr,Mv),e(jr,el),e(el,Fv),e(jr,xv),e(at,$v),e(at,Br),e(Br,jv),e(Br,zr),e(zr,Bv),e(Br,zv),e(at,Jv),e(at,Sn),T(Jr,Sn,null),e(Sn,qv),T(Nn,Sn,null),_(o,au,g),_(o,So,g),e(So,Rn),e(Rn,Sc),T(qr,Sc,null),e(So,Ev),e(So,Nc),e(Nc,Cv),_(o,su,g),_(o,st,g),T(Er,st,null),e(st,Uv),e(st,Cr),e(Cr,Iv),e(Cr,tl),e(tl,Zv),e(Cr,Gv),e(st,Wv),e(st,Ur),e(Ur,Av),e(Ur,Ir),e(Ir,Sv),e(Ur,Nv),e(st,Rv),T(Xn,st,null),e(st,Xv),e(st,Ct),T(Zr,Ct,null),e(Ct,Vv),e(Ct,No),e(No,Pv),e(No,ol),e(ol,Qv),e(No,Yv),e(No,Rc),e(Rc,Lv),e(No,Ov),e(Ct,Hv),T(Vn,Ct,null),e(Ct,Dv),T(Pn,Ct,null),_(o,ru,g),_(o,Ro,g),e(Ro,Qn),e(Qn,Xc),T(Gr,Xc,null),e(Ro,Kv),e(Ro,Vc),e(Vc,ek),_(o,iu,g),_(o,rt,g),T(Wr,rt,null),e(rt,tk),e(rt,Ar),e(Ar,ok),e(Ar,nl),e(nl,nk),e(Ar,ak),e(rt,sk),e(rt,Sr),e(Sr,rk),e(Sr,Nr),e(Nr,ik),e(Sr,dk),e(rt,lk),T(Yn,rt,null),e(rt,ck),e(rt,gt),T(Rr,gt,null),e(gt,pk),e(gt,Xo),e(Xo,hk),e(Xo,al),e(al,uk),e(Xo,mk),e(Xo,Pc),e(Pc,fk),e(Xo,gk),e(gt,_k),T(Ln,gt,null),e(gt,bk),T(On,gt,null),e(gt,yk),T(Hn,gt,null),_(o,du,g),_(o,Vo,g),e(Vo,Dn),e(Dn,Qc),T(Xr,Qc,null),e(Vo,vk),e(Vo,Yc),e(Yc,kk),_(o,lu,g),_(o,Ue,g),T(Vr,Ue,null),e(Ue,Tk),e(Ue,Lc),e(Lc,wk),e(Ue,Mk),e(Ue,Pr),e(Pr,Fk),e(Pr,sl),e(sl,xk),e(Pr,$k),e(Ue,jk),e(Ue,Qr),e(Qr,Bk),e(Qr,Yr),e(Yr,zk),e(Qr,Jk),e(Ue,qk),T(Kn,Ue,null),e(Ue,Ek),e(Ue,ro),T(Lr,ro,null),e(ro,Ck),e(ro,Po),e(Po,Uk),e(Po,rl),e(rl,Ik),e(Po,Zk),e(Po,Oc),e(Oc,Gk),e(Po,Wk),e(ro,Ak),T(ea,ro,null),_(o,cu,g),_(o,Qo,g),e(Qo,ta),e(ta,Hc),T(Or,Hc,null),e(Qo,Sk),e(Qo,Dc),e(Dc,Nk),_(o,pu,g),_(o,ge,g),T(Hr,ge,null),e(ge,Rk),e(ge,Dr),e(Dr,Xk),e(Dr,il),e(il,Vk),e(Dr,Pk),e(ge,Qk),e(ge,Kr),e(Kr,Yk),e(Kr,ei),e(ei,Lk),e(Kr,Ok),e(ge,Hk),e(ge,Kc),e(Kc,Dk),e(ge,Kk),e(ge,Nt),e(Nt,ep),e(ep,ti),e(ti,eT),e(Nt,tT),e(Nt,tp),e(tp,oi),e(oi,oT),e(Nt,nT),e(Nt,op),e(op,ni),e(ni,aT),e(Nt,sT),e(Nt,np),e(np,ai),e(ai,rT),e(ge,iT),e(ge,Ut),T(si,Ut,null),e(Ut,dT),e(Ut,Yo),e(Yo,lT),e(Yo,ap),e(ap,cT),e(Yo,pT),e(Yo,sp),e(sp,hT),e(Yo,uT),e(Ut,mT),T(oa,Ut,null),e(Ut,fT),T(na,Ut,null),e(ge,gT),e(ge,aa),T(ri,aa,null),e(aa,_T),T(sa,aa,null),e(ge,bT),e(ge,ra),T(ii,ra,null),e(ra,yT),T(ia,ra,null),_(o,hu,g),_(o,Lo,g),e(Lo,da),e(da,rp),T(di,rp,null),e(Lo,vT),e(Lo,ip),e(ip,kT),_(o,uu,g),_(o,_e,g),T(li,_e,null),e(_e,TT),e(_e,ci),e(ci,wT),e(ci,dl),e(dl,MT),e(ci,FT),e(_e,xT),e(_e,pi),e(pi,$T),e(pi,hi),e(hi,jT),e(pi,BT),e(_e,zT),e(_e,dp),e(dp,JT),e(_e,qT),e(_e,Rt),e(Rt,lp),e(lp,ui),e(ui,ET),e(Rt,CT),e(Rt,cp),e(cp,mi),e(mi,UT),e(Rt,IT),e(Rt,pp),e(pp,fi),e(fi,ZT),e(Rt,GT),e(Rt,hp),e(hp,gi),e(gi,WT),e(_e,AT),e(_e,_t),T(_i,_t,null),e(_t,ST),e(_t,Oo),e(Oo,NT),e(Oo,up),e(up,RT),e(Oo,XT),e(Oo,mp),e(mp,VT),e(Oo,PT),e(_t,QT),T(la,_t,null),e(_t,YT),T(ca,_t,null),e(_t,LT),T(pa,_t,null),e(_e,OT),e(_e,ha),T(bi,ha,null),e(ha,HT),T(ua,ha,null),e(_e,DT),e(_e,ma),T(yi,ma,null),e(ma,KT),T(fa,ma,null),_(o,mu,g),_(o,Ho,g),e(Ho,ga),e(ga,fp),T(vi,fp,null),e(Ho,ew),e(Ho,gp),e(gp,tw),_(o,fu,g),_(o,O,g),T(ki,O,null),e(O,ow),e(O,_p),e(_p,nw),e(O,aw),e(O,Ti),e(Ti,sw),e(Ti,ll),e(ll,rw),e(Ti,iw),e(O,dw),e(O,wi),e(wi,lw),e(wi,Mi),e(Mi,cw),e(wi,pw),e(O,hw),e(O,bp),e(bp,uw),e(O,mw),e(O,Xt),e(Xt,yp),e(yp,Fi),e(Fi,fw),e(Xt,gw),e(Xt,vp),e(vp,xi),e(xi,_w),e(Xt,bw),e(Xt,kp),e(kp,$i),e($i,yw),e(Xt,vw),e(Xt,Tp),e(Tp,ji),e(ji,kw),e(O,Tw),e(O,It),T(Bi,It,null),e(It,ww),e(It,Do),e(Do,Mw),e(Do,wp),e(wp,Fw),e(Do,xw),e(Do,Mp),e(Mp,$w),e(Do,jw),e(It,Bw),T(_a,It,null),e(It,zw),T(ba,It,null),e(O,Jw),e(O,ya),T(zi,ya,null),e(ya,qw),T(va,ya,null),e(O,Ew),e(O,ka),T(Ji,ka,null),e(ka,Cw),T(Ta,ka,null),_(o,gu,g),_(o,Ko,g),e(Ko,wa),e(wa,Fp),T(qi,Fp,null),e(Ko,Uw),e(Ko,xp),e(xp,Iw),_(o,_u,g),_(o,H,g),T(Ei,H,null),e(H,Zw),e(H,en),e(en,Gw),e(en,$p),e($p,Ww),e(en,Aw),e(en,jp),e(jp,Sw),e(en,Nw),e(H,Rw),e(H,Ci),e(Ci,Xw),e(Ci,cl),e(cl,Vw),e(Ci,Pw),e(H,Qw),e(H,Ui),e(Ui,Yw),e(Ui,Ii),e(Ii,Lw),e(Ui,Ow),e(H,Hw),e(H,Bp),e(Bp,Dw),e(H,Kw),e(H,Vt),e(Vt,zp),e(zp,Zi),e(Zi,e0),e(Vt,t0),e(Vt,Jp),e(Jp,Gi),e(Gi,o0),e(Vt,n0),e(Vt,qp),e(qp,Wi),e(Wi,a0),e(Vt,s0),e(Vt,Ep),e(Ep,Ai),e(Ai,r0),e(H,i0),e(H,Zt),T(Si,Zt,null),e(Zt,d0),e(Zt,tn),e(tn,l0),e(tn,Cp),e(Cp,c0),e(tn,p0),e(tn,Up),e(Up,h0),e(tn,u0),e(Zt,m0),T(Ma,Zt,null),e(Zt,f0),T(Fa,Zt,null),e(H,g0),e(H,xa),T(Ni,xa,null),e(xa,_0),T($a,xa,null),e(H,b0),e(H,ja),T(Ri,ja,null),e(ja,y0),T(Ba,ja,null),_(o,bu,g),_(o,on,g),e(on,za),e(za,Ip),T(Xi,Ip,null),e(on,v0),e(on,Zp),e(Zp,k0),_(o,yu,g),_(o,Me,g),T(Vi,Me,null),e(Me,T0),e(Me,Gp),e(Gp,w0),e(Me,M0),e(Me,Pi),e(Pi,F0),e(Pi,pl),e(pl,x0),e(Pi,$0),e(Me,j0),e(Me,Qi),e(Qi,B0),e(Qi,Yi),e(Yi,z0),e(Qi,J0),e(Me,q0),e(Me,Wp),e(Wp,E0),e(Me,C0),e(Me,Pt),e(Pt,Ap),e(Ap,Li),e(Li,U0),e(Pt,I0),e(Pt,Sp),e(Sp,Oi),e(Oi,Z0),e(Pt,G0),e(Pt,Np),e(Np,Hi),e(Hi,W0),e(Pt,A0),e(Pt,Rp),e(Rp,Di),e(Di,S0),e(Me,N0),e(Me,Gt),T(Ki,Gt,null),e(Gt,R0),e(Gt,nn),e(nn,X0),e(nn,Xp),e(Xp,V0),e(nn,P0),e(nn,Vp),e(Vp,Q0),e(nn,Y0),e(Gt,L0),T(Ja,Gt,null),e(Gt,O0),T(qa,Gt,null),vu=!0},p(o,[g]){const ed={};g&2&&(ed.$$scope={dirty:g,ctx:o}),fn.$set(ed);const Pp={};g&2&&(Pp.$$scope={dirty:g,ctx:o}),_n.$set(Pp);const Qp={};g&2&&(Qp.$$scope={dirty:g,ctx:o}),bn.$set(Qp);const Yp={};g&2&&(Yp.$$scope={dirty:g,ctx:o}),wn.$set(Yp);const td={};g&2&&(td.$$scope={dirty:g,ctx:o}),Mn.$set(td);const Lp={};g&2&&(Lp.$$scope={dirty:g,ctx:o}),$n.$set(Lp);const Op={};g&2&&(Op.$$scope={dirty:g,ctx:o}),jn.$set(Op);const Ea={};g&2&&(Ea.$$scope={dirty:g,ctx:o}),zn.$set(Ea);const Hp={};g&2&&(Hp.$$scope={dirty:g,ctx:o}),Jn.$set(Hp);const Dp={};g&2&&(Dp.$$scope={dirty:g,ctx:o}),qn.$set(Dp);const od={};g&2&&(od.$$scope={dirty:g,ctx:o}),Cn.$set(od);const Kp={};g&2&&(Kp.$$scope={dirty:g,ctx:o}),Un.$set(Kp);const eh={};g&2&&(eh.$$scope={dirty:g,ctx:o}),In.$set(eh);const th={};g&2&&(th.$$scope={dirty:g,ctx:o}),Gn.$set(th);const nd={};g&2&&(nd.$$scope={dirty:g,ctx:o}),Wn.$set(nd);const oh={};g&2&&(oh.$$scope={dirty:g,ctx:o}),Nn.$set(oh);const nh={};g&2&&(nh.$$scope={dirty:g,ctx:o}),Xn.$set(nh);const an={};g&2&&(an.$$scope={dirty:g,ctx:o}),Vn.$set(an);const ah={};g&2&&(ah.$$scope={dirty:g,ctx:o}),Pn.$set(ah);const sh={};g&2&&(sh.$$scope={dirty:g,ctx:o}),Yn.$set(sh);const rh={};g&2&&(rh.$$scope={dirty:g,ctx:o}),Ln.$set(rh);const ih={};g&2&&(ih.$$scope={dirty:g,ctx:o}),On.$set(ih);const ad={};g&2&&(ad.$$scope={dirty:g,ctx:o}),Hn.$set(ad);const dh={};g&2&&(dh.$$scope={dirty:g,ctx:o}),Kn.$set(dh);const lh={};g&2&&(lh.$$scope={dirty:g,ctx:o}),ea.$set(lh);const sd={};g&2&&(sd.$$scope={dirty:g,ctx:o}),oa.$set(sd);const ch={};g&2&&(ch.$$scope={dirty:g,ctx:o}),na.$set(ch);const Tt={};g&2&&(Tt.$$scope={dirty:g,ctx:o}),sa.$set(Tt);const ph={};g&2&&(ph.$$scope={dirty:g,ctx:o}),ia.$set(ph);const hh={};g&2&&(hh.$$scope={dirty:g,ctx:o}),la.$set(hh);const uh={};g&2&&(uh.$$scope={dirty:g,ctx:o}),ca.$set(uh);const mh={};g&2&&(mh.$$scope={dirty:g,ctx:o}),pa.$set(mh);const fh={};g&2&&(fh.$$scope={dirty:g,ctx:o}),ua.$set(fh);const sn={};g&2&&(sn.$$scope={dirty:g,ctx:o}),fa.$set(sn);const gh={};g&2&&(gh.$$scope={dirty:g,ctx:o}),_a.$set(gh);const _h={};g&2&&(_h.$$scope={dirty:g,ctx:o}),ba.$set(_h);const rd={};g&2&&(rd.$$scope={dirty:g,ctx:o}),va.$set(rd);const bh={};g&2&&(bh.$$scope={dirty:g,ctx:o}),Ta.$set(bh);const yh={};g&2&&(yh.$$scope={dirty:g,ctx:o}),Ma.$set(yh);const vh={};g&2&&(vh.$$scope={dirty:g,ctx:o}),Fa.$set(vh);const rn={};g&2&&(rn.$$scope={dirty:g,ctx:o}),$a.$set(rn);const id={};g&2&&(id.$$scope={dirty:g,ctx:o}),Ba.$set(id);const kh={};g&2&&(kh.$$scope={dirty:g,ctx:o}),Ja.$set(kh);const Qt={};g&2&&(Qt.$$scope={dirty:g,ctx:o}),qa.$set(Qt)},i(o){vu||(w(r.$$.fragment,o),w(K.$$.fragment,o),w(Ka.$$.fragment,o),w(ss.$$.fragment,o),w(rs.$$.fragment,o),w(is.$$.fragment,o),w(ds.$$.fragment,o),w(ls.$$.fragment,o),w(Ts.$$.fragment,o),w(zs.$$.fragment,o),w(Zs.$$.fragment,o),w(Gs.$$.fragment,o),w(fn.$$.fragment,o),w(As.$$.fragment,o),w(Ss.$$.fragment,o),w(_n.$$.fragment,o),w(bn.$$.fragment,o),w(Xs.$$.fragment,o),w(Ps.$$.fragment,o),w(Qs.$$.fragment,o),w(Ys.$$.fragment,o),w(Os.$$.fragment,o),w(Hs.$$.fragment,o),w(wn.$$.fragment,o),w(Mn.$$.fragment,o),w(tr.$$.fragment,o),w(or.$$.fragment,o),w(nr.$$.fragment,o),w(ir.$$.fragment,o),w($n.$$.fragment,o),w(jn.$$.fragment,o),w(dr.$$.fragment,o),w(lr.$$.fragment,o),w(ur.$$.fragment,o),w(zn.$$.fragment,o),w(Jn.$$.fragment,o),w(qn.$$.fragment,o),w(mr.$$.fragment,o),w(fr.$$.fragment,o),w(yr.$$.fragment,o),w(Cn.$$.fragment,o),w(Un.$$.fragment,o),w(In.$$.fragment,o),w(vr.$$.fragment,o),w(kr.$$.fragment,o),w(Fr.$$.fragment,o),w(Gn.$$.fragment,o),w(Wn.$$.fragment,o),w(xr.$$.fragment,o),w($r.$$.fragment,o),w(Jr.$$.fragment,o),w(Nn.$$.fragment,o),w(qr.$$.fragment,o),w(Er.$$.fragment,o),w(Xn.$$.fragment,o),w(Zr.$$.fragment,o),w(Vn.$$.fragment,o),w(Pn.$$.fragment,o),w(Gr.$$.fragment,o),w(Wr.$$.fragment,o),w(Yn.$$.fragment,o),w(Rr.$$.fragment,o),w(Ln.$$.fragment,o),w(On.$$.fragment,o),w(Hn.$$.fragment,o),w(Xr.$$.fragment,o),w(Vr.$$.fragment,o),w(Kn.$$.fragment,o),w(Lr.$$.fragment,o),w(ea.$$.fragment,o),w(Or.$$.fragment,o),w(Hr.$$.fragment,o),w(si.$$.fragment,o),w(oa.$$.fragment,o),w(na.$$.fragment,o),w(ri.$$.fragment,o),w(sa.$$.fragment,o),w(ii.$$.fragment,o),w(ia.$$.fragment,o),w(di.$$.fragment,o),w(li.$$.fragment,o),w(_i.$$.fragment,o),w(la.$$.fragment,o),w(ca.$$.fragment,o),w(pa.$$.fragment,o),w(bi.$$.fragment,o),w(ua.$$.fragment,o),w(yi.$$.fragment,o),w(fa.$$.fragment,o),w(vi.$$.fragment,o),w(ki.$$.fragment,o),w(Bi.$$.fragment,o),w(_a.$$.fragment,o),w(ba.$$.fragment,o),w(zi.$$.fragment,o),w(va.$$.fragment,o),w(Ji.$$.fragment,o),w(Ta.$$.fragment,o),w(qi.$$.fragment,o),w(Ei.$$.fragment,o),w(Si.$$.fragment,o),w(Ma.$$.fragment,o),w(Fa.$$.fragment,o),w(Ni.$$.fragment,o),w($a.$$.fragment,o),w(Ri.$$.fragment,o),w(Ba.$$.fragment,o),w(Xi.$$.fragment,o),w(Vi.$$.fragment,o),w(Ki.$$.fragment,o),w(Ja.$$.fragment,o),w(qa.$$.fragment,o),vu=!0)},o(o){M(r.$$.fragment,o),M(K.$$.fragment,o),M(Ka.$$.fragment,o),M(ss.$$.fragment,o),M(rs.$$.fragment,o),M(is.$$.fragment,o),M(ds.$$.fragment,o),M(ls.$$.fragment,o),M(Ts.$$.fragment,o),M(zs.$$.fragment,o),M(Zs.$$.fragment,o),M(Gs.$$.fragment,o),M(fn.$$.fragment,o),M(As.$$.fragment,o),M(Ss.$$.fragment,o),M(_n.$$.fragment,o),M(bn.$$.fragment,o),M(Xs.$$.fragment,o),M(Ps.$$.fragment,o),M(Qs.$$.fragment,o),M(Ys.$$.fragment,o),M(Os.$$.fragment,o),M(Hs.$$.fragment,o),M(wn.$$.fragment,o),M(Mn.$$.fragment,o),M(tr.$$.fragment,o),M(or.$$.fragment,o),M(nr.$$.fragment,o),M(ir.$$.fragment,o),M($n.$$.fragment,o),M(jn.$$.fragment,o),M(dr.$$.fragment,o),M(lr.$$.fragment,o),M(ur.$$.fragment,o),M(zn.$$.fragment,o),M(Jn.$$.fragment,o),M(qn.$$.fragment,o),M(mr.$$.fragment,o),M(fr.$$.fragment,o),M(yr.$$.fragment,o),M(Cn.$$.fragment,o),M(Un.$$.fragment,o),M(In.$$.fragment,o),M(vr.$$.fragment,o),M(kr.$$.fragment,o),M(Fr.$$.fragment,o),M(Gn.$$.fragment,o),M(Wn.$$.fragment,o),M(xr.$$.fragment,o),M($r.$$.fragment,o),M(Jr.$$.fragment,o),M(Nn.$$.fragment,o),M(qr.$$.fragment,o),M(Er.$$.fragment,o),M(Xn.$$.fragment,o),M(Zr.$$.fragment,o),M(Vn.$$.fragment,o),M(Pn.$$.fragment,o),M(Gr.$$.fragment,o),M(Wr.$$.fragment,o),M(Yn.$$.fragment,o),M(Rr.$$.fragment,o),M(Ln.$$.fragment,o),M(On.$$.fragment,o),M(Hn.$$.fragment,o),M(Xr.$$.fragment,o),M(Vr.$$.fragment,o),M(Kn.$$.fragment,o),M(Lr.$$.fragment,o),M(ea.$$.fragment,o),M(Or.$$.fragment,o),M(Hr.$$.fragment,o),M(si.$$.fragment,o),M(oa.$$.fragment,o),M(na.$$.fragment,o),M(ri.$$.fragment,o),M(sa.$$.fragment,o),M(ii.$$.fragment,o),M(ia.$$.fragment,o),M(di.$$.fragment,o),M(li.$$.fragment,o),M(_i.$$.fragment,o),M(la.$$.fragment,o),M(ca.$$.fragment,o),M(pa.$$.fragment,o),M(bi.$$.fragment,o),M(ua.$$.fragment,o),M(yi.$$.fragment,o),M(fa.$$.fragment,o),M(vi.$$.fragment,o),M(ki.$$.fragment,o),M(Bi.$$.fragment,o),M(_a.$$.fragment,o),M(ba.$$.fragment,o),M(zi.$$.fragment,o),M(va.$$.fragment,o),M(Ji.$$.fragment,o),M(Ta.$$.fragment,o),M(qi.$$.fragment,o),M(Ei.$$.fragment,o),M(Si.$$.fragment,o),M(Ma.$$.fragment,o),M(Fa.$$.fragment,o),M(Ni.$$.fragment,o),M($a.$$.fragment,o),M(Ri.$$.fragment,o),M(Ba.$$.fragment,o),M(Xi.$$.fragment,o),M(Vi.$$.fragment,o),M(Ki.$$.fragment,o),M(Ja.$$.fragment,o),M(qa.$$.fragment,o),vu=!1},d(o){t(l),o&&t(y),o&&t(f),F(r),o&&t(P),o&&t(Z),o&&t(D),o&&t(de),o&&t(Ze),o&&t(W),F(K),o&&t(ee),o&&t(ye),o&&t(U),o&&t(xe),o&&t(Ge),o&&t(te),o&&t(I),o&&t(je),o&&t(We),o&&t(ve),o&&t(Mh),o&&t(Yt),o&&t(Fh),o&&t(yo),F(Ka),o&&t(xh),o&&t(Lt),o&&t($h),o&&t(vo),F(ss),o&&t(jh),o&&t(ht),o&&t(Bh),o&&t(Mo),F(rs),o&&t(zh),o&&t(Ot),o&&t(Jh),F(is,o),o&&t(qh),o&&t(Fo),F(ds),o&&t(Eh),o&&t(kd),o&&t(Ch),F(ls,o),o&&t(Uh),o&&t(Te),o&&t(Ih),F(Ts,o),o&&t(Zh),o&&t(ut),o&&t(Gh),F(zs,o),o&&t(Wh),o&&t(Jt),o&&t(Ah),o&&t(Ud),o&&t(Sh),o&&t(ao),o&&t(Nh),o&&t(xo),F(Zs),o&&t(Rh),o&&t(yt),F(Gs),F(fn),o&&t(Xh),o&&t(Bo),F(As),o&&t(Vh),o&&t(S),F(Ss),F(_n),F(bn),F(Xs),F(Ps),F(Qs),F(Ys),o&&t(Ph),o&&t(zo),F(Os),o&&t(Qh),o&&t(fe),F(Hs),F(wn),F(Mn),F(tr),o&&t(Yh),o&&t(Jo),F(or),o&&t(Lh),o&&t(vt),F(nr),F(ir),F($n),F(jn),o&&t(Oh),o&&t(Eo),F(dr),o&&t(Hh),o&&t(kt),F(lr),F(ur),F(zn),F(Jn),F(qn),o&&t(Dh),o&&t(Uo),F(mr),o&&t(Kh),o&&t(ot),F(fr),F(yr),F(Cn),F(Un),F(In),o&&t(eu),o&&t(Zo),F(vr),o&&t(tu),o&&t(nt),F(kr),F(Fr),F(Gn),F(Wn),o&&t(ou),o&&t(Ao),F(xr),o&&t(nu),o&&t(at),F($r),F(Jr),F(Nn),o&&t(au),o&&t(So),F(qr),o&&t(su),o&&t(st),F(Er),F(Xn),F(Zr),F(Vn),F(Pn),o&&t(ru),o&&t(Ro),F(Gr),o&&t(iu),o&&t(rt),F(Wr),F(Yn),F(Rr),F(Ln),F(On),F(Hn),o&&t(du),o&&t(Vo),F(Xr),o&&t(lu),o&&t(Ue),F(Vr),F(Kn),F(Lr),F(ea),o&&t(cu),o&&t(Qo),F(Or),o&&t(pu),o&&t(ge),F(Hr),F(si),F(oa),F(na),F(ri),F(sa),F(ii),F(ia),o&&t(hu),o&&t(Lo),F(di),o&&t(uu),o&&t(_e),F(li),F(_i),F(la),F(ca),F(pa),F(bi),F(ua),F(yi),F(fa),o&&t(mu),o&&t(Ho),F(vi),o&&t(fu),o&&t(O),F(ki),F(Bi),F(_a),F(ba),F(zi),F(va),F(Ji),F(Ta),o&&t(gu),o&&t(Ko),F(qi),o&&t(_u),o&&t(H),F(Ei),F(Si),F(Ma),F(Fa),F(Ni),F($a),F(Ri),F(Ba),o&&t(bu),o&&t(on),F(Xi),o&&t(yu),o&&t(Me),F(Vi),F(Ki),F(Ja),F(qa)}}}const M$={local:"bart",sections:[{local:"overview",sections:[{local:"examples",title:"Examples"}],title:"Overview"},{local:"implementation-notes",title:"Implementation Notes"},{local:"mask-filling",title:"Mask Filling"},{local:"resources",title:"Resources"},{local:"transformers.BartConfig",title:"BartConfig"},{local:"transformers.BartTokenizer",title:"BartTokenizer"},{local:"transformers.BartTokenizerFast",title:"BartTokenizerFast"},{local:"transformers.BartModel",title:"BartModel"},{local:"transformers.BartForConditionalGeneration",title:"BartForConditionalGeneration"},{local:"transformers.BartForSequenceClassification",title:"BartForSequenceClassification"},{local:"transformers.BartForQuestionAnswering",title:"BartForQuestionAnswering"},{local:"transformers.BartForCausalLM",title:"BartForCausalLM"},{local:"transformers.TFBartModel",title:"TFBartModel"},{local:"transformers.TFBartForConditionalGeneration",title:"TFBartForConditionalGeneration"},{local:"transformers.TFBartForSequenceClassification",title:"TFBartForSequenceClassification"},{local:"transformers.FlaxBartModel",title:"FlaxBartModel"},{local:"transformers.FlaxBartForConditionalGeneration",title:"FlaxBartForConditionalGeneration"},{local:"transformers.FlaxBartForSequenceClassification",title:"FlaxBartForSequenceClassification"},{local:"transformers.FlaxBartForQuestionAnswering",title:"FlaxBartForQuestionAnswering"},{local:"transformers.FlaxBartForCausalLM",title:"FlaxBartForCausalLM"}],title:"BART"};function F$($){return qx(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class E$ extends jx{constructor(l){super();Bx(this,l,F$,w$,zx,{})}}export{E$ as default,M$ as metadata};
