import{S as pm,i as hm,s as um,e as s,k as p,w as v,t as d,M as mm,c as a,d as t,m as h,a as r,x as y,h as i,b as m,G as e,g as _,y as T,q as w,o as $,B as x,v as fm,L as ze}from"../../chunks/vendor-hf-doc-builder.js";import{T as kt}from"../../chunks/Tip-hf-doc-builder.js";import{D as O}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Te}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ye}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as xe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function _m(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function gm(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.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=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function bm(F){let l,k,f,u,b;return{c(){l=s("p"),k=d("When used with "),f=s("code"),u=d("is_split_into_words=True"),b=d(", this tokenizer will add a space before each word (even the first one).")},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"When used with "),f=a(c,"CODE",{});var B=r(f);u=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,u),e(l,b)},d(n){n&&t(l)}}}function km(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.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=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function vm(F){let l,k,f,u,b,n,c,B;return{c(){l=s("p"),k=d("When used with "),f=s("code"),u=d("is_split_into_words=True"),b=d(", this tokenizer needs to be instantiated with "),n=s("code"),c=d("add_prefix_space=True"),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);u=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,u),e(l,b),e(l,n),e(n,c),e(l,B)},d(X){X&&t(l)}}}function ym(F){let l,k,f,u,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"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){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);u=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,u),e(l,b)},d(n){n&&t(l)}}}function Tm(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function wm(F){let l,k,f,u,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"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){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);u=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,u),e(l,b)},d(n){n&&t(l)}}}function $m(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Conversation example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function xm(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function zm(F){let l,k,f,u,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,Ee,M,P,ot,te,we,je,me,Ue,$e,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"),u=d("transformers"),b=d(" accept two formats as input:"),n=p(),c=s("ul"),B=s("li"),X=d("having all inputs as keyword arguments (like PyTorch models), or"),N=p(),A=s("li"),Q=d("having all inputs as a list, tuple or dict in the first positional argument."),Fe=p(),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:`),Ee=p(),M=s("ul"),P=s("li"),ot=d("a single Tensor with "),te=s("code"),we=d("input_ids"),je=d(" only and nothing else: "),me=s("code"),Ue=d("model(input_ids)"),$e=p(),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=p(),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=p(),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 E=r(l);k=i(E,"TensorFlow models and layers in "),f=a(E,"CODE",{});var rt=r(f);u=i(rt,"transformers"),rt.forEach(t),b=i(E," accept two formats as input:"),E.forEach(t),n=h(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=h(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=h(z),q=a(z,"P",{});var j=r(q);le=i(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),ce=a(j,"CODE",{});var vt=r(ce);Ze=i(vt,"model.fit()"),vt.forEach(t),Ge=i(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a(j,"CODE",{});var Oe=r(I);Z=i(Oe,"model.fit()"),Oe.forEach(t),Be=i(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a(j,"CODE",{});var yt=r(V);et=i(yt,"fit()"),yt.forEach(t),qe=i(j," and "),pe=a(j,"CODE",{});var Tt=r(pe);We=i(Tt,"predict()"),Tt.forEach(t),ee=i(j,`, such as when creating your own layers or models with
the Keras `),he=a(j,"CODE",{});var wt=r(he);ue=i(wt,"Functional"),wt.forEach(t),tt=i(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),Ee=h(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);we=i(Ne,"input_ids"),Ne.forEach(t),je=i(ge," only and nothing else: "),me=a(ge,"CODE",{});var $t=r(me);Ue=i($t,"model(input_ids)"),$t.forEach(t),ge.forEach(t),$e=h(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 xt=r(K);Me=i(xt,"model([input_ids, attention_mask])"),xt.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=h(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=h(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 zt=r(C);ne=i(zt,"subclassing"),zt.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,E){_(z,l,E),e(l,k),e(l,f),e(f,u),e(l,b),_(z,n,E),_(z,c,E),e(c,B),e(B,X),e(c,N),e(c,A),e(A,Q),_(z,Fe,E),_(z,q,E),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,Ee,E),_(z,M,E),e(M,P),e(P,ot),e(P,te),e(te,we),e(P,je),e(P,me),e(me,Ue),e(M,$e),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,E),_(z,D,E),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(Ee),z&&t(M),z&&t(Ce),z&&t(D)}}}function Fm(F){let l,k,f,u,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"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){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);u=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,u),e(l,b)},d(n){n&&t(l)}}}function Bm(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function qm(F){let l,k,f,u,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,Ee,M,P,ot,te,we,je,me,Ue,$e,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"),u=d("transformers"),b=d(" accept two formats as input:"),n=p(),c=s("ul"),B=s("li"),X=d("having all inputs as keyword arguments (like PyTorch models), or"),N=p(),A=s("li"),Q=d("having all inputs as a list, tuple or dict in the first positional argument."),Fe=p(),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:`),Ee=p(),M=s("ul"),P=s("li"),ot=d("a single Tensor with "),te=s("code"),we=d("input_ids"),je=d(" only and nothing else: "),me=s("code"),Ue=d("model(input_ids)"),$e=p(),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=p(),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=p(),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 E=r(l);k=i(E,"TensorFlow models and layers in "),f=a(E,"CODE",{});var rt=r(f);u=i(rt,"transformers"),rt.forEach(t),b=i(E," accept two formats as input:"),E.forEach(t),n=h(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=h(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=h(z),q=a(z,"P",{});var j=r(q);le=i(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),ce=a(j,"CODE",{});var vt=r(ce);Ze=i(vt,"model.fit()"),vt.forEach(t),Ge=i(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a(j,"CODE",{});var Oe=r(I);Z=i(Oe,"model.fit()"),Oe.forEach(t),Be=i(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a(j,"CODE",{});var yt=r(V);et=i(yt,"fit()"),yt.forEach(t),qe=i(j," and "),pe=a(j,"CODE",{});var Tt=r(pe);We=i(Tt,"predict()"),Tt.forEach(t),ee=i(j,`, such as when creating your own layers or models with
the Keras `),he=a(j,"CODE",{});var wt=r(he);ue=i(wt,"Functional"),wt.forEach(t),tt=i(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),Ee=h(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);we=i(Ne,"input_ids"),Ne.forEach(t),je=i(ge," only and nothing else: "),me=a(ge,"CODE",{});var $t=r(me);Ue=i($t,"model(input_ids)"),$t.forEach(t),ge.forEach(t),$e=h(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 xt=r(K);Me=i(xt,"model([input_ids, attention_mask])"),xt.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=h(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=h(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 zt=r(C);ne=i(zt,"subclassing"),zt.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,E){_(z,l,E),e(l,k),e(l,f),e(f,u),e(l,b),_(z,n,E),_(z,c,E),e(c,B),e(B,X),e(c,N),e(c,A),e(A,Q),_(z,Fe,E),_(z,q,E),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,Ee,E),_(z,M,E),e(M,P),e(P,ot),e(P,te),e(te,we),e(P,je),e(P,me),e(me,Ue),e(M,$e),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,E),_(z,D,E),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(Ee),z&&t(M),z&&t(Ce),z&&t(D)}}}function Em(F){let l,k,f,u,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"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){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);u=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,u),e(l,b)},d(n){n&&t(l)}}}function jm(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Conversation example::"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function Mm(F){let l,k,f,u,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"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){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);u=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,u),e(l,b)},d(n){n&&t(l)}}}function Cm(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function Am(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function Pm(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function Om(F){let l,k,f,u,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"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){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);u=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,u),e(l,b)},d(n){n&&t(l)}}}function Nm(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Conversation example::"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function Im(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function Sm(F){let l,k,f,u,b;return u=new Te({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=p(),v(u.$$.fragment)},l(n){l=a(n,"P",{});var c=r(l);k=i(c,"Example:"),c.forEach(t),f=h(n),y(u.$$.fragment,n)},m(n,c){_(n,l,c),e(l,k),_(n,f,c),T(u,n,c),b=!0},p:ze,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(l),n&&t(f),x(u,n)}}}function Lm(F){let l,k,f,u,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,Ee,M,P,ot,te,we,je,me,Ue,$e,S,He,K,Me,nt,oe,J,st,L,at,fe,_e,Ce,D,Re,C,ne,Ae,z,E,rt,Pe,ut,se,j,vt,Oe,yt,Tt,wt,G,ge,Ne,$t,be,xt,Y,dt,it,Ie,zt,Qs,Od,Nd,gs,Id,Sd,xr,Ft,Jt,Zs,Xo,Ld,ea,Dd,zr,bs,Gd,Fr,Yo,Br,Bt,Xt,ta,Qo,Wd,oa,Ud,qr,mt,na,ks,Hd,Rd,sa,vs,Vd,Kd,aa,ys,Jd,Er,qt,Yt,ra,Zo,Xd,da,Yd,jr,Se,en,Qd,Et,Zd,Ts,ei,ti,tn,oi,ni,si,jt,ai,ws,ri,di,$s,ii,li,ci,Qt,Mr,Mt,Zt,ia,on,pi,la,hi,Cr,W,nn,ui,ca,mi,fi,pa,_i,gi,eo,bi,sn,ki,ha,vi,yi,Ti,to,wi,an,$i,xs,xi,zi,Fi,ft,rn,Bi,ua,qi,Ei,ma,zs,ji,fa,Mi,Ar,Ct,oo,_a,dn,Ci,ga,Ai,Pr,U,ln,Pi,cn,Oi,ba,Ni,Ii,Si,ka,Li,Di,no,Gi,pn,Wi,va,Ui,Hi,Ri,so,Vi,hn,Ki,Fs,Ji,Xi,Yi,_t,un,Qi,ya,Zi,el,Ta,Bs,tl,wa,ol,Or,At,ao,$a,mn,nl,xa,sl,Nr,lt,al,za,rl,dl,Fa,il,ll,Ba,cl,Ir,Le,fn,pl,_n,hl,qs,ul,ml,fl,gn,_l,bn,gl,bl,kl,Ve,kn,vl,Pt,yl,Es,Tl,wl,qa,$l,xl,zl,ro,Fl,io,Sr,Ot,lo,Ea,vn,Bl,ja,ql,Lr,ct,El,js,jl,Ml,Ma,Cl,Al,Ca,Pl,Dr,De,yn,Ol,Tn,Nl,Ms,Il,Sl,Ll,wn,Dl,$n,Gl,Wl,Ul,Ke,xn,Hl,Nt,Rl,Cs,Vl,Kl,Aa,Jl,Xl,Yl,co,Ql,po,Gr,It,ho,Pa,zn,Zl,Oa,ec,Wr,St,Fn,tc,uo,Bn,oc,mo,Ur,Lt,fo,Na,qn,nc,Ia,sc,Hr,ke,En,ac,jn,rc,As,dc,ic,lc,Mn,cc,Cn,pc,hc,uc,_o,mc,Je,An,fc,Dt,_c,Ps,gc,bc,Sa,kc,vc,yc,go,Tc,bo,Rr,Gt,ko,La,Pn,wc,Da,$c,Vr,ve,On,xc,Nn,zc,Os,Fc,Bc,qc,In,Ec,Sn,jc,Mc,Cc,vo,Ac,Xe,Ln,Pc,Wt,Oc,Ns,Nc,Ic,Ga,Sc,Lc,Dc,yo,Gc,To,Kr,Ut,wo,Wa,Dn,Wc,Ua,Uc,Jr,H,Gn,Hc,Wn,Rc,Is,Vc,Kc,Jc,Un,Xc,Hn,Yc,Qc,Zc,Ha,ep,tp,pt,Ra,Rn,op,np,Va,Vn,sp,ap,Ka,Kn,rp,dp,Ja,Jn,ip,lp,Ye,Xn,cp,Ht,pp,Xa,hp,up,Ya,mp,fp,_p,$o,gp,xo,bp,zo,Yn,kp,Fo,vp,Bo,Qn,yp,qo,Xr,Rt,Eo,Qa,Zn,Tp,Za,wp,Yr,R,es,$p,ts,xp,Ss,zp,Fp,Bp,os,qp,ns,Ep,jp,Mp,er,Cp,Ap,ht,tr,ss,Pp,Op,or,as,Np,Ip,nr,rs,Sp,Lp,sr,ds,Dp,Gp,Qe,is,Wp,Vt,Up,ar,Hp,Rp,rr,Vp,Kp,Jp,jo,Xp,Mo,Yp,Co,ls,Qp,Ao,Zp,Po,cs,eh,Oo,Qr;return n=new ye({}),V=new ye({}),z=new ye({}),Xo=new ye({}),Yo=new Te({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>]`}}),Qo=new ye({}),Zo=new ye({}),en=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/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotModel">BlenderbotModel</a> or <a href="/docs/transformers/v4.27.1/en/model_doc/blenderbot#transformers.TFBlenderbotModel">TFBlenderbotModel</a>.`,name:"vocab_size"},{anchor:"transformers.BlenderbotConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.BlenderbotConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.BlenderbotConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.BlenderbotConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.BlenderbotConfig.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.BlenderbotConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.BlenderbotConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.BlenderbotConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.BlenderbotConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.BlenderbotConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.BlenderbotConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.BlenderbotConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.BlenderbotConfig.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"init_std"},{anchor:"transformers.BlenderbotConfig.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.BlenderbotConfig.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the decoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"decoder_layerdrop"},{anchor:"transformers.BlenderbotConfig.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.BlenderbotConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models)`,name:"use_cache"},{anchor:"transformers.BlenderbotConfig.forced_eos_token_id",description:`<strong>forced_eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the token to force as the last generated token when <code>max_length</code> is reached. Usually set to
<code>eos_token_id</code>.`,name:"forced_eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/configuration_blenderbot.py#L36"}}),Qt=new xe({props:{anchor:"transformers.BlenderbotConfig.example",$$slots:{default:[_m]},$$scope:{ctx:F}}}),on=new ye({}),nn=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/v4.27.1/src/transformers/models/blenderbot/tokenization_blenderbot.py#L92"}}),eo=new xe({props:{anchor:"transformers.BlenderbotTokenizer.example",$$slots:{default:[gm]},$$scope:{ctx:F}}}),to=new kt({props:{$$slots:{default:[bm]},$$scope:{ctx:F}}}),rn=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/v4.27.1/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>
`}}),dn=new ye({}),ln=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/v4.27.1/src/transformers/models/blenderbot/tokenization_blenderbot_fast.py#L50"}}),no=new xe({props:{anchor:"transformers.BlenderbotTokenizerFast.example",$$slots:{default:[km]},$$scope:{ctx:F}}}),so=new kt({props:{$$slots:{default:[vm]},$$scope:{ctx:F}}}),un=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/v4.27.1/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>
`}}),mn=new ye({}),fn=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/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_blenderbot.py#L1094"}}),kn=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_blenderbot.py#L1136",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ro=new kt({props:{$$slots:{default:[ym]},$$scope:{ctx:F}}}),io=new xe({props:{anchor:"transformers.BlenderbotModel.forward.example",$$slots:{default:[Tm]},$$scope:{ctx:F}}}),vn=new ye({}),yn=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/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_blenderbot.py#L1234"}}),xn=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlenderbotForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_blenderbot.py#L1295",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),co=new kt({props:{$$slots:{default:[wm]},$$scope:{ctx:F}}}),po=new xe({props:{anchor:"transformers.BlenderbotForConditionalGeneration.forward.example",$$slots:{default:[$m]},$$scope:{ctx:F}}}),zn=new ye({}),Fn=new O({props:{name:"class transformers.BlenderbotForCausalLM",anchor:"transformers.BlenderbotForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_blenderbot.py#L1431"}}),Bn=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_blenderbot.py#L1464",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mo=new xe({props:{anchor:"transformers.BlenderbotForCausalLM.forward.example",$$slots:{default:[xm]},$$scope:{ctx:F}}}),qn=new ye({}),En=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/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1167"}}),_o=new kt({props:{$$slots:{default:[zm]},$$scope:{ctx:F}}}),An=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBlenderbotModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1195",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),go=new kt({props:{$$slots:{default:[Fm]},$$scope:{ctx:F}}}),bo=new xe({props:{anchor:"transformers.TFBlenderbotModel.call.example",$$slots:{default:[Bm]},$$scope:{ctx:F}}}),Pn=new ye({}),On=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/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1288"}}),vo=new kt({props:{$$slots:{default:[qm]},$$scope:{ctx:F}}}),Ln=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBlenderbotForConditionalGeneration.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFBlenderbotForConditionalGeneration.call.labels",description:`<strong>labels</strong> (<code>tf.tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_tf_blenderbot.py#L1342",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),yo=new kt({props:{$$slots:{default:[Em]},$$scope:{ctx:F}}}),To=new xe({props:{anchor:"transformers.TFBlenderbotForConditionalGeneration.call.example",$$slots:{default:[jm]},$$scope:{ctx:F}}}),Dn=new ye({}),Gn=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/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1217"}}),Xn=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1152",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(jnp.ndarray)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$o=new kt({props:{$$slots:{default:[Mm]},$$scope:{ctx:F}}}),xo=new xe({props:{anchor:"transformers.FlaxBlenderbotModel.__call__.example",$$slots:{default:[Cm]},$$scope:{ctx:F}}}),Yn=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L973",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot.configuration_blenderbot.BlenderbotConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fo=new xe({props:{anchor:"transformers.FlaxBlenderbotModel.encode.example",$$slots:{default:[Am]},$$scope:{ctx:F}}}),Qn=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1036",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot.configuration_blenderbot.BlenderbotConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(jnp.ndarray)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qo=new xe({props:{anchor:"transformers.FlaxBlenderbotModel.decode.example",$$slots:{default:[Pm]},$$scope:{ctx:F}}}),Zn=new ye({}),es=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/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig">BlenderbotConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1302"}}),is=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1152",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotConfig"
>BlenderbotConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(jnp.ndarray)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),jo=new kt({props:{$$slots:{default:[Om]},$$scope:{ctx:F}}}),Mo=new xe({props:{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.__call__.example",$$slots:{default:[Nm]},$$scope:{ctx:F}}}),ls=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L973",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot.configuration_blenderbot.BlenderbotConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ao=new xe({props:{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.encode.example",$$slots:{default:[Im]},$$scope:{ctx:F}}}),cs=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/blenderbot/modeling_flax_blenderbot.py#L1306",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot.configuration_blenderbot.BlenderbotConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Oo=new xe({props:{anchor:"transformers.FlaxBlenderbotForConditionalGeneration.decode.example",$$slots:{default:[Sm]},$$scope:{ctx:F}}}),{c(){l=s("meta"),k=p(),f=s("h1"),u=s("a"),b=s("span"),v(n.$$.fragment),c=p(),B=s("span"),X=d("Blenderbot"),N=p(),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=p(),I=s("h2"),Z=s("a"),Be=s("span"),v(V.$$.fragment),et=p(),qe=s("span"),pe=d("Overview"),We=p(),ee=s("p"),he=d("The Blender chatbot model was proposed in "),ue=s("a"),tt=d("Recipes for building an open-domain chatbot"),Ee=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=p(),P=s("p"),ot=d("The abstract of the paper is the following:"),te=p(),we=s("p"),je=s("em"),me=d(`Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that
scaling neural models in the number of parameters and the size of the data they are trained on gives improved results,
we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of
skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to
their partners, and displaying knowledge, empathy and personality appropriately, while maintaining a consistent
persona. We show that large scale models can learn these skills when given appropriate training data and choice of
generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter models, and make our models
and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn
dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing
failure cases of our models.`),Ue=p(),$e=s("p"),S=d("Tips:"),He=p(),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=p(),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=p(),C=s("h2"),ne=s("a"),Ae=s("span"),v(z.$$.fragment),E=p(),rt=s("span"),Pe=d("Implementation Notes"),ut=p(),se=s("ul"),j=s("li"),vt=d("Blenderbot uses a standard "),Oe=s("a"),yt=d("seq2seq model transformer"),Tt=d(" based architecture."),wt=p(),G=s("li"),ge=d("Available checkpoints can be found in the "),Ne=s("a"),$t=d("model hub"),be=d("."),xt=p(),Y=s("li"),dt=d("This is the "),it=s("em"),Ie=d("default"),zt=d(` Blenderbot model class. However, some smaller checkpoints, such as
`),Qs=s("code"),Od=d("facebook/blenderbot_small_90M"),Nd=d(`, have a different architecture and consequently should be used with
`),gs=s("a"),Id=d("BlenderbotSmall"),Sd=d("."),xr=p(),Ft=s("h2"),Jt=s("a"),Zs=s("span"),v(Xo.$$.fragment),Ld=p(),ea=s("span"),Dd=d("Usage"),zr=p(),bs=s("p"),Gd=d("Here is an example of model usage:"),Fr=p(),v(Yo.$$.fragment),Br=p(),Bt=s("h2"),Xt=s("a"),ta=s("span"),v(Qo.$$.fragment),Wd=p(),oa=s("span"),Ud=d("Documentation resources"),qr=p(),mt=s("ul"),na=s("li"),ks=s("a"),Hd=d("Causal language modeling task guide"),Rd=p(),sa=s("li"),vs=s("a"),Vd=d("Translation task guide"),Kd=p(),aa=s("li"),ys=s("a"),Jd=d("Summarization task guide"),Er=p(),qt=s("h2"),Yt=s("a"),ra=s("span"),v(Zo.$$.fragment),Xd=p(),da=s("span"),Yd=d("BlenderbotConfig"),jr=p(),Se=s("div"),v(en.$$.fragment),Qd=p(),Et=s("p"),Zd=d("This is the configuration class to store the configuration of a "),Ts=s("a"),ei=d("BlenderbotModel"),ti=d(`. It is used to instantiate an
Blenderbot model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the Blenderbot
`),tn=s("a"),oi=d("facebook/blenderbot-3B"),ni=d(" architecture."),si=p(),jt=s("p"),ai=d("Configuration objects inherit from "),ws=s("a"),ri=d("PretrainedConfig"),di=d(` and can be used to control the model outputs. Read the
documentation from `),$s=s("a"),ii=d("PretrainedConfig"),li=d(" for more information."),ci=p(),v(Qt.$$.fragment),Mr=p(),Mt=s("h2"),Zt=s("a"),ia=s("span"),v(on.$$.fragment),pi=p(),la=s("span"),hi=d("BlenderbotTokenizer"),Cr=p(),W=s("div"),v(nn.$$.fragment),ui=p(),ca=s("p"),mi=d("Constructs a Blenderbot tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),fi=p(),pa=s("p"),_i=d("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),gi=p(),v(eo.$$.fragment),bi=p(),sn=s("p"),ki=d("You can get around that behavior by passing "),ha=s("code"),vi=d("add_prefix_space=True"),yi=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.`),Ti=p(),v(to.$$.fragment),wi=p(),an=s("p"),$i=d("This tokenizer inherits from "),xs=s("a"),xi=d("PreTrainedTokenizer"),zi=d(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Fi=p(),ft=s("div"),v(rn.$$.fragment),Bi=p(),ua=s("p"),qi=d(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Blenderbot sequence has the following format:`),Ei=p(),ma=s("ul"),zs=s("li"),ji=d("single sequence: "),fa=s("code"),Mi=d("X </s>"),Ar=p(),Ct=s("h2"),oo=s("a"),_a=s("span"),v(dn.$$.fragment),Ci=p(),ga=s("span"),Ai=d("BlenderbotTokenizerFast"),Pr=p(),U=s("div"),v(ln.$$.fragment),Pi=p(),cn=s("p"),Oi=d("Construct a \u201Cfast\u201D Blenderbot tokenizer (backed by HuggingFace\u2019s "),ba=s("em"),Ni=d("tokenizers"),Ii=d(` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),Si=p(),ka=s("p"),Li=d("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Di=p(),v(no.$$.fragment),Gi=p(),pn=s("p"),Wi=d("You can get around that behavior by passing "),va=s("code"),Ui=d("add_prefix_space=True"),Hi=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.`),Ri=p(),v(so.$$.fragment),Vi=p(),hn=s("p"),Ki=d("This tokenizer inherits from "),Fs=s("a"),Ji=d("PreTrainedTokenizerFast"),Xi=d(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Yi=p(),_t=s("div"),v(un.$$.fragment),Qi=p(),ya=s("p"),Zi=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:`),el=p(),Ta=s("ul"),Bs=s("li"),tl=d("single sequence: "),wa=s("code"),ol=d("X </s>"),Or=p(),At=s("h2"),ao=s("a"),$a=s("span"),v(mn.$$.fragment),nl=p(),xa=s("span"),sl=d("BlenderbotModel"),Nr=p(),lt=s("p"),al=d("See "),za=s("code"),rl=d("transformers.BartModel"),dl=d(" for arguments to "),Fa=s("em"),il=d("forward"),ll=d(" and "),Ba=s("em"),cl=d("generate"),Ir=p(),Le=s("div"),v(fn.$$.fragment),pl=p(),_n=s("p"),hl=d(`The bare Blenderbot Model outputting raw hidden-states without any specific head on top.
This model inherits from `),qs=s("a"),ul=d("PreTrainedModel"),ml=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.)`),fl=p(),gn=s("p"),_l=d("This model is also a PyTorch "),bn=s("a"),gl=d("torch.nn.Module"),bl=d(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),kl=p(),Ve=s("div"),v(kn.$$.fragment),vl=p(),Pt=s("p"),yl=d("The "),Es=s("a"),Tl=d("BlenderbotModel"),wl=d(" forward method, overrides the "),qa=s("code"),$l=d("__call__"),xl=d(" special method."),zl=p(),v(ro.$$.fragment),Fl=p(),v(io.$$.fragment),Sr=p(),Ot=s("h2"),lo=s("a"),Ea=s("span"),v(vn.$$.fragment),Bl=p(),ja=s("span"),ql=d("BlenderbotForConditionalGeneration"),Lr=p(),ct=s("p"),El=d("See "),js=s("a"),jl=d("BartForConditionalGeneration"),Ml=d(" for arguments to "),Ma=s("em"),Cl=d("forward"),Al=d(" and "),Ca=s("em"),Pl=d("generate"),Dr=p(),De=s("div"),v(yn.$$.fragment),Ol=p(),Tn=s("p"),Nl=d(`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Ms=s("a"),Il=d("PreTrainedModel"),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=p(),wn=s("p"),Dl=d("This model is also a PyTorch "),$n=s("a"),Gl=d("torch.nn.Module"),Wl=d(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ul=p(),Ke=s("div"),v(xn.$$.fragment),Hl=p(),Nt=s("p"),Rl=d("The "),Cs=s("a"),Vl=d("BlenderbotForConditionalGeneration"),Kl=d(" forward method, overrides the "),Aa=s("code"),Jl=d("__call__"),Xl=d(" special method."),Yl=p(),v(co.$$.fragment),Ql=p(),v(po.$$.fragment),Gr=p(),It=s("h2"),ho=s("a"),Pa=s("span"),v(zn.$$.fragment),Zl=p(),Oa=s("span"),ec=d("BlenderbotForCausalLM"),Wr=p(),St=s("div"),v(Fn.$$.fragment),tc=p(),uo=s("div"),v(Bn.$$.fragment),oc=p(),v(mo.$$.fragment),Ur=p(),Lt=s("h2"),fo=s("a"),Na=s("span"),v(qn.$$.fragment),nc=p(),Ia=s("span"),sc=d("TFBlenderbotModel"),Hr=p(),ke=s("div"),v(En.$$.fragment),ac=p(),jn=s("p"),rc=d(`The bare BLENDERBOT Model outputting raw hidden-states without any specific head on top.
This model inherits from `),As=s("a"),dc=d("TFPreTrainedModel"),ic=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.)`),lc=p(),Mn=s("p"),cc=d("This model is also a "),Cn=s("a"),pc=d("tf.keras.Model"),hc=d(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),uc=p(),v(_o.$$.fragment),mc=p(),Je=s("div"),v(An.$$.fragment),fc=p(),Dt=s("p"),_c=d("The "),Ps=s("a"),gc=d("TFBlenderbotModel"),bc=d(" forward method, overrides the "),Sa=s("code"),kc=d("__call__"),vc=d(" special method."),yc=p(),v(go.$$.fragment),Tc=p(),v(bo.$$.fragment),Rr=p(),Gt=s("h2"),ko=s("a"),La=s("span"),v(Pn.$$.fragment),wc=p(),Da=s("span"),$c=d("TFBlenderbotForConditionalGeneration"),Vr=p(),ve=s("div"),v(On.$$.fragment),xc=p(),Nn=s("p"),zc=d(`The BLENDERBOT Model with a language modeling head. Can be used for summarization.
This model inherits from `),Os=s("a"),Fc=d("TFPreTrainedModel"),Bc=d(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),qc=p(),In=s("p"),Ec=d("This model is also a "),Sn=s("a"),jc=d("tf.keras.Model"),Mc=d(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Cc=p(),v(vo.$$.fragment),Ac=p(),Xe=s("div"),v(Ln.$$.fragment),Pc=p(),Wt=s("p"),Oc=d("The "),Ns=s("a"),Nc=d("TFBlenderbotForConditionalGeneration"),Ic=d(" forward method, overrides the "),Ga=s("code"),Sc=d("__call__"),Lc=d(" special method."),Dc=p(),v(yo.$$.fragment),Gc=p(),v(To.$$.fragment),Kr=p(),Ut=s("h2"),wo=s("a"),Wa=s("span"),v(Dn.$$.fragment),Wc=p(),Ua=s("span"),Uc=d("FlaxBlenderbotModel"),Jr=p(),H=s("div"),v(Gn.$$.fragment),Hc=p(),Wn=s("p"),Rc=d(`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Is=s("a"),Vc=d("FlaxPreTrainedModel"),Kc=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.)`),Jc=p(),Un=s("p"),Xc=d(`This model is also a Flax Linen
`),Hn=s("a"),Yc=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.`),Zc=p(),Ha=s("p"),ep=d("Finally, this model supports inherent JAX features such as:"),tp=p(),pt=s("ul"),Ra=s("li"),Rn=s("a"),op=d("Just-In-Time (JIT) compilation"),np=p(),Va=s("li"),Vn=s("a"),sp=d("Automatic Differentiation"),ap=p(),Ka=s("li"),Kn=s("a"),rp=d("Vectorization"),dp=p(),Ja=s("li"),Jn=s("a"),ip=d("Parallelization"),lp=p(),Ye=s("div"),v(Xn.$$.fragment),cp=p(),Ht=s("p"),pp=d("The "),Xa=s("code"),hp=d("FlaxBlenderbotPreTrainedModel"),up=d(" forward method, overrides the "),Ya=s("code"),mp=d("__call__"),fp=d(" special method."),_p=p(),v($o.$$.fragment),gp=p(),v(xo.$$.fragment),bp=p(),zo=s("div"),v(Yn.$$.fragment),kp=p(),v(Fo.$$.fragment),vp=p(),Bo=s("div"),v(Qn.$$.fragment),yp=p(),v(qo.$$.fragment),Xr=p(),Rt=s("h2"),Eo=s("a"),Qa=s("span"),v(Zn.$$.fragment),Tp=p(),Za=s("span"),wp=d("FlaxBlenderbotForConditionalGeneration"),Yr=p(),R=s("div"),v(es.$$.fragment),$p=p(),ts=s("p"),xp=d(`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Ss=s("a"),zp=d("FlaxPreTrainedModel"),Fp=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.)`),Bp=p(),os=s("p"),qp=d(`This model is also a Flax Linen
`),ns=s("a"),Ep=d("flax.nn.Module"),jp=d(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Mp=p(),er=s("p"),Cp=d("Finally, this model supports inherent JAX features such as:"),Ap=p(),ht=s("ul"),tr=s("li"),ss=s("a"),Pp=d("Just-In-Time (JIT) compilation"),Op=p(),or=s("li"),as=s("a"),Np=d("Automatic Differentiation"),Ip=p(),nr=s("li"),rs=s("a"),Sp=d("Vectorization"),Lp=p(),sr=s("li"),ds=s("a"),Dp=d("Parallelization"),Gp=p(),Qe=s("div"),v(is.$$.fragment),Wp=p(),Vt=s("p"),Up=d("The "),ar=s("code"),Hp=d("FlaxBlenderbotPreTrainedModel"),Rp=d(" forward method, overrides the "),rr=s("code"),Vp=d("__call__"),Kp=d(" special method."),Jp=p(),v(jo.$$.fragment),Xp=p(),v(Mo.$$.fragment),Yp=p(),Co=s("div"),v(ls.$$.fragment),Qp=p(),v(Ao.$$.fragment),Zp=p(),Po=s("div"),v(cs.$$.fragment),eh=p(),v(Oo.$$.fragment),this.h()},l(o){const g=mm('[data-svelte="svelte-1phssyn"]',document.head);l=a(g,"META",{name:!0,content:!0}),g.forEach(t),k=h(o),f=a(o,"H1",{class:!0});var ps=r(f);u=a(ps,"A",{id:!0,class:!0,href:!0});var dr=r(u);b=a(dr,"SPAN",{});var ir=r(b);y(n.$$.fragment,ir),ir.forEach(t),dr.forEach(t),c=h(ps),B=a(ps,"SPAN",{});var lr=r(B);X=i(lr,"Blenderbot"),lr.forEach(t),ps.forEach(t),N=h(o),A=a(o,"P",{});var No=r(A);Q=a(No,"STRONG",{});var cr=r(Q);Fe=i(cr,"DISCLAIMER:"),cr.forEach(t),q=i(No," If you see something strange, file a "),le=a(No,"A",{href:!0,rel:!0});var pr=r(le);ce=i(pr,"Github Issue"),pr.forEach(t),Ze=i(No," ."),No.forEach(t),Ge=h(o),I=a(o,"H2",{class:!0});var hs=r(I);Z=a(hs,"A",{id:!0,class:!0,href:!0});var hr=r(Z);Be=a(hr,"SPAN",{});var ur=r(Be);y(V.$$.fragment,ur),ur.forEach(t),hr.forEach(t),et=h(hs),qe=a(hs,"SPAN",{});var mr=r(qe);pe=i(mr,"Overview"),mr.forEach(t),hs.forEach(t),We=h(o),ee=a(o,"P",{});var us=r(ee);he=i(us,"The Blender chatbot model was proposed in "),ue=a(us,"A",{href:!0,rel:!0});var fr=r(ue);tt=i(fr,"Recipes for building an open-domain chatbot"),fr.forEach(t),Ee=i(us,` Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu,
Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston on 30 Apr 2020.`),us.forEach(t),M=h(o),P=a(o,"P",{});var _r=r(P);ot=i(_r,"The abstract of the paper is the following:"),_r.forEach(t),te=h(o),we=a(o,"P",{});var gr=r(we);je=a(gr,"EM",{});var br=r(je);me=i(br,`Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that
scaling neural models in the number of parameters and the size of the data they are trained on gives improved results,
we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of
skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to
their partners, and displaying knowledge, empathy and personality appropriately, while maintaining a consistent
persona. We show that large scale models can learn these skills when given appropriate training data and choice of
generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter models, and make our models
and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn
dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing
failure cases of our models.`),br.forEach(t),gr.forEach(t),Ue=h(o),$e=a(o,"P",{});var kr=r($e);S=i(kr,"Tips:"),kr.forEach(t),He=h(o),K=a(o,"UL",{});var vr=r(K);Me=a(vr,"LI",{});var yr=r(Me);nt=i(yr,`Blenderbot is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),yr.forEach(t),vr.forEach(t),oe=h(o),J=a(o,"P",{});var Kt=r(J);st=i(Kt,"This model was contributed by "),L=a(Kt,"A",{href:!0,rel:!0});var Tr=r(L);at=i(Tr,"sshleifer"),Tr.forEach(t),fe=i(Kt,". The authors\u2019 code can be found "),_e=a(Kt,"A",{href:!0,rel:!0});var wr=r(_e);Ce=i(wr,"here"),wr.forEach(t),D=i(Kt," ."),Kt.forEach(t),Re=h(o),C=a(o,"H2",{class:!0});var ms=r(C);ne=a(ms,"A",{id:!0,class:!0,href:!0});var $r=r(ne);Ae=a($r,"SPAN",{});var nh=r(Ae);y(z.$$.fragment,nh),nh.forEach(t),$r.forEach(t),E=h(ms),rt=a(ms,"SPAN",{});var sh=r(rt);Pe=i(sh,"Implementation Notes"),sh.forEach(t),ms.forEach(t),ut=h(o),se=a(o,"UL",{});var Ls=r(se);j=a(Ls,"LI",{});var Zr=r(j);vt=i(Zr,"Blenderbot uses a standard "),Oe=a(Zr,"A",{href:!0,rel:!0});var ah=r(Oe);yt=i(ah,"seq2seq model transformer"),ah.forEach(t),Tt=i(Zr," based architecture."),Zr.forEach(t),wt=h(Ls),G=a(Ls,"LI",{});var ed=r(G);ge=i(ed,"Available checkpoints can be found in the "),Ne=a(ed,"A",{href:!0,rel:!0});var rh=r(Ne);$t=i(rh,"model hub"),rh.forEach(t),be=i(ed,"."),ed.forEach(t),xt=h(Ls),Y=a(Ls,"LI",{});var Io=r(Y);dt=i(Io,"This is the "),it=a(Io,"EM",{});var dh=r(it);Ie=i(dh,"default"),dh.forEach(t),zt=i(Io,` Blenderbot model class. However, some smaller checkpoints, such as
`),Qs=a(Io,"CODE",{});var ih=r(Qs);Od=i(ih,"facebook/blenderbot_small_90M"),ih.forEach(t),Nd=i(Io,`, have a different architecture and consequently should be used with
`),gs=a(Io,"A",{href:!0});var lh=r(gs);Id=i(lh,"BlenderbotSmall"),lh.forEach(t),Sd=i(Io,"."),Io.forEach(t),Ls.forEach(t),xr=h(o),Ft=a(o,"H2",{class:!0});var td=r(Ft);Jt=a(td,"A",{id:!0,class:!0,href:!0});var ch=r(Jt);Zs=a(ch,"SPAN",{});var ph=r(Zs);y(Xo.$$.fragment,ph),ph.forEach(t),ch.forEach(t),Ld=h(td),ea=a(td,"SPAN",{});var hh=r(ea);Dd=i(hh,"Usage"),hh.forEach(t),td.forEach(t),zr=h(o),bs=a(o,"P",{});var uh=r(bs);Gd=i(uh,"Here is an example of model usage:"),uh.forEach(t),Fr=h(o),y(Yo.$$.fragment,o),Br=h(o),Bt=a(o,"H2",{class:!0});var od=r(Bt);Xt=a(od,"A",{id:!0,class:!0,href:!0});var mh=r(Xt);ta=a(mh,"SPAN",{});var fh=r(ta);y(Qo.$$.fragment,fh),fh.forEach(t),mh.forEach(t),Wd=h(od),oa=a(od,"SPAN",{});var _h=r(oa);Ud=i(_h,"Documentation resources"),_h.forEach(t),od.forEach(t),qr=h(o),mt=a(o,"UL",{});var Ds=r(mt);na=a(Ds,"LI",{});var gh=r(na);ks=a(gh,"A",{href:!0});var bh=r(ks);Hd=i(bh,"Causal language modeling task guide"),bh.forEach(t),gh.forEach(t),Rd=h(Ds),sa=a(Ds,"LI",{});var kh=r(sa);vs=a(kh,"A",{href:!0});var vh=r(vs);Vd=i(vh,"Translation task guide"),vh.forEach(t),kh.forEach(t),Kd=h(Ds),aa=a(Ds,"LI",{});var yh=r(aa);ys=a(yh,"A",{href:!0});var Th=r(ys);Jd=i(Th,"Summarization task guide"),Th.forEach(t),yh.forEach(t),Ds.forEach(t),Er=h(o),qt=a(o,"H2",{class:!0});var nd=r(qt);Yt=a(nd,"A",{id:!0,class:!0,href:!0});var wh=r(Yt);ra=a(wh,"SPAN",{});var $h=r(ra);y(Zo.$$.fragment,$h),$h.forEach(t),wh.forEach(t),Xd=h(nd),da=a(nd,"SPAN",{});var xh=r(da);Yd=i(xh,"BlenderbotConfig"),xh.forEach(t),nd.forEach(t),jr=h(o),Se=a(o,"DIV",{class:!0});var So=r(Se);y(en.$$.fragment,So),Qd=h(So),Et=a(So,"P",{});var Gs=r(Et);Zd=i(Gs,"This is the configuration class to store the configuration of a "),Ts=a(Gs,"A",{href:!0});var zh=r(Ts);ei=i(zh,"BlenderbotModel"),zh.forEach(t),ti=i(Gs,`. It is used to instantiate an
Blenderbot model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the Blenderbot
`),tn=a(Gs,"A",{href:!0,rel:!0});var Fh=r(tn);oi=i(Fh,"facebook/blenderbot-3B"),Fh.forEach(t),ni=i(Gs," architecture."),Gs.forEach(t),si=h(So),jt=a(So,"P",{});var Ws=r(jt);ai=i(Ws,"Configuration objects inherit from "),ws=a(Ws,"A",{href:!0});var Bh=r(ws);ri=i(Bh,"PretrainedConfig"),Bh.forEach(t),di=i(Ws,` and can be used to control the model outputs. Read the
documentation from `),$s=a(Ws,"A",{href:!0});var qh=r($s);ii=i(qh,"PretrainedConfig"),qh.forEach(t),li=i(Ws," for more information."),Ws.forEach(t),ci=h(So),y(Qt.$$.fragment,So),So.forEach(t),Mr=h(o),Mt=a(o,"H2",{class:!0});var sd=r(Mt);Zt=a(sd,"A",{id:!0,class:!0,href:!0});var Eh=r(Zt);ia=a(Eh,"SPAN",{});var jh=r(ia);y(on.$$.fragment,jh),jh.forEach(t),Eh.forEach(t),pi=h(sd),la=a(sd,"SPAN",{});var Mh=r(la);hi=i(Mh,"BlenderbotTokenizer"),Mh.forEach(t),sd.forEach(t),Cr=h(o),W=a(o,"DIV",{class:!0});var ae=r(W);y(nn.$$.fragment,ae),ui=h(ae),ca=a(ae,"P",{});var Ch=r(ca);mi=i(Ch,"Constructs a Blenderbot tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),Ch.forEach(t),fi=h(ae),pa=a(ae,"P",{});var Ah=r(pa);_i=i(Ah,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Ah.forEach(t),gi=h(ae),y(eo.$$.fragment,ae),bi=h(ae),sn=a(ae,"P",{});var ad=r(sn);ki=i(ad,"You can get around that behavior by passing "),ha=a(ad,"CODE",{});var Ph=r(ha);vi=i(Ph,"add_prefix_space=True"),Ph.forEach(t),yi=i(ad,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),ad.forEach(t),Ti=h(ae),y(to.$$.fragment,ae),wi=h(ae),an=a(ae,"P",{});var rd=r(an);$i=i(rd,"This tokenizer inherits from "),xs=a(rd,"A",{href:!0});var Oh=r(xs);xi=i(Oh,"PreTrainedTokenizer"),Oh.forEach(t),zi=i(rd,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),rd.forEach(t),Fi=h(ae),ft=a(ae,"DIV",{class:!0});var Us=r(ft);y(rn.$$.fragment,Us),Bi=h(Us),ua=a(Us,"P",{});var Nh=r(ua);qi=i(Nh,`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:`),Nh.forEach(t),Ei=h(Us),ma=a(Us,"UL",{});var Ih=r(ma);zs=a(Ih,"LI",{});var th=r(zs);ji=i(th,"single sequence: "),fa=a(th,"CODE",{});var Sh=r(fa);Mi=i(Sh,"X </s>"),Sh.forEach(t),th.forEach(t),Ih.forEach(t),Us.forEach(t),ae.forEach(t),Ar=h(o),Ct=a(o,"H2",{class:!0});var dd=r(Ct);oo=a(dd,"A",{id:!0,class:!0,href:!0});var Lh=r(oo);_a=a(Lh,"SPAN",{});var Dh=r(_a);y(dn.$$.fragment,Dh),Dh.forEach(t),Lh.forEach(t),Ci=h(dd),ga=a(dd,"SPAN",{});var Gh=r(ga);Ai=i(Gh,"BlenderbotTokenizerFast"),Gh.forEach(t),dd.forEach(t),Pr=h(o),U=a(o,"DIV",{class:!0});var re=r(U);y(ln.$$.fragment,re),Pi=h(re),cn=a(re,"P",{});var id=r(cn);Oi=i(id,"Construct a \u201Cfast\u201D Blenderbot tokenizer (backed by HuggingFace\u2019s "),ba=a(id,"EM",{});var Wh=r(ba);Ni=i(Wh,"tokenizers"),Wh.forEach(t),Ii=i(id,` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),id.forEach(t),Si=h(re),ka=a(re,"P",{});var Uh=r(ka);Li=i(Uh,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Uh.forEach(t),Di=h(re),y(no.$$.fragment,re),Gi=h(re),pn=a(re,"P",{});var ld=r(pn);Wi=i(ld,"You can get around that behavior by passing "),va=a(ld,"CODE",{});var Hh=r(va);Ui=i(Hh,"add_prefix_space=True"),Hh.forEach(t),Hi=i(ld,` 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.`),ld.forEach(t),Ri=h(re),y(so.$$.fragment,re),Vi=h(re),hn=a(re,"P",{});var cd=r(hn);Ki=i(cd,"This tokenizer inherits from "),Fs=a(cd,"A",{href:!0});var Rh=r(Fs);Ji=i(Rh,"PreTrainedTokenizerFast"),Rh.forEach(t),Xi=i(cd,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),cd.forEach(t),Yi=h(re),_t=a(re,"DIV",{class:!0});var Hs=r(_t);y(un.$$.fragment,Hs),Qi=h(Hs),ya=a(Hs,"P",{});var Vh=r(ya);Zi=i(Vh,`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:`),Vh.forEach(t),el=h(Hs),Ta=a(Hs,"UL",{});var Kh=r(Ta);Bs=a(Kh,"LI",{});var oh=r(Bs);tl=i(oh,"single sequence: "),wa=a(oh,"CODE",{});var Jh=r(wa);ol=i(Jh,"X </s>"),Jh.forEach(t),oh.forEach(t),Kh.forEach(t),Hs.forEach(t),re.forEach(t),Or=h(o),At=a(o,"H2",{class:!0});var pd=r(At);ao=a(pd,"A",{id:!0,class:!0,href:!0});var Xh=r(ao);$a=a(Xh,"SPAN",{});var Yh=r($a);y(mn.$$.fragment,Yh),Yh.forEach(t),Xh.forEach(t),nl=h(pd),xa=a(pd,"SPAN",{});var Qh=r(xa);sl=i(Qh,"BlenderbotModel"),Qh.forEach(t),pd.forEach(t),Nr=h(o),lt=a(o,"P",{});var fs=r(lt);al=i(fs,"See "),za=a(fs,"CODE",{});var Zh=r(za);rl=i(Zh,"transformers.BartModel"),Zh.forEach(t),dl=i(fs," for arguments to "),Fa=a(fs,"EM",{});var eu=r(Fa);il=i(eu,"forward"),eu.forEach(t),ll=i(fs," and "),Ba=a(fs,"EM",{});var tu=r(Ba);cl=i(tu,"generate"),tu.forEach(t),fs.forEach(t),Ir=h(o),Le=a(o,"DIV",{class:!0});var Lo=r(Le);y(fn.$$.fragment,Lo),pl=h(Lo),_n=a(Lo,"P",{});var hd=r(_n);hl=i(hd,`The bare Blenderbot Model outputting raw hidden-states without any specific head on top.
This model inherits from `),qs=a(hd,"A",{href:!0});var ou=r(qs);ul=i(ou,"PreTrainedModel"),ou.forEach(t),ml=i(hd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),hd.forEach(t),fl=h(Lo),gn=a(Lo,"P",{});var ud=r(gn);_l=i(ud,"This model is also a PyTorch "),bn=a(ud,"A",{href:!0,rel:!0});var nu=r(bn);gl=i(nu,"torch.nn.Module"),nu.forEach(t),bl=i(ud,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ud.forEach(t),kl=h(Lo),Ve=a(Lo,"DIV",{class:!0});var Do=r(Ve);y(kn.$$.fragment,Do),vl=h(Do),Pt=a(Do,"P",{});var Rs=r(Pt);yl=i(Rs,"The "),Es=a(Rs,"A",{href:!0});var su=r(Es);Tl=i(su,"BlenderbotModel"),su.forEach(t),wl=i(Rs," forward method, overrides the "),qa=a(Rs,"CODE",{});var au=r(qa);$l=i(au,"__call__"),au.forEach(t),xl=i(Rs," special method."),Rs.forEach(t),zl=h(Do),y(ro.$$.fragment,Do),Fl=h(Do),y(io.$$.fragment,Do),Do.forEach(t),Lo.forEach(t),Sr=h(o),Ot=a(o,"H2",{class:!0});var md=r(Ot);lo=a(md,"A",{id:!0,class:!0,href:!0});var ru=r(lo);Ea=a(ru,"SPAN",{});var du=r(Ea);y(vn.$$.fragment,du),du.forEach(t),ru.forEach(t),Bl=h(md),ja=a(md,"SPAN",{});var iu=r(ja);ql=i(iu,"BlenderbotForConditionalGeneration"),iu.forEach(t),md.forEach(t),Lr=h(o),ct=a(o,"P",{});var _s=r(ct);El=i(_s,"See "),js=a(_s,"A",{href:!0});var lu=r(js);jl=i(lu,"BartForConditionalGeneration"),lu.forEach(t),Ml=i(_s," for arguments to "),Ma=a(_s,"EM",{});var cu=r(Ma);Cl=i(cu,"forward"),cu.forEach(t),Al=i(_s," and "),Ca=a(_s,"EM",{});var pu=r(Ca);Pl=i(pu,"generate"),pu.forEach(t),_s.forEach(t),Dr=h(o),De=a(o,"DIV",{class:!0});var Go=r(De);y(yn.$$.fragment,Go),Ol=h(Go),Tn=a(Go,"P",{});var fd=r(Tn);Nl=i(fd,`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Ms=a(fd,"A",{href:!0});var hu=r(Ms);Il=i(hu,"PreTrainedModel"),hu.forEach(t),Sl=i(fd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fd.forEach(t),Ll=h(Go),wn=a(Go,"P",{});var _d=r(wn);Dl=i(_d,"This model is also a PyTorch "),$n=a(_d,"A",{href:!0,rel:!0});var uu=r($n);Gl=i(uu,"torch.nn.Module"),uu.forEach(t),Wl=i(_d,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_d.forEach(t),Ul=h(Go),Ke=a(Go,"DIV",{class:!0});var Wo=r(Ke);y(xn.$$.fragment,Wo),Hl=h(Wo),Nt=a(Wo,"P",{});var Vs=r(Nt);Rl=i(Vs,"The "),Cs=a(Vs,"A",{href:!0});var mu=r(Cs);Vl=i(mu,"BlenderbotForConditionalGeneration"),mu.forEach(t),Kl=i(Vs," forward method, overrides the "),Aa=a(Vs,"CODE",{});var fu=r(Aa);Jl=i(fu,"__call__"),fu.forEach(t),Xl=i(Vs," special method."),Vs.forEach(t),Yl=h(Wo),y(co.$$.fragment,Wo),Ql=h(Wo),y(po.$$.fragment,Wo),Wo.forEach(t),Go.forEach(t),Gr=h(o),It=a(o,"H2",{class:!0});var gd=r(It);ho=a(gd,"A",{id:!0,class:!0,href:!0});var _u=r(ho);Pa=a(_u,"SPAN",{});var gu=r(Pa);y(zn.$$.fragment,gu),gu.forEach(t),_u.forEach(t),Zl=h(gd),Oa=a(gd,"SPAN",{});var bu=r(Oa);ec=i(bu,"BlenderbotForCausalLM"),bu.forEach(t),gd.forEach(t),Wr=h(o),St=a(o,"DIV",{class:!0});var bd=r(St);y(Fn.$$.fragment,bd),tc=h(bd),uo=a(bd,"DIV",{class:!0});var kd=r(uo);y(Bn.$$.fragment,kd),oc=h(kd),y(mo.$$.fragment,kd),kd.forEach(t),bd.forEach(t),Ur=h(o),Lt=a(o,"H2",{class:!0});var vd=r(Lt);fo=a(vd,"A",{id:!0,class:!0,href:!0});var ku=r(fo);Na=a(ku,"SPAN",{});var vu=r(Na);y(qn.$$.fragment,vu),vu.forEach(t),ku.forEach(t),nc=h(vd),Ia=a(vd,"SPAN",{});var yu=r(Ia);sc=i(yu,"TFBlenderbotModel"),yu.forEach(t),vd.forEach(t),Hr=h(o),ke=a(o,"DIV",{class:!0});var gt=r(ke);y(En.$$.fragment,gt),ac=h(gt),jn=a(gt,"P",{});var yd=r(jn);rc=i(yd,`The bare BLENDERBOT Model outputting raw hidden-states without any specific head on top.
This model inherits from `),As=a(yd,"A",{href:!0});var Tu=r(As);dc=i(Tu,"TFPreTrainedModel"),Tu.forEach(t),ic=i(yd,`. 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.)`),yd.forEach(t),lc=h(gt),Mn=a(gt,"P",{});var Td=r(Mn);cc=i(Td,"This model is also a "),Cn=a(Td,"A",{href:!0,rel:!0});var wu=r(Cn);pc=i(wu,"tf.keras.Model"),wu.forEach(t),hc=i(Td,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Td.forEach(t),uc=h(gt),y(_o.$$.fragment,gt),mc=h(gt),Je=a(gt,"DIV",{class:!0});var Uo=r(Je);y(An.$$.fragment,Uo),fc=h(Uo),Dt=a(Uo,"P",{});var Ks=r(Dt);_c=i(Ks,"The "),Ps=a(Ks,"A",{href:!0});var $u=r(Ps);gc=i($u,"TFBlenderbotModel"),$u.forEach(t),bc=i(Ks," forward method, overrides the "),Sa=a(Ks,"CODE",{});var xu=r(Sa);kc=i(xu,"__call__"),xu.forEach(t),vc=i(Ks," special method."),Ks.forEach(t),yc=h(Uo),y(go.$$.fragment,Uo),Tc=h(Uo),y(bo.$$.fragment,Uo),Uo.forEach(t),gt.forEach(t),Rr=h(o),Gt=a(o,"H2",{class:!0});var wd=r(Gt);ko=a(wd,"A",{id:!0,class:!0,href:!0});var zu=r(ko);La=a(zu,"SPAN",{});var Fu=r(La);y(Pn.$$.fragment,Fu),Fu.forEach(t),zu.forEach(t),wc=h(wd),Da=a(wd,"SPAN",{});var Bu=r(Da);$c=i(Bu,"TFBlenderbotForConditionalGeneration"),Bu.forEach(t),wd.forEach(t),Vr=h(o),ve=a(o,"DIV",{class:!0});var bt=r(ve);y(On.$$.fragment,bt),xc=h(bt),Nn=a(bt,"P",{});var $d=r(Nn);zc=i($d,`The BLENDERBOT Model with a language modeling head. Can be used for summarization.
This model inherits from `),Os=a($d,"A",{href:!0});var qu=r(Os);Fc=i(qu,"TFPreTrainedModel"),qu.forEach(t),Bc=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),qc=h(bt),In=a(bt,"P",{});var xd=r(In);Ec=i(xd,"This model is also a "),Sn=a(xd,"A",{href:!0,rel:!0});var Eu=r(Sn);jc=i(Eu,"tf.keras.Model"),Eu.forEach(t),Mc=i(xd,` 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.`),xd.forEach(t),Cc=h(bt),y(vo.$$.fragment,bt),Ac=h(bt),Xe=a(bt,"DIV",{class:!0});var Ho=r(Xe);y(Ln.$$.fragment,Ho),Pc=h(Ho),Wt=a(Ho,"P",{});var Js=r(Wt);Oc=i(Js,"The "),Ns=a(Js,"A",{href:!0});var ju=r(Ns);Nc=i(ju,"TFBlenderbotForConditionalGeneration"),ju.forEach(t),Ic=i(Js," forward method, overrides the "),Ga=a(Js,"CODE",{});var Mu=r(Ga);Sc=i(Mu,"__call__"),Mu.forEach(t),Lc=i(Js," special method."),Js.forEach(t),Dc=h(Ho),y(yo.$$.fragment,Ho),Gc=h(Ho),y(To.$$.fragment,Ho),Ho.forEach(t),bt.forEach(t),Kr=h(o),Ut=a(o,"H2",{class:!0});var zd=r(Ut);wo=a(zd,"A",{id:!0,class:!0,href:!0});var Cu=r(wo);Wa=a(Cu,"SPAN",{});var Au=r(Wa);y(Dn.$$.fragment,Au),Au.forEach(t),Cu.forEach(t),Wc=h(zd),Ua=a(zd,"SPAN",{});var Pu=r(Ua);Uc=i(Pu,"FlaxBlenderbotModel"),Pu.forEach(t),zd.forEach(t),Jr=h(o),H=a(o,"DIV",{class:!0});var de=r(H);y(Gn.$$.fragment,de),Hc=h(de),Wn=a(de,"P",{});var Fd=r(Wn);Rc=i(Fd,`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Is=a(Fd,"A",{href:!0});var Ou=r(Is);Vc=i(Ou,"FlaxPreTrainedModel"),Ou.forEach(t),Kc=i(Fd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Fd.forEach(t),Jc=h(de),Un=a(de,"P",{});var Bd=r(Un);Xc=i(Bd,`This model is also a Flax Linen
`),Hn=a(Bd,"A",{href:!0,rel:!0});var Nu=r(Hn);Yc=i(Nu,"flax.nn.Module"),Nu.forEach(t),Qc=i(Bd,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Bd.forEach(t),Zc=h(de),Ha=a(de,"P",{});var Iu=r(Ha);ep=i(Iu,"Finally, this model supports inherent JAX features such as:"),Iu.forEach(t),tp=h(de),pt=a(de,"UL",{});var Ro=r(pt);Ra=a(Ro,"LI",{});var Su=r(Ra);Rn=a(Su,"A",{href:!0,rel:!0});var Lu=r(Rn);op=i(Lu,"Just-In-Time (JIT) compilation"),Lu.forEach(t),Su.forEach(t),np=h(Ro),Va=a(Ro,"LI",{});var Du=r(Va);Vn=a(Du,"A",{href:!0,rel:!0});var Gu=r(Vn);sp=i(Gu,"Automatic Differentiation"),Gu.forEach(t),Du.forEach(t),ap=h(Ro),Ka=a(Ro,"LI",{});var Wu=r(Ka);Kn=a(Wu,"A",{href:!0,rel:!0});var Uu=r(Kn);rp=i(Uu,"Vectorization"),Uu.forEach(t),Wu.forEach(t),dp=h(Ro),Ja=a(Ro,"LI",{});var Hu=r(Ja);Jn=a(Hu,"A",{href:!0,rel:!0});var Ru=r(Jn);ip=i(Ru,"Parallelization"),Ru.forEach(t),Hu.forEach(t),Ro.forEach(t),lp=h(de),Ye=a(de,"DIV",{class:!0});var Vo=r(Ye);y(Xn.$$.fragment,Vo),cp=h(Vo),Ht=a(Vo,"P",{});var Xs=r(Ht);pp=i(Xs,"The "),Xa=a(Xs,"CODE",{});var Vu=r(Xa);hp=i(Vu,"FlaxBlenderbotPreTrainedModel"),Vu.forEach(t),up=i(Xs," forward method, overrides the "),Ya=a(Xs,"CODE",{});var Ku=r(Ya);mp=i(Ku,"__call__"),Ku.forEach(t),fp=i(Xs," special method."),Xs.forEach(t),_p=h(Vo),y($o.$$.fragment,Vo),gp=h(Vo),y(xo.$$.fragment,Vo),Vo.forEach(t),bp=h(de),zo=a(de,"DIV",{class:!0});var qd=r(zo);y(Yn.$$.fragment,qd),kp=h(qd),y(Fo.$$.fragment,qd),qd.forEach(t),vp=h(de),Bo=a(de,"DIV",{class:!0});var Ed=r(Bo);y(Qn.$$.fragment,Ed),yp=h(Ed),y(qo.$$.fragment,Ed),Ed.forEach(t),de.forEach(t),Xr=h(o),Rt=a(o,"H2",{class:!0});var jd=r(Rt);Eo=a(jd,"A",{id:!0,class:!0,href:!0});var Ju=r(Eo);Qa=a(Ju,"SPAN",{});var Xu=r(Qa);y(Zn.$$.fragment,Xu),Xu.forEach(t),Ju.forEach(t),Tp=h(jd),Za=a(jd,"SPAN",{});var Yu=r(Za);wp=i(Yu,"FlaxBlenderbotForConditionalGeneration"),Yu.forEach(t),jd.forEach(t),Yr=h(o),R=a(o,"DIV",{class:!0});var ie=r(R);y(es.$$.fragment,ie),$p=h(ie),ts=a(ie,"P",{});var Md=r(ts);xp=i(Md,`The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from `),Ss=a(Md,"A",{href:!0});var Qu=r(Ss);zp=i(Qu,"FlaxPreTrainedModel"),Qu.forEach(t),Fp=i(Md,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Md.forEach(t),Bp=h(ie),os=a(ie,"P",{});var Cd=r(os);qp=i(Cd,`This model is also a Flax Linen
`),ns=a(Cd,"A",{href:!0,rel:!0});var Zu=r(ns);Ep=i(Zu,"flax.nn.Module"),Zu.forEach(t),jp=i(Cd,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Cd.forEach(t),Mp=h(ie),er=a(ie,"P",{});var em=r(er);Cp=i(em,"Finally, this model supports inherent JAX features such as:"),em.forEach(t),Ap=h(ie),ht=a(ie,"UL",{});var Ko=r(ht);tr=a(Ko,"LI",{});var tm=r(tr);ss=a(tm,"A",{href:!0,rel:!0});var om=r(ss);Pp=i(om,"Just-In-Time (JIT) compilation"),om.forEach(t),tm.forEach(t),Op=h(Ko),or=a(Ko,"LI",{});var nm=r(or);as=a(nm,"A",{href:!0,rel:!0});var sm=r(as);Np=i(sm,"Automatic Differentiation"),sm.forEach(t),nm.forEach(t),Ip=h(Ko),nr=a(Ko,"LI",{});var am=r(nr);rs=a(am,"A",{href:!0,rel:!0});var rm=r(rs);Sp=i(rm,"Vectorization"),rm.forEach(t),am.forEach(t),Lp=h(Ko),sr=a(Ko,"LI",{});var dm=r(sr);ds=a(dm,"A",{href:!0,rel:!0});var im=r(ds);Dp=i(im,"Parallelization"),im.forEach(t),dm.forEach(t),Ko.forEach(t),Gp=h(ie),Qe=a(ie,"DIV",{class:!0});var Jo=r(Qe);y(is.$$.fragment,Jo),Wp=h(Jo),Vt=a(Jo,"P",{});var Ys=r(Vt);Up=i(Ys,"The "),ar=a(Ys,"CODE",{});var lm=r(ar);Hp=i(lm,"FlaxBlenderbotPreTrainedModel"),lm.forEach(t),Rp=i(Ys," forward method, overrides the "),rr=a(Ys,"CODE",{});var cm=r(rr);Vp=i(cm,"__call__"),cm.forEach(t),Kp=i(Ys," special method."),Ys.forEach(t),Jp=h(Jo),y(jo.$$.fragment,Jo),Xp=h(Jo),y(Mo.$$.fragment,Jo),Jo.forEach(t),Yp=h(ie),Co=a(ie,"DIV",{class:!0});var Ad=r(Co);y(ls.$$.fragment,Ad),Qp=h(Ad),y(Ao.$$.fragment,Ad),Ad.forEach(t),Zp=h(ie),Po=a(ie,"DIV",{class:!0});var Pd=r(Po);y(cs.$$.fragment,Pd),eh=h(Pd),y(Oo.$$.fragment,Pd),Pd.forEach(t),ie.forEach(t),this.h()},h(){m(l,"name","hf:doc:metadata"),m(l,"content",JSON.stringify(Dm)),m(u,"id","blenderbot"),m(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(u,"href","#blenderbot"),m(f,"class","relative group"),m(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(gs,"href","blenderbot-small"),m(Jt,"id","usage"),m(Jt,"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(Jt,"href","#usage"),m(Ft,"class","relative group"),m(Xt,"id","documentation-resources"),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","#documentation-resources"),m(Bt,"class","relative group"),m(ks,"href","./tasks/language_modeling"),m(vs,"href","./tasks/translation"),m(ys,"href","./tasks/summarization"),m(Yt,"id","transformers.BlenderbotConfig"),m(Yt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Yt,"href","#transformers.BlenderbotConfig"),m(qt,"class","relative group"),m(Ts,"href","/docs/transformers/v4.27.1/en/model_doc/blenderbot#transformers.BlenderbotModel"),m(tn,"href","https://huggingface.co/facebook/blenderbot-3B"),m(tn,"rel","nofollow"),m(ws,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),m($s,"href","/docs/transformers/v4.27.1/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(Zt,"id","transformers.BlenderbotTokenizer"),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.BlenderbotTokenizer"),m(Mt,"class","relative group"),m(xs,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(oo,"id","transformers.BlenderbotTokenizerFast"),m(oo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(oo,"href","#transformers.BlenderbotTokenizerFast"),m(Ct,"class","relative group"),m(Fs,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(_t,"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(ao,"id","transformers.BlenderbotModel"),m(ao,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ao,"href","#transformers.BlenderbotModel"),m(At,"class","relative group"),m(qs,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m(bn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(bn,"rel","nofollow"),m(Es,"href","/docs/transformers/v4.27.1/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(lo,"id","transformers.BlenderbotForConditionalGeneration"),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.BlenderbotForConditionalGeneration"),m(Ot,"class","relative group"),m(js,"href","/docs/transformers/v4.27.1/en/model_doc/bart#transformers.BartForConditionalGeneration"),m(Ms,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m($n,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m($n,"rel","nofollow"),m(Cs,"href","/docs/transformers/v4.27.1/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(ho,"id","transformers.BlenderbotForCausalLM"),m(ho,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ho,"href","#transformers.BlenderbotForCausalLM"),m(It,"class","relative group"),m(uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fo,"id","transformers.TFBlenderbotModel"),m(fo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(fo,"href","#transformers.TFBlenderbotModel"),m(Lt,"class","relative group"),m(As,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),m(Cn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Cn,"rel","nofollow"),m(Ps,"href","/docs/transformers/v4.27.1/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(ko,"id","transformers.TFBlenderbotForConditionalGeneration"),m(ko,"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(ko,"href","#transformers.TFBlenderbotForConditionalGeneration"),m(Gt,"class","relative group"),m(Os,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),m(Sn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Sn,"rel","nofollow"),m(Ns,"href","/docs/transformers/v4.27.1/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(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wo,"id","transformers.FlaxBlenderbotModel"),m(wo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(wo,"href","#transformers.FlaxBlenderbotModel"),m(Ut,"class","relative group"),m(Is,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Hn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Hn,"rel","nofollow"),m(Rn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Rn,"rel","nofollow"),m(Vn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Vn,"rel","nofollow"),m(Kn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Kn,"rel","nofollow"),m(Jn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Jn,"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(zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Bo,"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(Eo,"id","transformers.FlaxBlenderbotForConditionalGeneration"),m(Eo,"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(Eo,"href","#transformers.FlaxBlenderbotForConditionalGeneration"),m(Rt,"class","relative group"),m(Ss,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ns,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(ns,"rel","nofollow"),m(ss,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(ss,"rel","nofollow"),m(as,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(as,"rel","nofollow"),m(rs,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(rs,"rel","nofollow"),m(ds,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(ds,"rel","nofollow"),m(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(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(Po,"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,u),e(u,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,Ee),_(o,M,g),_(o,P,g),e(P,ot),_(o,te,g),_(o,we,g),e(we,je),e(je,me),_(o,Ue,g),_(o,$e,g),e($e,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,E),e(C,rt),e(rt,Pe),_(o,ut,g),_(o,se,g),e(se,j),e(j,vt),e(j,Oe),e(Oe,yt),e(j,Tt),e(se,wt),e(se,G),e(G,ge),e(G,Ne),e(Ne,$t),e(G,be),e(se,xt),e(se,Y),e(Y,dt),e(Y,it),e(it,Ie),e(Y,zt),e(Y,Qs),e(Qs,Od),e(Y,Nd),e(Y,gs),e(gs,Id),e(Y,Sd),_(o,xr,g),_(o,Ft,g),e(Ft,Jt),e(Jt,Zs),T(Xo,Zs,null),e(Ft,Ld),e(Ft,ea),e(ea,Dd),_(o,zr,g),_(o,bs,g),e(bs,Gd),_(o,Fr,g),T(Yo,o,g),_(o,Br,g),_(o,Bt,g),e(Bt,Xt),e(Xt,ta),T(Qo,ta,null),e(Bt,Wd),e(Bt,oa),e(oa,Ud),_(o,qr,g),_(o,mt,g),e(mt,na),e(na,ks),e(ks,Hd),e(mt,Rd),e(mt,sa),e(sa,vs),e(vs,Vd),e(mt,Kd),e(mt,aa),e(aa,ys),e(ys,Jd),_(o,Er,g),_(o,qt,g),e(qt,Yt),e(Yt,ra),T(Zo,ra,null),e(qt,Xd),e(qt,da),e(da,Yd),_(o,jr,g),_(o,Se,g),T(en,Se,null),e(Se,Qd),e(Se,Et),e(Et,Zd),e(Et,Ts),e(Ts,ei),e(Et,ti),e(Et,tn),e(tn,oi),e(Et,ni),e(Se,si),e(Se,jt),e(jt,ai),e(jt,ws),e(ws,ri),e(jt,di),e(jt,$s),e($s,ii),e(jt,li),e(Se,ci),T(Qt,Se,null),_(o,Mr,g),_(o,Mt,g),e(Mt,Zt),e(Zt,ia),T(on,ia,null),e(Mt,pi),e(Mt,la),e(la,hi),_(o,Cr,g),_(o,W,g),T(nn,W,null),e(W,ui),e(W,ca),e(ca,mi),e(W,fi),e(W,pa),e(pa,_i),e(W,gi),T(eo,W,null),e(W,bi),e(W,sn),e(sn,ki),e(sn,ha),e(ha,vi),e(sn,yi),e(W,Ti),T(to,W,null),e(W,wi),e(W,an),e(an,$i),e(an,xs),e(xs,xi),e(an,zi),e(W,Fi),e(W,ft),T(rn,ft,null),e(ft,Bi),e(ft,ua),e(ua,qi),e(ft,Ei),e(ft,ma),e(ma,zs),e(zs,ji),e(zs,fa),e(fa,Mi),_(o,Ar,g),_(o,Ct,g),e(Ct,oo),e(oo,_a),T(dn,_a,null),e(Ct,Ci),e(Ct,ga),e(ga,Ai),_(o,Pr,g),_(o,U,g),T(ln,U,null),e(U,Pi),e(U,cn),e(cn,Oi),e(cn,ba),e(ba,Ni),e(cn,Ii),e(U,Si),e(U,ka),e(ka,Li),e(U,Di),T(no,U,null),e(U,Gi),e(U,pn),e(pn,Wi),e(pn,va),e(va,Ui),e(pn,Hi),e(U,Ri),T(so,U,null),e(U,Vi),e(U,hn),e(hn,Ki),e(hn,Fs),e(Fs,Ji),e(hn,Xi),e(U,Yi),e(U,_t),T(un,_t,null),e(_t,Qi),e(_t,ya),e(ya,Zi),e(_t,el),e(_t,Ta),e(Ta,Bs),e(Bs,tl),e(Bs,wa),e(wa,ol),_(o,Or,g),_(o,At,g),e(At,ao),e(ao,$a),T(mn,$a,null),e(At,nl),e(At,xa),e(xa,sl),_(o,Nr,g),_(o,lt,g),e(lt,al),e(lt,za),e(za,rl),e(lt,dl),e(lt,Fa),e(Fa,il),e(lt,ll),e(lt,Ba),e(Ba,cl),_(o,Ir,g),_(o,Le,g),T(fn,Le,null),e(Le,pl),e(Le,_n),e(_n,hl),e(_n,qs),e(qs,ul),e(_n,ml),e(Le,fl),e(Le,gn),e(gn,_l),e(gn,bn),e(bn,gl),e(gn,bl),e(Le,kl),e(Le,Ve),T(kn,Ve,null),e(Ve,vl),e(Ve,Pt),e(Pt,yl),e(Pt,Es),e(Es,Tl),e(Pt,wl),e(Pt,qa),e(qa,$l),e(Pt,xl),e(Ve,zl),T(ro,Ve,null),e(Ve,Fl),T(io,Ve,null),_(o,Sr,g),_(o,Ot,g),e(Ot,lo),e(lo,Ea),T(vn,Ea,null),e(Ot,Bl),e(Ot,ja),e(ja,ql),_(o,Lr,g),_(o,ct,g),e(ct,El),e(ct,js),e(js,jl),e(ct,Ml),e(ct,Ma),e(Ma,Cl),e(ct,Al),e(ct,Ca),e(Ca,Pl),_(o,Dr,g),_(o,De,g),T(yn,De,null),e(De,Ol),e(De,Tn),e(Tn,Nl),e(Tn,Ms),e(Ms,Il),e(Tn,Sl),e(De,Ll),e(De,wn),e(wn,Dl),e(wn,$n),e($n,Gl),e(wn,Wl),e(De,Ul),e(De,Ke),T(xn,Ke,null),e(Ke,Hl),e(Ke,Nt),e(Nt,Rl),e(Nt,Cs),e(Cs,Vl),e(Nt,Kl),e(Nt,Aa),e(Aa,Jl),e(Nt,Xl),e(Ke,Yl),T(co,Ke,null),e(Ke,Ql),T(po,Ke,null),_(o,Gr,g),_(o,It,g),e(It,ho),e(ho,Pa),T(zn,Pa,null),e(It,Zl),e(It,Oa),e(Oa,ec),_(o,Wr,g),_(o,St,g),T(Fn,St,null),e(St,tc),e(St,uo),T(Bn,uo,null),e(uo,oc),T(mo,uo,null),_(o,Ur,g),_(o,Lt,g),e(Lt,fo),e(fo,Na),T(qn,Na,null),e(Lt,nc),e(Lt,Ia),e(Ia,sc),_(o,Hr,g),_(o,ke,g),T(En,ke,null),e(ke,ac),e(ke,jn),e(jn,rc),e(jn,As),e(As,dc),e(jn,ic),e(ke,lc),e(ke,Mn),e(Mn,cc),e(Mn,Cn),e(Cn,pc),e(Mn,hc),e(ke,uc),T(_o,ke,null),e(ke,mc),e(ke,Je),T(An,Je,null),e(Je,fc),e(Je,Dt),e(Dt,_c),e(Dt,Ps),e(Ps,gc),e(Dt,bc),e(Dt,Sa),e(Sa,kc),e(Dt,vc),e(Je,yc),T(go,Je,null),e(Je,Tc),T(bo,Je,null),_(o,Rr,g),_(o,Gt,g),e(Gt,ko),e(ko,La),T(Pn,La,null),e(Gt,wc),e(Gt,Da),e(Da,$c),_(o,Vr,g),_(o,ve,g),T(On,ve,null),e(ve,xc),e(ve,Nn),e(Nn,zc),e(Nn,Os),e(Os,Fc),e(Nn,Bc),e(ve,qc),e(ve,In),e(In,Ec),e(In,Sn),e(Sn,jc),e(In,Mc),e(ve,Cc),T(vo,ve,null),e(ve,Ac),e(ve,Xe),T(Ln,Xe,null),e(Xe,Pc),e(Xe,Wt),e(Wt,Oc),e(Wt,Ns),e(Ns,Nc),e(Wt,Ic),e(Wt,Ga),e(Ga,Sc),e(Wt,Lc),e(Xe,Dc),T(yo,Xe,null),e(Xe,Gc),T(To,Xe,null),_(o,Kr,g),_(o,Ut,g),e(Ut,wo),e(wo,Wa),T(Dn,Wa,null),e(Ut,Wc),e(Ut,Ua),e(Ua,Uc),_(o,Jr,g),_(o,H,g),T(Gn,H,null),e(H,Hc),e(H,Wn),e(Wn,Rc),e(Wn,Is),e(Is,Vc),e(Wn,Kc),e(H,Jc),e(H,Un),e(Un,Xc),e(Un,Hn),e(Hn,Yc),e(Un,Qc),e(H,Zc),e(H,Ha),e(Ha,ep),e(H,tp),e(H,pt),e(pt,Ra),e(Ra,Rn),e(Rn,op),e(pt,np),e(pt,Va),e(Va,Vn),e(Vn,sp),e(pt,ap),e(pt,Ka),e(Ka,Kn),e(Kn,rp),e(pt,dp),e(pt,Ja),e(Ja,Jn),e(Jn,ip),e(H,lp),e(H,Ye),T(Xn,Ye,null),e(Ye,cp),e(Ye,Ht),e(Ht,pp),e(Ht,Xa),e(Xa,hp),e(Ht,up),e(Ht,Ya),e(Ya,mp),e(Ht,fp),e(Ye,_p),T($o,Ye,null),e(Ye,gp),T(xo,Ye,null),e(H,bp),e(H,zo),T(Yn,zo,null),e(zo,kp),T(Fo,zo,null),e(H,vp),e(H,Bo),T(Qn,Bo,null),e(Bo,yp),T(qo,Bo,null),_(o,Xr,g),_(o,Rt,g),e(Rt,Eo),e(Eo,Qa),T(Zn,Qa,null),e(Rt,Tp),e(Rt,Za),e(Za,wp),_(o,Yr,g),_(o,R,g),T(es,R,null),e(R,$p),e(R,ts),e(ts,xp),e(ts,Ss),e(Ss,zp),e(ts,Fp),e(R,Bp),e(R,os),e(os,qp),e(os,ns),e(ns,Ep),e(os,jp),e(R,Mp),e(R,er),e(er,Cp),e(R,Ap),e(R,ht),e(ht,tr),e(tr,ss),e(ss,Pp),e(ht,Op),e(ht,or),e(or,as),e(as,Np),e(ht,Ip),e(ht,nr),e(nr,rs),e(rs,Sp),e(ht,Lp),e(ht,sr),e(sr,ds),e(ds,Dp),e(R,Gp),e(R,Qe),T(is,Qe,null),e(Qe,Wp),e(Qe,Vt),e(Vt,Up),e(Vt,ar),e(ar,Hp),e(Vt,Rp),e(Vt,rr),e(rr,Vp),e(Vt,Kp),e(Qe,Jp),T(jo,Qe,null),e(Qe,Xp),T(Mo,Qe,null),e(R,Yp),e(R,Co),T(ls,Co,null),e(Co,Qp),T(Ao,Co,null),e(R,Zp),e(R,Po),T(cs,Po,null),e(Po,eh),T(Oo,Po,null),Qr=!0},p(o,[g]){const ps={};g&2&&(ps.$$scope={dirty:g,ctx:o}),Qt.$set(ps);const dr={};g&2&&(dr.$$scope={dirty:g,ctx:o}),eo.$set(dr);const ir={};g&2&&(ir.$$scope={dirty:g,ctx:o}),to.$set(ir);const lr={};g&2&&(lr.$$scope={dirty:g,ctx:o}),no.$set(lr);const No={};g&2&&(No.$$scope={dirty:g,ctx:o}),so.$set(No);const cr={};g&2&&(cr.$$scope={dirty:g,ctx:o}),ro.$set(cr);const pr={};g&2&&(pr.$$scope={dirty:g,ctx:o}),io.$set(pr);const hs={};g&2&&(hs.$$scope={dirty:g,ctx:o}),co.$set(hs);const hr={};g&2&&(hr.$$scope={dirty:g,ctx:o}),po.$set(hr);const ur={};g&2&&(ur.$$scope={dirty:g,ctx:o}),mo.$set(ur);const mr={};g&2&&(mr.$$scope={dirty:g,ctx:o}),_o.$set(mr);const us={};g&2&&(us.$$scope={dirty:g,ctx:o}),go.$set(us);const fr={};g&2&&(fr.$$scope={dirty:g,ctx:o}),bo.$set(fr);const _r={};g&2&&(_r.$$scope={dirty:g,ctx:o}),vo.$set(_r);const gr={};g&2&&(gr.$$scope={dirty:g,ctx:o}),yo.$set(gr);const br={};g&2&&(br.$$scope={dirty:g,ctx:o}),To.$set(br);const kr={};g&2&&(kr.$$scope={dirty:g,ctx:o}),$o.$set(kr);const vr={};g&2&&(vr.$$scope={dirty:g,ctx:o}),xo.$set(vr);const yr={};g&2&&(yr.$$scope={dirty:g,ctx:o}),Fo.$set(yr);const Kt={};g&2&&(Kt.$$scope={dirty:g,ctx:o}),qo.$set(Kt);const Tr={};g&2&&(Tr.$$scope={dirty:g,ctx:o}),jo.$set(Tr);const wr={};g&2&&(wr.$$scope={dirty:g,ctx:o}),Mo.$set(wr);const ms={};g&2&&(ms.$$scope={dirty:g,ctx:o}),Ao.$set(ms);const $r={};g&2&&($r.$$scope={dirty:g,ctx:o}),Oo.$set($r)},i(o){Qr||(w(n.$$.fragment,o),w(V.$$.fragment,o),w(z.$$.fragment,o),w(Xo.$$.fragment,o),w(Yo.$$.fragment,o),w(Qo.$$.fragment,o),w(Zo.$$.fragment,o),w(en.$$.fragment,o),w(Qt.$$.fragment,o),w(on.$$.fragment,o),w(nn.$$.fragment,o),w(eo.$$.fragment,o),w(to.$$.fragment,o),w(rn.$$.fragment,o),w(dn.$$.fragment,o),w(ln.$$.fragment,o),w(no.$$.fragment,o),w(so.$$.fragment,o),w(un.$$.fragment,o),w(mn.$$.fragment,o),w(fn.$$.fragment,o),w(kn.$$.fragment,o),w(ro.$$.fragment,o),w(io.$$.fragment,o),w(vn.$$.fragment,o),w(yn.$$.fragment,o),w(xn.$$.fragment,o),w(co.$$.fragment,o),w(po.$$.fragment,o),w(zn.$$.fragment,o),w(Fn.$$.fragment,o),w(Bn.$$.fragment,o),w(mo.$$.fragment,o),w(qn.$$.fragment,o),w(En.$$.fragment,o),w(_o.$$.fragment,o),w(An.$$.fragment,o),w(go.$$.fragment,o),w(bo.$$.fragment,o),w(Pn.$$.fragment,o),w(On.$$.fragment,o),w(vo.$$.fragment,o),w(Ln.$$.fragment,o),w(yo.$$.fragment,o),w(To.$$.fragment,o),w(Dn.$$.fragment,o),w(Gn.$$.fragment,o),w(Xn.$$.fragment,o),w($o.$$.fragment,o),w(xo.$$.fragment,o),w(Yn.$$.fragment,o),w(Fo.$$.fragment,o),w(Qn.$$.fragment,o),w(qo.$$.fragment,o),w(Zn.$$.fragment,o),w(es.$$.fragment,o),w(is.$$.fragment,o),w(jo.$$.fragment,o),w(Mo.$$.fragment,o),w(ls.$$.fragment,o),w(Ao.$$.fragment,o),w(cs.$$.fragment,o),w(Oo.$$.fragment,o),Qr=!0)},o(o){$(n.$$.fragment,o),$(V.$$.fragment,o),$(z.$$.fragment,o),$(Xo.$$.fragment,o),$(Yo.$$.fragment,o),$(Qo.$$.fragment,o),$(Zo.$$.fragment,o),$(en.$$.fragment,o),$(Qt.$$.fragment,o),$(on.$$.fragment,o),$(nn.$$.fragment,o),$(eo.$$.fragment,o),$(to.$$.fragment,o),$(rn.$$.fragment,o),$(dn.$$.fragment,o),$(ln.$$.fragment,o),$(no.$$.fragment,o),$(so.$$.fragment,o),$(un.$$.fragment,o),$(mn.$$.fragment,o),$(fn.$$.fragment,o),$(kn.$$.fragment,o),$(ro.$$.fragment,o),$(io.$$.fragment,o),$(vn.$$.fragment,o),$(yn.$$.fragment,o),$(xn.$$.fragment,o),$(co.$$.fragment,o),$(po.$$.fragment,o),$(zn.$$.fragment,o),$(Fn.$$.fragment,o),$(Bn.$$.fragment,o),$(mo.$$.fragment,o),$(qn.$$.fragment,o),$(En.$$.fragment,o),$(_o.$$.fragment,o),$(An.$$.fragment,o),$(go.$$.fragment,o),$(bo.$$.fragment,o),$(Pn.$$.fragment,o),$(On.$$.fragment,o),$(vo.$$.fragment,o),$(Ln.$$.fragment,o),$(yo.$$.fragment,o),$(To.$$.fragment,o),$(Dn.$$.fragment,o),$(Gn.$$.fragment,o),$(Xn.$$.fragment,o),$($o.$$.fragment,o),$(xo.$$.fragment,o),$(Yn.$$.fragment,o),$(Fo.$$.fragment,o),$(Qn.$$.fragment,o),$(qo.$$.fragment,o),$(Zn.$$.fragment,o),$(es.$$.fragment,o),$(is.$$.fragment,o),$(jo.$$.fragment,o),$(Mo.$$.fragment,o),$(ls.$$.fragment,o),$(Ao.$$.fragment,o),$(cs.$$.fragment,o),$(Oo.$$.fragment,o),Qr=!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(we),o&&t(Ue),o&&t($e),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(xr),o&&t(Ft),x(Xo),o&&t(zr),o&&t(bs),o&&t(Fr),x(Yo,o),o&&t(Br),o&&t(Bt),x(Qo),o&&t(qr),o&&t(mt),o&&t(Er),o&&t(qt),x(Zo),o&&t(jr),o&&t(Se),x(en),x(Qt),o&&t(Mr),o&&t(Mt),x(on),o&&t(Cr),o&&t(W),x(nn),x(eo),x(to),x(rn),o&&t(Ar),o&&t(Ct),x(dn),o&&t(Pr),o&&t(U),x(ln),x(no),x(so),x(un),o&&t(Or),o&&t(At),x(mn),o&&t(Nr),o&&t(lt),o&&t(Ir),o&&t(Le),x(fn),x(kn),x(ro),x(io),o&&t(Sr),o&&t(Ot),x(vn),o&&t(Lr),o&&t(ct),o&&t(Dr),o&&t(De),x(yn),x(xn),x(co),x(po),o&&t(Gr),o&&t(It),x(zn),o&&t(Wr),o&&t(St),x(Fn),x(Bn),x(mo),o&&t(Ur),o&&t(Lt),x(qn),o&&t(Hr),o&&t(ke),x(En),x(_o),x(An),x(go),x(bo),o&&t(Rr),o&&t(Gt),x(Pn),o&&t(Vr),o&&t(ve),x(On),x(vo),x(Ln),x(yo),x(To),o&&t(Kr),o&&t(Ut),x(Dn),o&&t(Jr),o&&t(H),x(Gn),x(Xn),x($o),x(xo),x(Yn),x(Fo),x(Qn),x(qo),o&&t(Xr),o&&t(Rt),x(Zn),o&&t(Yr),o&&t(R),x(es),x(is),x(jo),x(Mo),x(ls),x(Ao),x(cs),x(Oo)}}}const Dm={local:"blenderbot",sections:[{local:"overview",title:"Overview"},{local:"implementation-notes",title:"Implementation Notes"},{local:"usage",title:"Usage"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.BlenderbotConfig",title:"BlenderbotConfig"},{local:"transformers.BlenderbotTokenizer",title:"BlenderbotTokenizer"},{local:"transformers.BlenderbotTokenizerFast",title:"BlenderbotTokenizerFast"},{local:"transformers.BlenderbotModel",title:"BlenderbotModel"},{local:"transformers.BlenderbotForConditionalGeneration",title:"BlenderbotForConditionalGeneration"},{local:"transformers.BlenderbotForCausalLM",title:"BlenderbotForCausalLM"},{local:"transformers.TFBlenderbotModel",title:"TFBlenderbotModel"},{local:"transformers.TFBlenderbotForConditionalGeneration",title:"TFBlenderbotForConditionalGeneration"},{local:"transformers.FlaxBlenderbotModel",title:"FlaxBlenderbotModel"},{local:"transformers.FlaxBlenderbotForConditionalGeneration",title:"FlaxBlenderbotForConditionalGeneration"}],title:"Blenderbot"};function Gm(F){return fm(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jm extends pm{constructor(l){super();hm(this,l,Gm,Lm,um,{})}}export{Jm as default,Dm as metadata};
