import{S as pm,i as hm,s as um,e as s,k as p,w as v,t as d,M as mm,c as a,d as t,m as h,a as r,x as k,h as l,b as m,G as e,g,y as T,q as w,o as M,B,v as fm,L as $e}from"../../chunks/vendor-hf-doc-builder.js";import{T as yt}from"../../chunks/Tip-hf-doc-builder.js";import{D as I}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Te}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ke}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Be}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function gm(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsZW5kZXJib3RDb25maWclMkMlMjBCbGVuZGVyYm90TW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmxlbmRlcmJvdCUyMGZhY2Vib29rJTJGYmxlbmRlcmJvdC0zQiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCbGVuZGVyYm90Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGZhY2Vib29rJTJGYmxlbmRlcmJvdC0zQiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQmxlbmRlcmJvdE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlenderbotConfig, BlenderbotModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Blenderbot facebook/blenderbot-3B style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BlenderbotConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/blenderbot-3B style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotModel(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(){i=s("p"),y=d("Example:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Example:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function _m(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsZW5kZXJib3RUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBCbGVuZGVyYm90VG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJsZW5kZXJib3QtM0IlMjIpJTBBdG9rZW5pemVyLmFkZF9wcmVmaXhfc3BhY2UlMjAlM0QlMjBGYWxzZSUwQXRva2VuaXplciglMjJIZWxsbyUyMHdvcmxkJTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUwQXRva2VuaXplciglMjIlMjBIZWxsbyUyMHdvcmxkJTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlenderbotTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BlenderbotTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-3B&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.add_prefix_space = <span class="hljs-literal">False</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">47</span>, <span class="hljs-number">921</span>, <span class="hljs-number">86</span>, <span class="hljs-number">1085</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">6950</span>, <span class="hljs-number">1085</span>, <span class="hljs-number">2</span>]`}}),{c(){i=s("p"),y=d("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function bm(j){let i,y,f,u,b;return{c(){i=s("p"),y=d("When used with "),f=s("code"),u=d("is_split_into_words=True"),b=d(", this tokenizer will add a space before each word (even the first one).")},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"When used with "),f=a(c,"CODE",{});var F=r(f);u=l(F,"is_split_into_words=True"),F.forEach(t),b=l(c,", this tokenizer will add a space before each word (even the first one)."),c.forEach(t)},m(n,c){g(n,i,c),e(i,y),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function ym(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsZW5kZXJib3RUb2tlbml6ZXJGYXN0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQmxlbmRlcmJvdFRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmxlbmRlcmJvdC0zQiUyMiklMEF0b2tlbml6ZXIoJTIySGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMEF0b2tlbml6ZXIoJTIyJTIwSGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlenderbotTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BlenderbotTokenizerFast.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-3B&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">6950</span>, <span class="hljs-number">1085</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">6950</span>, <span class="hljs-number">1085</span>, <span class="hljs-number">2</span>]`}}),{c(){i=s("p"),y=d("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function vm(j){let i,y,f,u,b,n,c,F;return{c(){i=s("p"),y=d("When used with "),f=s("code"),u=d("is_split_into_words=True"),b=d(", this tokenizer needs to be instantiated with "),n=s("code"),c=d("add_prefix_space=True"),F=d(".")},l(D){i=a(D,"P",{});var Z=r(i);y=l(Z,"When used with "),f=a(Z,"CODE",{});var q=r(f);u=l(q,"is_split_into_words=True"),q.forEach(t),b=l(Z,", this tokenizer needs to be instantiated with "),n=a(Z,"CODE",{});var Y=r(n);c=l(Y,"add_prefix_space=True"),Y.forEach(t),F=l(Z,"."),Z.forEach(t)},m(D,Z){g(D,i,Z),e(i,y),e(i,f),e(f,u),e(i,b),e(i,n),e(n,c),e(i,F)},d(D){D&&t(i)}}}function km(j){let i,y,f,u,b;return{c(){i=s("p"),y=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var F=r(f);u=l(F,"Module"),F.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){g(n,i,c),e(i,y),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Tm(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCbGVuZGVyYm90TW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEJsZW5kZXJib3RNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZibGVuZGVyYm90LTQwME0tZGlzdGlsbCUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJsZW5kZXJib3QtNDAwTS1kaXN0aWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJTdHVkaWVzJTIwaGF2ZSUyMGJlZW4lMjBzaG93biUyMHRoYXQlMjBvd25pbmclMjBhJTIwZG9nJTIwaXMlMjBnb29kJTIwZm9yJTIweW91JTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMHRva2VuaXplciglMjJTdHVkaWVzJTIwc2hvdyUyMHRoYXQlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKS5pbnB1dF9pZHMlMjAlMjAlMjMlMjBCYXRjaCUyMHNpemUlMjAxJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyUzRGlucHV0cy5pbnB1dF9pZHMlMkMlMjBkZWNvZGVyX2lucHV0X2lkcyUzRGRlY29kZXJfaW5wdXRfaWRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BlenderbotModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotModel.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Studies have been shown that owning a dog is good for you&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = tokenizer(<span class="hljs-string">&quot;Studies show that&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids=inputs.input_ids, decoder_input_ids=decoder_input_ids)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>mname = <span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotForConditionalGeneration.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>UTTERANCE = <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><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Human: &quot;</span>, UTTERANCE)
Human:  My friends are cool but they eat too many carbs.

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([UTTERANCE], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>reply_ids = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Bot: &quot;</span>, tokenizer.batch_decode(reply_ids, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>])
Bot: That<span class="hljs-string">&#x27;s unfortunate. Are they trying to lose weight or are they just trying to be healthier?

&gt;&gt;&gt; REPLY = &quot;I&#x27;</span>m <span class="hljs-keyword">not</span> sure<span class="hljs-string">&quot;
&gt;&gt;&gt; print(&quot;</span>Human: <span class="hljs-string">&quot;, REPLY)
Human: I&#x27;m not sure

&gt;&gt;&gt; NEXT_UTTERANCE = (
...     &quot;</span>My friends are cool but they eat too many carbs.&lt;/s&gt; &lt;s&gt;That<span class="hljs-string">&#x27;s unfortunate. &quot;
...     &quot;Are they trying to lose weight or are they just trying to be healthier?&lt;/s&gt; &quot;
...     &quot;&lt;s&gt; I&#x27;</span>m <span class="hljs-keyword">not</span> sure.<span class="hljs-string">&quot;
... )
&gt;&gt;&gt; inputs = tokenizer([NEXT_UTTERANCE], return_tensors=&quot;</span>pt<span class="hljs-string">&quot;)
&gt;&gt;&gt; next_reply_ids = model.generate(**inputs)
&gt;&gt;&gt; print(&quot;</span>Bot: <span class="hljs-string">&quot;, tokenizer.batch_decode(next_reply_ids, skip_special_tokens=True)[0])
Bot:   I see. Well, it&#x27;s good that they&#x27;re trying to change their eating habits.</span>`}}),{c(){i=s("p"),y=d("Conversation example:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Conversation example:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function Bm(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCbGVuZGVyYm90Rm9yQ2F1c2FsTE0lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJsZW5kZXJib3QtNDAwTS1kaXN0aWxsJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmxlbmRlcmJvdEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJmYWNlYm9vayUyRmJsZW5kZXJib3QtNDAwTS1kaXN0aWxsJTIyJTJDJTIwYWRkX2Nyb3NzX2F0dGVudGlvbiUzREZhbHNlJTBBKSUwQWFzc2VydCUyMG1vZGVsLmNvbmZpZy5pc19kZWNvZGVyJTJDJTIwZiUyMiU3Qm1vZGVsLl9fY2xhc3NfXyU3RCUyMGhhcyUyMHRvJTIwYmUlMjBjb25maWd1cmVkJTIwYXMlMjBhJTIwZGVjb2Rlci4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTBBZXhwZWN0ZWRfc2hhcGUlMjAlM0QlMjAlNUIxJTJDJTIwaW5wdXRzLmlucHV0X2lkcy5zaGFwZSU1Qi0xJTVEJTJDJTIwbW9kZWwuY29uZmlnLnZvY2FiX3NpemUlNUQlMEFsaXN0KGxvZ2l0cy5zaGFwZSklMjAlM0QlM0QlMjBleHBlY3RlZF9zaGFwZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BlenderbotForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotForCausalLM.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>, add_cross_attention=<span class="hljs-literal">False</span>
<span class="hljs-meta">... </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(){i=s("p"),y=d("Example:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Example:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function $m(j){let i,y,f,u,b,n,c,F,D,Z,q,Y,je,x,ie,ce,Ke,Re,G,K,Fe,H,et,xe,pe,Ae,ee,he,ue,tt,ze,E,U,ot,te,we,Je,me,Xe,Me,W,Se,O,Ee,nt,oe,Q,st,N,at,fe,ge,Ce,V,Pe,C,ne,qe;return{c(){i=s("p"),y=d("TensorFlow models and layers in "),f=s("code"),u=d("transformers"),b=d(" accept two formats as input:"),n=p(),c=s("ul"),F=s("li"),D=d("having all inputs as keyword arguments (like PyTorch models), or"),Z=p(),q=s("li"),Y=d("having all inputs as a list, tuple or dict in the first positional argument."),je=p(),x=s("p"),ie=d(`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 `),ce=s("code"),Ke=d("model.fit()"),Re=d(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=s("code"),K=d("model.fit()"),Fe=d(` supports! If, however, you want to use the second
format outside of Keras methods like `),H=s("code"),et=d("fit()"),xe=d(" and "),pe=s("code"),Ae=d("predict()"),ee=d(`, such as when creating your own layers or models with
the Keras `),he=s("code"),ue=d("Functional"),tt=d(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ze=p(),E=s("ul"),U=s("li"),ot=d("a single Tensor with "),te=s("code"),we=d("input_ids"),Je=d(" only and nothing else: "),me=s("code"),Xe=d("model(input_ids)"),Me=p(),W=s("li"),Se=d(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=s("code"),Ee=d("model([input_ids, attention_mask])"),nt=d(" or "),oe=s("code"),Q=d("model([input_ids, attention_mask, token_type_ids])"),st=p(),N=s("li"),at=d(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),fe=s("code"),ge=d('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ce=p(),V=s("p"),Pe=d(`Note that when creating models and layers with
`),C=s("a"),ne=d("subclassing"),qe=d(` 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($){i=a($,"P",{});var z=r(i);y=l(z,"TensorFlow models and layers in "),f=a(z,"CODE",{});var rt=r(f);u=l(rt,"transformers"),rt.forEach(t),b=l(z," accept two formats as input:"),z.forEach(t),n=h($),c=a($,"UL",{});var Ue=r(c);F=a(Ue,"LI",{});var ut=r(F);D=l(ut,"having all inputs as keyword arguments (like PyTorch models), or"),ut.forEach(t),Z=h(Ue),q=a(Ue,"LI",{});var se=r(q);Y=l(se,"having all inputs as a list, tuple or dict in the first positional argument."),se.forEach(t),Ue.forEach(t),je=h($),x=a($,"P",{});var J=r(x);ie=l(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 `),ce=a(J,"CODE",{});var vt=r(ce);Ke=l(vt,"model.fit()"),vt.forEach(t),Re=l(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=a(J,"CODE",{});var Ie=r(G);K=l(Ie,"model.fit()"),Ie.forEach(t),Fe=l(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),H=a(J,"CODE",{});var kt=r(H);et=l(kt,"fit()"),kt.forEach(t),xe=l(J," and "),pe=a(J,"CODE",{});var Tt=r(pe);Ae=l(Tt,"predict()"),Tt.forEach(t),ee=l(J,`, such as when creating your own layers or models with
the Keras `),he=a(J,"CODE",{});var wt=r(he);ue=l(wt,"Functional"),wt.forEach(t),tt=l(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),ze=h($),E=a($,"UL",{});var R=r(E);U=a(R,"LI",{});var _e=r(U);ot=l(_e,"a single Tensor with "),te=a(_e,"CODE",{});var Ze=r(te);we=l(Ze,"input_ids"),Ze.forEach(t),Je=l(_e," only and nothing else: "),me=a(_e,"CODE",{});var Mt=r(me);Xe=l(Mt,"model(input_ids)"),Mt.forEach(t),_e.forEach(t),Me=h(R),W=a(R,"LI",{});var be=r(W);Se=l(be,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a(be,"CODE",{});var Bt=r(O);Ee=l(Bt,"model([input_ids, attention_mask])"),Bt.forEach(t),nt=l(be," or "),oe=a(be,"CODE",{});var L=r(oe);Q=l(L,"model([input_ids, attention_mask, token_type_ids])"),L.forEach(t),be.forEach(t),st=h(R),N=a(R,"LI",{});var dt=r(N);at=l(dt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),fe=a(dt,"CODE",{});var lt=r(fe);ge=l(lt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),lt.forEach(t),dt.forEach(t),R.forEach(t),Ce=h($),V=a($,"P",{});var Ge=r(V);Pe=l(Ge,`Note that when creating models and layers with
`),C=a(Ge,"A",{href:!0,rel:!0});var $t=r(C);ne=l($t,"subclassing"),$t.forEach(t),qe=l(Ge,` 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!`),Ge.forEach(t),this.h()},h(){m(C,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(C,"rel","nofollow")},m($,z){g($,i,z),e(i,y),e(i,f),e(f,u),e(i,b),g($,n,z),g($,c,z),e(c,F),e(F,D),e(c,Z),e(c,q),e(q,Y),g($,je,z),g($,x,z),e(x,ie),e(x,ce),e(ce,Ke),e(x,Re),e(x,G),e(G,K),e(x,Fe),e(x,H),e(H,et),e(x,xe),e(x,pe),e(pe,Ae),e(x,ee),e(x,he),e(he,ue),e(x,tt),g($,ze,z),g($,E,z),e(E,U),e(U,ot),e(U,te),e(te,we),e(U,Je),e(U,me),e(me,Xe),e(E,Me),e(E,W),e(W,Se),e(W,O),e(O,Ee),e(W,nt),e(W,oe),e(oe,Q),e(E,st),e(E,N),e(N,at),e(N,fe),e(fe,ge),g($,Ce,z),g($,V,z),e(V,Pe),e(V,C),e(C,ne),e(V,qe)},d($){$&&t(i),$&&t(n),$&&t(c),$&&t(je),$&&t(x),$&&t(ze),$&&t(E),$&&t(Ce),$&&t(V)}}}function jm(j){let i,y,f,u,b;return{c(){i=s("p"),y=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var F=r(f);u=l(F,"Module"),F.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){g(n,i,c),e(i,y),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Fm(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJsZW5kZXJib3RNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZibGVuZGVyYm90LTQwME0tZGlzdGlsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQmxlbmRlcmJvdE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJsZW5kZXJib3QtNDAwTS1kaXN0aWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBlenderbotModel
<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/blenderbot-400M-distill&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlenderbotModel.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&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(){i=s("p"),y=d("Example:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Example:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function xm(j){let i,y,f,u,b,n,c,F,D,Z,q,Y,je,x,ie,ce,Ke,Re,G,K,Fe,H,et,xe,pe,Ae,ee,he,ue,tt,ze,E,U,ot,te,we,Je,me,Xe,Me,W,Se,O,Ee,nt,oe,Q,st,N,at,fe,ge,Ce,V,Pe,C,ne,qe;return{c(){i=s("p"),y=d("TensorFlow models and layers in "),f=s("code"),u=d("transformers"),b=d(" accept two formats as input:"),n=p(),c=s("ul"),F=s("li"),D=d("having all inputs as keyword arguments (like PyTorch models), or"),Z=p(),q=s("li"),Y=d("having all inputs as a list, tuple or dict in the first positional argument."),je=p(),x=s("p"),ie=d(`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 `),ce=s("code"),Ke=d("model.fit()"),Re=d(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=s("code"),K=d("model.fit()"),Fe=d(` supports! If, however, you want to use the second
format outside of Keras methods like `),H=s("code"),et=d("fit()"),xe=d(" and "),pe=s("code"),Ae=d("predict()"),ee=d(`, such as when creating your own layers or models with
the Keras `),he=s("code"),ue=d("Functional"),tt=d(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ze=p(),E=s("ul"),U=s("li"),ot=d("a single Tensor with "),te=s("code"),we=d("input_ids"),Je=d(" only and nothing else: "),me=s("code"),Xe=d("model(input_ids)"),Me=p(),W=s("li"),Se=d(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=s("code"),Ee=d("model([input_ids, attention_mask])"),nt=d(" or "),oe=s("code"),Q=d("model([input_ids, attention_mask, token_type_ids])"),st=p(),N=s("li"),at=d(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),fe=s("code"),ge=d('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ce=p(),V=s("p"),Pe=d(`Note that when creating models and layers with
`),C=s("a"),ne=d("subclassing"),qe=d(` 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($){i=a($,"P",{});var z=r(i);y=l(z,"TensorFlow models and layers in "),f=a(z,"CODE",{});var rt=r(f);u=l(rt,"transformers"),rt.forEach(t),b=l(z," accept two formats as input:"),z.forEach(t),n=h($),c=a($,"UL",{});var Ue=r(c);F=a(Ue,"LI",{});var ut=r(F);D=l(ut,"having all inputs as keyword arguments (like PyTorch models), or"),ut.forEach(t),Z=h(Ue),q=a(Ue,"LI",{});var se=r(q);Y=l(se,"having all inputs as a list, tuple or dict in the first positional argument."),se.forEach(t),Ue.forEach(t),je=h($),x=a($,"P",{});var J=r(x);ie=l(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 `),ce=a(J,"CODE",{});var vt=r(ce);Ke=l(vt,"model.fit()"),vt.forEach(t),Re=l(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=a(J,"CODE",{});var Ie=r(G);K=l(Ie,"model.fit()"),Ie.forEach(t),Fe=l(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),H=a(J,"CODE",{});var kt=r(H);et=l(kt,"fit()"),kt.forEach(t),xe=l(J," and "),pe=a(J,"CODE",{});var Tt=r(pe);Ae=l(Tt,"predict()"),Tt.forEach(t),ee=l(J,`, such as when creating your own layers or models with
the Keras `),he=a(J,"CODE",{});var wt=r(he);ue=l(wt,"Functional"),wt.forEach(t),tt=l(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),ze=h($),E=a($,"UL",{});var R=r(E);U=a(R,"LI",{});var _e=r(U);ot=l(_e,"a single Tensor with "),te=a(_e,"CODE",{});var Ze=r(te);we=l(Ze,"input_ids"),Ze.forEach(t),Je=l(_e," only and nothing else: "),me=a(_e,"CODE",{});var Mt=r(me);Xe=l(Mt,"model(input_ids)"),Mt.forEach(t),_e.forEach(t),Me=h(R),W=a(R,"LI",{});var be=r(W);Se=l(be,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a(be,"CODE",{});var Bt=r(O);Ee=l(Bt,"model([input_ids, attention_mask])"),Bt.forEach(t),nt=l(be," or "),oe=a(be,"CODE",{});var L=r(oe);Q=l(L,"model([input_ids, attention_mask, token_type_ids])"),L.forEach(t),be.forEach(t),st=h(R),N=a(R,"LI",{});var dt=r(N);at=l(dt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),fe=a(dt,"CODE",{});var lt=r(fe);ge=l(lt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),lt.forEach(t),dt.forEach(t),R.forEach(t),Ce=h($),V=a($,"P",{});var Ge=r(V);Pe=l(Ge,`Note that when creating models and layers with
`),C=a(Ge,"A",{href:!0,rel:!0});var $t=r(C);ne=l($t,"subclassing"),$t.forEach(t),qe=l(Ge,` 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!`),Ge.forEach(t),this.h()},h(){m(C,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(C,"rel","nofollow")},m($,z){g($,i,z),e(i,y),e(i,f),e(f,u),e(i,b),g($,n,z),g($,c,z),e(c,F),e(F,D),e(c,Z),e(c,q),e(q,Y),g($,je,z),g($,x,z),e(x,ie),e(x,ce),e(ce,Ke),e(x,Re),e(x,G),e(G,K),e(x,Fe),e(x,H),e(H,et),e(x,xe),e(x,pe),e(pe,Ae),e(x,ee),e(x,he),e(he,ue),e(x,tt),g($,ze,z),g($,E,z),e(E,U),e(U,ot),e(U,te),e(te,we),e(U,Je),e(U,me),e(me,Xe),e(E,Me),e(E,W),e(W,Se),e(W,O),e(O,Ee),e(W,nt),e(W,oe),e(oe,Q),e(E,st),e(E,N),e(N,at),e(N,fe),e(fe,ge),g($,Ce,z),g($,V,z),e(V,Pe),e(V,C),e(C,ne),e(V,qe)},d($){$&&t(i),$&&t(n),$&&t(c),$&&t(je),$&&t(x),$&&t(ze),$&&t(E),$&&t(Ce),$&&t(V)}}}function zm(j){let i,y,f,u,b;return{c(){i=s("p"),y=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var F=r(f);u=l(F,"Module"),F.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){g(n,i,c),e(i,y),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Jm(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJsZW5kZXJib3RGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtbmFtZSUyMCUzRCUyMCUyMmZhY2Vib29rJTJGYmxlbmRlcmJvdC00MDBNLWRpc3RpbGwlMjIlMEFtb2RlbCUyMCUzRCUyMFRGQmxlbmRlcmJvdEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQobW5hbWUpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQobW5hbWUpJTBBVVRURVJBTkNFJTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBcHJpbnQoJTIySHVtYW4lM0ElMjAlMjIlMkMlMjBVVFRFUkFOQ0UpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QlVUVEVSQU5DRSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBcmVwbHlfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMpJTBBcHJpbnQoJTIyQm90JTNBJTIwJTIyJTJDJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShyZXBseV9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUIwJTVEKSUwQSUwQVJFUExZJTIwJTNEJTIwJTIySSdtJTIwbm90JTIwc3VyZSUyMiUwQXByaW50KCUyMkh1bWFuJTNBJTIwJTIyJTJDJTIwUkVQTFkpJTBBTkVYVF9VVFRFUkFOQ0UlMjAlM0QlMjAoJTBBJTIwJTIwJTIwJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTNDJTJGcyUzRSUyMCUzQ3MlM0VUaGF0J3MlMjB1bmZvcnR1bmF0ZS4lMjAlMjIlMEElMjAlMjAlMjAlMjAlMjJBcmUlMjB0aGV5JTIwdHJ5aW5nJTIwdG8lMjBsb3NlJTIwd2VpZ2h0JTIwb3IlMjBhcmUlMjB0aGV5JTIwanVzdCUyMHRyeWluZyUyMHRvJTIwYmUlMjBoZWFsdGhpZXIlM0YlM0MlMkZzJTNFJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIyJTNDcyUzRSUyMEknbSUyMG5vdCUyMHN1cmUuJTIyJTBBKSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUJORVhUX1VUVEVSQU5DRSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBbmV4dF9yZXBseV9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEFwcmludCglMjJCb3QlM0ElMjAlMjIlMkMlMjB0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKG5leHRfcmVwbHlfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTVCMCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBlenderbotForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>mname = <span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlenderbotForConditionalGeneration.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>UTTERANCE = <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><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Human: &quot;</span>, UTTERANCE)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([UTTERANCE], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>reply_ids = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Bot: &quot;</span>, tokenizer.batch_decode(reply_ids, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>REPLY = <span class="hljs-string">&quot;I&#x27;m not sure&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Human: &quot;</span>, REPLY)
<span class="hljs-meta">&gt;&gt;&gt; </span>NEXT_UTTERANCE = (
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&lt;/s&gt; &lt;s&gt;That&#x27;s unfortunate. &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Are they trying to lose weight or are they just trying to be healthier?&lt;/s&gt; &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;&lt;s&gt; I&#x27;m not sure.&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([NEXT_UTTERANCE], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>next_reply_ids = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Bot: &quot;</span>, tokenizer.batch_decode(next_reply_ids, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>])`}}),{c(){i=s("p"),y=d("Conversation example::"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Conversation example::"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function Em(j){let i,y,f,u,b;return{c(){i=s("p"),y=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var F=r(f);u=l(F,"Module"),F.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){g(n,i,c),e(i,y),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Cm(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmxlbmRlcmJvdE1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZibGVuZGVyYm90LTQwME0tZGlzdGlsbCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCbGVuZGVyYm90TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmxlbmRlcmJvdC00MDBNLWRpc3RpbGwlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotModel.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&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(){i=s("p"),y=d("Example:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Example:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function qm(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmxlbmRlcmJvdEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheEJsZW5kZXJib3RGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmxlbmRlcmJvdC00MDBNLWRpc3RpbGwlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZibGVuZGVyYm90LTQwME0tZGlzdGlsbCUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&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(){i=s("p"),y=d("Example:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Example:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function Um(j){let i,y,f,u,b;return u=new Te({props:{code:"aW1wb3J0JTIwamF4Lm51bXB5JTIwYXMlMjBqbnAlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZsYXhCbGVuZGVyYm90Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmxlbmRlcmJvdEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZibGVuZGVyYm90LTQwME0tZGlzdGlsbCUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJsZW5kZXJib3QtNDAwTS1kaXN0aWxsJTIyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJNeSUyMGZyaWVuZHMlMjBhcmUlMjBjb29sJTIwYnV0JTIwdGhleSUyMGVhdCUyMHRvbyUyMG1hbnklMjBjYXJicy4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUyQyUyMG1heF9sZW5ndGglM0QxMDI0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBZW5jb2Rlcl9vdXRwdXRzJTIwJTNEJTIwbW9kZWwuZW5jb2RlKCoqaW5wdXRzKSUwQSUwQWRlY29kZXJfc3RhcnRfdG9rZW5faWQlMjAlM0QlMjBtb2RlbC5jb25maWcuZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQWRlY29kZXJfaW5wdXRfaWRzJTIwJTNEJTIwam5wLm9uZXMoKGlucHV0cy5pbnB1dF9pZHMuc2hhcGUlNUIwJTVEJTJDJTIwMSklMkMlMjBkdHlwZSUzRCUyMmk0JTIyKSUyMColMjBkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmRlY29kZShkZWNvZGVyX2lucHV0X2lkcyUyQyUyMGVuY29kZXJfb3V0cHV0cyklMEFsYXN0X2RlY29kZXJfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",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, FlaxBlenderbotForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&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(){i=s("p"),y=d("Example:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Example:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function Im(j){let i,y,f,u,b;return{c(){i=s("p"),y=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var F=r(f);u=l(F,"Module"),F.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){g(n,i,c),e(i,y),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Zm(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmxlbmRlcmJvdEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheEJsZW5kZXJib3RGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmxlbmRlcmJvdC00MDBNLWRpc3RpbGwlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZibGVuZGVyYm90LTQwME0tZGlzdGlsbCUyMiklMEElMEFVVFRFUkFOQ0UlMjAlM0QlMjAlMjJNeSUyMGZyaWVuZHMlMjBhcmUlMjBjb29sJTIwYnV0JTIwdGhleSUyMGVhdCUyMHRvbyUyMG1hbnklMjBjYXJicy4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCVVRURVJBTkNFJTVEJTJDJTIwbWF4X2xlbmd0aCUzRDEwMjQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTIwUmVwbHklMEFyZXBseV9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZShpbnB1dHMlNUIlMjJpbnB1dF9pZHMlMjIlNUQlMkMlMjBudW1fYmVhbXMlM0Q0JTJDJTIwbWF4X2xlbmd0aCUzRDUlMkMlMjBlYXJseV9zdG9wcGluZyUzRFRydWUpLnNlcXVlbmNlcyUwQXByaW50KCU1QnRva2VuaXplci5kZWNvZGUoZyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSUyMGZvciUyMGclMjBpbiUyMHJlcGx5X2lkcyU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>UTTERANCE = <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([UTTERANCE], 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 Reply</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>reply_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>, early_stopping=<span class="hljs-literal">True</span>).sequences
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>([tokenizer.decode(g, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>) <span class="hljs-keyword">for</span> g <span class="hljs-keyword">in</span> reply_ids])`}}),{c(){i=s("p"),y=d("Conversation example::"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Conversation example::"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function Gm(j){let i,y,f,u,b;return u=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmxlbmRlcmJvdEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheEJsZW5kZXJib3RGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmxlbmRlcmJvdC00MDBNLWRpc3RpbGwlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZibGVuZGVyYm90LTQwME0tZGlzdGlsbCUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&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(){i=s("p"),y=d("Example:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Example:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function Wm(j){let i,y,f,u,b;return u=new Te({props:{code:"aW1wb3J0JTIwamF4Lm51bXB5JTIwYXMlMjBqbnAlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZsYXhCbGVuZGVyYm90Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmxlbmRlcmJvdEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZibGVuZGVyYm90LTQwME0tZGlzdGlsbCUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmJsZW5kZXJib3QtNDAwTS1kaXN0aWxsJTIyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJNeSUyMGZyaWVuZHMlMjBhcmUlMjBjb29sJTIwYnV0JTIwdGhleSUyMGVhdCUyMHRvbyUyMG1hbnklMjBjYXJicy4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUyQyUyMG1heF9sZW5ndGglM0QxMDI0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBZW5jb2Rlcl9vdXRwdXRzJTIwJTNEJTIwbW9kZWwuZW5jb2RlKCoqaW5wdXRzKSUwQSUwQWRlY29kZXJfc3RhcnRfdG9rZW5faWQlMjAlM0QlMjBtb2RlbC5jb25maWcuZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQWRlY29kZXJfaW5wdXRfaWRzJTIwJTNEJTIwam5wLm9uZXMoKGlucHV0cy5pbnB1dF9pZHMuc2hhcGUlNUIwJTVEJTJDJTIwMSklMkMlMjBkdHlwZSUzRCUyMmk0JTIyKSUyMColMjBkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmRlY29kZShkZWNvZGVyX2lucHV0X2lkcyUyQyUyMGVuY29kZXJfb3V0cHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",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, FlaxBlenderbotForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-400M-distill&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(){i=s("p"),y=d("Example:"),f=p(),v(u.$$.fragment)},l(n){i=a(n,"P",{});var c=r(i);y=l(c,"Example:"),c.forEach(t),f=h(n),k(u.$$.fragment,n)},m(n,c){g(n,i,c),e(i,y),g(n,f,c),T(u,n,c),b=!0},p:$e,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){M(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),B(u,n)}}}function Nm(j){let i,y,f,u,b,n,c,F,D,Z,q,Y,je,x,ie,ce,Ke,Re,G,K,Fe,H,et,xe,pe,Ae,ee,he,ue,tt,ze,E,U,ot,te,we,Je,me,Xe,Me,W,Se,O,Ee,nt,oe,Q,st,N,at,fe,ge,Ce,V,Pe,C,ne,qe,$,z,rt,Ue,ut,se,J,vt,Ie,kt,Tt,wt,R,_e,Ze,Mt,be,Bt,L,dt,lt,Ge,$t,Ys,Id,Zd,_s,Gd,Wd,Br,jt,Qt,Ks,Do,Nd,ea,Vd,$r,bs,Rd,jr,Lo,Fr,Ft,Dt,ta,Yo,Ad,oa,Xd,xr,mt,na,ys,Sd,Pd,sa,vs,Hd,Od,aa,ks,Qd,zr,xt,Lt,ra,Ko,Dd,da,Ld,Jr,We,en,Yd,zt,Kd,Ts,el,tl,tn,ol,nl,sl,Jt,al,ws,rl,dl,Ms,ll,il,cl,Yt,Er,Et,Kt,la,on,pl,ia,hl,Cr,A,nn,ul,ca,ml,fl,pa,gl,_l,eo,bl,sn,yl,ha,vl,kl,Tl,to,wl,an,Ml,Bs,Bl,$l,jl,ft,rn,Fl,ua,xl,zl,ma,$s,Jl,fa,El,qr,Ct,oo,ga,dn,Cl,_a,ql,Ur,X,ln,Ul,cn,Il,ba,Zl,Gl,Wl,ya,Nl,Vl,no,Rl,pn,Al,va,Xl,Sl,Pl,so,Hl,hn,Ol,js,Ql,Dl,Ll,gt,un,Yl,ka,Kl,ei,Ta,Fs,ti,wa,oi,Ir,qt,ao,Ma,mn,ni,Ba,si,Zr,it,ai,$a,ri,di,ja,li,ii,Fa,ci,Gr,Ne,fn,pi,gn,hi,xs,ui,mi,fi,_n,gi,bn,_i,bi,yi,He,yn,vi,Ut,ki,zs,Ti,wi,xa,Mi,Bi,$i,ro,ji,lo,Wr,It,io,za,vn,Fi,Ja,xi,Nr,ct,zi,Js,Ji,Ei,Ea,Ci,qi,Ca,Ui,Vr,Ve,kn,Ii,Tn,Zi,Es,Gi,Wi,Ni,wn,Vi,Mn,Ri,Ai,Xi,Oe,Bn,Si,Zt,Pi,Cs,Hi,Oi,qa,Qi,Di,Li,co,Yi,po,Rr,Gt,ho,Ua,$n,Ki,Ia,ec,Ar,Wt,jn,tc,uo,Fn,oc,mo,Xr,Nt,fo,Za,xn,nc,Ga,sc,Sr,ye,zn,ac,Jn,rc,qs,dc,lc,ic,En,cc,Cn,pc,hc,uc,go,mc,Qe,qn,fc,Vt,gc,Us,_c,bc,Wa,yc,vc,kc,_o,Tc,bo,Pr,Rt,yo,Na,Un,wc,Va,Mc,Hr,ve,In,Bc,Zn,$c,Is,jc,Fc,xc,Gn,zc,Wn,Jc,Ec,Cc,vo,qc,De,Nn,Uc,At,Ic,Zs,Zc,Gc,Ra,Wc,Nc,Vc,ko,Rc,To,Or,Xt,wo,Aa,Vn,Ac,Xa,Xc,Qr,S,Rn,Sc,An,Pc,Gs,Hc,Oc,Qc,Xn,Dc,Sn,Lc,Yc,Kc,Sa,ep,tp,pt,Pa,Pn,op,np,Ha,Hn,sp,ap,Oa,On,rp,dp,Qa,Qn,lp,ip,Le,Dn,cp,St,pp,Da,hp,up,La,mp,fp,gp,Mo,_p,Bo,bp,$o,Ln,yp,jo,vp,Fo,Yn,kp,xo,Dr,Pt,zo,Ya,Kn,Tp,Ka,wp,Lr,P,es,Mp,ts,Bp,Ws,$p,jp,Fp,os,xp,ns,zp,Jp,Ep,er,Cp,qp,ht,tr,ss,Up,Ip,or,as,Zp,Gp,nr,rs,Wp,Np,sr,ds,Vp,Rp,Ye,ls,Ap,Ht,Xp,ar,Sp,Pp,rr,Hp,Op,Qp,Jo,Dp,Eo,Lp,Co,is,Yp,qo,Kp,Uo,cs,eh,Io,Yr;return n=new ke({}),H=new ke({}),$=new ke({}),Do=new ke({}),Lo=new Te({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsZW5kZXJib3RUb2tlbml6ZXIlMkMlMjBCbGVuZGVyYm90Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW5hbWUlMjAlM0QlMjAlMjJmYWNlYm9vayUyRmJsZW5kZXJib3QtNDAwTS1kaXN0aWxsJTIyJTBBbW9kZWwlMjAlM0QlMjBCbGVuZGVyYm90Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZChtbmFtZSklMEF0b2tlbml6ZXIlMjAlM0QlMjBCbGVuZGVyYm90VG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChtbmFtZSklMEFVVFRFUkFOQ0UlMjAlM0QlMjAlMjJNeSUyMGZyaWVuZHMlMjBhcmUlMjBjb29sJTIwYnV0JTIwdGhleSUyMGVhdCUyMHRvbyUyMG1hbnklMjBjYXJicy4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCVVRURVJBTkNFJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFyZXBseV9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEFwcmludCh0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKHJlcGx5X2lkcykp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlenderbotTokenizer, BlenderbotForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>mname = <span class="hljs-string">&quot;facebook/blenderbot-400M-distill&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotForConditionalGeneration.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BlenderbotTokenizer.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>UTTERANCE = <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([UTTERANCE], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>reply_ids = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer.batch_decode(reply_ids))
[<span class="hljs-string">&quot;&lt;s&gt; That&#x27;s unfortunate. Are they trying to lose weight or are they just trying to be healthier?&lt;/s&gt;&quot;</span>]`}}),Yo=new ke({}),Ko=new ke({}),en=new I({props:{name:"class transformers.BlenderbotConfig",anchor:"transformers.BlenderbotConfig",parameters:[{name:"vocab_size",val:" = 8008"},{name:"max_position_embeddings",val:" = 128"},{name:"encoder_layers",val:" = 2"},{name:"encoder_ffn_dim",val:" = 10240"},{name:"encoder_attention_heads",val:" = 32"},{name:"decoder_layers",val:" = 24"},{name:"decoder_ffn_dim",val:" = 10240"},{name:"decoder_attention_heads",val:" = 32"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'gelu'"},{name:"d_model",val:" = 2560"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"decoder_start_token_id",val:" = 1"},{name:"scale_embedding",val:" = False"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"encoder_no_repeat_ngram_size",val:" = 3"},{name:"forced_eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlenderbotConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the Blenderbot 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.31.0/en/model_doc/blenderbot#transformers.BlenderbotModel">BlenderbotModel</a> or <a href="/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.TFBlenderbotModel">TFBlenderbotModel</a>.`,name:"vocab_size"},{anchor:"transformers.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.BlenderbotConfig.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.31.0/src/transformers/models/blenderbot/configuration_blenderbot.py#L36"}}),Yt=new Be({props:{anchor:"transformers.BlenderbotConfig.example",$$slots:{default:[gm]},$$scope:{ctx:j}}}),on=new ke({}),nn=new I({props:{name:"class transformers.BlenderbotTokenizer",anchor:"transformers.BlenderbotTokenizer",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.BlenderbotTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.BlenderbotTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.BlenderbotTokenizer.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.BlenderbotTokenizer.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.BlenderbotTokenizer.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.BlenderbotTokenizer.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.BlenderbotTokenizer.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.BlenderbotTokenizer.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.BlenderbotTokenizer.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.BlenderbotTokenizer.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.BlenderbotTokenizer.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. (Blenderbot tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/blenderbot/tokenization_blenderbot.py#L92"}}),eo=new Be({props:{anchor:"transformers.BlenderbotTokenizer.example",$$slots:{default:[_m]},$$scope:{ctx:j}}}),to=new yt({props:{$$slots:{default:[bm]},$$scope:{ctx:j}}}),rn=new I({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BlenderbotTokenizer.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.BlenderbotTokenizer.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.BlenderbotTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Will be ignored`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/blenderbot/tokenization_blenderbot.py#L400",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>
`}}),dn=new ke({}),ln=new I({props:{name:"class transformers.BlenderbotTokenizerFast",anchor:"transformers.BlenderbotTokenizerFast",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.BlenderbotTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.BlenderbotTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.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. (Blenderbot tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.BlenderbotTokenizerFast.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.31.0/src/transformers/models/blenderbot/tokenization_blenderbot_fast.py#L50"}}),no=new Be({props:{anchor:"transformers.BlenderbotTokenizerFast.example",$$slots:{default:[ym]},$$scope:{ctx:j}}}),so=new yt({props:{$$slots:{default:[vm]},$$scope:{ctx:j}}}),un=new I({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.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.BlenderbotTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Will be ignored`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/blenderbot/tokenization_blenderbot_fast.py#L284",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>
`}}),mn=new ke({}),fn=new I({props:{name:"class transformers.BlenderbotModel",anchor:"transformers.BlenderbotModel",parameters:[{name:"config",val:": BlenderbotConfig"}],parametersDescription:[{anchor:"transformers.BlenderbotModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</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.31.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.31.0/src/transformers/models/blenderbot/modeling_blenderbot.py#L1104"}}),yn=new I({props:{name:"forward",anchor:"transformers.BlenderbotModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple, transformers.modeling_outputs.BaseModelOutput, NoneType] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = 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.BlenderbotModel.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.BlenderbotModel.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.BlenderbotModel.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Blenderbot uses the <code>bos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.BlenderbotModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.BlenderbotModel.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.BlenderbotModel.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.BlenderbotModel.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.BlenderbotModel.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.BlenderbotModel.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.BlenderbotModel.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.BlenderbotModel.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.BlenderbotModel.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.BlenderbotModel.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.BlenderbotModel.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.31.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.31.0/src/transformers/models/blenderbot/modeling_blenderbot.py#L1146",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</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.31.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ro=new yt({props:{$$slots:{default:[km]},$$scope:{ctx:j}}}),lo=new Be({props:{anchor:"transformers.BlenderbotModel.forward.example",$$slots:{default:[Tm]},$$scope:{ctx:j}}}),vn=new ke({}),kn=new I({props:{name:"class transformers.BlenderbotForConditionalGeneration",anchor:"transformers.BlenderbotForConditionalGeneration",parameters:[{name:"config",val:": BlenderbotConfig"}],parametersDescription:[{anchor:"transformers.BlenderbotForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</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.31.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.31.0/src/transformers/models/blenderbot/modeling_blenderbot.py#L1244"}}),Bn=new I({props:{name:"forward",anchor:"transformers.BlenderbotForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple, transformers.modeling_outputs.BaseModelOutput, NoneType] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = 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.BlenderbotForConditionalGeneration.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Blenderbot uses the <code>bos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.BlenderbotForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.BlenderbotForConditionalGeneration.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlenderbotForConditionalGeneration.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.31.0/src/transformers/models/blenderbot/modeling_blenderbot.py#L1299",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</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.31.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),co=new yt({props:{$$slots:{default:[wm]},$$scope:{ctx:j}}}),po=new Be({props:{anchor:"transformers.BlenderbotForConditionalGeneration.forward.example",$$slots:{default:[Mm]},$$scope:{ctx:j}}}),$n=new ke({}),jn=new I({props:{name:"class transformers.BlenderbotForCausalLM",anchor:"transformers.BlenderbotForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/blenderbot/modeling_blenderbot.py#L1435"}}),Fn=new I({props:{name:"forward",anchor:"transformers.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.BlenderbotForCausalLM.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.31.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.31.0/src/transformers/models/blenderbot/modeling_blenderbot.py#L1468",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</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.31.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mo=new Be({props:{anchor:"transformers.BlenderbotForCausalLM.forward.example",$$slots:{default:[Bm]},$$scope:{ctx:j}}}),xn=new ke({}),zn=new I({props:{name:"class transformers.TFBlenderbotModel",anchor:"transformers.TFBlenderbotModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlenderbotModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</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.31.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.31.0/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1122"}}),go=new yt({props:{$$slots:{default:[$m]},$$scope:{ctx:j}}}),qn=new I({props:{name:"call",anchor:"transformers.TFBlenderbotModel.call",parameters:[{name:"input_ids",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_input_ids",val:": tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_position_ids",val:": tf.Tensor | None = None"},{name:"head_mask",val:": tf.Tensor | None = None"},{name:"decoder_head_mask",val:": tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": tf.Tensor | None = None"},{name:"encoder_outputs",val:": Optional[Union[Tuple, TFBaseModelOutput]] = None"},{name:"past_key_values",val:": List[tf.Tensor] | None = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"decoder_inputs_embeds",val:": tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlenderbotModel.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.TFBlenderbotModel.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.TFBlenderbotModel.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Blenderbot uses the <code>bos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFBlenderbotModel.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.TFBlenderbotModel.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.TFBlenderbotModel.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.TFBlenderbotModel.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.TFBlenderbotModel.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.TFBlenderbotModel.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.TFBlenderbotModel.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.TFBlenderbotModel.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.TFBlenderbotModel.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.TFBlenderbotModel.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.TFBlenderbotModel.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.31.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.TFBlenderbotModel.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.31.0/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1150",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</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.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),_o=new yt({props:{$$slots:{default:[jm]},$$scope:{ctx:j}}}),bo=new Be({props:{anchor:"transformers.TFBlenderbotModel.call.example",$$slots:{default:[Fm]},$$scope:{ctx:j}}}),Un=new ke({}),In=new I({props:{name:"class transformers.TFBlenderbotForConditionalGeneration",anchor:"transformers.TFBlenderbotForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlenderbotForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</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.31.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.31.0/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1243"}}),vo=new yt({props:{$$slots:{default:[xm]},$$scope:{ctx:j}}}),Nn=new I({props:{name:"call",anchor:"transformers.TFBlenderbotForConditionalGeneration.call",parameters:[{name:"input_ids",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_input_ids",val:": tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_position_ids",val:": tf.Tensor | None = None"},{name:"head_mask",val:": tf.Tensor | None = None"},{name:"decoder_head_mask",val:": tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": tf.Tensor | None = None"},{name:"encoder_outputs",val:": Optional[Union[Tuple, TFBaseModelOutput]] = None"},{name:"past_key_values",val:": List[tf.Tensor] | None = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"decoder_inputs_embeds",val:": tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBlenderbotForConditionalGeneration.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Blenderbot uses the <code>bos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.31.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.TFBlenderbotForConditionalGeneration.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.TFBlenderbotForConditionalGeneration.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.31.0/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1297",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</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.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ko=new yt({props:{$$slots:{default:[zm]},$$scope:{ctx:j}}}),To=new Be({props:{anchor:"transformers.TFBlenderbotForConditionalGeneration.call.example",$$slots:{default:[Jm]},$$scope:{ctx:j}}}),Vn=new ke({}),Rn=new I({props:{name:"class transformers.FlaxBlenderbotModel",anchor:"transformers.FlaxBlenderbotModel",parameters:[{name:"config",val:": BlenderbotConfig"},{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.FlaxBlenderbotModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</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.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1217"}}),Dn=new I({props:{name:"__call__",anchor:"transformers.FlaxBlenderbotModel.__call__",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotModel.__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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxBlenderbotModel.__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.FlaxBlenderbotModel.__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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxBlenderbotModel.__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.FlaxBlenderbotModel.__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.FlaxBlenderbotModel.__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.FlaxBlenderbotModel.__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.FlaxBlenderbotModel.__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.FlaxBlenderbotModel.__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.31.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.31.0/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1152",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mo=new yt({props:{$$slots:{default:[Em]},$$scope:{ctx:j}}}),Bo=new Be({props:{anchor:"transformers.FlaxBlenderbotModel.__call__.example",$$slots:{default:[Cm]},$$scope:{ctx:j}}}),Ln=new I({props:{name:"encode",anchor:"transformers.FlaxBlenderbotModel.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotModel.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.31.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.31.0/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L973",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.blenderbot.configuration_blenderbot.BlenderbotConfig'&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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),jo=new Be({props:{anchor:"transformers.FlaxBlenderbotModel.encode.example",$$slots:{default:[qm]},$$scope:{ctx:j}}}),Yn=new I({props:{name:"decode",anchor:"transformers.FlaxBlenderbotModel.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = None"},{name:"past_key_values",val:": dict = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotModel.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.FlaxBlenderbotModel.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.31.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.31.0/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1036",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.blenderbot.configuration_blenderbot.BlenderbotConfig'&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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xo=new Be({props:{anchor:"transformers.FlaxBlenderbotModel.decode.example",$$slots:{default:[Um]},$$scope:{ctx:j}}}),Kn=new ke({}),es=new I({props:{name:"class transformers.FlaxBlenderbotForConditionalGeneration",anchor:"transformers.FlaxBlenderbotForConditionalGeneration",parameters:[{name:"config",val:": BlenderbotConfig"},{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.FlaxBlenderbotForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</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.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1302"}}),ls=new I({props:{name:"__call__",anchor:"transformers.FlaxBlenderbotForConditionalGeneration.__call__",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.__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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxBlenderbotForConditionalGeneration.__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.FlaxBlenderbotForConditionalGeneration.__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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxBlenderbotForConditionalGeneration.__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.FlaxBlenderbotForConditionalGeneration.__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.FlaxBlenderbotForConditionalGeneration.__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.FlaxBlenderbotForConditionalGeneration.__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.FlaxBlenderbotForConditionalGeneration.__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.FlaxBlenderbotForConditionalGeneration.__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.31.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.31.0/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1152",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jo=new yt({props:{$$slots:{default:[Im]},$$scope:{ctx:j}}}),Eo=new Be({props:{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.__call__.example",$$slots:{default:[Zm]},$$scope:{ctx:j}}}),is=new I({props:{name:"encode",anchor:"transformers.FlaxBlenderbotForConditionalGeneration.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.31.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.31.0/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L973",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.blenderbot.configuration_blenderbot.BlenderbotConfig'&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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qo=new Be({props:{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.encode.example",$$slots:{default:[Gm]},$$scope:{ctx:j}}}),cs=new I({props:{name:"decode",anchor:"transformers.FlaxBlenderbotForConditionalGeneration.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = None"},{name:"past_key_values",val:": dict = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.FlaxBlenderbotForConditionalGeneration.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.31.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.31.0/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1306",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.blenderbot.configuration_blenderbot.BlenderbotConfig'&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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Io=new Be({props:{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.decode.example",$$slots:{default:[Wm]},$$scope:{ctx:j}}}),{c(){i=s("meta"),y=p(),f=s("h1"),u=s("a"),b=s("span"),v(n.$$.fragment),c=p(),F=s("span"),D=d("Blenderbot"),Z=p(),q=s("p"),Y=s("strong"),je=d("DISCLAIMER:"),x=d(" If you see something strange, file a "),ie=s("a"),ce=d("Github Issue"),Ke=d(" ."),Re=p(),G=s("h2"),K=s("a"),Fe=s("span"),v(H.$$.fragment),et=p(),xe=s("span"),pe=d("Overview"),Ae=p(),ee=s("p"),he=d("The Blender chatbot model was proposed in "),ue=s("a"),tt=d("Recipes for building an open-domain chatbot"),ze=d(` Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu,
Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston on 30 Apr 2020.`),E=p(),U=s("p"),ot=d("The abstract of the paper is the following:"),te=p(),we=s("p"),Je=s("em"),me=d(`Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that
scaling neural models in the number of parameters and the size of the data they are trained on gives improved results,
we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of
skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to
their partners, and displaying knowledge, empathy and personality appropriately, while maintaining a consistent
persona. We show that large scale models can learn these skills when given appropriate training data and choice of
generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter models, and make our models
and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn
dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing
failure cases of our models.`),Xe=p(),Me=s("p"),W=d("Tips:"),Se=p(),O=s("ul"),Ee=s("li"),nt=d(`Blenderbot is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),oe=p(),Q=s("p"),st=d("This model was contributed by "),N=s("a"),at=d("sshleifer"),fe=d(". The authors\u2019 code can be found "),ge=s("a"),Ce=d("here"),V=d(" ."),Pe=p(),C=s("h2"),ne=s("a"),qe=s("span"),v($.$$.fragment),z=p(),rt=s("span"),Ue=d("Implementation Notes"),ut=p(),se=s("ul"),J=s("li"),vt=d("Blenderbot uses a standard "),Ie=s("a"),kt=d("seq2seq model transformer"),Tt=d(" based architecture."),wt=p(),R=s("li"),_e=d("Available checkpoints can be found in the "),Ze=s("a"),Mt=d("model hub"),be=d("."),Bt=p(),L=s("li"),dt=d("This is the "),lt=s("em"),Ge=d("default"),$t=d(` Blenderbot model class. However, some smaller checkpoints, such as
`),Ys=s("code"),Id=d("facebook/blenderbot_small_90M"),Zd=d(`, have a different architecture and consequently should be used with
`),_s=s("a"),Gd=d("BlenderbotSmall"),Wd=d("."),Br=p(),jt=s("h2"),Qt=s("a"),Ks=s("span"),v(Do.$$.fragment),Nd=p(),ea=s("span"),Vd=d("Usage"),$r=p(),bs=s("p"),Rd=d("Here is an example of model usage:"),jr=p(),v(Lo.$$.fragment),Fr=p(),Ft=s("h2"),Dt=s("a"),ta=s("span"),v(Yo.$$.fragment),Ad=p(),oa=s("span"),Xd=d("Documentation resources"),xr=p(),mt=s("ul"),na=s("li"),ys=s("a"),Sd=d("Causal language modeling task guide"),Pd=p(),sa=s("li"),vs=s("a"),Hd=d("Translation task guide"),Od=p(),aa=s("li"),ks=s("a"),Qd=d("Summarization task guide"),zr=p(),xt=s("h2"),Lt=s("a"),ra=s("span"),v(Ko.$$.fragment),Dd=p(),da=s("span"),Ld=d("BlenderbotConfig"),Jr=p(),We=s("div"),v(en.$$.fragment),Yd=p(),zt=s("p"),Kd=d("This is the configuration class to store the configuration of a "),Ts=s("a"),el=d("BlenderbotModel"),tl=d(`. It is used to instantiate an
Blenderbot 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 Blenderbot
`),tn=s("a"),ol=d("facebook/blenderbot-3B"),nl=d(" architecture."),sl=p(),Jt=s("p"),al=d("Configuration objects inherit from "),ws=s("a"),rl=d("PretrainedConfig"),dl=d(` and can be used to control the model outputs. Read the
documentation from `),Ms=s("a"),ll=d("PretrainedConfig"),il=d(" for more information."),cl=p(),v(Yt.$$.fragment),Er=p(),Et=s("h2"),Kt=s("a"),la=s("span"),v(on.$$.fragment),pl=p(),ia=s("span"),hl=d("BlenderbotTokenizer"),Cr=p(),A=s("div"),v(nn.$$.fragment),ul=p(),ca=s("p"),ml=d("Constructs a Blenderbot tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),fl=p(),pa=s("p"),gl=d("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),_l=p(),v(eo.$$.fragment),bl=p(),sn=s("p"),yl=d("You can get around that behavior by passing "),ha=s("code"),vl=d("add_prefix_space=True"),kl=d(` 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.`),Tl=p(),v(to.$$.fragment),wl=p(),an=s("p"),Ml=d("This tokenizer inherits from "),Bs=s("a"),Bl=d("PreTrainedTokenizer"),$l=d(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),jl=p(),ft=s("div"),v(rn.$$.fragment),Fl=p(),ua=s("p"),xl=d(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Blenderbot sequence has the following format:`),zl=p(),ma=s("ul"),$s=s("li"),Jl=d("single sequence: "),fa=s("code"),El=d("X </s>"),qr=p(),Ct=s("h2"),oo=s("a"),ga=s("span"),v(dn.$$.fragment),Cl=p(),_a=s("span"),ql=d("BlenderbotTokenizerFast"),Ur=p(),X=s("div"),v(ln.$$.fragment),Ul=p(),cn=s("p"),Il=d("Construct a \u201Cfast\u201D Blenderbot tokenizer (backed by HuggingFace\u2019s "),ba=s("em"),Zl=d("tokenizers"),Gl=d(` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),Wl=p(),ya=s("p"),Nl=d("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Vl=p(),v(no.$$.fragment),Rl=p(),pn=s("p"),Al=d("You can get around that behavior by passing "),va=s("code"),Xl=d("add_prefix_space=True"),Sl=d(` 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.`),Pl=p(),v(so.$$.fragment),Hl=p(),hn=s("p"),Ol=d("This tokenizer inherits from "),js=s("a"),Ql=d("PreTrainedTokenizerFast"),Dl=d(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ll=p(),gt=s("div"),v(un.$$.fragment),Yl=p(),ka=s("p"),Kl=d(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Blenderbot sequence has the following format:`),ei=p(),Ta=s("ul"),Fs=s("li"),ti=d("single sequence: "),wa=s("code"),oi=d("X </s>"),Ir=p(),qt=s("h2"),ao=s("a"),Ma=s("span"),v(mn.$$.fragment),ni=p(),Ba=s("span"),si=d("BlenderbotModel"),Zr=p(),it=s("p"),ai=d("See "),$a=s("code"),ri=d("transformers.BartModel"),di=d(" for arguments to "),ja=s("em"),li=d("forward"),ii=d(" and "),Fa=s("em"),ci=d("generate"),Gr=p(),Ne=s("div"),v(fn.$$.fragment),pi=p(),gn=s("p"),hi=d(`The bare Blenderbot Model outputting raw hidden-states without any specific head on top.
This model inherits from `),xs=s("a"),ui=d("PreTrainedModel"),mi=d(`. 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.)`),fi=p(),_n=s("p"),gi=d("This model is also a PyTorch "),bn=s("a"),_i=d("torch.nn.Module"),bi=d(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),yi=p(),He=s("div"),v(yn.$$.fragment),vi=p(),Ut=s("p"),ki=d("The "),zs=s("a"),Ti=d("BlenderbotModel"),wi=d(" forward method, overrides the "),xa=s("code"),Mi=d("__call__"),Bi=d(" special method."),$i=p(),v(ro.$$.fragment),ji=p(),v(lo.$$.fragment),Wr=p(),It=s("h2"),io=s("a"),za=s("span"),v(vn.$$.fragment),Fi=p(),Ja=s("span"),xi=d("BlenderbotForConditionalGeneration"),Nr=p(),ct=s("p"),zi=d("See "),Js=s("a"),Ji=d("BartForConditionalGeneration"),Ei=d(" for arguments to "),Ea=s("em"),Ci=d("forward"),qi=d(" and "),Ca=s("em"),Ui=d("generate"),Vr=p(),Ve=s("div"),v(kn.$$.fragment),Ii=p(),Tn=s("p"),Zi=d(`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Es=s("a"),Gi=d("PreTrainedModel"),Wi=d(`. 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.)`),Ni=p(),wn=s("p"),Vi=d("This model is also a PyTorch "),Mn=s("a"),Ri=d("torch.nn.Module"),Ai=d(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xi=p(),Oe=s("div"),v(Bn.$$.fragment),Si=p(),Zt=s("p"),Pi=d("The "),Cs=s("a"),Hi=d("BlenderbotForConditionalGeneration"),Oi=d(" forward method, overrides the "),qa=s("code"),Qi=d("__call__"),Di=d(" special method."),Li=p(),v(co.$$.fragment),Yi=p(),v(po.$$.fragment),Rr=p(),Gt=s("h2"),ho=s("a"),Ua=s("span"),v($n.$$.fragment),Ki=p(),Ia=s("span"),ec=d("BlenderbotForCausalLM"),Ar=p(),Wt=s("div"),v(jn.$$.fragment),tc=p(),uo=s("div"),v(Fn.$$.fragment),oc=p(),v(mo.$$.fragment),Xr=p(),Nt=s("h2"),fo=s("a"),Za=s("span"),v(xn.$$.fragment),nc=p(),Ga=s("span"),sc=d("TFBlenderbotModel"),Sr=p(),ye=s("div"),v(zn.$$.fragment),ac=p(),Jn=s("p"),rc=d(`The bare BLENDERBOT Model outputting raw hidden-states without any specific head on top.
This model inherits from `),qs=s("a"),dc=d("TFPreTrainedModel"),lc=d(`. 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.)`),ic=p(),En=s("p"),cc=d("This model is also a "),Cn=s("a"),pc=d("tf.keras.Model"),hc=d(` 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.`),uc=p(),v(go.$$.fragment),mc=p(),Qe=s("div"),v(qn.$$.fragment),fc=p(),Vt=s("p"),gc=d("The "),Us=s("a"),_c=d("TFBlenderbotModel"),bc=d(" forward method, overrides the "),Wa=s("code"),yc=d("__call__"),vc=d(" special method."),kc=p(),v(_o.$$.fragment),Tc=p(),v(bo.$$.fragment),Pr=p(),Rt=s("h2"),yo=s("a"),Na=s("span"),v(Un.$$.fragment),wc=p(),Va=s("span"),Mc=d("TFBlenderbotForConditionalGeneration"),Hr=p(),ve=s("div"),v(In.$$.fragment),Bc=p(),Zn=s("p"),$c=d(`The BLENDERBOT Model with a language modeling head. Can be used for summarization.
This model inherits from `),Is=s("a"),jc=d("TFPreTrainedModel"),Fc=d(`. 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.)`),xc=p(),Gn=s("p"),zc=d("This model is also a "),Wn=s("a"),Jc=d("tf.keras.Model"),Ec=d(` 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.`),Cc=p(),v(vo.$$.fragment),qc=p(),De=s("div"),v(Nn.$$.fragment),Uc=p(),At=s("p"),Ic=d("The "),Zs=s("a"),Zc=d("TFBlenderbotForConditionalGeneration"),Gc=d(" forward method, overrides the "),Ra=s("code"),Wc=d("__call__"),Nc=d(" special method."),Vc=p(),v(ko.$$.fragment),Rc=p(),v(To.$$.fragment),Or=p(),Xt=s("h2"),wo=s("a"),Aa=s("span"),v(Vn.$$.fragment),Ac=p(),Xa=s("span"),Xc=d("FlaxBlenderbotModel"),Qr=p(),S=s("div"),v(Rn.$$.fragment),Sc=p(),An=s("p"),Pc=d(`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Gs=s("a"),Hc=d("FlaxPreTrainedModel"),Oc=d(`. 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.)`),Qc=p(),Xn=s("p"),Dc=d(`This model is also a Flax Linen
`),Sn=s("a"),Lc=d("flax.nn.Module"),Yc=d(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Kc=p(),Sa=s("p"),ep=d("Finally, this model supports inherent JAX features such as:"),tp=p(),pt=s("ul"),Pa=s("li"),Pn=s("a"),op=d("Just-In-Time (JIT) compilation"),np=p(),Ha=s("li"),Hn=s("a"),sp=d("Automatic Differentiation"),ap=p(),Oa=s("li"),On=s("a"),rp=d("Vectorization"),dp=p(),Qa=s("li"),Qn=s("a"),lp=d("Parallelization"),ip=p(),Le=s("div"),v(Dn.$$.fragment),cp=p(),St=s("p"),pp=d("The "),Da=s("code"),hp=d("FlaxBlenderbotPreTrainedModel"),up=d(" forward method, overrides the "),La=s("code"),mp=d("__call__"),fp=d(" special method."),gp=p(),v(Mo.$$.fragment),_p=p(),v(Bo.$$.fragment),bp=p(),$o=s("div"),v(Ln.$$.fragment),yp=p(),v(jo.$$.fragment),vp=p(),Fo=s("div"),v(Yn.$$.fragment),kp=p(),v(xo.$$.fragment),Dr=p(),Pt=s("h2"),zo=s("a"),Ya=s("span"),v(Kn.$$.fragment),Tp=p(),Ka=s("span"),wp=d("FlaxBlenderbotForConditionalGeneration"),Lr=p(),P=s("div"),v(es.$$.fragment),Mp=p(),ts=s("p"),Bp=d(`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Ws=s("a"),$p=d("FlaxPreTrainedModel"),jp=d(`. 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.)`),Fp=p(),os=s("p"),xp=d(`This model is also a Flax Linen
`),ns=s("a"),zp=d("flax.nn.Module"),Jp=d(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Ep=p(),er=s("p"),Cp=d("Finally, this model supports inherent JAX features such as:"),qp=p(),ht=s("ul"),tr=s("li"),ss=s("a"),Up=d("Just-In-Time (JIT) compilation"),Ip=p(),or=s("li"),as=s("a"),Zp=d("Automatic Differentiation"),Gp=p(),nr=s("li"),rs=s("a"),Wp=d("Vectorization"),Np=p(),sr=s("li"),ds=s("a"),Vp=d("Parallelization"),Rp=p(),Ye=s("div"),v(ls.$$.fragment),Ap=p(),Ht=s("p"),Xp=d("The "),ar=s("code"),Sp=d("FlaxBlenderbotPreTrainedModel"),Pp=d(" forward method, overrides the "),rr=s("code"),Hp=d("__call__"),Op=d(" special method."),Qp=p(),v(Jo.$$.fragment),Dp=p(),v(Eo.$$.fragment),Lp=p(),Co=s("div"),v(is.$$.fragment),Yp=p(),v(qo.$$.fragment),Kp=p(),Uo=s("div"),v(cs.$$.fragment),eh=p(),v(Io.$$.fragment),this.h()},l(o){const _=mm('[data-svelte="svelte-1phssyn"]',document.head);i=a(_,"META",{name:!0,content:!0}),_.forEach(t),y=h(o),f=a(o,"H1",{class:!0});var ps=r(f);u=a(ps,"A",{id:!0,class:!0,href:!0});var dr=r(u);b=a(dr,"SPAN",{});var lr=r(b);k(n.$$.fragment,lr),lr.forEach(t),dr.forEach(t),c=h(ps),F=a(ps,"SPAN",{});var ir=r(F);D=l(ir,"Blenderbot"),ir.forEach(t),ps.forEach(t),Z=h(o),q=a(o,"P",{});var Zo=r(q);Y=a(Zo,"STRONG",{});var cr=r(Y);je=l(cr,"DISCLAIMER:"),cr.forEach(t),x=l(Zo," If you see something strange, file a "),ie=a(Zo,"A",{href:!0,rel:!0});var pr=r(ie);ce=l(pr,"Github Issue"),pr.forEach(t),Ke=l(Zo," ."),Zo.forEach(t),Re=h(o),G=a(o,"H2",{class:!0});var hs=r(G);K=a(hs,"A",{id:!0,class:!0,href:!0});var hr=r(K);Fe=a(hr,"SPAN",{});var ur=r(Fe);k(H.$$.fragment,ur),ur.forEach(t),hr.forEach(t),et=h(hs),xe=a(hs,"SPAN",{});var mr=r(xe);pe=l(mr,"Overview"),mr.forEach(t),hs.forEach(t),Ae=h(o),ee=a(o,"P",{});var us=r(ee);he=l(us,"The Blender chatbot model was proposed in "),ue=a(us,"A",{href:!0,rel:!0});var fr=r(ue);tt=l(fr,"Recipes for building an open-domain chatbot"),fr.forEach(t),ze=l(us,` Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu,
Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston on 30 Apr 2020.`),us.forEach(t),E=h(o),U=a(o,"P",{});var gr=r(U);ot=l(gr,"The abstract of the paper is the following:"),gr.forEach(t),te=h(o),we=a(o,"P",{});var _r=r(we);Je=a(_r,"EM",{});var br=r(Je);me=l(br,`Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that
scaling neural models in the number of parameters and the size of the data they are trained on gives improved results,
we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of
skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to
their partners, and displaying knowledge, empathy and personality appropriately, while maintaining a consistent
persona. We show that large scale models can learn these skills when given appropriate training data and choice of
generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter models, and make our models
and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn
dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing
failure cases of our models.`),br.forEach(t),_r.forEach(t),Xe=h(o),Me=a(o,"P",{});var yr=r(Me);W=l(yr,"Tips:"),yr.forEach(t),Se=h(o),O=a(o,"UL",{});var vr=r(O);Ee=a(vr,"LI",{});var kr=r(Ee);nt=l(kr,`Blenderbot is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),kr.forEach(t),vr.forEach(t),oe=h(o),Q=a(o,"P",{});var Ot=r(Q);st=l(Ot,"This model was contributed by "),N=a(Ot,"A",{href:!0,rel:!0});var Tr=r(N);at=l(Tr,"sshleifer"),Tr.forEach(t),fe=l(Ot,". The authors\u2019 code can be found "),ge=a(Ot,"A",{href:!0,rel:!0});var wr=r(ge);Ce=l(wr,"here"),wr.forEach(t),V=l(Ot," ."),Ot.forEach(t),Pe=h(o),C=a(o,"H2",{class:!0});var ms=r(C);ne=a(ms,"A",{id:!0,class:!0,href:!0});var Mr=r(ne);qe=a(Mr,"SPAN",{});var nh=r(qe);k($.$$.fragment,nh),nh.forEach(t),Mr.forEach(t),z=h(ms),rt=a(ms,"SPAN",{});var sh=r(rt);Ue=l(sh,"Implementation Notes"),sh.forEach(t),ms.forEach(t),ut=h(o),se=a(o,"UL",{});var Ns=r(se);J=a(Ns,"LI",{});var Kr=r(J);vt=l(Kr,"Blenderbot uses a standard "),Ie=a(Kr,"A",{href:!0,rel:!0});var ah=r(Ie);kt=l(ah,"seq2seq model transformer"),ah.forEach(t),Tt=l(Kr," based architecture."),Kr.forEach(t),wt=h(Ns),R=a(Ns,"LI",{});var ed=r(R);_e=l(ed,"Available checkpoints can be found in the "),Ze=a(ed,"A",{href:!0,rel:!0});var rh=r(Ze);Mt=l(rh,"model hub"),rh.forEach(t),be=l(ed,"."),ed.forEach(t),Bt=h(Ns),L=a(Ns,"LI",{});var Go=r(L);dt=l(Go,"This is the "),lt=a(Go,"EM",{});var dh=r(lt);Ge=l(dh,"default"),dh.forEach(t),$t=l(Go,` Blenderbot model class. However, some smaller checkpoints, such as
`),Ys=a(Go,"CODE",{});var lh=r(Ys);Id=l(lh,"facebook/blenderbot_small_90M"),lh.forEach(t),Zd=l(Go,`, have a different architecture and consequently should be used with
`),_s=a(Go,"A",{href:!0});var ih=r(_s);Gd=l(ih,"BlenderbotSmall"),ih.forEach(t),Wd=l(Go,"."),Go.forEach(t),Ns.forEach(t),Br=h(o),jt=a(o,"H2",{class:!0});var td=r(jt);Qt=a(td,"A",{id:!0,class:!0,href:!0});var ch=r(Qt);Ks=a(ch,"SPAN",{});var ph=r(Ks);k(Do.$$.fragment,ph),ph.forEach(t),ch.forEach(t),Nd=h(td),ea=a(td,"SPAN",{});var hh=r(ea);Vd=l(hh,"Usage"),hh.forEach(t),td.forEach(t),$r=h(o),bs=a(o,"P",{});var uh=r(bs);Rd=l(uh,"Here is an example of model usage:"),uh.forEach(t),jr=h(o),k(Lo.$$.fragment,o),Fr=h(o),Ft=a(o,"H2",{class:!0});var od=r(Ft);Dt=a(od,"A",{id:!0,class:!0,href:!0});var mh=r(Dt);ta=a(mh,"SPAN",{});var fh=r(ta);k(Yo.$$.fragment,fh),fh.forEach(t),mh.forEach(t),Ad=h(od),oa=a(od,"SPAN",{});var gh=r(oa);Xd=l(gh,"Documentation resources"),gh.forEach(t),od.forEach(t),xr=h(o),mt=a(o,"UL",{});var Vs=r(mt);na=a(Vs,"LI",{});var _h=r(na);ys=a(_h,"A",{href:!0});var bh=r(ys);Sd=l(bh,"Causal language modeling task guide"),bh.forEach(t),_h.forEach(t),Pd=h(Vs),sa=a(Vs,"LI",{});var yh=r(sa);vs=a(yh,"A",{href:!0});var vh=r(vs);Hd=l(vh,"Translation task guide"),vh.forEach(t),yh.forEach(t),Od=h(Vs),aa=a(Vs,"LI",{});var kh=r(aa);ks=a(kh,"A",{href:!0});var Th=r(ks);Qd=l(Th,"Summarization task guide"),Th.forEach(t),kh.forEach(t),Vs.forEach(t),zr=h(o),xt=a(o,"H2",{class:!0});var nd=r(xt);Lt=a(nd,"A",{id:!0,class:!0,href:!0});var wh=r(Lt);ra=a(wh,"SPAN",{});var Mh=r(ra);k(Ko.$$.fragment,Mh),Mh.forEach(t),wh.forEach(t),Dd=h(nd),da=a(nd,"SPAN",{});var Bh=r(da);Ld=l(Bh,"BlenderbotConfig"),Bh.forEach(t),nd.forEach(t),Jr=h(o),We=a(o,"DIV",{class:!0});var Wo=r(We);k(en.$$.fragment,Wo),Yd=h(Wo),zt=a(Wo,"P",{});var Rs=r(zt);Kd=l(Rs,"This is the configuration class to store the configuration of a "),Ts=a(Rs,"A",{href:!0});var $h=r(Ts);el=l($h,"BlenderbotModel"),$h.forEach(t),tl=l(Rs,`. It is used to instantiate an
Blenderbot 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 Blenderbot
`),tn=a(Rs,"A",{href:!0,rel:!0});var jh=r(tn);ol=l(jh,"facebook/blenderbot-3B"),jh.forEach(t),nl=l(Rs," architecture."),Rs.forEach(t),sl=h(Wo),Jt=a(Wo,"P",{});var As=r(Jt);al=l(As,"Configuration objects inherit from "),ws=a(As,"A",{href:!0});var Fh=r(ws);rl=l(Fh,"PretrainedConfig"),Fh.forEach(t),dl=l(As,` and can be used to control the model outputs. Read the
documentation from `),Ms=a(As,"A",{href:!0});var xh=r(Ms);ll=l(xh,"PretrainedConfig"),xh.forEach(t),il=l(As," for more information."),As.forEach(t),cl=h(Wo),k(Yt.$$.fragment,Wo),Wo.forEach(t),Er=h(o),Et=a(o,"H2",{class:!0});var sd=r(Et);Kt=a(sd,"A",{id:!0,class:!0,href:!0});var zh=r(Kt);la=a(zh,"SPAN",{});var Jh=r(la);k(on.$$.fragment,Jh),Jh.forEach(t),zh.forEach(t),pl=h(sd),ia=a(sd,"SPAN",{});var Eh=r(ia);hl=l(Eh,"BlenderbotTokenizer"),Eh.forEach(t),sd.forEach(t),Cr=h(o),A=a(o,"DIV",{class:!0});var ae=r(A);k(nn.$$.fragment,ae),ul=h(ae),ca=a(ae,"P",{});var Ch=r(ca);ml=l(Ch,"Constructs a Blenderbot tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),Ch.forEach(t),fl=h(ae),pa=a(ae,"P",{});var qh=r(pa);gl=l(qh,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),qh.forEach(t),_l=h(ae),k(eo.$$.fragment,ae),bl=h(ae),sn=a(ae,"P",{});var ad=r(sn);yl=l(ad,"You can get around that behavior by passing "),ha=a(ad,"CODE",{});var Uh=r(ha);vl=l(Uh,"add_prefix_space=True"),Uh.forEach(t),kl=l(ad,` 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.`),ad.forEach(t),Tl=h(ae),k(to.$$.fragment,ae),wl=h(ae),an=a(ae,"P",{});var rd=r(an);Ml=l(rd,"This tokenizer inherits from "),Bs=a(rd,"A",{href:!0});var Ih=r(Bs);Bl=l(Ih,"PreTrainedTokenizer"),Ih.forEach(t),$l=l(rd,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),rd.forEach(t),jl=h(ae),ft=a(ae,"DIV",{class:!0});var Xs=r(ft);k(rn.$$.fragment,Xs),Fl=h(Xs),ua=a(Xs,"P",{});var Zh=r(ua);xl=l(Zh,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Blenderbot sequence has the following format:`),Zh.forEach(t),zl=h(Xs),ma=a(Xs,"UL",{});var Gh=r(ma);$s=a(Gh,"LI",{});var th=r($s);Jl=l(th,"single sequence: "),fa=a(th,"CODE",{});var Wh=r(fa);El=l(Wh,"X </s>"),Wh.forEach(t),th.forEach(t),Gh.forEach(t),Xs.forEach(t),ae.forEach(t),qr=h(o),Ct=a(o,"H2",{class:!0});var dd=r(Ct);oo=a(dd,"A",{id:!0,class:!0,href:!0});var Nh=r(oo);ga=a(Nh,"SPAN",{});var Vh=r(ga);k(dn.$$.fragment,Vh),Vh.forEach(t),Nh.forEach(t),Cl=h(dd),_a=a(dd,"SPAN",{});var Rh=r(_a);ql=l(Rh,"BlenderbotTokenizerFast"),Rh.forEach(t),dd.forEach(t),Ur=h(o),X=a(o,"DIV",{class:!0});var re=r(X);k(ln.$$.fragment,re),Ul=h(re),cn=a(re,"P",{});var ld=r(cn);Il=l(ld,"Construct a \u201Cfast\u201D Blenderbot tokenizer (backed by HuggingFace\u2019s "),ba=a(ld,"EM",{});var Ah=r(ba);Zl=l(Ah,"tokenizers"),Ah.forEach(t),Gl=l(ld,` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),ld.forEach(t),Wl=h(re),ya=a(re,"P",{});var Xh=r(ya);Nl=l(Xh,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Xh.forEach(t),Vl=h(re),k(no.$$.fragment,re),Rl=h(re),pn=a(re,"P",{});var id=r(pn);Al=l(id,"You can get around that behavior by passing "),va=a(id,"CODE",{});var Sh=r(va);Xl=l(Sh,"add_prefix_space=True"),Sh.forEach(t),Sl=l(id,` 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.`),id.forEach(t),Pl=h(re),k(so.$$.fragment,re),Hl=h(re),hn=a(re,"P",{});var cd=r(hn);Ol=l(cd,"This tokenizer inherits from "),js=a(cd,"A",{href:!0});var Ph=r(js);Ql=l(Ph,"PreTrainedTokenizerFast"),Ph.forEach(t),Dl=l(cd,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),cd.forEach(t),Ll=h(re),gt=a(re,"DIV",{class:!0});var Ss=r(gt);k(un.$$.fragment,Ss),Yl=h(Ss),ka=a(Ss,"P",{});var Hh=r(ka);Kl=l(Hh,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Blenderbot sequence has the following format:`),Hh.forEach(t),ei=h(Ss),Ta=a(Ss,"UL",{});var Oh=r(Ta);Fs=a(Oh,"LI",{});var oh=r(Fs);ti=l(oh,"single sequence: "),wa=a(oh,"CODE",{});var Qh=r(wa);oi=l(Qh,"X </s>"),Qh.forEach(t),oh.forEach(t),Oh.forEach(t),Ss.forEach(t),re.forEach(t),Ir=h(o),qt=a(o,"H2",{class:!0});var pd=r(qt);ao=a(pd,"A",{id:!0,class:!0,href:!0});var Dh=r(ao);Ma=a(Dh,"SPAN",{});var Lh=r(Ma);k(mn.$$.fragment,Lh),Lh.forEach(t),Dh.forEach(t),ni=h(pd),Ba=a(pd,"SPAN",{});var Yh=r(Ba);si=l(Yh,"BlenderbotModel"),Yh.forEach(t),pd.forEach(t),Zr=h(o),it=a(o,"P",{});var fs=r(it);ai=l(fs,"See "),$a=a(fs,"CODE",{});var Kh=r($a);ri=l(Kh,"transformers.BartModel"),Kh.forEach(t),di=l(fs," for arguments to "),ja=a(fs,"EM",{});var eu=r(ja);li=l(eu,"forward"),eu.forEach(t),ii=l(fs," and "),Fa=a(fs,"EM",{});var tu=r(Fa);ci=l(tu,"generate"),tu.forEach(t),fs.forEach(t),Gr=h(o),Ne=a(o,"DIV",{class:!0});var No=r(Ne);k(fn.$$.fragment,No),pi=h(No),gn=a(No,"P",{});var hd=r(gn);hi=l(hd,`The bare Blenderbot Model outputting raw hidden-states without any specific head on top.
This model inherits from `),xs=a(hd,"A",{href:!0});var ou=r(xs);ui=l(ou,"PreTrainedModel"),ou.forEach(t),mi=l(hd,`. 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.)`),hd.forEach(t),fi=h(No),_n=a(No,"P",{});var ud=r(_n);gi=l(ud,"This model is also a PyTorch "),bn=a(ud,"A",{href:!0,rel:!0});var nu=r(bn);_i=l(nu,"torch.nn.Module"),nu.forEach(t),bi=l(ud,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ud.forEach(t),yi=h(No),He=a(No,"DIV",{class:!0});var Vo=r(He);k(yn.$$.fragment,Vo),vi=h(Vo),Ut=a(Vo,"P",{});var Ps=r(Ut);ki=l(Ps,"The "),zs=a(Ps,"A",{href:!0});var su=r(zs);Ti=l(su,"BlenderbotModel"),su.forEach(t),wi=l(Ps," forward method, overrides the "),xa=a(Ps,"CODE",{});var au=r(xa);Mi=l(au,"__call__"),au.forEach(t),Bi=l(Ps," special method."),Ps.forEach(t),$i=h(Vo),k(ro.$$.fragment,Vo),ji=h(Vo),k(lo.$$.fragment,Vo),Vo.forEach(t),No.forEach(t),Wr=h(o),It=a(o,"H2",{class:!0});var md=r(It);io=a(md,"A",{id:!0,class:!0,href:!0});var ru=r(io);za=a(ru,"SPAN",{});var du=r(za);k(vn.$$.fragment,du),du.forEach(t),ru.forEach(t),Fi=h(md),Ja=a(md,"SPAN",{});var lu=r(Ja);xi=l(lu,"BlenderbotForConditionalGeneration"),lu.forEach(t),md.forEach(t),Nr=h(o),ct=a(o,"P",{});var gs=r(ct);zi=l(gs,"See "),Js=a(gs,"A",{href:!0});var iu=r(Js);Ji=l(iu,"BartForConditionalGeneration"),iu.forEach(t),Ei=l(gs," for arguments to "),Ea=a(gs,"EM",{});var cu=r(Ea);Ci=l(cu,"forward"),cu.forEach(t),qi=l(gs," and "),Ca=a(gs,"EM",{});var pu=r(Ca);Ui=l(pu,"generate"),pu.forEach(t),gs.forEach(t),Vr=h(o),Ve=a(o,"DIV",{class:!0});var Ro=r(Ve);k(kn.$$.fragment,Ro),Ii=h(Ro),Tn=a(Ro,"P",{});var fd=r(Tn);Zi=l(fd,`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Es=a(fd,"A",{href:!0});var hu=r(Es);Gi=l(hu,"PreTrainedModel"),hu.forEach(t),Wi=l(fd,`. 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.)`),fd.forEach(t),Ni=h(Ro),wn=a(Ro,"P",{});var gd=r(wn);Vi=l(gd,"This model is also a PyTorch "),Mn=a(gd,"A",{href:!0,rel:!0});var uu=r(Mn);Ri=l(uu,"torch.nn.Module"),uu.forEach(t),Ai=l(gd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),gd.forEach(t),Xi=h(Ro),Oe=a(Ro,"DIV",{class:!0});var Ao=r(Oe);k(Bn.$$.fragment,Ao),Si=h(Ao),Zt=a(Ao,"P",{});var Hs=r(Zt);Pi=l(Hs,"The "),Cs=a(Hs,"A",{href:!0});var mu=r(Cs);Hi=l(mu,"BlenderbotForConditionalGeneration"),mu.forEach(t),Oi=l(Hs," forward method, overrides the "),qa=a(Hs,"CODE",{});var fu=r(qa);Qi=l(fu,"__call__"),fu.forEach(t),Di=l(Hs," special method."),Hs.forEach(t),Li=h(Ao),k(co.$$.fragment,Ao),Yi=h(Ao),k(po.$$.fragment,Ao),Ao.forEach(t),Ro.forEach(t),Rr=h(o),Gt=a(o,"H2",{class:!0});var _d=r(Gt);ho=a(_d,"A",{id:!0,class:!0,href:!0});var gu=r(ho);Ua=a(gu,"SPAN",{});var _u=r(Ua);k($n.$$.fragment,_u),_u.forEach(t),gu.forEach(t),Ki=h(_d),Ia=a(_d,"SPAN",{});var bu=r(Ia);ec=l(bu,"BlenderbotForCausalLM"),bu.forEach(t),_d.forEach(t),Ar=h(o),Wt=a(o,"DIV",{class:!0});var bd=r(Wt);k(jn.$$.fragment,bd),tc=h(bd),uo=a(bd,"DIV",{class:!0});var yd=r(uo);k(Fn.$$.fragment,yd),oc=h(yd),k(mo.$$.fragment,yd),yd.forEach(t),bd.forEach(t),Xr=h(o),Nt=a(o,"H2",{class:!0});var vd=r(Nt);fo=a(vd,"A",{id:!0,class:!0,href:!0});var yu=r(fo);Za=a(yu,"SPAN",{});var vu=r(Za);k(xn.$$.fragment,vu),vu.forEach(t),yu.forEach(t),nc=h(vd),Ga=a(vd,"SPAN",{});var ku=r(Ga);sc=l(ku,"TFBlenderbotModel"),ku.forEach(t),vd.forEach(t),Sr=h(o),ye=a(o,"DIV",{class:!0});var _t=r(ye);k(zn.$$.fragment,_t),ac=h(_t),Jn=a(_t,"P",{});var kd=r(Jn);rc=l(kd,`The bare BLENDERBOT Model outputting raw hidden-states without any specific head on top.
This model inherits from `),qs=a(kd,"A",{href:!0});var Tu=r(qs);dc=l(Tu,"TFPreTrainedModel"),Tu.forEach(t),lc=l(kd,`. 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.)`),kd.forEach(t),ic=h(_t),En=a(_t,"P",{});var Td=r(En);cc=l(Td,"This model is also a "),Cn=a(Td,"A",{href:!0,rel:!0});var wu=r(Cn);pc=l(wu,"tf.keras.Model"),wu.forEach(t),hc=l(Td,` 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.`),Td.forEach(t),uc=h(_t),k(go.$$.fragment,_t),mc=h(_t),Qe=a(_t,"DIV",{class:!0});var Xo=r(Qe);k(qn.$$.fragment,Xo),fc=h(Xo),Vt=a(Xo,"P",{});var Os=r(Vt);gc=l(Os,"The "),Us=a(Os,"A",{href:!0});var Mu=r(Us);_c=l(Mu,"TFBlenderbotModel"),Mu.forEach(t),bc=l(Os," forward method, overrides the "),Wa=a(Os,"CODE",{});var Bu=r(Wa);yc=l(Bu,"__call__"),Bu.forEach(t),vc=l(Os," special method."),Os.forEach(t),kc=h(Xo),k(_o.$$.fragment,Xo),Tc=h(Xo),k(bo.$$.fragment,Xo),Xo.forEach(t),_t.forEach(t),Pr=h(o),Rt=a(o,"H2",{class:!0});var wd=r(Rt);yo=a(wd,"A",{id:!0,class:!0,href:!0});var $u=r(yo);Na=a($u,"SPAN",{});var ju=r(Na);k(Un.$$.fragment,ju),ju.forEach(t),$u.forEach(t),wc=h(wd),Va=a(wd,"SPAN",{});var Fu=r(Va);Mc=l(Fu,"TFBlenderbotForConditionalGeneration"),Fu.forEach(t),wd.forEach(t),Hr=h(o),ve=a(o,"DIV",{class:!0});var bt=r(ve);k(In.$$.fragment,bt),Bc=h(bt),Zn=a(bt,"P",{});var Md=r(Zn);$c=l(Md,`The BLENDERBOT Model with a language modeling head. Can be used for summarization.
This model inherits from `),Is=a(Md,"A",{href:!0});var xu=r(Is);jc=l(xu,"TFPreTrainedModel"),xu.forEach(t),Fc=l(Md,`. 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.)`),Md.forEach(t),xc=h(bt),Gn=a(bt,"P",{});var Bd=r(Gn);zc=l(Bd,"This model is also a "),Wn=a(Bd,"A",{href:!0,rel:!0});var zu=r(Wn);Jc=l(zu,"tf.keras.Model"),zu.forEach(t),Ec=l(Bd,` 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.`),Bd.forEach(t),Cc=h(bt),k(vo.$$.fragment,bt),qc=h(bt),De=a(bt,"DIV",{class:!0});var So=r(De);k(Nn.$$.fragment,So),Uc=h(So),At=a(So,"P",{});var Qs=r(At);Ic=l(Qs,"The "),Zs=a(Qs,"A",{href:!0});var Ju=r(Zs);Zc=l(Ju,"TFBlenderbotForConditionalGeneration"),Ju.forEach(t),Gc=l(Qs," forward method, overrides the "),Ra=a(Qs,"CODE",{});var Eu=r(Ra);Wc=l(Eu,"__call__"),Eu.forEach(t),Nc=l(Qs," special method."),Qs.forEach(t),Vc=h(So),k(ko.$$.fragment,So),Rc=h(So),k(To.$$.fragment,So),So.forEach(t),bt.forEach(t),Or=h(o),Xt=a(o,"H2",{class:!0});var $d=r(Xt);wo=a($d,"A",{id:!0,class:!0,href:!0});var Cu=r(wo);Aa=a(Cu,"SPAN",{});var qu=r(Aa);k(Vn.$$.fragment,qu),qu.forEach(t),Cu.forEach(t),Ac=h($d),Xa=a($d,"SPAN",{});var Uu=r(Xa);Xc=l(Uu,"FlaxBlenderbotModel"),Uu.forEach(t),$d.forEach(t),Qr=h(o),S=a(o,"DIV",{class:!0});var de=r(S);k(Rn.$$.fragment,de),Sc=h(de),An=a(de,"P",{});var jd=r(An);Pc=l(jd,`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Gs=a(jd,"A",{href:!0});var Iu=r(Gs);Hc=l(Iu,"FlaxPreTrainedModel"),Iu.forEach(t),Oc=l(jd,`. 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.)`),jd.forEach(t),Qc=h(de),Xn=a(de,"P",{});var Fd=r(Xn);Dc=l(Fd,`This model is also a Flax Linen
`),Sn=a(Fd,"A",{href:!0,rel:!0});var Zu=r(Sn);Lc=l(Zu,"flax.nn.Module"),Zu.forEach(t),Yc=l(Fd,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Fd.forEach(t),Kc=h(de),Sa=a(de,"P",{});var Gu=r(Sa);ep=l(Gu,"Finally, this model supports inherent JAX features such as:"),Gu.forEach(t),tp=h(de),pt=a(de,"UL",{});var Po=r(pt);Pa=a(Po,"LI",{});var Wu=r(Pa);Pn=a(Wu,"A",{href:!0,rel:!0});var Nu=r(Pn);op=l(Nu,"Just-In-Time (JIT) compilation"),Nu.forEach(t),Wu.forEach(t),np=h(Po),Ha=a(Po,"LI",{});var Vu=r(Ha);Hn=a(Vu,"A",{href:!0,rel:!0});var Ru=r(Hn);sp=l(Ru,"Automatic Differentiation"),Ru.forEach(t),Vu.forEach(t),ap=h(Po),Oa=a(Po,"LI",{});var Au=r(Oa);On=a(Au,"A",{href:!0,rel:!0});var Xu=r(On);rp=l(Xu,"Vectorization"),Xu.forEach(t),Au.forEach(t),dp=h(Po),Qa=a(Po,"LI",{});var Su=r(Qa);Qn=a(Su,"A",{href:!0,rel:!0});var Pu=r(Qn);lp=l(Pu,"Parallelization"),Pu.forEach(t),Su.forEach(t),Po.forEach(t),ip=h(de),Le=a(de,"DIV",{class:!0});var Ho=r(Le);k(Dn.$$.fragment,Ho),cp=h(Ho),St=a(Ho,"P",{});var Ds=r(St);pp=l(Ds,"The "),Da=a(Ds,"CODE",{});var Hu=r(Da);hp=l(Hu,"FlaxBlenderbotPreTrainedModel"),Hu.forEach(t),up=l(Ds," forward method, overrides the "),La=a(Ds,"CODE",{});var Ou=r(La);mp=l(Ou,"__call__"),Ou.forEach(t),fp=l(Ds," special method."),Ds.forEach(t),gp=h(Ho),k(Mo.$$.fragment,Ho),_p=h(Ho),k(Bo.$$.fragment,Ho),Ho.forEach(t),bp=h(de),$o=a(de,"DIV",{class:!0});var xd=r($o);k(Ln.$$.fragment,xd),yp=h(xd),k(jo.$$.fragment,xd),xd.forEach(t),vp=h(de),Fo=a(de,"DIV",{class:!0});var zd=r(Fo);k(Yn.$$.fragment,zd),kp=h(zd),k(xo.$$.fragment,zd),zd.forEach(t),de.forEach(t),Dr=h(o),Pt=a(o,"H2",{class:!0});var Jd=r(Pt);zo=a(Jd,"A",{id:!0,class:!0,href:!0});var Qu=r(zo);Ya=a(Qu,"SPAN",{});var Du=r(Ya);k(Kn.$$.fragment,Du),Du.forEach(t),Qu.forEach(t),Tp=h(Jd),Ka=a(Jd,"SPAN",{});var Lu=r(Ka);wp=l(Lu,"FlaxBlenderbotForConditionalGeneration"),Lu.forEach(t),Jd.forEach(t),Lr=h(o),P=a(o,"DIV",{class:!0});var le=r(P);k(es.$$.fragment,le),Mp=h(le),ts=a(le,"P",{});var Ed=r(ts);Bp=l(Ed,`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Ws=a(Ed,"A",{href:!0});var Yu=r(Ws);$p=l(Yu,"FlaxPreTrainedModel"),Yu.forEach(t),jp=l(Ed,`. 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.)`),Ed.forEach(t),Fp=h(le),os=a(le,"P",{});var Cd=r(os);xp=l(Cd,`This model is also a Flax Linen
`),ns=a(Cd,"A",{href:!0,rel:!0});var Ku=r(ns);zp=l(Ku,"flax.nn.Module"),Ku.forEach(t),Jp=l(Cd,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Cd.forEach(t),Ep=h(le),er=a(le,"P",{});var em=r(er);Cp=l(em,"Finally, this model supports inherent JAX features such as:"),em.forEach(t),qp=h(le),ht=a(le,"UL",{});var Oo=r(ht);tr=a(Oo,"LI",{});var tm=r(tr);ss=a(tm,"A",{href:!0,rel:!0});var om=r(ss);Up=l(om,"Just-In-Time (JIT) compilation"),om.forEach(t),tm.forEach(t),Ip=h(Oo),or=a(Oo,"LI",{});var nm=r(or);as=a(nm,"A",{href:!0,rel:!0});var sm=r(as);Zp=l(sm,"Automatic Differentiation"),sm.forEach(t),nm.forEach(t),Gp=h(Oo),nr=a(Oo,"LI",{});var am=r(nr);rs=a(am,"A",{href:!0,rel:!0});var rm=r(rs);Wp=l(rm,"Vectorization"),rm.forEach(t),am.forEach(t),Np=h(Oo),sr=a(Oo,"LI",{});var dm=r(sr);ds=a(dm,"A",{href:!0,rel:!0});var lm=r(ds);Vp=l(lm,"Parallelization"),lm.forEach(t),dm.forEach(t),Oo.forEach(t),Rp=h(le),Ye=a(le,"DIV",{class:!0});var Qo=r(Ye);k(ls.$$.fragment,Qo),Ap=h(Qo),Ht=a(Qo,"P",{});var Ls=r(Ht);Xp=l(Ls,"The "),ar=a(Ls,"CODE",{});var im=r(ar);Sp=l(im,"FlaxBlenderbotPreTrainedModel"),im.forEach(t),Pp=l(Ls," forward method, overrides the "),rr=a(Ls,"CODE",{});var cm=r(rr);Hp=l(cm,"__call__"),cm.forEach(t),Op=l(Ls," special method."),Ls.forEach(t),Qp=h(Qo),k(Jo.$$.fragment,Qo),Dp=h(Qo),k(Eo.$$.fragment,Qo),Qo.forEach(t),Lp=h(le),Co=a(le,"DIV",{class:!0});var qd=r(Co);k(is.$$.fragment,qd),Yp=h(qd),k(qo.$$.fragment,qd),qd.forEach(t),Kp=h(le),Uo=a(le,"DIV",{class:!0});var Ud=r(Uo);k(cs.$$.fragment,Ud),eh=h(Ud),k(Io.$$.fragment,Ud),Ud.forEach(t),le.forEach(t),this.h()},h(){m(i,"name","hf:doc:metadata"),m(i,"content",JSON.stringify(Vm)),m(u,"id","blenderbot"),m(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(u,"href","#blenderbot"),m(f,"class","relative group"),m(ie,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),m(ie,"rel","nofollow"),m(K,"id","overview"),m(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(K,"href","#overview"),m(G,"class","relative group"),m(ue,"href","https://arxiv.org/pdf/2004.13637.pdf"),m(ue,"rel","nofollow"),m(N,"href","https://huggingface.co/sshleifer"),m(N,"rel","nofollow"),m(ge,"href","https://github.com/facebookresearch/ParlAI"),m(ge,"rel","nofollow"),m(ne,"id","implementation-notes"),m(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ne,"href","#implementation-notes"),m(C,"class","relative group"),m(Ie,"href","https://arxiv.org/pdf/1706.03762.pdf"),m(Ie,"rel","nofollow"),m(Ze,"href","https://huggingface.co/models?search=blenderbot"),m(Ze,"rel","nofollow"),m(_s,"href","blenderbot-small"),m(Qt,"id","usage"),m(Qt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Qt,"href","#usage"),m(jt,"class","relative group"),m(Dt,"id","documentation-resources"),m(Dt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Dt,"href","#documentation-resources"),m(Ft,"class","relative group"),m(ys,"href","../tasks/language_modeling"),m(vs,"href","../tasks/translation"),m(ks,"href","../tasks/summarization"),m(Lt,"id","transformers.BlenderbotConfig"),m(Lt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Lt,"href","#transformers.BlenderbotConfig"),m(xt,"class","relative group"),m(Ts,"href","/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.BlenderbotModel"),m(tn,"href","https://huggingface.co/facebook/blenderbot-3B"),m(tn,"rel","nofollow"),m(ws,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(Ms,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Kt,"id","transformers.BlenderbotTokenizer"),m(Kt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Kt,"href","#transformers.BlenderbotTokenizer"),m(Et,"class","relative group"),m(Bs,"href","/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(oo,"id","transformers.BlenderbotTokenizerFast"),m(oo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(oo,"href","#transformers.BlenderbotTokenizerFast"),m(Ct,"class","relative group"),m(js,"href","/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ao,"id","transformers.BlenderbotModel"),m(ao,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ao,"href","#transformers.BlenderbotModel"),m(qt,"class","relative group"),m(xs,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(bn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(bn,"rel","nofollow"),m(zs,"href","/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.BlenderbotModel"),m(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(io,"id","transformers.BlenderbotForConditionalGeneration"),m(io,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(io,"href","#transformers.BlenderbotForConditionalGeneration"),m(It,"class","relative group"),m(Js,"href","/docs/transformers/v4.31.0/en/model_doc/bart#transformers.BartForConditionalGeneration"),m(Es,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(Mn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Mn,"rel","nofollow"),m(Cs,"href","/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.BlenderbotForConditionalGeneration"),m(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ho,"id","transformers.BlenderbotForCausalLM"),m(ho,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ho,"href","#transformers.BlenderbotForCausalLM"),m(Gt,"class","relative group"),m(uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fo,"id","transformers.TFBlenderbotModel"),m(fo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(fo,"href","#transformers.TFBlenderbotModel"),m(Nt,"class","relative group"),m(qs,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(Cn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Cn,"rel","nofollow"),m(Us,"href","/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.TFBlenderbotModel"),m(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(yo,"id","transformers.TFBlenderbotForConditionalGeneration"),m(yo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(yo,"href","#transformers.TFBlenderbotForConditionalGeneration"),m(Rt,"class","relative group"),m(Is,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(Wn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Wn,"rel","nofollow"),m(Zs,"href","/docs/transformers/v4.31.0/en/model_doc/blenderbot#transformers.TFBlenderbotForConditionalGeneration"),m(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wo,"id","transformers.FlaxBlenderbotModel"),m(wo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(wo,"href","#transformers.FlaxBlenderbotModel"),m(Xt,"class","relative group"),m(Gs,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Sn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Sn,"rel","nofollow"),m(Pn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Pn,"rel","nofollow"),m(Hn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Hn,"rel","nofollow"),m(On,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(On,"rel","nofollow"),m(Qn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Qn,"rel","nofollow"),m(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(zo,"id","transformers.FlaxBlenderbotForConditionalGeneration"),m(zo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(zo,"href","#transformers.FlaxBlenderbotForConditionalGeneration"),m(Pt,"class","relative group"),m(Ws,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ns,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(ns,"rel","nofollow"),m(ss,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(ss,"rel","nofollow"),m(as,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(as,"rel","nofollow"),m(rs,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(rs,"rel","nofollow"),m(ds,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(ds,"rel","nofollow"),m(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,_){e(document.head,i),g(o,y,_),g(o,f,_),e(f,u),e(u,b),T(n,b,null),e(f,c),e(f,F),e(F,D),g(o,Z,_),g(o,q,_),e(q,Y),e(Y,je),e(q,x),e(q,ie),e(ie,ce),e(q,Ke),g(o,Re,_),g(o,G,_),e(G,K),e(K,Fe),T(H,Fe,null),e(G,et),e(G,xe),e(xe,pe),g(o,Ae,_),g(o,ee,_),e(ee,he),e(ee,ue),e(ue,tt),e(ee,ze),g(o,E,_),g(o,U,_),e(U,ot),g(o,te,_),g(o,we,_),e(we,Je),e(Je,me),g(o,Xe,_),g(o,Me,_),e(Me,W),g(o,Se,_),g(o,O,_),e(O,Ee),e(Ee,nt),g(o,oe,_),g(o,Q,_),e(Q,st),e(Q,N),e(N,at),e(Q,fe),e(Q,ge),e(ge,Ce),e(Q,V),g(o,Pe,_),g(o,C,_),e(C,ne),e(ne,qe),T($,qe,null),e(C,z),e(C,rt),e(rt,Ue),g(o,ut,_),g(o,se,_),e(se,J),e(J,vt),e(J,Ie),e(Ie,kt),e(J,Tt),e(se,wt),e(se,R),e(R,_e),e(R,Ze),e(Ze,Mt),e(R,be),e(se,Bt),e(se,L),e(L,dt),e(L,lt),e(lt,Ge),e(L,$t),e(L,Ys),e(Ys,Id),e(L,Zd),e(L,_s),e(_s,Gd),e(L,Wd),g(o,Br,_),g(o,jt,_),e(jt,Qt),e(Qt,Ks),T(Do,Ks,null),e(jt,Nd),e(jt,ea),e(ea,Vd),g(o,$r,_),g(o,bs,_),e(bs,Rd),g(o,jr,_),T(Lo,o,_),g(o,Fr,_),g(o,Ft,_),e(Ft,Dt),e(Dt,ta),T(Yo,ta,null),e(Ft,Ad),e(Ft,oa),e(oa,Xd),g(o,xr,_),g(o,mt,_),e(mt,na),e(na,ys),e(ys,Sd),e(mt,Pd),e(mt,sa),e(sa,vs),e(vs,Hd),e(mt,Od),e(mt,aa),e(aa,ks),e(ks,Qd),g(o,zr,_),g(o,xt,_),e(xt,Lt),e(Lt,ra),T(Ko,ra,null),e(xt,Dd),e(xt,da),e(da,Ld),g(o,Jr,_),g(o,We,_),T(en,We,null),e(We,Yd),e(We,zt),e(zt,Kd),e(zt,Ts),e(Ts,el),e(zt,tl),e(zt,tn),e(tn,ol),e(zt,nl),e(We,sl),e(We,Jt),e(Jt,al),e(Jt,ws),e(ws,rl),e(Jt,dl),e(Jt,Ms),e(Ms,ll),e(Jt,il),e(We,cl),T(Yt,We,null),g(o,Er,_),g(o,Et,_),e(Et,Kt),e(Kt,la),T(on,la,null),e(Et,pl),e(Et,ia),e(ia,hl),g(o,Cr,_),g(o,A,_),T(nn,A,null),e(A,ul),e(A,ca),e(ca,ml),e(A,fl),e(A,pa),e(pa,gl),e(A,_l),T(eo,A,null),e(A,bl),e(A,sn),e(sn,yl),e(sn,ha),e(ha,vl),e(sn,kl),e(A,Tl),T(to,A,null),e(A,wl),e(A,an),e(an,Ml),e(an,Bs),e(Bs,Bl),e(an,$l),e(A,jl),e(A,ft),T(rn,ft,null),e(ft,Fl),e(ft,ua),e(ua,xl),e(ft,zl),e(ft,ma),e(ma,$s),e($s,Jl),e($s,fa),e(fa,El),g(o,qr,_),g(o,Ct,_),e(Ct,oo),e(oo,ga),T(dn,ga,null),e(Ct,Cl),e(Ct,_a),e(_a,ql),g(o,Ur,_),g(o,X,_),T(ln,X,null),e(X,Ul),e(X,cn),e(cn,Il),e(cn,ba),e(ba,Zl),e(cn,Gl),e(X,Wl),e(X,ya),e(ya,Nl),e(X,Vl),T(no,X,null),e(X,Rl),e(X,pn),e(pn,Al),e(pn,va),e(va,Xl),e(pn,Sl),e(X,Pl),T(so,X,null),e(X,Hl),e(X,hn),e(hn,Ol),e(hn,js),e(js,Ql),e(hn,Dl),e(X,Ll),e(X,gt),T(un,gt,null),e(gt,Yl),e(gt,ka),e(ka,Kl),e(gt,ei),e(gt,Ta),e(Ta,Fs),e(Fs,ti),e(Fs,wa),e(wa,oi),g(o,Ir,_),g(o,qt,_),e(qt,ao),e(ao,Ma),T(mn,Ma,null),e(qt,ni),e(qt,Ba),e(Ba,si),g(o,Zr,_),g(o,it,_),e(it,ai),e(it,$a),e($a,ri),e(it,di),e(it,ja),e(ja,li),e(it,ii),e(it,Fa),e(Fa,ci),g(o,Gr,_),g(o,Ne,_),T(fn,Ne,null),e(Ne,pi),e(Ne,gn),e(gn,hi),e(gn,xs),e(xs,ui),e(gn,mi),e(Ne,fi),e(Ne,_n),e(_n,gi),e(_n,bn),e(bn,_i),e(_n,bi),e(Ne,yi),e(Ne,He),T(yn,He,null),e(He,vi),e(He,Ut),e(Ut,ki),e(Ut,zs),e(zs,Ti),e(Ut,wi),e(Ut,xa),e(xa,Mi),e(Ut,Bi),e(He,$i),T(ro,He,null),e(He,ji),T(lo,He,null),g(o,Wr,_),g(o,It,_),e(It,io),e(io,za),T(vn,za,null),e(It,Fi),e(It,Ja),e(Ja,xi),g(o,Nr,_),g(o,ct,_),e(ct,zi),e(ct,Js),e(Js,Ji),e(ct,Ei),e(ct,Ea),e(Ea,Ci),e(ct,qi),e(ct,Ca),e(Ca,Ui),g(o,Vr,_),g(o,Ve,_),T(kn,Ve,null),e(Ve,Ii),e(Ve,Tn),e(Tn,Zi),e(Tn,Es),e(Es,Gi),e(Tn,Wi),e(Ve,Ni),e(Ve,wn),e(wn,Vi),e(wn,Mn),e(Mn,Ri),e(wn,Ai),e(Ve,Xi),e(Ve,Oe),T(Bn,Oe,null),e(Oe,Si),e(Oe,Zt),e(Zt,Pi),e(Zt,Cs),e(Cs,Hi),e(Zt,Oi),e(Zt,qa),e(qa,Qi),e(Zt,Di),e(Oe,Li),T(co,Oe,null),e(Oe,Yi),T(po,Oe,null),g(o,Rr,_),g(o,Gt,_),e(Gt,ho),e(ho,Ua),T($n,Ua,null),e(Gt,Ki),e(Gt,Ia),e(Ia,ec),g(o,Ar,_),g(o,Wt,_),T(jn,Wt,null),e(Wt,tc),e(Wt,uo),T(Fn,uo,null),e(uo,oc),T(mo,uo,null),g(o,Xr,_),g(o,Nt,_),e(Nt,fo),e(fo,Za),T(xn,Za,null),e(Nt,nc),e(Nt,Ga),e(Ga,sc),g(o,Sr,_),g(o,ye,_),T(zn,ye,null),e(ye,ac),e(ye,Jn),e(Jn,rc),e(Jn,qs),e(qs,dc),e(Jn,lc),e(ye,ic),e(ye,En),e(En,cc),e(En,Cn),e(Cn,pc),e(En,hc),e(ye,uc),T(go,ye,null),e(ye,mc),e(ye,Qe),T(qn,Qe,null),e(Qe,fc),e(Qe,Vt),e(Vt,gc),e(Vt,Us),e(Us,_c),e(Vt,bc),e(Vt,Wa),e(Wa,yc),e(Vt,vc),e(Qe,kc),T(_o,Qe,null),e(Qe,Tc),T(bo,Qe,null),g(o,Pr,_),g(o,Rt,_),e(Rt,yo),e(yo,Na),T(Un,Na,null),e(Rt,wc),e(Rt,Va),e(Va,Mc),g(o,Hr,_),g(o,ve,_),T(In,ve,null),e(ve,Bc),e(ve,Zn),e(Zn,$c),e(Zn,Is),e(Is,jc),e(Zn,Fc),e(ve,xc),e(ve,Gn),e(Gn,zc),e(Gn,Wn),e(Wn,Jc),e(Gn,Ec),e(ve,Cc),T(vo,ve,null),e(ve,qc),e(ve,De),T(Nn,De,null),e(De,Uc),e(De,At),e(At,Ic),e(At,Zs),e(Zs,Zc),e(At,Gc),e(At,Ra),e(Ra,Wc),e(At,Nc),e(De,Vc),T(ko,De,null),e(De,Rc),T(To,De,null),g(o,Or,_),g(o,Xt,_),e(Xt,wo),e(wo,Aa),T(Vn,Aa,null),e(Xt,Ac),e(Xt,Xa),e(Xa,Xc),g(o,Qr,_),g(o,S,_),T(Rn,S,null),e(S,Sc),e(S,An),e(An,Pc),e(An,Gs),e(Gs,Hc),e(An,Oc),e(S,Qc),e(S,Xn),e(Xn,Dc),e(Xn,Sn),e(Sn,Lc),e(Xn,Yc),e(S,Kc),e(S,Sa),e(Sa,ep),e(S,tp),e(S,pt),e(pt,Pa),e(Pa,Pn),e(Pn,op),e(pt,np),e(pt,Ha),e(Ha,Hn),e(Hn,sp),e(pt,ap),e(pt,Oa),e(Oa,On),e(On,rp),e(pt,dp),e(pt,Qa),e(Qa,Qn),e(Qn,lp),e(S,ip),e(S,Le),T(Dn,Le,null),e(Le,cp),e(Le,St),e(St,pp),e(St,Da),e(Da,hp),e(St,up),e(St,La),e(La,mp),e(St,fp),e(Le,gp),T(Mo,Le,null),e(Le,_p),T(Bo,Le,null),e(S,bp),e(S,$o),T(Ln,$o,null),e($o,yp),T(jo,$o,null),e(S,vp),e(S,Fo),T(Yn,Fo,null),e(Fo,kp),T(xo,Fo,null),g(o,Dr,_),g(o,Pt,_),e(Pt,zo),e(zo,Ya),T(Kn,Ya,null),e(Pt,Tp),e(Pt,Ka),e(Ka,wp),g(o,Lr,_),g(o,P,_),T(es,P,null),e(P,Mp),e(P,ts),e(ts,Bp),e(ts,Ws),e(Ws,$p),e(ts,jp),e(P,Fp),e(P,os),e(os,xp),e(os,ns),e(ns,zp),e(os,Jp),e(P,Ep),e(P,er),e(er,Cp),e(P,qp),e(P,ht),e(ht,tr),e(tr,ss),e(ss,Up),e(ht,Ip),e(ht,or),e(or,as),e(as,Zp),e(ht,Gp),e(ht,nr),e(nr,rs),e(rs,Wp),e(ht,Np),e(ht,sr),e(sr,ds),e(ds,Vp),e(P,Rp),e(P,Ye),T(ls,Ye,null),e(Ye,Ap),e(Ye,Ht),e(Ht,Xp),e(Ht,ar),e(ar,Sp),e(Ht,Pp),e(Ht,rr),e(rr,Hp),e(Ht,Op),e(Ye,Qp),T(Jo,Ye,null),e(Ye,Dp),T(Eo,Ye,null),e(P,Lp),e(P,Co),T(is,Co,null),e(Co,Yp),T(qo,Co,null),e(P,Kp),e(P,Uo),T(cs,Uo,null),e(Uo,eh),T(Io,Uo,null),Yr=!0},p(o,[_]){const ps={};_&2&&(ps.$$scope={dirty:_,ctx:o}),Yt.$set(ps);const dr={};_&2&&(dr.$$scope={dirty:_,ctx:o}),eo.$set(dr);const lr={};_&2&&(lr.$$scope={dirty:_,ctx:o}),to.$set(lr);const ir={};_&2&&(ir.$$scope={dirty:_,ctx:o}),no.$set(ir);const Zo={};_&2&&(Zo.$$scope={dirty:_,ctx:o}),so.$set(Zo);const cr={};_&2&&(cr.$$scope={dirty:_,ctx:o}),ro.$set(cr);const pr={};_&2&&(pr.$$scope={dirty:_,ctx:o}),lo.$set(pr);const hs={};_&2&&(hs.$$scope={dirty:_,ctx:o}),co.$set(hs);const hr={};_&2&&(hr.$$scope={dirty:_,ctx:o}),po.$set(hr);const ur={};_&2&&(ur.$$scope={dirty:_,ctx:o}),mo.$set(ur);const mr={};_&2&&(mr.$$scope={dirty:_,ctx:o}),go.$set(mr);const us={};_&2&&(us.$$scope={dirty:_,ctx:o}),_o.$set(us);const fr={};_&2&&(fr.$$scope={dirty:_,ctx:o}),bo.$set(fr);const gr={};_&2&&(gr.$$scope={dirty:_,ctx:o}),vo.$set(gr);const _r={};_&2&&(_r.$$scope={dirty:_,ctx:o}),ko.$set(_r);const br={};_&2&&(br.$$scope={dirty:_,ctx:o}),To.$set(br);const yr={};_&2&&(yr.$$scope={dirty:_,ctx:o}),Mo.$set(yr);const vr={};_&2&&(vr.$$scope={dirty:_,ctx:o}),Bo.$set(vr);const kr={};_&2&&(kr.$$scope={dirty:_,ctx:o}),jo.$set(kr);const Ot={};_&2&&(Ot.$$scope={dirty:_,ctx:o}),xo.$set(Ot);const Tr={};_&2&&(Tr.$$scope={dirty:_,ctx:o}),Jo.$set(Tr);const wr={};_&2&&(wr.$$scope={dirty:_,ctx:o}),Eo.$set(wr);const ms={};_&2&&(ms.$$scope={dirty:_,ctx:o}),qo.$set(ms);const Mr={};_&2&&(Mr.$$scope={dirty:_,ctx:o}),Io.$set(Mr)},i(o){Yr||(w(n.$$.fragment,o),w(H.$$.fragment,o),w($.$$.fragment,o),w(Do.$$.fragment,o),w(Lo.$$.fragment,o),w(Yo.$$.fragment,o),w(Ko.$$.fragment,o),w(en.$$.fragment,o),w(Yt.$$.fragment,o),w(on.$$.fragment,o),w(nn.$$.fragment,o),w(eo.$$.fragment,o),w(to.$$.fragment,o),w(rn.$$.fragment,o),w(dn.$$.fragment,o),w(ln.$$.fragment,o),w(no.$$.fragment,o),w(so.$$.fragment,o),w(un.$$.fragment,o),w(mn.$$.fragment,o),w(fn.$$.fragment,o),w(yn.$$.fragment,o),w(ro.$$.fragment,o),w(lo.$$.fragment,o),w(vn.$$.fragment,o),w(kn.$$.fragment,o),w(Bn.$$.fragment,o),w(co.$$.fragment,o),w(po.$$.fragment,o),w($n.$$.fragment,o),w(jn.$$.fragment,o),w(Fn.$$.fragment,o),w(mo.$$.fragment,o),w(xn.$$.fragment,o),w(zn.$$.fragment,o),w(go.$$.fragment,o),w(qn.$$.fragment,o),w(_o.$$.fragment,o),w(bo.$$.fragment,o),w(Un.$$.fragment,o),w(In.$$.fragment,o),w(vo.$$.fragment,o),w(Nn.$$.fragment,o),w(ko.$$.fragment,o),w(To.$$.fragment,o),w(Vn.$$.fragment,o),w(Rn.$$.fragment,o),w(Dn.$$.fragment,o),w(Mo.$$.fragment,o),w(Bo.$$.fragment,o),w(Ln.$$.fragment,o),w(jo.$$.fragment,o),w(Yn.$$.fragment,o),w(xo.$$.fragment,o),w(Kn.$$.fragment,o),w(es.$$.fragment,o),w(ls.$$.fragment,o),w(Jo.$$.fragment,o),w(Eo.$$.fragment,o),w(is.$$.fragment,o),w(qo.$$.fragment,o),w(cs.$$.fragment,o),w(Io.$$.fragment,o),Yr=!0)},o(o){M(n.$$.fragment,o),M(H.$$.fragment,o),M($.$$.fragment,o),M(Do.$$.fragment,o),M(Lo.$$.fragment,o),M(Yo.$$.fragment,o),M(Ko.$$.fragment,o),M(en.$$.fragment,o),M(Yt.$$.fragment,o),M(on.$$.fragment,o),M(nn.$$.fragment,o),M(eo.$$.fragment,o),M(to.$$.fragment,o),M(rn.$$.fragment,o),M(dn.$$.fragment,o),M(ln.$$.fragment,o),M(no.$$.fragment,o),M(so.$$.fragment,o),M(un.$$.fragment,o),M(mn.$$.fragment,o),M(fn.$$.fragment,o),M(yn.$$.fragment,o),M(ro.$$.fragment,o),M(lo.$$.fragment,o),M(vn.$$.fragment,o),M(kn.$$.fragment,o),M(Bn.$$.fragment,o),M(co.$$.fragment,o),M(po.$$.fragment,o),M($n.$$.fragment,o),M(jn.$$.fragment,o),M(Fn.$$.fragment,o),M(mo.$$.fragment,o),M(xn.$$.fragment,o),M(zn.$$.fragment,o),M(go.$$.fragment,o),M(qn.$$.fragment,o),M(_o.$$.fragment,o),M(bo.$$.fragment,o),M(Un.$$.fragment,o),M(In.$$.fragment,o),M(vo.$$.fragment,o),M(Nn.$$.fragment,o),M(ko.$$.fragment,o),M(To.$$.fragment,o),M(Vn.$$.fragment,o),M(Rn.$$.fragment,o),M(Dn.$$.fragment,o),M(Mo.$$.fragment,o),M(Bo.$$.fragment,o),M(Ln.$$.fragment,o),M(jo.$$.fragment,o),M(Yn.$$.fragment,o),M(xo.$$.fragment,o),M(Kn.$$.fragment,o),M(es.$$.fragment,o),M(ls.$$.fragment,o),M(Jo.$$.fragment,o),M(Eo.$$.fragment,o),M(is.$$.fragment,o),M(qo.$$.fragment,o),M(cs.$$.fragment,o),M(Io.$$.fragment,o),Yr=!1},d(o){t(i),o&&t(y),o&&t(f),B(n),o&&t(Z),o&&t(q),o&&t(Re),o&&t(G),B(H),o&&t(Ae),o&&t(ee),o&&t(E),o&&t(U),o&&t(te),o&&t(we),o&&t(Xe),o&&t(Me),o&&t(Se),o&&t(O),o&&t(oe),o&&t(Q),o&&t(Pe),o&&t(C),B($),o&&t(ut),o&&t(se),o&&t(Br),o&&t(jt),B(Do),o&&t($r),o&&t(bs),o&&t(jr),B(Lo,o),o&&t(Fr),o&&t(Ft),B(Yo),o&&t(xr),o&&t(mt),o&&t(zr),o&&t(xt),B(Ko),o&&t(Jr),o&&t(We),B(en),B(Yt),o&&t(Er),o&&t(Et),B(on),o&&t(Cr),o&&t(A),B(nn),B(eo),B(to),B(rn),o&&t(qr),o&&t(Ct),B(dn),o&&t(Ur),o&&t(X),B(ln),B(no),B(so),B(un),o&&t(Ir),o&&t(qt),B(mn),o&&t(Zr),o&&t(it),o&&t(Gr),o&&t(Ne),B(fn),B(yn),B(ro),B(lo),o&&t(Wr),o&&t(It),B(vn),o&&t(Nr),o&&t(ct),o&&t(Vr),o&&t(Ve),B(kn),B(Bn),B(co),B(po),o&&t(Rr),o&&t(Gt),B($n),o&&t(Ar),o&&t(Wt),B(jn),B(Fn),B(mo),o&&t(Xr),o&&t(Nt),B(xn),o&&t(Sr),o&&t(ye),B(zn),B(go),B(qn),B(_o),B(bo),o&&t(Pr),o&&t(Rt),B(Un),o&&t(Hr),o&&t(ve),B(In),B(vo),B(Nn),B(ko),B(To),o&&t(Or),o&&t(Xt),B(Vn),o&&t(Qr),o&&t(S),B(Rn),B(Dn),B(Mo),B(Bo),B(Ln),B(jo),B(Yn),B(xo),o&&t(Dr),o&&t(Pt),B(Kn),o&&t(Lr),o&&t(P),B(es),B(ls),B(Jo),B(Eo),B(is),B(qo),B(cs),B(Io)}}}const Vm={local:"blenderbot",sections:[{local:"overview",title:"Overview"},{local:"implementation-notes",title:"Implementation Notes"},{local:"usage",title:"Usage"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.BlenderbotConfig",title:"BlenderbotConfig"},{local:"transformers.BlenderbotTokenizer",title:"BlenderbotTokenizer"},{local:"transformers.BlenderbotTokenizerFast",title:"BlenderbotTokenizerFast"},{local:"transformers.BlenderbotModel",title:"BlenderbotModel"},{local:"transformers.BlenderbotForConditionalGeneration",title:"BlenderbotForConditionalGeneration"},{local:"transformers.BlenderbotForCausalLM",title:"BlenderbotForCausalLM"},{local:"transformers.TFBlenderbotModel",title:"TFBlenderbotModel"},{local:"transformers.TFBlenderbotForConditionalGeneration",title:"TFBlenderbotForConditionalGeneration"},{local:"transformers.FlaxBlenderbotModel",title:"FlaxBlenderbotModel"},{local:"transformers.FlaxBlenderbotForConditionalGeneration",title:"FlaxBlenderbotForConditionalGeneration"}],title:"Blenderbot"};function Rm(j){return fm(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qm extends pm{constructor(i){super();hm(this,i,Rm,Nm,um,{})}}export{Qm as default,Vm as metadata};
