import{S as ru,i as du,s as lu,e as a,k as p,w as y,t as d,M as iu,c as s,d as t,m as u,a as r,x as v,h as l,b as h,G as e,g as _,y as T,q as w,o as $,B as x,v as cu,L as Me}from"../../chunks/vendor-hf-doc-builder.js";import{T as Yn}from"../../chunks/Tip-hf-doc-builder.js";import{D as C}from"../../chunks/Docstring-hf-doc-builder.js";import{C as je}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Be}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as qe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function pu(F){let i,k,f,m,b;return m=new je({props:{code:`from transformers import BlenderbotSmallConfig, BlenderbotSmallModel

# Initializing a BlenderbotSmall facebook/blenderbot_small-90M style configuration
configuration = BlenderbotSmallConfig()

# Initializing a model (with random weights) from the facebook/blenderbot_small-90M style configuration
model = BlenderbotSmallModel(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> BlenderbotSmallConfig, BlenderbotSmallModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlenderbotSmall facebook/blenderbot_small-90M style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BlenderbotSmallConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/blenderbot_small-90M style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function uu(F){let i,k,f,m,b;return{c(){i=a("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),m=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(c,"CODE",{});var M=r(f);m=l(M,"Module"),M.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){_(n,i,c),e(i,k),e(i,f),e(f,m),e(i,b)},d(n){n&&t(i)}}}function hu(F){let i,k,f,m,b;return m=new je({props:{code:`from transformers import AutoTokenizer, BlenderbotSmallModel

model = BlenderbotSmallModel.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

inputs = tokenizer("Studies have been shown that owning a dog is good for you", return_tensors="pt")
decoder_inputs = tokenizer("Studies show that", return_tensors="pt")  # Batch size 1
outputs = model(input_ids=inputs.input_ids, decoder_input_ids=decoder_inputs.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, BlenderbotSmallModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallModel.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&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_inputs = tokenizer(<span class="hljs-string">&quot;Studies show that&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)  <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_inputs.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">3</span>, <span class="hljs-number">512</span>]`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function mu(F){let i,k,f,m,b;return{c(){i=a("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),m=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(c,"CODE",{});var M=r(f);m=l(M,"Module"),M.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){_(n,i,c),e(i,k),e(i,f),e(f,m),e(i,b)},d(n){n&&t(i)}}}function fu(F){let i,k,f,m,b;return m=new je({props:{code:`from transformers import AutoTokenizer, BlenderbotSmallForConditionalGeneration

mname = "facebook/blenderbot_small-90M"
model = BlenderbotSmallForConditionalGeneration.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>what kind of carbs do they eat? "
    "i don't know much about carbs</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, BlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>mname = <span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallForConditionalGeneration.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:  what kind of carbs do they eat? i don<span class="hljs-string">&#x27;t know much about carbs.

&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;what kind of carbs do they eat? <span class="hljs-string">&quot;
...     &quot;</span>i don<span class="hljs-string">&#x27;t know much about carbs&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:  they eat a lot of carbs. carbs are high in fat, protein, and carbohydrates.</span>`}}),{c(){i=a("p"),k=d("Conversation example:"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Conversation example:"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function _u(F){let i,k,f,m,b;return m=new je({props:{code:`from transformers import AutoTokenizer, BlenderbotSmallForCausalLM

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")
model = BlenderbotSmallForCausalLM.from_pretrained(
    "facebook/blenderbot_small-90M", 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, BlenderbotSmallForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallForCausalLM.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>, add_cross_attention=<span class="hljs-literal">False</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> model.config.is_decoder, <span class="hljs-string">f&quot;<span class="hljs-subst">{model.__class__}</span> has to be configured as a decoder.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_shape = [<span class="hljs-number">1</span>, inputs.input_ids.shape[-<span class="hljs-number">1</span>], model.config.vocab_size]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape) == expected_shape
<span class="hljs-literal">True</span>`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function gu(F){let i,k,f,m,b,n,c,M,We,Ee,j,Ue,Q,S,Re,H,He,Ve,W,Ke,Je,V,Xe,Ye,K,Ze,Ce,N,ee,ye,X,A,P,Qe,te,oe,et,U,tt,ot,O,he,le,Ae,me,Y,nt,Pe,G,at,ne,fe,ie,L,Oe,E,st,ce;return{c(){i=a("p"),k=d("TensorFlow models and layers in "),f=a("code"),m=d("transformers"),b=d(" accept two formats as input:"),n=p(),c=a("ul"),M=a("li"),We=d("having all inputs as keyword arguments (like PyTorch models), or"),Ee=p(),j=a("li"),Ue=d("having all inputs as a list, tuple or dict in the first positional argument."),Q=p(),S=a("p"),Re=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 `),H=a("code"),He=d("model.fit()"),Ve=d(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=a("code"),Ke=d("model.fit()"),Je=d(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Xe=d("fit()"),Ye=d(" and "),K=a("code"),Ze=d("predict()"),Ce=d(`, such as when creating your own layers or models with
the Keras `),N=a("code"),ee=d("Functional"),ye=d(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),X=p(),A=a("ul"),P=a("li"),Qe=d("a single Tensor with "),te=a("code"),oe=d("input_ids"),et=d(" only and nothing else: "),U=a("code"),tt=d("model(input_ids)"),ot=p(),O=a("li"),he=d(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),le=a("code"),Ae=d("model([input_ids, attention_mask])"),me=d(" or "),Y=a("code"),nt=d("model([input_ids, attention_mask, token_type_ids])"),Pe=p(),G=a("li"),at=d(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=a("code"),fe=d('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ie=p(),L=a("p"),Oe=d(`Note that when creating models and layers with
`),E=a("a"),st=d("subclassing"),ce=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){i=s(z,"P",{});var q=r(i);k=l(q,"TensorFlow models and layers in "),f=s(q,"CODE",{});var ve=r(f);m=l(ve,"transformers"),ve.forEach(t),b=l(q," accept two formats as input:"),q.forEach(t),n=u(z),c=s(z,"UL",{});var Te=r(c);M=s(Te,"LI",{});var bt=r(M);We=l(bt,"having all inputs as keyword arguments (like PyTorch models), or"),bt.forEach(t),Ee=u(Te),j=s(Te,"LI",{});var ut=r(j);Ue=l(ut,"having all inputs as a list, tuple or dict in the first positional argument."),ut.forEach(t),Te.forEach(t),Q=u(z),S=s(z,"P",{});var B=r(S);Re=l(B,`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 `),H=s(B,"CODE",{});var _e=r(H);He=l(_e,"model.fit()"),_e.forEach(t),Ve=l(B,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=s(B,"CODE",{});var rt=r(W);Ke=l(rt,"model.fit()"),rt.forEach(t),Je=l(B,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s(B,"CODE",{});var we=r(V);Xe=l(we,"fit()"),we.forEach(t),Ye=l(B," and "),K=s(B,"CODE",{});var kt=r(K);Ze=l(kt,"predict()"),kt.forEach(t),Ce=l(B,`, such as when creating your own layers or models with
the Keras `),N=s(B,"CODE",{});var dt=r(N);ee=l(dt,"Functional"),dt.forEach(t),ye=l(B,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),B.forEach(t),X=u(z),A=s(z,"UL",{});var Z=r(A);P=s(Z,"LI",{});var ae=r(P);Qe=l(ae,"a single Tensor with "),te=s(ae,"CODE",{});var se=r(te);oe=l(se,"input_ids"),se.forEach(t),et=l(ae," only and nothing else: "),U=s(ae,"CODE",{});var lt=r(U);tt=l(lt,"model(input_ids)"),lt.forEach(t),ae.forEach(t),ot=u(Z),O=s(Z,"LI",{});var J=r(O);he=l(J,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),le=s(J,"CODE",{});var yt=r(le);Ae=l(yt,"model([input_ids, attention_mask])"),yt.forEach(t),me=l(J," or "),Y=s(J,"CODE",{});var vt=r(Y);nt=l(vt,"model([input_ids, attention_mask, token_type_ids])"),vt.forEach(t),J.forEach(t),Pe=u(Z),G=s(Z,"LI",{});var $e=r(G);at=l($e,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=s($e,"CODE",{});var Ne=r(ne);fe=l(Ne,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ne.forEach(t),$e.forEach(t),Z.forEach(t),ie=u(z),L=s(z,"P",{});var xe=r(L);Oe=l(xe,`Note that when creating models and layers with
`),E=s(xe,"A",{href:!0,rel:!0});var Tt=r(E);st=l(Tt,"subclassing"),Tt.forEach(t),ce=l(xe,` 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!`),xe.forEach(t),this.h()},h(){h(E,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(E,"rel","nofollow")},m(z,q){_(z,i,q),e(i,k),e(i,f),e(f,m),e(i,b),_(z,n,q),_(z,c,q),e(c,M),e(M,We),e(c,Ee),e(c,j),e(j,Ue),_(z,Q,q),_(z,S,q),e(S,Re),e(S,H),e(H,He),e(S,Ve),e(S,W),e(W,Ke),e(S,Je),e(S,V),e(V,Xe),e(S,Ye),e(S,K),e(K,Ze),e(S,Ce),e(S,N),e(N,ee),e(S,ye),_(z,X,q),_(z,A,q),e(A,P),e(P,Qe),e(P,te),e(te,oe),e(P,et),e(P,U),e(U,tt),e(A,ot),e(A,O),e(O,he),e(O,le),e(le,Ae),e(O,me),e(O,Y),e(Y,nt),e(A,Pe),e(A,G),e(G,at),e(G,ne),e(ne,fe),_(z,ie,q),_(z,L,q),e(L,Oe),e(L,E),e(E,st),e(L,ce)},d(z){z&&t(i),z&&t(n),z&&t(c),z&&t(Q),z&&t(S),z&&t(X),z&&t(A),z&&t(ie),z&&t(L)}}}function bu(F){let i,k,f,m,b;return{c(){i=a("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),m=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(c,"CODE",{});var M=r(f);m=l(M,"Module"),M.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){_(n,i,c),e(i,k),e(i,f),e(f,m),e(i,b)},d(n){n&&t(i)}}}function ku(F){let i,k,f,m,b;return m=new je({props:{code:`from transformers import AutoTokenizer, TFBlenderbotSmallModel
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")
model = TFBlenderbotSmallModel.from_pretrained("facebook/blenderbot_small-90M")

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, TFBlenderbotSmallModel
<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_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlenderbotSmallModel.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

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

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

mname = "facebook/blenderbot_small-90M"
model = BlenderbotSmallForConditionalGeneration.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>what kind of carbs do they eat? i don't know much about carbs.</s> "
    "<s>I'm not sure."
)

inputs = tokenizer([NEXT_UTTERANCE], return_tensors="tf")
inputs.pop("token_type_ids")
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, TFBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>mname = <span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallForConditionalGeneration.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>])
what kind of carbs do they eat? i don<span class="hljs-string">&#x27;t know much about carbs.

&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)
&gt;&gt;&gt; NEXT_UTTERANCE = (
...     &quot;</span>My friends are cool but they eat too many carbs.&lt;/s&gt; <span class="hljs-string">&quot;
...     &quot;</span>&lt;s&gt;what kind of carbs do they eat? i don<span class="hljs-string">&#x27;t know much about carbs.&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>t<span class="hljs-string">f&quot;)
&gt;&gt;&gt; inputs.pop(&quot;</span>token_type_ids<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])</span>`}}),{c(){i=a("p"),k=d("Conversation example::"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Conversation example::"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function wu(F){let i,k,f,m,b;return m=new je({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotSmallModel

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")
model = FlaxBlenderbotSmallModel.from_pretrained("facebook/blenderbot_small-90M")

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, FlaxBlenderbotSmallModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallModel.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function $u(F){let i,k,f,m,b;return m=new je({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="np")
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, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function xu(F){let i,k,f,m,b;return m=new je({props:{code:`import jax.numpy as jnp
from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="np")
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, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_decoder_hidden_states = outputs.last_hidden_state`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function zu(F){let i,k,f,m,b;return{c(){i=a("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),m=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(c,"CODE",{});var M=r(f);m=l(M,"Module"),M.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){_(n,i,c),e(i,k),e(i,f),e(f,m),e(i,b)},d(n){n&&t(i)}}}function Fu(F){let i,k,f,m,b;return m=new je({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

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

# Generate Summary
summary_ids = model.generate(inputs["input_ids"]).sequences
print(tokenizer.batch_decode(summary_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>ARTICLE_TO_SUMMARIZE = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

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

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")
TXT = "My friends are <mask> but they eat too many carbs."

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
input_ids = tokenizer([TXT], return_tensors="np")["input_ids"]
logits = model(input_ids).logits

masked_index = (input_ids[0] == tokenizer.mask_token_id).nonzero().item()
probs = jax.nn.softmax(logits[0, masked_index], axis=0)
values, predictions = jax.lax.top_k(probs)

tokenizer.decode(predictions).split()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

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

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], return_tensors=<span class="hljs-string">&quot;np&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(input_ids).logits

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

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

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="np")
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, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function qu(F){let i,k,f,m,b;return m=new je({props:{code:`import jax.numpy as jnp
from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="np")
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, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(m.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=u(n),v(m.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(m,n,c),b=!0},p:Me,i(n){b||(w(m.$$.fragment,n),b=!0)},o(n){$(m.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(m,n)}}}function Mu(F){let i,k,f,m,b,n,c,M,We,Ee,j,Ue,Q,S,Re,H,He,Ve,W,Ke,Je,V,Xe,Ye,K,Ze,Ce,N,ee,ye,X,A,P,Qe,te,oe,et,U,tt,ot,O,he,le,Ae,me,Y,nt,Pe,G,at,ne,fe,ie,L,Oe,E,st,ce,z,q,ve,Te,bt,ut,B,_e,rt,we,kt,dt,Z,ae,se,lt,J,yt,vt,$e,Ne,xe,Tt,Ba,Zn,Or,Ps,wt,Gt,qa,Po,Nr,Ma,Lr,Os,ze,Oo,Ir,$t,Dr,Qn,Gr,Wr,No,Ur,Rr,Hr,xt,Vr,ea,Kr,Jr,ta,Xr,Yr,Zr,Wt,Ns,zt,Ut,ja,Lo,Qr,Ea,ed,Ls,R,Io,td,Ca,od,nd,Do,ad,oa,sd,rd,dd,ht,Go,ld,Aa,id,cd,Pa,pd,ud,Rt,Wo,hd,Ft,md,Oa,fd,_d,Na,gd,bd,kd,mt,Uo,yd,na,vd,aa,Td,wd,La,$d,xd,sa,Ro,Is,St,Ht,Ia,Ho,zd,Da,Fd,Ds,it,Vo,Sd,Ko,Bd,Ga,qd,Md,jd,Vt,Jo,Ed,Wa,Cd,Gs,Bt,Kt,Ua,Xo,Ad,Ra,Pd,Ws,Fe,Yo,Od,Zo,Nd,ra,Ld,Id,Dd,Qo,Gd,en,Wd,Ud,Rd,Le,tn,Hd,qt,Vd,da,Kd,Jd,Ha,Xd,Yd,Zd,Jt,Qd,Xt,Us,Mt,Yt,Va,on,el,Ka,tl,Rs,Se,nn,ol,an,nl,la,al,sl,rl,sn,dl,rn,ll,il,cl,Ie,dn,pl,jt,ul,ia,hl,ml,Ja,fl,_l,gl,Zt,bl,Qt,Hs,Et,eo,Xa,ln,kl,Ya,yl,Vs,Ct,cn,vl,to,pn,Tl,oo,Ks,At,no,Za,un,wl,Qa,$l,Js,pe,hn,xl,mn,zl,ca,Fl,Sl,Bl,fn,ql,_n,Ml,jl,El,ao,Cl,De,gn,Al,Pt,Pl,pa,Ol,Nl,es,Ll,Il,Dl,so,Gl,ro,Xs,Ot,lo,ts,bn,Wl,os,Ul,Ys,ue,kn,Rl,yn,Hl,ua,Vl,Kl,Jl,vn,Xl,Tn,Yl,Zl,Ql,io,ei,Ge,wn,ti,Nt,oi,ha,ni,ai,ns,si,ri,di,co,li,po,Zs,Lt,uo,as,$n,ii,ss,ci,Qs,I,xn,pi,zn,ui,ma,hi,mi,fi,Fn,_i,Sn,gi,bi,ki,rs,yi,vi,ct,ds,Bn,Ti,wi,ls,qn,$i,xi,is,Mn,zi,Fi,cs,jn,Si,Bi,ho,En,qi,mo,Mi,fo,Cn,ji,_o,Ei,go,An,Ci,bo,er,It,ko,ps,Pn,Ai,us,Pi,tr,D,On,Oi,Nn,Ni,fa,Li,Ii,Di,Ln,Gi,In,Wi,Ui,Ri,hs,Hi,Vi,pt,ms,Dn,Ki,Ji,fs,Gn,Xi,Yi,_s,Wn,Zi,Qi,gs,Un,ec,tc,ge,Rn,oc,Dt,nc,bs,ac,sc,ks,rc,dc,lc,yo,ic,vo,cc,To,pc,wo,Hn,uc,$o,hc,xo,Vn,mc,zo,or;return n=new Be({}),X=new Be({}),we=new Be({}),Po=new Be({}),Oo=new C({props:{name:"class transformers.BlenderbotSmallConfig",anchor:"transformers.BlenderbotSmallConfig",parameters:[{name:"vocab_size",val:" = 50265"},{name:"max_position_embeddings",val:" = 512"},{name:"encoder_layers",val:" = 8"},{name:"encoder_ffn_dim",val:" = 2048"},{name:"encoder_attention_heads",val:" = 16"},{name:"decoder_layers",val:" = 8"},{name:"decoder_ffn_dim",val:" = 2048"},{name:"decoder_attention_heads",val:" = 16"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'gelu'"},{name:"d_model",val:" = 512"},{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:"forced_eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlenderbotSmallConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the BlenderbotSmall 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.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallModel">BlenderbotSmallModel</a> or <a href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.TFBlenderbotSmallModel">TFBlenderbotSmallModel</a>.`,name:"vocab_size"},{anchor:"transformers.BlenderbotSmallConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.BlenderbotSmallConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.BlenderbotSmallConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.BlenderbotSmallConfig.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.BlenderbotSmallConfig.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.BlenderbotSmallConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.BlenderbotSmallConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.BlenderbotSmallConfig.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.BlenderbotSmallConfig.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.BlenderbotSmallConfig.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.BlenderbotSmallConfig.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.BlenderbotSmallConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#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.BlenderbotSmallConfig.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.BlenderbotSmallConfig.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.BlenderbotSmallConfig.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.BlenderbotSmallConfig.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.BlenderbotSmallConfig.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.BlenderbotSmallConfig.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.29.0/src/transformers/models/blenderbot_small/configuration_blenderbot_small.py#L36"}}),Wt=new qe({props:{anchor:"transformers.BlenderbotSmallConfig.example",$$slots:{default:[pu]},$$scope:{ctx:F}}}),Lo=new Be({}),Io=new C({props:{name:"class transformers.BlenderbotSmallTokenizer",anchor:"transformers.BlenderbotSmallTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"bos_token",val:" = '__start__'"},{name:"eos_token",val:" = '__end__'"},{name:"unk_token",val:" = '__unk__'"},{name:"pad_token",val:" = '__null__'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.BlenderbotSmallTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.BlenderbotSmallTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;__start__&quot;</code>) &#x2014;
The beginning of sentence token.`,name:"bos_token"},{anchor:"transformers.BlenderbotSmallTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;__end__&quot;</code>) &#x2014;
The end of sentence token.`,name:"eos_token"},{anchor:"transformers.BlenderbotSmallTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;__unk__&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.BlenderbotSmallTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;__pad__&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.
**kwargs &#x2014;
Additional keyword arguments passed along to <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>`,name:"pad_token"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/tokenization_blenderbot_small.py#L69"}}),Go=new C({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BlenderbotSmallTokenizer.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.BlenderbotSmallTokenizer.build_inputs_with_special_tokens.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.BlenderbotSmallTokenizer.build_inputs_with_special_tokens.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/tokenization_utils_base.py#L3067",returnDescription:`
<p>The model input with special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Wo=new C({props:{name:"get_special_tokens_mask",anchor:"transformers.BlenderbotSmallTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List"},{name:"token_ids_1",val:": typing.Optional[typing.List] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids of the first sequence.`,name:"token_ids_0"},{anchor:"transformers.BlenderbotSmallTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
List of ids of the second sequence.`,name:"token_ids_1"},{anchor:"transformers.BlenderbotSmallTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/tokenization_utils.py#L845",returnDescription:`
<p>1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p>A list of integers in the range [0, 1]</p>
`}}),Uo=new C({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BlenderbotSmallTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.BlenderbotSmallTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/tokenization_utils_base.py#L3047",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ro=new C({props:{name:"save_vocabulary",anchor:"transformers.BlenderbotSmallTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/tokenization_blenderbot_small.py#L211"}}),Ho=new Be({}),Vo=new C({props:{name:"class transformers.BlenderbotSmallTokenizerFast",anchor:"transformers.BlenderbotSmallTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|endoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"add_prefix_space",val:" = False"},{name:"trim_offsets",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/tokenization_blenderbot_small_fast.py#L52"}}),Jo=new C({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BlenderbotSmallTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.BlenderbotSmallTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/tokenization_blenderbot_small_fast.py#L98",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Xo=new Be({}),Yo=new C({props:{name:"class transformers.BlenderbotSmallModel",anchor:"transformers.BlenderbotSmallModel",parameters:[{name:"config",val:": BlenderbotSmallConfig"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</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.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1093"}}),tn=new C({props:{name:"forward",anchor:"transformers.BlenderbotSmallModel.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.BlenderbotSmallModel.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>BlenderbotSmall 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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.BlenderbotSmallModel.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1122",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</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.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jt=new Yn({props:{$$slots:{default:[uu]},$$scope:{ctx:F}}}),Xt=new qe({props:{anchor:"transformers.BlenderbotSmallModel.forward.example",$$slots:{default:[hu]},$$scope:{ctx:F}}}),on=new Be({}),nn=new C({props:{name:"class transformers.BlenderbotSmallForConditionalGeneration",anchor:"transformers.BlenderbotSmallForConditionalGeneration",parameters:[{name:"config",val:": BlenderbotSmallConfig"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</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.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1221"}}),dn=new C({props:{name:"forward",anchor:"transformers.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>BlenderbotSmall 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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.BlenderbotSmallForConditionalGeneration.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.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.29.0/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1267",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</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.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zt=new Yn({props:{$$slots:{default:[mu]},$$scope:{ctx:F}}}),Qt=new qe({props:{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.example",$$slots:{default:[fu]},$$scope:{ctx:F}}}),ln=new Be({}),cn=new C({props:{name:"class transformers.BlenderbotSmallForCausalLM",anchor:"transformers.BlenderbotSmallForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1403"}}),pn=new C({props:{name:"forward",anchor:"transformers.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.BlenderbotSmallForCausalLM.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1436",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</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.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oo=new qe({props:{anchor:"transformers.BlenderbotSmallForCausalLM.forward.example",$$slots:{default:[_u]},$$scope:{ctx:F}}}),un=new Be({}),hn=new C({props:{name:"class transformers.TFBlenderbotSmallModel",anchor:"transformers.TFBlenderbotSmallModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlenderbotSmallModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</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.29.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py#L1175"}}),ao=new Yn({props:{$$slots:{default:[gu]},$$scope:{ctx:F}}}),gn=new C({props:{name:"call",anchor:"transformers.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>BlenderbotSmall 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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.TFBlenderbotSmallModel.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBlenderbotSmallModel.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.29.0/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py#L1187",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</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.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),so=new Yn({props:{$$slots:{default:[bu]},$$scope:{ctx:F}}}),ro=new qe({props:{anchor:"transformers.TFBlenderbotSmallModel.call.example",$$slots:{default:[ku]},$$scope:{ctx:F}}}),bn=new Be({}),kn=new C({props:{name:"class transformers.TFBlenderbotSmallForConditionalGeneration",anchor:"transformers.TFBlenderbotSmallForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</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.29.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py#L1280"}}),io=new Yn({props:{$$slots:{default:[yu]},$$scope:{ctx:F}}}),wn=new C({props:{name:"call",anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.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.Optional[transformers.modeling_tf_outputs.TFBaseModelOutput] = 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.TFBlenderbotSmallForConditionalGeneration.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>BlenderbotSmall 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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.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.TFBlenderbotSmallForConditionalGeneration.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.29.0/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py#L1318",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</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.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),co=new Yn({props:{$$slots:{default:[vu]},$$scope:{ctx:F}}}),po=new qe({props:{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.example",$$slots:{default:[Tu]},$$scope:{ctx:F}}}),$n=new Be({}),xn=new C({props:{name:"class transformers.FlaxBlenderbotSmallModel",anchor:"transformers.FlaxBlenderbotSmallModel",parameters:[{name:"config",val:": BlenderbotSmallConfig"},{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.FlaxBlenderbotSmallModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</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.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBlenderbotSmallModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1214"}}),En=new C({props:{name:"__call__",anchor:"transformers.FlaxBlenderbotSmallModel.__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"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1150",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</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.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mo=new qe({props:{anchor:"transformers.FlaxBlenderbotSmallModel.__call__.example",$$slots:{default:[wu]},$$scope:{ctx:F}}}),Cn=new C({props:{name:"encode",anchor:"transformers.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L971",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot_small.configuration_blenderbot_small.BlenderbotSmallConfig'&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.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_o=new qe({props:{anchor:"transformers.FlaxBlenderbotSmallModel.encode.example",$$slots:{default:[$u]},$$scope:{ctx:F}}}),An=new C({props:{name:"decode",anchor:"transformers.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.FlaxBlenderbotSmallModel.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1034",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot_small.configuration_blenderbot_small.BlenderbotSmallConfig'&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.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bo=new qe({props:{anchor:"transformers.FlaxBlenderbotSmallModel.decode.example",$$slots:{default:[xu]},$$scope:{ctx:F}}}),Pn=new Be({}),On=new C({props:{name:"class transformers.FlaxBlenderbotSmallForConditionalGeneration",anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration",parameters:[{name:"config",val:": BlenderbotSmallConfig"},{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.FlaxBlenderbotSmallForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</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.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1300"}}),Rn=new C({props:{name:"__call__",anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__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.FlaxBlenderbotSmallForConditionalGeneration.__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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FlaxBlenderbotSmallForConditionalGeneration.__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.FlaxBlenderbotSmallForConditionalGeneration.__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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FlaxBlenderbotSmallForConditionalGeneration.__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.FlaxBlenderbotSmallForConditionalGeneration.__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.FlaxBlenderbotSmallForConditionalGeneration.__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.FlaxBlenderbotSmallForConditionalGeneration.__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.FlaxBlenderbotSmallForConditionalGeneration.__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.FlaxBlenderbotSmallForConditionalGeneration.__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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1150",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</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.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),yo=new Yn({props:{$$slots:{default:[zu]},$$scope:{ctx:F}}}),vo=new qe({props:{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.example",$$slots:{default:[Fu]},$$scope:{ctx:F}}}),To=new qe({props:{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.example-2",$$slots:{default:[Su]},$$scope:{ctx:F}}}),Hn=new C({props:{name:"encode",anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L971",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot_small.configuration_blenderbot_small.BlenderbotSmallConfig'&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.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$o=new qe({props:{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.encode.example",$$slots:{default:[Bu]},$$scope:{ctx:F}}}),Vn=new C({props:{name:"decode",anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.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:"deterministic",val:": bool = True"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.FlaxBlenderbotSmallForConditionalGeneration.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1304",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot_small.configuration_blenderbot_small.BlenderbotSmallConfig'&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.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zo=new qe({props:{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.example",$$slots:{default:[qu]},$$scope:{ctx:F}}}),{c(){i=a("meta"),k=p(),f=a("h1"),m=a("a"),b=a("span"),y(n.$$.fragment),c=p(),M=a("span"),We=d("Blenderbot Small"),Ee=p(),j=a("p"),Ue=d("Note that "),Q=a("a"),S=d("BlenderbotSmallModel"),Re=d(` and
`),H=a("a"),He=d("BlenderbotSmallForConditionalGeneration"),Ve=d(` are only used in combination with the checkpoint
`),W=a("a"),Ke=d("facebook/blenderbot-90M"),Je=d(`. Larger Blenderbot checkpoints should
instead be used with `),V=a("a"),Xe=d("BlenderbotModel"),Ye=d(` and
`),K=a("a"),Ze=d("BlenderbotForConditionalGeneration"),Ce=p(),N=a("h2"),ee=a("a"),ye=a("span"),y(X.$$.fragment),A=p(),P=a("span"),Qe=d("Overview"),te=p(),oe=a("p"),et=d("The Blender chatbot model was proposed in "),U=a("a"),tt=d("Recipes for building an open-domain chatbot"),ot=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.`),O=p(),he=a("p"),le=d("The abstract of the paper is the following:"),Ae=p(),me=a("p"),Y=a("em"),nt=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.`),Pe=p(),G=a("p"),at=d("Tips:"),ne=p(),fe=a("ul"),ie=a("li"),L=d(`Blenderbot Small 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(),E=a("p"),st=d("This model was contributed by "),ce=a("a"),z=d("patrickvonplaten"),q=d(`. The authors\u2019 code can be
found `),ve=a("a"),Te=d("here"),bt=d("."),ut=p(),B=a("h2"),_e=a("a"),rt=a("span"),y(we.$$.fragment),kt=p(),dt=a("span"),Z=d("Documentation resources"),ae=p(),se=a("ul"),lt=a("li"),J=a("a"),yt=d("Causal language modeling task guide"),vt=p(),$e=a("li"),Ne=a("a"),xe=d("Translation task guide"),Tt=p(),Ba=a("li"),Zn=a("a"),Or=d("Summarization task guide"),Ps=p(),wt=a("h2"),Gt=a("a"),qa=a("span"),y(Po.$$.fragment),Nr=p(),Ma=a("span"),Lr=d("BlenderbotSmallConfig"),Os=p(),ze=a("div"),y(Oo.$$.fragment),Ir=p(),$t=a("p"),Dr=d("This is the configuration class to store the configuration of a "),Qn=a("a"),Gr=d("BlenderbotSmallModel"),Wr=d(`. It is used to instantiate
an BlenderbotSmall 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 BlenderbotSmall
`),No=a("a"),Ur=d("facebook/blenderbot_small-90M"),Rr=d(" architecture."),Hr=p(),xt=a("p"),Vr=d("Configuration objects inherit from "),ea=a("a"),Kr=d("PretrainedConfig"),Jr=d(` and can be used to control the model outputs. Read the
documentation from `),ta=a("a"),Xr=d("PretrainedConfig"),Yr=d(" for more information."),Zr=p(),y(Wt.$$.fragment),Ns=p(),zt=a("h2"),Ut=a("a"),ja=a("span"),y(Lo.$$.fragment),Qr=p(),Ea=a("span"),ed=d("BlenderbotSmallTokenizer"),Ls=p(),R=a("div"),y(Io.$$.fragment),td=p(),Ca=a("p"),od=d("Constructs a Blenderbot-90M tokenizer based on BPE (Byte-Pair-Encoding)"),nd=p(),Do=a("p"),ad=d("This tokenizer inherits from "),oa=a("a"),sd=d("PreTrainedTokenizer"),rd=d(` which contains most of the main methods. Users should refer to
the superclass for more information regarding methods.`),dd=p(),ht=a("div"),y(Go.$$.fragment),ld=p(),Aa=a("p"),id=d(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens.`),cd=p(),Pa=a("p"),pd=d("This implementation does not add special tokens and this method should be overridden in a subclass."),ud=p(),Rt=a("div"),y(Wo.$$.fragment),hd=p(),Ft=a("p"),md=d(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Oa=a("code"),fd=d("prepare_for_model"),_d=d(" or "),Na=a("code"),gd=d("encode_plus"),bd=d(" methods."),kd=p(),mt=a("div"),y(Uo.$$.fragment),yd=p(),na=a("p"),vd=d("Create the token type IDs corresponding to the sequences passed. "),aa=a("a"),Td=d(`What are token type
IDs?`),wd=p(),La=a("p"),$d=d("Should be overridden in a subclass if the model has a special way of building those."),xd=p(),sa=a("div"),y(Ro.$$.fragment),Is=p(),St=a("h2"),Ht=a("a"),Ia=a("span"),y(Ho.$$.fragment),zd=p(),Da=a("span"),Fd=d("BlenderbotSmallTokenizerFast"),Ds=p(),it=a("div"),y(Vo.$$.fragment),Sd=p(),Ko=a("p"),Bd=d("Construct a \u201Cfast\u201D BlenderbotSmall tokenizer (backed by HuggingFace\u2019s "),Ga=a("em"),qd=d("tokenizers"),Md=d(" library)."),jd=p(),Vt=a("div"),y(Jo.$$.fragment),Ed=p(),Wa=a("p"),Cd=d(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. BlenderbotSmall
does not make use of token type ids, therefore a list of zeros is returned.`),Gs=p(),Bt=a("h2"),Kt=a("a"),Ua=a("span"),y(Xo.$$.fragment),Ad=p(),Ra=a("span"),Pd=d("BlenderbotSmallModel"),Ws=p(),Fe=a("div"),y(Yo.$$.fragment),Od=p(),Zo=a("p"),Nd=d(`The bare BlenderbotSmall Model outputting raw hidden-states without any specific head on top.
This model inherits from `),ra=a("a"),Ld=d("PreTrainedModel"),Id=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.)`),Dd=p(),Qo=a("p"),Gd=d("This model is also a PyTorch "),en=a("a"),Wd=d("torch.nn.Module"),Ud=d(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rd=p(),Le=a("div"),y(tn.$$.fragment),Hd=p(),qt=a("p"),Vd=d("The "),da=a("a"),Kd=d("BlenderbotSmallModel"),Jd=d(" forward method, overrides the "),Ha=a("code"),Xd=d("__call__"),Yd=d(" special method."),Zd=p(),y(Jt.$$.fragment),Qd=p(),y(Xt.$$.fragment),Us=p(),Mt=a("h2"),Yt=a("a"),Va=a("span"),y(on.$$.fragment),el=p(),Ka=a("span"),tl=d("BlenderbotSmallForConditionalGeneration"),Rs=p(),Se=a("div"),y(nn.$$.fragment),ol=p(),an=a("p"),nl=d(`The BlenderbotSmall Model with a language modeling head. Can be used for summarization.
This model inherits from `),la=a("a"),al=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.)`),rl=p(),sn=a("p"),dl=d("This model is also a PyTorch "),rn=a("a"),ll=d("torch.nn.Module"),il=d(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cl=p(),Ie=a("div"),y(dn.$$.fragment),pl=p(),jt=a("p"),ul=d("The "),ia=a("a"),hl=d("BlenderbotSmallForConditionalGeneration"),ml=d(" forward method, overrides the "),Ja=a("code"),fl=d("__call__"),_l=d(" special method."),gl=p(),y(Zt.$$.fragment),bl=p(),y(Qt.$$.fragment),Hs=p(),Et=a("h2"),eo=a("a"),Xa=a("span"),y(ln.$$.fragment),kl=p(),Ya=a("span"),yl=d("BlenderbotSmallForCausalLM"),Vs=p(),Ct=a("div"),y(cn.$$.fragment),vl=p(),to=a("div"),y(pn.$$.fragment),Tl=p(),y(oo.$$.fragment),Ks=p(),At=a("h2"),no=a("a"),Za=a("span"),y(un.$$.fragment),wl=p(),Qa=a("span"),$l=d("TFBlenderbotSmallModel"),Js=p(),pe=a("div"),y(hn.$$.fragment),xl=p(),mn=a("p"),zl=d(`The bare BLENDERBOT_SMALL Model outputting raw hidden-states without any specific head on top.
This model inherits from `),ca=a("a"),Fl=d("TFPreTrainedModel"),Sl=d(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Bl=p(),fn=a("p"),ql=d("This model is also a "),_n=a("a"),Ml=d("tf.keras.Model"),jl=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.`),El=p(),y(ao.$$.fragment),Cl=p(),De=a("div"),y(gn.$$.fragment),Al=p(),Pt=a("p"),Pl=d("The "),pa=a("a"),Ol=d("TFBlenderbotSmallModel"),Nl=d(" forward method, overrides the "),es=a("code"),Ll=d("__call__"),Il=d(" special method."),Dl=p(),y(so.$$.fragment),Gl=p(),y(ro.$$.fragment),Xs=p(),Ot=a("h2"),lo=a("a"),ts=a("span"),y(bn.$$.fragment),Wl=p(),os=a("span"),Ul=d("TFBlenderbotSmallForConditionalGeneration"),Ys=p(),ue=a("div"),y(kn.$$.fragment),Rl=p(),yn=a("p"),Hl=d(`The BLENDERBOT_SMALL Model with a language modeling head. Can be used for summarization.
This model inherits from `),ua=a("a"),Vl=d("TFPreTrainedModel"),Kl=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.)`),Jl=p(),vn=a("p"),Xl=d("This model is also a "),Tn=a("a"),Yl=d("tf.keras.Model"),Zl=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.`),Ql=p(),y(io.$$.fragment),ei=p(),Ge=a("div"),y(wn.$$.fragment),ti=p(),Nt=a("p"),oi=d("The "),ha=a("a"),ni=d("TFBlenderbotSmallForConditionalGeneration"),ai=d(" forward method, overrides the "),ns=a("code"),si=d("__call__"),ri=d(" special method."),di=p(),y(co.$$.fragment),li=p(),y(po.$$.fragment),Zs=p(),Lt=a("h2"),uo=a("a"),as=a("span"),y($n.$$.fragment),ii=p(),ss=a("span"),ci=d("FlaxBlenderbotSmallModel"),Qs=p(),I=a("div"),y(xn.$$.fragment),pi=p(),zn=a("p"),ui=d(`The bare BlenderbotSmall Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),ma=a("a"),hi=d("FlaxPreTrainedModel"),mi=d(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fi=p(),Fn=a("p"),_i=d(`This model is also a Flax Linen
`),Sn=a("a"),gi=d("flax.nn.Module"),bi=d(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),ki=p(),rs=a("p"),yi=d("Finally, this model supports inherent JAX features such as:"),vi=p(),ct=a("ul"),ds=a("li"),Bn=a("a"),Ti=d("Just-In-Time (JIT) compilation"),wi=p(),ls=a("li"),qn=a("a"),$i=d("Automatic Differentiation"),xi=p(),is=a("li"),Mn=a("a"),zi=d("Vectorization"),Fi=p(),cs=a("li"),jn=a("a"),Si=d("Parallelization"),Bi=p(),ho=a("div"),y(En.$$.fragment),qi=p(),y(mo.$$.fragment),Mi=p(),fo=a("div"),y(Cn.$$.fragment),ji=p(),y(_o.$$.fragment),Ei=p(),go=a("div"),y(An.$$.fragment),Ci=p(),y(bo.$$.fragment),er=p(),It=a("h2"),ko=a("a"),ps=a("span"),y(Pn.$$.fragment),Ai=p(),us=a("span"),Pi=d("FlaxBlenderbotForConditionalGeneration"),tr=p(),D=a("div"),y(On.$$.fragment),Oi=p(),Nn=a("p"),Ni=d(`The BLENDERBOT_SMALL Model with a language modeling head. Can be used for summarization.
This model inherits from `),fa=a("a"),Li=d("FlaxPreTrainedModel"),Ii=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.)`),Di=p(),Ln=a("p"),Gi=d(`This model is also a Flax Linen
`),In=a("a"),Wi=d("flax.nn.Module"),Ui=d(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Ri=p(),hs=a("p"),Hi=d("Finally, this model supports inherent JAX features such as:"),Vi=p(),pt=a("ul"),ms=a("li"),Dn=a("a"),Ki=d("Just-In-Time (JIT) compilation"),Ji=p(),fs=a("li"),Gn=a("a"),Xi=d("Automatic Differentiation"),Yi=p(),_s=a("li"),Wn=a("a"),Zi=d("Vectorization"),Qi=p(),gs=a("li"),Un=a("a"),ec=d("Parallelization"),tc=p(),ge=a("div"),y(Rn.$$.fragment),oc=p(),Dt=a("p"),nc=d("The "),bs=a("code"),ac=d("FlaxBlenderbotSmallPreTrainedModel"),sc=d(" forward method, overrides the "),ks=a("code"),rc=d("__call__"),dc=d(" special method."),lc=p(),y(yo.$$.fragment),ic=p(),y(vo.$$.fragment),cc=p(),y(To.$$.fragment),pc=p(),wo=a("div"),y(Hn.$$.fragment),uc=p(),y($o.$$.fragment),hc=p(),xo=a("div"),y(Vn.$$.fragment),mc=p(),y(zo.$$.fragment),this.h()},l(o){const g=iu('[data-svelte="svelte-1phssyn"]',document.head);i=s(g,"META",{name:!0,content:!0}),g.forEach(t),k=u(o),f=s(o,"H1",{class:!0});var Kn=r(f);m=s(Kn,"A",{id:!0,class:!0,href:!0});var ys=r(m);b=s(ys,"SPAN",{});var vs=r(b);v(n.$$.fragment,vs),vs.forEach(t),ys.forEach(t),c=u(Kn),M=s(Kn,"SPAN",{});var Ts=r(M);We=l(Ts,"Blenderbot Small"),Ts.forEach(t),Kn.forEach(t),Ee=u(o),j=s(o,"P",{});var be=r(j);Ue=l(be,"Note that "),Q=s(be,"A",{href:!0});var ws=r(Q);S=l(ws,"BlenderbotSmallModel"),ws.forEach(t),Re=l(be,` and
`),H=s(be,"A",{href:!0});var $s=r(H);He=l($s,"BlenderbotSmallForConditionalGeneration"),$s.forEach(t),Ve=l(be,` are only used in combination with the checkpoint
`),W=s(be,"A",{href:!0,rel:!0});var xs=r(W);Ke=l(xs,"facebook/blenderbot-90M"),xs.forEach(t),Je=l(be,`. Larger Blenderbot checkpoints should
instead be used with `),V=s(be,"A",{href:!0});var zs=r(V);Xe=l(zs,"BlenderbotModel"),zs.forEach(t),Ye=l(be,` and
`),K=s(be,"A",{href:!0});var Fs=r(K);Ze=l(Fs,"BlenderbotForConditionalGeneration"),Fs.forEach(t),be.forEach(t),Ce=u(o),N=s(o,"H2",{class:!0});var Jn=r(N);ee=s(Jn,"A",{id:!0,class:!0,href:!0});var Ss=r(ee);ye=s(Ss,"SPAN",{});var Bs=r(ye);v(X.$$.fragment,Bs),Bs.forEach(t),Ss.forEach(t),A=u(Jn),P=s(Jn,"SPAN",{});var qs=r(P);Qe=l(qs,"Overview"),qs.forEach(t),Jn.forEach(t),te=u(o),oe=s(o,"P",{});var Xn=r(oe);et=l(Xn,"The Blender chatbot model was proposed in "),U=s(Xn,"A",{href:!0,rel:!0});var Ms=r(U);tt=l(Ms,"Recipes for building an open-domain chatbot"),Ms.forEach(t),ot=l(Xn,` 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.`),Xn.forEach(t),O=u(o),he=s(o,"P",{});var js=r(he);le=l(js,"The abstract of the paper is the following:"),js.forEach(t),Ae=u(o),me=s(o,"P",{});var Es=r(me);Y=s(Es,"EM",{});var Cs=r(Y);nt=l(Cs,`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.`),Cs.forEach(t),Es.forEach(t),Pe=u(o),G=s(o,"P",{});var As=r(G);at=l(As,"Tips:"),As.forEach(t),ne=u(o),fe=s(o,"UL",{});var _c=r(fe);ie=s(_c,"LI",{});var gc=r(ie);L=l(gc,`Blenderbot Small is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),gc.forEach(t),_c.forEach(t),Oe=u(o),E=s(o,"P",{});var _a=r(E);st=l(_a,"This model was contributed by "),ce=s(_a,"A",{href:!0,rel:!0});var bc=r(ce);z=l(bc,"patrickvonplaten"),bc.forEach(t),q=l(_a,`. The authors\u2019 code can be
found `),ve=s(_a,"A",{href:!0,rel:!0});var kc=r(ve);Te=l(kc,"here"),kc.forEach(t),bt=l(_a,"."),_a.forEach(t),ut=u(o),B=s(o,"H2",{class:!0});var nr=r(B);_e=s(nr,"A",{id:!0,class:!0,href:!0});var yc=r(_e);rt=s(yc,"SPAN",{});var vc=r(rt);v(we.$$.fragment,vc),vc.forEach(t),yc.forEach(t),kt=u(nr),dt=s(nr,"SPAN",{});var Tc=r(dt);Z=l(Tc,"Documentation resources"),Tc.forEach(t),nr.forEach(t),ae=u(o),se=s(o,"UL",{});var ga=r(se);lt=s(ga,"LI",{});var wc=r(lt);J=s(wc,"A",{href:!0});var $c=r(J);yt=l($c,"Causal language modeling task guide"),$c.forEach(t),wc.forEach(t),vt=u(ga),$e=s(ga,"LI",{});var xc=r($e);Ne=s(xc,"A",{href:!0});var zc=r(Ne);xe=l(zc,"Translation task guide"),zc.forEach(t),xc.forEach(t),Tt=u(ga),Ba=s(ga,"LI",{});var Fc=r(Ba);Zn=s(Fc,"A",{href:!0});var Sc=r(Zn);Or=l(Sc,"Summarization task guide"),Sc.forEach(t),Fc.forEach(t),ga.forEach(t),Ps=u(o),wt=s(o,"H2",{class:!0});var ar=r(wt);Gt=s(ar,"A",{id:!0,class:!0,href:!0});var Bc=r(Gt);qa=s(Bc,"SPAN",{});var qc=r(qa);v(Po.$$.fragment,qc),qc.forEach(t),Bc.forEach(t),Nr=u(ar),Ma=s(ar,"SPAN",{});var Mc=r(Ma);Lr=l(Mc,"BlenderbotSmallConfig"),Mc.forEach(t),ar.forEach(t),Os=u(o),ze=s(o,"DIV",{class:!0});var Fo=r(ze);v(Oo.$$.fragment,Fo),Ir=u(Fo),$t=s(Fo,"P",{});var ba=r($t);Dr=l(ba,"This is the configuration class to store the configuration of a "),Qn=s(ba,"A",{href:!0});var jc=r(Qn);Gr=l(jc,"BlenderbotSmallModel"),jc.forEach(t),Wr=l(ba,`. It is used to instantiate
an BlenderbotSmall 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 BlenderbotSmall
`),No=s(ba,"A",{href:!0,rel:!0});var Ec=r(No);Ur=l(Ec,"facebook/blenderbot_small-90M"),Ec.forEach(t),Rr=l(ba," architecture."),ba.forEach(t),Hr=u(Fo),xt=s(Fo,"P",{});var ka=r(xt);Vr=l(ka,"Configuration objects inherit from "),ea=s(ka,"A",{href:!0});var Cc=r(ea);Kr=l(Cc,"PretrainedConfig"),Cc.forEach(t),Jr=l(ka,` and can be used to control the model outputs. Read the
documentation from `),ta=s(ka,"A",{href:!0});var Ac=r(ta);Xr=l(Ac,"PretrainedConfig"),Ac.forEach(t),Yr=l(ka," for more information."),ka.forEach(t),Zr=u(Fo),v(Wt.$$.fragment,Fo),Fo.forEach(t),Ns=u(o),zt=s(o,"H2",{class:!0});var sr=r(zt);Ut=s(sr,"A",{id:!0,class:!0,href:!0});var Pc=r(Ut);ja=s(Pc,"SPAN",{});var Oc=r(ja);v(Lo.$$.fragment,Oc),Oc.forEach(t),Pc.forEach(t),Qr=u(sr),Ea=s(sr,"SPAN",{});var Nc=r(Ea);ed=l(Nc,"BlenderbotSmallTokenizer"),Nc.forEach(t),sr.forEach(t),Ls=u(o),R=s(o,"DIV",{class:!0});var ke=r(R);v(Io.$$.fragment,ke),td=u(ke),Ca=s(ke,"P",{});var Lc=r(Ca);od=l(Lc,"Constructs a Blenderbot-90M tokenizer based on BPE (Byte-Pair-Encoding)"),Lc.forEach(t),nd=u(ke),Do=s(ke,"P",{});var rr=r(Do);ad=l(rr,"This tokenizer inherits from "),oa=s(rr,"A",{href:!0});var Ic=r(oa);sd=l(Ic,"PreTrainedTokenizer"),Ic.forEach(t),rd=l(rr,` which contains most of the main methods. Users should refer to
the superclass for more information regarding methods.`),rr.forEach(t),dd=u(ke),ht=s(ke,"DIV",{class:!0});var ya=r(ht);v(Go.$$.fragment,ya),ld=u(ya),Aa=s(ya,"P",{});var Dc=r(Aa);id=l(Dc,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens.`),Dc.forEach(t),cd=u(ya),Pa=s(ya,"P",{});var Gc=r(Pa);pd=l(Gc,"This implementation does not add special tokens and this method should be overridden in a subclass."),Gc.forEach(t),ya.forEach(t),ud=u(ke),Rt=s(ke,"DIV",{class:!0});var dr=r(Rt);v(Wo.$$.fragment,dr),hd=u(dr),Ft=s(dr,"P",{});var va=r(Ft);md=l(va,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Oa=s(va,"CODE",{});var Wc=r(Oa);fd=l(Wc,"prepare_for_model"),Wc.forEach(t),_d=l(va," or "),Na=s(va,"CODE",{});var Uc=r(Na);gd=l(Uc,"encode_plus"),Uc.forEach(t),bd=l(va," methods."),va.forEach(t),dr.forEach(t),kd=u(ke),mt=s(ke,"DIV",{class:!0});var Ta=r(mt);v(Uo.$$.fragment,Ta),yd=u(Ta),na=s(Ta,"P",{});var fc=r(na);vd=l(fc,"Create the token type IDs corresponding to the sequences passed. "),aa=s(fc,"A",{href:!0});var Rc=r(aa);Td=l(Rc,`What are token type
IDs?`),Rc.forEach(t),fc.forEach(t),wd=u(Ta),La=s(Ta,"P",{});var Hc=r(La);$d=l(Hc,"Should be overridden in a subclass if the model has a special way of building those."),Hc.forEach(t),Ta.forEach(t),xd=u(ke),sa=s(ke,"DIV",{class:!0});var Vc=r(sa);v(Ro.$$.fragment,Vc),Vc.forEach(t),ke.forEach(t),Is=u(o),St=s(o,"H2",{class:!0});var lr=r(St);Ht=s(lr,"A",{id:!0,class:!0,href:!0});var Kc=r(Ht);Ia=s(Kc,"SPAN",{});var Jc=r(Ia);v(Ho.$$.fragment,Jc),Jc.forEach(t),Kc.forEach(t),zd=u(lr),Da=s(lr,"SPAN",{});var Xc=r(Da);Fd=l(Xc,"BlenderbotSmallTokenizerFast"),Xc.forEach(t),lr.forEach(t),Ds=u(o),it=s(o,"DIV",{class:!0});var wa=r(it);v(Vo.$$.fragment,wa),Sd=u(wa),Ko=s(wa,"P",{});var ir=r(Ko);Bd=l(ir,"Construct a \u201Cfast\u201D BlenderbotSmall tokenizer (backed by HuggingFace\u2019s "),Ga=s(ir,"EM",{});var Yc=r(Ga);qd=l(Yc,"tokenizers"),Yc.forEach(t),Md=l(ir," library)."),ir.forEach(t),jd=u(wa),Vt=s(wa,"DIV",{class:!0});var cr=r(Vt);v(Jo.$$.fragment,cr),Ed=u(cr),Wa=s(cr,"P",{});var Zc=r(Wa);Cd=l(Zc,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. BlenderbotSmall
does not make use of token type ids, therefore a list of zeros is returned.`),Zc.forEach(t),cr.forEach(t),wa.forEach(t),Gs=u(o),Bt=s(o,"H2",{class:!0});var pr=r(Bt);Kt=s(pr,"A",{id:!0,class:!0,href:!0});var Qc=r(Kt);Ua=s(Qc,"SPAN",{});var ep=r(Ua);v(Xo.$$.fragment,ep),ep.forEach(t),Qc.forEach(t),Ad=u(pr),Ra=s(pr,"SPAN",{});var tp=r(Ra);Pd=l(tp,"BlenderbotSmallModel"),tp.forEach(t),pr.forEach(t),Ws=u(o),Fe=s(o,"DIV",{class:!0});var So=r(Fe);v(Yo.$$.fragment,So),Od=u(So),Zo=s(So,"P",{});var ur=r(Zo);Nd=l(ur,`The bare BlenderbotSmall Model outputting raw hidden-states without any specific head on top.
This model inherits from `),ra=s(ur,"A",{href:!0});var op=r(ra);Ld=l(op,"PreTrainedModel"),op.forEach(t),Id=l(ur,`. 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.)`),ur.forEach(t),Dd=u(So),Qo=s(So,"P",{});var hr=r(Qo);Gd=l(hr,"This model is also a PyTorch "),en=s(hr,"A",{href:!0,rel:!0});var np=r(en);Wd=l(np,"torch.nn.Module"),np.forEach(t),Ud=l(hr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hr.forEach(t),Rd=u(So),Le=s(So,"DIV",{class:!0});var Bo=r(Le);v(tn.$$.fragment,Bo),Hd=u(Bo),qt=s(Bo,"P",{});var $a=r(qt);Vd=l($a,"The "),da=s($a,"A",{href:!0});var ap=r(da);Kd=l(ap,"BlenderbotSmallModel"),ap.forEach(t),Jd=l($a," forward method, overrides the "),Ha=s($a,"CODE",{});var sp=r(Ha);Xd=l(sp,"__call__"),sp.forEach(t),Yd=l($a," special method."),$a.forEach(t),Zd=u(Bo),v(Jt.$$.fragment,Bo),Qd=u(Bo),v(Xt.$$.fragment,Bo),Bo.forEach(t),So.forEach(t),Us=u(o),Mt=s(o,"H2",{class:!0});var mr=r(Mt);Yt=s(mr,"A",{id:!0,class:!0,href:!0});var rp=r(Yt);Va=s(rp,"SPAN",{});var dp=r(Va);v(on.$$.fragment,dp),dp.forEach(t),rp.forEach(t),el=u(mr),Ka=s(mr,"SPAN",{});var lp=r(Ka);tl=l(lp,"BlenderbotSmallForConditionalGeneration"),lp.forEach(t),mr.forEach(t),Rs=u(o),Se=s(o,"DIV",{class:!0});var qo=r(Se);v(nn.$$.fragment,qo),ol=u(qo),an=s(qo,"P",{});var fr=r(an);nl=l(fr,`The BlenderbotSmall Model with a language modeling head. Can be used for summarization.
This model inherits from `),la=s(fr,"A",{href:!0});var ip=r(la);al=l(ip,"PreTrainedModel"),ip.forEach(t),sl=l(fr,`. 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.)`),fr.forEach(t),rl=u(qo),sn=s(qo,"P",{});var _r=r(sn);dl=l(_r,"This model is also a PyTorch "),rn=s(_r,"A",{href:!0,rel:!0});var cp=r(rn);ll=l(cp,"torch.nn.Module"),cp.forEach(t),il=l(_r,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_r.forEach(t),cl=u(qo),Ie=s(qo,"DIV",{class:!0});var Mo=r(Ie);v(dn.$$.fragment,Mo),pl=u(Mo),jt=s(Mo,"P",{});var xa=r(jt);ul=l(xa,"The "),ia=s(xa,"A",{href:!0});var pp=r(ia);hl=l(pp,"BlenderbotSmallForConditionalGeneration"),pp.forEach(t),ml=l(xa," forward method, overrides the "),Ja=s(xa,"CODE",{});var up=r(Ja);fl=l(up,"__call__"),up.forEach(t),_l=l(xa," special method."),xa.forEach(t),gl=u(Mo),v(Zt.$$.fragment,Mo),bl=u(Mo),v(Qt.$$.fragment,Mo),Mo.forEach(t),qo.forEach(t),Hs=u(o),Et=s(o,"H2",{class:!0});var gr=r(Et);eo=s(gr,"A",{id:!0,class:!0,href:!0});var hp=r(eo);Xa=s(hp,"SPAN",{});var mp=r(Xa);v(ln.$$.fragment,mp),mp.forEach(t),hp.forEach(t),kl=u(gr),Ya=s(gr,"SPAN",{});var fp=r(Ya);yl=l(fp,"BlenderbotSmallForCausalLM"),fp.forEach(t),gr.forEach(t),Vs=u(o),Ct=s(o,"DIV",{class:!0});var br=r(Ct);v(cn.$$.fragment,br),vl=u(br),to=s(br,"DIV",{class:!0});var kr=r(to);v(pn.$$.fragment,kr),Tl=u(kr),v(oo.$$.fragment,kr),kr.forEach(t),br.forEach(t),Ks=u(o),At=s(o,"H2",{class:!0});var yr=r(At);no=s(yr,"A",{id:!0,class:!0,href:!0});var _p=r(no);Za=s(_p,"SPAN",{});var gp=r(Za);v(un.$$.fragment,gp),gp.forEach(t),_p.forEach(t),wl=u(yr),Qa=s(yr,"SPAN",{});var bp=r(Qa);$l=l(bp,"TFBlenderbotSmallModel"),bp.forEach(t),yr.forEach(t),Js=u(o),pe=s(o,"DIV",{class:!0});var ft=r(pe);v(hn.$$.fragment,ft),xl=u(ft),mn=s(ft,"P",{});var vr=r(mn);zl=l(vr,`The bare BLENDERBOT_SMALL Model outputting raw hidden-states without any specific head on top.
This model inherits from `),ca=s(vr,"A",{href:!0});var kp=r(ca);Fl=l(kp,"TFPreTrainedModel"),kp.forEach(t),Sl=l(vr,`. 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.)`),vr.forEach(t),Bl=u(ft),fn=s(ft,"P",{});var Tr=r(fn);ql=l(Tr,"This model is also a "),_n=s(Tr,"A",{href:!0,rel:!0});var yp=r(_n);Ml=l(yp,"tf.keras.Model"),yp.forEach(t),jl=l(Tr,` 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.`),Tr.forEach(t),El=u(ft),v(ao.$$.fragment,ft),Cl=u(ft),De=s(ft,"DIV",{class:!0});var jo=r(De);v(gn.$$.fragment,jo),Al=u(jo),Pt=s(jo,"P",{});var za=r(Pt);Pl=l(za,"The "),pa=s(za,"A",{href:!0});var vp=r(pa);Ol=l(vp,"TFBlenderbotSmallModel"),vp.forEach(t),Nl=l(za," forward method, overrides the "),es=s(za,"CODE",{});var Tp=r(es);Ll=l(Tp,"__call__"),Tp.forEach(t),Il=l(za," special method."),za.forEach(t),Dl=u(jo),v(so.$$.fragment,jo),Gl=u(jo),v(ro.$$.fragment,jo),jo.forEach(t),ft.forEach(t),Xs=u(o),Ot=s(o,"H2",{class:!0});var wr=r(Ot);lo=s(wr,"A",{id:!0,class:!0,href:!0});var wp=r(lo);ts=s(wp,"SPAN",{});var $p=r(ts);v(bn.$$.fragment,$p),$p.forEach(t),wp.forEach(t),Wl=u(wr),os=s(wr,"SPAN",{});var xp=r(os);Ul=l(xp,"TFBlenderbotSmallForConditionalGeneration"),xp.forEach(t),wr.forEach(t),Ys=u(o),ue=s(o,"DIV",{class:!0});var _t=r(ue);v(kn.$$.fragment,_t),Rl=u(_t),yn=s(_t,"P",{});var $r=r(yn);Hl=l($r,`The BLENDERBOT_SMALL Model with a language modeling head. Can be used for summarization.
This model inherits from `),ua=s($r,"A",{href:!0});var zp=r(ua);Vl=l(zp,"TFPreTrainedModel"),zp.forEach(t),Kl=l($r,`. 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.)`),$r.forEach(t),Jl=u(_t),vn=s(_t,"P",{});var xr=r(vn);Xl=l(xr,"This model is also a "),Tn=s(xr,"A",{href:!0,rel:!0});var Fp=r(Tn);Yl=l(Fp,"tf.keras.Model"),Fp.forEach(t),Zl=l(xr,` 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.`),xr.forEach(t),Ql=u(_t),v(io.$$.fragment,_t),ei=u(_t),Ge=s(_t,"DIV",{class:!0});var Eo=r(Ge);v(wn.$$.fragment,Eo),ti=u(Eo),Nt=s(Eo,"P",{});var Fa=r(Nt);oi=l(Fa,"The "),ha=s(Fa,"A",{href:!0});var Sp=r(ha);ni=l(Sp,"TFBlenderbotSmallForConditionalGeneration"),Sp.forEach(t),ai=l(Fa," forward method, overrides the "),ns=s(Fa,"CODE",{});var Bp=r(ns);si=l(Bp,"__call__"),Bp.forEach(t),ri=l(Fa," special method."),Fa.forEach(t),di=u(Eo),v(co.$$.fragment,Eo),li=u(Eo),v(po.$$.fragment,Eo),Eo.forEach(t),_t.forEach(t),Zs=u(o),Lt=s(o,"H2",{class:!0});var zr=r(Lt);uo=s(zr,"A",{id:!0,class:!0,href:!0});var qp=r(uo);as=s(qp,"SPAN",{});var Mp=r(as);v($n.$$.fragment,Mp),Mp.forEach(t),qp.forEach(t),ii=u(zr),ss=s(zr,"SPAN",{});var jp=r(ss);ci=l(jp,"FlaxBlenderbotSmallModel"),jp.forEach(t),zr.forEach(t),Qs=u(o),I=s(o,"DIV",{class:!0});var re=r(I);v(xn.$$.fragment,re),pi=u(re),zn=s(re,"P",{});var Fr=r(zn);ui=l(Fr,`The bare BlenderbotSmall Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),ma=s(Fr,"A",{href:!0});var Ep=r(ma);hi=l(Ep,"FlaxPreTrainedModel"),Ep.forEach(t),mi=l(Fr,`. 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.)`),Fr.forEach(t),fi=u(re),Fn=s(re,"P",{});var Sr=r(Fn);_i=l(Sr,`This model is also a Flax Linen
`),Sn=s(Sr,"A",{href:!0,rel:!0});var Cp=r(Sn);gi=l(Cp,"flax.nn.Module"),Cp.forEach(t),bi=l(Sr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Sr.forEach(t),ki=u(re),rs=s(re,"P",{});var Ap=r(rs);yi=l(Ap,"Finally, this model supports inherent JAX features such as:"),Ap.forEach(t),vi=u(re),ct=s(re,"UL",{});var Co=r(ct);ds=s(Co,"LI",{});var Pp=r(ds);Bn=s(Pp,"A",{href:!0,rel:!0});var Op=r(Bn);Ti=l(Op,"Just-In-Time (JIT) compilation"),Op.forEach(t),Pp.forEach(t),wi=u(Co),ls=s(Co,"LI",{});var Np=r(ls);qn=s(Np,"A",{href:!0,rel:!0});var Lp=r(qn);$i=l(Lp,"Automatic Differentiation"),Lp.forEach(t),Np.forEach(t),xi=u(Co),is=s(Co,"LI",{});var Ip=r(is);Mn=s(Ip,"A",{href:!0,rel:!0});var Dp=r(Mn);zi=l(Dp,"Vectorization"),Dp.forEach(t),Ip.forEach(t),Fi=u(Co),cs=s(Co,"LI",{});var Gp=r(cs);jn=s(Gp,"A",{href:!0,rel:!0});var Wp=r(jn);Si=l(Wp,"Parallelization"),Wp.forEach(t),Gp.forEach(t),Co.forEach(t),Bi=u(re),ho=s(re,"DIV",{class:!0});var Br=r(ho);v(En.$$.fragment,Br),qi=u(Br),v(mo.$$.fragment,Br),Br.forEach(t),Mi=u(re),fo=s(re,"DIV",{class:!0});var qr=r(fo);v(Cn.$$.fragment,qr),ji=u(qr),v(_o.$$.fragment,qr),qr.forEach(t),Ei=u(re),go=s(re,"DIV",{class:!0});var Mr=r(go);v(An.$$.fragment,Mr),Ci=u(Mr),v(bo.$$.fragment,Mr),Mr.forEach(t),re.forEach(t),er=u(o),It=s(o,"H2",{class:!0});var jr=r(It);ko=s(jr,"A",{id:!0,class:!0,href:!0});var Up=r(ko);ps=s(Up,"SPAN",{});var Rp=r(ps);v(Pn.$$.fragment,Rp),Rp.forEach(t),Up.forEach(t),Ai=u(jr),us=s(jr,"SPAN",{});var Hp=r(us);Pi=l(Hp,"FlaxBlenderbotForConditionalGeneration"),Hp.forEach(t),jr.forEach(t),tr=u(o),D=s(o,"DIV",{class:!0});var de=r(D);v(On.$$.fragment,de),Oi=u(de),Nn=s(de,"P",{});var Er=r(Nn);Ni=l(Er,`The BLENDERBOT_SMALL Model with a language modeling head. Can be used for summarization.
This model inherits from `),fa=s(Er,"A",{href:!0});var Vp=r(fa);Li=l(Vp,"FlaxPreTrainedModel"),Vp.forEach(t),Ii=l(Er,`. 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.)`),Er.forEach(t),Di=u(de),Ln=s(de,"P",{});var Cr=r(Ln);Gi=l(Cr,`This model is also a Flax Linen
`),In=s(Cr,"A",{href:!0,rel:!0});var Kp=r(In);Wi=l(Kp,"flax.nn.Module"),Kp.forEach(t),Ui=l(Cr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Cr.forEach(t),Ri=u(de),hs=s(de,"P",{});var Jp=r(hs);Hi=l(Jp,"Finally, this model supports inherent JAX features such as:"),Jp.forEach(t),Vi=u(de),pt=s(de,"UL",{});var Ao=r(pt);ms=s(Ao,"LI",{});var Xp=r(ms);Dn=s(Xp,"A",{href:!0,rel:!0});var Yp=r(Dn);Ki=l(Yp,"Just-In-Time (JIT) compilation"),Yp.forEach(t),Xp.forEach(t),Ji=u(Ao),fs=s(Ao,"LI",{});var Zp=r(fs);Gn=s(Zp,"A",{href:!0,rel:!0});var Qp=r(Gn);Xi=l(Qp,"Automatic Differentiation"),Qp.forEach(t),Zp.forEach(t),Yi=u(Ao),_s=s(Ao,"LI",{});var eu=r(_s);Wn=s(eu,"A",{href:!0,rel:!0});var tu=r(Wn);Zi=l(tu,"Vectorization"),tu.forEach(t),eu.forEach(t),Qi=u(Ao),gs=s(Ao,"LI",{});var ou=r(gs);Un=s(ou,"A",{href:!0,rel:!0});var nu=r(Un);ec=l(nu,"Parallelization"),nu.forEach(t),ou.forEach(t),Ao.forEach(t),tc=u(de),ge=s(de,"DIV",{class:!0});var gt=r(ge);v(Rn.$$.fragment,gt),oc=u(gt),Dt=s(gt,"P",{});var Sa=r(Dt);nc=l(Sa,"The "),bs=s(Sa,"CODE",{});var au=r(bs);ac=l(au,"FlaxBlenderbotSmallPreTrainedModel"),au.forEach(t),sc=l(Sa," forward method, overrides the "),ks=s(Sa,"CODE",{});var su=r(ks);rc=l(su,"__call__"),su.forEach(t),dc=l(Sa," special method."),Sa.forEach(t),lc=u(gt),v(yo.$$.fragment,gt),ic=u(gt),v(vo.$$.fragment,gt),cc=u(gt),v(To.$$.fragment,gt),gt.forEach(t),pc=u(de),wo=s(de,"DIV",{class:!0});var Ar=r(wo);v(Hn.$$.fragment,Ar),uc=u(Ar),v($o.$$.fragment,Ar),Ar.forEach(t),hc=u(de),xo=s(de,"DIV",{class:!0});var Pr=r(xo);v(Vn.$$.fragment,Pr),mc=u(Pr),v(zo.$$.fragment,Pr),Pr.forEach(t),de.forEach(t),this.h()},h(){h(i,"name","hf:doc:metadata"),h(i,"content",JSON.stringify(ju)),h(m,"id","blenderbot-small"),h(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(m,"href","#blenderbot-small"),h(f,"class","relative group"),h(Q,"href","/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallModel"),h(H,"href","/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallForConditionalGeneration"),h(W,"href","https://huggingface.co/facebook/blenderbot-90M"),h(W,"rel","nofollow"),h(V,"href","/docs/transformers/v4.29.0/en/model_doc/blenderbot#transformers.BlenderbotModel"),h(K,"href","/docs/transformers/v4.29.0/en/model_doc/blenderbot#transformers.BlenderbotForConditionalGeneration"),h(ee,"id","overview"),h(ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ee,"href","#overview"),h(N,"class","relative group"),h(U,"href","https://arxiv.org/pdf/2004.13637.pdf"),h(U,"rel","nofollow"),h(ce,"href","https://huggingface.co/patrickvonplaten"),h(ce,"rel","nofollow"),h(ve,"href","https://github.com/facebookresearch/ParlAI"),h(ve,"rel","nofollow"),h(_e,"id","documentation-resources"),h(_e,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(_e,"href","#documentation-resources"),h(B,"class","relative group"),h(J,"href","../tasks/language_modeling"),h(Ne,"href","../tasks/translation"),h(Zn,"href","../tasks/summarization"),h(Gt,"id","transformers.BlenderbotSmallConfig"),h(Gt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Gt,"href","#transformers.BlenderbotSmallConfig"),h(wt,"class","relative group"),h(Qn,"href","/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallModel"),h(No,"href","https://huggingface.co/facebook/blenderbot_small-90M"),h(No,"rel","nofollow"),h(ea,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),h(ta,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),h(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ut,"id","transformers.BlenderbotSmallTokenizer"),h(Ut,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Ut,"href","#transformers.BlenderbotSmallTokenizer"),h(zt,"class","relative group"),h(oa,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),h(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(aa,"href","../glossary#token-type-ids"),h(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(sa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ht,"id","transformers.BlenderbotSmallTokenizerFast"),h(Ht,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Ht,"href","#transformers.BlenderbotSmallTokenizerFast"),h(St,"class","relative group"),h(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Kt,"id","transformers.BlenderbotSmallModel"),h(Kt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Kt,"href","#transformers.BlenderbotSmallModel"),h(Bt,"class","relative group"),h(ra,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),h(en,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(en,"rel","nofollow"),h(da,"href","/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallModel"),h(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Yt,"id","transformers.BlenderbotSmallForConditionalGeneration"),h(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"),h(Yt,"href","#transformers.BlenderbotSmallForConditionalGeneration"),h(Mt,"class","relative group"),h(la,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),h(rn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(rn,"rel","nofollow"),h(ia,"href","/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.BlenderbotSmallForConditionalGeneration"),h(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(eo,"id","transformers.BlenderbotSmallForCausalLM"),h(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"),h(eo,"href","#transformers.BlenderbotSmallForCausalLM"),h(Et,"class","relative group"),h(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(no,"id","transformers.TFBlenderbotSmallModel"),h(no,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(no,"href","#transformers.TFBlenderbotSmallModel"),h(At,"class","relative group"),h(ca,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),h(_n,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(_n,"rel","nofollow"),h(pa,"href","/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.TFBlenderbotSmallModel"),h(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(lo,"id","transformers.TFBlenderbotSmallForConditionalGeneration"),h(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"),h(lo,"href","#transformers.TFBlenderbotSmallForConditionalGeneration"),h(Ot,"class","relative group"),h(ua,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),h(Tn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Tn,"rel","nofollow"),h(ha,"href","/docs/transformers/v4.29.0/en/model_doc/blenderbot-small#transformers.TFBlenderbotSmallForConditionalGeneration"),h(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(uo,"id","transformers.FlaxBlenderbotSmallModel"),h(uo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(uo,"href","#transformers.FlaxBlenderbotSmallModel"),h(Lt,"class","relative group"),h(ma,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Sn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),h(Sn,"rel","nofollow"),h(Bn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Bn,"rel","nofollow"),h(qn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(qn,"rel","nofollow"),h(Mn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Mn,"rel","nofollow"),h(jn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(jn,"rel","nofollow"),h(ho,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ko,"id","transformers.FlaxBlenderbotSmallForConditionalGeneration"),h(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"),h(ko,"href","#transformers.FlaxBlenderbotSmallForConditionalGeneration"),h(It,"class","relative group"),h(fa,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(In,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),h(In,"rel","nofollow"),h(Dn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Dn,"rel","nofollow"),h(Gn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Gn,"rel","nofollow"),h(Wn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Wn,"rel","nofollow"),h(Un,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Un,"rel","nofollow"),h(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(D,"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,i),_(o,k,g),_(o,f,g),e(f,m),e(m,b),T(n,b,null),e(f,c),e(f,M),e(M,We),_(o,Ee,g),_(o,j,g),e(j,Ue),e(j,Q),e(Q,S),e(j,Re),e(j,H),e(H,He),e(j,Ve),e(j,W),e(W,Ke),e(j,Je),e(j,V),e(V,Xe),e(j,Ye),e(j,K),e(K,Ze),_(o,Ce,g),_(o,N,g),e(N,ee),e(ee,ye),T(X,ye,null),e(N,A),e(N,P),e(P,Qe),_(o,te,g),_(o,oe,g),e(oe,et),e(oe,U),e(U,tt),e(oe,ot),_(o,O,g),_(o,he,g),e(he,le),_(o,Ae,g),_(o,me,g),e(me,Y),e(Y,nt),_(o,Pe,g),_(o,G,g),e(G,at),_(o,ne,g),_(o,fe,g),e(fe,ie),e(ie,L),_(o,Oe,g),_(o,E,g),e(E,st),e(E,ce),e(ce,z),e(E,q),e(E,ve),e(ve,Te),e(E,bt),_(o,ut,g),_(o,B,g),e(B,_e),e(_e,rt),T(we,rt,null),e(B,kt),e(B,dt),e(dt,Z),_(o,ae,g),_(o,se,g),e(se,lt),e(lt,J),e(J,yt),e(se,vt),e(se,$e),e($e,Ne),e(Ne,xe),e(se,Tt),e(se,Ba),e(Ba,Zn),e(Zn,Or),_(o,Ps,g),_(o,wt,g),e(wt,Gt),e(Gt,qa),T(Po,qa,null),e(wt,Nr),e(wt,Ma),e(Ma,Lr),_(o,Os,g),_(o,ze,g),T(Oo,ze,null),e(ze,Ir),e(ze,$t),e($t,Dr),e($t,Qn),e(Qn,Gr),e($t,Wr),e($t,No),e(No,Ur),e($t,Rr),e(ze,Hr),e(ze,xt),e(xt,Vr),e(xt,ea),e(ea,Kr),e(xt,Jr),e(xt,ta),e(ta,Xr),e(xt,Yr),e(ze,Zr),T(Wt,ze,null),_(o,Ns,g),_(o,zt,g),e(zt,Ut),e(Ut,ja),T(Lo,ja,null),e(zt,Qr),e(zt,Ea),e(Ea,ed),_(o,Ls,g),_(o,R,g),T(Io,R,null),e(R,td),e(R,Ca),e(Ca,od),e(R,nd),e(R,Do),e(Do,ad),e(Do,oa),e(oa,sd),e(Do,rd),e(R,dd),e(R,ht),T(Go,ht,null),e(ht,ld),e(ht,Aa),e(Aa,id),e(ht,cd),e(ht,Pa),e(Pa,pd),e(R,ud),e(R,Rt),T(Wo,Rt,null),e(Rt,hd),e(Rt,Ft),e(Ft,md),e(Ft,Oa),e(Oa,fd),e(Ft,_d),e(Ft,Na),e(Na,gd),e(Ft,bd),e(R,kd),e(R,mt),T(Uo,mt,null),e(mt,yd),e(mt,na),e(na,vd),e(na,aa),e(aa,Td),e(mt,wd),e(mt,La),e(La,$d),e(R,xd),e(R,sa),T(Ro,sa,null),_(o,Is,g),_(o,St,g),e(St,Ht),e(Ht,Ia),T(Ho,Ia,null),e(St,zd),e(St,Da),e(Da,Fd),_(o,Ds,g),_(o,it,g),T(Vo,it,null),e(it,Sd),e(it,Ko),e(Ko,Bd),e(Ko,Ga),e(Ga,qd),e(Ko,Md),e(it,jd),e(it,Vt),T(Jo,Vt,null),e(Vt,Ed),e(Vt,Wa),e(Wa,Cd),_(o,Gs,g),_(o,Bt,g),e(Bt,Kt),e(Kt,Ua),T(Xo,Ua,null),e(Bt,Ad),e(Bt,Ra),e(Ra,Pd),_(o,Ws,g),_(o,Fe,g),T(Yo,Fe,null),e(Fe,Od),e(Fe,Zo),e(Zo,Nd),e(Zo,ra),e(ra,Ld),e(Zo,Id),e(Fe,Dd),e(Fe,Qo),e(Qo,Gd),e(Qo,en),e(en,Wd),e(Qo,Ud),e(Fe,Rd),e(Fe,Le),T(tn,Le,null),e(Le,Hd),e(Le,qt),e(qt,Vd),e(qt,da),e(da,Kd),e(qt,Jd),e(qt,Ha),e(Ha,Xd),e(qt,Yd),e(Le,Zd),T(Jt,Le,null),e(Le,Qd),T(Xt,Le,null),_(o,Us,g),_(o,Mt,g),e(Mt,Yt),e(Yt,Va),T(on,Va,null),e(Mt,el),e(Mt,Ka),e(Ka,tl),_(o,Rs,g),_(o,Se,g),T(nn,Se,null),e(Se,ol),e(Se,an),e(an,nl),e(an,la),e(la,al),e(an,sl),e(Se,rl),e(Se,sn),e(sn,dl),e(sn,rn),e(rn,ll),e(sn,il),e(Se,cl),e(Se,Ie),T(dn,Ie,null),e(Ie,pl),e(Ie,jt),e(jt,ul),e(jt,ia),e(ia,hl),e(jt,ml),e(jt,Ja),e(Ja,fl),e(jt,_l),e(Ie,gl),T(Zt,Ie,null),e(Ie,bl),T(Qt,Ie,null),_(o,Hs,g),_(o,Et,g),e(Et,eo),e(eo,Xa),T(ln,Xa,null),e(Et,kl),e(Et,Ya),e(Ya,yl),_(o,Vs,g),_(o,Ct,g),T(cn,Ct,null),e(Ct,vl),e(Ct,to),T(pn,to,null),e(to,Tl),T(oo,to,null),_(o,Ks,g),_(o,At,g),e(At,no),e(no,Za),T(un,Za,null),e(At,wl),e(At,Qa),e(Qa,$l),_(o,Js,g),_(o,pe,g),T(hn,pe,null),e(pe,xl),e(pe,mn),e(mn,zl),e(mn,ca),e(ca,Fl),e(mn,Sl),e(pe,Bl),e(pe,fn),e(fn,ql),e(fn,_n),e(_n,Ml),e(fn,jl),e(pe,El),T(ao,pe,null),e(pe,Cl),e(pe,De),T(gn,De,null),e(De,Al),e(De,Pt),e(Pt,Pl),e(Pt,pa),e(pa,Ol),e(Pt,Nl),e(Pt,es),e(es,Ll),e(Pt,Il),e(De,Dl),T(so,De,null),e(De,Gl),T(ro,De,null),_(o,Xs,g),_(o,Ot,g),e(Ot,lo),e(lo,ts),T(bn,ts,null),e(Ot,Wl),e(Ot,os),e(os,Ul),_(o,Ys,g),_(o,ue,g),T(kn,ue,null),e(ue,Rl),e(ue,yn),e(yn,Hl),e(yn,ua),e(ua,Vl),e(yn,Kl),e(ue,Jl),e(ue,vn),e(vn,Xl),e(vn,Tn),e(Tn,Yl),e(vn,Zl),e(ue,Ql),T(io,ue,null),e(ue,ei),e(ue,Ge),T(wn,Ge,null),e(Ge,ti),e(Ge,Nt),e(Nt,oi),e(Nt,ha),e(ha,ni),e(Nt,ai),e(Nt,ns),e(ns,si),e(Nt,ri),e(Ge,di),T(co,Ge,null),e(Ge,li),T(po,Ge,null),_(o,Zs,g),_(o,Lt,g),e(Lt,uo),e(uo,as),T($n,as,null),e(Lt,ii),e(Lt,ss),e(ss,ci),_(o,Qs,g),_(o,I,g),T(xn,I,null),e(I,pi),e(I,zn),e(zn,ui),e(zn,ma),e(ma,hi),e(zn,mi),e(I,fi),e(I,Fn),e(Fn,_i),e(Fn,Sn),e(Sn,gi),e(Fn,bi),e(I,ki),e(I,rs),e(rs,yi),e(I,vi),e(I,ct),e(ct,ds),e(ds,Bn),e(Bn,Ti),e(ct,wi),e(ct,ls),e(ls,qn),e(qn,$i),e(ct,xi),e(ct,is),e(is,Mn),e(Mn,zi),e(ct,Fi),e(ct,cs),e(cs,jn),e(jn,Si),e(I,Bi),e(I,ho),T(En,ho,null),e(ho,qi),T(mo,ho,null),e(I,Mi),e(I,fo),T(Cn,fo,null),e(fo,ji),T(_o,fo,null),e(I,Ei),e(I,go),T(An,go,null),e(go,Ci),T(bo,go,null),_(o,er,g),_(o,It,g),e(It,ko),e(ko,ps),T(Pn,ps,null),e(It,Ai),e(It,us),e(us,Pi),_(o,tr,g),_(o,D,g),T(On,D,null),e(D,Oi),e(D,Nn),e(Nn,Ni),e(Nn,fa),e(fa,Li),e(Nn,Ii),e(D,Di),e(D,Ln),e(Ln,Gi),e(Ln,In),e(In,Wi),e(Ln,Ui),e(D,Ri),e(D,hs),e(hs,Hi),e(D,Vi),e(D,pt),e(pt,ms),e(ms,Dn),e(Dn,Ki),e(pt,Ji),e(pt,fs),e(fs,Gn),e(Gn,Xi),e(pt,Yi),e(pt,_s),e(_s,Wn),e(Wn,Zi),e(pt,Qi),e(pt,gs),e(gs,Un),e(Un,ec),e(D,tc),e(D,ge),T(Rn,ge,null),e(ge,oc),e(ge,Dt),e(Dt,nc),e(Dt,bs),e(bs,ac),e(Dt,sc),e(Dt,ks),e(ks,rc),e(Dt,dc),e(ge,lc),T(yo,ge,null),e(ge,ic),T(vo,ge,null),e(ge,cc),T(To,ge,null),e(D,pc),e(D,wo),T(Hn,wo,null),e(wo,uc),T($o,wo,null),e(D,hc),e(D,xo),T(Vn,xo,null),e(xo,mc),T(zo,xo,null),or=!0},p(o,[g]){const Kn={};g&2&&(Kn.$$scope={dirty:g,ctx:o}),Wt.$set(Kn);const ys={};g&2&&(ys.$$scope={dirty:g,ctx:o}),Jt.$set(ys);const vs={};g&2&&(vs.$$scope={dirty:g,ctx:o}),Xt.$set(vs);const Ts={};g&2&&(Ts.$$scope={dirty:g,ctx:o}),Zt.$set(Ts);const be={};g&2&&(be.$$scope={dirty:g,ctx:o}),Qt.$set(be);const ws={};g&2&&(ws.$$scope={dirty:g,ctx:o}),oo.$set(ws);const $s={};g&2&&($s.$$scope={dirty:g,ctx:o}),ao.$set($s);const xs={};g&2&&(xs.$$scope={dirty:g,ctx:o}),so.$set(xs);const zs={};g&2&&(zs.$$scope={dirty:g,ctx:o}),ro.$set(zs);const Fs={};g&2&&(Fs.$$scope={dirty:g,ctx:o}),io.$set(Fs);const Jn={};g&2&&(Jn.$$scope={dirty:g,ctx:o}),co.$set(Jn);const Ss={};g&2&&(Ss.$$scope={dirty:g,ctx:o}),po.$set(Ss);const Bs={};g&2&&(Bs.$$scope={dirty:g,ctx:o}),mo.$set(Bs);const qs={};g&2&&(qs.$$scope={dirty:g,ctx:o}),_o.$set(qs);const Xn={};g&2&&(Xn.$$scope={dirty:g,ctx:o}),bo.$set(Xn);const Ms={};g&2&&(Ms.$$scope={dirty:g,ctx:o}),yo.$set(Ms);const js={};g&2&&(js.$$scope={dirty:g,ctx:o}),vo.$set(js);const Es={};g&2&&(Es.$$scope={dirty:g,ctx:o}),To.$set(Es);const Cs={};g&2&&(Cs.$$scope={dirty:g,ctx:o}),$o.$set(Cs);const As={};g&2&&(As.$$scope={dirty:g,ctx:o}),zo.$set(As)},i(o){or||(w(n.$$.fragment,o),w(X.$$.fragment,o),w(we.$$.fragment,o),w(Po.$$.fragment,o),w(Oo.$$.fragment,o),w(Wt.$$.fragment,o),w(Lo.$$.fragment,o),w(Io.$$.fragment,o),w(Go.$$.fragment,o),w(Wo.$$.fragment,o),w(Uo.$$.fragment,o),w(Ro.$$.fragment,o),w(Ho.$$.fragment,o),w(Vo.$$.fragment,o),w(Jo.$$.fragment,o),w(Xo.$$.fragment,o),w(Yo.$$.fragment,o),w(tn.$$.fragment,o),w(Jt.$$.fragment,o),w(Xt.$$.fragment,o),w(on.$$.fragment,o),w(nn.$$.fragment,o),w(dn.$$.fragment,o),w(Zt.$$.fragment,o),w(Qt.$$.fragment,o),w(ln.$$.fragment,o),w(cn.$$.fragment,o),w(pn.$$.fragment,o),w(oo.$$.fragment,o),w(un.$$.fragment,o),w(hn.$$.fragment,o),w(ao.$$.fragment,o),w(gn.$$.fragment,o),w(so.$$.fragment,o),w(ro.$$.fragment,o),w(bn.$$.fragment,o),w(kn.$$.fragment,o),w(io.$$.fragment,o),w(wn.$$.fragment,o),w(co.$$.fragment,o),w(po.$$.fragment,o),w($n.$$.fragment,o),w(xn.$$.fragment,o),w(En.$$.fragment,o),w(mo.$$.fragment,o),w(Cn.$$.fragment,o),w(_o.$$.fragment,o),w(An.$$.fragment,o),w(bo.$$.fragment,o),w(Pn.$$.fragment,o),w(On.$$.fragment,o),w(Rn.$$.fragment,o),w(yo.$$.fragment,o),w(vo.$$.fragment,o),w(To.$$.fragment,o),w(Hn.$$.fragment,o),w($o.$$.fragment,o),w(Vn.$$.fragment,o),w(zo.$$.fragment,o),or=!0)},o(o){$(n.$$.fragment,o),$(X.$$.fragment,o),$(we.$$.fragment,o),$(Po.$$.fragment,o),$(Oo.$$.fragment,o),$(Wt.$$.fragment,o),$(Lo.$$.fragment,o),$(Io.$$.fragment,o),$(Go.$$.fragment,o),$(Wo.$$.fragment,o),$(Uo.$$.fragment,o),$(Ro.$$.fragment,o),$(Ho.$$.fragment,o),$(Vo.$$.fragment,o),$(Jo.$$.fragment,o),$(Xo.$$.fragment,o),$(Yo.$$.fragment,o),$(tn.$$.fragment,o),$(Jt.$$.fragment,o),$(Xt.$$.fragment,o),$(on.$$.fragment,o),$(nn.$$.fragment,o),$(dn.$$.fragment,o),$(Zt.$$.fragment,o),$(Qt.$$.fragment,o),$(ln.$$.fragment,o),$(cn.$$.fragment,o),$(pn.$$.fragment,o),$(oo.$$.fragment,o),$(un.$$.fragment,o),$(hn.$$.fragment,o),$(ao.$$.fragment,o),$(gn.$$.fragment,o),$(so.$$.fragment,o),$(ro.$$.fragment,o),$(bn.$$.fragment,o),$(kn.$$.fragment,o),$(io.$$.fragment,o),$(wn.$$.fragment,o),$(co.$$.fragment,o),$(po.$$.fragment,o),$($n.$$.fragment,o),$(xn.$$.fragment,o),$(En.$$.fragment,o),$(mo.$$.fragment,o),$(Cn.$$.fragment,o),$(_o.$$.fragment,o),$(An.$$.fragment,o),$(bo.$$.fragment,o),$(Pn.$$.fragment,o),$(On.$$.fragment,o),$(Rn.$$.fragment,o),$(yo.$$.fragment,o),$(vo.$$.fragment,o),$(To.$$.fragment,o),$(Hn.$$.fragment,o),$($o.$$.fragment,o),$(Vn.$$.fragment,o),$(zo.$$.fragment,o),or=!1},d(o){t(i),o&&t(k),o&&t(f),x(n),o&&t(Ee),o&&t(j),o&&t(Ce),o&&t(N),x(X),o&&t(te),o&&t(oe),o&&t(O),o&&t(he),o&&t(Ae),o&&t(me),o&&t(Pe),o&&t(G),o&&t(ne),o&&t(fe),o&&t(Oe),o&&t(E),o&&t(ut),o&&t(B),x(we),o&&t(ae),o&&t(se),o&&t(Ps),o&&t(wt),x(Po),o&&t(Os),o&&t(ze),x(Oo),x(Wt),o&&t(Ns),o&&t(zt),x(Lo),o&&t(Ls),o&&t(R),x(Io),x(Go),x(Wo),x(Uo),x(Ro),o&&t(Is),o&&t(St),x(Ho),o&&t(Ds),o&&t(it),x(Vo),x(Jo),o&&t(Gs),o&&t(Bt),x(Xo),o&&t(Ws),o&&t(Fe),x(Yo),x(tn),x(Jt),x(Xt),o&&t(Us),o&&t(Mt),x(on),o&&t(Rs),o&&t(Se),x(nn),x(dn),x(Zt),x(Qt),o&&t(Hs),o&&t(Et),x(ln),o&&t(Vs),o&&t(Ct),x(cn),x(pn),x(oo),o&&t(Ks),o&&t(At),x(un),o&&t(Js),o&&t(pe),x(hn),x(ao),x(gn),x(so),x(ro),o&&t(Xs),o&&t(Ot),x(bn),o&&t(Ys),o&&t(ue),x(kn),x(io),x(wn),x(co),x(po),o&&t(Zs),o&&t(Lt),x($n),o&&t(Qs),o&&t(I),x(xn),x(En),x(mo),x(Cn),x(_o),x(An),x(bo),o&&t(er),o&&t(It),x(Pn),o&&t(tr),o&&t(D),x(On),x(Rn),x(yo),x(vo),x(To),x(Hn),x($o),x(Vn),x(zo)}}}const ju={local:"blenderbot-small",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.BlenderbotSmallConfig",title:"BlenderbotSmallConfig"},{local:"transformers.BlenderbotSmallTokenizer",title:"BlenderbotSmallTokenizer"},{local:"transformers.BlenderbotSmallTokenizerFast",title:"BlenderbotSmallTokenizerFast"},{local:"transformers.BlenderbotSmallModel",title:"BlenderbotSmallModel"},{local:"transformers.BlenderbotSmallForConditionalGeneration",title:"BlenderbotSmallForConditionalGeneration"},{local:"transformers.BlenderbotSmallForCausalLM",title:"BlenderbotSmallForCausalLM"},{local:"transformers.TFBlenderbotSmallModel",title:"TFBlenderbotSmallModel"},{local:"transformers.TFBlenderbotSmallForConditionalGeneration",title:"TFBlenderbotSmallForConditionalGeneration"},{local:"transformers.FlaxBlenderbotSmallModel",title:"FlaxBlenderbotSmallModel"},{local:"transformers.FlaxBlenderbotSmallForConditionalGeneration",title:"FlaxBlenderbotForConditionalGeneration"}],title:"Blenderbot Small"};function Eu(F){return cu(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Iu extends ru{constructor(i){super();du(this,i,Eu,Mu,lu,{})}}export{Iu as default,ju as metadata};
