import{S as Cu,i as Au,s as Pu,e as s,k as h,w as y,t as d,M as Ou,c as a,d as t,m as u,a as r,x as v,h as i,b as m,G as e,g as _,y as T,q as w,o as $,B as x,v as Nu,L as ze}from"../../chunks/vendor-hf-doc-builder.js";import{T as bt}from"../../chunks/Tip-hf-doc-builder.js";import{D as O}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ve}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as $e}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as xe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Iu(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import BlenderbotConfig, BlenderbotModel

# Initializing a Blenderbot facebook/blenderbot-3B style configuration
configuration = BlenderbotConfig()

# Initializing a model (with random weights) from the facebook/blenderbot-3B style configuration
model = BlenderbotModel(configuration)

# Accessing the model configuration
configuration = model.config`,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(){l=s("p"),k=d("Example:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function Su(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import BlenderbotTokenizer
tokenizer = BlenderbotTokenizer.from_pretrained("facebook/blenderbot-3B")
tokenizer.add_prefix_space = False
tokenizer("Hello world")['input_ids']
tokenizer(" Hello world")['input_ids']`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlenderbotTokenizer</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = BlenderbotTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-3B&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer.add_prefix_space = <span class="hljs-literal">False</span></span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[47, 921, 86, 1085, 2]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[6950, 1085, 2]`}}),{c(){l=s("p"),k=d("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function Lu(F){let l,k,f,p,b;return{c(){l=s("p"),k=d("When used with "),f=s("code"),p=d("is_split_into_words=True"),b=d(", this tokenizer will add a space before each word (even the first one).")},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"When used with "),f=a(c,"CODE",{});var B=r(f);p=i(B,"is_split_into_words=True"),B.forEach(t),b=i(c,", this tokenizer will add a space before each word (even the first one)."),c.forEach(t)},m(n,c){_(n,l,c),e(l,k),e(l,f),e(f,p),e(l,b)},d(n){n&&t(l)}}}function Du(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import BlenderbotTokenizerFast
tokenizer = BlenderbotTokenizerFast.from_pretrained("facebook/blenderbot-3B")
tokenizer("Hello world")['input_ids']
tokenizer(" Hello world")['input_ids']`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlenderbotTokenizerFast</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = BlenderbotTokenizerFast.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot-3B&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[6950, 1085, 2]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[6950, 1085, 2]`}}),{c(){l=s("p"),k=d("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function Gu(F){let l,k,f,p,b,n,c,B;return{c(){l=s("p"),k=d("When used with "),f=s("code"),p=d("is_split_into_words=True"),b=d(", this tokenizer needs to be instantiated with "),n=s("code"),c=d("add_prefix_space=True"),B=d(".")},l(X){l=a(X,"P",{});var N=r(l);k=i(N,"When used with "),f=a(N,"CODE",{});var A=r(f);p=i(A,"is_split_into_words=True"),A.forEach(t),b=i(N,", this tokenizer needs to be instantiated with "),n=a(N,"CODE",{});var Q=r(n);c=i(Q,"add_prefix_space=True"),Q.forEach(t),B=i(N,"."),N.forEach(t)},m(X,N){_(X,l,N),e(l,k),e(l,f),e(f,p),e(l,b),e(l,n),e(n,c),e(l,B)},d(X){X&&t(l)}}}function Wu(F){let l,k,f,p,b;return{c(){l=s("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),p=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){l=a(n,"P",{});var c=r(l);k=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var B=r(f);p=i(B,"Module"),B.forEach(t),b=i(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){_(n,l,c),e(l,k),e(l,f),e(f,p),e(l,b)},d(n){n&&t(l)}}}function Uu(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import AutoTokenizer, BlenderbotModel

model = BlenderbotModel.from_pretrained("facebook/blenderbot-400M-distill")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")

inputs = tokenizer("Studies have been shown that owning a dog is good for you", return_tensors="pt")
decoder_input_ids = tokenizer("Studies show that", return_tensors="pt").input_ids  # Batch size 1
outputs = model(input_ids=inputs.input_ids, decoder_input_ids=decoder_input_ids)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,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(){l=s("p"),k=d("Example:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function Hu(F){let l,k,f,p,b;return{c(){l=s("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),p=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){l=a(n,"P",{});var c=r(l);k=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var B=r(f);p=i(B,"Module"),B.forEach(t),b=i(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){_(n,l,c),e(l,k),e(l,f),e(f,p),e(l,b)},d(n){n&&t(l)}}}function Ru(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import AutoTokenizer, BlenderbotForConditionalGeneration

mname = "facebook/blenderbot-400M-distill"
model = BlenderbotForConditionalGeneration.from_pretrained(mname)
tokenizer = AutoTokenizer.from_pretrained(mname)
UTTERANCE = "My friends are cool but they eat too many carbs."
print("Human: ", UTTERANCE)

inputs = tokenizer([UTTERANCE], return_tensors="pt")
reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(reply_ids, skip_special_tokens=True)[0])

REPLY = "I'm not sure"
print("Human: ", REPLY)

NEXT_UTTERANCE = (
    "My friends are cool but they eat too many carbs.</s> <s>That's unfortunate. "
    "Are they trying to lose weight or are they just trying to be healthier?</s> "
    "<s> I'm not sure."
)
inputs = tokenizer([NEXT_UTTERANCE], return_tensors="pt")
next_reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(next_reply_ids, skip_special_tokens=True)[0])`,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(){l=s("p"),k=d("Conversation example:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Conversation example:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function Vu(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import AutoTokenizer, BlenderbotForCausalLM

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
model = BlenderbotForCausalLM.from_pretrained(
    "facebook/blenderbot-400M-distill", add_cross_attention=False
)
assert model.config.is_decoder, f"{model.__class__} has to be configured as a decoder."
inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

logits = outputs.logits
expected_shape = [1, inputs.input_ids.shape[-1], model.config.vocab_size]
list(logits.shape) == expected_shape`,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(){l=s("p"),k=d("Example:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function Ku(F){let l,k,f,p,b,n,c,B,X,N,A,Q,Fe,q,le,ce,Ze,Ge,I,Z,Be,V,et,qe,pe,We,ee,he,ue,tt,je,M,P,ot,te,Te,Ee,me,Ue,we,S,He,K,Me,nt,oe,J,st,L,at,fe,_e,Ce,D,Re,C,ne,Ae;return{c(){l=s("p"),k=d("TensorFlow models and layers in "),f=s("code"),p=d("transformers"),b=d(" accept two formats as input:"),n=h(),c=s("ul"),B=s("li"),X=d("having all inputs as keyword arguments (like PyTorch models), or"),N=h(),A=s("li"),Q=d("having all inputs as a list, tuple or dict in the first positional argument."),Fe=h(),q=s("p"),le=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"),Ze=d("model.fit()"),Ge=d(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=s("code"),Z=d("model.fit()"),Be=d(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),et=d("fit()"),qe=d(" and "),pe=s("code"),We=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:`),je=h(),M=s("ul"),P=s("li"),ot=d("a single Tensor with "),te=s("code"),Te=d("input_ids"),Ee=d(" only and nothing else: "),me=s("code"),Ue=d("model(input_ids)"),we=h(),S=s("li"),He=d(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),K=s("code"),Me=d("model([input_ids, attention_mask])"),nt=d(" or "),oe=s("code"),J=d("model([input_ids, attention_mask, token_type_ids])"),st=h(),L=s("li"),at=d(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),fe=s("code"),_e=d('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ce=h(),D=s("p"),Re=d(`Note that when creating models and layers with
`),C=s("a"),ne=d("subclassing"),Ae=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(z){l=a(z,"P",{});var j=r(l);k=i(j,"TensorFlow models and layers in "),f=a(j,"CODE",{});var rt=r(f);p=i(rt,"transformers"),rt.forEach(t),b=i(j," accept two formats as input:"),j.forEach(t),n=u(z),c=a(z,"UL",{});var Pe=r(c);B=a(Pe,"LI",{});var ut=r(B);X=i(ut,"having all inputs as keyword arguments (like PyTorch models), or"),ut.forEach(t),N=u(Pe),A=a(Pe,"LI",{});var se=r(A);Q=i(se,"having all inputs as a list, tuple or dict in the first positional argument."),se.forEach(t),Pe.forEach(t),Fe=u(z),q=a(z,"P",{});var E=r(q);le=i(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),ce=a(E,"CODE",{});var kt=r(ce);Ze=i(kt,"model.fit()"),kt.forEach(t),Ge=i(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a(E,"CODE",{});var Oe=r(I);Z=i(Oe,"model.fit()"),Oe.forEach(t),Be=i(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a(E,"CODE",{});var yt=r(V);et=i(yt,"fit()"),yt.forEach(t),qe=i(E," and "),pe=a(E,"CODE",{});var vt=r(pe);We=i(vt,"predict()"),vt.forEach(t),ee=i(E,`, such as when creating your own layers or models with
the Keras `),he=a(E,"CODE",{});var Tt=r(he);ue=i(Tt,"Functional"),Tt.forEach(t),tt=i(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),je=u(z),M=a(z,"UL",{});var G=r(M);P=a(G,"LI",{});var ge=r(P);ot=i(ge,"a single Tensor with "),te=a(ge,"CODE",{});var Ne=r(te);Te=i(Ne,"input_ids"),Ne.forEach(t),Ee=i(ge," only and nothing else: "),me=a(ge,"CODE",{});var wt=r(me);Ue=i(wt,"model(input_ids)"),wt.forEach(t),ge.forEach(t),we=u(G),S=a(G,"LI",{});var be=r(S);He=i(be,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),K=a(be,"CODE",{});var $t=r(K);Me=i($t,"model([input_ids, attention_mask])"),$t.forEach(t),nt=i(be," or "),oe=a(be,"CODE",{});var Y=r(oe);J=i(Y,"model([input_ids, attention_mask, token_type_ids])"),Y.forEach(t),be.forEach(t),st=u(G),L=a(G,"LI",{});var dt=r(L);at=i(dt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),fe=a(dt,"CODE",{});var it=r(fe);_e=i(it,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),it.forEach(t),dt.forEach(t),G.forEach(t),Ce=u(z),D=a(z,"P",{});var Ie=r(D);Re=i(Ie,`Note that when creating models and layers with
`),C=a(Ie,"A",{href:!0,rel:!0});var xt=r(C);ne=i(xt,"subclassing"),xt.forEach(t),Ae=i(Ie,` 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!`),Ie.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,j){_(z,l,j),e(l,k),e(l,f),e(f,p),e(l,b),_(z,n,j),_(z,c,j),e(c,B),e(B,X),e(c,N),e(c,A),e(A,Q),_(z,Fe,j),_(z,q,j),e(q,le),e(q,ce),e(ce,Ze),e(q,Ge),e(q,I),e(I,Z),e(q,Be),e(q,V),e(V,et),e(q,qe),e(q,pe),e(pe,We),e(q,ee),e(q,he),e(he,ue),e(q,tt),_(z,je,j),_(z,M,j),e(M,P),e(P,ot),e(P,te),e(te,Te),e(P,Ee),e(P,me),e(me,Ue),e(M,we),e(M,S),e(S,He),e(S,K),e(K,Me),e(S,nt),e(S,oe),e(oe,J),e(M,st),e(M,L),e(L,at),e(L,fe),e(fe,_e),_(z,Ce,j),_(z,D,j),e(D,Re),e(D,C),e(C,ne),e(D,Ae)},d(z){z&&t(l),z&&t(n),z&&t(c),z&&t(Fe),z&&t(q),z&&t(je),z&&t(M),z&&t(Ce),z&&t(D)}}}function Ju(F){let l,k,f,p,b;return{c(){l=s("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),p=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){l=a(n,"P",{});var c=r(l);k=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var B=r(f);p=i(B,"Module"),B.forEach(t),b=i(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){_(n,l,c),e(l,k),e(l,f),e(f,p),e(l,b)},d(n){n&&t(l)}}}function Xu(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import AutoTokenizer, TFBlenderbotModel
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
model = TFBlenderbotModel.from_pretrained("facebook/blenderbot-400M-distill")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)

last_hidden_states = outputs.last_hidden_state`,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(){l=s("p"),k=d("Example:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function Yu(F){let l,k,f,p,b,n,c,B,X,N,A,Q,Fe,q,le,ce,Ze,Ge,I,Z,Be,V,et,qe,pe,We,ee,he,ue,tt,je,M,P,ot,te,Te,Ee,me,Ue,we,S,He,K,Me,nt,oe,J,st,L,at,fe,_e,Ce,D,Re,C,ne,Ae;return{c(){l=s("p"),k=d("TensorFlow models and layers in "),f=s("code"),p=d("transformers"),b=d(" accept two formats as input:"),n=h(),c=s("ul"),B=s("li"),X=d("having all inputs as keyword arguments (like PyTorch models), or"),N=h(),A=s("li"),Q=d("having all inputs as a list, tuple or dict in the first positional argument."),Fe=h(),q=s("p"),le=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"),Ze=d("model.fit()"),Ge=d(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=s("code"),Z=d("model.fit()"),Be=d(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),et=d("fit()"),qe=d(" and "),pe=s("code"),We=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:`),je=h(),M=s("ul"),P=s("li"),ot=d("a single Tensor with "),te=s("code"),Te=d("input_ids"),Ee=d(" only and nothing else: "),me=s("code"),Ue=d("model(input_ids)"),we=h(),S=s("li"),He=d(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),K=s("code"),Me=d("model([input_ids, attention_mask])"),nt=d(" or "),oe=s("code"),J=d("model([input_ids, attention_mask, token_type_ids])"),st=h(),L=s("li"),at=d(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),fe=s("code"),_e=d('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ce=h(),D=s("p"),Re=d(`Note that when creating models and layers with
`),C=s("a"),ne=d("subclassing"),Ae=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(z){l=a(z,"P",{});var j=r(l);k=i(j,"TensorFlow models and layers in "),f=a(j,"CODE",{});var rt=r(f);p=i(rt,"transformers"),rt.forEach(t),b=i(j," accept two formats as input:"),j.forEach(t),n=u(z),c=a(z,"UL",{});var Pe=r(c);B=a(Pe,"LI",{});var ut=r(B);X=i(ut,"having all inputs as keyword arguments (like PyTorch models), or"),ut.forEach(t),N=u(Pe),A=a(Pe,"LI",{});var se=r(A);Q=i(se,"having all inputs as a list, tuple or dict in the first positional argument."),se.forEach(t),Pe.forEach(t),Fe=u(z),q=a(z,"P",{});var E=r(q);le=i(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),ce=a(E,"CODE",{});var kt=r(ce);Ze=i(kt,"model.fit()"),kt.forEach(t),Ge=i(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a(E,"CODE",{});var Oe=r(I);Z=i(Oe,"model.fit()"),Oe.forEach(t),Be=i(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a(E,"CODE",{});var yt=r(V);et=i(yt,"fit()"),yt.forEach(t),qe=i(E," and "),pe=a(E,"CODE",{});var vt=r(pe);We=i(vt,"predict()"),vt.forEach(t),ee=i(E,`, such as when creating your own layers or models with
the Keras `),he=a(E,"CODE",{});var Tt=r(he);ue=i(Tt,"Functional"),Tt.forEach(t),tt=i(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),je=u(z),M=a(z,"UL",{});var G=r(M);P=a(G,"LI",{});var ge=r(P);ot=i(ge,"a single Tensor with "),te=a(ge,"CODE",{});var Ne=r(te);Te=i(Ne,"input_ids"),Ne.forEach(t),Ee=i(ge," only and nothing else: "),me=a(ge,"CODE",{});var wt=r(me);Ue=i(wt,"model(input_ids)"),wt.forEach(t),ge.forEach(t),we=u(G),S=a(G,"LI",{});var be=r(S);He=i(be,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),K=a(be,"CODE",{});var $t=r(K);Me=i($t,"model([input_ids, attention_mask])"),$t.forEach(t),nt=i(be," or "),oe=a(be,"CODE",{});var Y=r(oe);J=i(Y,"model([input_ids, attention_mask, token_type_ids])"),Y.forEach(t),be.forEach(t),st=u(G),L=a(G,"LI",{});var dt=r(L);at=i(dt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),fe=a(dt,"CODE",{});var it=r(fe);_e=i(it,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),it.forEach(t),dt.forEach(t),G.forEach(t),Ce=u(z),D=a(z,"P",{});var Ie=r(D);Re=i(Ie,`Note that when creating models and layers with
`),C=a(Ie,"A",{href:!0,rel:!0});var xt=r(C);ne=i(xt,"subclassing"),xt.forEach(t),Ae=i(Ie,` 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!`),Ie.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,j){_(z,l,j),e(l,k),e(l,f),e(f,p),e(l,b),_(z,n,j),_(z,c,j),e(c,B),e(B,X),e(c,N),e(c,A),e(A,Q),_(z,Fe,j),_(z,q,j),e(q,le),e(q,ce),e(ce,Ze),e(q,Ge),e(q,I),e(I,Z),e(q,Be),e(q,V),e(V,et),e(q,qe),e(q,pe),e(pe,We),e(q,ee),e(q,he),e(he,ue),e(q,tt),_(z,je,j),_(z,M,j),e(M,P),e(P,ot),e(P,te),e(te,Te),e(P,Ee),e(P,me),e(me,Ue),e(M,we),e(M,S),e(S,He),e(S,K),e(K,Me),e(S,nt),e(S,oe),e(oe,J),e(M,st),e(M,L),e(L,at),e(L,fe),e(fe,_e),_(z,Ce,j),_(z,D,j),e(D,Re),e(D,C),e(C,ne),e(D,Ae)},d(z){z&&t(l),z&&t(n),z&&t(c),z&&t(Fe),z&&t(q),z&&t(je),z&&t(M),z&&t(Ce),z&&t(D)}}}function Qu(F){let l,k,f,p,b;return{c(){l=s("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),p=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){l=a(n,"P",{});var c=r(l);k=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var B=r(f);p=i(B,"Module"),B.forEach(t),b=i(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){_(n,l,c),e(l,k),e(l,f),e(f,p),e(l,b)},d(n){n&&t(l)}}}function Zu(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import AutoTokenizer, TFBlenderbotForConditionalGeneration

mname = "facebook/blenderbot-400M-distill"
model = TFBlenderbotForConditionalGeneration.from_pretrained(mname)
tokenizer = AutoTokenizer.from_pretrained(mname)
UTTERANCE = "My friends are cool but they eat too many carbs."
print("Human: ", UTTERANCE)

inputs = tokenizer([UTTERANCE], return_tensors="tf")
reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(reply_ids, skip_special_tokens=True)[0])

REPLY = "I'm not sure"
print("Human: ", REPLY)
NEXT_UTTERANCE = (
    "My friends are cool but they eat too many carbs.</s> <s>That's unfortunate. "
    "Are they trying to lose weight or are they just trying to be healthier?</s> "
    "<s> I'm not sure."
)
inputs = tokenizer([NEXT_UTTERANCE], return_tensors="tf")
next_reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(next_reply_ids, skip_special_tokens=True)[0])`,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(){l=s("p"),k=d("Conversation example::"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Conversation example::"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function em(F){let l,k,f,p,b;return{c(){l=s("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),p=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){l=a(n,"P",{});var c=r(l);k=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(c,"CODE",{});var B=r(f);p=i(B,"Module"),B.forEach(t),b=i(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){_(n,l,c),e(l,k),e(l,f),e(f,p),e(l,b)},d(n){n&&t(l)}}}function tm(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotModel

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
model = FlaxBlenderbotModel.from_pretrained("facebook/blenderbot-400M-distill")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,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(){l=s("p"),k=d("Example:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function om(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotForConditionalGeneration

model = FlaxBlenderbotForConditionalGeneration.from_pretrained("facebook/blenderbot-400M-distill")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)`,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(){l=s("p"),k=d("Example:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function nm(F){let l,k,f,p,b;return p=new ve({props:{code:`import jax.numpy as jnp
from transformers import AutoTokenizer, FlaxBlenderbotForConditionalGeneration

model = FlaxBlenderbotForConditionalGeneration.from_pretrained("facebook/blenderbot-400M-distill")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)

decoder_start_token_id = model.config.decoder_start_token_id
decoder_input_ids = jnp.ones((inputs.input_ids.shape[0], 1), dtype="i4") * decoder_start_token_id

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

model = FlaxBlenderbotForConditionalGeneration.from_pretrained("facebook/blenderbot-400M-distill")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")

UTTERANCE = "My friends are cool but they eat too many carbs."
inputs = tokenizer([UTTERANCE], max_length=1024, return_tensors="np")

# Generate Reply
reply_ids = model.generate(inputs["input_ids"], num_beams=4, max_length=5, early_stopping=True).sequences
print([tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=False) for g in reply_ids])`,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(){l=s("p"),k=d("Conversation example::"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Conversation example::"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function rm(F){let l,k,f,p,b;return p=new ve({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotForConditionalGeneration

model = FlaxBlenderbotForConditionalGeneration.from_pretrained("facebook/blenderbot-400M-distill")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)`,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(){l=s("p"),k=d("Example:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function dm(F){let l,k,f,p,b;return p=new ve({props:{code:`import jax.numpy as jnp
from transformers import AutoTokenizer, FlaxBlenderbotForConditionalGeneration

model = FlaxBlenderbotForConditionalGeneration.from_pretrained("facebook/blenderbot-400M-distill")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)

decoder_start_token_id = model.config.decoder_start_token_id
decoder_input_ids = jnp.ones((inputs.input_ids.shape[0], 1), dtype="i4") * decoder_start_token_id

outputs = model.decode(decoder_input_ids, encoder_outputs)
logits = outputs.logits`,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(){l=s("p"),k=d("Example:"),f=h(),y(p.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=u(n),v(p.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(p,n,c),b=!0},p:ze,i(n){b||(w(p.$$.fragment,n),b=!0)},o(n){$(p.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(p,n)}}}function im(F){let l,k,f,p,b,n,c,B,X,N,A,Q,Fe,q,le,ce,Ze,Ge,I,Z,Be,V,et,qe,pe,We,ee,he,ue,tt,je,M,P,ot,te,Te,Ee,me,Ue,we,S,He,K,Me,nt,oe,J,st,L,at,fe,_e,Ce,D,Re,C,ne,Ae,z,j,rt,Pe,ut,se,E,kt,Oe,yt,vt,Tt,G,ge,Ne,wt,be,$t,Y,dt,it,Ie,xt,Us,yd,vd,us,Td,wd,hr,zt,Vt,Hs,Vo,$d,Rs,xd,ur,ms,zd,mr,Ko,fr,Ft,Kt,Vs,Jo,Fd,Ks,Bd,_r,Se,Xo,qd,Bt,jd,fs,Ed,Md,Yo,Cd,Ad,Pd,qt,Od,_s,Nd,Id,gs,Sd,Ld,Dd,Jt,gr,jt,Xt,Js,Qo,Gd,Xs,Wd,br,W,Zo,Ud,Ys,Hd,Rd,Qs,Vd,Kd,Yt,Jd,en,Xd,Zs,Yd,Qd,Zd,Qt,ei,tn,ti,bs,oi,ni,si,mt,on,ai,ea,ri,di,ta,ks,ii,oa,li,kr,Et,Zt,na,nn,ci,sa,pi,yr,U,sn,hi,an,ui,aa,mi,fi,_i,ra,gi,bi,eo,ki,rn,yi,da,vi,Ti,wi,to,$i,dn,xi,ys,zi,Fi,Bi,ft,ln,qi,ia,ji,Ei,la,vs,Mi,ca,Ci,vr,Mt,oo,pa,cn,Ai,ha,Pi,Tr,lt,Oi,ua,Ni,Ii,ma,Si,Li,fa,Di,wr,Le,pn,Gi,hn,Wi,Ts,Ui,Hi,Ri,un,Vi,mn,Ki,Ji,Xi,Ve,fn,Yi,Ct,Qi,ws,Zi,el,_a,tl,ol,nl,no,sl,so,$r,At,ao,ga,_n,al,ba,rl,xr,ct,dl,$s,il,ll,ka,cl,pl,ya,hl,zr,De,gn,ul,bn,ml,xs,fl,_l,gl,kn,bl,yn,kl,yl,vl,Ke,vn,Tl,Pt,wl,zs,$l,xl,va,zl,Fl,Bl,ro,ql,io,Fr,Ot,lo,Ta,Tn,jl,wa,El,Br,Nt,wn,Ml,co,$n,Cl,po,qr,It,ho,$a,xn,Al,xa,Pl,jr,ke,zn,Ol,Fn,Nl,Fs,Il,Sl,Ll,Bn,Dl,qn,Gl,Wl,Ul,uo,Hl,Je,jn,Rl,St,Vl,Bs,Kl,Jl,za,Xl,Yl,Ql,mo,Zl,fo,Er,Lt,_o,Fa,En,ec,Ba,tc,Mr,ye,Mn,oc,Cn,nc,qs,sc,ac,rc,An,dc,Pn,ic,lc,cc,go,pc,Xe,On,hc,Dt,uc,js,mc,fc,qa,_c,gc,bc,bo,kc,ko,Cr,Gt,yo,ja,Nn,yc,Ea,vc,Ar,H,In,Tc,Sn,wc,Es,$c,xc,zc,Ln,Fc,Dn,Bc,qc,jc,Ma,Ec,Mc,pt,Ca,Gn,Cc,Ac,Aa,Wn,Pc,Oc,Pa,Un,Nc,Ic,Oa,Hn,Sc,Lc,Ye,Rn,Dc,Wt,Gc,Na,Wc,Uc,Ia,Hc,Rc,Vc,vo,Kc,To,Jc,wo,Vn,Xc,$o,Yc,xo,Kn,Qc,zo,Pr,Ut,Fo,Sa,Jn,Zc,La,ep,Or,R,Xn,tp,Yn,op,Ms,np,sp,ap,Qn,rp,Zn,dp,ip,lp,Da,cp,pp,ht,Ga,es,hp,up,Wa,ts,mp,fp,Ua,os,_p,gp,Ha,ns,bp,kp,Qe,ss,yp,Ht,vp,Ra,Tp,wp,Va,$p,xp,zp,Bo,Fp,qo,Bp,jo,as,qp,Eo,jp,Mo,rs,Ep,Co,Nr;return n=new $e({}),V=new $e({}),z=new $e({}),Vo=new $e({}),Ko=new ve({props:{code:`from transformers import BlenderbotTokenizer, BlenderbotForConditionalGeneration

mname = "facebook/blenderbot-400M-distill"
model = BlenderbotForConditionalGeneration.from_pretrained(mname)
tokenizer = BlenderbotTokenizer.from_pretrained(mname)
UTTERANCE = "My friends are cool but they eat too many carbs."
inputs = tokenizer([UTTERANCE], return_tensors="pt")
reply_ids = model.generate(**inputs)
print(tokenizer.batch_decode(reply_ids))`,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>]`}}),Jo=new $e({}),Xo=new O({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/main/en/model_doc/blenderbot#transformers.BlenderbotModel">BlenderbotModel</a> or <a href="/docs/transformers/main/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/main/src/transformers/models/blenderbot/configuration_blenderbot.py#L36"}}),Jt=new xe({props:{anchor:"transformers.BlenderbotConfig.example",$$slots:{default:[Iu]},$$scope:{ctx:F}}}),Qo=new $e({}),Zo=new O({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/main/src/transformers/models/blenderbot/tokenization_blenderbot.py#L92"}}),Yt=new xe({props:{anchor:"transformers.BlenderbotTokenizer.example",$$slots:{default:[Su]},$$scope:{ctx:F}}}),Qt=new bt({props:{$$slots:{default:[Lu]},$$scope:{ctx:F}}}),on=new O({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/main/src/transformers/models/blenderbot/tokenization_blenderbot.py#L398",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>
`}}),nn=new $e({}),sn=new O({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/main/src/transformers/models/blenderbot/tokenization_blenderbot_fast.py#L50"}}),eo=new xe({props:{anchor:"transformers.BlenderbotTokenizerFast.example",$$slots:{default:[Du]},$$scope:{ctx:F}}}),to=new bt({props:{$$slots:{default:[Gu]},$$scope:{ctx:F}}}),ln=new O({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/main/src/transformers/models/blenderbot/tokenization_blenderbot_fast.py#L282",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>
`}}),cn=new $e({}),pn=new O({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_blenderbot.py#L1095"}}),fn=new O({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_blenderbot.py#L1137",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),no=new bt({props:{$$slots:{default:[Wu]},$$scope:{ctx:F}}}),so=new xe({props:{anchor:"transformers.BlenderbotModel.forward.example",$$slots:{default:[Uu]},$$scope:{ctx:F}}}),_n=new $e({}),gn=new O({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_blenderbot.py#L1235"}}),vn=new O({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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/main/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/main/src/transformers/models/blenderbot/modeling_blenderbot.py#L1296",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ro=new bt({props:{$$slots:{default:[Hu]},$$scope:{ctx:F}}}),io=new xe({props:{anchor:"transformers.BlenderbotForConditionalGeneration.forward.example",$$slots:{default:[Ru]},$$scope:{ctx:F}}}),Tn=new $e({}),wn=new O({props:{name:"class transformers.BlenderbotForCausalLM",anchor:"transformers.BlenderbotForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_blenderbot.py#L1432"}}),$n=new O({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_blenderbot.py#L1465",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),po=new xe({props:{anchor:"transformers.BlenderbotForCausalLM.forward.example",$$slots:{default:[Vu]},$$scope:{ctx:F}}}),xn=new $e({}),zn=new O({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/main/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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1168"}}),uo=new bt({props:{$$slots:{default:[Ku]},$$scope:{ctx:F}}}),jn=new O({props:{name:"call",anchor:"transformers.TFBlenderbotModel.call",parameters:[{name:"input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple, transformers.modeling_tf_outputs.TFBaseModelOutput, NoneType] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = 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"},{name:"training",val:": typing.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/main/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1196",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),mo=new bt({props:{$$slots:{default:[Ju]},$$scope:{ctx:F}}}),fo=new xe({props:{anchor:"transformers.TFBlenderbotModel.call.example",$$slots:{default:[Xu]},$$scope:{ctx:F}}}),En=new $e({}),Mn=new O({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/main/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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1289"}}),go=new bt({props:{$$slots:{default:[Yu]},$$scope:{ctx:F}}}),On=new O({props:{name:"call",anchor:"transformers.TFBlenderbotForConditionalGeneration.call",parameters:[{name:"input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple, transformers.modeling_tf_outputs.TFBaseModelOutput, NoneType] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = 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"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/main/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1343",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),bo=new bt({props:{$$slots:{default:[Qu]},$$scope:{ctx:F}}}),ko=new xe({props:{anchor:"transformers.TFBlenderbotForConditionalGeneration.call.example",$$slots:{default:[Zu]},$$scope:{ctx:F}}}),Nn=new $e({}),In=new O({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/main/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/main/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/main/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1218"}}),Rn=new O({props:{name:"__call__",anchor:"transformers.FlaxBlenderbotModel.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1153",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vo=new bt({props:{$$slots:{default:[em]},$$scope:{ctx:F}}}),To=new xe({props:{anchor:"transformers.FlaxBlenderbotModel.__call__.example",$$slots:{default:[tm]},$$scope:{ctx:F}}}),Vn=new O({props:{name:"encode",anchor:"transformers.FlaxBlenderbotModel.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L974",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$o=new xe({props:{anchor:"transformers.FlaxBlenderbotModel.encode.example",$$slots:{default:[om]},$$scope:{ctx:F}}}),Kn=new O({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._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"past_key_values",val:": dict = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zo=new xe({props:{anchor:"transformers.FlaxBlenderbotModel.decode.example",$$slots:{default:[nm]},$$scope:{ctx:F}}}),Jn=new $e({}),Xn=new O({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/main/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/main/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/main/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1303"}}),ss=new O({props:{name:"__call__",anchor:"transformers.FlaxBlenderbotForConditionalGeneration.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1153",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Bo=new bt({props:{$$slots:{default:[sm]},$$scope:{ctx:F}}}),qo=new xe({props:{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.__call__.example",$$slots:{default:[am]},$$scope:{ctx:F}}}),as=new O({props:{name:"encode",anchor:"transformers.FlaxBlenderbotForConditionalGeneration.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L974",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Eo=new xe({props:{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.encode.example",$$slots:{default:[rm]},$$scope:{ctx:F}}}),rs=new O({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._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"past_key_values",val:": dict = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1307",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Co=new xe({props:{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.decode.example",$$slots:{default:[dm]},$$scope:{ctx:F}}}),{c(){l=s("meta"),k=h(),f=s("h1"),p=s("a"),b=s("span"),y(n.$$.fragment),c=h(),B=s("span"),X=d("Blenderbot"),N=h(),A=s("p"),Q=s("strong"),Fe=d("DISCLAIMER:"),q=d(" If you see something strange, file a "),le=s("a"),ce=d("Github Issue"),Ze=d(" ."),Ge=h(),I=s("h2"),Z=s("a"),Be=s("span"),y(V.$$.fragment),et=h(),qe=s("span"),pe=d("Overview"),We=h(),ee=s("p"),he=d("The Blender chatbot model was proposed in "),ue=s("a"),tt=d("Recipes for building an open-domain chatbot"),je=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.`),M=h(),P=s("p"),ot=d("The abstract of the paper is the following:"),te=h(),Te=s("p"),Ee=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.`),Ue=h(),we=s("p"),S=d("Tips:"),He=h(),K=s("ul"),Me=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=h(),J=s("p"),st=d("This model was contributed by "),L=s("a"),at=d("sshleifer"),fe=d(". The authors\u2019 code can be found "),_e=s("a"),Ce=d("here"),D=d(" ."),Re=h(),C=s("h2"),ne=s("a"),Ae=s("span"),y(z.$$.fragment),j=h(),rt=s("span"),Pe=d("Implementation Notes"),ut=h(),se=s("ul"),E=s("li"),kt=d("Blenderbot uses a standard "),Oe=s("a"),yt=d("seq2seq model transformer"),vt=d(" based architecture."),Tt=h(),G=s("li"),ge=d("Available checkpoints can be found in the "),Ne=s("a"),wt=d("model hub"),be=d("."),$t=h(),Y=s("li"),dt=d("This is the "),it=s("em"),Ie=d("default"),xt=d(` Blenderbot model class. However, some smaller checkpoints, such as
`),Us=s("code"),yd=d("facebook/blenderbot_small_90M"),vd=d(`, have a different architecture and consequently should be used with
`),us=s("a"),Td=d("BlenderbotSmall"),wd=d("."),hr=h(),zt=s("h2"),Vt=s("a"),Hs=s("span"),y(Vo.$$.fragment),$d=h(),Rs=s("span"),xd=d("Usage"),ur=h(),ms=s("p"),zd=d("Here is an example of model usage:"),mr=h(),y(Ko.$$.fragment),fr=h(),Ft=s("h2"),Kt=s("a"),Vs=s("span"),y(Jo.$$.fragment),Fd=h(),Ks=s("span"),Bd=d("BlenderbotConfig"),_r=h(),Se=s("div"),y(Xo.$$.fragment),qd=h(),Bt=s("p"),jd=d("This is the configuration class to store the configuration of a "),fs=s("a"),Ed=d("BlenderbotModel"),Md=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
`),Yo=s("a"),Cd=d("facebook/blenderbot-3B"),Ad=d(" architecture."),Pd=h(),qt=s("p"),Od=d("Configuration objects inherit from "),_s=s("a"),Nd=d("PretrainedConfig"),Id=d(` and can be used to control the model outputs. Read the
documentation from `),gs=s("a"),Sd=d("PretrainedConfig"),Ld=d(" for more information."),Dd=h(),y(Jt.$$.fragment),gr=h(),jt=s("h2"),Xt=s("a"),Js=s("span"),y(Qo.$$.fragment),Gd=h(),Xs=s("span"),Wd=d("BlenderbotTokenizer"),br=h(),W=s("div"),y(Zo.$$.fragment),Ud=h(),Ys=s("p"),Hd=d("Constructs a Blenderbot tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),Rd=h(),Qs=s("p"),Vd=d("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Kd=h(),y(Yt.$$.fragment),Jd=h(),en=s("p"),Xd=d("You can get around that behavior by passing "),Zs=s("code"),Yd=d("add_prefix_space=True"),Qd=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.`),Zd=h(),y(Qt.$$.fragment),ei=h(),tn=s("p"),ti=d("This tokenizer inherits from "),bs=s("a"),oi=d("PreTrainedTokenizer"),ni=d(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),si=h(),mt=s("div"),y(on.$$.fragment),ai=h(),ea=s("p"),ri=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:`),di=h(),ta=s("ul"),ks=s("li"),ii=d("single sequence: "),oa=s("code"),li=d("X </s>"),kr=h(),Et=s("h2"),Zt=s("a"),na=s("span"),y(nn.$$.fragment),ci=h(),sa=s("span"),pi=d("BlenderbotTokenizerFast"),yr=h(),U=s("div"),y(sn.$$.fragment),hi=h(),an=s("p"),ui=d("Construct a \u201Cfast\u201D Blenderbot tokenizer (backed by HuggingFace\u2019s "),aa=s("em"),mi=d("tokenizers"),fi=d(` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),_i=h(),ra=s("p"),gi=d("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),bi=h(),y(eo.$$.fragment),ki=h(),rn=s("p"),yi=d("You can get around that behavior by passing "),da=s("code"),vi=d("add_prefix_space=True"),Ti=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.`),wi=h(),y(to.$$.fragment),$i=h(),dn=s("p"),xi=d("This tokenizer inherits from "),ys=s("a"),zi=d("PreTrainedTokenizerFast"),Fi=d(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Bi=h(),ft=s("div"),y(ln.$$.fragment),qi=h(),ia=s("p"),ji=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=h(),la=s("ul"),vs=s("li"),Mi=d("single sequence: "),ca=s("code"),Ci=d("X </s>"),vr=h(),Mt=s("h2"),oo=s("a"),pa=s("span"),y(cn.$$.fragment),Ai=h(),ha=s("span"),Pi=d("BlenderbotModel"),Tr=h(),lt=s("p"),Oi=d("See "),ua=s("code"),Ni=d("transformers.BartModel"),Ii=d(" for arguments to "),ma=s("em"),Si=d("forward"),Li=d(" and "),fa=s("em"),Di=d("generate"),wr=h(),Le=s("div"),y(pn.$$.fragment),Gi=h(),hn=s("p"),Wi=d(`The bare Blenderbot Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ts=s("a"),Ui=d("PreTrainedModel"),Hi=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.)`),Ri=h(),un=s("p"),Vi=d("This model is also a PyTorch "),mn=s("a"),Ki=d("torch.nn.Module"),Ji=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=h(),Ve=s("div"),y(fn.$$.fragment),Yi=h(),Ct=s("p"),Qi=d("The "),ws=s("a"),Zi=d("BlenderbotModel"),el=d(" forward method, overrides the "),_a=s("code"),tl=d("__call__"),ol=d(" special method."),nl=h(),y(no.$$.fragment),sl=h(),y(so.$$.fragment),$r=h(),At=s("h2"),ao=s("a"),ga=s("span"),y(_n.$$.fragment),al=h(),ba=s("span"),rl=d("BlenderbotForConditionalGeneration"),xr=h(),ct=s("p"),dl=d("See "),$s=s("a"),il=d("BartForConditionalGeneration"),ll=d(" for arguments to "),ka=s("em"),cl=d("forward"),pl=d(" and "),ya=s("em"),hl=d("generate"),zr=h(),De=s("div"),y(gn.$$.fragment),ul=h(),bn=s("p"),ml=d(`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),xs=s("a"),fl=d("PreTrainedModel"),_l=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.)`),gl=h(),kn=s("p"),bl=d("This model is also a PyTorch "),yn=s("a"),kl=d("torch.nn.Module"),yl=d(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vl=h(),Ke=s("div"),y(vn.$$.fragment),Tl=h(),Pt=s("p"),wl=d("The "),zs=s("a"),$l=d("BlenderbotForConditionalGeneration"),xl=d(" forward method, overrides the "),va=s("code"),zl=d("__call__"),Fl=d(" special method."),Bl=h(),y(ro.$$.fragment),ql=h(),y(io.$$.fragment),Fr=h(),Ot=s("h2"),lo=s("a"),Ta=s("span"),y(Tn.$$.fragment),jl=h(),wa=s("span"),El=d("BlenderbotForCausalLM"),Br=h(),Nt=s("div"),y(wn.$$.fragment),Ml=h(),co=s("div"),y($n.$$.fragment),Cl=h(),y(po.$$.fragment),qr=h(),It=s("h2"),ho=s("a"),$a=s("span"),y(xn.$$.fragment),Al=h(),xa=s("span"),Pl=d("TFBlenderbotModel"),jr=h(),ke=s("div"),y(zn.$$.fragment),Ol=h(),Fn=s("p"),Nl=d(`The bare BLENDERBOT Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Fs=s("a"),Il=d("TFPreTrainedModel"),Sl=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.)`),Ll=h(),Bn=s("p"),Dl=d("This model is also a "),qn=s("a"),Gl=d("tf.keras.Model"),Wl=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.`),Ul=h(),y(uo.$$.fragment),Hl=h(),Je=s("div"),y(jn.$$.fragment),Rl=h(),St=s("p"),Vl=d("The "),Bs=s("a"),Kl=d("TFBlenderbotModel"),Jl=d(" forward method, overrides the "),za=s("code"),Xl=d("__call__"),Yl=d(" special method."),Ql=h(),y(mo.$$.fragment),Zl=h(),y(fo.$$.fragment),Er=h(),Lt=s("h2"),_o=s("a"),Fa=s("span"),y(En.$$.fragment),ec=h(),Ba=s("span"),tc=d("TFBlenderbotForConditionalGeneration"),Mr=h(),ye=s("div"),y(Mn.$$.fragment),oc=h(),Cn=s("p"),nc=d(`The BLENDERBOT Model with a language modeling head. Can be used for summarization.
This model inherits from `),qs=s("a"),sc=d("TFPreTrainedModel"),ac=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.)`),rc=h(),An=s("p"),dc=d("This model is also a "),Pn=s("a"),ic=d("tf.keras.Model"),lc=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=h(),y(go.$$.fragment),pc=h(),Xe=s("div"),y(On.$$.fragment),hc=h(),Dt=s("p"),uc=d("The "),js=s("a"),mc=d("TFBlenderbotForConditionalGeneration"),fc=d(" forward method, overrides the "),qa=s("code"),_c=d("__call__"),gc=d(" special method."),bc=h(),y(bo.$$.fragment),kc=h(),y(ko.$$.fragment),Cr=h(),Gt=s("h2"),yo=s("a"),ja=s("span"),y(Nn.$$.fragment),yc=h(),Ea=s("span"),vc=d("FlaxBlenderbotModel"),Ar=h(),H=s("div"),y(In.$$.fragment),Tc=h(),Sn=s("p"),wc=d(`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Es=s("a"),$c=d("FlaxPreTrainedModel"),xc=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.)`),zc=h(),Ln=s("p"),Fc=d(`This model is also a Flax Linen
`),Dn=s("a"),Bc=d("flax.nn.Module"),qc=d(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),jc=h(),Ma=s("p"),Ec=d("Finally, this model supports inherent JAX features such as:"),Mc=h(),pt=s("ul"),Ca=s("li"),Gn=s("a"),Cc=d("Just-In-Time (JIT) compilation"),Ac=h(),Aa=s("li"),Wn=s("a"),Pc=d("Automatic Differentiation"),Oc=h(),Pa=s("li"),Un=s("a"),Nc=d("Vectorization"),Ic=h(),Oa=s("li"),Hn=s("a"),Sc=d("Parallelization"),Lc=h(),Ye=s("div"),y(Rn.$$.fragment),Dc=h(),Wt=s("p"),Gc=d("The "),Na=s("code"),Wc=d("FlaxBlenderbotPreTrainedModel"),Uc=d(" forward method, overrides the "),Ia=s("code"),Hc=d("__call__"),Rc=d(" special method."),Vc=h(),y(vo.$$.fragment),Kc=h(),y(To.$$.fragment),Jc=h(),wo=s("div"),y(Vn.$$.fragment),Xc=h(),y($o.$$.fragment),Yc=h(),xo=s("div"),y(Kn.$$.fragment),Qc=h(),y(zo.$$.fragment),Pr=h(),Ut=s("h2"),Fo=s("a"),Sa=s("span"),y(Jn.$$.fragment),Zc=h(),La=s("span"),ep=d("FlaxBlenderbotForConditionalGeneration"),Or=h(),R=s("div"),y(Xn.$$.fragment),tp=h(),Yn=s("p"),op=d(`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Ms=s("a"),np=d("FlaxPreTrainedModel"),sp=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.)`),ap=h(),Qn=s("p"),rp=d(`This model is also a Flax Linen
`),Zn=s("a"),dp=d("flax.nn.Module"),ip=d(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),lp=h(),Da=s("p"),cp=d("Finally, this model supports inherent JAX features such as:"),pp=h(),ht=s("ul"),Ga=s("li"),es=s("a"),hp=d("Just-In-Time (JIT) compilation"),up=h(),Wa=s("li"),ts=s("a"),mp=d("Automatic Differentiation"),fp=h(),Ua=s("li"),os=s("a"),_p=d("Vectorization"),gp=h(),Ha=s("li"),ns=s("a"),bp=d("Parallelization"),kp=h(),Qe=s("div"),y(ss.$$.fragment),yp=h(),Ht=s("p"),vp=d("The "),Ra=s("code"),Tp=d("FlaxBlenderbotPreTrainedModel"),wp=d(" forward method, overrides the "),Va=s("code"),$p=d("__call__"),xp=d(" special method."),zp=h(),y(Bo.$$.fragment),Fp=h(),y(qo.$$.fragment),Bp=h(),jo=s("div"),y(as.$$.fragment),qp=h(),y(Eo.$$.fragment),jp=h(),Mo=s("div"),y(rs.$$.fragment),Ep=h(),y(Co.$$.fragment),this.h()},l(o){const g=Ou('[data-svelte="svelte-1phssyn"]',document.head);l=a(g,"META",{name:!0,content:!0}),g.forEach(t),k=u(o),f=a(o,"H1",{class:!0});var ds=r(f);p=a(ds,"A",{id:!0,class:!0,href:!0});var Ka=r(p);b=a(Ka,"SPAN",{});var Ja=r(b);v(n.$$.fragment,Ja),Ja.forEach(t),Ka.forEach(t),c=u(ds),B=a(ds,"SPAN",{});var Xa=r(B);X=i(Xa,"Blenderbot"),Xa.forEach(t),ds.forEach(t),N=u(o),A=a(o,"P",{});var Ao=r(A);Q=a(Ao,"STRONG",{});var Ya=r(Q);Fe=i(Ya,"DISCLAIMER:"),Ya.forEach(t),q=i(Ao," If you see something strange, file a "),le=a(Ao,"A",{href:!0,rel:!0});var Qa=r(le);ce=i(Qa,"Github Issue"),Qa.forEach(t),Ze=i(Ao," ."),Ao.forEach(t),Ge=u(o),I=a(o,"H2",{class:!0});var is=r(I);Z=a(is,"A",{id:!0,class:!0,href:!0});var Za=r(Z);Be=a(Za,"SPAN",{});var er=r(Be);v(V.$$.fragment,er),er.forEach(t),Za.forEach(t),et=u(is),qe=a(is,"SPAN",{});var tr=r(qe);pe=i(tr,"Overview"),tr.forEach(t),is.forEach(t),We=u(o),ee=a(o,"P",{});var ls=r(ee);he=i(ls,"The Blender chatbot model was proposed in "),ue=a(ls,"A",{href:!0,rel:!0});var or=r(ue);tt=i(or,"Recipes for building an open-domain chatbot"),or.forEach(t),je=i(ls,` 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.`),ls.forEach(t),M=u(o),P=a(o,"P",{});var nr=r(P);ot=i(nr,"The abstract of the paper is the following:"),nr.forEach(t),te=u(o),Te=a(o,"P",{});var sr=r(Te);Ee=a(sr,"EM",{});var ar=r(Ee);me=i(ar,`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.`),ar.forEach(t),sr.forEach(t),Ue=u(o),we=a(o,"P",{});var rr=r(we);S=i(rr,"Tips:"),rr.forEach(t),He=u(o),K=a(o,"UL",{});var dr=r(K);Me=a(dr,"LI",{});var ir=r(Me);nt=i(ir,`Blenderbot is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),ir.forEach(t),dr.forEach(t),oe=u(o),J=a(o,"P",{});var Rt=r(J);st=i(Rt,"This model was contributed by "),L=a(Rt,"A",{href:!0,rel:!0});var lr=r(L);at=i(lr,"sshleifer"),lr.forEach(t),fe=i(Rt,". The authors\u2019 code can be found "),_e=a(Rt,"A",{href:!0,rel:!0});var cr=r(_e);Ce=i(cr,"here"),cr.forEach(t),D=i(Rt," ."),Rt.forEach(t),Re=u(o),C=a(o,"H2",{class:!0});var cs=r(C);ne=a(cs,"A",{id:!0,class:!0,href:!0});var pr=r(ne);Ae=a(pr,"SPAN",{});var Ap=r(Ae);v(z.$$.fragment,Ap),Ap.forEach(t),pr.forEach(t),j=u(cs),rt=a(cs,"SPAN",{});var Pp=r(rt);Pe=i(Pp,"Implementation Notes"),Pp.forEach(t),cs.forEach(t),ut=u(o),se=a(o,"UL",{});var Cs=r(se);E=a(Cs,"LI",{});var Ir=r(E);kt=i(Ir,"Blenderbot uses a standard "),Oe=a(Ir,"A",{href:!0,rel:!0});var Op=r(Oe);yt=i(Op,"seq2seq model transformer"),Op.forEach(t),vt=i(Ir," based architecture."),Ir.forEach(t),Tt=u(Cs),G=a(Cs,"LI",{});var Sr=r(G);ge=i(Sr,"Available checkpoints can be found in the "),Ne=a(Sr,"A",{href:!0,rel:!0});var Np=r(Ne);wt=i(Np,"model hub"),Np.forEach(t),be=i(Sr,"."),Sr.forEach(t),$t=u(Cs),Y=a(Cs,"LI",{});var Po=r(Y);dt=i(Po,"This is the "),it=a(Po,"EM",{});var Ip=r(it);Ie=i(Ip,"default"),Ip.forEach(t),xt=i(Po,` Blenderbot model class. However, some smaller checkpoints, such as
`),Us=a(Po,"CODE",{});var Sp=r(Us);yd=i(Sp,"facebook/blenderbot_small_90M"),Sp.forEach(t),vd=i(Po,`, have a different architecture and consequently should be used with
`),us=a(Po,"A",{href:!0});var Lp=r(us);Td=i(Lp,"BlenderbotSmall"),Lp.forEach(t),wd=i(Po,"."),Po.forEach(t),Cs.forEach(t),hr=u(o),zt=a(o,"H2",{class:!0});var Lr=r(zt);Vt=a(Lr,"A",{id:!0,class:!0,href:!0});var Dp=r(Vt);Hs=a(Dp,"SPAN",{});var Gp=r(Hs);v(Vo.$$.fragment,Gp),Gp.forEach(t),Dp.forEach(t),$d=u(Lr),Rs=a(Lr,"SPAN",{});var Wp=r(Rs);xd=i(Wp,"Usage"),Wp.forEach(t),Lr.forEach(t),ur=u(o),ms=a(o,"P",{});var Up=r(ms);zd=i(Up,"Here is an example of model usage:"),Up.forEach(t),mr=u(o),v(Ko.$$.fragment,o),fr=u(o),Ft=a(o,"H2",{class:!0});var Dr=r(Ft);Kt=a(Dr,"A",{id:!0,class:!0,href:!0});var Hp=r(Kt);Vs=a(Hp,"SPAN",{});var Rp=r(Vs);v(Jo.$$.fragment,Rp),Rp.forEach(t),Hp.forEach(t),Fd=u(Dr),Ks=a(Dr,"SPAN",{});var Vp=r(Ks);Bd=i(Vp,"BlenderbotConfig"),Vp.forEach(t),Dr.forEach(t),_r=u(o),Se=a(o,"DIV",{class:!0});var Oo=r(Se);v(Xo.$$.fragment,Oo),qd=u(Oo),Bt=a(Oo,"P",{});var As=r(Bt);jd=i(As,"This is the configuration class to store the configuration of a "),fs=a(As,"A",{href:!0});var Kp=r(fs);Ed=i(Kp,"BlenderbotModel"),Kp.forEach(t),Md=i(As,`. 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
`),Yo=a(As,"A",{href:!0,rel:!0});var Jp=r(Yo);Cd=i(Jp,"facebook/blenderbot-3B"),Jp.forEach(t),Ad=i(As," architecture."),As.forEach(t),Pd=u(Oo),qt=a(Oo,"P",{});var Ps=r(qt);Od=i(Ps,"Configuration objects inherit from "),_s=a(Ps,"A",{href:!0});var Xp=r(_s);Nd=i(Xp,"PretrainedConfig"),Xp.forEach(t),Id=i(Ps,` and can be used to control the model outputs. Read the
documentation from `),gs=a(Ps,"A",{href:!0});var Yp=r(gs);Sd=i(Yp,"PretrainedConfig"),Yp.forEach(t),Ld=i(Ps," for more information."),Ps.forEach(t),Dd=u(Oo),v(Jt.$$.fragment,Oo),Oo.forEach(t),gr=u(o),jt=a(o,"H2",{class:!0});var Gr=r(jt);Xt=a(Gr,"A",{id:!0,class:!0,href:!0});var Qp=r(Xt);Js=a(Qp,"SPAN",{});var Zp=r(Js);v(Qo.$$.fragment,Zp),Zp.forEach(t),Qp.forEach(t),Gd=u(Gr),Xs=a(Gr,"SPAN",{});var eh=r(Xs);Wd=i(eh,"BlenderbotTokenizer"),eh.forEach(t),Gr.forEach(t),br=u(o),W=a(o,"DIV",{class:!0});var ae=r(W);v(Zo.$$.fragment,ae),Ud=u(ae),Ys=a(ae,"P",{});var th=r(Ys);Hd=i(th,"Constructs a Blenderbot tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),th.forEach(t),Rd=u(ae),Qs=a(ae,"P",{});var oh=r(Qs);Vd=i(oh,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),oh.forEach(t),Kd=u(ae),v(Yt.$$.fragment,ae),Jd=u(ae),en=a(ae,"P",{});var Wr=r(en);Xd=i(Wr,"You can get around that behavior by passing "),Zs=a(Wr,"CODE",{});var nh=r(Zs);Yd=i(nh,"add_prefix_space=True"),nh.forEach(t),Qd=i(Wr,` 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.`),Wr.forEach(t),Zd=u(ae),v(Qt.$$.fragment,ae),ei=u(ae),tn=a(ae,"P",{});var Ur=r(tn);ti=i(Ur,"This tokenizer inherits from "),bs=a(Ur,"A",{href:!0});var sh=r(bs);oi=i(sh,"PreTrainedTokenizer"),sh.forEach(t),ni=i(Ur,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ur.forEach(t),si=u(ae),mt=a(ae,"DIV",{class:!0});var Os=r(mt);v(on.$$.fragment,Os),ai=u(Os),ea=a(Os,"P",{});var ah=r(ea);ri=i(ah,`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:`),ah.forEach(t),di=u(Os),ta=a(Os,"UL",{});var rh=r(ta);ks=a(rh,"LI",{});var Mp=r(ks);ii=i(Mp,"single sequence: "),oa=a(Mp,"CODE",{});var dh=r(oa);li=i(dh,"X </s>"),dh.forEach(t),Mp.forEach(t),rh.forEach(t),Os.forEach(t),ae.forEach(t),kr=u(o),Et=a(o,"H2",{class:!0});var Hr=r(Et);Zt=a(Hr,"A",{id:!0,class:!0,href:!0});var ih=r(Zt);na=a(ih,"SPAN",{});var lh=r(na);v(nn.$$.fragment,lh),lh.forEach(t),ih.forEach(t),ci=u(Hr),sa=a(Hr,"SPAN",{});var ch=r(sa);pi=i(ch,"BlenderbotTokenizerFast"),ch.forEach(t),Hr.forEach(t),yr=u(o),U=a(o,"DIV",{class:!0});var re=r(U);v(sn.$$.fragment,re),hi=u(re),an=a(re,"P",{});var Rr=r(an);ui=i(Rr,"Construct a \u201Cfast\u201D Blenderbot tokenizer (backed by HuggingFace\u2019s "),aa=a(Rr,"EM",{});var ph=r(aa);mi=i(ph,"tokenizers"),ph.forEach(t),fi=i(Rr,` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),Rr.forEach(t),_i=u(re),ra=a(re,"P",{});var hh=r(ra);gi=i(hh,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),hh.forEach(t),bi=u(re),v(eo.$$.fragment,re),ki=u(re),rn=a(re,"P",{});var Vr=r(rn);yi=i(Vr,"You can get around that behavior by passing "),da=a(Vr,"CODE",{});var uh=r(da);vi=i(uh,"add_prefix_space=True"),uh.forEach(t),Ti=i(Vr,` 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.`),Vr.forEach(t),wi=u(re),v(to.$$.fragment,re),$i=u(re),dn=a(re,"P",{});var Kr=r(dn);xi=i(Kr,"This tokenizer inherits from "),ys=a(Kr,"A",{href:!0});var mh=r(ys);zi=i(mh,"PreTrainedTokenizerFast"),mh.forEach(t),Fi=i(Kr,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Kr.forEach(t),Bi=u(re),ft=a(re,"DIV",{class:!0});var Ns=r(ft);v(ln.$$.fragment,Ns),qi=u(Ns),ia=a(Ns,"P",{});var fh=r(ia);ji=i(fh,`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:`),fh.forEach(t),Ei=u(Ns),la=a(Ns,"UL",{});var _h=r(la);vs=a(_h,"LI",{});var Cp=r(vs);Mi=i(Cp,"single sequence: "),ca=a(Cp,"CODE",{});var gh=r(ca);Ci=i(gh,"X </s>"),gh.forEach(t),Cp.forEach(t),_h.forEach(t),Ns.forEach(t),re.forEach(t),vr=u(o),Mt=a(o,"H2",{class:!0});var Jr=r(Mt);oo=a(Jr,"A",{id:!0,class:!0,href:!0});var bh=r(oo);pa=a(bh,"SPAN",{});var kh=r(pa);v(cn.$$.fragment,kh),kh.forEach(t),bh.forEach(t),Ai=u(Jr),ha=a(Jr,"SPAN",{});var yh=r(ha);Pi=i(yh,"BlenderbotModel"),yh.forEach(t),Jr.forEach(t),Tr=u(o),lt=a(o,"P",{});var ps=r(lt);Oi=i(ps,"See "),ua=a(ps,"CODE",{});var vh=r(ua);Ni=i(vh,"transformers.BartModel"),vh.forEach(t),Ii=i(ps," for arguments to "),ma=a(ps,"EM",{});var Th=r(ma);Si=i(Th,"forward"),Th.forEach(t),Li=i(ps," and "),fa=a(ps,"EM",{});var wh=r(fa);Di=i(wh,"generate"),wh.forEach(t),ps.forEach(t),wr=u(o),Le=a(o,"DIV",{class:!0});var No=r(Le);v(pn.$$.fragment,No),Gi=u(No),hn=a(No,"P",{});var Xr=r(hn);Wi=i(Xr,`The bare Blenderbot Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ts=a(Xr,"A",{href:!0});var $h=r(Ts);Ui=i($h,"PreTrainedModel"),$h.forEach(t),Hi=i(Xr,`. 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.)`),Xr.forEach(t),Ri=u(No),un=a(No,"P",{});var Yr=r(un);Vi=i(Yr,"This model is also a PyTorch "),mn=a(Yr,"A",{href:!0,rel:!0});var xh=r(mn);Ki=i(xh,"torch.nn.Module"),xh.forEach(t),Ji=i(Yr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Yr.forEach(t),Xi=u(No),Ve=a(No,"DIV",{class:!0});var Io=r(Ve);v(fn.$$.fragment,Io),Yi=u(Io),Ct=a(Io,"P",{});var Is=r(Ct);Qi=i(Is,"The "),ws=a(Is,"A",{href:!0});var zh=r(ws);Zi=i(zh,"BlenderbotModel"),zh.forEach(t),el=i(Is," forward method, overrides the "),_a=a(Is,"CODE",{});var Fh=r(_a);tl=i(Fh,"__call__"),Fh.forEach(t),ol=i(Is," special method."),Is.forEach(t),nl=u(Io),v(no.$$.fragment,Io),sl=u(Io),v(so.$$.fragment,Io),Io.forEach(t),No.forEach(t),$r=u(o),At=a(o,"H2",{class:!0});var Qr=r(At);ao=a(Qr,"A",{id:!0,class:!0,href:!0});var Bh=r(ao);ga=a(Bh,"SPAN",{});var qh=r(ga);v(_n.$$.fragment,qh),qh.forEach(t),Bh.forEach(t),al=u(Qr),ba=a(Qr,"SPAN",{});var jh=r(ba);rl=i(jh,"BlenderbotForConditionalGeneration"),jh.forEach(t),Qr.forEach(t),xr=u(o),ct=a(o,"P",{});var hs=r(ct);dl=i(hs,"See "),$s=a(hs,"A",{href:!0});var Eh=r($s);il=i(Eh,"BartForConditionalGeneration"),Eh.forEach(t),ll=i(hs," for arguments to "),ka=a(hs,"EM",{});var Mh=r(ka);cl=i(Mh,"forward"),Mh.forEach(t),pl=i(hs," and "),ya=a(hs,"EM",{});var Ch=r(ya);hl=i(Ch,"generate"),Ch.forEach(t),hs.forEach(t),zr=u(o),De=a(o,"DIV",{class:!0});var So=r(De);v(gn.$$.fragment,So),ul=u(So),bn=a(So,"P",{});var Zr=r(bn);ml=i(Zr,`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),xs=a(Zr,"A",{href:!0});var Ah=r(xs);fl=i(Ah,"PreTrainedModel"),Ah.forEach(t),_l=i(Zr,`. 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.)`),Zr.forEach(t),gl=u(So),kn=a(So,"P",{});var ed=r(kn);bl=i(ed,"This model is also a PyTorch "),yn=a(ed,"A",{href:!0,rel:!0});var Ph=r(yn);kl=i(Ph,"torch.nn.Module"),Ph.forEach(t),yl=i(ed,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ed.forEach(t),vl=u(So),Ke=a(So,"DIV",{class:!0});var Lo=r(Ke);v(vn.$$.fragment,Lo),Tl=u(Lo),Pt=a(Lo,"P",{});var Ss=r(Pt);wl=i(Ss,"The "),zs=a(Ss,"A",{href:!0});var Oh=r(zs);$l=i(Oh,"BlenderbotForConditionalGeneration"),Oh.forEach(t),xl=i(Ss," forward method, overrides the "),va=a(Ss,"CODE",{});var Nh=r(va);zl=i(Nh,"__call__"),Nh.forEach(t),Fl=i(Ss," special method."),Ss.forEach(t),Bl=u(Lo),v(ro.$$.fragment,Lo),ql=u(Lo),v(io.$$.fragment,Lo),Lo.forEach(t),So.forEach(t),Fr=u(o),Ot=a(o,"H2",{class:!0});var td=r(Ot);lo=a(td,"A",{id:!0,class:!0,href:!0});var Ih=r(lo);Ta=a(Ih,"SPAN",{});var Sh=r(Ta);v(Tn.$$.fragment,Sh),Sh.forEach(t),Ih.forEach(t),jl=u(td),wa=a(td,"SPAN",{});var Lh=r(wa);El=i(Lh,"BlenderbotForCausalLM"),Lh.forEach(t),td.forEach(t),Br=u(o),Nt=a(o,"DIV",{class:!0});var od=r(Nt);v(wn.$$.fragment,od),Ml=u(od),co=a(od,"DIV",{class:!0});var nd=r(co);v($n.$$.fragment,nd),Cl=u(nd),v(po.$$.fragment,nd),nd.forEach(t),od.forEach(t),qr=u(o),It=a(o,"H2",{class:!0});var sd=r(It);ho=a(sd,"A",{id:!0,class:!0,href:!0});var Dh=r(ho);$a=a(Dh,"SPAN",{});var Gh=r($a);v(xn.$$.fragment,Gh),Gh.forEach(t),Dh.forEach(t),Al=u(sd),xa=a(sd,"SPAN",{});var Wh=r(xa);Pl=i(Wh,"TFBlenderbotModel"),Wh.forEach(t),sd.forEach(t),jr=u(o),ke=a(o,"DIV",{class:!0});var _t=r(ke);v(zn.$$.fragment,_t),Ol=u(_t),Fn=a(_t,"P",{});var ad=r(Fn);Nl=i(ad,`The bare BLENDERBOT Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Fs=a(ad,"A",{href:!0});var Uh=r(Fs);Il=i(Uh,"TFPreTrainedModel"),Uh.forEach(t),Sl=i(ad,`. 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.)`),ad.forEach(t),Ll=u(_t),Bn=a(_t,"P",{});var rd=r(Bn);Dl=i(rd,"This model is also a "),qn=a(rd,"A",{href:!0,rel:!0});var Hh=r(qn);Gl=i(Hh,"tf.keras.Model"),Hh.forEach(t),Wl=i(rd,` 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.`),rd.forEach(t),Ul=u(_t),v(uo.$$.fragment,_t),Hl=u(_t),Je=a(_t,"DIV",{class:!0});var Do=r(Je);v(jn.$$.fragment,Do),Rl=u(Do),St=a(Do,"P",{});var Ls=r(St);Vl=i(Ls,"The "),Bs=a(Ls,"A",{href:!0});var Rh=r(Bs);Kl=i(Rh,"TFBlenderbotModel"),Rh.forEach(t),Jl=i(Ls," forward method, overrides the "),za=a(Ls,"CODE",{});var Vh=r(za);Xl=i(Vh,"__call__"),Vh.forEach(t),Yl=i(Ls," special method."),Ls.forEach(t),Ql=u(Do),v(mo.$$.fragment,Do),Zl=u(Do),v(fo.$$.fragment,Do),Do.forEach(t),_t.forEach(t),Er=u(o),Lt=a(o,"H2",{class:!0});var dd=r(Lt);_o=a(dd,"A",{id:!0,class:!0,href:!0});var Kh=r(_o);Fa=a(Kh,"SPAN",{});var Jh=r(Fa);v(En.$$.fragment,Jh),Jh.forEach(t),Kh.forEach(t),ec=u(dd),Ba=a(dd,"SPAN",{});var Xh=r(Ba);tc=i(Xh,"TFBlenderbotForConditionalGeneration"),Xh.forEach(t),dd.forEach(t),Mr=u(o),ye=a(o,"DIV",{class:!0});var gt=r(ye);v(Mn.$$.fragment,gt),oc=u(gt),Cn=a(gt,"P",{});var id=r(Cn);nc=i(id,`The BLENDERBOT Model with a language modeling head. Can be used for summarization.
This model inherits from `),qs=a(id,"A",{href:!0});var Yh=r(qs);sc=i(Yh,"TFPreTrainedModel"),Yh.forEach(t),ac=i(id,`. 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.)`),id.forEach(t),rc=u(gt),An=a(gt,"P",{});var ld=r(An);dc=i(ld,"This model is also a "),Pn=a(ld,"A",{href:!0,rel:!0});var Qh=r(Pn);ic=i(Qh,"tf.keras.Model"),Qh.forEach(t),lc=i(ld,` 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.`),ld.forEach(t),cc=u(gt),v(go.$$.fragment,gt),pc=u(gt),Xe=a(gt,"DIV",{class:!0});var Go=r(Xe);v(On.$$.fragment,Go),hc=u(Go),Dt=a(Go,"P",{});var Ds=r(Dt);uc=i(Ds,"The "),js=a(Ds,"A",{href:!0});var Zh=r(js);mc=i(Zh,"TFBlenderbotForConditionalGeneration"),Zh.forEach(t),fc=i(Ds," forward method, overrides the "),qa=a(Ds,"CODE",{});var eu=r(qa);_c=i(eu,"__call__"),eu.forEach(t),gc=i(Ds," special method."),Ds.forEach(t),bc=u(Go),v(bo.$$.fragment,Go),kc=u(Go),v(ko.$$.fragment,Go),Go.forEach(t),gt.forEach(t),Cr=u(o),Gt=a(o,"H2",{class:!0});var cd=r(Gt);yo=a(cd,"A",{id:!0,class:!0,href:!0});var tu=r(yo);ja=a(tu,"SPAN",{});var ou=r(ja);v(Nn.$$.fragment,ou),ou.forEach(t),tu.forEach(t),yc=u(cd),Ea=a(cd,"SPAN",{});var nu=r(Ea);vc=i(nu,"FlaxBlenderbotModel"),nu.forEach(t),cd.forEach(t),Ar=u(o),H=a(o,"DIV",{class:!0});var de=r(H);v(In.$$.fragment,de),Tc=u(de),Sn=a(de,"P",{});var pd=r(Sn);wc=i(pd,`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Es=a(pd,"A",{href:!0});var su=r(Es);$c=i(su,"FlaxPreTrainedModel"),su.forEach(t),xc=i(pd,`. 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.)`),pd.forEach(t),zc=u(de),Ln=a(de,"P",{});var hd=r(Ln);Fc=i(hd,`This model is also a Flax Linen
`),Dn=a(hd,"A",{href:!0,rel:!0});var au=r(Dn);Bc=i(au,"flax.nn.Module"),au.forEach(t),qc=i(hd,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),hd.forEach(t),jc=u(de),Ma=a(de,"P",{});var ru=r(Ma);Ec=i(ru,"Finally, this model supports inherent JAX features such as:"),ru.forEach(t),Mc=u(de),pt=a(de,"UL",{});var Wo=r(pt);Ca=a(Wo,"LI",{});var du=r(Ca);Gn=a(du,"A",{href:!0,rel:!0});var iu=r(Gn);Cc=i(iu,"Just-In-Time (JIT) compilation"),iu.forEach(t),du.forEach(t),Ac=u(Wo),Aa=a(Wo,"LI",{});var lu=r(Aa);Wn=a(lu,"A",{href:!0,rel:!0});var cu=r(Wn);Pc=i(cu,"Automatic Differentiation"),cu.forEach(t),lu.forEach(t),Oc=u(Wo),Pa=a(Wo,"LI",{});var pu=r(Pa);Un=a(pu,"A",{href:!0,rel:!0});var hu=r(Un);Nc=i(hu,"Vectorization"),hu.forEach(t),pu.forEach(t),Ic=u(Wo),Oa=a(Wo,"LI",{});var uu=r(Oa);Hn=a(uu,"A",{href:!0,rel:!0});var mu=r(Hn);Sc=i(mu,"Parallelization"),mu.forEach(t),uu.forEach(t),Wo.forEach(t),Lc=u(de),Ye=a(de,"DIV",{class:!0});var Uo=r(Ye);v(Rn.$$.fragment,Uo),Dc=u(Uo),Wt=a(Uo,"P",{});var Gs=r(Wt);Gc=i(Gs,"The "),Na=a(Gs,"CODE",{});var fu=r(Na);Wc=i(fu,"FlaxBlenderbotPreTrainedModel"),fu.forEach(t),Uc=i(Gs," forward method, overrides the "),Ia=a(Gs,"CODE",{});var _u=r(Ia);Hc=i(_u,"__call__"),_u.forEach(t),Rc=i(Gs," special method."),Gs.forEach(t),Vc=u(Uo),v(vo.$$.fragment,Uo),Kc=u(Uo),v(To.$$.fragment,Uo),Uo.forEach(t),Jc=u(de),wo=a(de,"DIV",{class:!0});var ud=r(wo);v(Vn.$$.fragment,ud),Xc=u(ud),v($o.$$.fragment,ud),ud.forEach(t),Yc=u(de),xo=a(de,"DIV",{class:!0});var md=r(xo);v(Kn.$$.fragment,md),Qc=u(md),v(zo.$$.fragment,md),md.forEach(t),de.forEach(t),Pr=u(o),Ut=a(o,"H2",{class:!0});var fd=r(Ut);Fo=a(fd,"A",{id:!0,class:!0,href:!0});var gu=r(Fo);Sa=a(gu,"SPAN",{});var bu=r(Sa);v(Jn.$$.fragment,bu),bu.forEach(t),gu.forEach(t),Zc=u(fd),La=a(fd,"SPAN",{});var ku=r(La);ep=i(ku,"FlaxBlenderbotForConditionalGeneration"),ku.forEach(t),fd.forEach(t),Or=u(o),R=a(o,"DIV",{class:!0});var ie=r(R);v(Xn.$$.fragment,ie),tp=u(ie),Yn=a(ie,"P",{});var _d=r(Yn);op=i(_d,`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Ms=a(_d,"A",{href:!0});var yu=r(Ms);np=i(yu,"FlaxPreTrainedModel"),yu.forEach(t),sp=i(_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.)`),_d.forEach(t),ap=u(ie),Qn=a(ie,"P",{});var gd=r(Qn);rp=i(gd,`This model is also a Flax Linen
`),Zn=a(gd,"A",{href:!0,rel:!0});var vu=r(Zn);dp=i(vu,"flax.nn.Module"),vu.forEach(t),ip=i(gd,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),gd.forEach(t),lp=u(ie),Da=a(ie,"P",{});var Tu=r(Da);cp=i(Tu,"Finally, this model supports inherent JAX features such as:"),Tu.forEach(t),pp=u(ie),ht=a(ie,"UL",{});var Ho=r(ht);Ga=a(Ho,"LI",{});var wu=r(Ga);es=a(wu,"A",{href:!0,rel:!0});var $u=r(es);hp=i($u,"Just-In-Time (JIT) compilation"),$u.forEach(t),wu.forEach(t),up=u(Ho),Wa=a(Ho,"LI",{});var xu=r(Wa);ts=a(xu,"A",{href:!0,rel:!0});var zu=r(ts);mp=i(zu,"Automatic Differentiation"),zu.forEach(t),xu.forEach(t),fp=u(Ho),Ua=a(Ho,"LI",{});var Fu=r(Ua);os=a(Fu,"A",{href:!0,rel:!0});var Bu=r(os);_p=i(Bu,"Vectorization"),Bu.forEach(t),Fu.forEach(t),gp=u(Ho),Ha=a(Ho,"LI",{});var qu=r(Ha);ns=a(qu,"A",{href:!0,rel:!0});var ju=r(ns);bp=i(ju,"Parallelization"),ju.forEach(t),qu.forEach(t),Ho.forEach(t),kp=u(ie),Qe=a(ie,"DIV",{class:!0});var Ro=r(Qe);v(ss.$$.fragment,Ro),yp=u(Ro),Ht=a(Ro,"P",{});var Ws=r(Ht);vp=i(Ws,"The "),Ra=a(Ws,"CODE",{});var Eu=r(Ra);Tp=i(Eu,"FlaxBlenderbotPreTrainedModel"),Eu.forEach(t),wp=i(Ws," forward method, overrides the "),Va=a(Ws,"CODE",{});var Mu=r(Va);$p=i(Mu,"__call__"),Mu.forEach(t),xp=i(Ws," special method."),Ws.forEach(t),zp=u(Ro),v(Bo.$$.fragment,Ro),Fp=u(Ro),v(qo.$$.fragment,Ro),Ro.forEach(t),Bp=u(ie),jo=a(ie,"DIV",{class:!0});var bd=r(jo);v(as.$$.fragment,bd),qp=u(bd),v(Eo.$$.fragment,bd),bd.forEach(t),jp=u(ie),Mo=a(ie,"DIV",{class:!0});var kd=r(Mo);v(rs.$$.fragment,kd),Ep=u(kd),v(Co.$$.fragment,kd),kd.forEach(t),ie.forEach(t),this.h()},h(){m(l,"name","hf:doc:metadata"),m(l,"content",JSON.stringify(lm)),m(p,"id","blenderbot"),m(p,"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(p,"href","#blenderbot"),m(f,"class","relative group"),m(le,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),m(le,"rel","nofollow"),m(Z,"id","overview"),m(Z,"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(Z,"href","#overview"),m(I,"class","relative group"),m(ue,"href","https://arxiv.org/pdf/2004.13637.pdf"),m(ue,"rel","nofollow"),m(L,"href","https://huggingface.co/sshleifer"),m(L,"rel","nofollow"),m(_e,"href","https://github.com/facebookresearch/ParlAI"),m(_e,"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(Oe,"href","https://arxiv.org/pdf/1706.03762.pdf"),m(Oe,"rel","nofollow"),m(Ne,"href","https://huggingface.co/models?search=blenderbot"),m(Ne,"rel","nofollow"),m(us,"href","blenderbot-small"),m(Vt,"id","usage"),m(Vt,"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(Vt,"href","#usage"),m(zt,"class","relative group"),m(Kt,"id","transformers.BlenderbotConfig"),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.BlenderbotConfig"),m(Ft,"class","relative group"),m(fs,"href","/docs/transformers/main/en/model_doc/blenderbot#transformers.BlenderbotModel"),m(Yo,"href","https://huggingface.co/facebook/blenderbot-3B"),m(Yo,"rel","nofollow"),m(_s,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(gs,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Xt,"id","transformers.BlenderbotTokenizer"),m(Xt,"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(Xt,"href","#transformers.BlenderbotTokenizer"),m(jt,"class","relative group"),m(bs,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Zt,"id","transformers.BlenderbotTokenizerFast"),m(Zt,"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(Zt,"href","#transformers.BlenderbotTokenizerFast"),m(Et,"class","relative group"),m(ys,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),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(U,"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.BlenderbotModel"),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.BlenderbotModel"),m(Mt,"class","relative group"),m(Ts,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(mn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(mn,"rel","nofollow"),m(ws,"href","/docs/transformers/main/en/model_doc/blenderbot#transformers.BlenderbotModel"),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(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(ao,"id","transformers.BlenderbotForConditionalGeneration"),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.BlenderbotForConditionalGeneration"),m(At,"class","relative group"),m($s,"href","/docs/transformers/main/en/model_doc/bart#transformers.BartForConditionalGeneration"),m(xs,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(yn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(yn,"rel","nofollow"),m(zs,"href","/docs/transformers/main/en/model_doc/blenderbot#transformers.BlenderbotForConditionalGeneration"),m(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(lo,"id","transformers.BlenderbotForCausalLM"),m(lo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(lo,"href","#transformers.BlenderbotForCausalLM"),m(Ot,"class","relative group"),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(Nt,"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.TFBlenderbotModel"),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.TFBlenderbotModel"),m(It,"class","relative group"),m(Fs,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),m(qn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(qn,"rel","nofollow"),m(Bs,"href","/docs/transformers/main/en/model_doc/blenderbot#transformers.TFBlenderbotModel"),m(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_o,"id","transformers.TFBlenderbotForConditionalGeneration"),m(_o,"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(_o,"href","#transformers.TFBlenderbotForConditionalGeneration"),m(Lt,"class","relative group"),m(qs,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),m(Pn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Pn,"rel","nofollow"),m(js,"href","/docs/transformers/main/en/model_doc/blenderbot#transformers.TFBlenderbotForConditionalGeneration"),m(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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.FlaxBlenderbotModel"),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.FlaxBlenderbotModel"),m(Gt,"class","relative group"),m(Es,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Dn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Dn,"rel","nofollow"),m(Gn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Gn,"rel","nofollow"),m(Wn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Wn,"rel","nofollow"),m(Un,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Un,"rel","nofollow"),m(Hn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Hn,"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(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(H,"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.FlaxBlenderbotForConditionalGeneration"),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.FlaxBlenderbotForConditionalGeneration"),m(Ut,"class","relative group"),m(Ms,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Zn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Zn,"rel","nofollow"),m(es,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(es,"rel","nofollow"),m(ts,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(ts,"rel","nofollow"),m(os,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(os,"rel","nofollow"),m(ns,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(ns,"rel","nofollow"),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(jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){e(document.head,l),_(o,k,g),_(o,f,g),e(f,p),e(p,b),T(n,b,null),e(f,c),e(f,B),e(B,X),_(o,N,g),_(o,A,g),e(A,Q),e(Q,Fe),e(A,q),e(A,le),e(le,ce),e(A,Ze),_(o,Ge,g),_(o,I,g),e(I,Z),e(Z,Be),T(V,Be,null),e(I,et),e(I,qe),e(qe,pe),_(o,We,g),_(o,ee,g),e(ee,he),e(ee,ue),e(ue,tt),e(ee,je),_(o,M,g),_(o,P,g),e(P,ot),_(o,te,g),_(o,Te,g),e(Te,Ee),e(Ee,me),_(o,Ue,g),_(o,we,g),e(we,S),_(o,He,g),_(o,K,g),e(K,Me),e(Me,nt),_(o,oe,g),_(o,J,g),e(J,st),e(J,L),e(L,at),e(J,fe),e(J,_e),e(_e,Ce),e(J,D),_(o,Re,g),_(o,C,g),e(C,ne),e(ne,Ae),T(z,Ae,null),e(C,j),e(C,rt),e(rt,Pe),_(o,ut,g),_(o,se,g),e(se,E),e(E,kt),e(E,Oe),e(Oe,yt),e(E,vt),e(se,Tt),e(se,G),e(G,ge),e(G,Ne),e(Ne,wt),e(G,be),e(se,$t),e(se,Y),e(Y,dt),e(Y,it),e(it,Ie),e(Y,xt),e(Y,Us),e(Us,yd),e(Y,vd),e(Y,us),e(us,Td),e(Y,wd),_(o,hr,g),_(o,zt,g),e(zt,Vt),e(Vt,Hs),T(Vo,Hs,null),e(zt,$d),e(zt,Rs),e(Rs,xd),_(o,ur,g),_(o,ms,g),e(ms,zd),_(o,mr,g),T(Ko,o,g),_(o,fr,g),_(o,Ft,g),e(Ft,Kt),e(Kt,Vs),T(Jo,Vs,null),e(Ft,Fd),e(Ft,Ks),e(Ks,Bd),_(o,_r,g),_(o,Se,g),T(Xo,Se,null),e(Se,qd),e(Se,Bt),e(Bt,jd),e(Bt,fs),e(fs,Ed),e(Bt,Md),e(Bt,Yo),e(Yo,Cd),e(Bt,Ad),e(Se,Pd),e(Se,qt),e(qt,Od),e(qt,_s),e(_s,Nd),e(qt,Id),e(qt,gs),e(gs,Sd),e(qt,Ld),e(Se,Dd),T(Jt,Se,null),_(o,gr,g),_(o,jt,g),e(jt,Xt),e(Xt,Js),T(Qo,Js,null),e(jt,Gd),e(jt,Xs),e(Xs,Wd),_(o,br,g),_(o,W,g),T(Zo,W,null),e(W,Ud),e(W,Ys),e(Ys,Hd),e(W,Rd),e(W,Qs),e(Qs,Vd),e(W,Kd),T(Yt,W,null),e(W,Jd),e(W,en),e(en,Xd),e(en,Zs),e(Zs,Yd),e(en,Qd),e(W,Zd),T(Qt,W,null),e(W,ei),e(W,tn),e(tn,ti),e(tn,bs),e(bs,oi),e(tn,ni),e(W,si),e(W,mt),T(on,mt,null),e(mt,ai),e(mt,ea),e(ea,ri),e(mt,di),e(mt,ta),e(ta,ks),e(ks,ii),e(ks,oa),e(oa,li),_(o,kr,g),_(o,Et,g),e(Et,Zt),e(Zt,na),T(nn,na,null),e(Et,ci),e(Et,sa),e(sa,pi),_(o,yr,g),_(o,U,g),T(sn,U,null),e(U,hi),e(U,an),e(an,ui),e(an,aa),e(aa,mi),e(an,fi),e(U,_i),e(U,ra),e(ra,gi),e(U,bi),T(eo,U,null),e(U,ki),e(U,rn),e(rn,yi),e(rn,da),e(da,vi),e(rn,Ti),e(U,wi),T(to,U,null),e(U,$i),e(U,dn),e(dn,xi),e(dn,ys),e(ys,zi),e(dn,Fi),e(U,Bi),e(U,ft),T(ln,ft,null),e(ft,qi),e(ft,ia),e(ia,ji),e(ft,Ei),e(ft,la),e(la,vs),e(vs,Mi),e(vs,ca),e(ca,Ci),_(o,vr,g),_(o,Mt,g),e(Mt,oo),e(oo,pa),T(cn,pa,null),e(Mt,Ai),e(Mt,ha),e(ha,Pi),_(o,Tr,g),_(o,lt,g),e(lt,Oi),e(lt,ua),e(ua,Ni),e(lt,Ii),e(lt,ma),e(ma,Si),e(lt,Li),e(lt,fa),e(fa,Di),_(o,wr,g),_(o,Le,g),T(pn,Le,null),e(Le,Gi),e(Le,hn),e(hn,Wi),e(hn,Ts),e(Ts,Ui),e(hn,Hi),e(Le,Ri),e(Le,un),e(un,Vi),e(un,mn),e(mn,Ki),e(un,Ji),e(Le,Xi),e(Le,Ve),T(fn,Ve,null),e(Ve,Yi),e(Ve,Ct),e(Ct,Qi),e(Ct,ws),e(ws,Zi),e(Ct,el),e(Ct,_a),e(_a,tl),e(Ct,ol),e(Ve,nl),T(no,Ve,null),e(Ve,sl),T(so,Ve,null),_(o,$r,g),_(o,At,g),e(At,ao),e(ao,ga),T(_n,ga,null),e(At,al),e(At,ba),e(ba,rl),_(o,xr,g),_(o,ct,g),e(ct,dl),e(ct,$s),e($s,il),e(ct,ll),e(ct,ka),e(ka,cl),e(ct,pl),e(ct,ya),e(ya,hl),_(o,zr,g),_(o,De,g),T(gn,De,null),e(De,ul),e(De,bn),e(bn,ml),e(bn,xs),e(xs,fl),e(bn,_l),e(De,gl),e(De,kn),e(kn,bl),e(kn,yn),e(yn,kl),e(kn,yl),e(De,vl),e(De,Ke),T(vn,Ke,null),e(Ke,Tl),e(Ke,Pt),e(Pt,wl),e(Pt,zs),e(zs,$l),e(Pt,xl),e(Pt,va),e(va,zl),e(Pt,Fl),e(Ke,Bl),T(ro,Ke,null),e(Ke,ql),T(io,Ke,null),_(o,Fr,g),_(o,Ot,g),e(Ot,lo),e(lo,Ta),T(Tn,Ta,null),e(Ot,jl),e(Ot,wa),e(wa,El),_(o,Br,g),_(o,Nt,g),T(wn,Nt,null),e(Nt,Ml),e(Nt,co),T($n,co,null),e(co,Cl),T(po,co,null),_(o,qr,g),_(o,It,g),e(It,ho),e(ho,$a),T(xn,$a,null),e(It,Al),e(It,xa),e(xa,Pl),_(o,jr,g),_(o,ke,g),T(zn,ke,null),e(ke,Ol),e(ke,Fn),e(Fn,Nl),e(Fn,Fs),e(Fs,Il),e(Fn,Sl),e(ke,Ll),e(ke,Bn),e(Bn,Dl),e(Bn,qn),e(qn,Gl),e(Bn,Wl),e(ke,Ul),T(uo,ke,null),e(ke,Hl),e(ke,Je),T(jn,Je,null),e(Je,Rl),e(Je,St),e(St,Vl),e(St,Bs),e(Bs,Kl),e(St,Jl),e(St,za),e(za,Xl),e(St,Yl),e(Je,Ql),T(mo,Je,null),e(Je,Zl),T(fo,Je,null),_(o,Er,g),_(o,Lt,g),e(Lt,_o),e(_o,Fa),T(En,Fa,null),e(Lt,ec),e(Lt,Ba),e(Ba,tc),_(o,Mr,g),_(o,ye,g),T(Mn,ye,null),e(ye,oc),e(ye,Cn),e(Cn,nc),e(Cn,qs),e(qs,sc),e(Cn,ac),e(ye,rc),e(ye,An),e(An,dc),e(An,Pn),e(Pn,ic),e(An,lc),e(ye,cc),T(go,ye,null),e(ye,pc),e(ye,Xe),T(On,Xe,null),e(Xe,hc),e(Xe,Dt),e(Dt,uc),e(Dt,js),e(js,mc),e(Dt,fc),e(Dt,qa),e(qa,_c),e(Dt,gc),e(Xe,bc),T(bo,Xe,null),e(Xe,kc),T(ko,Xe,null),_(o,Cr,g),_(o,Gt,g),e(Gt,yo),e(yo,ja),T(Nn,ja,null),e(Gt,yc),e(Gt,Ea),e(Ea,vc),_(o,Ar,g),_(o,H,g),T(In,H,null),e(H,Tc),e(H,Sn),e(Sn,wc),e(Sn,Es),e(Es,$c),e(Sn,xc),e(H,zc),e(H,Ln),e(Ln,Fc),e(Ln,Dn),e(Dn,Bc),e(Ln,qc),e(H,jc),e(H,Ma),e(Ma,Ec),e(H,Mc),e(H,pt),e(pt,Ca),e(Ca,Gn),e(Gn,Cc),e(pt,Ac),e(pt,Aa),e(Aa,Wn),e(Wn,Pc),e(pt,Oc),e(pt,Pa),e(Pa,Un),e(Un,Nc),e(pt,Ic),e(pt,Oa),e(Oa,Hn),e(Hn,Sc),e(H,Lc),e(H,Ye),T(Rn,Ye,null),e(Ye,Dc),e(Ye,Wt),e(Wt,Gc),e(Wt,Na),e(Na,Wc),e(Wt,Uc),e(Wt,Ia),e(Ia,Hc),e(Wt,Rc),e(Ye,Vc),T(vo,Ye,null),e(Ye,Kc),T(To,Ye,null),e(H,Jc),e(H,wo),T(Vn,wo,null),e(wo,Xc),T($o,wo,null),e(H,Yc),e(H,xo),T(Kn,xo,null),e(xo,Qc),T(zo,xo,null),_(o,Pr,g),_(o,Ut,g),e(Ut,Fo),e(Fo,Sa),T(Jn,Sa,null),e(Ut,Zc),e(Ut,La),e(La,ep),_(o,Or,g),_(o,R,g),T(Xn,R,null),e(R,tp),e(R,Yn),e(Yn,op),e(Yn,Ms),e(Ms,np),e(Yn,sp),e(R,ap),e(R,Qn),e(Qn,rp),e(Qn,Zn),e(Zn,dp),e(Qn,ip),e(R,lp),e(R,Da),e(Da,cp),e(R,pp),e(R,ht),e(ht,Ga),e(Ga,es),e(es,hp),e(ht,up),e(ht,Wa),e(Wa,ts),e(ts,mp),e(ht,fp),e(ht,Ua),e(Ua,os),e(os,_p),e(ht,gp),e(ht,Ha),e(Ha,ns),e(ns,bp),e(R,kp),e(R,Qe),T(ss,Qe,null),e(Qe,yp),e(Qe,Ht),e(Ht,vp),e(Ht,Ra),e(Ra,Tp),e(Ht,wp),e(Ht,Va),e(Va,$p),e(Ht,xp),e(Qe,zp),T(Bo,Qe,null),e(Qe,Fp),T(qo,Qe,null),e(R,Bp),e(R,jo),T(as,jo,null),e(jo,qp),T(Eo,jo,null),e(R,jp),e(R,Mo),T(rs,Mo,null),e(Mo,Ep),T(Co,Mo,null),Nr=!0},p(o,[g]){const ds={};g&2&&(ds.$$scope={dirty:g,ctx:o}),Jt.$set(ds);const Ka={};g&2&&(Ka.$$scope={dirty:g,ctx:o}),Yt.$set(Ka);const Ja={};g&2&&(Ja.$$scope={dirty:g,ctx:o}),Qt.$set(Ja);const Xa={};g&2&&(Xa.$$scope={dirty:g,ctx:o}),eo.$set(Xa);const Ao={};g&2&&(Ao.$$scope={dirty:g,ctx:o}),to.$set(Ao);const Ya={};g&2&&(Ya.$$scope={dirty:g,ctx:o}),no.$set(Ya);const Qa={};g&2&&(Qa.$$scope={dirty:g,ctx:o}),so.$set(Qa);const is={};g&2&&(is.$$scope={dirty:g,ctx:o}),ro.$set(is);const Za={};g&2&&(Za.$$scope={dirty:g,ctx:o}),io.$set(Za);const er={};g&2&&(er.$$scope={dirty:g,ctx:o}),po.$set(er);const tr={};g&2&&(tr.$$scope={dirty:g,ctx:o}),uo.$set(tr);const ls={};g&2&&(ls.$$scope={dirty:g,ctx:o}),mo.$set(ls);const or={};g&2&&(or.$$scope={dirty:g,ctx:o}),fo.$set(or);const nr={};g&2&&(nr.$$scope={dirty:g,ctx:o}),go.$set(nr);const sr={};g&2&&(sr.$$scope={dirty:g,ctx:o}),bo.$set(sr);const ar={};g&2&&(ar.$$scope={dirty:g,ctx:o}),ko.$set(ar);const rr={};g&2&&(rr.$$scope={dirty:g,ctx:o}),vo.$set(rr);const dr={};g&2&&(dr.$$scope={dirty:g,ctx:o}),To.$set(dr);const ir={};g&2&&(ir.$$scope={dirty:g,ctx:o}),$o.$set(ir);const Rt={};g&2&&(Rt.$$scope={dirty:g,ctx:o}),zo.$set(Rt);const lr={};g&2&&(lr.$$scope={dirty:g,ctx:o}),Bo.$set(lr);const cr={};g&2&&(cr.$$scope={dirty:g,ctx:o}),qo.$set(cr);const cs={};g&2&&(cs.$$scope={dirty:g,ctx:o}),Eo.$set(cs);const pr={};g&2&&(pr.$$scope={dirty:g,ctx:o}),Co.$set(pr)},i(o){Nr||(w(n.$$.fragment,o),w(V.$$.fragment,o),w(z.$$.fragment,o),w(Vo.$$.fragment,o),w(Ko.$$.fragment,o),w(Jo.$$.fragment,o),w(Xo.$$.fragment,o),w(Jt.$$.fragment,o),w(Qo.$$.fragment,o),w(Zo.$$.fragment,o),w(Yt.$$.fragment,o),w(Qt.$$.fragment,o),w(on.$$.fragment,o),w(nn.$$.fragment,o),w(sn.$$.fragment,o),w(eo.$$.fragment,o),w(to.$$.fragment,o),w(ln.$$.fragment,o),w(cn.$$.fragment,o),w(pn.$$.fragment,o),w(fn.$$.fragment,o),w(no.$$.fragment,o),w(so.$$.fragment,o),w(_n.$$.fragment,o),w(gn.$$.fragment,o),w(vn.$$.fragment,o),w(ro.$$.fragment,o),w(io.$$.fragment,o),w(Tn.$$.fragment,o),w(wn.$$.fragment,o),w($n.$$.fragment,o),w(po.$$.fragment,o),w(xn.$$.fragment,o),w(zn.$$.fragment,o),w(uo.$$.fragment,o),w(jn.$$.fragment,o),w(mo.$$.fragment,o),w(fo.$$.fragment,o),w(En.$$.fragment,o),w(Mn.$$.fragment,o),w(go.$$.fragment,o),w(On.$$.fragment,o),w(bo.$$.fragment,o),w(ko.$$.fragment,o),w(Nn.$$.fragment,o),w(In.$$.fragment,o),w(Rn.$$.fragment,o),w(vo.$$.fragment,o),w(To.$$.fragment,o),w(Vn.$$.fragment,o),w($o.$$.fragment,o),w(Kn.$$.fragment,o),w(zo.$$.fragment,o),w(Jn.$$.fragment,o),w(Xn.$$.fragment,o),w(ss.$$.fragment,o),w(Bo.$$.fragment,o),w(qo.$$.fragment,o),w(as.$$.fragment,o),w(Eo.$$.fragment,o),w(rs.$$.fragment,o),w(Co.$$.fragment,o),Nr=!0)},o(o){$(n.$$.fragment,o),$(V.$$.fragment,o),$(z.$$.fragment,o),$(Vo.$$.fragment,o),$(Ko.$$.fragment,o),$(Jo.$$.fragment,o),$(Xo.$$.fragment,o),$(Jt.$$.fragment,o),$(Qo.$$.fragment,o),$(Zo.$$.fragment,o),$(Yt.$$.fragment,o),$(Qt.$$.fragment,o),$(on.$$.fragment,o),$(nn.$$.fragment,o),$(sn.$$.fragment,o),$(eo.$$.fragment,o),$(to.$$.fragment,o),$(ln.$$.fragment,o),$(cn.$$.fragment,o),$(pn.$$.fragment,o),$(fn.$$.fragment,o),$(no.$$.fragment,o),$(so.$$.fragment,o),$(_n.$$.fragment,o),$(gn.$$.fragment,o),$(vn.$$.fragment,o),$(ro.$$.fragment,o),$(io.$$.fragment,o),$(Tn.$$.fragment,o),$(wn.$$.fragment,o),$($n.$$.fragment,o),$(po.$$.fragment,o),$(xn.$$.fragment,o),$(zn.$$.fragment,o),$(uo.$$.fragment,o),$(jn.$$.fragment,o),$(mo.$$.fragment,o),$(fo.$$.fragment,o),$(En.$$.fragment,o),$(Mn.$$.fragment,o),$(go.$$.fragment,o),$(On.$$.fragment,o),$(bo.$$.fragment,o),$(ko.$$.fragment,o),$(Nn.$$.fragment,o),$(In.$$.fragment,o),$(Rn.$$.fragment,o),$(vo.$$.fragment,o),$(To.$$.fragment,o),$(Vn.$$.fragment,o),$($o.$$.fragment,o),$(Kn.$$.fragment,o),$(zo.$$.fragment,o),$(Jn.$$.fragment,o),$(Xn.$$.fragment,o),$(ss.$$.fragment,o),$(Bo.$$.fragment,o),$(qo.$$.fragment,o),$(as.$$.fragment,o),$(Eo.$$.fragment,o),$(rs.$$.fragment,o),$(Co.$$.fragment,o),Nr=!1},d(o){t(l),o&&t(k),o&&t(f),x(n),o&&t(N),o&&t(A),o&&t(Ge),o&&t(I),x(V),o&&t(We),o&&t(ee),o&&t(M),o&&t(P),o&&t(te),o&&t(Te),o&&t(Ue),o&&t(we),o&&t(He),o&&t(K),o&&t(oe),o&&t(J),o&&t(Re),o&&t(C),x(z),o&&t(ut),o&&t(se),o&&t(hr),o&&t(zt),x(Vo),o&&t(ur),o&&t(ms),o&&t(mr),x(Ko,o),o&&t(fr),o&&t(Ft),x(Jo),o&&t(_r),o&&t(Se),x(Xo),x(Jt),o&&t(gr),o&&t(jt),x(Qo),o&&t(br),o&&t(W),x(Zo),x(Yt),x(Qt),x(on),o&&t(kr),o&&t(Et),x(nn),o&&t(yr),o&&t(U),x(sn),x(eo),x(to),x(ln),o&&t(vr),o&&t(Mt),x(cn),o&&t(Tr),o&&t(lt),o&&t(wr),o&&t(Le),x(pn),x(fn),x(no),x(so),o&&t($r),o&&t(At),x(_n),o&&t(xr),o&&t(ct),o&&t(zr),o&&t(De),x(gn),x(vn),x(ro),x(io),o&&t(Fr),o&&t(Ot),x(Tn),o&&t(Br),o&&t(Nt),x(wn),x($n),x(po),o&&t(qr),o&&t(It),x(xn),o&&t(jr),o&&t(ke),x(zn),x(uo),x(jn),x(mo),x(fo),o&&t(Er),o&&t(Lt),x(En),o&&t(Mr),o&&t(ye),x(Mn),x(go),x(On),x(bo),x(ko),o&&t(Cr),o&&t(Gt),x(Nn),o&&t(Ar),o&&t(H),x(In),x(Rn),x(vo),x(To),x(Vn),x($o),x(Kn),x(zo),o&&t(Pr),o&&t(Ut),x(Jn),o&&t(Or),o&&t(R),x(Xn),x(ss),x(Bo),x(qo),x(as),x(Eo),x(rs),x(Co)}}}const lm={local:"blenderbot",sections:[{local:"overview",title:"Overview"},{local:"implementation-notes",title:"Implementation Notes"},{local:"usage",title:"Usage"},{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 cm(F){return Nu(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gm extends Cu{constructor(l){super();Au(this,l,cm,im,Pu,{})}}export{gm as default,lm as metadata};
